@fitlab-ai/agent-infra 0.9.9 → 0.9.10

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/dist/bin/internal-cli.js +5 -0
  2. package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +17 -10
  3. package/dist/lib/agent-clients/adapters/codex-lifecycle/controller-context.js +11 -31
  4. package/dist/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.js +15 -33
  5. package/dist/lib/agent-clients/adapters/codex-sandbox.js +72 -11
  6. package/dist/lib/agent-clients/adapters/index.js +3 -1
  7. package/dist/lib/agent-clients/adapters/traecli.js +66 -0
  8. package/dist/lib/agent-clients/tokens.js +2 -2
  9. package/dist/lib/agent-clients/types.js +2 -1
  10. package/dist/lib/defaults.json +5 -0
  11. package/dist/lib/internal/codex-lifecycle.js +2 -2
  12. package/dist/lib/internal/codex-sandbox-controller.js +4 -3
  13. package/dist/lib/internal/sandbox-control.js +2 -2
  14. package/dist/lib/{task/commands/validate.js → internal/task-validate.js} +75 -42
  15. package/dist/lib/run/tui.js +5 -2
  16. package/dist/lib/sandbox/control/controller-registration.js +4 -2
  17. package/dist/lib/sandbox/control/executor.js +4 -1
  18. package/dist/lib/task/codex-orchestration.js +31 -34
  19. package/dist/lib/task/delegation-receipts.js +8 -7
  20. package/dist/lib/task/finalization.js +72 -46
  21. package/dist/lib/task/index.js +0 -9
  22. package/dist/lib/task/orchestration.js +1 -1
  23. package/dist/lib/task/verification-engine.js +0 -3
  24. package/dist/lifecycle-build-manifest.json +3 -3
  25. package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +25 -10
  26. package/lib/agent-clients/adapters/codex-lifecycle/controller-context.ts +16 -33
  27. package/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.ts +16 -35
  28. package/lib/agent-clients/adapters/codex-sandbox.ts +89 -14
  29. package/lib/agent-clients/adapters/index.ts +3 -1
  30. package/lib/agent-clients/adapters/traecli.ts +67 -0
  31. package/lib/agent-clients/tokens.ts +2 -2
  32. package/lib/agent-clients/types.ts +2 -1
  33. package/lib/defaults.json +5 -0
  34. package/lib/internal/codex-lifecycle.ts +2 -2
  35. package/lib/internal/codex-sandbox-controller.ts +4 -3
  36. package/lib/internal/sandbox-control.ts +2 -2
  37. package/lib/{task/commands/validate.ts → internal/task-validate.ts} +75 -40
  38. package/lib/run/tui.ts +5 -3
  39. package/lib/sandbox/control/controller-registration.ts +8 -3
  40. package/lib/sandbox/control/executor.ts +8 -2
  41. package/lib/task/codex-orchestration.ts +38 -44
  42. package/lib/task/delegation-receipts.ts +8 -6
  43. package/lib/task/finalization.ts +84 -42
  44. package/lib/task/index.ts +0 -8
  45. package/lib/task/orchestration.ts +2 -1
  46. package/lib/task/verification-engine.ts +0 -3
  47. package/package.json +1 -1
  48. package/templates/.agents/QUICKSTART.en.md +2 -3
  49. package/templates/.agents/QUICKSTART.zh-CN.md +2 -3
  50. package/templates/.agents/rules/README.en.md +1 -0
  51. package/templates/.agents/rules/README.zh-CN.md +1 -0
  52. package/templates/.agents/rules/compatibility-policy.en.md +39 -0
  53. package/templates/.agents/rules/compatibility-policy.zh-CN.md +39 -0
  54. package/templates/.agents/rules/lifecycle-orchestration.en.md +4 -4
  55. package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +4 -4
  56. package/templates/.agents/rules/pr-sync.en.md +1 -1
  57. package/templates/.agents/rules/pr-sync.github.en.md +2 -1
  58. package/templates/.agents/rules/pr-sync.github.zh-CN.md +2 -0
  59. package/templates/.agents/rules/pr-sync.zh-CN.md +1 -0
  60. package/templates/.agents/rules/review-method.en.md +1 -0
  61. package/templates/.agents/rules/review-method.zh-CN.md +1 -0
  62. package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -0
  63. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -0
  64. package/templates/.agents/skills/code-task/SKILL.en.md +1 -0
  65. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +2 -0
  66. package/templates/.agents/skills/create-pr/SKILL.en.md +12 -6
  67. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +12 -6
  68. package/templates/.agents/skills/create-pr/reference/change-report.en.md +41 -0
  69. package/templates/.agents/skills/create-pr/reference/change-report.zh-CN.md +41 -0
  70. package/templates/.agents/skills/plan-task/SKILL.en.md +2 -1
  71. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +2 -1
  72. package/templates/.agents/skills/review-code/reference/migration-risks.en.md +8 -6
  73. package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +8 -6
  74. package/templates/.agents/skills/run-manual-validation/SKILL.en.md +3 -3
  75. package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +3 -3
  76. package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.en.md +1 -1
  77. package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.zh-CN.md +1 -1
  78. package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +2 -2
  79. package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +2 -2
  80. package/templates/.agents/skills/run-task/SKILL.en.md +2 -2
  81. package/templates/.agents/skills/run-task/SKILL.zh-CN.md +2 -2
  82. package/templates/.agents/skills/run-task/reference/host-validation.en.md +2 -2
  83. package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +2 -2
  84. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +24 -0
  85. package/templates/.trae/skills/update-agent-infra.en.md +8 -0
  86. package/templates/.trae/skills/update-agent-infra.zh-CN.md +8 -0
@@ -12,7 +12,7 @@ description: >
12
12
 
13
13
  - 本技能负责选择校验模式、调用唯一机械入口并记录证据;不把 PR 人工校验标为完成。
14
14
  - `complete-manual-validation` 仍是维护者确认覆盖充分后的最终登记入口。
15
- - 禁止直接操作临时 worktree、lease 或 container;只调用 `ai task validate`。
15
+ - 禁止直接操作临时 worktree、lease 或 container;只调用 `agent-infra-internal task-validate`。
16
16
  - 产物不得记录 token、环境变量、完整 argv、绝对用户路径或原始 transcript。
17
17
 
18
18
  ## 第 0 步:状态核对(执行前硬约束)
@@ -28,7 +28,7 @@ agent-infra-internal task-snapshot {task-id} --format text
28
28
  1. 读取 `reference/discovery-and-execution.md`,解析输入模式;非法或半截输入在 started 前停止,不写产物。
29
29
  2. 运行 `agent-infra-internal task-artifact {task-id} inspect --family validation-run`,读取最新 review-code 人工校验项;再运行 `agent-infra-internal platform-pr inspect {task-id}`,按 reference 的状态矩阵发现、归并并编号。仅在自动模式下,可靠来源无项或唯一可能来源不可读时才在 started 前停止;合法显式模式始终以用户命令作为有效工作继续。
30
30
  3. 从核心结果取得轮次和产物名;确认存在有效显式工作或非空发现清单后,运行 `agent-infra-internal task-event {task-id} validation-run.started --agent {standard-agent-token}`,并逐项分类为 `executable|unavailable|unknown|unsafe|unresolved`。
31
- 4. 每个可执行项分别调用 `ai task validate {task-ref} --scope snapshot --format json -- {command...}`;只有证据表明必须原位时才对该项进行第二次显式 inplace 调用。零项可执行时不运行伪造命令,但仍继续产出覆盖缺口证据。
31
+ 4. 每个可执行项分别调用 `agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}`;只有证据表明必须原位时才对该项进行第二次显式 inplace 调用。零项可执行时不运行伪造命令,但仍继续产出覆盖缺口证据。
32
32
  5. 读取 `reference/report-template.md`,创建 `validation-run.md|validation-run-r{N}.md`;记录输入模式、发现清单、逐项结果、CLI JSON allowlist 与去敏摘要。
33
33
  6. 运行 `agent-infra-internal task-event {task-id} validation-run.completed --agent {standard-agent-token} --artifact {artifact}`。存在 Issue 时依次运行 `agent-infra-internal platform-comment sync {task-id} --kind task --agent {standard-agent-token}` 和 `agent-infra-internal platform-comment sync {task-id} --kind artifact --artifact {artifact} --agent {standard-agent-token}`。
34
34
  7. 运行 `agent-infra-internal task-verify {task-id} validation-run.completed --artifact {artifact} --format text`;未通过则修复后重跑。
@@ -36,7 +36,7 @@ agent-infra-internal task-snapshot {task-id} --format text
36
36
 
37
37
  ## 完成检查清单
38
38
 
39
- - [ ] 每个可执行项均已使用 `ai task validate`,或已记录零项可执行
39
+ - [ ] 每个可执行项均已使用 `agent-infra-internal task-validate`,或已记录零项可执行
40
40
  - [ ] 已记录去敏 validation-run 证据
41
41
  - [ ] 未修改 PR 人工验证完成状态
42
42
  - [ ] 已更新 task.md 并通过完成校验
@@ -58,7 +58,7 @@ Only `executable` items may run. Commands must not expose credentials, environme
58
58
  1. Invoke each executable item separately:
59
59
 
60
60
  ```bash
61
- ai task validate {task-ref} --scope snapshot --format json -- {command...}
61
+ agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}
62
62
  ```
63
63
 
64
64
  2. Only when the item or first-run evidence proves a dependency on uncommitted content, original mounts, or in-place permissions, explicitly invoke that item a second time with `--scope inplace` and record the reason.
@@ -58,7 +58,7 @@
58
58
  1. 每个可执行项分别调用:
59
59
 
60
60
  ```bash
61
- ai task validate {task-ref} --scope snapshot --format json -- {command...}
61
+ agent-infra-internal task-validate {task-ref} --scope snapshot --format json -- {command...}
62
62
  ```
63
63
 
64
64
  2. 仅当项目要求或首次证据证明依赖未提交内容、原挂载或原位权限时,再为该项显式调用一次 `--scope inplace`,并记录升级理由。
@@ -37,7 +37,7 @@ $ agent-infra-internal task-snapshot {task-id} --format text
37
37
  ## Structured Evidence
38
38
 
39
39
  ```json
40
- {sanitized-ai-task-validate-json}
40
+ {sanitized-task-validate-json}
41
41
  ```
42
42
 
43
43
  ## Per-item Results
@@ -64,6 +64,6 @@ $ agent-infra-internal task-snapshot {task-id} --format text
64
64
  ## Raw Evidence
65
65
 
66
66
  ```text
67
- $ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
67
+ $ agent-infra-internal task-validate {task-ref} --scope {scope} --format json -- {redacted-command}
68
68
  {sanitized-result}
69
69
  ```
@@ -37,7 +37,7 @@ $ agent-infra-internal task-snapshot {task-id} --format text
37
37
  ## 结构化证据
38
38
 
39
39
  ```json
40
- {sanitized-ai-task-validate-json}
40
+ {sanitized-task-validate-json}
41
41
  ```
42
42
 
43
43
  ## 逐项结果
@@ -64,6 +64,6 @@ $ agent-infra-internal task-snapshot {task-id} --format text
64
64
  ## 证据原文
65
65
 
66
66
  ```text
67
- $ ai task validate {task-ref} --scope {scope} --format json -- {redacted-command}
67
+ $ agent-infra-internal task-validate {task-ref} --scope {scope} --format json -- {redacted-command}
68
68
  {sanitized-result}
69
69
  ```
@@ -10,13 +10,13 @@ description: >
10
10
  The orchestrator delegates only and never executes a stage skill itself. First read `.agents/rules/no-mid-flow-questions.md`, `.agents/rules/lifecycle-orchestration.md`, and `reference/host-validation.md`.
11
11
 
12
12
  1. Resolve the canonical task ID, current Agent Client, and optional atomic policy flags, then run `task-snapshot`. If one explicit role field is present, all four are required.
13
- 2. Before `begin-or-resume`, Codex selects a host. Without `AGENT_INFRA_CONTROL_TOKEN`, use direct-host. With task-bound control authority but no `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT`, only run `codex-sandbox-controller run` with the complete policy and wait; the outer loop must not create a run, baseline, or receipt. With a context, run `verify-context` first. Stop on any bootstrap, bundle, source/profile discovery, or context failure.
13
+ 2. Before `begin-or-resume`, Codex selects a host. Without `AGENT_INFRA_CONTROL_TOKEN`, use direct-host. With task-bound control authority but no `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT`, only run `codex-sandbox-controller run` with the complete policy and wait; the outer loop must not create a run, baseline, or receipt. With a context, run `verify-context` first. Stop on protocol, task/controller/process, lease, or source/profile discovery failures. Package/build/contract or hook/profile content drift is delivered as a structured warning and tells the user to rebuild the sandbox.
14
14
  3. Run `task-orchestration {task-id} begin-or-resume --client {client}` with the complete explicit policy. With no explicit policy, core reads that client's configured policy; existing runs use persisted policy. Disk state outside the complete current structure fails closed without rewriting; finish or clear active runs before upgrading. Stop on paused/completed results.
15
15
  4. Run `route`. On `completed`, run `agent-infra-internal task-verify {task-id} run-task.completed --format text` and stop. Only a `running` result with non-null `next` supplies action, role, round, artifact, requested model, and requested effort.
16
16
  5. Codex runs `codex-lifecycle capability-arm --task-id {task-id}` once. The current loop's real PostToolUse must attest that ordinary tool response. Pass its marker token, the exact routed model, and the exact routed reasoning effort to `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort} --capability-token {token}`. Core first validates the exact routed model/effort, capability provenance, and controller binding, then captures a read-only snapshot, builds an in-memory prepared receipt, atomically consumes the token, and saves the prepared state with the capability session, turn, and tool-use origin. Activation then verifies that spawn belongs to the same session and turn and uses a distinct tool-use. Other clients use the same prepare without a token. Failure creates no baseline, receipt, or child.
17
17
  6. After prepare, run `task-orchestration <task-ref> dispatch` immediately before calling the fresh native child, then use route's exact model/effort and only the short task ref, skill, `--orchestrated`, and stage identity. The trusted hook-spawn first-observation time must fall between dispatch and the deadline. Its first provenance-sensitive command must be `await-activation --stage ... --round ... --artifact ... --role ...`; before `running`, it must not snapshot, emit stage-started, write business files, or start commit. Only explicit `recover-prepared` may clear an expired orphan when the task fingerprint is exact and no matching unconsumed active lifecycle evidence remains.
18
18
  7. Codex uses SubagentStart/Stop and App Server actual evidence to activate, consume, and seal one receipt; trusted parent fallback must produce the same complete provenance. Timed-out waits do nothing. Advance only a sealed receipt and repeat step 4 only while running.
19
- 8. Create a fresh child each round and never follow up with an old reviewer. Each requested/actual mismatch needs its own host fallback reason. Capability, hook, source, controller, build, identity, ledger, or fingerprint failure pauses and fails closed.
19
+ 8. Create a fresh child each round and never follow up with an old reviewer. Each requested/actual mismatch needs its own host fallback reason. Protocol, capability, receipt hook/evidence binding, source, controller, identity, ledger, or fingerprint failure pauses and fails closed; cross-root package/build/contract or hook/profile content drift is delivered as a warning instead of blocking natural evolution.
20
20
  9. On pause or completion, run the matching typed verification and report the structured endpoint.
21
21
 
22
22
  ## Stop
@@ -10,13 +10,13 @@ description: >
10
10
  总控只编排,不直接执行任何阶段技能。执行前先读取 `.agents/rules/no-mid-flow-questions.md`、`.agents/rules/lifecycle-orchestration.md` 与 `reference/host-validation.md`。
11
11
 
12
12
  1. 解析规范任务 ID、当前 Agent Client,以及可选的原子策略 `--executor-model`、`--executor-reasoning-effort`、`--reviewer-model`、`--reviewer-reasoning-effort`,并执行 `agent-infra-internal task-snapshot {task-id} --format text`。任一显式策略字段出现时四个 role 字段必须完整,不得与配置拼接;两个角色可以使用同一模型。
13
- 2. Codex 在 `begin-or-resume` 前选择宿主:没有 `AGENT_INFRA_CONTROL_TOKEN` 时使用 direct-host;有 task-bound control authority 但没有 `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT` 时,只调用 `agent-infra-internal codex-sandbox-controller run`(转发完整显式策略)并等待其终态,外层不得创建 run、baseline 或 receipt;已有 context 时先调用 `verify-context`。controller 的 bootstrap、bundle、source/profile discovery 或 context 任一校验失败即停止。
13
+ 2. Codex 在 `begin-or-resume` 前选择宿主:没有 `AGENT_INFRA_CONTROL_TOKEN` 时使用 direct-host;有 task-bound control authority 但没有 `AGENT_INFRA_CODEX_CONTROLLER_CONTEXT` 时,只调用 `agent-infra-internal codex-sandbox-controller run`(转发完整显式策略)并等待其终态,外层不得创建 run、baseline 或 receipt;已有 context 时先调用 `verify-context`。protocol、task/controller/process、lease 或 source/profile discovery 校验失败即停止;package/build/contract 或 hook/profile 内容漂移只输出结构化 warning,并提示用户重建 sandbox。
14
14
  3. 调用 `agent-infra-internal task-orchestration {task-id} begin-or-resume --client {client}` 并转发完整显式策略。完全没有显式策略时由核心读取当前 client 的 `agentClients[].orchestration`;existing run 使用持久化策略。磁盘状态不符合当前完整结构时核心失败关闭且不改写;升级前必须完成或清空 active run。仅当核心返回 `ORCHESTRATION_MODEL_POLICY_REQUIRED` 时,先用 `agent-client model-selection` 展示 complete/partial/interactive-only 来源,再一次收集完整策略;未回答则不创建 run。若为 paused/completed,按结构化结果停止。
15
15
  4. 调用 `route` 并读取结构化结果。若返回 `completed`,立即运行 `agent-infra-internal task-verify {task-id} run-task.completed --format text` 并停止;仅当返回 `running` 且 `next` 非空时读取唯一 action、role、round、artifact、`requestedModel` 和 `requestedReasoningEffort`,不得自行推断。
16
16
  5. Codex 先调用一次 `agent-infra-internal codex-lifecycle capability-arm --task-id {task-id}`。该普通工具调用必须由当前 loop 的真实 PostToolUse 回写 attestation;把 route 返回的精确 model、effort 和 marker 中 token 一并传给 `prepare --client {client} --requested-model {requestedModel} --requested-reasoning-effort {requestedReasoningEffort} --capability-token {token}`。核心先校验精确的 model/effort、capability provenance 与 controller binding,再只读捕获快照、构造内存中的 prepared receipt,最后原子消费 token 并保存 prepared 状态,同时持久化 capability 的 session、turn、tool-use 来源。activation 再校验 spawn 与该来源属于同一 session/turn,且 spawn 使用独立的 tool-use。其他客户端直接调用同一 prepare(无 token)。任一失败不得创建 baseline、receipt 或 child。
17
17
  6. prepare 成功后,在调用 fresh 原生子 Agent 的紧邻前一步执行 `task-orchestration <task-ref> dispatch`,再显式覆盖 route 返回的 model/effort;只传短任务引用、skill 名、`--orchestrated` 与 stage/round/artifact/role。可信 hook-spawn 首次观察时间必须位于 dispatch 与 deadline 之间。child 的第一条 provenance-sensitive 命令必须是 `await-activation --stage ... --round ... --artifact ... --role ...`;返回 running 前禁止 snapshot、阶段 started、业务写入或 commit。超时由核心暂停;崩溃遗留 prepared receipt 只能在 exact workspace fingerprint、无匹配的未消费 active lifecycle evidence 且 deadline 已过时显式 `recover-prepared`。
18
18
  7. Codex 用 SubagentStart/Stop 与 App Server actual evidence 激活、消费并封存唯一 receipt;受信 parent fallback 仍必须形成相同的完整 provenance。timed-out wait 无动作;只有 empty turns 或协议 `inProgress` 可等待,malformed、身份/传输错误或异常 terminal 均暂停。子 Agent 返回后只对 sealed receipt 调用 `advance`;只有 `running` 才重复步骤 4。
19
- 8. 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。任何 capability、hook、source、controller、build、身份、账本或 fingerprint 异常都调用 `pause` 并失败关闭。
19
+ 8. 每轮创建新 child;禁止 follow-up 复用 reviewer。actual model/effort 与 requested 不同时必须有各自的宿主降级理由。protocol、capability、receipt 内 hook/evidence binding、source、controller、身份、账本或 fingerprint 异常都调用 `pause` 并失败关闭;跨根 package/build/contract 或 hook/profile 内容漂移按 warning 交付,不把自然演进差异当成硬失败。
20
20
  9. 完成或暂停后运行对应 typed verification,并把结构化 run 摘要、暂停原因、commit 终点或 clean completion evidence 告知用户。
21
21
 
22
22
  ## 停止
@@ -10,13 +10,13 @@ Before publishing support for a client, prove the lifecycle evidence chain with
10
10
  - Explicit requested model/effort reaches each executor/reviewer. A fallback of either field reports the corresponding actual value and its own non-empty reason.
11
11
  > claude-code exception: requested reasoning effort does not yet support per-role dispatch to executor/reviewer — `.claude/agents/{executor,reviewer}.md` is a repository-level shared singleton, and writing it per role would race across concurrent tasks. This client only needs to honestly record the actual model/actual reasoning effort observed in native Start/Stop host events (`delegationEvidence.actualReasoningEffort` is declared `spawn-ack`); when not observed it is recorded as missing, which is not treated as a fallback requiring its own reason and does not fail closed. This exception does not apply to any other client.
12
12
  - Candidate-checkout and packed-install behavior match, with model policy, receipts, and verification results auditable in `orchestration.json`.
13
- - Direct-host project/managed source and sandbox isolated-user source preserve the same build, contract, profile, and controller provenance through prepare/start/stop/consume.
13
+ - Direct-host and sandbox controller hooks/profiles must come from trusted sources. Cross-root build/contract/profile content drift emits an actionable warning, while controller/task/process/lease and the receipt's hook/evidence binding remain identical through prepare/start/stop/consume.
14
14
 
15
15
  ## Validation Sequence
16
16
 
17
17
  1. Record client version, feature state, and launch command in a clean temporary repository.
18
18
  2. Start a fresh executor and reviewer, retaining redacted raw stdin and the structured run. Validate both native start/stop and the parent PostTool fallback; timed-out waits must do nothing. Never synthesize a field the host did not emit.
19
- 3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields.
19
+ 3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields. Confirm package/build/contract or hook/profile content drift produces only an actionable warning telling the user to rebuild the sandbox.
20
20
  4. Validate the same commit from a candidate checkout and an `npm pack` install; record the tarball hash and results.
21
21
  5. Commit only redacted summaries and non-sensitive fixtures. Remove or replace tokens, user-specific absolute paths, transcript content, and credentials.
22
22
  6. For sandbox, run at least ten cold executor starts and ten cold reviewer starts. Record monotonic prepared, spawn-dispatch, SubagentStart, and activation-completed timestamps plus p50/p95/max. Enable only when max plus 20% fits the deadline and symlink/config/plugin/lease/context/build failure injection and terminal cleanup audits pass.
@@ -10,13 +10,13 @@
10
10
  - 显式 requested model/effort 能传给 executor/reviewer;宿主对任一字段回退时,事件能给出对应 actual 值与独立的非空 fallback reason。
11
11
  > claude-code 例外:requested reasoning effort 暂不支持按角色下发给 executor/reviewer——`.claude/agents/{executor,reviewer}.md` 是仓库级共享单例,动态写入存在跨任务竞态,解决该竞态超出本任务范围。该客户端只要求如实记录宿主原生 Start/Stop 事件中能观察到的 actual model/actual reasoning effort(`delegationEvidence.actualReasoningEffort` 声明为 `spawn-ack`);观察不到时记录为缺失,不视为需要独立 fallback reason 的回退场景,也不构成 fail-closed 阻断。此例外不适用于其他客户端。
12
12
  - candidate checkout 与打包安装后的行为一致,且模型策略、receipt 与验证结果可从 `orchestration.json` 复核。
13
- - direct-host 的 project/managed source 与 sandbox controller 的 isolated-user source、build/contract/profile/controller digest 必须在 prepare/start/stop/consume 全链路一致。
13
+ - direct-host 与 sandbox controller 使用的 hook/profile 必须来自受信来源;build/contract/profile 内容在跨根比较中允许漂移并输出可操作 warning,但 controller/task/process/lease 与 receipt 内 hook/evidence binding 仍须在 prepare/start/stop/consume 全链路一致。
14
14
 
15
15
  ## 验证顺序
16
16
 
17
17
  1. 在干净临时仓库记录客户端版本、feature 状态和启动命令。
18
18
  2. 分别启动 fresh executor 与 fresh reviewer,保存去敏后的原始 stdin 和结构化 run;同时验证原生 start/stop 与 parent PostTool fallback。timed-out wait 必须无动作;不得补写宿主未产生的字段。
19
- 3. 分别验证 model/effort 的 requested/actual 一致路径、单项与双项有理由 fallback 路径,并确认缺 actual 字段会失败关闭。
19
+ 3. 分别验证 model/effort 的 requested/actual 一致路径、单项与双项有理由 fallback 路径,并确认缺 actual 字段会失败关闭;对 package/build/contract 或 hook/profile 内容漂移确认只产生可操作 warning,并提示用户重建 sandbox。
20
20
  4. 对同一 commit 执行 candidate checkout 与 `npm pack` 安装验证,记录 tarball 哈希和结果。
21
21
  5. 仅把去敏摘要与非敏感 fixture 纳入版本库;token、绝对用户路径、transcript 内容和凭证必须删除或替换。
22
22
  6. sandbox backend 另做至少 10 次 executor 与 10 次 reviewer 冷启动,记录 prepared、spawn dispatch、SubagentStart、activation completed 的单调时钟及 p50/p95/max;仅当 max 加 20% 余量不超过 deadline,并通过 symlink/config/plugin/lease/context/build 失败注入和终态清理审计时启用。
@@ -48,6 +48,11 @@ const DEFAULTS = {
48
48
  "id": "opencode",
49
49
  "enabled": true,
50
50
  "installInSandbox": true
51
+ },
52
+ {
53
+ "id": "traecli",
54
+ "enabled": true,
55
+ "installInSandbox": true
51
56
  }
52
57
  ],
53
58
  "sandbox": {
@@ -189,6 +194,25 @@ const AGENT_CLIENT_MANIFEST = [
189
194
  },
190
195
  "argumentsToken": "$ARGUMENTS"
191
196
  }
197
+ },
198
+ {
199
+ "id": "traecli",
200
+ "displayName": "TraeCode CLI",
201
+ "invocation": "/${skillName}",
202
+ "ownedPathPrefixes": [
203
+ ".trae/"
204
+ ],
205
+ "managed": [
206
+ ".trae/skills/"
207
+ ],
208
+ "merged": [],
209
+ "ejected": [],
210
+ "customCommand": {
211
+ "target": ".trae/skills/${skillName}.md",
212
+ "frontmatter": {},
213
+ "includeUsage": true,
214
+ "inheritDisableModelInvocation": true
215
+ }
192
216
  }
193
217
  ];
194
218
  const CUSTOM_TUI_CONTRACT = {
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Update the project AI collaboration configuration"
3
+ disable-model-invocation: true
4
+ ---
5
+
6
+ Read and execute the update-agent-infra skill from `.agents/skills/update-agent-infra/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly, including rendering from `templates/` before applying managed or merged updates.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "更新项目 AI 协作配置"
3
+ disable-model-invocation: true
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/update-agent-infra/SKILL.md` 中的 update-agent-infra 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行,包括先从 `templates/` 渲染,再应用 managed/merged 更新策略。