@numa-tech/numa 1.20.3 → 1.20.4
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.
- package/README.md +8 -0
- package/dist/application-onboarding/schemas.d.ts +24 -0
- package/dist/application-onboarding/schemas.js +4 -0
- package/dist/application-onboarding/schemas.js.map +1 -1
- package/dist/application-onboarding/tui-model.d.ts +1 -0
- package/dist/application-onboarding/tui-model.js +10 -0
- package/dist/application-onboarding/tui-model.js.map +1 -1
- package/dist/application-onboarding/tui.js +1 -1
- package/dist/application-onboarding/tui.js.map +1 -1
- package/dist/authorization/application-client.d.ts +36 -1
- package/dist/authorization/application-client.js +4 -2
- package/dist/authorization/application-client.js.map +1 -1
- package/dist/authorization/application-commands.js +4 -3
- package/dist/authorization/application-commands.js.map +1 -1
- package/dist/authorization/application-schemas.d.ts +42 -7
- package/dist/authorization/application-schemas.js +19 -3
- package/dist/authorization/application-schemas.js.map +1 -1
- package/dist/business-issuer.js +8 -0
- package/dist/business-issuer.js.map +1 -1
- package/dist/cli.js +49 -31
- package/dist/cli.js.map +1 -1
- package/dist/command-catalog.js +9 -0
- package/dist/command-catalog.js.map +1 -1
- package/dist/kb/catalog.d.ts +2 -0
- package/dist/kb/catalog.js +14 -0
- package/dist/kb/catalog.js.map +1 -0
- package/dist/kb/client.d.ts +46 -0
- package/dist/kb/client.js +272 -0
- package/dist/kb/client.js.map +1 -0
- package/dist/kb/commands.d.ts +14 -0
- package/dist/kb/commands.js +121 -0
- package/dist/kb/commands.js.map +1 -0
- package/dist/kb/config.d.ts +15 -0
- package/dist/kb/config.js +76 -0
- package/dist/kb/config.js.map +1 -0
- package/dist/kb/errors.d.ts +9 -0
- package/dist/kb/errors.js +31 -0
- package/dist/kb/errors.js.map +1 -0
- package/dist/kb/transfers.d.ts +67 -0
- package/dist/kb/transfers.js +257 -0
- package/dist/kb/transfers.js.map +1 -0
- package/dist/kb/types.d.ts +81 -0
- package/dist/kb/types.js +2 -0
- package/dist/kb/types.js.map +1 -0
- package/dist/kb/upload-state.d.ts +20 -0
- package/dist/kb/upload-state.js +135 -0
- package/dist/kb/upload-state.js.map +1 -0
- package/dist/login-recovery.js +15 -1
- package/dist/login-recovery.js.map +1 -1
- package/dist/maintenance/modules.js +1 -1
- package/dist/maintenance/modules.js.map +1 -1
- package/dist/mcp/catalog.js +6 -1
- package/dist/mcp/catalog.js.map +1 -1
- package/dist/oss/signed-url-transfers.d.ts +41 -0
- package/dist/oss/signed-url-transfers.js +207 -0
- package/dist/oss/signed-url-transfers.js.map +1 -0
- package/dist/oss/transfer-pool.d.ts +2 -0
- package/dist/oss/transfer-pool.js +27 -0
- package/dist/oss/transfer-pool.js.map +1 -0
- package/dist/oss/transfer-worker.js +8 -17
- package/dist/oss/transfer-worker.js.map +1 -1
- package/dist/oss/web-page.js +4 -3
- package/dist/oss/web-page.js.map +1 -1
- package/dist/platform-profile.d.ts +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/tasks/commands.d.ts +9 -0
- package/dist/tasks/commands.js +60 -0
- package/dist/tasks/commands.js.map +1 -0
- package/dist/tasks/oss-query.d.ts +56 -0
- package/dist/tasks/oss-query.js +125 -0
- package/dist/tasks/oss-query.js.map +1 -0
- package/dist/tasks/runtime.d.ts +151 -0
- package/dist/tasks/runtime.js +71 -0
- package/dist/tasks/runtime.js.map +1 -0
- package/dist/tasks/tools.d.ts +3 -0
- package/dist/tasks/tools.js +16 -0
- package/dist/tasks/tools.js.map +1 -0
- package/dist/tasks/types.d.ts +14 -0
- package/dist/tasks/types.js +4 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/tasks/wecom-notify.d.ts +26 -0
- package/dist/tasks/wecom-notify.js +150 -0
- package/dist/tasks/wecom-notify.js.map +1 -0
- package/docs/agent-tasks.md +97 -0
- package/docs/application-default-groups.md +10 -2
- package/docs/design/kb-cli.md +94 -0
- package/docs/kb-access.md +85 -0
- package/package.json +12 -6
- package/scripts/export-kb-contract.py +158 -0
- package/skills/numa-ai-registry/SKILL.md +2 -2
- package/skills/numa-cli/SKILL.md +24 -9
- package/skills/numa-cli/agents/openai.yaml +2 -2
- package/skills/numa-cli/evals/evals.json +13 -1
- package/skills/numa-cli/numa-skill.json +1 -1
- package/skills/numa-cli/references/cli-bootstrap.md +8 -8
- package/skills/numa-cli/references/cli-mcp.md +28 -20
- package/skills/numa-cli/references/pipeline-release.md +9 -9
- package/skills/numa-cli/references/skills-command-contract.md +40 -40
- package/skills/numa-cli/references/skills-updates.md +13 -13
- package/skills/numa-cli/references/skills-workflows.md +4 -4
- package/skills/numa-create-application/SKILL.md +1 -1
- package/skills/numa-create-application/numa-skill.json +2 -2
- package/skills/numa-create-application/references/cli-bootstrap.md +3 -3
- package/skills/numa-create-application/references/numa-cli.md +16 -16
- package/skills/numa-jenkins-deployment/SKILL.md +8 -8
- package/skills/numa-jenkins-deployment/numa-skill.json +2 -2
- package/skills/numa-jenkins-deployment/references/cli-bootstrap.md +3 -3
- package/skills/numa-jenkins-deployment/references/cli-contract.md +7 -7
- package/skills/numa-jenkins-deployment/references/diagnostics.md +2 -2
- package/skills/numa-local-flux-deploy/SKILL.md +1 -1
- package/skills/numa-local-flux-deploy/numa-skill.json +2 -2
- package/skills/numa-local-flux-deploy/references/cli-bootstrap.md +3 -3
- package/skills/numa-nacos/SKILL.md +4 -4
- package/skills/numa-nacos/numa-skill.json +2 -2
- package/skills/numa-nacos/references/cli-bootstrap.md +3 -3
- package/skills/numa-nacos/references/command-contract.md +17 -17
- package/skills/numa-notion/SKILL.md +4 -4
- package/skills/numa-notion/numa-skill.json +2 -2
- package/skills/numa-notion/references/agents-automation.md +2 -2
- package/skills/numa-notion/references/cli-bootstrap.md +3 -3
- package/skills/numa-notion/references/cli.md +17 -17
- package/skills/numa-oss-access/SKILL.md +27 -81
- package/skills/numa-oss-access/agents/openai.yaml +2 -2
- package/skills/numa-oss-access/evals/evals.json +12 -0
- package/skills/numa-oss-access/numa-skill.json +2 -2
- package/skills/numa-oss-access/references/cli-bootstrap.md +5 -5
- package/skills/numa-oss-access/references/object-operations.md +95 -0
- package/skills/numa-oss-access/references/search-and-mcp.md +12 -11
- package/skills/numa-wecom/SKILL.md +27 -62
- package/skills/numa-wecom/agents/openai.yaml +2 -2
- package/skills/numa-wecom/evals/evals.json +25 -0
- package/skills/numa-wecom/numa-skill.json +2 -2
- package/skills/numa-wecom/references/cli-bootstrap.md +5 -5
- package/skills/numa-wecom/references/legacy-operations.md +71 -0
- package/skills/numa-wecom/references/machine-auth.md +7 -7
- package/skills/numa-wecom/references/mcp.md +9 -8
- package/src/kb/openapi-contract.json +1432 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Export the Numa KB REST input contract without starting the KB application.
|
|
3
|
+
|
|
4
|
+
Run with the KB checkout's Python environment (no new dependencies):
|
|
5
|
+
/path/to/kb-management/.venv/bin/python scripts/export-kb-contract.py \
|
|
6
|
+
--kb-root /path/to/kb-management
|
|
7
|
+
Append --check to fail on contract drift without changing the snapshot.
|
|
8
|
+
|
|
9
|
+
The exporter imports only REST routers, never main or its lifespan.
|
|
10
|
+
It blocks network access and excludes credentials, deployment configuration,
|
|
11
|
+
servers, runtime responses, and machine-specific source paths from the snapshot.
|
|
12
|
+
Response schemas currently remain free-form because that is the server contract;
|
|
13
|
+
the client must validate the response fields it consumes separately.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
import sys
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
AGENT_OPERATIONS = {
|
|
26
|
+
("get", "/collections"): "list_knowledge_bases",
|
|
27
|
+
("post", "/task-collections"): "create_task_knowledge_base",
|
|
28
|
+
("post", "/search"): "search_knowledge_base",
|
|
29
|
+
("post", "/upload-sessions"): "begin_direct_upload",
|
|
30
|
+
("get", "/upload-sessions/{session_id}"): "get_direct_upload",
|
|
31
|
+
("post", "/upload-sessions/{session_id}/complete"): "complete_direct_upload",
|
|
32
|
+
("delete", "/upload-sessions/{session_id}"): "cancel_direct_upload",
|
|
33
|
+
("get", "/documents/{document_id}/download-ticket"): "get_document_download",
|
|
34
|
+
("post", "/archives"): "start_async_archive",
|
|
35
|
+
("get", "/archives/{archive_id}"): "get_archive_status",
|
|
36
|
+
("post", "/archives/{archive_id}/retry"): "retry_archive",
|
|
37
|
+
}
|
|
38
|
+
PREFIX = "/api/v1/external/agent"
|
|
39
|
+
OPERATIONS = {(method, PREFIX + suffix): name
|
|
40
|
+
for (method, suffix), name in AGENT_OPERATIONS.items()} | {
|
|
41
|
+
("post", "/api/v1/external/documents/batch-upload"):
|
|
42
|
+
"upload_external_documents_api_v1_external_documents_batch_upload_post",
|
|
43
|
+
("get", "/api/v1/external/batches/{batch_id}"):
|
|
44
|
+
"get_external_batch_api_v1_external_batches__batch_id__get",
|
|
45
|
+
("post", "/api/v1/external/batches/{batch_id}/retry"):
|
|
46
|
+
"retry_external_batch_api_v1_external_batches__batch_id__retry_post",
|
|
47
|
+
("post", "/api/v1/external/batches/{batch_id}/resolve"):
|
|
48
|
+
"resolve_external_batch_conflicts_api_v1_external_batches__batch_id__resolve_post",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def forbid_network(event: str, _args: tuple) -> None:
|
|
53
|
+
if event in {"socket.connect", "socket.connect_ex", "socket.getaddrinfo", "socket.bind"}:
|
|
54
|
+
raise RuntimeError("KB contract export must remain offline")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def schema_references(value):
|
|
58
|
+
if isinstance(value, dict):
|
|
59
|
+
reference = value.get("$ref")
|
|
60
|
+
if isinstance(reference, str) and reference.startswith("#/components/schemas/"):
|
|
61
|
+
yield reference.removeprefix("#/components/schemas/")
|
|
62
|
+
for child in value.values():
|
|
63
|
+
yield from schema_references(child)
|
|
64
|
+
elif isinstance(value, list):
|
|
65
|
+
for child in value:
|
|
66
|
+
yield from schema_references(child)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def export_contract(kb_root: Path) -> dict:
|
|
70
|
+
if not (kb_root / "backend/external/agent_routes.py").is_file():
|
|
71
|
+
raise ValueError("--kb-root must point to a KB checkout containing the Agent router")
|
|
72
|
+
# Canonical defaults: never freeze a developer's environment-specific limits.
|
|
73
|
+
os.environ["KB_MAX_FILES_PER_BATCH"] = "50"
|
|
74
|
+
os.environ["ALIYUN_OSS_ENABLED"] = "false"
|
|
75
|
+
os.environ.pop("KB_APPLICATION_AUTHORIZATION_CONFIG", None)
|
|
76
|
+
sys.addaudithook(forbid_network)
|
|
77
|
+
sys.path.insert(0, str(kb_root))
|
|
78
|
+
from fastapi import FastAPI
|
|
79
|
+
from backend.external.agent_routes import router
|
|
80
|
+
from backend.external.routes import router as external_router
|
|
81
|
+
from backend.knowledge_base.constants import (
|
|
82
|
+
MAX_EXTERNAL_FILES_PER_BATCH,
|
|
83
|
+
MAX_FILES_PER_BATCH,
|
|
84
|
+
MAX_SINGLE_FILE_SIZE_BYTES,
|
|
85
|
+
MAX_TOTAL_BATCH_SIZE_BYTES,
|
|
86
|
+
SUPPORTED_EXTS,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
app = FastAPI(title="Knowledge Base Agent API")
|
|
90
|
+
app.include_router(router, prefix="/api/v1")
|
|
91
|
+
app.include_router(external_router, prefix="/api/v1")
|
|
92
|
+
original = app.openapi()
|
|
93
|
+
paths = {}
|
|
94
|
+
for (method, path), operation_id in OPERATIONS.items():
|
|
95
|
+
operation = original.get("paths", {}).get(path, {}).get(method)
|
|
96
|
+
if operation is None or operation.get("operationId") != operation_id:
|
|
97
|
+
raise ValueError(f"KB route contract changed: {method.upper()} {path}")
|
|
98
|
+
paths.setdefault(path, {})[method] = operation
|
|
99
|
+
|
|
100
|
+
schemas = original.get("components", {}).get("schemas", {})
|
|
101
|
+
selected = {}
|
|
102
|
+
pending = set(schema_references(paths))
|
|
103
|
+
while pending:
|
|
104
|
+
name = pending.pop()
|
|
105
|
+
if name in selected:
|
|
106
|
+
continue
|
|
107
|
+
selected[name] = schemas[name]
|
|
108
|
+
pending.update(schema_references(selected[name]))
|
|
109
|
+
return {
|
|
110
|
+
"openapi": original["openapi"],
|
|
111
|
+
"info": original["info"],
|
|
112
|
+
"paths": paths,
|
|
113
|
+
"components": {"schemas": selected},
|
|
114
|
+
"x-numa-contract": {
|
|
115
|
+
"sources": ["backend/external/agent_routes.py", "backend/external/routes.py"],
|
|
116
|
+
"generator": "scripts/export-kb-contract.py",
|
|
117
|
+
"response_validation": "Responses are free-form upstream; validate consumed fields at runtime.",
|
|
118
|
+
"authentication": "X-Api-Key; deployments may additionally require Bearer application authorization.",
|
|
119
|
+
"parse_supported_extensions": sorted(SUPPORTED_EXTS),
|
|
120
|
+
"default_upload_limits": {
|
|
121
|
+
"max_files_per_batch": MAX_FILES_PER_BATCH,
|
|
122
|
+
"max_external_files_per_batch": MAX_EXTERNAL_FILES_PER_BATCH,
|
|
123
|
+
"max_files_per_batch_environment_override": "KB_MAX_FILES_PER_BATCH",
|
|
124
|
+
"max_single_file_size_bytes": MAX_SINGLE_FILE_SIZE_BYTES,
|
|
125
|
+
"max_total_batch_size_bytes": MAX_TOTAL_BATCH_SIZE_BYTES,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
def main() -> int:
|
|
132
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
133
|
+
parser.add_argument("--kb-root", type=Path, required=True)
|
|
134
|
+
parser.add_argument("--output", type=Path,
|
|
135
|
+
default=Path(__file__).resolve().parents[1] / "src/kb/openapi-contract.json")
|
|
136
|
+
parser.add_argument("--check", action="store_true")
|
|
137
|
+
args = parser.parse_args()
|
|
138
|
+
try:
|
|
139
|
+
contract = export_contract(args.kb_root.resolve())
|
|
140
|
+
except (ImportError, ValueError, RuntimeError, KeyError) as exc:
|
|
141
|
+
print(f"KB contract export failed ({type(exc).__name__}). "
|
|
142
|
+
"Use the KB checkout's Python environment and inspect its Agent route declarations.", file=sys.stderr)
|
|
143
|
+
return 2
|
|
144
|
+
rendered = json.dumps(contract, ensure_ascii=False, indent=2, sort_keys=True) + "\n"
|
|
145
|
+
if args.check:
|
|
146
|
+
if not args.output.is_file() or args.output.read_text(encoding="utf-8") != rendered:
|
|
147
|
+
print("KB OpenAPI contract drift detected; regenerate and review the snapshot.", file=sys.stderr)
|
|
148
|
+
return 1
|
|
149
|
+
print(f"KB OpenAPI contract matches ({len(OPERATIONS)} operations).")
|
|
150
|
+
return 0
|
|
151
|
+
args.output.parent.mkdir(parents=True, exist_ok=True)
|
|
152
|
+
args.output.write_text(rendered, encoding="utf-8")
|
|
153
|
+
print(f"Exported KB OpenAPI contract ({len(OPERATIONS)} operations).")
|
|
154
|
+
return 0
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
if __name__ == "__main__":
|
|
158
|
+
raise SystemExit(main())
|
|
@@ -12,8 +12,8 @@ description: 旧 Numa AI Registry Skill 的兼容指引。仅在用户明确使
|
|
|
12
12
|
|
|
13
13
|
按实际任务加载对应 Skill;混合任务按这两个边界分别处理。不要根据请求中出现 Nacos 一词,就把 Skill 安装归入基础设施管理。
|
|
14
14
|
|
|
15
|
-
若新 Skill 尚未安装,先 `numa auth status --json`、`numa config --show --json` 和 `numa registry capabilities --json`,核对身份、环境与可用 namespace,再用 `numa skills list/inspect/install --help` 检查命令。读取并安装授权库中的新 Skill 后继续;新 Skill 尚未发布时明确报告,不声称已具备它,也不照搬旧发布权限。
|
|
15
|
+
若新 Skill 尚未安装,先 `npx -y @numa-tech/numa@latest auth status --json`、`npx -y @numa-tech/numa@latest config --show --json` 和 `npx -y @numa-tech/numa@latest registry capabilities --json`,核对身份、环境与可用 namespace,再用 `npx -y @numa-tech/numa@latest skills list/inspect/install --help` 检查命令。读取并安装授权库中的新 Skill 后继续;新 Skill 尚未发布时明确报告,不声称已具备它,也不照搬旧发布权限。
|
|
16
16
|
|
|
17
|
-
历史 `numa registry` 命令、`.numa/registry.json`、`registry.lock.json`、profile 的 `aiRegistry` 字段以及 `/api/v1/ai-registry/**` 保留兼容。不得为改名迁移配置、删除旧远端资源、修改路由或扩大授权。
|
|
17
|
+
历史 `npx -y @numa-tech/numa@latest registry` 命令、`.numa/registry.json`、`registry.lock.json`、profile 的 `aiRegistry` 字段以及 `/api/v1/ai-registry/**` 保留兼容。不得为改名迁移配置、删除旧远端资源、修改路由或扩大授权。
|
|
18
18
|
|
|
19
19
|
权限依据服务端当前 capabilities、功能 view/edit 和 namespace 业务授权,不再按历史普通用户角色名判定。不要读取 token 缓存、索取 Nacos 凭据、绕过 403;两人制发布禁止提交者自审自发。
|
package/skills/numa-cli/SKILL.md
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: numa-cli
|
|
3
3
|
metadata:
|
|
4
|
-
version: "1.
|
|
4
|
+
version: "1.4.0"
|
|
5
5
|
description: Numa CLI 与 Skills/MCP 统一入口。用于 numa command not found、npx/Windows 启动、登录及环境检查、发现和安装企业 Skill、依赖与自动更新、项目 registry 锁定同步、上传审核发布,以及 CLI 自身的 stdio MCP、OSS/企微工具和 Agent 安装接入。其他 Numa 业务 Skill 依赖本 Skill;企微、Notion、OSS 和部署任务交给对应专用 Skill,Nacos 基础设施管理交给 numa-nacos。
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Numa CLI 与 Skills/MCP
|
|
9
9
|
|
|
10
|
-
本 Skill 不依赖其他 Skill
|
|
10
|
+
本 Skill 不依赖其他 Skill。它负责配置一次运行入口、发现和安装业务 Skill,并管理 Skills/MCP 生命周期。正常业务任务由执行器检查参数、认证和业务条件,不要求 Agent 每次重新发现能力。安装文件与 Agent 加载是两个步骤;不要声称宿主原生支持 Numa 依赖声明。
|
|
11
|
+
|
|
12
|
+
## 正常业务任务的固定入口
|
|
13
|
+
|
|
14
|
+
初始化时根据宿主已暴露的工具确定入口并沿用:连接 Numa MCP 就调用业务任务工具;仅无 Numa MCP 且已有固定 CLI 入口时使用 CLI。运行中的 MCP 缺工具、认证或权限失败时报告具体缺口,不自动切换终端、个人身份或复制秘密。
|
|
15
|
+
|
|
16
|
+
| 任务 | MCP | CLI |
|
|
17
|
+
| --- | --- | --- |
|
|
18
|
+
| 企微通知 | `numa_wecom_notify` | `npx -y @numa-tech/numa@latest task run wecom.notify --input-file /ABS/task.json --json` |
|
|
19
|
+
| OSS 查询 | `numa_oss_query` | `npx -y @numa-tech/numa@latest task run oss.query --input-file /ABS/task.json --json` |
|
|
20
|
+
|
|
21
|
+
`--input-file -` 支持标准输入。两种入口共用进程内任务函数;MCP 直接使用 `npx -y @numa-tech/numa@latest serve` 从 `mcp.json` 收到的环境变量,不启动另一个 CLI。正常任务直接调用,不额外执行 `commands`、`--help`、`auth status`、`whoami`、`config`、capabilities 或 Grant discovery;这些确定性判断在任务内完成,服务端执行授权。
|
|
22
|
+
|
|
23
|
+
统一返回 `succeeded`、`needs_input`、`blocked`、`pending`。按业务 Skill 解释结果,只有缺项/歧义需要用户补充。`pending` 的通知仅查原请求号,不重新发送。`npx -y @numa-tech/numa@latest task inspect NAME --json` 用于初始化、schema 查询或故障诊断,不是每次任务的检查步骤。
|
|
24
|
+
|
|
25
|
+
新任务入口必须由实际运行时提供;Skill 版本与 CLI 版本独立,不假定 npm latest 已发布支持。工具已加载即可使用;若明确缺少,报告所需能力和升级要求,不循环发现或静默换版本。旧命令仍供其他业务、兼容流程与诊断使用。
|
|
11
26
|
|
|
12
27
|
## 按任务读取
|
|
13
28
|
|
|
14
|
-
-
|
|
29
|
+
- 尚未建立 CLI 入口或排查启动失败:完整读取 [启动与版本契约](references/cli-bootstrap.md)。
|
|
15
30
|
- 发现和安装 Skill:使用下文核心流程;依赖安装仍需确认。
|
|
16
31
|
- 项目锁定/同步、上传/审核/发布或 MCP 接入:完整读取 [Skills 与 MCP 工作流](references/skills-workflows.md),执行命令前读取其链接的资源命令契约。
|
|
17
32
|
- 模块检索、交互安装和自定义 MCP 环境变量:完整读取 [CLI MCP 服务与安装](references/cli-mcp.md)。
|
|
@@ -22,9 +37,9 @@ description: Numa CLI 与 Skills/MCP 统一入口。用于 numa command not foun
|
|
|
22
37
|
|
|
23
38
|
## 先建立运行入口
|
|
24
39
|
|
|
25
|
-
|
|
40
|
+
仅在尚未建立入口时完整阅读 [CLI 启动与版本契约](references/cli-bootstrap.md)。默认使用 `npx -y @numa-tech/numa@latest`,无需全局安装;说明首次可能下载至 npm 缓存,初始化发现实际版本后固定全部后续命令。组织指定版本或本任务已确认的 npx/本地 Node 入口继续沿用。Windows npx.ps1 受限可用 npx.cmd,不降低执行策略。
|
|
26
41
|
|
|
27
|
-
|
|
42
|
+
初始化其他旧命令路径时按需要核实 commands --json、模块及精确子命令帮助;正常 task 路径不重复执行。根帮助退出 0 不代表模块存在。缺少功能时请求用户批准版本切换,不自动升级或发布 CLI。遇到 CLI、Node、网络、登录、业务授权失败,要区分具体阶段,不以更换身份、读取凭据或直连上游解决。
|
|
28
43
|
|
|
29
44
|
## 主动发现适合任务的 Skill
|
|
30
45
|
|
|
@@ -36,11 +51,11 @@ description: Numa CLI 与 Skills/MCP 统一入口。用于 numa command not foun
|
|
|
36
51
|
6. 安装成功核对路径和版本,使用宿主加载能力重新读取 Skill。若宿主不能在当前会话加载,告诉用户刷新列表或新开会话;不能假装已经载入。然后按业务 Skill 执行原任务的授权范围。
|
|
37
52
|
|
|
38
53
|
```sh
|
|
39
|
-
numa skills list --namespace NAMESPACE --instance INSTANCE --search QUERY --json
|
|
40
|
-
numa skills inspect NAME --namespace NAMESPACE --instance INSTANCE --json
|
|
41
|
-
numa skills install NAME --namespace NAMESPACE --instance INSTANCE --version VERSION --agent AGENT --scope SCOPE --plan --json
|
|
54
|
+
npx -y @numa-tech/numa@latest skills list --namespace NAMESPACE --instance INSTANCE --search QUERY --json
|
|
55
|
+
npx -y @numa-tech/numa@latest skills inspect NAME --namespace NAMESPACE --instance INSTANCE --json
|
|
56
|
+
npx -y @numa-tech/numa@latest skills install NAME --namespace NAMESPACE --instance INSTANCE --version VERSION --agent AGENT --scope SCOPE --plan --json
|
|
42
57
|
# 仅在用户已批准上述完整计划后
|
|
43
|
-
numa skills install NAME --namespace NAMESPACE --instance INSTANCE --version VERSION --agent AGENT --scope SCOPE --with-dependencies --json
|
|
58
|
+
npx -y @numa-tech/numa@latest skills install NAME --namespace NAMESPACE --instance INSTANCE --version VERSION --agent AGENT --scope SCOPE --with-dependencies --json
|
|
44
59
|
```
|
|
45
60
|
|
|
46
61
|
所有占位值来自实际核对,不能原样执行。--plan / --with-dependencies 只用于实际帮助已支持的 CLI;本次源码新增这些选项,不等于 npm latest 已发布。旧 CLI 若无这些选项,不臆造参数或静默更换版本;可按其已支持的单包安装能力,在用户批准后先安装已核对的基础依赖,再安装业务包并检查依赖完整性,或请求升级 CLI。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Numa CLI"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $numa-cli
|
|
3
|
+
short_description: "统一 Numa 任务入口、Skills 管理与 CLI 的 MCP 安装接入"
|
|
4
|
+
default_prompt: "使用 $numa-cli 配置固定任务入口,按需发现、安装或管理企业 Skills/MCP,并沿用已授权范围。"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"expected_output": "Offline instruction simulation: no real network, installation, credentials, or business actions. Explain safe steps and consent boundaries.",
|
|
38
38
|
"files": [],
|
|
39
39
|
"assertions": [
|
|
40
|
-
"Ask before installing the missing same-source numa-cli@1.
|
|
40
|
+
"Ask before installing the missing same-source numa-cli@1.4.1 dependency.",
|
|
41
41
|
"Resolve provenance and target agent/scope without inventing namespace or instance.",
|
|
42
42
|
"Do not execute business commands, silently install, or access credentials.",
|
|
43
43
|
"After authorized bootstrap, use one actual pinned CLI runtime for every call.",
|
|
@@ -132,6 +132,18 @@
|
|
|
132
132
|
"prompt": "给同事一个交互安装 numa-wecom Skill 的办法;我用 CI 安装时不希望出现提示。",
|
|
133
133
|
"expected_output": "核实版本支持后,人类终端用 skills install --interactive 选择授权空间、online 版本、Agent、范围并确认依赖;CI 使用完整参数 --plan --json,再按授权加 --with-dependencies 执行。解释非 TTY/JSON 不询问,缺少必要参数报错。",
|
|
134
134
|
"files": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": 15,
|
|
138
|
+
"prompt": "WorkBuddy 已连接 numa-cli MCP 并提供 numa_wecom_notify;mcp.json 中设置 client_credentials。用户已授权给指定 userid 发送给定文本。离线演练,不实际执行工具。",
|
|
139
|
+
"expected_output": "直接构造 numa_wecom_notify 一次调用,稳定 request_id 与 confirmed:true;不调用额外 auth/config/help/capabilities,不打开终端,不复制 MCP 环境秘密。",
|
|
140
|
+
"files": []
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": 16,
|
|
144
|
+
"prompt": "WorkBuddy 已连接旧版 numa-cli MCP,仅提供 numa_wecom_send,没有 numa_wecom_notify;用户希望按新版 Skill 快速发送。离线演练,不实际执行工具。",
|
|
145
|
+
"expected_output": "报告任务工具缺失,说明检查模块/工具过滤与运行时升级;Skill 更新不会更新 MCP 固定 CLI 版本。不擅自终端回退、切换身份、拼装旧版发送链路或声称 npm latest 已支持。",
|
|
146
|
+
"files": []
|
|
135
147
|
}
|
|
136
148
|
]
|
|
137
149
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
# Numa CLI 启动与版本契约
|
|
2
2
|
|
|
3
|
-
安装 Skill 不会安装 Numa CLI
|
|
3
|
+
安装 Skill 不会安装 Numa CLI。本页用于首次初始化、旧命令兼容路径或故障诊断。已连接 MCP 的正常任务直接使用主 Skill 指定的任务工具,不运行终端检查;已有 task 入口也不逐项重做以下前置检查。
|
|
4
4
|
|
|
5
5
|
## 选择唯一入口
|
|
6
6
|
|
|
7
|
-
1.
|
|
8
|
-
2.
|
|
7
|
+
1. 默认通过 `npx -y @numa-tech/numa@latest` 启动,不检查或依赖全局 `numa`。首次可能下载官方包到 npm 缓存;需要 Node.js/npm 与网络(已有缓存时按 npm 行为复用)。组织指定版本优先;本任务已确认的固定 npx 版本或用户明确批准的本地 Node 入口继续沿用。
|
|
8
|
+
2. 仅在初始化时发现一次实际版本:
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
11
|
npx -y @numa-tech/numa@latest --cli-version
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
3. Windows PowerShell 若仅拦截 `npx.ps1`,使用同一 Node 安装的 `npx.cmd
|
|
16
|
-
4. Node/npm 缺失或 engines
|
|
14
|
+
将返回的真实版本用于本任务所有后续调用。例如返回 1.20.3,后续使用 `npx -y @numa-tech/numa@1.20.3`。Skill 中 `@latest` 命令是首次使用的通用示例;实际连续操作、回执查询和子进程应替换为已确认的具体版本,不反复解析 latest。`-y` 只跳过 npm 下载确认,不代表授权业务写操作。
|
|
15
|
+
3. Windows PowerShell 若仅拦截 `npx.ps1`,使用同一 Node 安装的 `npx.cmd`;不修改执行策略。PowerShell 带空格路径用调用运算符 `&`,不照搬 bash 环境赋值或反斜杠续行。Node 脚本以 `shell:false` 派生时不能直接运行 `.cmd`,应由 Node 执行该 npm 安装的 `bin/npx-cli.js` 并分开传参。
|
|
16
|
+
4. 入口失败时才检查 `node --version`、`npm --version`、`npx --version`,仅检查 PATH 或用户指定路径。Node/npm 缺失或 engines 不满足时,通过组织批准方式安装兼容 Node.js(CLI 1.20.3 要求 >=20.12.0),重启终端/Agent。不自行 sudo、全局安装 Numa、禁用 TLS 或改 registry。网络、代理和 npm 权限失败不等于平台认证失败;离线且无缓存或已批准本地入口时说明依赖缺失,不改用全局命令或其他包。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
同一任务的 auth、config、login、业务命令及恢复查询使用同一个固定入口,不回退到裸 `numa`。MCP 配置使用 executable `npx` 与分开的固定版本 arguments;整段 shell 字符串不能作为 executable。已连接 MCP 的正常任务直接调用工具,不为落实本页再运行版本或终端检查。
|
|
19
19
|
|
|
20
20
|
## 核实实际命令能力
|
|
21
21
|
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
## 身份和权限不随入口改变
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
初始化或排查身份配置时,用同一入口的 `auth status --json`、`config --show --json` 核对用户/机器模式及目标 API。PRD 为 `https://apps-gw-prd.mcisaas.com/mci-devops-platform`,issuer 为 `https://kc.mcisaas.com/auth/realms/numa-realm`,人类 CLI client 为 `mcp-client`;机器 client 必须来自明确指定的运行环境。
|
|
29
29
|
|
|
30
30
|
状态检查不等于 API 授权。人类登录由用户主动完成;机器凭据由环境提供给 CLI。不能为解决 CLI missing 而切换身份、下载或转换凭据、读取 Token/Cookie/Secret。401/403 不能通过添加角色、改 namespace 或直连上游来解决。
|
|
31
31
|
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## 选择入口
|
|
6
6
|
|
|
7
|
-
- `numa serve`:运行本地 stdio MCP 服务,由 Agent 启动并保持进程。stdout 是 MCP 协议流,不添加 shell 欢迎语或业务日志。
|
|
8
|
-
- `numa mcp tools --modules auth,oss,wecom --json`:执行本地 MCP tools/list,读取完整工具 schema,不登录、不调用业务 API。
|
|
9
|
-
- `numa mcp install-cli`:安装上述 CLI 自身的服务,不需要查询 Nacos namespace。
|
|
10
|
-
- `numa mcp install NAME` / `bridge`:安装或桥接企业 Registry 的 MCP 资源,继续遵循 [资源工作流](skills-workflows.md) 与 Router 授权。
|
|
7
|
+
- `npx -y @numa-tech/numa@latest serve`:运行本地 stdio MCP 服务,由 Agent 启动并保持进程。stdout 是 MCP 协议流,不添加 shell 欢迎语或业务日志。
|
|
8
|
+
- `npx -y @numa-tech/numa@latest mcp tools --modules auth,oss,wecom --json`:执行本地 MCP tools/list,读取完整工具 schema,不登录、不调用业务 API。
|
|
9
|
+
- `npx -y @numa-tech/numa@latest mcp install-cli`:安装上述 CLI 自身的服务,不需要查询 Nacos namespace。
|
|
10
|
+
- `npx -y @numa-tech/numa@latest mcp install NAME` / `bridge`:安装或桥接企业 Registry 的 MCP 资源,继续遵循 [资源工作流](skills-workflows.md) 与 Router 授权。
|
|
11
11
|
|
|
12
12
|
安装默认模块为 `auth,oss,wecom`。可用 `--modules auth,oss,wecom,notion` 调整;`platform` 暴露通用平台请求工具,只有明确需要时才加入。默认附带 `numa_command_catalog` 和 `numa_module_catalog`;工具过滤可以继续缩小公共工具集合。直接 `serve` 不传模块时保留全部模块,以兼容已有配置。
|
|
13
13
|
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
用户要求接入 Agent 即已授权该目标安装;先生成可核对的计划,然后执行同一计划,不重复询问。仅咨询能否支持时展示方案,不写配置。JSON 适配器已有同名服务默认报冲突,不覆盖其他服务。Codex/OpenClaw 使用官方 CLI,其同名条目按原生命令语义处理,不提供 JSON 备份;执行前核对已有同名配置和覆盖授权。
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
numa mcp install-cli --agent workbuddy --scope user --plan --json
|
|
20
|
-
numa mcp install-cli --agent workbuddy --scope user --json
|
|
19
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent workbuddy --scope user --plan --json
|
|
20
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent workbuddy --scope user --json
|
|
21
21
|
# 替代目标,不要无需求地全部安装
|
|
22
|
-
numa mcp install-cli --agent claude --scope project --workspace /ABS/PROJECT --plan --json
|
|
23
|
-
numa mcp install-cli --agent claude-desktop --scope user --plan --json
|
|
24
|
-
numa mcp install-cli --agent codex --scope user --plan --json
|
|
22
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent claude --scope project --workspace /ABS/PROJECT --plan --json
|
|
23
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent claude-desktop --scope user --plan --json
|
|
24
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent codex --scope user --plan --json
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
| Agent 参数 | 配置入口 |
|
|
@@ -39,24 +39,32 @@ JSON 配置合并保留无关条目。同名替换只有已获覆盖授权时使
|
|
|
39
39
|
|
|
40
40
|
## 身份与平台配置
|
|
41
41
|
|
|
42
|
-
默认 `--auth-mode browser`,先用相同系统用户运行 `numa login`,MCP 复用该用户的登录缓存。显式 browser 会清除 MCP 子进程继承的机器 Client ID/Secret 设置;不会替用户切换平台 profile。Issuer/API 由 platform profile 与既有配置规则提供,不在安装器里写死本地或生产地址。
|
|
42
|
+
默认 `--auth-mode browser`,先用相同系统用户运行 `npx -y @numa-tech/numa@latest login`,MCP 复用该用户的登录缓存。显式 browser 会清除 MCP 子进程继承的机器 Client ID/Secret 设置;不会替用户切换平台 profile。Issuer/API 由 platform profile 与既有配置规则提供,不在安装器里写死本地或生产地址。
|
|
43
43
|
|
|
44
44
|
机器身份使用用户明确指定的 Client 与 Secret 或 Secret 文件,不能仅凭三条地址/模式变量取得凭据:
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
numa mcp install-cli --agent workbuddy --auth-mode client_credentials \
|
|
47
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent workbuddy --auth-mode client_credentials \
|
|
48
48
|
--client-id CONFIRMED_CLIENT --client-secret-file /ABS/PROTECTED_SECRET_FILE --plan --json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
核对计划后执行时去掉 `--plan`。配置只记录文件路径,不读取或复制其内容;运行时由现有认证库校验文件保护。从 CLI 1.16.1 起,也可使用 `--client-secret "$NUMA_KEYCLOAK_CLIENT_SECRET"` 直接传值,与 `--client-secret-file` 互斥。直接模式将实际值保存到客户端环境配置,并清空继承的 Secret 文件路径;预览脱敏,交互向导隐藏输入。不使用公开 `mcp-client` 作为机器身份。机器模式失败不回退到个人登录。安装成功仅证明配置写入;使用 `numa_auth_status`、业务只读查询进一步核对实际身份和授权。
|
|
52
52
|
|
|
53
|
+
## 业务任务与环境继承
|
|
54
|
+
|
|
55
|
+
`mcp.json` 的 `env` 注入指定 MCP 启动进程:`npx → numa serve → 进程内业务任务函数`。任务直接复用这份配置与认证 Client,不需要 AI 把环境变量再导入终端。由该进程正常派生的子进程也可继承环境;WorkBuddy 主进程或它另行启动的终端不会反向获得 MCP 的环境变量。
|
|
56
|
+
|
|
57
|
+
提供新任务能力的运行时在 `wecom` 模块暴露 `numa_wecom_notify`、在 `oss` 模块暴露 `numa_oss_query`;若安装时使用 `--tools` 白名单,要包含所需任务工具。安装/初始化核对一次实际工具清单,之后业务 Skill 直接调用任务。没有工具时先报告升级或过滤配置缺口,不改走终端,不复制 Secret,不自动回退个人登录。安装新版 Skill 不会自动更新 MCP 配置中固定的 CLI 版本。
|
|
58
|
+
|
|
59
|
+
检查工具仅用于安装验收与诊断;普通通知/查询不逐项调用 auth/status、config、capabilities 或 grants。通知必须有明确授权、精确目标、正文与稳定请求号,未知结果仍按原请求号只读恢复。
|
|
60
|
+
|
|
53
61
|
## ChatGPT 本地 stdio 接入
|
|
54
62
|
|
|
55
63
|
ChatGPT 可通过 [官方 Secure MCP Tunnel](https://developers.openai.com/api/docs/guides/secure-mcp-tunnels) 接入本地 stdio。先在 OpenAI Platform 创建/选择当前工作区可用的 Tunnel,并按官方文档安装 `tunnel-client`。Numa 不创建 API key、不保存 `CONTROL_PLANE_API_KEY`,不代替 ChatGPT 界面授权。
|
|
56
64
|
|
|
57
65
|
```sh
|
|
58
|
-
numa mcp install-cli --agent chatgpt --tunnel-id CONFIRMED_TUNNEL_ID --plan --json
|
|
59
|
-
numa mcp install-cli --agent chatgpt --tunnel-id CONFIRMED_TUNNEL_ID --json
|
|
66
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent chatgpt --tunnel-id CONFIRMED_TUNNEL_ID --plan --json
|
|
67
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent chatgpt --tunnel-id CONFIRMED_TUNNEL_ID --json
|
|
60
68
|
tunnel-client doctor --profile numa-cli --explain
|
|
61
69
|
tunnel-client run --profile numa-cli
|
|
62
70
|
```
|
|
@@ -69,7 +77,7 @@ ID 必须是真实的 `tunnel_` 加 32 位小写十六进制字符。自动初
|
|
|
69
77
|
|
|
70
78
|
## 工具使用与完成验证
|
|
71
79
|
|
|
72
|
-
OSS
|
|
80
|
+
OSS 的新任务入口为 query,低层工具保留 grants/list/search/stat/download/upload/delete,详见 `numa-oss-access`。企微的新任务入口为 notify,低层工具保留 capabilities/recipients/recipient_by_email/send/status 和受控映射工具,详见 `numa-wecom`。均沿用 CLI 的当前身份、平台授权和审计,不提供任意 shell 执行工具。
|
|
73
81
|
|
|
74
82
|
从 Agent 刷新或重启 MCP 后读取 tools/list,核对所选模块;再执行用户任务需要的只读查询。不要为了验证安装发送消息、上传或删除文件。下载会写 MCP 服务所在机器,上传读取该机器路径;尤其 ChatGPT Tunnel 下不能假定聊天附件已存在本地。写入工具的 `confirmed:true` 只在用户已明确授权目标与内容时传入。最终分别报告配置写入、服务连接、工具发现及真实业务结果。
|
|
75
83
|
|
|
@@ -79,12 +87,12 @@ OSS 暴露 grants/list/search/stat/download/upload/delete,详见 `numa-oss-acc
|
|
|
79
87
|
先核对实际运行时的 `modules --help`、`mcp install-cli --help` 和 `skills install --help`。
|
|
80
88
|
这些新增功能准备随下一版发布,不能仅凭本 Skill 假定 npm latest 已支持。
|
|
81
89
|
|
|
82
|
-
人类用户在 TTY 无参运行 `numa` 进入选择入口;`numa mcp`、`numa skills` 进入对应安装向导。
|
|
90
|
+
人类用户在 TTY 无参运行 `npx -y @numa-tech/numa@latest` 进入选择入口;`npx -y @numa-tech/numa@latest mcp`、`npx -y @numa-tech/numa@latest skills` 进入对应安装向导。
|
|
83
91
|
`mcp install-cli`、`mcp install`、`skills install` 缺少目标时引导补齐。显式 `--interactive` 强制向导,
|
|
84
92
|
保留已有参数。`--no-interactive`、JSON 和非终端不询问;参数完整的调用直接使用默认值执行。
|
|
85
93
|
|
|
86
|
-
Agent 不启动无人操作的 TUI。先用 `numa modules --search QUERY --json` 找到适合用途的模块,
|
|
87
|
-
再用 `numa mcp tools --modules MODULES --json` 核实真实工具、描述和 schema。
|
|
94
|
+
Agent 不启动无人操作的 TUI。先用 `npx -y @numa-tech/numa@latest modules --search QUERY --json` 找到适合用途的模块,
|
|
95
|
+
再用 `npx -y @numa-tech/numa@latest mcp tools --modules MODULES --json` 核实真实工具、描述和 schema。
|
|
88
96
|
只在目标、范围、版本或身份缺失时通过宿主提问能力收集信息;用户已指定或已授权的内容不重复确认。
|
|
89
97
|
生成 `--plan --json` 的具体结果,然后按已批准范围使用完整参数执行。
|
|
90
98
|
|
|
@@ -95,8 +103,8 @@ Agent 不启动无人操作的 TUI。先用 `numa modules --search QUERY --json`
|
|
|
95
103
|
- 人类向导可选择只读集合;该集合依据工具只读标注生成,不代替服务端授权。
|
|
96
104
|
|
|
97
105
|
```sh
|
|
98
|
-
numa modules --search 文件 --json
|
|
99
|
-
numa mcp install-cli --agent workbuddy --scope user --modules oss \
|
|
106
|
+
npx -y @numa-tech/numa@latest modules --search 文件 --json
|
|
107
|
+
npx -y @numa-tech/numa@latest mcp install-cli --agent workbuddy --scope user --modules oss \
|
|
100
108
|
--tools numa_oss_search,numa_oss_stat --server-description '授权文件查询' \
|
|
101
109
|
--env LOG_LEVEL=info --plan --json
|
|
102
110
|
```
|
|
@@ -115,7 +123,7 @@ Registry 不把这些值存入 manifest/lock;在新机器恢复时重新提供
|
|
|
115
123
|
|
|
116
124
|
## 交互安装 Skills
|
|
117
125
|
|
|
118
|
-
`numa skills install --interactive` 依次选择可安装的 namespace/instance、资源、已发布版本、Agent 和 scope。
|
|
126
|
+
`npx -y @numa-tech/numa@latest skills install --interactive` 依次选择可安装的 namespace/instance、资源、已发布版本、Agent 和 scope。
|
|
119
127
|
输入关键词检索当前页,使用下一页或精确名称继续定位。只安装 online 版本;草稿和待审版本不进入版本选项。
|
|
120
128
|
写入前展示依赖、摘要、来源和目标路径,确认包含必要依赖。选择精确版本意味着固定版本;自动更新设置另按更新指引管理。
|
|
121
129
|
Agent 继续使用资源工作流的 inspect 与 plan,并在已批准依赖时传 `--with-dependencies`;完整参数调用不会等待终端确认。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Numa Pipeline release specification
|
|
2
2
|
|
|
3
|
-
Read this file completely before planning or executing an application release with `numa pipeline`.
|
|
3
|
+
Read this file completely before planning or executing an application release with `npx -y @numa-tech/numa@latest pipeline`.
|
|
4
4
|
|
|
5
5
|
This is the normal governed release path. If the user explicitly authorizes a local image build and direct Flux release because the pipeline is unavailable, stop using this specification and use `$numa-local-flux-deploy`. A pipeline failure alone does not authorize that fallback.
|
|
6
6
|
|
|
@@ -58,10 +58,10 @@ Treat preflight entries as reviewed repository policy, but inspect each command
|
|
|
58
58
|
5. Run:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
numa auth status --json
|
|
62
|
-
numa profile --json
|
|
63
|
-
numa pipeline list --app APPLICATION --tier TIER --branch BRANCH --json
|
|
64
|
-
numa pipeline inspect APPLICATION --json
|
|
61
|
+
npx -y @numa-tech/numa@latest auth status --json
|
|
62
|
+
npx -y @numa-tech/numa@latest profile --json
|
|
63
|
+
npx -y @numa-tech/numa@latest pipeline list --app APPLICATION --tier TIER --branch BRANCH --json
|
|
64
|
+
npx -y @numa-tech/numa@latest pipeline inspect APPLICATION --json
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
6. Confirm each binding is buildable and matches the intended application, tier, and branch. Confirm the current identity has the required production role; the server remains authoritative.
|
|
@@ -73,7 +73,7 @@ Treat preflight entries as reviewed repository policy, but inspect each command
|
|
|
73
73
|
For each application in manifest order, call the CLI directly:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
numa pipeline build APPLICATION \
|
|
76
|
+
npx -y @numa-tech/numa@latest pipeline build APPLICATION \
|
|
77
77
|
--tier TIER \
|
|
78
78
|
--branch BRANCH \
|
|
79
79
|
--approve-id APPROVAL_ID \
|
|
@@ -96,13 +96,13 @@ If the trigger result is ambiguous, do not immediately create another key or use
|
|
|
96
96
|
1. Search the existing task:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
numa pipeline builds --app APPLICATION --tier TIER --branch BRANCH --limit 20 --json
|
|
99
|
+
npx -y @numa-tech/numa@latest pipeline builds --app APPLICATION --tier TIER --branch BRANCH --limit 20 --json
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
2. Continue an identified task with `numa pipeline status REQUEST_ID --watch --json` and inspect logs with `numa pipeline log REQUEST_ID --follow`.
|
|
102
|
+
2. Continue an identified task with `npx -y @numa-tech/numa@latest pipeline status REQUEST_ID --watch --json` and inspect logs with `npx -y @numa-tech/numa@latest pipeline log REQUEST_ID --follow`.
|
|
103
103
|
3. If no task can be found, resubmit the identical build with the original idempotency key and identical content.
|
|
104
104
|
|
|
105
|
-
Use `numa pipeline retry REQUEST_ID --yes ...` only after a known terminal failure and a deliberate retry decision. A production retry requires a current approval basis and may create a new task. Use `numa pipeline stop REQUEST_ID --yes ...` only when the user explicitly requests stopping that exact build; production stop remains subject to server authorization and approval policy.
|
|
105
|
+
Use `npx -y @numa-tech/numa@latest pipeline retry REQUEST_ID --yes ...` only after a known terminal failure and a deliberate retry decision. A production retry requires a current approval basis and may create a new task. Use `npx -y @numa-tech/numa@latest pipeline stop REQUEST_ID --yes ...` only when the user explicitly requests stopping that exact build; production stop remains subject to server authorization and approval policy.
|
|
106
106
|
|
|
107
107
|
## Complete the release
|
|
108
108
|
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
## 能力与项目锁定
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
numa registry capabilities --json
|
|
9
|
-
numa registry init --namespace NAMESPACE --instance INSTANCE --json
|
|
10
|
-
numa registry lock --json
|
|
11
|
-
numa registry sync --json
|
|
12
|
-
numa registry upgrade [NAME...] --json
|
|
8
|
+
npx -y @numa-tech/numa@latest registry capabilities --json
|
|
9
|
+
npx -y @numa-tech/numa@latest registry init --namespace NAMESPACE --instance INSTANCE --json
|
|
10
|
+
npx -y @numa-tech/numa@latest registry lock --json
|
|
11
|
+
npx -y @numa-tech/numa@latest registry sync --json
|
|
12
|
+
npx -y @numa-tech/numa@latest registry upgrade [NAME...] --json
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
Commit `.numa/registry.json` and `.numa/registry.lock.json`. `lock` resolves labels to exact versions and SHA-256 values. `sync` installs only exact locked versions. `upgrade` is the explicit operation that re-resolves tracked labels.
|
|
@@ -17,17 +17,17 @@ Commit `.numa/registry.json` and `.numa/registry.lock.json`. `lock` resolves lab
|
|
|
17
17
|
## Skills
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
numa skills list --namespace NAMESPACE --search TEXT --json
|
|
21
|
-
numa skills inspect NAME --namespace NAMESPACE --json
|
|
22
|
-
numa skills draft NAME --from-version 1.0.0 --namespace NAMESPACE --json
|
|
23
|
-
numa skills install NAME --namespace NAMESPACE --agent AGENT --scope project --version VERIFIED_PUBLISHED_VERSION --json
|
|
24
|
-
numa skills upload ./skill.zip --namespace NAMESPACE --target-version 1.0.0 --json
|
|
25
|
-
numa skills online NAME --namespace NAMESPACE --json
|
|
26
|
-
numa skills offline NAME --namespace NAMESPACE --json
|
|
27
|
-
numa skills scope NAME PRIVATE --namespace NAMESPACE --json
|
|
28
|
-
numa skills tags NAME deploy java --namespace NAMESPACE --json
|
|
29
|
-
numa skills labels NAME latest stable --version 1.2.0 --namespace NAMESPACE --json
|
|
30
|
-
numa skills delete NAME --namespace NAMESPACE --yes --json
|
|
20
|
+
npx -y @numa-tech/numa@latest skills list --namespace NAMESPACE --search TEXT --json
|
|
21
|
+
npx -y @numa-tech/numa@latest skills inspect NAME --namespace NAMESPACE --json
|
|
22
|
+
npx -y @numa-tech/numa@latest skills draft NAME --from-version 1.0.0 --namespace NAMESPACE --json
|
|
23
|
+
npx -y @numa-tech/numa@latest skills install NAME --namespace NAMESPACE --agent AGENT --scope project --version VERIFIED_PUBLISHED_VERSION --json
|
|
24
|
+
npx -y @numa-tech/numa@latest skills upload ./skill.zip --namespace NAMESPACE --target-version 1.0.0 --json
|
|
25
|
+
npx -y @numa-tech/numa@latest skills online NAME --namespace NAMESPACE --json
|
|
26
|
+
npx -y @numa-tech/numa@latest skills offline NAME --namespace NAMESPACE --json
|
|
27
|
+
npx -y @numa-tech/numa@latest skills scope NAME PRIVATE --namespace NAMESPACE --json
|
|
28
|
+
npx -y @numa-tech/numa@latest skills tags NAME deploy java --namespace NAMESPACE --json
|
|
29
|
+
npx -y @numa-tech/numa@latest skills labels NAME latest stable --version 1.2.0 --namespace NAMESPACE --json
|
|
30
|
+
npx -y @numa-tech/numa@latest skills delete NAME --namespace NAMESPACE --yes --json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Skill agents: `chatgpt`, `codex`, `claude`, `cursor`, `workbuddy`, `openclaw`, `agents`, or `custom`. A custom target also needs `--custom-root`.
|
|
@@ -35,18 +35,18 @@ Skill agents: `chatgpt`, `codex`, `claude`, `cursor`, `workbuddy`, `openclaw`, `
|
|
|
35
35
|
## MCP Servers
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
numa mcp list --namespace NAMESPACE --search TEXT --json
|
|
39
|
-
numa mcp inspect NAME --namespace NAMESPACE --version 1.0.0 --json
|
|
40
|
-
numa mcp install NAME --namespace NAMESPACE --agent claude --scope project --transport remote --json
|
|
41
|
-
numa mcp install NAME --namespace NAMESPACE --agent codex --scope user --transport remote --json
|
|
42
|
-
numa mcp bridge --namespace NAMESPACE
|
|
43
|
-
numa mcp create ./mcp.json --namespace NAMESPACE --json
|
|
44
|
-
numa mcp update NAME ./mcp.json --namespace NAMESPACE --json
|
|
45
|
-
numa mcp online NAME --version 1.0.0 --namespace NAMESPACE --json
|
|
46
|
-
numa mcp offline NAME --version 1.0.0 --namespace NAMESPACE --json
|
|
47
|
-
numa mcp tags NAME internal search --namespace NAMESPACE --json
|
|
48
|
-
numa mcp tool disable NAME TOOL --version 3 --namespace NAMESPACE --json
|
|
49
|
-
numa mcp delete NAME --namespace NAMESPACE --version 1.0.0 --yes --json
|
|
38
|
+
npx -y @numa-tech/numa@latest mcp list --namespace NAMESPACE --search TEXT --json
|
|
39
|
+
npx -y @numa-tech/numa@latest mcp inspect NAME --namespace NAMESPACE --version 1.0.0 --json
|
|
40
|
+
npx -y @numa-tech/numa@latest mcp install NAME --namespace NAMESPACE --agent claude --scope project --transport remote --json
|
|
41
|
+
npx -y @numa-tech/numa@latest mcp install NAME --namespace NAMESPACE --agent codex --scope user --transport remote --json
|
|
42
|
+
npx -y @numa-tech/numa@latest mcp bridge --namespace NAMESPACE
|
|
43
|
+
npx -y @numa-tech/numa@latest mcp create ./mcp.json --namespace NAMESPACE --json
|
|
44
|
+
npx -y @numa-tech/numa@latest mcp update NAME ./mcp.json --namespace NAMESPACE --json
|
|
45
|
+
npx -y @numa-tech/numa@latest mcp online NAME --version 1.0.0 --namespace NAMESPACE --json
|
|
46
|
+
npx -y @numa-tech/numa@latest mcp offline NAME --version 1.0.0 --namespace NAMESPACE --json
|
|
47
|
+
npx -y @numa-tech/numa@latest mcp tags NAME internal search --namespace NAMESPACE --json
|
|
48
|
+
npx -y @numa-tech/numa@latest mcp tool disable NAME TOOL --version 3 --namespace NAMESPACE --json
|
|
49
|
+
npx -y @numa-tech/numa@latest mcp delete NAME --namespace NAMESPACE --version 1.0.0 --yes --json
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
MCP agents: `chatgpt`, `codex`, `claude`, `cursor`, `workbuddy`, `openclaw`, or `custom`. A custom target also needs `--custom-config`. All clients receive the enterprise Router, never the Nacos/downstream endpoint. ChatGPT uses remote HTTPS OAuth; stdio clients may use the bridge. Codex and OpenClaw are user-scoped.
|
|
@@ -54,18 +54,18 @@ MCP agents: `chatgpt`, `codex`, `claude`, `cursor`, `workbuddy`, `openclaw`, or
|
|
|
54
54
|
## 发布与客户端连接
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
numa skills submit NAME --namespace NAMESPACE --version 1.2.0 --json
|
|
58
|
-
numa skills inspect NAME --namespace NAMESPACE --json
|
|
59
|
-
numa registry approvals submit skill NAME --namespace NAMESPACE --resource-version 1.2.0 --reason REASON --json
|
|
60
|
-
numa registry approvals list --namespace NAMESPACE --state SUBMITTED --json
|
|
61
|
-
numa registry approvals review REQUEST --decision APPROVED --reason REASON --version 2 --json
|
|
62
|
-
numa registry approvals publish REQUEST --version 3 --json
|
|
63
|
-
numa registry namespaces resolve NAMESPACE --instance INSTANCE --json
|
|
64
|
-
numa registry namespaces check NAMESPACE --instance INSTANCE --json
|
|
65
|
-
numa registry router inspect --namespace NAMESPACE --json
|
|
66
|
-
numa registry router connect --namespace NAMESPACE --adapter codex --json
|
|
67
|
-
numa registry router health --namespace NAMESPACE --json
|
|
68
|
-
numa registry audit --namespace NAMESPACE --json
|
|
57
|
+
npx -y @numa-tech/numa@latest skills submit NAME --namespace NAMESPACE --version 1.2.0 --json
|
|
58
|
+
npx -y @numa-tech/numa@latest skills inspect NAME --namespace NAMESPACE --json
|
|
59
|
+
npx -y @numa-tech/numa@latest registry approvals submit skill NAME --namespace NAMESPACE --resource-version 1.2.0 --reason REASON --json
|
|
60
|
+
npx -y @numa-tech/numa@latest registry approvals list --namespace NAMESPACE --state SUBMITTED --json
|
|
61
|
+
npx -y @numa-tech/numa@latest registry approvals review REQUEST --decision APPROVED --reason REASON --version 2 --json
|
|
62
|
+
npx -y @numa-tech/numa@latest registry approvals publish REQUEST --version 3 --json
|
|
63
|
+
npx -y @numa-tech/numa@latest registry namespaces resolve NAMESPACE --instance INSTANCE --json
|
|
64
|
+
npx -y @numa-tech/numa@latest registry namespaces check NAMESPACE --instance INSTANCE --json
|
|
65
|
+
npx -y @numa-tech/numa@latest registry router inspect --namespace NAMESPACE --json
|
|
66
|
+
npx -y @numa-tech/numa@latest registry router connect --namespace NAMESPACE --adapter codex --json
|
|
67
|
+
npx -y @numa-tech/numa@latest registry router health --namespace NAMESPACE --json
|
|
68
|
+
npx -y @numa-tech/numa@latest registry audit --namespace NAMESPACE --json
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
`review`/`publish` 仅供符合职责分离要求的其他获授权身份执行,不是同一个执行者连续运行的脚本。提交者完成上传、提交后报告待审状态。发布前从审批列表读取当前 version。上传、审批、发布及上线是不同状态,结果以服务端回读为准。
|