ronds_ai 0.13.0 → 0.14.0

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Ronds
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ronds
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PRIVACY.md CHANGED
@@ -1,56 +1,56 @@
1
- # PRIVACY
2
-
3
- _Last updated: 2026-10-17. This notice describes the `ronds_ai` **manager**
4
- npm package and, at a summary level, the separately distributed component it
5
- installs._
6
-
7
- ## The manager itself collects nothing
8
-
9
- This package does not read, store, or transmit your code, prompts, AI session
10
- files, editor activity, or identity. It only:
11
-
12
- - downloads and verifies a signed component archive from the organization's
13
- release channel,
14
- - records which permissions you granted (booleans + timestamp, no content),
15
- - forwards fixed commands to the locally installed component.
16
-
17
- ## What the installed component can collect — only with your grant
18
-
19
- Collection happens solely in the privately distributed component and each
20
- category is off by default:
21
-
22
- | Permission | What it would collect if granted |
23
- | --- | --- |
24
- | `codeMetrics` | statistics of your AI-assisted code edits (counts, file names) |
25
- | `codeContent` | the changed code text itself |
26
- | `promptContent` | prompts you send to supported AI tools and invoked skills |
27
- | `identity` | your employee/work ID and git author identity attached to events |
28
- | `historyScan` | explicit backfill scan of past session files |
29
-
30
- Until a permission is granted, hooks run in a fail-open no-op mode: your tools
31
- work normally and nothing is queued. Queued data leaves the machine **only**
32
- via `flush`/scheduled maintenance, **only** to the receiver URL in the
33
- organization configuration (never a hardcoded endpoint), and only event types
34
- whose permission is currently granted.
35
-
36
- ## Background processes
37
-
38
- - One per-user scheduled task (`ronds_ai_sync`) runs a maintenance cycle every
39
- 4 hours: update checks + authorized scan/flush. Installed only after the
40
- `schedule` permission is granted; removable via
41
- `ronds_ai schedule uninstall` or `ronds_ai uninstall`.
42
- - Tool hooks point to a local gateway file; if the component is missing or
43
- unauthorized they exit immediately without collecting.
44
-
45
- ## Stopping and removing
46
-
47
- `ronds_ai disable` (stop everything), `ronds_ai uninstall --confirm`
48
- (full removal — local unsent queues are kept on disk for your inspection and
49
- are never uploaded after uninstall). `ronds_ai consent show` lists every
50
- granted permission at any time.
51
-
52
- ## Review
53
-
54
- The component's full source is available to authorized reviewers via the
55
- organization's internal GitLab. The manager archive intentionally contains no
56
- business collection code, no secrets, and no install scripts.
1
+ # PRIVACY
2
+
3
+ _Last updated: 2026-10-17. This notice describes the `ronds_ai` **manager**
4
+ npm package and, at a summary level, the separately distributed component it
5
+ installs._
6
+
7
+ ## The manager itself collects nothing
8
+
9
+ This package does not read, store, or transmit your code, prompts, AI session
10
+ files, editor activity, or identity. It only:
11
+
12
+ - downloads and verifies a signed component archive from the organization's
13
+ release channel,
14
+ - records which permissions you granted (booleans + timestamp, no content),
15
+ - forwards fixed commands to the locally installed component.
16
+
17
+ ## What the installed component can collect — only with your grant
18
+
19
+ Collection happens solely in the privately distributed component and each
20
+ category is off by default:
21
+
22
+ | Permission | What it would collect if granted |
23
+ | --- | --- |
24
+ | `codeMetrics` | statistics of your AI-assisted code edits (counts, file names) |
25
+ | `codeContent` | the changed code text itself |
26
+ | `promptContent` | prompts you send to supported AI tools and invoked skills |
27
+ | `identity` | your employee/work ID and git author identity attached to events |
28
+ | `historyScan` | explicit backfill scan of past session files |
29
+
30
+ Until a permission is granted, hooks run in a fail-open no-op mode: your tools
31
+ work normally and nothing is queued. Queued data leaves the machine **only**
32
+ via `flush`/scheduled maintenance, **only** to the receiver URL in the
33
+ organization configuration (never a hardcoded endpoint), and only event types
34
+ whose permission is currently granted.
35
+
36
+ ## Background processes
37
+
38
+ - One per-user scheduled task (`ronds_ai_sync`) runs a maintenance cycle every
39
+ 4 hours: update checks + authorized scan/flush. Installed only after the
40
+ `schedule` permission is granted; removable via
41
+ `ronds_ai schedule uninstall` or `ronds_ai uninstall`.
42
+ - Tool hooks point to a local gateway file; if the component is missing or
43
+ unauthorized they exit immediately without collecting.
44
+
45
+ ## Stopping and removing
46
+
47
+ `ronds_ai disable` (stop everything), `ronds_ai uninstall --confirm`
48
+ (full removal — local unsent queues are kept on disk for your inspection and
49
+ are never uploaded after uninstall). `ronds_ai consent show` lists every
50
+ granted permission at any time.
51
+
52
+ ## Review
53
+
54
+ The component's full source is available to authorized reviewers via the
55
+ organization's internal GitLab. The manager archive intentionally contains no
56
+ business collection code, no secrets, and no install scripts.
package/README.md CHANGED
@@ -1,59 +1,59 @@
1
- # ronds_ai (manager)
2
-
3
- `ronds_ai` is the **manager** half of a two-part client tool for Ronds
4
- enterprise AI-usage analytics. It is a thin, public npm package: it does **not**
5
- collect any code, prompts, or telemetry itself. All collection logic ships in a
6
- separate, privately distributed **component** that this manager downloads,
7
- signature-verifies, installs and invokes on the user's machine.
8
-
9
- ## What this package does
10
-
11
- | Area | Behavior |
12
- | --- | --- |
13
- | Component install / update | Downloads a versioned component archive from the **organization-configured source** (or a built-in default org source), verifies an **Ed25519 signature** over the release manifest, checks size + SHA-512, extracts with a hardened no-symlink/no-traversal extractor, and runs the component's `capabilities` / `health` self-checks in isolation before activating it atomically. |
14
- | Command routing | Fixed business commands (`record`, `analyze`, `scan`, `flush`, `maintenance run`, `skills install`, `schedule …`, `hooks …`) are checked against the user's recorded consent and then forwarded to the locally installed component. stdin/stdout/exit codes pass through; the manager never parses business payloads. |
15
- | Two update chains | The manager updates itself from npm and the component from the signed manifest channel, each with independent 4h→24h backoff, anti-replay sequence watermarks, and no-downgrade rules. |
16
- | Self-versioning | Manager versions install under `~/.ronds_ai/manager/versions/` with a minimal stable bootstrap (`launch.cjs`) that can roll back to the last known good version offline (`ronds_ai manager rollback --previous`). |
17
- | Stable entrypoints | Hooks and scheduled tasks point at stable entry files (`manager/dispatch.cjs`, `manager/launch.cjs`) that never move between versions — upgrading never rewrites your hooks or tasks. |
18
- | Legacy migration | Read-only inventory (`legacy inspect`), transactional data migration (`legacy apply`) and a gated takeover transaction (`migration apply`) migrate existing single-package installs safely. |
19
-
20
- ## What this package explicitly does NOT do
21
-
22
- - It does **not** read or store code contents, prompts, session files, git
23
- identity, or any other user content.
24
- - It does **not** modify host tool configuration files (hook deployment is
25
- executed by the privately distributed component and always targets the
26
- manager's stable gateway entry).
27
- - It contains **no** secrets: no private keys, no tokens, no business API
28
- endpoints. The only embedded metadata is a default organization channel URL
29
- and its public verification key (see `lib/default-org.js`), which an
30
- explicit `setup --config <file>` can override.
31
- - It runs no install scripts (no `preinstall`/`postinstall`).
32
-
33
- ## Where the sensitive parts live
34
-
35
- The component that performs collection (code-edit metrics, prompt/skill
36
- events, session scanning) is distributed privately through the organization's
37
- signed release channel, is activated only after the user (or an auditable
38
- organization policy) grants specific permissions, and its source is available
39
- for review to authorized reviewers via the organization's internal GitLab.
40
-
41
- ## Data & permissions summary
42
-
43
- Nine independent permissions (`codeMetrics`, `codeContent`, `promptContent`,
44
- `identity`, `historyScan`, `hookRepair`, `schedule`, `managerAutoUpdate`,
45
- `componentAutoUpdate`) default to **false**. Nothing is queued or uploaded
46
- until the corresponding permission is explicitly granted
47
- (`ronds_ai consent grant …`, inspectable via `ronds_ai consent show`). Uploads
48
- go only to the receiver configured in the organization file, never to a
49
- hardcoded endpoint.
50
-
51
- ## How to stop it
52
-
53
- - `ronds_ai disable` — persistent stop; blocks installs, updates, maintenance.
54
- - `ronds_ai uninstall --confirm` — stops the scheduled task, removes managed
55
- hooks, removes the installed component and entrypoints; keeps your consent
56
- records and any not-yet-uploaded local queues for inspection.
57
- - `ronds_ai doctor` — read-only health report of everything above.
58
-
59
- Full design: [`docs/design/manager-component-handoff.md`](http://172.16.0.9:30000/raoyu/ronds_ai_cli/-/blob/codex/manager-component-split/docs/design/manager-component-handoff.md) (internal GitLab).
1
+ # ronds_ai (manager)
2
+
3
+ `ronds_ai` is the **manager** half of a two-part client tool for Ronds
4
+ enterprise AI-usage analytics. It is a thin, public npm package: it does **not**
5
+ collect any code, prompts, or telemetry itself. All collection logic ships in a
6
+ separate, privately distributed **component** that this manager downloads,
7
+ signature-verifies, installs and invokes on the user's machine.
8
+
9
+ ## What this package does
10
+
11
+ | Area | Behavior |
12
+ | --- | --- |
13
+ | Component install / update | Downloads a versioned component archive from the **organization-configured source** (or a built-in default org source), verifies an **Ed25519 signature** over the release manifest, checks size + SHA-512, extracts with a hardened no-symlink/no-traversal extractor, and runs the component's `capabilities` / `health` self-checks in isolation before activating it atomically. |
14
+ | Command routing | Fixed business commands (`record`, `analyze`, `scan`, `flush`, `maintenance run`, `skills install`, `schedule …`, `hooks …`) are checked against the user's recorded consent and then forwarded to the locally installed component. stdin/stdout/exit codes pass through; the manager never parses business payloads. |
15
+ | Two update chains | The manager updates itself from npm and the component from the signed manifest channel, each with independent 4h→24h backoff, anti-replay sequence watermarks, and no-downgrade rules. |
16
+ | Self-versioning | Manager versions install under `~/.ronds_ai/manager/versions/` with a minimal stable bootstrap (`launch.cjs`) that can roll back to the last known good version offline (`ronds_ai manager rollback --previous`). |
17
+ | Stable entrypoints | Hooks and scheduled tasks point at stable entry files (`manager/dispatch.cjs`, `manager/launch.cjs`) that never move between versions — upgrading never rewrites your hooks or tasks. |
18
+ | Legacy migration | Read-only inventory (`legacy inspect`), transactional data migration (`legacy apply`) and a gated takeover transaction (`migration apply`) migrate existing single-package installs safely. |
19
+
20
+ ## What this package explicitly does NOT do
21
+
22
+ - It does **not** read or store code contents, prompts, session files, git
23
+ identity, or any other user content.
24
+ - It does **not** modify host tool configuration files (hook deployment is
25
+ executed by the privately distributed component and always targets the
26
+ manager's stable gateway entry).
27
+ - It contains **no** secrets: no private keys, no tokens, no business API
28
+ endpoints. The only embedded metadata is a default organization channel URL
29
+ and its public verification key (see `lib/default-org.js`), which an
30
+ explicit `setup --config <file>` can override.
31
+ - It runs no install scripts (no `preinstall`/`postinstall`).
32
+
33
+ ## Where the sensitive parts live
34
+
35
+ The component that performs collection (code-edit metrics, prompt/skill
36
+ events, session scanning) is distributed privately through the organization's
37
+ signed release channel, is activated only after the user (or an auditable
38
+ organization policy) grants specific permissions, and its source is available
39
+ for review to authorized reviewers via the organization's internal GitLab.
40
+
41
+ ## Data & permissions summary
42
+
43
+ Nine independent permissions (`codeMetrics`, `codeContent`, `promptContent`,
44
+ `identity`, `historyScan`, `hookRepair`, `schedule`, `managerAutoUpdate`,
45
+ `componentAutoUpdate`) default to **false**. Nothing is queued or uploaded
46
+ until the corresponding permission is explicitly granted
47
+ (`ronds_ai consent grant …`, inspectable via `ronds_ai consent show`). Uploads
48
+ go only to the receiver configured in the organization file, never to a
49
+ hardcoded endpoint.
50
+
51
+ ## How to stop it
52
+
53
+ - `ronds_ai disable` — persistent stop; blocks installs, updates, maintenance.
54
+ - `ronds_ai uninstall --confirm` — stops the scheduled task, removes managed
55
+ hooks, removes the installed component and entrypoints; keeps your consent
56
+ records and any not-yet-uploaded local queues for inspection.
57
+ - `ronds_ai doctor` — read-only health report of everything above.
58
+
59
+ Full design: [`docs/design/manager-component-handoff.md`](http://172.16.0.9:30000/raoyu/ronds_ai_cli/-/blob/codex/manager-component-split/docs/design/manager-component-handoff.md) (internal GitLab).
package/bin/ronds_ai.js CHANGED
@@ -71,6 +71,8 @@ function writeHelp(stream) {
71
71
  ' maintenance run 转发业务维护(需任一数据权限)',
72
72
  ' skills install <name> [...]',
73
73
  ' 转发技能安装(无权限门控)',
74
+ ' skills list | sync | update [--force] | inventory | remove <name>',
75
+ ' 转发技能查询、平台/组织分发更新、资产采集与移除',
74
76
  '',
75
77
  '以下命令未实现,见 docs/design/manager-component-handoff.md §5:',
76
78
  ' component rollback / manager repair-entrypoints',
@@ -498,7 +500,14 @@ async function run(argv) {
498
500
  return runForwarded('flush', rest);
499
501
  }
500
502
  if (command === 'skills') {
501
- if (rest[0] !== 'install' || rest.length < 2) { process.stderr.write('用法:skills install <name> [...]\n'); return 2; }
503
+ const sub = rest[0];
504
+ const valid = (sub === 'install' && rest.length >= 2)
505
+ || (sub === 'remove' && rest.length === 2)
506
+ || (['list', 'sync', 'update', 'inventory'].includes(sub));
507
+ if (!valid) {
508
+ process.stderr.write('用法:skills install <name> [...] | list | sync | update [--force|--hook] | inventory | remove <name>\n');
509
+ return 2;
510
+ }
502
511
  return runForwarded('skills', rest);
503
512
  }
504
513
  if (command === 'schedule') {
@@ -1,74 +1,85 @@
1
- {
2
- "contractVersion": 1,
3
- "protocolVersion": 1,
4
- "description": "开发期组件协议唯一来源:构建时将相同版本的本声明复制进 manager 与 component 两个发布包;运行时不跨包 require 私有仓库路径或另一 workspace,两个归档离开仓库后须可独立运行。依据 docs/design/manager-component-handoff.md §5/§5.1。",
5
- "component": {
6
- "entryPath": "bin/component.js",
7
- "componentIdDefault": "ronds_ai_component",
8
- "componentIdNote": "componentIdDefault 仅为开发期默认值;生产值由组织配置决定,安装时必须与签名清单中的包身份一致。",
9
- "inProcessExport": {
10
- "name": "dispatch",
11
- "signature": "dispatch({ action, args, stdin, stdout, stderr, context }): Promise<{ exitCode }>",
12
- "requireSideEffects": "none"
13
- }
14
- },
15
- "actions": {
16
- "capabilities": {
17
- "argv": ["capabilities"],
18
- "readOnly": true,
19
- "description": "只读返回 componentId、version、protocolVersion、支持动作、状态格式和必要管理器版本。"
20
- },
21
- "health": {
22
- "argv": ["health"],
23
- "readOnly": true,
24
- "businessRequests": false,
25
- "description": "只读检查本地依赖和入口;不得读取用户会话、发送业务请求或注册任务。"
26
- },
27
- "record": {
28
- "argv": ["record", "<tool>"],
29
- "tools": ["claude", "cursor", "codex", "hermes"],
30
- "description": "处理本次代码编辑事件;tool 只接受固定枚举,未知工具拒绝。"
31
- },
32
- "analyze": {
33
- "argv": ["analyze", "claude"],
34
- "description": "处理本次 Prompt/Skill 事件;原文是否采集由授权决定。"
35
- },
36
- "scan": {
37
- "argv": ["scan", "<run|backfill|status>"],
38
- "subcommands": ["run", "backfill", "status"],
39
- "backfillRequires": ["独立的 historyScan 权限", "显式 since"],
40
- "description": "增量扫描与显式历史回溯。"
41
- },
42
- "flush": {
43
- "argv": ["flush"],
44
- "recheckBeforeSend": "发送前再次检查当前接收方与权限",
45
- "description": "发送已授权、未撤销的数据队列。"
46
- },
47
- "maintenance": {
48
- "argv": ["maintenance", "run"],
49
- "excludes": ["组件自身更新", "系统任务安装"],
50
- "description": "执行已启用的业务维护。"
51
- },
52
- "schedule": {
53
- "argv": ["schedule", "<install|status|disable|uninstall>"],
54
- "subcommands": ["install", "status", "disable", "uninstall"],
55
- "scope": "仅操作当前用户下、固定任务标识的生命周期",
56
- "description": "系统定时任务生命周期操作。"
57
- }
58
- },
59
- "argvRules": [
60
- "跨进程管理动作仅接受固定 argv 数组传给本地 Node 进程。",
61
- "不执行远端清单或任何外部来源提供的 shell 字符串。",
62
- "未知动作、未知工具名、未知协议版本或未知字段一律拒绝。",
63
- "argv 中 \"<...>\" 表示参数槽位(枚举或待定值,运行时必须替换为具体值),不带尖括号的项为必须逐字匹配的字面量。"
64
- ],
65
- "exitCodes": {
66
- "0": "成功",
67
- "1": "业务错误",
68
- "2": "协议或用法错误"
69
- },
70
- "hookDispatch": {
71
- "hookFailOpen": "组件缺失或未授权时,Hook 返回宿主兼容的 fail-open 响应并记录有限状态。",
72
- "managementCommand": "管理命令明确报错,不声称任务执行成功。"
73
- }
74
- }
1
+ {
2
+ "contractVersion": 1,
3
+ "protocolVersion": 1,
4
+ "description": "开发期组件协议唯一来源:构建时将相同版本的本声明复制进 manager 与 component 两个发布包;运行时不跨包 require 私有仓库路径或另一 workspace,两个归档离开仓库后须可独立运行。依据 docs/design/manager-component-handoff.md §5/§5.1。",
5
+ "component": {
6
+ "entryPath": "bin/component.js",
7
+ "componentIdDefault": "ronds_ai_component",
8
+ "componentIdNote": "componentIdDefault 仅为开发期默认值;生产值由组织配置决定,安装时必须与签名清单中的包身份一致。",
9
+ "inProcessExport": {
10
+ "name": "dispatch",
11
+ "signature": "dispatch({ action, args, stdin, stdout, stderr, context }): Promise<{ exitCode }>",
12
+ "requireSideEffects": "none"
13
+ }
14
+ },
15
+ "actions": {
16
+ "capabilities": {
17
+ "argv": ["capabilities"],
18
+ "readOnly": true,
19
+ "description": "只读返回 componentId、version、protocolVersion、支持动作、状态格式和必要管理器版本。"
20
+ },
21
+ "health": {
22
+ "argv": ["health"],
23
+ "readOnly": true,
24
+ "businessRequests": false,
25
+ "description": "只读检查本地依赖和入口;不得读取用户会话、发送业务请求或注册任务。"
26
+ },
27
+ "record": {
28
+ "argv": ["record", "<tool>"],
29
+ "tools": ["claude", "cursor", "codex", "hermes"],
30
+ "description": "处理本次代码编辑事件;tool 只接受固定枚举,未知工具拒绝。"
31
+ },
32
+ "analyze": {
33
+ "argv": ["analyze", "claude"],
34
+ "description": "处理本次 Prompt/Skill 事件;原文是否采集由授权决定。"
35
+ },
36
+ "scan": {
37
+ "argv": ["scan", "<run|backfill|status>"],
38
+ "subcommands": ["run", "backfill", "status"],
39
+ "backfillRequires": ["独立的 historyScan 权限", "显式 since"],
40
+ "description": "增量扫描与显式历史回溯。"
41
+ },
42
+ "flush": {
43
+ "argv": ["flush"],
44
+ "recheckBeforeSend": "发送前再次检查当前接收方与权限",
45
+ "description": "发送已授权、未撤销的数据队列。"
46
+ },
47
+ "maintenance": {
48
+ "argv": ["maintenance", "run"],
49
+ "excludes": ["组件自身更新", "系统任务安装"],
50
+ "description": "执行已启用的业务维护。"
51
+ },
52
+ "schedule": {
53
+ "argv": ["schedule", "<install|status|disable|uninstall>"],
54
+ "subcommands": ["install", "status", "disable", "uninstall"],
55
+ "scope": "仅操作当前用户下、固定任务标识的生命周期",
56
+ "description": "系统定时任务生命周期操作。"
57
+ },
58
+ "doctor": {
59
+ "argv": ["doctor"],
60
+ "readOnly": true,
61
+ "businessRequests": false,
62
+ "description": "只读自诊断:组件/管理器指针、更新链、组织与授权配置、队列/计数器/flush 汇总与 DSH 沙箱环境;businessReceiver 端点仅做无载荷连通探测(不发送业务数据)。任一致命项失败退出码 1;--json 输出单行 JSON 供 CI。"
63
+ },
64
+ "replay": {
65
+ "argv": ["replay", "[--source <events|code|both>]", "[--file <path>]", "[--dry-run]", "[--limit <count>]"],
66
+ "readOnlyForDeadLetter": true,
67
+ "description": "重放死信队列:events 死信按批量信封发 businessReceiver.url,code 死信逐行单条直发 codeUrl;只读不删,清理由操作者决定。"
68
+ }
69
+ },
70
+ "argvRules": [
71
+ "跨进程管理动作仅接受固定 argv 数组传给本地 Node 进程。",
72
+ "不执行远端清单或任何外部来源提供的 shell 字符串。",
73
+ "未知动作、未知工具名、未知协议版本或未知字段一律拒绝。",
74
+ "argv 中 \"<...>\" 表示参数槽位(枚举或待定值,运行时必须替换为具体值),不带尖括号的项为必须逐字匹配的字面量。"
75
+ ],
76
+ "exitCodes": {
77
+ "0": "成功",
78
+ "1": "业务错误",
79
+ "2": "协议或用法错误"
80
+ },
81
+ "hookDispatch": {
82
+ "hookFailOpen": "组件缺失或未授权时,Hook 返回宿主兼容的 fail-open 响应并记录有限状态。",
83
+ "managementCommand": "管理命令明确报错,不声称任务执行成功。"
84
+ }
85
+ }