@thincoder/core 0.10.13 → 0.11.2
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/CHANGELOG.md +74 -1
- package/advisor/convergence.mjs +34 -3
- package/advisor/loop.mjs +42 -10
- package/advisor/messages.mjs +46 -27
- package/advisor/notice.mjs +1 -1
- package/advisor/project-context.mjs +253 -14
- package/advisor/run.mjs +7 -4
- package/advisor.mjs +29 -43
- package/agent/batch-attribution.mjs +87 -0
- package/agent/batch-changed-surface.mjs +129 -0
- package/agent/completion.mjs +57 -4
- package/agent/digest-account.mjs +73 -46
- package/agent/dispatch-gates.mjs +6 -0
- package/agent/dispatch-run.mjs +1 -1
- package/agent/dispatch.mjs +35 -22
- package/agent/family-tools.mjs +36 -17
- package/agent/helpers.mjs +123 -95
- package/agent/offload.mjs +84 -0
- package/agent/post-turn.mjs +24 -10
- package/agent/record-results.mjs +19 -7
- package/agent/run-stages.mjs +127 -61
- package/agent/run-start.mjs +45 -8
- package/agent/setup-reminders.mjs +9 -2
- package/agent/setup.mjs +27 -22
- package/agent/spawn-child.mjs +38 -1
- package/agent/suspension.mjs +1 -1
- package/agent/timers.mjs +5 -3
- package/agent/turn-loop.mjs +60 -6
- package/agent/turn-projection.mjs +386 -0
- package/agent/turn-task-state.mjs +274 -0
- package/agent/turn-tool-process.mjs +168 -0
- package/agent/write-face.mjs +99 -0
- package/agent/write-gate-ledger.mjs +569 -0
- package/agent/write-gate.mjs +39 -13
- package/agent-tools/advisor-async.mjs +29 -169
- package/agent-tools/advisor-launch.mjs +178 -0
- package/agent-tools/advisor-settle.mjs +28 -1
- package/agent-tools/advisor.mjs +136 -31
- package/agent-tools/async-settle.mjs +2 -2
- package/agent-tools/audit-block.mjs +6 -6
- package/agent-tools/bash-async.mjs +8 -2
- package/agent-tools/batch-closeout.mjs +444 -0
- package/agent-tools/batch-gate.mjs +152 -138
- package/agent-tools/batch-ledger-bind.mjs +392 -0
- package/agent-tools/batch-ledger-link.mjs +73 -0
- package/agent-tools/batch-ledger-view.mjs +109 -0
- package/agent-tools/batch-lifecycle.mjs +245 -376
- package/agent-tools/batch-paths.mjs +73 -47
- package/agent-tools/batch-read.mjs +1 -1
- package/agent-tools/batch-record-write.mjs +417 -0
- package/agent-tools/batch-regions.mjs +215 -0
- package/agent-tools/batch-reopen.mjs +154 -0
- package/agent-tools/batch-segment-vocab.mjs +379 -0
- package/agent-tools/batch-skeleton.mjs +344 -196
- package/agent-tools/batch-supersede.mjs +232 -0
- package/agent-tools/batch-tier-gate.mjs +297 -0
- package/agent-tools/batch.mjs +189 -253
- package/agent-tools/consult.mjs +7 -4
- package/agent-tools/context.mjs +47 -17
- package/agent-tools/design-review-record.mjs +225 -0
- package/agent-tools/design-slots.mjs +24 -24
- package/agent-tools/design-token.mjs +318 -39
- package/agent-tools/doc-check.mjs +55 -29
- package/agent-tools/doc-graph.mjs +140 -0
- package/agent-tools/eng.mjs +10 -9
- package/agent-tools/escalate-async.mjs +5 -5
- package/agent-tools/manifest.mjs +34 -15
- package/agent-tools/read-history.mjs +115 -14
- package/agent-tools/review-facts.mjs +40 -15
- package/agent-tools/settings.mjs +23 -2
- package/agent-tools/spawn-gates.mjs +19 -22
- package/agent-tools/ssh-session.mjs +120 -111
- package/agent-tools/ssh-text.mjs +155 -0
- package/agent-tools/ssh-transfer.mjs +210 -0
- package/agent-tools/ssh-transport.mjs +183 -81
- package/agent-tools/subagent-actions-query.mjs +11 -7
- package/agent-tools/subagent-actions.mjs +1 -1
- package/agent-tools/subagent-async.mjs +11 -11
- package/agent-tools/subagent-brief.mjs +76 -0
- package/agent-tools/subagent-design-token.mjs +168 -0
- package/agent-tools/subagent-run.mjs +1 -1
- package/agent-tools/subagent-scheduler.mjs +45 -11
- package/agent-tools/subagent-spawn.mjs +143 -104
- package/agent-tools/subagent.mjs +26 -23
- package/agent-tools/taskbook-block.mjs +94 -0
- package/agent-tools/timer.mjs +12 -8
- package/agent-tools/verify.mjs +13 -4
- package/agent-tools.mjs +7 -3
- package/agent.mjs +20 -1
- package/attachments.mjs +3 -3
- package/browser/actions.mjs +9 -3
- package/browser/cdp.mjs +45 -17
- package/browser/launch.mjs +25 -43
- package/browser/pool.mjs +299 -0
- package/browser/queue.mjs +2 -0
- package/browser/session-state.mjs +450 -0
- package/browser/session.mjs +127 -151
- package/browser/snapshot.mjs +89 -0
- package/client-identity.mjs +22 -6
- package/config-defaults.mjs +2 -1
- package/config-migrate.mjs +40 -0
- package/config-normalize.mjs +28 -2
- package/config-presets.mjs +5 -3
- package/config-reload.mjs +59 -0
- package/config.mjs +62 -98
- package/context-degrade.mjs +38 -10
- package/context-echo.mjs +11 -0
- package/context.mjs +165 -68
- package/conventions.mjs +11 -9
- package/declaration.mjs +33 -7
- package/declared-repos.mjs +94 -0
- package/doc-check/doc-names.mjs +73 -0
- package/doc-check/doc-tokens.mjs +110 -0
- package/doc-check/existence.mjs +160 -0
- package/doc-check/index.mjs +312 -163
- package/doc-check/line-refs.mjs +38 -0
- package/doc-check/paragraph.mjs +220 -91
- package/doc-graph/anchors.mjs +474 -0
- package/doc-graph/doc-batch-face.mjs +59 -0
- package/doc-graph/doc-suffix.mjs +27 -0
- package/doc-graph/graph-tokens.mjs +160 -0
- package/doc-graph.mjs +778 -0
- package/explore-distill.mjs +12 -6
- package/i18n.mjs +2 -2
- package/index-discover.mjs +4 -1
- package/instance-inbox-watch.mjs +272 -0
- package/instance-inbox.mjs +218 -0
- package/instance-registry.mjs +179 -0
- package/knowledge/README.md +3 -0
- package/knowledge/prompt-resources.md +6 -0
- package/ledger-close-proof.mjs +95 -62
- package/ledger-close.mjs +188 -0
- package/ledger-cmd.mjs +76 -244
- package/ledger-consistency.mjs +113 -0
- package/ledger-db.mjs +70 -37
- package/ledger-executors.mjs +1 -1
- package/ledger-migrate.mjs +4 -4
- package/ledger-read.mjs +10 -8
- package/ledger-surface.mjs +1 -1
- package/ledger-tools.mjs +83 -24
- package/ledger-variant-notice.mjs +1 -1
- package/ledger-write-ops.mjs +462 -0
- package/ledger.mjs +2 -2
- package/manifest-discovery.mjs +5 -3
- package/manifest-schema.mjs +28 -2
- package/memory/memory-tool.mjs +5 -2
- package/memory/schema.mjs +6 -27
- package/package.json +3 -1
- package/path-resolve.mjs +498 -0
- package/permission.mjs +4 -0
- package/prompt-files.mjs +91 -1
- package/prompt-overlays.mjs +14 -6
- package/prompts/advisor-design.md +66 -22
- package/prompts/advisor-round1.md +37 -3
- package/prompts/advisor-round2.md +44 -10
- package/prompts/advisor-round3.md +43 -9
- package/prompts/common.md +15 -375
- package/prompts/consult-base.md +6 -1
- package/prompts/discipline-engineering.md +251 -95
- package/prompts/discipline-normal.md +4 -250
- package/prompts/knowledge/business-gates.md +22 -0
- package/prompts/knowledge/decision-quality.md +23 -0
- package/prompts/knowledge/doc-lookup.md +35 -0
- package/prompts/knowledge/document-writing.md +51 -0
- package/prompts/knowledge/documentation-evaluation.md +56 -0
- package/prompts/knowledge/evidence-discipline.md +57 -0
- package/prompts/knowledge/normal-coding-workflow.md +104 -0
- package/prompts/knowledge/normal-delivery-collaboration.md +108 -0
- package/prompts/knowledge/normal-work-management.md +57 -0
- package/prompts/knowledge/product-security.md +23 -0
- package/prompts/knowledge/project-records.md +62 -0
- package/prompts/knowledge/tool-advisor.md +29 -0
- package/prompts/knowledge/tool-apply-patch.md +18 -0
- package/prompts/knowledge/tool-bash.md +39 -0
- package/prompts/knowledge/tool-batch-eng-coder.md +12 -0
- package/prompts/knowledge/tool-batch-eng-designer.md +12 -0
- package/prompts/knowledge/tool-batch-review.md +12 -0
- package/prompts/knowledge/tool-batch.md +80 -0
- package/prompts/knowledge/tool-browser.md +57 -0
- package/prompts/knowledge/tool-code-search.md +4 -0
- package/prompts/knowledge/tool-consult-start.md +12 -0
- package/prompts/knowledge/tool-consult-stop.md +6 -0
- package/prompts/knowledge/tool-context.md +6 -0
- package/prompts/knowledge/tool-delete.md +17 -0
- package/prompts/knowledge/tool-doc-check.md +70 -0
- package/prompts/knowledge/tool-doc-graph-read.md +20 -0
- package/prompts/knowledge/tool-doc-graph.md +49 -0
- package/prompts/knowledge/tool-doc-search.md +6 -0
- package/prompts/knowledge/tool-edit.md +38 -0
- package/prompts/knowledge/tool-eng.md +2 -0
- package/prompts/knowledge/tool-execute.md +16 -0
- package/prompts/knowledge/tool-fetch.md +12 -0
- package/prompts/knowledge/tool-file-ops.md +16 -0
- package/prompts/knowledge/tool-get-current-time.md +7 -0
- package/prompts/knowledge/tool-git-read.md +19 -0
- package/prompts/knowledge/tool-git.md +29 -0
- package/prompts/knowledge/tool-glob.md +15 -0
- package/prompts/knowledge/tool-goal.md +8 -0
- package/prompts/knowledge/tool-grep.md +18 -0
- package/prompts/knowledge/tool-hashline-edit.md +14 -0
- package/prompts/knowledge/tool-insert-after.md +15 -0
- package/prompts/knowledge/tool-instance-list.md +6 -0
- package/prompts/knowledge/tool-instance-send.md +10 -0
- package/prompts/knowledge/tool-knowledge.md +18 -0
- package/prompts/knowledge/tool-ledger-read.md +35 -0
- package/prompts/knowledge/tool-ledger.md +42 -0
- package/prompts/knowledge/tool-lint.md +16 -0
- package/prompts/knowledge/tool-ls.md +13 -0
- package/prompts/knowledge/tool-lsp.md +11 -0
- package/prompts/knowledge/tool-main-history.md +2 -0
- package/prompts/knowledge/tool-manifest-read.md +14 -0
- package/prompts/knowledge/tool-manifest.md +31 -0
- package/prompts/knowledge/tool-memory-read.md +20 -0
- package/prompts/knowledge/tool-memory.md +15 -0
- package/prompts/knowledge/tool-notify-parent.md +12 -0
- package/prompts/knowledge/tool-operations.md +114 -0
- package/prompts/knowledge/tool-peer-instances.md +2 -0
- package/prompts/knowledge/tool-plan.md +6 -0
- package/prompts/knowledge/tool-process-read.md +13 -0
- package/prompts/knowledge/tool-process.md +15 -0
- package/prompts/knowledge/tool-question.md +16 -0
- package/prompts/knowledge/tool-read-history-batch.md +22 -0
- package/prompts/knowledge/tool-read-history.md +36 -0
- package/prompts/knowledge/tool-read-image.md +11 -0
- package/prompts/knowledge/tool-read.md +21 -0
- package/prompts/knowledge/tool-recent-changes.md +6 -0
- package/prompts/knowledge/tool-repo-outline.md +4 -0
- package/prompts/knowledge/tool-settings-read.md +12 -0
- package/prompts/knowledge/tool-settings.md +18 -0
- package/prompts/knowledge/tool-skill.md +6 -0
- package/prompts/knowledge/tool-ssh.md +52 -0
- package/prompts/knowledge/tool-subagent.md +59 -0
- package/prompts/knowledge/tool-task.md +12 -0
- package/prompts/knowledge/tool-team-ledger-read.md +11 -0
- package/prompts/knowledge/tool-team-ledger.md +11 -0
- package/prompts/knowledge/tool-timer.md +23 -0
- package/prompts/knowledge/tool-tree.md +14 -0
- package/prompts/knowledge/tool-verify.md +19 -0
- package/prompts/knowledge/tool-wait-for.md +25 -0
- package/prompts/knowledge/tool-websearch.md +19 -0
- package/prompts/knowledge/tool-write.md +9 -0
- package/prompts/knowledge/upstream-protocol.md +43 -0
- package/prompts/persona-eng-coder.md +29 -3
- package/prompts/persona-eng-designer.md +131 -159
- package/prompts/persona-engineering.md +202 -131
- package/prompts/persona-explore.md +1 -1
- package/prompts/persona-plan.md +6 -1
- package/prompts/persona-tester.md +55 -0
- package/prompts/subagent-base.md +2 -0
- package/provider/anthropic.mjs +6 -4
- package/provider/core.mjs +5 -4
- package/provider/errors.mjs +29 -4
- package/provider/google.mjs +39 -12
- package/provider/rate.mjs +11 -3
- package/provider/responses.mjs +3 -1
- package/provider/sse.mjs +15 -4
- package/provider-flows.mjs +2 -2
- package/session-identity.mjs +21 -0
- package/session-index-build.mjs +1 -1
- package/session-index-pass.mjs +1 -1
- package/session-index-query.mjs +1 -1
- package/session-index.mjs +1 -1
- package/session-lifecycle.mjs +79 -19
- package/session-slot-write.mjs +37 -5
- package/session-slots.mjs +9 -14
- package/session.mjs +29 -8
- package/skip-dirs.mjs +48 -0
- package/team-ledger.mjs +17 -13
- package/text-budget.mjs +4 -0
- package/token-ttl.mjs +73 -4
- package/token-window.mjs +244 -34
- package/tool-docs/advisor.md +2 -27
- package/tool-docs/apply_patch.md +1 -13
- package/tool-docs/bash.md +2 -37
- package/tool-docs/batch-eng-coder.md +3 -0
- package/tool-docs/batch-eng-designer.md +3 -0
- package/tool-docs/batch-review.md +3 -0
- package/tool-docs/batch.md +3 -1
- package/tool-docs/browser.md +2 -47
- package/tool-docs/code_search.md +3 -1
- package/tool-docs/consult_start.md +2 -4
- package/tool-docs/consult_stop.md +2 -2
- package/tool-docs/context.md +1 -5
- package/tool-docs/delete.md +2 -14
- package/tool-docs/doc_check.md +2 -72
- package/tool-docs/doc_graph-read.md +3 -0
- package/tool-docs/doc_graph.md +3 -0
- package/tool-docs/doc_search.md +3 -1
- package/tool-docs/edit.md +2 -18
- package/tool-docs/eng.md +3 -1
- package/tool-docs/execute.md +2 -12
- package/tool-docs/fetch.md +2 -12
- package/tool-docs/file_ops.md +2 -16
- package/tool-docs/get_current_time.md +1 -6
- package/tool-docs/git-read.md +3 -0
- package/tool-docs/git.md +2 -27
- package/tool-docs/glob.md +2 -10
- package/tool-docs/goal.md +2 -5
- package/tool-docs/grep.md +2 -18
- package/tool-docs/hashline_edit.md +2 -13
- package/tool-docs/insert_after.md +2 -14
- package/tool-docs/instance_list.md +3 -0
- package/tool-docs/instance_send.md +3 -0
- package/tool-docs/knowledge.md +3 -0
- package/tool-docs/ledger-read.md +3 -0
- package/tool-docs/ledger.md +3 -8
- package/tool-docs/lint.md +2 -9
- package/tool-docs/ls.md +2 -11
- package/tool-docs/lsp.md +2 -9
- package/tool-docs/main_history.md +3 -1
- package/tool-docs/manifest-read.md +2 -7
- package/tool-docs/manifest.md +2 -28
- package/tool-docs/memory-read.md +3 -0
- package/tool-docs/memory.md +3 -11
- package/tool-docs/notify_parent.md +2 -13
- package/tool-docs/peer_instances.md +3 -1
- package/tool-docs/plan.md +2 -4
- package/tool-docs/process-read.md +3 -0
- package/tool-docs/process.md +2 -13
- package/tool-docs/question.md +3 -17
- package/tool-docs/read.md +2 -19
- package/tool-docs/read_history-batch.md +3 -0
- package/tool-docs/read_history.md +2 -6
- package/tool-docs/read_image.md +2 -7
- package/tool-docs/recent_changes.md +3 -1
- package/tool-docs/repo_outline.md +3 -1
- package/tool-docs/settings-read.md +3 -0
- package/tool-docs/settings.md +2 -5
- package/tool-docs/skill.md +3 -5
- package/tool-docs/ssh.md +2 -50
- package/tool-docs/subagent.md +2 -63
- package/tool-docs/task.md +2 -6
- package/tool-docs/team_ledger-read.md +3 -0
- package/tool-docs/team_ledger.md +3 -9
- package/tool-docs/timer.md +3 -13
- package/tool-docs/tree.md +2 -13
- package/tool-docs/verify.md +3 -1
- package/tool-docs/wait_for.md +2 -32
- package/tool-docs/websearch.md +2 -17
- package/tool-docs/write.md +2 -10
- package/tools/bash.mjs +12 -2
- package/tools/browser.mjs +52 -7
- package/tools/doc-write-gate.mjs +73 -0
- package/tools/edit-batch.mjs +176 -91
- package/tools/edit-diff.mjs +129 -45
- package/tools/edit-receipt.mjs +39 -0
- package/tools/execute.mjs +11 -5
- package/tools/file.mjs +32 -34
- package/tools/git.mjs +43 -2
- package/tools/index.mjs +6 -0
- package/tools/knowledge.mjs +143 -0
- package/tools/linter.mjs +3 -3
- package/tools/ops.mjs +4 -1
- package/tools/patch.mjs +127 -38
- package/tools/process-doc-mark.mjs +139 -0
- package/tools/search.mjs +15 -6
- package/tools/shared.mjs +31 -7
- package/tools/ssh.mjs +48 -7
- package/tools/tree.mjs +4 -1
- package/tools/write-gate-params.mjs +31 -0
- package/tools/write-path.mjs +79 -6
- package/traces/trace-store.mjs +4 -3
- package/window-policy.mjs +203 -0
- package/agent/light-round.mjs +0 -63
- package/agent/unbooked-pen.mjs +0 -62
- package/doc-check/anchors.mjs +0 -135
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
aliases: 读文档, 读文件, 查看文件
|
|
2
|
+
Use `offset` / `limit` to page through a large file.
|
|
3
|
+
|
|
4
|
+
**Route to read instead of bash:** `cat file` / `type file` / `node -e "fs.readFileSync(...)"` → read. Reading a file is a read - never shell out for it.
|
|
5
|
+
|
|
6
|
+
**Routing:**
|
|
7
|
+
- Don't know which file? → `repo_outline` / `code_search` / `glob` first.
|
|
8
|
+
- Know the symbol but not the location? → `code_search` or `lsp definition`.
|
|
9
|
+
- Know the file but not the lines? → `grep` to find line numbers, then read that range with `offset` / `limit`.
|
|
10
|
+
- Reading an image? → `read_image` instead.
|
|
11
|
+
|
|
12
|
+
Parameters:
|
|
13
|
+
- `path` (required): file path, relative to cwd or absolute (alias: `filePath`).
|
|
14
|
+
- `offset`: 1-based line number to start reading from.
|
|
15
|
+
- `limit`: max lines to return (default 2000). A window over a file longer than that returns the head, a `…(truncated: K lines in middle, use offset to continue)` marker, and the file's real tail lines - the file end is never hidden.
|
|
16
|
+
- `hashes`: include a content hash per line (`hashes: true`), for `hashline_edit`. Set it on the read you take before using `hashline_edit`.
|
|
17
|
+
|
|
18
|
+
Notes:
|
|
19
|
+
- Always prefer this over `cat` or shell-based reading - it caps output and avoids large dumps.
|
|
20
|
+
- Use `offset` for pagination when the file is large.
|
|
21
|
+
- When you plan to edit the file, take `hashes: true` in the same read: hash-based editing is immune to whitespace and encoding mismatches.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
aliases: 最近改动, 改过哪些档
|
|
2
|
+
- Tracked tools: write / edit / insert_after / apply_patch / delete / hashline_edit.
|
|
3
|
+
- Use it when you need to remember which files you have already touched; during long multi-file tasks it is easy to lose track.
|
|
4
|
+
- Scoped to this run only, unlike `git status`, which shows all uncommitted changes.
|
|
5
|
+
|
|
6
|
+
For session-level history (what was said in a session), use read_history.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
aliases: 配置, 只读配置
|
|
2
|
+
Nothing here writes: no key is written or cleared.
|
|
3
|
+
|
|
4
|
+
Two actions: `list` (all keys and values, flattened) and `get <key>` — dot paths into config.json, at any nesting.
|
|
5
|
+
|
|
6
|
+
SENSITIVE keys are NEVER echoed in plaintext: list / get replies show `••••(masked)`.
|
|
7
|
+
|
|
8
|
+
A key counts as sensitive when a path segment looks like a credential (`apiKey`, `token`, `secret`, `password`, `authorization`, `cookie`, `credential` …), or when it sits under a `headers` / `env` segment.
|
|
9
|
+
|
|
10
|
+
Use it to answer "how is this session configured" with a reading instead of a guess — which provider and model, which limits, which switches are on.
|
|
11
|
+
|
|
12
|
+
Changing configuration belongs to the main agent. It is a side effect that persists to config.json and hot-applies to the live session, so it is not part of this tool face — calling it directly is refused before anything is written.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
aliases: 配置, 设置, 改配置
|
|
2
|
+
Actions: `list` (all keys and values, flattened) | `get <key>` | `set <key> <value>` - dot paths into config.json, at any nesting.
|
|
3
|
+
|
|
4
|
+
`set` persists to disk (only the key you set is written, defaults are never baked in) and takes effect in the running session immediately - keys that apply at a turn boundary apply from the next turn - and the value survives restarts.
|
|
5
|
+
|
|
6
|
+
`list` / `get` are read-only (fine in planMode, no approval); `set` is a side effect and goes through the approval gate. The `/config` TUI command is the human equivalent.
|
|
7
|
+
|
|
8
|
+
Known keys are type-checked, so a value the app would silently drop is refused:
|
|
9
|
+
|
|
10
|
+
- scalar keys against their built-in default (`agent.maxTurns` a number, `traces.enabled` a boolean);
|
|
11
|
+
- `agent.mode` accepts exactly `tiny`, `normal` or `engineering` and sets the new-session default without changing the current session; `agent.engineering` is a derived read-only view and cannot be set directly or through an agent object;
|
|
12
|
+
- keys whose default is null against their real consumption shape (`defaultModel` in `"provider:model"` form, `agent.subagentModel` / `shell` a non-empty string, `memory.team` an object carrying a repo).
|
|
13
|
+
|
|
14
|
+
`null` clears a key: the entry is removed from config.json and the built-in default applies. String-typed keys refuse `null` - there is no "unset" state to fall back to. Unknown keys under a known section are stored as given.
|
|
15
|
+
|
|
16
|
+
SENSITIVE keys are NEVER echoed in plaintext: list / get / set replies show `••••(masked)`. Setting a sensitive key is allowed and stored, but it is never echoed back.
|
|
17
|
+
|
|
18
|
+
A key counts as sensitive when a path segment looks like a credential (`apiKey`, `token`, `secret`, `password`, `authorization`, `cookie`, `credential` …), or when it sits under a `headers` / `env` segment.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
aliases: 技能, 能力
|
|
2
|
+
Skills contain reusable instructions, workflows, or reference material.
|
|
3
|
+
Use this when the user references a skill by name, or when a task matches a known skill's description.
|
|
4
|
+
|
|
5
|
+
Call with action='list' to see available skills; call with action='load' and name=<skill> to activate one.
|
|
6
|
+
Returns the skill list ('list'), the load confirmation ('load' — instructions arrive in the next message), or Error: ... with the available skills.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
aliases: 远程, 网络设备, 登录
|
|
2
|
+
A session survives across tool calls. Password hosts get a credential window — the value never appears in tool args or results.
|
|
3
|
+
|
|
4
|
+
**Route to ssh instead of bash:**
|
|
5
|
+
- a one-shot non-interactive command over ssh → `bash` with `ssh host <command>` (cheaper, no session)
|
|
6
|
+
- an interactive shell that must survive several calls (network device CLI, interactive prompts) → ssh
|
|
7
|
+
- one file to or from a host you already have a session on → `put` / `get` (they reuse the session's host and credential chain, which `bash scp` cannot reach)
|
|
8
|
+
- a whole directory tree, a resumable transfer or a progress bar → not this tool (single file only)
|
|
9
|
+
- port forwarding (`ssh -L` / `-R`) → `bash`
|
|
10
|
+
|
|
11
|
+
Parameters:
|
|
12
|
+
- action (required): connect | send | read | secret_input | close | list | credentials | forget | put | get
|
|
13
|
+
- host: connect / forget — target host (IP or name)
|
|
14
|
+
- user: connect — login user (optional: your local ssh config decides, else the user recorded for this host locally)
|
|
15
|
+
- port: connect / forget — TCP port (optional, default 22)
|
|
16
|
+
- label: connect — short human label for this session (optional); secret_input — label for the value being sent
|
|
17
|
+
- promptPattern: connect — regex that marks the shell prompt as ready (optional). Give it when the device's prompt does not look like a shell prompt — otherwise each command waits out the full timeout. Left out, a line ending in `#` `>` `$` `%` counts as the prompt.
|
|
18
|
+
- identityFile: connect — private-key path to offer as `-i` (`~` expands); remembered for this host and reused when omitted (optional)
|
|
19
|
+
- id: send / read / secret_input / close / put / get — session id from connect (`ssh#N`)
|
|
20
|
+
- data: send — text to type into the session (a trailing newline is passed as-is; otherwise Enter is sent as `\r`)
|
|
21
|
+
- settle: send — wait for the ready verdict before returning (default true); false returns right after the bytes are written
|
|
22
|
+
- timeoutMs: send / read — wait budget override (default 60000; the wait ends as soon as the device is waiting for input — a prompt, `--More--`, a y/n or password prompt); put / get — transfer budget override (default 600000; on expiry the process tree is killed)
|
|
23
|
+
- maxChars: read — return-window override (default 8000): head 60% + a note + tail 40%, and the omitted middle stays in the session for the next read
|
|
24
|
+
- localPath: put / get — local file path (`~` expands; a file, never a directory)
|
|
25
|
+
- remotePath: put / get — path of that file on the session host (e.g. `/flash/img.bin`)
|
|
26
|
+
- overwrite: get — replace an existing local file (default false: an existing target is refused, never overwritten silently). put follows scp's own semantics: a same-named remote file is replaced
|
|
27
|
+
- protocol: put / get — `scp` (classic SCP protocol, the default, what network devices speak) | `sftp` (for hosts that only offer that). There is no automatic fallback between them
|
|
28
|
+
|
|
29
|
+
Output:
|
|
30
|
+
- connect / send / read / secret_input / close / list / put / get results start with the session status line: `[ssh (ssh#3) 10.0.0.5 — ready · idle 3s]`
|
|
31
|
+
- connect returns the first screen; send returns the round's output plus the ready verdict (answer prompt such as `--More--` | prompt matched | timeout); read returns what arrived since the last read
|
|
32
|
+
- put / get return the status line, then exactly one more line — `put <localPath> → <remotePath> · N bytes · exit 0` (and the mirrored form for get). The file's content never enters the context: the bytes travel over the disk only, never through a result, a log or a message. On failure you get an `Error:` line plus the tail of scp's stderr (≤ 600 characters), with the exit code named
|
|
33
|
+
|
|
34
|
+
Notes:
|
|
35
|
+
- Key-first: keys, your ssh config and ssh-agent are always tried before any saved credential — a connect succeeds without a window when a key works. To make a password host prompt-free, install a key once: `ssh-keygen -t ed25519` (if you have none), then `ssh-copy-id user@host`, then reconnect.
|
|
36
|
+
- Credential discipline: the password is asked for in a window and reaches ssh only through its child-process environment — it is never echoed in a result and never stored in plaintext. Any captured output containing that value (or a value given to secret_input) is scrubbed from the returned text and from the session log.
|
|
37
|
+
- Saving a credential is opt-in and belongs to `connect`: the window carries a `save` checkbox (off by default). When checked and authentication succeeds, the password is stored encrypted under your OS user account in a per-user file outside the repository, and reused silently — the next connect skips the window, and only after key authentication fails. Another process running as the same logged-in user could decrypt it. Saving is Windows-only for now; elsewhere the checkbox does not appear.
|
|
38
|
+
- Fail-soft: an unreadable or undecryptable entry, a damaged store or a missing backend falls back to the credential window (the connection is not broken, and undecryptable entries are kept). If the server rejects a saved credential it is deleted and the window is shown. A failed save never affects the connection.
|
|
39
|
+
- secret_input is for device prompts (enable password, sudo, key passphrases): it opens the same kind of window, writes the value plus Enter, and returns only the output — the value is never shown.
|
|
40
|
+
- Sessions: at most 4 live at once (a connect beyond the cap is refused — close one first). A session idle for 600s with no send/read is closed automatically. `close` ends it. Ctrl+I (interrupt) does not kill sessions; a user Stop does.
|
|
41
|
+
- Output is a cleaned text stream: terminal escape sequences and CRLF noise are stripped. Each return is a window (8000 chars: head + a note + tail); the omitted middle stays in the session, so another read collects it and a large configuration comes back in full.
|
|
42
|
+
- Not for full-screen terminal UIs (vim/top/screen): output is read as a text stream — paged output such as `--More--` is shown as-is, not driven for you.
|
|
43
|
+
- Transfers are binary safe and single-file: no recursive directory sync, no resume, no progress bar, and the parameters take files only (a directory is not a valid `localPath` / `remotePath`).
|
|
44
|
+
- `get` never overwrites silently and never creates directories: an existing local file is refused unless you pass `overwrite:true`, and the local parent directory must already exist.
|
|
45
|
+
- `put` on a password host runs the same credential decision as connect: keys first, then the saved credential (no window), then the credential window. That transfer window asks for user / password only and carries no save checkbox; a session built by typing a password without saving it has no password kept, so the next transfer asks again.
|
|
46
|
+
- If a transfer is killed at `timeoutMs`, a `get` removes the partial local file only when that transfer wrote it (an existing file scp never touched is kept, and the receipt says so); after a `put` the remote host may keep a partial file — resend the whole file with `overwrite:true`, or delete it on the host.
|
|
47
|
+
- Ready means the device is waiting for you, not that output stopped: a prompt or an answer prompt (`--More--`, y/n, password) ends the wait, and a slow operation that goes quiet keeps waiting instead of returning half of its output.
|
|
48
|
+
- Host keys follow your local ssh config — the tool never rewrites known_hosts. A changed or untrusted key stops the connect with a readable error before any credential is asked for.
|
|
49
|
+
- read / list / credentials are read-only (no approval prompt); connect / send / secret_input / close / forget / put / get pass the approval gate like any side-effecting tool, and secret_input shows a masked placeholder — the value itself is never in the approval text. A transfer's approval text names both ends (`localPath` → `remotePath`) and never the file's content.
|
|
50
|
+
- credentials lists saved entries (host / user / saved / last used — never a value); forget deletes the entry for a host (and optional port) and is idempotent — the next connect asks in the window again.
|
|
51
|
+
|
|
52
|
+
Availability: where the end has no UI to collect a credential (headless / ACP), connecting to a password host fails with a readable error — use keys or an ssh-agent there.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
aliases: 子代理, 派单, 派活
|
|
2
|
+
ONE tool, NINE actions — pick by what you need:
|
|
3
|
+
|
|
4
|
+
- action:'spawn' (DEFAULT): run a sub-agent in its own isolated context — its reads, searches and tool calls never reach your history; only the final report comes back. Spawn MULTIPLE subagents in the SAME response for parallel work — they run concurrently.
|
|
5
|
+
- action:'status': NON-BLOCKING progress query — returns immediately, consumes nothing, never fetches. Pass the spawn id for one child (role, state: running|queued|done, model, elapsed, turn, position, plus a touched-files summary — first 5 plus a count) or omit it for a pool overview — see what a running child has changed BEFORE cancelling it. Background advisor reviews share this surface (pass the review id).
|
|
6
|
+
- action:'observe': SEE what a running async subagent is DOING right now (progress vs stuck) — pass the id; returns state, turn, the tool(s) executing right now, and the last N one-line turn summaries, newest first (`recent`, required, 1..20). Readonly; running/queued/done all answer — queued returns a placeholder, done gives the activity summary only, NOT the report.
|
|
7
|
+
- action:'send': STEER a running async subagent mid-flight — id + message. The child consumes it at its next turn boundary as an ORDINARY user instruction (non-interrupting; guidance, not a deviation waiver); returns {id, status:'delivered', queued}. Only RUNNING async children are targetable — sync/queued/settled/unknown error clearly; if the child settles first, its report carries an 'undelivered' note.
|
|
8
|
+
- action:'escalate': hand an implementation task to a STRONGER model from your consult models; it gets WRITE access and does the work itself, then returns a post-op report (what changed, why, verification). Not available in engineering mode (implementation goes through eng-coder). Async at depth 0: pass `async: true` — ack {id, role:'escalate', status:'running'} returns immediately; the report arrives automatically.
|
|
9
|
+
- action:'cancel': STOP ONE background subagent — the id from the spawn return is REQUIRED (a blanket cancel is unsupported; Ctrl+C stops everything). Running aborts immediately ({id, status:'cancelled'}); queued is removed ({id, status:'cancelled', was:'queued'}) and later positions shift. Other children and the session keep running. Cancel is a last resort: a running child's in-flight work dies with it, and partial changes stay unmerged and unaudited. Background advisor reviews cancel the same way (pass the review id).
|
|
10
|
+
- action:'consume-design' (engineering mode, parent side): chain-terminal token consumption — after the delivery is verified and the chain closes out, consume this design's token slot. Selectors — pass exactly ONE: designId (a single slot; optional for a single-design session), designIds (an explicit non-empty list), expired:true (every expired slot), or olderThanDays:N (every slot older than N days). A consumed slot rejects further spawns for the same designId — new work, deviation fixes included, needs a fresh design review and token. Idempotent (unknown/already-consumed = a no-op notice); batch calls report per-slot lines plus a `consumed N` count line. Do NOT call while the chain is still open — fix rounds reuse the same slot.
|
|
11
|
+
- action:'design-slots' (engineering mode, parent side): READ-ONLY inventory of this session's approved design token slots — one line per slot (designId, live|expired, ageDays, expiresAt, batch, designToken), oldest first, ending with a total/live/expired count line. Nothing is written. Every row carries its designToken value, expired ones included (a malformed record shows designToken=—). Pass designId to filter to a single slot (trimmed exact match; unknown = refused with the held id list; empty string = no filter). Take designId + designToken verbatim onto the eng-coder spawn — the gate checks exact equality.
|
|
12
|
+
- action:'panel': DIAGNOSE and fix the subagent panel (the collapsible blocks the user sees; headless / VS Code degrade to a 'no panel' pool view). view (default): the live blocks (key, role, status: running|done|awaitingDigest) exactly as the user sees them. freeze: pass a digested-stuck block key (e.g. 'eng-coder#9') to reclaim it into the conversation — passes ONLY for awaitingDigest blocks with no live pool entry and no pending report (refused otherwise).
|
|
13
|
+
|
|
14
|
+
Available roles (exposed per mode; the role is REQUIRED for action:'spawn' — a missing or misspelled role is refused):
|
|
15
|
+
- explore — read-only search & analysis; its git access is read-only (log / show / diff / status / blame …) and no git working-tree context is injected — evidence comes from reads and the task book; its report must list what it searched and what it did NOT find. Say quick / medium / thorough (default medium).
|
|
16
|
+
- plan — read-only planning; NEVER edits; returns a step-by-step plan.
|
|
17
|
+
- coder — full implementation; the parent's read/write/execute toolset minus the interactive main-session tools (`question` · `ssh` — a child has no user to ask and no credential window / session to hand back), plus verify and advisor self-review. Its report carries a delivery table, one row per requirement (Done / Simplified / Not done — no deferred column). Normal mode: may optionally carry `batchDoc`, which binds this spawn's §5 record-write channel (unbound ⇒ the main agent records §5 on its behalf); when provided the path must resolve to a readable file.
|
|
18
|
+
- eng-coder — engineering mode only (replaces coder): the same toolset plus the design-driven methodology overlay; its delivery protocol (implementation → audit → self-fix → advisor re-review → converged delivery) runs fully inside the child. REQUIRES a valid designToken from a passed advisor(type='design') review — pass the exact value from that review, or copy it verbatim from the action:'design-slots' row (the text after designToken=): missing or mismatched = the spawn is refused, and an expired token is refused with expired named. Its reply also echoes a designId — pass it (required to pick between concurrent designs, optional for one) and echo it back in the delivery report. REQUIRES a batchDoc — the batch record path, the task book this spawn implements (refused when absent, when it does not resolve to a readable file, or when that record already has an in-flight spawn).
|
|
19
|
+
- eng-designer — engineering mode only: the SOLE author of the design documents and of the batch record's design section (requirement docs stay with the main agent). Writes no implementation code, does not edit prompts, does not fire reviews, needs NO designToken. Surveys on its own; may only spawn read-only explore children (sync, ≤6 per batch). REQUIRES a batchDoc (same gate as eng-coder).
|
|
20
|
+
- tester — BOTH modes: the readings seat. It runs the verification commands the task book puts in `goal` and hands the readings back as they stand — no verdict, no fix, no document of any kind. Its tool face is the read-only tools plus `execute` / `bash` (dependency installs, compiles and fixtures included), minus `verify`. Run only, never change is a role contract, not a sandbox — `bash` can write, so a tester that edits anything is a defect.
|
|
21
|
+
|
|
22
|
+
Task book (non-engineering roles: explore / plan / coder / tester): four core structured parameters plus `scope`.
|
|
23
|
+
- goal — the goal & why.
|
|
24
|
+
- knownFacts — the facts you already verified.
|
|
25
|
+
- acceptance — machine-verifiable criteria.
|
|
26
|
+
- reportFormat — the delivery-report format.
|
|
27
|
+
- scope — scope & forbidden scope: what to read and what not to touch.
|
|
28
|
+
|
|
29
|
+
All five are required: a missing, blank or non-string value is refused with the parameter named. A free-text task is an optional supplement, never the whole brief.
|
|
30
|
+
|
|
31
|
+
Engineering roles (eng-coder / eng-designer) take their task book from the batch record, and the part that is their task book differs by seat — no other task text is passed to either:
|
|
32
|
+
- batchDoc — the record path. An eng-coder's task book is that record's §2, written and owned by eng-designer; an eng-designer reads the whole record — §1's rulings bind it, and §2 is its own pen.
|
|
33
|
+
- round — initial | fix.
|
|
34
|
+
- files / dependsOn — for scheduling.
|
|
35
|
+
- An eng-coder spawn also carries designToken (the write credential) and designId when several designs are open: missing or mismatched = the spawn is refused.
|
|
36
|
+
|
|
37
|
+
A record carries one concurrent spawn at a time: a second spawn on a record still in flight is refused, naming the occupant — wait for it to settle, or cancel it. Sequential hand-offs (design → implementation → fix round) pass, because the previous spawn has settled first.
|
|
38
|
+
|
|
39
|
+
Pass one parameter per field — contents only (the runtime adds the labels):
|
|
40
|
+
subagent(role="eng-coder", round="initial", batchDoc="<batch record>", designToken="…", files=[…], async=true)
|
|
41
|
+
subagent(role="explore", goal="…", knownFacts="…", scope="…", acceptance="…", reportFormat="…", async=true)
|
|
42
|
+
|
|
43
|
+
Mode filtering: normal mode exposes explore/plan/coder/tester (eng-coder and eng-designer are refused); engineering mode exposes explore/eng-designer/eng-coder/tester (plan and coder are refused — plan is a normal-mode role, coder is replaced by eng-coder; tester is dispatchable in both).
|
|
44
|
+
|
|
45
|
+
Async spawn:
|
|
46
|
+
- Pass `async: true` — the spawn returns {id, status:"running"} immediately and the report arrives automatically; if your next step needs it, end the turn and let the digest deliver it — do not poll. Omitting `async` is refused, so pass it explicitly.
|
|
47
|
+
- Inside subagents (depth>0) spawns are always synchronous — pass `async: false` there (an explicit `async: true` is refused).
|
|
48
|
+
|
|
49
|
+
Pool: async spawns are pooled per role domain — 4 concurrent eng-coders plus 4 concurrent other-role spawns by default (agent.poolLimits overrides both); a full domain queues further spawns with a position while the other keeps starting.
|
|
50
|
+
|
|
51
|
+
Task scheduling: declare files (the file paths this task will modify) and dependsOn (ids from prior async returns whose outcome this task needs) to let the scheduler order your spawns.
|
|
52
|
+
- Overlapping-file tasks serialize and dependents start in order: a conflicting or dependent spawn queues (position/reason) and auto-starts when the conflict clears or the dependency settles (cancel to drop).
|
|
53
|
+
- A cancelled/failed dependency leaves it queued marked "dependency cancelled" until you decide. Unknown ids error; a consumed id counts as satisfied.
|
|
54
|
+
- Omit both for a plain immediate spawn.
|
|
55
|
+
|
|
56
|
+
Writing the prompt — the child starts with zero context, so brief it like a colleague who just walked in: goal, what you already know, the specifics.
|
|
57
|
+
- Put exact paths and commands in — do not make it search for what you already know.
|
|
58
|
+
- Do not delegate understanding: resolve the paths and the symbols the task hinges on first.
|
|
59
|
+
- Once it runs, leave that scope to it — don't redo its searches in parallel or finish manually midway.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
aliases: 任务清单, 待办列表
|
|
2
|
+
Each call replaces the entire list.
|
|
3
|
+
|
|
4
|
+
Statuses: pending | in_progress | done - synonyms (completed/finished/complete, todo/open/waiting, active/running/working, …) are accepted and normalized with a warning.
|
|
5
|
+
|
|
6
|
+
- Keep exactly one item in_progress at a time.
|
|
7
|
+
- Mark items done as you complete them; never mark done while tests fail or the work is partial.
|
|
8
|
+
- title is required and must be non-empty: an item whose title is empty is dropped, and the receipt names it.
|
|
9
|
+
|
|
10
|
+
Engineering mode: `task` is unavailable - the batch record and the ledger are the tracking authority there. For cross-session / project-level tracking in any mode, use `/ledger`.
|
|
11
|
+
|
|
12
|
+
Returns a one-line receipt - `Task list updated: N/M done` - plus a warning naming every status or title that was normalized or dropped.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
aliases: 团队台账, 只读, 团队待办
|
|
2
|
+
It is a separate book from the local `ledger` — two independent accounts, no sync between them, and this one keeps no offline copy.
|
|
3
|
+
|
|
4
|
+
The actions this tool face carries: `query` (filtered entries) and `count` (how many). Both are read-only.
|
|
5
|
+
|
|
6
|
+
- The repo tag is derived for you from the current project root's git origin; with no git repo, or no `remote.origin.url`, the call fails explicitly and sends no request. You cannot pick or change the repo.
|
|
7
|
+
- `query`: `scope` = `"repo"` (default — the current repo) or `"team"` (every repo in the team); filters `status` (one of the six states `待讨论` / `待设计` / `在途` / `待核销` / `已核销` / `已废弃`) and `owner` (exact username). Each row carries `aged` when it sits in an unsettled state and is older than 30 days.
|
|
8
|
+
- `count`: the same filters as `query`, and returns the total.
|
|
9
|
+
- Login gate: not logged in ⇒ the call fails with a message saying so, and sends no request; 401 (token expired) ⇒ login expired, log in again; server unreachable ⇒ reported as such, with no offline fallback: a retry never serves an old value.
|
|
10
|
+
|
|
11
|
+
Use it to see what the rest of the team already has queued on this repo before proposing the same work again. Adding, moving or settling an entry belongs to the main agent — those actions are not part of this tool face, and calling one directly is refused before any request goes out.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
aliases: 团队台账, 团队待办
|
|
2
|
+
It is a separate book from the local `ledger` - two independent accounts, no sync between them, and this one keeps no offline copy. `action` = query / count / add / update / close.
|
|
3
|
+
|
|
4
|
+
- `query` / `count` are read-only and open to every role; `add` / `update` / `close` write and reach the main agent only (a subagent gets the read-only two).
|
|
5
|
+
- The repo tag is derived for you from the current project root's git origin; with no git repo, or no `remote.origin.url`, the call fails explicitly and sends no request. You cannot pick or change the repo.
|
|
6
|
+
- `query`: `scope` = `"repo"` (default - the current repo) / `"team"` (every repo in the team); filters `status` (one of the six states `待讨论` / `待设计` / `在途` / `待核销` / `已核销` / `已废弃`) and `owner` (exact username). Each row carries `aged` when it sits in an unsettled state and is older than 30 days.
|
|
7
|
+
- `count`: the same filters as `query`, and returns the total.
|
|
8
|
+
- `add`: `title` required (non-blank, ≤200), `detail` (≤4000), `owner` (default = yourself). A new entry always lands in `待讨论`.
|
|
9
|
+
- `update`: `id` required; at least one of `title` / `detail` / `owner` / `status`. `status` moves along the same six-state table as the local ledger - `待讨论→待设计` / `待讨论→在途` / `待设计→在途` / `在途→待核销` / `待核销→已核销` / `待核销→在途` / any state but `已废弃` → `已废弃` (`已废弃` has no way out); any edge off that list is refused.
|
|
10
|
+
- `close`: `id` + `status` (`已核销` / `已废弃`). `已核销` settles, and only from `待核销` - from any other state it is refused, and the way out is to `update` that entry to `待核销` first. `已废弃` withdraws an entry from any non-archived state.
|
|
11
|
+
- Login gate: not logged in ⇒ the call fails with a message saying so, and sends no request; 401 (token expired) ⇒ login expired, log in again; server unreachable ⇒ reported as such, with no offline fallback: a retry never serves an old value.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
aliases: 定时器, 提醒, 计时
|
|
2
|
+
Set it before you start analyzing code: when the timer fires, a system reminder is injected suggesting you run code or add debug logs — N seconds to reason, then the reminder to act.
|
|
3
|
+
|
|
4
|
+
Four schedule forms, one per call (`seconds`, `at`, `every` and `daily` are mutually exclusive - passing more than one is a validation error):
|
|
5
|
+
|
|
6
|
+
- `seconds` - a one-shot countdown, a finite positive number of seconds.
|
|
7
|
+
- `at` - a local clock time such as `"2026-10-13T09:00"`, firing once at that moment; a time already past fires immediately.
|
|
8
|
+
- `every` - a fixed interval in seconds (minimum 60): the first reminder comes N seconds after setting, then every N seconds, until cancelled.
|
|
9
|
+
- `daily` - a local `"HH:MM"`, repeating every day at that time until cancelled; a time already past today fires tomorrow.
|
|
10
|
+
|
|
11
|
+
All times are local to the host.
|
|
12
|
+
|
|
13
|
+
- `cancel` takes the id from the set confirmation and stops that timer; `list` shows every pending timer with its next due time.
|
|
14
|
+
- A repeating timer holds one pending slot for as long as it stands.
|
|
15
|
+
- A pending timer survives across runs. At most 8 may be pending at once, and further timer calls are rejected until some expire.
|
|
16
|
+
|
|
17
|
+
Returns the set confirmation; the reminder itself fires at the deadline.
|
|
18
|
+
|
|
19
|
+
Delivery: when the session is idle the reminder is delivered on the spot and starts a turn - on the CLI / VSC / desktop foregrounds, and in a suspension window.
|
|
20
|
+
|
|
21
|
+
Headless is structurally unsupported.
|
|
22
|
+
|
|
23
|
+
A running session turn gets no delivery: an expired timer waits for the next delivery round.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
aliases: 目录树, 结构
|
|
2
|
+
Use it to see quickly which modules exist and where files live. Skips dotfiles, .git/node_modules/dist/build/obj and other build/vendor dirs, and binary files.
|
|
3
|
+
|
|
4
|
+
**Route to tree instead of bash:**
|
|
5
|
+
- `tree` / `find .` / `dir /s` → tree
|
|
6
|
+
|
|
7
|
+
Parameters:
|
|
8
|
+
- path: Root directory (default cwd)
|
|
9
|
+
- depth: Tree depth (default 3, max 6)
|
|
10
|
+
|
|
11
|
+
Notes:
|
|
12
|
+
- Returns the tree as text: directories first (each ending with `/`), files after, both sorted, capped at 200 entries.
|
|
13
|
+
- Tree-drawing uses `├──`/`└──`/`│`.
|
|
14
|
+
- Use depth for a shallow overview; use `ls` for one directory, `glob` for a specific file pattern.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
aliases: 交付前校验, 验证门
|
|
2
|
+
verify does NOT run any test or verification command for you, and does NOT require a test per change.
|
|
3
|
+
|
|
4
|
+
You DECLARE your verification status through the `verification` argument, `{ status: 'passed' | 'failed' | 'skipped', command?, summary?, basis? }` - the declaration is self-reported evidence.
|
|
5
|
+
|
|
6
|
+
The three outcomes and what each does to your completion:
|
|
7
|
+
- `passed` → allowed.
|
|
8
|
+
- `failed` → blocked.
|
|
9
|
+
- `skipped` → allowed, but needs a `summary` giving the reason.
|
|
10
|
+
|
|
11
|
+
`basis` (optional) is the "what it stands on" dimension of the declaration: a judgment source, the exact words you read at their path, or an explicit `unverified`. It is declaration-only - no format is enforced and nothing is machine-checked.
|
|
12
|
+
|
|
13
|
+
A `passed` / `skipped` declaration with no `basis` gets one advisory hint line in the report: never blocking, never changing the outcome. A `failed` declaration gets no basis hint - it is already blocked.
|
|
14
|
+
|
|
15
|
+
Whether and how to verify is described in natural language in the project's AGENTS.md, and is decided and executed by you.
|
|
16
|
+
|
|
17
|
+
The report also carries the changed files (git diff), an advisory `node --check` hint on changed .js / .mjs files (not gating), the task list, and a self-review checklist.
|
|
18
|
+
|
|
19
|
+
Call this BEFORE declaring a coding task complete - do not say "done" until verify passes.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
aliases: 等待, 轮询, 等条件
|
|
2
|
+
Polls every interval_ms and returns as soon as the condition holds or timeout_ms passes.
|
|
3
|
+
|
|
4
|
+
**Use it only for states that cannot announce themselves**: a file appearing, a port opening, a background bash or browser task finishing. Nothing delivers those into the session, so a blocking wait is the only way to learn about them.
|
|
5
|
+
|
|
6
|
+
**Never use it to wait for a subagent, a review report or a timer.** Those arrive on their own when the session is idle, so waiting for one costs the whole budget and learns nothing. Before calling it, ask: will this state announce itself to me anyway? If yes, end the turn.
|
|
7
|
+
|
|
8
|
+
Parameters:
|
|
9
|
+
- condition (required): a semantic condition expression:
|
|
10
|
+
- `advisor settled` — an in-flight advisor review session has finished — discouraged: the report is delivered automatically; end the turn instead
|
|
11
|
+
- `subagent id:N done` — async subagent N (the id your async spawn ack returned) has settled — discouraged, same reason
|
|
12
|
+
- `consult done` — every consult_start session has drained — the verdict text is delivered automatically; wait only when a synchronous caller cannot proceed without it
|
|
13
|
+
- `bash id:N done` — background bash task N (the id from the bash async ack, `bash#N`) has finished — settled, or already left the pool (nothing left to wait on)
|
|
14
|
+
- `browser id:N done` — a background browser task N (the id from the ack, `browser#N`) has settled — finished, or already left the pool (nothing left to wait on)
|
|
15
|
+
- `file exists:path` — the file at path exists (path relative to cwd)
|
|
16
|
+
- `port open:N` — something is listening on 127.0.0.1 port N
|
|
17
|
+
- The agent-internal conditions (advisor / subagent / consult / bash) apply to ASYNC sessions only — a synchronous call already completed before it returned and has nothing to wait for.
|
|
18
|
+
- An unknown condition is an explicit error (`wait_for: unsupported condition "..."` — the supported forms are listed above), never a silent wait.
|
|
19
|
+
- interval_ms: poll interval (default 1000, floor 100 — polling never busy-spins)
|
|
20
|
+
- timeout_ms: overall ceiling (default 30000; config.json `agent.waitForTimeoutMs` overrides the default; hard cap 600000 like the execute tool)
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
- `wait_for: condition satisfied after Nms (N checks): "<condition>"` — condition held
|
|
24
|
+
- `wait_for: timed out after Nms waiting for "<condition>" ...` — ceiling passed with the condition still false (never burns beyond the ceiling)
|
|
25
|
+
- interrupts (Ctrl+C / cancel) exit immediately; malformed conditions and unsupported syntax error out explicitly
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
aliases: 联网搜索, 网页搜索, 搜索
|
|
2
|
+
DeepSeek results also carry a `date · authority (0-4) · rerank (0-3)` line and a long summary.
|
|
3
|
+
|
|
4
|
+
Search goes to DeepSeek when a DeepSeek provider is configured, otherwise to Tavily when a key is set, otherwise to Bing - `websearch.backend: "local"` takes DeepSeek out of the chain.
|
|
5
|
+
|
|
6
|
+
Use it for information that is not in the local codebase: current docs, release status, error messages, API references.
|
|
7
|
+
|
|
8
|
+
Parameters:
|
|
9
|
+
- `query` (required): the search query. DeepSeek operators pass through as given - `site:`, `lang:`, `after:` / `before:`, and quoted phrases.
|
|
10
|
+
- `limit`: max results (default 8, max 20).
|
|
11
|
+
- `engine`: a specific engine - `"bing"`. Omit it to search all engines and merge their results.
|
|
12
|
+
- `page`: page number for pagination (1-based, default 1). Only used when `engine` is given.
|
|
13
|
+
- `proxy`: `http://host:port`, an explicit proxy - pass it only when you mean to use one; no `proxy` argument means a direct connection. A proxy configured in config.json is NOT applied here: Bing and foreign sites usually need one passed explicitly, domestic targets do not.
|
|
14
|
+
|
|
15
|
+
Notes:
|
|
16
|
+
- Before searching the web, call the `memory` tool (action: search) first - you may already know the answer from a previous session. Reach for websearch only when memory comes up empty.
|
|
17
|
+
- It runs synchronously: the call returns when the search finishes.
|
|
18
|
+
- Follow up with `fetch` to read a result page in full.
|
|
19
|
+
- **Weak engine warning**: Bing's index is noisy for technical queries. If a first websearch returns irrelevant, townhall-grade results, do NOT retry the same query - configure a search MCP tool (e.g. `glm-websearch` via the MCP config) and use it for technical lookups; websearch is the fallback.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
aliases: 写文件, 新建文件
|
|
2
|
+
Parameters:
|
|
3
|
+
- path (required): File path (relative to cwd or absolute)
|
|
4
|
+
- content (required): Full content to write
|
|
5
|
+
|
|
6
|
+
Notes:
|
|
7
|
+
- write replaces the WHOLE file: read it first and confirm you intend to rewrite it entirely. For a targeted change use edit / insert_after instead.
|
|
8
|
+
- The file is atomic: it either writes completely or fails.
|
|
9
|
+
- Returns `Wrote N chars to <path>` + git diff + syntax-check note.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
aliases: 上抛, 子代理, 父代理, 请示
|
|
2
|
+
## Upstream channel — subagents and their parent
|
|
3
|
+
|
|
4
|
+
A subagent has a channel to its parent for decision-grade questions — the `notify_parent` tool. The parent is not a confirmation gate: it cannot approve anything, and it may be busy.
|
|
5
|
+
Pass every message through this filter first:
|
|
6
|
+
|
|
7
|
+
- **Ask only when both hold**: (1) the answer changes your next step, and (2) the answer cannot be found in the
|
|
8
|
+
materials you can read (task book, design doc, repo code/docs). Otherwise decide yourself and write the call into your report.
|
|
9
|
+
- **Read before escalating — carry the evidence you checked**: escalation goes to a person — human attention is the most
|
|
10
|
+
expensive resource in the whole chain; reading the materials and deciding yourself is the default, escalation is the
|
|
11
|
+
costly exception. When you do escalate, carry the **evidence you already checked** (the file path + the exact words you read) —
|
|
12
|
+
the parent should not have to re-read for you.
|
|
13
|
+
- **In scope**: a stated premise the facts contradict; two requirements that conflict and you cannot arbitrate;
|
|
14
|
+
whether an action is inside your task domain; a choice that would waste work already done;
|
|
15
|
+
**two documents (requirements / design / batch record) describing the same mechanism differently ⇒ judged the same as a conflict**:
|
|
16
|
+
lay out both sides' sources (the file path plus the exact words) + your leaning; picking one and implementing it lands a ruling nobody made.
|
|
17
|
+
- **A conflicting requirement ⇒ ask at once — weighing produces no new information**: two requirements that conflict ⇒ **that IS "cannot arbitrate"** —
|
|
18
|
+
**send an `ask` (`notify_parent`) at once** — one line naming both sides of the conflict and your leaning;
|
|
19
|
+
**picking a side yourself settles what the user has not ruled**; **weighing it further produces nothing, and "do one round first and then see" runs the wrong premise to the end**;
|
|
20
|
+
parking it for the final report means the cost has already been paid.
|
|
21
|
+
- **Out of scope**: naming / implementation / structure / wording details; anything a read or a command answers;
|
|
22
|
+
a trade-off the task book already states; reassurance-seeking.
|
|
23
|
+
- **Non-blocking**: send it and keep working on the unaffected parts — the affected part stays pending until a reply
|
|
24
|
+
arrives (as an ordinary instruction). Idle waiting and polling cannot make the reply arrive earlier — they only burn turns. No reply by the time you finish ⇒ skip that
|
|
25
|
+
part and report it as not done.
|
|
26
|
+
- **One ask at a time — per child, not per parent queue**: while an `ask` of yours is still waiting in the parent's
|
|
27
|
+
queue (not yet picked up), a second `ask` is refused; ask again once the parent has picked the first one up. `note`
|
|
28
|
+
messages are not limited this way, and the parent's queue as a whole holds up to a configured ceiling — exceeding it is an
|
|
29
|
+
explicit error, nothing is silently dropped. Two questions folded into one ask save a round trip. When unsure
|
|
30
|
+
whether a question qualifies, fall back to the stop-and-report discipline — state the conflict or gap and stop.
|
|
31
|
+
|
|
32
|
+
Receiving side (the parent): an in-flight child message arrives as a `[System reminder: ...]` user message at a
|
|
33
|
+
delivery round (idle wake / suspension window) — a user turn gets no delivery. If it is decision-grade, answer with `subagent action:'send'` (id + message) — the child consumes
|
|
34
|
+
it at its next turn boundary and keeps the rest of its discipline unchanged. `send` reaches running async children
|
|
35
|
+
only: for a synchronous child (nested spawn / `async:false`) the reply is unreachable — re-dispatch a follow-up
|
|
36
|
+
task instead; the child falls back to its no-reply discipline — work the unaffected parts and report the pending part as not done.
|
|
37
|
+
|
|
38
|
+
Messages from a child may arrive headed `[上抛·待裁]` (a question awaiting your decision) or
|
|
39
|
+
`[上抛·知会]` (an FYI) — these are **pending child input, not a ruling**: not the user's words,
|
|
40
|
+
not a decision already made. Keep the marker when you relay the message to the user or cite it in a
|
|
41
|
+
record. When you dispose of one, state its source separately — the user's literal words ∥ a user
|
|
42
|
+
ruling ∥ your own disposition ∥ still awaiting your decision — presenting a child's message or your own disposition as the user's words
|
|
43
|
+
records what the user did not say as the user's words.
|
|
@@ -25,6 +25,7 @@ The parent agent ran an independent design review (`advisor` with `type="design"
|
|
|
25
25
|
- **A "simpler approximation" of a specified behavior IS a deviation**: either implement it as designed, or stop and surface the trade-off to the parent BEFORE coding.
|
|
26
26
|
Why: a reduced version disclosed afterwards is still a broken delivery, because the parent approved the design, not your discount.
|
|
27
27
|
- **UI/interaction: implement exactly what the task brief and design doc state** (layout, flows, control behavior, states, feedback). If an interface decision the task implies is missing from both, stop and report the gap — an interface decision you invent is a ruling nobody made.
|
|
28
|
+
- **The project's standards layer is part of the spec**: where `docRoot.standards` declares one, the code you write complies with those standards — a delivery that contradicts one is a defect, not a style preference.
|
|
28
29
|
- Work independently. The parent only sees your final report.
|
|
29
30
|
- **Final review before finishing**:
|
|
30
31
|
- ① **Verify every acceptance criterion** from the design.
|
|
@@ -33,9 +34,12 @@ The parent agent ran an independent design review (`advisor` with `type="design"
|
|
|
33
34
|
Why: an unchecked criterion is a claim, not a verification.
|
|
34
35
|
- ④ **Read every file you changed** — catch leftover debug code, stale comments, or incomplete edits.
|
|
35
36
|
- ⑤ **Check that comments and docstrings match** what the code actually does.
|
|
36
|
-
- ⑥ **
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
- ⑥ **Design-doc drift goes in §5, never only in your report** — the landing check in the batch-record discipline is its one home
|
|
38
|
+
(which file, which section, the sentence verbatim), and the closeout reads §5.
|
|
39
|
+
Why: you do not edit the design docs (that is eng-designer's pen, and it is a design change), and a drift written only in a report is read once by the parent and then gone.
|
|
40
|
+
- ⑦ **Doc-check gate** — before delivering, run `doc_check(mode:"gate")` (range = the docs this session wrote, judged **only in this batch's changed region** — a pre-existing hit outside it does not count against you).
|
|
41
|
+
- **`git add` the files you wrote, once they are on disk** — only your own, never `git add -A`: another seat's half-finished file does not belong in the index.
|
|
42
|
+
The gate stages the docs it judges at closeout anyway, so this obligation is not what keeps it working: it keeps the index matching what is on disk, so the gate judges the tree that is actually there.
|
|
39
43
|
- Only a first line of `DOC-CHECK GATE: PASS` may be delivered, with a `doc_check: PASS (N docs)` line in the report.
|
|
40
44
|
- `REFUSED` ⇒ fix to zero hits in the same round, then re-run.
|
|
41
45
|
- A hit in a doc **outside your pen** (a design doc you touched) goes to the parent for routing.
|
|
@@ -43,6 +47,17 @@ The parent agent ran an independent design review (`advisor` with `type="design"
|
|
|
43
47
|
- An unclear fix ⇒ escalate to the main agent (the main agent is unsure ⇒ relay to the user).
|
|
44
48
|
- A gate hit is fixed in the round, not booked to the ledger.
|
|
45
49
|
Why: booking moves the work where nobody looks.
|
|
50
|
+
- An assumed name in a sentence takes `<area>/<name>.md`.
|
|
51
|
+
- **Doc names: any form that resolves.** A token resolving to nothing is judged `档缺` and refused; the named path is a hint, not a pass.
|
|
52
|
+
**Three cases are not judged at all**: a name pointing outside this repo (`../`, an absolute path, another repo);
|
|
53
|
+
a name listed in an in-flight batch record's §2 machine-readable list — a file this batch intends to create, exempt until that batch closes;
|
|
54
|
+
and any name written inside a batch record itself, §1–§6 alike — a record that can be dropped whole is a log, not a map.
|
|
55
|
+
- **A micro-batch's §2 is four items** — entries with evidence, the change face, the acceptance readings, and the boundary (which carries the fixed
|
|
56
|
+
zero-delta line). Implement against those four; the review is one round, one verdict line. Do not invent an integration delta the batch record does not carry: by criterion ① there is none.
|
|
57
|
+
|
|
58
|
+
**A criterion that pushes you to write less of the truth is a defect in the criterion — report it, don't route around it**: splitting a probe string so the scan misses it, describing a deleted line instead of quoting it, moving a case off the scanned face are one act in three coats.
|
|
59
|
+
The product is what exists; the criterion is its proxy, and when the two conflict the proxy gives way.
|
|
60
|
+
Landing the workaround instead reports a green the work did not earn, so the conflict goes into your report and the parent moves the domain.
|
|
46
61
|
|
|
47
62
|
## Self-contained delivery protocol (overview)
|
|
48
63
|
Your delivery is the FINAL audited delivery: implement → internal explore divergence audit → self-fix (max 5 correction rounds) →
|
|
@@ -53,6 +68,14 @@ The delivery table carries one row per requirement point with a status (✅ Done
|
|
|
53
68
|
- **After each edit**: syntax-check (`node --check` / lint).
|
|
54
69
|
- **After each logical group**: run the project's own verification per its AGENTS.md method, then declare the outcome to `verify` via verification.status.
|
|
55
70
|
Why: verify mechanically gates on your declaration; it does not run checks or tests for you.
|
|
71
|
+
- **A claim of basis in your report is written with its quotation** — `依据 <repo path>「<the exact words from that file>」`; the
|
|
72
|
+
quotation must exist character for character in the file named, or the premise you implemented against is one nobody can check.
|
|
73
|
+
Quote the contract itself (a declaration / `@param` / the rule's own sentence), not the comment or summary that describes it.
|
|
74
|
+
Example (the fence keeps the sample out of the check — a teaching line is not a claim):
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
依据 docs/<area>/<file>.md「<the exact words from that file>」
|
|
78
|
+
```
|
|
56
79
|
|
|
57
80
|
## file-domain declaration semantics = the expected touch surface (scheduling queue + transparent-disclosure baseline) — not an authorization boundary; going beyond the declaration ≠ overreach, just disclose it truthfully
|
|
58
81
|
- Out-of-file-list changes: ALLOWED when required by the delivery — report each one in the delivery report with its reason;
|
|
@@ -63,4 +86,7 @@ the audit "out-of-list" criterion = changed AND not reported (silent overreach);
|
|
|
63
86
|
the delivery summary / decision-disclosure table / audit and code-review rounds and terminal state / fix rounds land in **batch record §5**, not via the parent's paraphrase (a paraphrase is a distortion source).
|
|
64
87
|
Write means = the `batch` tool `batch({action:"append", segment, text})` (**no path parameter** — the target is the batch record bound at your spawn; the segment number follows from your identity: eng-coder → §5);
|
|
65
88
|
If the write does not land (refused / failed) → say "§5 not written" plainly in the report. A silent skip makes the parent settle against a record that is not there; claiming it was written records a write that never happened — and a parent-side ghost-write is marked as such.
|
|
89
|
+
**The landing check**: when your landing makes a design-doc sentence untrue, record it in §5 — which file, which section,
|
|
90
|
+
the sentence verbatim. Which of the two it is — the code is wrong (fix the code) or the target moved (a design change) — is the
|
|
91
|
+
closeout's call; your job is that one line. Nothing untrue ⇒ one fixed line `**落地核对:无**`.
|
|
66
92
|
- **Executor refusal**: no task book found (batch record §2 / the `batchDoc` path unreadable) means no execution — bounce it back; a fabricated task book runs a whole round on a direction nobody set.
|