licos-platform-cli 0.6.3__tar.gz → 0.6.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/PKG-INFO +3 -2
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/README.md +1 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/pyproject.toml +19 -19
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/help_commands.py +3 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/identity.py +3 -3
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/tests/test_identity.py +7 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/.gitignore +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/__init__.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/database_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/knowledge_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/main.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/oauth_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/ontology_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/project_config_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/storage_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/user_commands.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/tests/test_cli.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/tests/test_project_config.py +0 -0
- {licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/tests/test_user.py +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: licos-platform-cli
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.5
|
|
4
4
|
Summary: LICOS platform CLI
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
|
-
Requires-Dist: licos-platform-sdk>=0.7.
|
|
6
|
+
Requires-Dist: licos-platform-sdk>=0.7.5
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
|
|
9
9
|
# licos-platform-cli
|
|
@@ -19,6 +19,7 @@ licos-platform help user me
|
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
用户接口默认使用 `LICOS_CURRENT_USER_ID` 指定的容器执行用户换取 Token。它不代表网页登录者。平台地址、服务凭证和项目工作空间沿用运行时配置。
|
|
22
|
+
运行时使用 `AGENT_CURRENT_USER_ID` 注入当前用户时同样支持,不以项目负责人替代当前执行用户。企业和空间上下文沿用平台签发的认证结果。
|
|
22
23
|
多用户请求可将当前使用者 Token 通过标准输入传入,不将 Token 放在命令行参数中:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
@@ -11,6 +11,7 @@ licos-platform help user me
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
用户接口默认使用 `LICOS_CURRENT_USER_ID` 指定的容器执行用户换取 Token。它不代表网页登录者。平台地址、服务凭证和项目工作空间沿用运行时配置。
|
|
14
|
+
运行时使用 `AGENT_CURRENT_USER_ID` 注入当前用户时同样支持,不以项目负责人替代当前执行用户。企业和空间上下文沿用平台签发的认证结果。
|
|
14
15
|
多用户请求可将当前使用者 Token 通过标准输入传入,不将 Token 放在命令行参数中:
|
|
15
16
|
|
|
16
17
|
```bash
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "licos-platform-cli"
|
|
7
|
-
version = "0.6.
|
|
8
|
-
description = "LICOS platform CLI"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.10"
|
|
11
|
-
dependencies = [
|
|
12
|
-
"licos-platform-sdk>=0.7.
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
[project.scripts]
|
|
16
|
-
licos-platform = "licos_platform_cli.main:main"
|
|
17
|
-
|
|
18
|
-
[tool.hatch.build.targets.wheel]
|
|
19
|
-
packages = ["src/licos_platform_cli"]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "licos-platform-cli"
|
|
7
|
+
version = "0.6.5"
|
|
8
|
+
description = "LICOS platform CLI"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"licos-platform-sdk>=0.7.5",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[project.scripts]
|
|
16
|
+
licos-platform = "licos_platform_cli.main:main"
|
|
17
|
+
|
|
18
|
+
[tool.hatch.build.targets.wheel]
|
|
19
|
+
packages = ["src/licos_platform_cli"]
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/help_commands.py
RENAMED
|
@@ -796,6 +796,9 @@ ONTOLOGY_HELP = {
|
|
|
796
796
|
"rules": [
|
|
797
797
|
"Search the catalog before invoking a tool; the catalog is filtered by the current user's permissions.",
|
|
798
798
|
"Resolve elements by stable IDs before querying context, model checks, or mapped data.",
|
|
799
|
+
"elementId/objectElementId 是部署实例 ID;objectTypeId 从实例上下文读取,是对象模板 ID。",
|
|
800
|
+
"函数和动作列表读取 id,分别用于 functionId/actionTypeId;返回已移除 actionTypeId、functionKind、implementationRef,业务 definition 按实际返回读取。",
|
|
801
|
+
"动作预览明确传入 objectElementId 和真实 objectKey;用户确认后用同一草稿的 confirmationId 执行。实例参数必须已在当前工具 schema 中声明,缺失时报告上游目录问题。",
|
|
799
802
|
"READ tools query state, PREPARE tools validate a change draft, and PERSIST tools apply an explicitly confirmed draft.",
|
|
800
803
|
"PERSIST commands require --confirm. Never reuse a catalog result after its catalogVersion changes.",
|
|
801
804
|
"实时订阅由项目后端 SDK 完成,必须传入本次认证会话 Token;CLI 不提供常驻 WebSocket 命令。",
|
|
@@ -12,9 +12,9 @@ def user_token(args) -> str:
|
|
|
12
12
|
if not token:
|
|
13
13
|
raise ConfigurationError("--token-stdin requires a nonempty user Token")
|
|
14
14
|
return token
|
|
15
|
-
user_id = os.environ.get("LICOS_CURRENT_USER_ID", "").strip()
|
|
15
|
+
user_id = os.environ.get("LICOS_CURRENT_USER_ID", "").strip() or os.environ.get("AGENT_CURRENT_USER_ID", "").strip()
|
|
16
16
|
if not user_id:
|
|
17
|
-
raise ConfigurationError("CLI user identity requires LICOS_CURRENT_USER_ID or --token-stdin")
|
|
17
|
+
raise ConfigurationError("CLI user identity requires LICOS_CURRENT_USER_ID, AGENT_CURRENT_USER_ID or --token-stdin")
|
|
18
18
|
return runtime_user_token(user_id)
|
|
19
19
|
|
|
20
20
|
|
|
@@ -22,5 +22,5 @@ def add_user_token_option(parser) -> None:
|
|
|
22
22
|
parser.add_argument(
|
|
23
23
|
"--token-stdin",
|
|
24
24
|
action="store_true",
|
|
25
|
-
help="Read the caller Token from stdin; otherwise use LICOS_CURRENT_USER_ID",
|
|
25
|
+
help="Read the caller Token from stdin; otherwise use LICOS_CURRENT_USER_ID or AGENT_CURRENT_USER_ID",
|
|
26
26
|
)
|
|
@@ -7,6 +7,13 @@ from licos_platform_sdk import ConfigurationError
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class CliIdentityTests(TestCase):
|
|
10
|
+
def test_agent_current_user_alias_does_not_select_the_owner(self):
|
|
11
|
+
with mock.patch.dict("os.environ", {"AGENT_CURRENT_USER_ID":"actor", "AGENT_USER_ID":"owner"}, clear=True), mock.patch(
|
|
12
|
+
"licos_platform_cli.identity.runtime_user_token", return_value="actor-token"
|
|
13
|
+
) as exchange:
|
|
14
|
+
self.assertEqual(user_token(Namespace(token_stdin=False)),"actor-token")
|
|
15
|
+
exchange.assert_called_once_with("actor")
|
|
16
|
+
|
|
10
17
|
def test_cli_defaults_to_initialization_user(self):
|
|
11
18
|
with mock.patch.dict(
|
|
12
19
|
"os.environ", {"LICOS_CURRENT_USER_ID": "initializer", "LICOS_USER_ID": "owner"}, clear=True
|
|
File without changes
|
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/database_commands.py
RENAMED
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/knowledge_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/oauth_commands.py
RENAMED
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/ontology_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/storage_commands.py
RENAMED
|
File without changes
|
{licos_platform_cli-0.6.3 → licos_platform_cli-0.6.5}/src/licos_platform_cli/user_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|