@coralai/sps-cli 0.52.2 → 0.53.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.
Files changed (86) hide show
  1. package/README-CN.md +457 -131
  2. package/README.md +460 -131
  3. package/dist/commands/agentCommand.js +1 -1
  4. package/dist/commands/agentCommand.js.map +1 -1
  5. package/dist/commands/agentRenderer.d.ts +1 -1
  6. package/dist/commands/agentRenderer.d.ts.map +1 -1
  7. package/dist/commands/skillCommand.js +14 -14
  8. package/dist/commands/skillCommand.js.map +1 -1
  9. package/dist/console/routes/chat.d.ts.map +1 -1
  10. package/dist/console/routes/chat.js +12 -3
  11. package/dist/console/routes/chat.js.map +1 -1
  12. package/dist/console/routes/fs.js +2 -2
  13. package/dist/console/routes/fs.js.map +1 -1
  14. package/dist/console-assets/assets/index-CoAkaUkW.css +10 -0
  15. package/dist/console-assets/assets/index-p6b8pcpR.js +557 -0
  16. package/dist/console-assets/index.html +2 -2
  17. package/dist/core/claudeJsonl.d.ts +43 -0
  18. package/dist/core/claudeJsonl.d.ts.map +1 -0
  19. package/dist/core/claudeJsonl.js +187 -0
  20. package/dist/core/claudeJsonl.js.map +1 -0
  21. package/dist/core/runtimeSnapshot.d.ts +1 -1
  22. package/dist/core/runtimeSnapshot.d.ts.map +1 -1
  23. package/dist/core/runtimeStore.d.ts +1 -1
  24. package/dist/core/runtimeStore.d.ts.map +1 -1
  25. package/dist/core/sessionContext.d.ts +1 -1
  26. package/dist/core/sessionContext.d.ts.map +1 -1
  27. package/dist/core/sessionLiveness.d.ts +1 -1
  28. package/dist/core/sessionLiveness.d.ts.map +1 -1
  29. package/dist/core/state.d.ts +1 -1
  30. package/dist/core/state.d.ts.map +1 -1
  31. package/dist/core/wiki/hot.js +2 -2
  32. package/dist/core/wiki/hot.js.map +1 -1
  33. package/dist/core/wiki/reader.js +4 -4
  34. package/dist/core/wiki/reader.js.map +1 -1
  35. package/dist/core/wiki/scaffold.js +1 -1
  36. package/dist/core/wiki/types.d.ts +50 -50
  37. package/dist/daemon/daemonClient.d.ts +2 -2
  38. package/dist/daemon/daemonClient.d.ts.map +1 -1
  39. package/dist/engines/MonitorEngine.js.map +1 -1
  40. package/dist/main.js +40 -40
  41. package/dist/main.js.map +1 -1
  42. package/dist/manager/worker-manager-impl.d.ts +1 -1
  43. package/dist/manager/worker-manager-impl.d.ts.map +1 -1
  44. package/dist/providers/ACPWorkerRuntime.d.ts +5 -5
  45. package/dist/providers/ACPWorkerRuntime.d.ts.map +1 -1
  46. package/dist/providers/ACPWorkerRuntime.js +1 -1
  47. package/dist/providers/ACPWorkerRuntime.js.map +1 -1
  48. package/dist/providers/MarkdownTaskBackend.d.ts +2 -6
  49. package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
  50. package/dist/providers/MarkdownTaskBackend.js +20 -32
  51. package/dist/providers/MarkdownTaskBackend.js.map +1 -1
  52. package/dist/providers/registry.d.ts +1 -1
  53. package/dist/providers/registry.d.ts.map +1 -1
  54. package/dist/services/CardService.js +11 -11
  55. package/dist/services/CardService.js.map +1 -1
  56. package/dist/services/ChatService.d.ts +31 -1
  57. package/dist/services/ChatService.d.ts.map +1 -1
  58. package/dist/services/ChatService.js +149 -33
  59. package/dist/services/ChatService.js.map +1 -1
  60. package/dist/services/LogService.js +2 -2
  61. package/dist/services/LogService.js.map +1 -1
  62. package/dist/services/PipelineService.js +29 -29
  63. package/dist/services/PipelineService.js.map +1 -1
  64. package/dist/services/ProjectService.js +16 -16
  65. package/dist/services/ProjectService.js.map +1 -1
  66. package/dist/services/SkillService.js +9 -9
  67. package/dist/services/SkillService.js.map +1 -1
  68. package/dist/services/SystemService.js +9 -9
  69. package/dist/services/SystemService.js.map +1 -1
  70. package/dist/services/WorkerService.js +7 -7
  71. package/dist/services/WorkerService.js.map +1 -1
  72. package/dist/services/executors.d.ts +1 -0
  73. package/dist/services/executors.d.ts.map +1 -1
  74. package/dist/services/executors.js +7 -0
  75. package/dist/services/executors.js.map +1 -1
  76. package/dist/shared/runtimePaths.d.ts +8 -0
  77. package/dist/shared/runtimePaths.d.ts.map +1 -1
  78. package/dist/shared/runtimePaths.js +22 -0
  79. package/dist/shared/runtimePaths.js.map +1 -1
  80. package/dist/shared/runtimeSchemas.d.ts +14 -14
  81. package/package.json +7 -3
  82. package/skills/sps-memory/SKILL.md +1 -1
  83. package/skills/sps-pipeline/SKILL.md +19 -19
  84. package/LICENSE +0 -21
  85. package/dist/console-assets/assets/index-Bf8zeTg0.js +0 -566
  86. package/dist/console-assets/assets/index-j5Dtsmq0.css +0 -10
@@ -178,19 +178,19 @@ card pipelines; see `sample.yaml.example` for syntax.
178
178
  ## 4. Card state machine
179
179
 
180
180
  ```
181
- Since v0.51.9:
181
+ v0.51.9 起:
182
182
 
183
183
  Backlog → Todo → Inprogress → [QA / Review] → Done
184
184
  ↑↓
185
- Planning (manual staging by the user; not auto-dispatched)
185
+ Planning(用户手动暂存;不自动派发)
186
186
  ↓ fail
187
187
  NEEDS-FIX (halt)
188
188
  ```
189
189
 
190
190
  Default states (configurable in YAML `pm.card_states`):
191
- - **Planning** — v0.51.10+: manual staging / draft. The **console "New card" form** defaults here; the user drags to Backlog to run.
192
- - **Backlog** — **`sps card add` (CLI / agent)** defaults here; StageEngine claims and runs the card.
193
- - **Todo** — StageEngine has prepped (branch / worktree); the next tick dispatches a worker.
191
+ - **Planning** — v0.51.10+:人工暂存 / 草稿。**console "新卡片" 表单**默认入此状态;用户拖到 Backlog 才会跑。
192
+ - **Backlog** — **`sps card add`(CLI / agent)**默认入此状态;StageEngine 抢卡执行。
193
+ - **Todo** — StageEngine prep(建分支 / worktree),下次 tick worker
194
194
  - **Inprogress** — worker active
195
195
  - **QA** (or **Review**) — code complete, awaiting human/auto verification
196
196
  - **Done** — finished
@@ -206,22 +206,22 @@ Stop hook reads this to detect which card the worker just finished.
206
206
 
207
207
  ### Where new cards land — depends on caller (v0.51.10+)
208
208
 
209
- | Caller | Default entry state | Behavior |
209
+ | 调用方 | 默认入场 state | 行为 |
210
210
  |---|---|---|
211
- | **`sps card add`** (CLI / Worker / agent) | **Backlog** | StageEngine claims it on the next tick and runs |
212
- | **Console "New card" form** | **Planning** | Staged; runs only when the user drags it to Backlog on the board |
213
- | **`POST /api/projects/<p>/cards`** (direct API call) | **Planning** | Defaults to the manual semantics; pass `initialState: 'Backlog'` in the body to run immediately |
211
+ | **`sps card add`** (CLI / Worker / agent) | **Backlog** | 下次 tick 立即被 StageEngine 抢卡跑 |
212
+ | **Console "新卡片" 表单** | **Planning** | 暂存;用户在看板拖到 Backlog 才会跑 |
213
+ | **`POST /api/projects/<p>/cards`** 直接调 API | **Planning** | 默认人工语义;body `initialState: 'Backlog'` 立即跑 |
214
214
 
215
- **Agent calls `sps card add` → card lands in Backlog → runs automatically.** This is the main SPS path. When a Worker inside one card needs to "spawn a sub-task," it calls `sps card add` the sub-task is auto-picked up on the next tick.
215
+ **Agent `sps card add` → 卡进 Backlog → 自动跑。** 这是 SPS 的主路径。Worker 在某个卡里需要"派生子任务"时用 `sps card add`,子任务会被下一个 tick 自动 pickup。
216
216
 
217
217
  ```bash
218
- # Agent / Worker main path lands in Backlog and runs automatically
218
+ # Agent / Worker 主路径直接进 Backlog 自动跑
219
219
  sps card add <project> "Title" "Description"
220
220
  sps card add <project> "T" "D" --skills python,backend --labels feature
221
221
 
222
- # Stage instead (let the user review / drag to dispatch later)
222
+ # 想暂存(让用户审核 / 自己稍后拖派发)
223
223
  sps card add <project> "Title" "Description" --draft
224
- # → card lands in Planning, awaits manual drag to Backlog
224
+ # → 卡进 Planning,等手动拖到 Backlog
225
225
  ```
226
226
 
227
227
  ### View
@@ -241,13 +241,13 @@ sps reset <p> --card 5,6,7 # reset specific seq
241
241
  sps reset <p> --all # full reset incl. Done
242
242
  ```
243
243
 
244
- Note: `sps reset` returns the card to **Planning** (not Backlog)reset = back to manual control; you must drag to Backlog again to re-run. This semantic applies since v0.51.9.
244
+ 注:`sps reset` 把卡退回 **Planning**(不是 Backlog重置 = 退回人工控制,需手动拖回 Backlog 才会再跑。这是 v0.51.9 起的语义。
245
245
 
246
246
  ### Card label vocabulary
247
247
 
248
248
  | Label | Meaning | Who sets |
249
249
  |---|---|---|
250
- | `AI-PIPELINE` | Marker for "SPS pipeline cards" (since v0.51.9+ no auto behavior is triggered — purely identification) | Auto-added by `sps card add` |
250
+ | `AI-PIPELINE` | "SPS pipeline " 的标记(v0.51.9+ 不再触发任何自动行为,仅识别) | `sps card add` 自动加 |
251
251
  | `STARTED-<stage>` | ACK signal — Claude received the prompt | UserPromptSubmit hook |
252
252
  | `COMPLETED-<stage>` | Worker finished a stage | Stop hook |
253
253
  | `CLAIMED` | StageEngine reserved a worker slot | Engine |
@@ -278,7 +278,7 @@ sps doctor <project> # health check
278
278
  sps doctor <project> --fix # auto-repair drift
279
279
 
280
280
  # One-off ticks (each engine separately, useful for cron / debugging)
281
- sps scheduler tick <p> # No-op since v0.51.9 (dormant; interface kept for compatibility)
281
+ sps scheduler tick <p> # v0.51.9 起为 no-op(dormant,保留接口)
282
282
  sps pipeline tick <p> # full StageEngine pass
283
283
  sps qa tick <p> # QA → Done finalization
284
284
  sps monitor tick <p> # health probe (ACK timeout, stale runtime)
@@ -371,7 +371,7 @@ Live at `~/.coral/projects/<name>/conf` (shell `export VAR="value"` syntax).
371
371
  | `GITLAB_PROJECT` | — | `user/repo` (optional, for GitLab API) |
372
372
  | `GITLAB_MERGE_BRANCH` | `main` | Worker pushes here |
373
373
  | `PM_TOOL` | `markdown` | **Only `markdown` supported as of v0.42.0**. Plane/Trello removed. Cards live in `~/.coral/projects/<n>/cards/<state>/<seq>.md` |
374
- | `PIPELINE_LABEL` | `AI-PIPELINE` | Marker label auto-added by `sps card add` — identifies SPS-managed cards. Since v0.51.9, no automatic state promotion is triggered (cards run based on their entry state) |
374
+ | `PIPELINE_LABEL` | `AI-PIPELINE` | Marker label auto-added by `sps card add` — identifies SPS-managed cards. v0.51.9+ 不再触发自动状态提升(卡按入场 state 决定是否跑) |
375
375
  | `MR_MODE` | `none` | `none` (push direct) / `create` (open MR; needs `GITLAB_PROJECT_ID`) |
376
376
  | `WORKER_TRANSPORT` | `acp-sdk` | Fixed; do not change |
377
377
  | `MAX_CONCURRENT_WORKERS` | `1` | Slot count; cards still serial within a project |
@@ -407,7 +407,7 @@ Infrastructure (manager/, providers/, daemon/)
407
407
 
408
408
  ### Engines
409
409
 
410
- - **SchedulerEngine** — dormant since v0.51.9 (cards added directly to Backlog; no promotion needed)
410
+ - **SchedulerEngine** — v0.51.9 dormant(卡 add 直接进 Backlog,无需提升)
411
411
  - **StageEngine** — drives card through stages; builds prompt (skill + projectRules
412
412
  + memory + **wikiContext** + task description + **wikiUpdateReminder**); kicks
413
413
  Worker via ACP
@@ -447,7 +447,7 @@ Common issues:
447
447
  - **Worker not starting** — `sps worker ps`, then check `sps logs --err`. Often
448
448
  Claude API key missing or `claude-agent-acp` adapter not installed (`sps setup`
449
449
  reinstalls it).
450
- - **Cards stuck in Planning (v0.51.9+)** — Planning is manual staging. **The Console form creates cards here by default**; drag to Backlog to dispatch. Agent / `sps card add` defaults to Backlog and auto-runs (won't get stuck in Planning).
450
+ - **Cards stuck in Planning (v0.51.9+)** — Planning 是人工暂存。**Console 表单建卡默认到这里**,需手动拖到 Backlog 派发。Agent / `sps card add` 默认进 Backlog 自动跑(不会卡在 Planning)。
451
451
  - **ACK timeout on every card** — Claude cold-start is slow with many skills/memory
452
452
  files. Raise `WORKER_ACK_TIMEOUT_S` in conf (default 300s as of v0.50.24).
453
453
  - **Console shows stale data** — SSE may have dropped; reload page; if persistent,
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Coral AI
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.