taskmeld 0.1.1 → 0.1.41

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.
Files changed (155) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +176 -172
  3. package/README.zh-CN.md +176 -172
  4. package/dist/src/app/app-context-env.js +1 -1
  5. package/dist/src/app/create-app-context.js +3 -3
  6. package/dist/src/app/data-dir.js +13 -3
  7. package/dist/src/app/pipeline-config.js +4 -4
  8. package/dist/src/app/pipeline-registry.js +11 -11
  9. package/dist/src/app/pipeline-runtime.js +6 -9
  10. package/dist/src/app/runtime-store.js +3 -3
  11. package/dist/src/artifacts/artifact-cleanup.js +17 -17
  12. package/dist/src/artifacts/artifact-index.js +14 -14
  13. package/dist/src/artifacts/artifact-rebuilder.js +3 -3
  14. package/dist/src/artifacts/storage-service.js +18 -18
  15. package/dist/src/cli/bootstrap.js +7 -7
  16. package/dist/src/cli/commands/agent.js +12 -11
  17. package/dist/src/cli/commands/artifact.js +31 -30
  18. package/dist/src/cli/commands/init.js +49 -47
  19. package/dist/src/cli/commands/pipeline/result.js +9 -8
  20. package/dist/src/cli/commands/pipeline/selector.js +1 -1
  21. package/dist/src/cli/commands/pipeline/watch.js +2 -2
  22. package/dist/src/cli/commands/pipeline.js +54 -53
  23. package/dist/src/cli/commands/scheduler.js +9 -8
  24. package/dist/src/cli/commands/server.js +12 -11
  25. package/dist/src/cli/commands/system.js +4 -3
  26. package/dist/src/cli/errors.js +2 -2
  27. package/dist/src/cli/help.js +18 -17
  28. package/dist/src/cli/i18n.js +46 -0
  29. package/dist/src/cli/locales/en.json +244 -0
  30. package/dist/src/cli/locales/zh.json +244 -0
  31. package/dist/src/cli/output.js +3 -3
  32. package/dist/src/cli/renderers/engine/markdown.js +1 -1
  33. package/dist/src/cli/renderers/specs/index.js +1 -1
  34. package/dist/src/cli/router.js +1 -1
  35. package/dist/src/cli/server-runtime-client.js +54 -95
  36. package/dist/src/cli/ui-prompts.js +96 -0
  37. package/dist/src/cli/ws-runtime-client.js +51 -0
  38. package/dist/src/gateway/gateway-client.js +4 -4
  39. package/dist/src/index.js +28 -2
  40. package/dist/src/logs/run-log-reader.js +1 -1
  41. package/dist/src/pipeline/agent-activity.js +2 -2
  42. package/dist/src/pipeline/artifact-storage.js +11 -11
  43. package/dist/src/pipeline/diagnostics/dependency-diagnostic.js +11 -11
  44. package/dist/src/pipeline/dispatch/pipeline-inbound-queue.js +2 -2
  45. package/dist/src/pipeline/execution/group-item-executor.js +1 -1
  46. package/dist/src/pipeline/execution/node-item-executor.js +3 -3
  47. package/dist/src/pipeline/execution/node-runner.js +7 -7
  48. package/dist/src/pipeline/execution/readiness-state.js +1 -1
  49. package/dist/src/pipeline/execution/reject-handler.js +5 -5
  50. package/dist/src/pipeline/execution/rejected-artifact-archiver.js +1 -1
  51. package/dist/src/pipeline/execution/route-item-manager.js +4 -4
  52. package/dist/src/pipeline/execution/run-abort-controller.js +5 -5
  53. package/dist/src/pipeline/execution/run-state-helpers.js +2 -2
  54. package/dist/src/pipeline/execution/service.js +4 -4
  55. package/dist/src/pipeline/execution/structured-node-runner.js +24 -24
  56. package/dist/src/pipeline/execution-timeout.js +3 -3
  57. package/dist/src/pipeline/identity/index.js +3 -3
  58. package/dist/src/pipeline/item-batch-controller.js +6 -6
  59. package/dist/src/pipeline/scheduler/dependency-state.js +5 -5
  60. package/dist/src/pipeline/scheduler-service.js +24 -24
  61. package/dist/src/pipeline/state-machine.js +2 -2
  62. package/dist/src/pipeline/structured-output/contract.js +4 -4
  63. package/dist/src/pipeline/structured-output/index.js +2 -2
  64. package/dist/src/pipeline/structured-output/parser.js +5 -5
  65. package/dist/src/pipeline/structured-output/prompt.js +38 -38
  66. package/dist/src/pipeline/structured-output/waiter.js +6 -6
  67. package/dist/src/pipeline/template.js +5 -5
  68. package/dist/src/pipeline/timeline-log-store.js +5 -5
  69. package/dist/src/pipeline/tool-activity.js +3 -3
  70. package/dist/src/pipeline/types/pipeline-output.js +1 -1
  71. package/dist/src/pipeline/workflow/branch-rules.js +19 -19
  72. package/dist/src/pipeline/workflow/io.js +1 -1
  73. package/dist/src/pipeline/workflow/normalize.js +18 -18
  74. package/dist/src/pipeline/workflow/template-mapper.js +3 -3
  75. package/dist/src/pipeline/workflow/validate.js +39 -39
  76. package/dist/src/pipeline/workflow-graph.js +10 -10
  77. package/dist/src/server/http-handler.js +74 -0
  78. package/dist/src/services/agent-service.js +2 -2
  79. package/dist/src/services/gateway-read-helpers.js +1 -1
  80. package/dist/src/services/pipeline-service.js +19 -19
  81. package/dist/src/services/pipeline-status.js +4 -4
  82. package/dist/src/services/read-services.js +1 -1
  83. package/dist/src/services/session-service.js +6 -6
  84. package/dist/src/services/system-service.js +1 -1
  85. package/dist/src/transport/ws-broker.js +12 -1
  86. package/dist/src/transport/ws-handler.js +60 -0
  87. package/dist/src/transport/ws-methods/agents.js +144 -0
  88. package/dist/src/transport/ws-methods/artifacts.js +171 -0
  89. package/dist/src/transport/ws-methods/gateway.js +16 -0
  90. package/dist/src/transport/ws-methods/logs.js +43 -0
  91. package/dist/src/transport/ws-methods/pipeline-batch.js +68 -0
  92. package/dist/src/transport/ws-methods/pipeline-links.js +100 -0
  93. package/dist/src/transport/ws-methods/pipeline-queue.js +51 -0
  94. package/dist/src/transport/ws-methods/pipeline-runtime.js +151 -0
  95. package/dist/src/transport/ws-methods/pipeline-scheduler.js +48 -0
  96. package/dist/src/transport/ws-methods/pipeline-workflow.js +127 -0
  97. package/dist/src/transport/ws-methods/pipelines.js +56 -0
  98. package/dist/src/transport/ws-methods/register-all.js +32 -0
  99. package/dist/src/transport/ws-methods/sessions.js +154 -0
  100. package/dist/src/transport/ws-methods/timeline.js +10 -0
  101. package/dist/src/{server/routes/pipeline-identity.js → transport/ws-methods/utils.js} +14 -9
  102. package/dist/src/version.js +1 -1
  103. package/package.json +16 -7
  104. package/web/dist/assets/agent-DP6TMcLj.js +1 -0
  105. package/web/dist/assets/agent-DmJHzLyj.js +1 -0
  106. package/web/dist/assets/artifact-BqnoZy2M.js +1 -0
  107. package/web/dist/assets/artifact-DfDkgkno.js +1 -0
  108. package/web/dist/assets/common-DRMTVwE9.js +1 -0
  109. package/web/dist/assets/common-DeXccbr2.js +1 -0
  110. package/web/dist/assets/dispatch-CBskGCQI.js +1 -0
  111. package/web/dist/assets/dispatch-sk4Wp30e.js +1 -0
  112. package/web/dist/assets/index-C8wTjZvH.css +1 -0
  113. package/web/dist/assets/index-DYDQZRLk.js +58 -0
  114. package/web/dist/assets/log-DN8cjb0w.js +1 -0
  115. package/web/dist/assets/log-HSeA_dYy.js +1 -0
  116. package/web/dist/assets/modal-BdNai9jf.js +1 -0
  117. package/web/dist/assets/modal-D9_KDpFD.js +1 -0
  118. package/web/dist/assets/nav-BmF7oAKg.js +1 -0
  119. package/web/dist/assets/nav-IjC2xqXQ.js +1 -0
  120. package/web/dist/assets/node-detail-CENRXcrh.js +1 -0
  121. package/web/dist/assets/node-detail-bndPr0IM.js +1 -0
  122. package/web/dist/assets/overview-B87zWAxq.js +1 -0
  123. package/web/dist/assets/overview-gQvk-NOK.js +1 -0
  124. package/web/dist/assets/pipeline-D4dSJRDz.js +1 -0
  125. package/web/dist/assets/pipeline-DZzyOqQa.js +1 -0
  126. package/web/dist/assets/session-CUWvU14v.js +5 -0
  127. package/web/dist/assets/session-DQ6UuCaJ.js +5 -0
  128. package/web/dist/assets/timeline-8y_2_0Em.js +1 -0
  129. package/web/dist/assets/timeline-CAPsXUTC.js +1 -0
  130. package/web/dist/index.html +3 -3
  131. package/dist/src/app/pipeline-plugin-config.js +0 -2
  132. package/dist/src/server/api-handler.js +0 -163
  133. package/dist/src/server/http-utils.js +0 -34
  134. package/dist/src/server/middleware.js +0 -61
  135. package/dist/src/server/router.js +0 -105
  136. package/dist/src/server/routes/agents.js +0 -189
  137. package/dist/src/server/routes/artifacts.js +0 -163
  138. package/dist/src/server/routes/gateway.js +0 -18
  139. package/dist/src/server/routes/health.js +0 -16
  140. package/dist/src/server/routes/logs.js +0 -73
  141. package/dist/src/server/routes/pipeline-batch.js +0 -163
  142. package/dist/src/server/routes/pipeline-diagnostics.js +0 -33
  143. package/dist/src/server/routes/pipeline-links.js +0 -117
  144. package/dist/src/server/routes/pipeline-outputs.js +0 -27
  145. package/dist/src/server/routes/pipeline-queue.js +0 -62
  146. package/dist/src/server/routes/pipeline-runtime.js +0 -162
  147. package/dist/src/server/routes/pipeline-scheduler.js +0 -69
  148. package/dist/src/server/routes/pipeline-workflow.js +0 -180
  149. package/dist/src/server/routes/pipelines.js +0 -96
  150. package/dist/src/server/routes/sessions.js +0 -244
  151. package/dist/src/server/routes/timeline.js +0 -14
  152. package/dist/src/server/serve-static.js +0 -42
  153. package/web/dist/assets/index-CWnfhkn-.js +0 -65
  154. package/web/dist/assets/index-gZ0xOfSO.css +0 -1
  155. /package/dist/src/{server → transport/ws-methods}/types.js +0 -0
@@ -0,0 +1,244 @@
1
+ {
2
+ "help": {
3
+ "usage": "taskmeld <resource> <action> [args] [--flags]",
4
+ "groups": {
5
+ "agent": "Agent management",
6
+ "artifact": "Artifact management",
7
+ "init": "First-time setup",
8
+ "pipeline": "Pipeline management",
9
+ "scheduler": "Scheduler control",
10
+ "server": "Server management",
11
+ "system": "System info"
12
+ },
13
+ "commonOptions": {
14
+ "title": "Common Options:",
15
+ "format": "Output format (default: md)",
16
+ "envelope": "Only available with --format json, outputs full envelope wrapper",
17
+ "help": "Show help for current command"
18
+ },
19
+ "tips": {
20
+ "title": "Tips:",
21
+ "groupHelp": "View group-level help",
22
+ "commandHelp": "View command-level help"
23
+ },
24
+ "label": {
25
+ "required": "Required",
26
+ "optional": "Optional"
27
+ }
28
+ },
29
+ "init": {
30
+ "firstTimeSetup": "First-time Setup",
31
+ "greeting": "Configure your OpenClaw Gateway connection to get started.",
32
+ "configSavedTo": "Config {{path}}",
33
+ "languageLabel": "Language",
34
+ "gatewayUrlLabel": "Gateway URL",
35
+ "gatewayUrlHint": "ws:// or wss:// address of your OpenClaw Gateway",
36
+ "gatewayTokenLabel": "Gateway Token",
37
+ "gatewayTokenHint": "Authentication token for the Gateway",
38
+ "success": "Gateway configured successfully",
39
+ "nextStep": "Run \"taskmeld server start\" to begin.",
40
+ "urlLabel": "URL",
41
+ "description": "Guided setup for OpenClaw Gateway connection",
42
+ "usage": "taskmeld init [--url <url>] [--token <token>]",
43
+ "summary": "Guided first-time setup — configure the OpenClaw Gateway connection.",
44
+ "optUrlDesc": "Gateway WebSocket URL (ws:// or wss://)",
45
+ "optTokenDesc": "Gateway authentication token",
46
+ "example1": "taskmeld init",
47
+ "example2": "taskmeld init --url ws://127.0.0.1:18789 --token your-token",
48
+ "note1": "Running without flags starts an interactive guided setup.",
49
+ "note2": "Config is saved to ~/.taskmeld/config.json.",
50
+ "note3": "Environment variables (OPENCLAW_GATEWAY_URL/TOKEN) take precedence over this config."
51
+ },
52
+ "agent": {
53
+ "list": {
54
+ "description": "List agents",
55
+ "summary": "List agents"
56
+ },
57
+ "session": {
58
+ "description": "List sessions (all or filtered by agent)",
59
+ "summary": "List sessions (all or filtered by agent)",
60
+ "argAgentId": "Filter sessions by Agent ID"
61
+ },
62
+ "send": {
63
+ "description": "Send message to agent session",
64
+ "summary": "Send message to agent session and wait for reply",
65
+ "argAgentId": "Agent ID",
66
+ "argMessage": "Message content",
67
+ "optSession": "Session ID (default: main)",
68
+ "optStream": "Stream reply content"
69
+ }
70
+ },
71
+ "artifact": {
72
+ "index": {
73
+ "description": "Rebuild artifact index",
74
+ "summary": "Scan artifact directory and rebuild index.jsonl, used to include historical files after upgrade or fix index inconsistency",
75
+ "argRebuild": "Rebuild index.jsonl",
76
+ "optPipeline": "Only rebuild for specified pipeline"
77
+ },
78
+ "list": {
79
+ "description": "List artifacts",
80
+ "summary": "List artifacts with status/type/batch/cursor pagination support",
81
+ "optPipeline": "Filter by pipeline",
82
+ "optNode": "Filter by node",
83
+ "optBatch": "Filter by batch run ID",
84
+ "optRun": "Filter by run ID",
85
+ "optCursor": "Pagination cursor"
86
+ },
87
+ "show": {
88
+ "description": "Show artifact content",
89
+ "summary": "Show content of specified artifact",
90
+ "argPipelineId": "Pipeline ID",
91
+ "argRelativePath": "Artifact relative path"
92
+ },
93
+ "export": {
94
+ "description": "Export artifact content",
95
+ "summary": "Export artifacts as date->pipeline->node three-level JSON",
96
+ "optPipeline": "Filter by pipeline",
97
+ "optNode": "Filter by node",
98
+ "optBatch": "Filter by batch run ID",
99
+ "optFrom": "Start date YYYY-MM-DD",
100
+ "optTo": "End date YYYY-MM-DD",
101
+ "optLimit": "Max export count, default 20000"
102
+ },
103
+ "cleanup": {
104
+ "description": "Clean up old artifacts",
105
+ "summary": "Clean up old artifact files, default dry-run shows candidates without deleting, pass --confirm to execute real deletion and rebuild index",
106
+ "argPipelineId": "Pipeline ID",
107
+ "optOlderThan": "Retention days, default success=30/failed=90/rejected=90",
108
+ "optConfirm": "Must be explicitly passed to execute real deletion, otherwise dry-run",
109
+ "dryRunMessage": "Dry-run mode, candidate files will not be deleted. Pass --confirm to execute real deletion."
110
+ }
111
+ },
112
+ "pipeline": {
113
+ "list": {
114
+ "description": "List pipelines",
115
+ "summary": "List pipelines"
116
+ },
117
+ "get": {
118
+ "description": "Show pipeline details",
119
+ "summary": "Show pipeline details",
120
+ "argId": "Pipeline ID"
121
+ },
122
+ "start": {
123
+ "description": "Start a pipeline run (completion not guaranteed)",
124
+ "summary": "Start a pipeline run (completion not guaranteed)",
125
+ "argPipelineId": "Pipeline ID",
126
+ "optWatch": "Continue waiting for run completion after start",
127
+ "optTimeout": "Watch timeout in ms, default 600000",
128
+ "optInterval": "Watch polling interval in ms, default 1200",
129
+ "noteOnlyStart": "start only initiates the run request, does not guarantee completion when the command returns.",
130
+ "noteWatch": "--watch enters the wait flow after a successful start."
131
+ },
132
+ "status": {
133
+ "description": "Show current pipeline run status",
134
+ "summary": "Show current pipeline run status",
135
+ "argPipelineId": "Compatibility entry, query current run by pipeline ID",
136
+ "optRunId": "Query by specific run ID",
137
+ "optBatchRunId": "Query by specific batch run ID",
138
+ "noteNeedSelector": "At least one of <pipelineId>, --run-id, --batch-run-id must be provided.",
139
+ "noteDefaultQuery": "When no selector is provided, defaults to querying current active run by pipelineId."
140
+ },
141
+ "watch": {
142
+ "description": "Watch pipeline until completion or timeout",
143
+ "summary": "Watch pipeline until completion or timeout",
144
+ "argPipelineId": "Compatibility entry, watch current run of this pipeline",
145
+ "optRunId": "Watch by specific run ID",
146
+ "optBatchRunId": "Watch by specific batch run ID",
147
+ "optTimeout": "Watch timeout in ms, default 600000",
148
+ "optInterval": "Watch polling interval in ms, default 1200",
149
+ "noteIsWatch": "watch is a monitoring command, it does not start new runs.",
150
+ "noteNeedSelector": "At least one of <pipelineId>, --run-id, --batch-run-id must be provided.",
151
+ "notePollingFallback": "Current watch semantics prioritize event streams with polling as fallback."
152
+ },
153
+ "stop": {
154
+ "description": "Stop pipeline batch run",
155
+ "summary": "Stop pipeline batch run",
156
+ "argPipelineId": "Compatibility entry, stop current run of this pipeline",
157
+ "optRunId": "Stop by specific run ID",
158
+ "optBatchRunId": "Stop by specific batch run ID",
159
+ "noteNeedSelector": "At least one of <pipelineId>, --run-id, --batch-run-id must be provided.",
160
+ "noteBatchOnly": "Currently stop is mainly used for stopping batch runs.",
161
+ "noteNonBatch": "Non-batch runs will return a business error instead of silent success."
162
+ },
163
+ "retryNode": {
164
+ "description": "Retry a node or node item",
165
+ "summary": "Retry a node or node item",
166
+ "argPipelineId": "Pipeline ID",
167
+ "argNodeId": "Node ID",
168
+ "optItem": "Specify the item key to retry"
169
+ },
170
+ "diagnose": {
171
+ "description": "Diagnose node dependency status, output blocking reason",
172
+ "summary": "Diagnose node dependency status, output blocking reason",
173
+ "argPipelineId": "Pipeline ID",
174
+ "argNodeId": "Node ID",
175
+ "optItem": "Optional, specify item key for precise diagnosis"
176
+ },
177
+ "result": {
178
+ "description": "Show pipeline run results",
179
+ "summary": "Show artifact content of each node after pipeline run",
180
+ "argPipelineId": "Pipeline ID",
181
+ "optNode": "Filter to specific node",
182
+ "optLogs": "Also show processing logs",
183
+ "optFormat": "Output format, default md"
184
+ },
185
+ "output": {
186
+ "description": "Query pipeline final output",
187
+ "summary": "Query pipeline final output",
188
+ "argPipelineId": "Pipeline ID",
189
+ "optRun": "Query by specific run ID"
190
+ },
191
+ "linkList": {
192
+ "description": "List all pipeline dispatch links",
193
+ "summary": "List all pipeline dispatch links"
194
+ },
195
+ "queue": {
196
+ "description": "Query pipeline inbound queue",
197
+ "summary": "Query pipeline inbound queue",
198
+ "argPipelineId": "Pipeline ID"
199
+ }
200
+ },
201
+ "scheduler": {
202
+ "toggle": {
203
+ "description": "Enable or disable scheduler",
204
+ "summary": "Enable or disable scheduler",
205
+ "argPipelineId": "Pipeline ID",
206
+ "optEnabled": "Whether to enable scheduler",
207
+ "note": "Both <pipelineId> and --enabled are required."
208
+ },
209
+ "mode": {
210
+ "description": "Switch scheduler mode",
211
+ "summary": "Switch scheduler mode",
212
+ "argPipelineId": "Pipeline ID",
213
+ "optMode": "Scheduler mode",
214
+ "note": "Both <pipelineId> and --mode are required."
215
+ }
216
+ },
217
+ "server": {
218
+ "ensure": {
219
+ "description": "Ensure local control-plane backend is started and healthy",
220
+ "summary": "Ensure local control-plane daemon is started and healthy",
221
+ "noteDaemonFirst": "Daemon-first semantics: prefer reusing an existing healthy local instance.",
222
+ "noteNewDaemon": "Only starts a new daemon when no reusable healthy instance is available."
223
+ },
224
+ "start": {
225
+ "description": "Explicitly start local control-plane backend",
226
+ "summary": "Explicitly start local control-plane daemon"
227
+ },
228
+ "status": {
229
+ "description": "Show local control-plane backend status",
230
+ "summary": "View local control-plane daemon health, ownership and pid info",
231
+ "note": "Status output is used to confirm whether local daemon is reusable and current owner metadata is consistent."
232
+ },
233
+ "stop": {
234
+ "description": "Stop local control-plane backend",
235
+ "summary": "Stop local control-plane daemon"
236
+ }
237
+ },
238
+ "system": {
239
+ "snapshot": {
240
+ "description": "Show system global snapshot",
241
+ "summary": "Show system global snapshot"
242
+ }
243
+ }
244
+ }
@@ -0,0 +1,244 @@
1
+ {
2
+ "help": {
3
+ "usage": "taskmeld <resource> <action> [args] [--flags]",
4
+ "groups": {
5
+ "agent": "智能体管理",
6
+ "artifact": "产物管理",
7
+ "init": "首次配置",
8
+ "pipeline": "流水线管理",
9
+ "scheduler": "调度控制",
10
+ "server": "后端服务管理",
11
+ "system": "系统信息"
12
+ },
13
+ "commonOptions": {
14
+ "title": "通用选项:",
15
+ "format": "输出格式(默认: md)",
16
+ "envelope": "仅与 --format json 搭配可用,输出完整包装层",
17
+ "help": "显示当前命令帮助"
18
+ },
19
+ "tips": {
20
+ "title": "提示:",
21
+ "groupHelp": "查看一级命令帮助",
22
+ "commandHelp": "查看二级命令帮助"
23
+ },
24
+ "label": {
25
+ "required": "必填",
26
+ "optional": "可选"
27
+ }
28
+ },
29
+ "init": {
30
+ "firstTimeSetup": "首次配置",
31
+ "greeting": "配置您的 OpenClaw Gateway 连接以开始使用。",
32
+ "configSavedTo": "配置 {{path}}",
33
+ "languageLabel": "语言",
34
+ "gatewayUrlLabel": "Gateway URL",
35
+ "gatewayUrlHint": "OpenClaw Gateway 的 ws:// 或 wss:// 地址",
36
+ "gatewayTokenLabel": "Gateway Token",
37
+ "gatewayTokenHint": "Gateway 认证令牌",
38
+ "success": "Gateway 配置成功",
39
+ "nextStep": "运行 \"taskmeld server start\" 以开始使用。",
40
+ "urlLabel": "URL",
41
+ "description": "OpenClaw Gateway 连接引导设置",
42
+ "usage": "taskmeld init [--url <url>] [--token <token>]",
43
+ "summary": "引导式首次配置 — 设置 OpenClaw Gateway 连接。",
44
+ "optUrlDesc": "Gateway WebSocket URL(ws:// 或 wss://)",
45
+ "optTokenDesc": "Gateway 认证令牌",
46
+ "example1": "taskmeld init",
47
+ "example2": "taskmeld init --url ws://127.0.0.1:18789 --token your-token",
48
+ "note1": "不带参数运行时启动交互式引导设置。",
49
+ "note2": "配置保存在 ~/.taskmeld/config.json。",
50
+ "note3": "环境变量(OPENCLAW_GATEWAY_URL/TOKEN)的优先级高于此配置。"
51
+ },
52
+ "agent": {
53
+ "list": {
54
+ "description": "输出智能体列表",
55
+ "summary": "输出智能体列表"
56
+ },
57
+ "session": {
58
+ "description": "输出会话列表(全部或按 agent 过滤)",
59
+ "summary": "输出会话列表(全部或按 agent 过滤)",
60
+ "argAgentId": "按 Agent ID 过滤会话"
61
+ },
62
+ "send": {
63
+ "description": "向指定 agent 会话发送消息",
64
+ "summary": "向指定 agent 会话发送消息并等待回复",
65
+ "argAgentId": "Agent ID",
66
+ "argMessage": "消息内容",
67
+ "optSession": "会话 ID(默认 main)",
68
+ "optStream": "流式输出回复内容"
69
+ }
70
+ },
71
+ "artifact": {
72
+ "index": {
73
+ "description": "重建产物索引",
74
+ "summary": "扫描产物目录并重建 index.jsonl,用于升级后纳入历史文件或修复索引不一致",
75
+ "argRebuild": "重建 index.jsonl",
76
+ "optPipeline": "只重建指定流水线"
77
+ },
78
+ "list": {
79
+ "description": "输出产物列表",
80
+ "summary": "输出产物列表,支持状态/类型/批跑/游标分页",
81
+ "optPipeline": "按流水线过滤",
82
+ "optNode": "按节点过滤",
83
+ "optBatch": "按批跑ID过滤",
84
+ "optRun": "按运行RunId过滤",
85
+ "optCursor": "分页游标"
86
+ },
87
+ "show": {
88
+ "description": "输出产物内容",
89
+ "summary": "输出指定产物的文件内容",
90
+ "argPipelineId": "流水线 ID",
91
+ "argRelativePath": "产物相对路径"
92
+ },
93
+ "export": {
94
+ "description": "导出产物内容",
95
+ "summary": "导出产物内容为 日期->流水线->节点 三层JSON",
96
+ "optPipeline": "按流水线过滤",
97
+ "optNode": "按节点过滤",
98
+ "optBatch": "按批跑ID过滤",
99
+ "optFrom": "开始日期 YYYY-MM-DD",
100
+ "optTo": "结束日期 YYYY-MM-DD",
101
+ "optLimit": "最大导出条数,默认20000"
102
+ },
103
+ "cleanup": {
104
+ "description": "清理旧产物",
105
+ "summary": "清理旧产物文件,默认 dry-run 只展示候选不删除,传 --confirm 执行真实删除并重建索引",
106
+ "argPipelineId": "流水线 ID",
107
+ "optOlderThan": "保留天数,默认 success=30/failed=90/rejected=90",
108
+ "optConfirm": "必须显式传入才执行真实删除,否则 dry-run",
109
+ "dryRunMessage": "dry-run 模式,候选文件不会删除。传入 --confirm 执行真实删除。"
110
+ }
111
+ },
112
+ "pipeline": {
113
+ "list": {
114
+ "description": "输出流水线列表",
115
+ "summary": "输出流水线列表"
116
+ },
117
+ "get": {
118
+ "description": "输出指定流水线详情",
119
+ "summary": "输出指定流水线详情",
120
+ "argId": "流水线 ID"
121
+ },
122
+ "start": {
123
+ "description": "发起指定流水线运行(不承诺已完成)",
124
+ "summary": "发起指定流水线运行(不承诺已完成)",
125
+ "argPipelineId": "流水线 ID",
126
+ "optWatch": "启动后继续等待运行完成",
127
+ "optTimeout": "watch 超时时间,默认 600000",
128
+ "optInterval": "watch 轮询间隔,默认 1200",
129
+ "noteOnlyStart": "start 只负责发起运行请求,不承诺命令返回时业务已执行完成。",
130
+ "noteWatch": "--watch 会在发起成功后进入等待流程。"
131
+ },
132
+ "status": {
133
+ "description": "输出指定流水线当前运行状态",
134
+ "summary": "输出指定流水线当前运行状态",
135
+ "argPipelineId": "兼容入口,按流水线 ID 查询当前运行",
136
+ "optRunId": "按单次运行 ID 精确查询",
137
+ "optBatchRunId": "按批跑 ID 精确查询",
138
+ "noteNeedSelector": "需要至少提供 <pipelineId>、--run-id、--batch-run-id 之一。",
139
+ "noteDefaultQuery": "未提供 selector 时,默认按 pipelineId 查询当前活动运行。"
140
+ },
141
+ "watch": {
142
+ "description": "监听指定流水线直到结束或超时",
143
+ "summary": "监听指定流水线直到结束或超时",
144
+ "argPipelineId": "兼容入口,监听该流水线当前运行",
145
+ "optRunId": "按单次运行 ID 精确监听",
146
+ "optBatchRunId": "按批跑 ID 精确监听",
147
+ "optTimeout": "watch 超时时间,默认 600000",
148
+ "optInterval": "watch 轮询间隔,默认 1200",
149
+ "noteIsWatch": "watch 是监听命令,不负责发起新运行。",
150
+ "noteNeedSelector": "需要至少提供 <pipelineId>、--run-id、--batch-run-id 之一。",
151
+ "notePollingFallback": "当前 watch 语义为事件流优先,轮询作为兜底路径。"
152
+ },
153
+ "stop": {
154
+ "description": "停止指定流水线批跑任务",
155
+ "summary": "停止指定流水线批跑任务",
156
+ "argPipelineId": "兼容入口,停止该流水线当前运行",
157
+ "optRunId": "按单次运行 ID 精确停止",
158
+ "optBatchRunId": "按批跑 ID 精确停止",
159
+ "noteNeedSelector": "需要至少提供 <pipelineId>、--run-id、--batch-run-id 之一。",
160
+ "noteBatchOnly": "当前 stop 主要用于停止批跑任务。",
161
+ "noteNonBatch": "对非批跑运行会返回业务错误,而不是静默成功。"
162
+ },
163
+ "retryNode": {
164
+ "description": "重试指定节点或节点条目",
165
+ "summary": "重试指定节点或节点条目",
166
+ "argPipelineId": "流水线 ID",
167
+ "argNodeId": "节点 ID",
168
+ "optItem": "指定重试的条目键"
169
+ },
170
+ "diagnose": {
171
+ "description": "诊断指定节点依赖状态,输出阻塞原因",
172
+ "summary": "诊断指定节点依赖状态,输出阻塞原因",
173
+ "argPipelineId": "流水线 ID",
174
+ "argNodeId": "节点 ID",
175
+ "optItem": "可选,指定条目键精确诊断"
176
+ },
177
+ "result": {
178
+ "description": "输出流水线运行结果",
179
+ "summary": "输出流水线运行后各节点的产物内容",
180
+ "argPipelineId": "流水线 ID",
181
+ "optNode": "过滤到指定节点",
182
+ "optLogs": "同时展示处理日志",
183
+ "optFormat": "输出格式,默认 md"
184
+ },
185
+ "output": {
186
+ "description": "查询流水线最终产物",
187
+ "summary": "查询流水线最终产物",
188
+ "argPipelineId": "流水线 ID",
189
+ "optRun": "按 runId 精确查询"
190
+ },
191
+ "linkList": {
192
+ "description": "列出所有流水线投递链接",
193
+ "summary": "列出所有流水线投递链接"
194
+ },
195
+ "queue": {
196
+ "description": "查询流水线接收队列",
197
+ "summary": "查询流水线接收队列",
198
+ "argPipelineId": "流水线 ID"
199
+ }
200
+ },
201
+ "scheduler": {
202
+ "toggle": {
203
+ "description": "启用或停用调度器",
204
+ "summary": "启用或停用调度器",
205
+ "argPipelineId": "流水线 ID",
206
+ "optEnabled": "是否启用调度器",
207
+ "note": "<pipelineId> 与 --enabled 均为必填控制项。"
208
+ },
209
+ "mode": {
210
+ "description": "切换调度器模式",
211
+ "summary": "切换调度器模式",
212
+ "argPipelineId": "流水线 ID",
213
+ "optMode": "调度器模式",
214
+ "note": "<pipelineId> 与 --mode 均为必填控制项。"
215
+ }
216
+ },
217
+ "server": {
218
+ "ensure": {
219
+ "description": "确保本地控制面后端已启动并健康",
220
+ "summary": "确保本地 control-plane daemon 已启动并健康",
221
+ "noteDaemonFirst": "daemon-first 语义:优先复用已存在且健康的本地实例。",
222
+ "noteNewDaemon": "仅在没有可复用健康实例时,才会启动新的 daemon。"
223
+ },
224
+ "start": {
225
+ "description": "显式启动本地控制面后端",
226
+ "summary": "显式启动本地 control-plane daemon"
227
+ },
228
+ "status": {
229
+ "description": "输出本地控制面后端状态",
230
+ "summary": "查看本地 control-plane daemon 的健康、ownership 与 pid 信息",
231
+ "note": "状态输出用于确认本地 daemon 是否可复用以及当前 owner 元数据是否一致。"
232
+ },
233
+ "stop": {
234
+ "description": "停止本地控制面后端",
235
+ "summary": "停止本地 control-plane daemon"
236
+ }
237
+ },
238
+ "system": {
239
+ "snapshot": {
240
+ "description": "输出系统全局快照",
241
+ "summary": "输出系统全局快照"
242
+ }
243
+ }
244
+ }
@@ -2,17 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.writeHelp = exports.writeError = exports.writeResult = void 0;
4
4
  const renderers_1 = require("./renderers");
5
- // 成功输出由 renderer 统一分发,命令层不直接拼接文本。
5
+ // Success output is dispatched uniformly by the renderer; command layer does not assemble text directly.
6
6
  const writeResult = (stream, command, data, global) => {
7
7
  stream.write(`${(0, renderers_1.renderSuccessByMode)(command, data, global)}\n`);
8
8
  };
9
9
  exports.writeResult = writeResult;
10
- // 错误统一写 stderr,避免污染 stdout 结果流。
10
+ // Errors are consistently written to stderr to avoid polluting the stdout result stream.
11
11
  const writeError = (stream, error, command, global) => {
12
12
  stream.write(`${(0, renderers_1.renderErrorByMode)(command, error, global)}\n`);
13
13
  };
14
14
  exports.writeError = writeError;
15
- // 帮助信息输出纯文本到 stdout,便于人类直接阅读。
15
+ // Help info is output as plain text to stdout for easy human reading.
16
16
  const writeHelp = (stream, helpText) => {
17
17
  stream.write(`${helpText}\n`);
18
18
  };
@@ -86,7 +86,7 @@ const formatMarkdown = (ir) => {
86
86
  lines.push(...renderTable(headers, stringRows));
87
87
  }
88
88
  else {
89
- // custom: 直接拼入
89
+ // custom: concatenate directly
90
90
  lines.push(...section.lines);
91
91
  }
92
92
  }
@@ -8,7 +8,7 @@ const pipeline_1 = require("./pipeline");
8
8
  const scheduler_1 = require("./scheduler");
9
9
  const server_1 = require("./server");
10
10
  const system_1 = require("./system");
11
- // 按模块聚合输出定义,避免继续把所有结构堆回单一 renderer 文件。
11
+ // Aggregate output definitions by module to avoid dumping all structures back into a single renderer file.
12
12
  const allSpecs = {
13
13
  ...agent_1.agentRenderSpecs,
14
14
  ...artifact_1.artifactRenderSpecs,
@@ -44,7 +44,7 @@ const serverCommands = __importStar(require("./commands/server"));
44
44
  const systemCommands = __importStar(require("./commands/system"));
45
45
  const help_1 = require("./help");
46
46
  const collectRoutesFromModule = (moduleExports) => {
47
- // 只聚合命令模块导出的 *Routesrouter 不再内联维护路由定义。
47
+ // Only aggregate *Routes exports from command modules; the router no longer inlines route definitions.
48
48
  return Object.entries(moduleExports)
49
49
  .filter(([exportName, value]) => exportName.endsWith("Routes") && Array.isArray(value))
50
50
  .flatMap(([, value]) => value);