Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 129 additions & 0 deletions api/schema/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,118 @@
}
}
},
"LlCliFilesystemEntry": {
"title": "LlCliFilesystemEntry",
"description": "filesystem entry used by ll-cli configuration",
"type": "object",
"required": [
"host",
"target"
],
"properties": {
"host": {
"type": "string",
"description": "source path on host"
},
"target": {
"type": "string",
"description": "mount target path inside container"
},
"mode": {
"type": "string",
"description": "mount mode, either ro or rw"
},
"persist": {
"type": "boolean",
"description": "whether this mount should persist in sandbox storage"
}
}
},
"LlCliCommandConfig": {
"title": "LlCliCommandConfig",
"description": "per-command overrides for ll-cli configuration",
"type": "object",
"properties": {
"env": {
"type": "object",
"description": "environment variables applied to command",
"additionalProperties": {
"type": "string"
}
},
"filesystem": {
"type": "array",
"description": "filesystem entries applied to command",
"items": {
"$ref": "#/$defs/LlCliFilesystemEntry"
}
},
"args_prefix": {
"type": "array",
"description": "arguments prepended before command",
"items": {
"type": "string"
}
},
"args_suffix": {
"type": "array",
"description": "arguments appended after command",
"items": {
"type": "string"
}
},
"entrypoint": {
"type": "string",
"description": "override entrypoint for command"
},
"cwd": {
"type": "string",
"description": "working directory for command"
}
}
},
"LlCliConfig": {
"title": "LlCliConfig",
"description": "default ll-cli configuration provided by package",
"type": "object",
"properties": {
"filesystem_allow_only": {
"type": "array",
"description": "explicit mount allowlist; when present only these mounts are permitted",
"items": {
"$ref": "#/$defs/LlCliFilesystemEntry"
}
},
"filesystem": {
"type": "array",
"description": "additional filesystem mounts appended to defaults",
"items": {
"$ref": "#/$defs/LlCliFilesystemEntry"
}
},
"env": {
"type": "object",
"description": "default environment variables",
"additionalProperties": {
"type": "string"
}
},
"commands": {
"type": "object",
"description": "command specific overrides",
"additionalProperties": {
"$ref": "#/$defs/LlCliCommandConfig"
}
},
"extensions": {
"type": "array",
"description": "default extensions applied when launching app",
"items": {
"type": "string"
}
}
}
},
"ContainerProcessStateInfo": {
"description": "information about process which in container that start by ll-cli, all content\nwill write to /run/linglong/UID/PID\n",
"type": "object",
Expand Down Expand Up @@ -379,6 +491,10 @@
"permissions": {
"$ref": "#/$defs/ApplicationConfigurationPermissions"
},
"cli_config": {
"$ref": "#/$defs/LlCliConfig",
"description": "default ll-cli configuration delivered with package"
},
"runtime": {
"type": "string",
"description": "used runtime of package"
Expand Down Expand Up @@ -773,6 +889,10 @@
"$ref": "#/$defs/ExtensionDefine"
}
},
"cli_config": {
"$ref": "#/$defs/LlCliConfig",
"description": "default ll-cli configuration provided by package"
},
"ext_impl": {
"$ref": "#/$defs/ExtensionImpl"
}
Expand Down Expand Up @@ -1414,6 +1534,15 @@
"ApplicationConfigurationPermissions": {
"$ref": "#/$defs/ApplicationConfigurationPermissions"
},
"LlCliFilesystemEntry": {
"$ref": "#/$defs/LlCliFilesystemEntry"
},
"LlCliCommandConfig": {
"$ref": "#/$defs/LlCliCommandConfig"
},
"LlCliConfig": {
"$ref": "#/$defs/LlCliConfig"
},
"ContainerProcessStateInfo": {
"$ref": "#/$defs/ContainerProcessStateInfo"
},
Expand Down
87 changes: 87 additions & 0 deletions api/schema/v1.yaml
Copy link
Collaborator

@myml myml Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议整理一下,命令不要加Ll这种奇怪的前缀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的。

Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,87 @@ $defs:
destination:
type: string
description: mount source file to the another position of container
LlCliFilesystemEntry:
title: LlCliFilesystemEntry
description: filesystem entry used by ll-cli configuration
type: object
required:
- host
- target
properties:
host:
type: string
description: source path on host
target:
type: string
description: mount target path inside container
mode:
type: string
description: mount mode, either ro or rw
persist:
type: boolean
description: whether this mount should persist in sandbox storage
LlCliCommandConfig:
title: LlCliCommandConfig
description: per-command overrides for ll-cli configuration
type: object
properties:
env:
type: object
description: environment variables applied to command
additionalProperties:
type: string
filesystem:
type: array
description: filesystem entries applied to command
items:
$ref: '#/$defs/LlCliFilesystemEntry'
args_prefix:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一些配置项好像没用到,如果还没有实现功能,就先把配置项去掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是准备把配置写到应用的linglong.yaml
就是这里也可以写配置。
这只是我的一种尝试。
都没验证有没有效果。。

type: array
description: arguments prepended before command
items:
type: string
args_suffix:
type: array
description: arguments appended after command
items:
type: string
entrypoint:
type: string
description: override entrypoint for command
cwd:
type: string
description: working directory for command
LlCliConfig:
title: LlCliConfig
description: default ll-cli configuration provided by package
type: object
properties:
filesystem_allow_only:
type: array
description: explicit mount allowlist; when present only these mounts are permitted
items:
$ref: '#/$defs/LlCliFilesystemEntry'
filesystem:
type: array
description: additional filesystem mounts appended to defaults
items:
$ref: '#/$defs/LlCliFilesystemEntry'
env:
type: object
description: default environment variables
additionalProperties:
type: string
commands:
type: object
description: command specific overrides
additionalProperties:
$ref: '#/$defs/LlCliCommandConfig'
extensions:
type: array
description: default extensions applied when launching app
items:
type: string
ContainerProcessStateInfo:
description: |
information about process which in container that start by ll-cli, all content
Expand Down Expand Up @@ -312,6 +393,9 @@ $defs:
type: string
permissions:
$ref: '#/$defs/ApplicationConfigurationPermissions'
cli_config:
$ref: '#/$defs/LlCliConfig'
description: default ll-cli configuration delivered with package
runtime:
type: string
description: used runtime of package
Expand Down Expand Up @@ -604,6 +688,9 @@ $defs:
description: description of extension
items:
$ref: '#/$defs/ExtensionDefine'
cli_config:
$ref: '#/$defs/LlCliConfig'
description: default ll-cli configuration provided by package
ext_impl:
$ref: '#/$defs/ExtensionImpl'
PackageInfo:
Expand Down
Loading
Loading