@fitlab-ai/agent-infra 0.9.5 → 0.9.7
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/dist/bin/internal-cli.js +8 -3
- package/dist/lib/agent-clients/adapters/codex-lifecycle/app-server.js +171 -20
- package/dist/lib/agent-clients/adapters/codex-lifecycle/build-identity.js +162 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/capability-store.js +244 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/evidence.js +14 -2
- package/dist/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.js +370 -0
- package/dist/lib/agent-clients/adapters/codex-lifecycle/store.js +68 -8
- package/dist/lib/agent-clients/adapters/codex.js +1 -1
- package/dist/lib/defaults.json +10 -2
- package/dist/lib/git/workflow.js +30 -4
- package/dist/lib/internal/codex-lifecycle.js +169 -3
- package/dist/lib/internal/codex-sandbox-controller.js +106 -0
- package/dist/lib/internal/release-workflow.js +108 -11
- package/dist/lib/internal/sandbox-control.js +43 -6
- package/dist/lib/internal/task-create.js +12 -4
- package/dist/lib/internal/task-orchestration.js +40 -7
- package/dist/lib/platform/context.js +6 -4
- package/dist/lib/platform/github-client.js +55 -2
- package/dist/lib/platform/issue-comments.js +2 -1
- package/dist/lib/process-data/checkpoint.js +319 -0
- package/dist/lib/process-data/index.js +128 -60
- package/dist/lib/process-data/materialize.js +84 -0
- package/dist/lib/process-data/normalize.js +34 -1
- package/dist/lib/process-data/reconcile.js +55 -1
- package/dist/lib/process-data/sources.js +422 -1
- package/dist/lib/process-data/store.js +341 -11
- package/dist/lib/release/workflow.js +29 -21
- package/dist/lib/sandbox/commands/create.js +111 -60
- package/dist/lib/sandbox/commands/prune.js +40 -16
- package/dist/lib/sandbox/commands/rm.js +372 -94
- package/dist/lib/sandbox/commands/start.js +4 -3
- package/dist/lib/sandbox/control/client.js +138 -22
- package/dist/lib/sandbox/control/container-identity.js +64 -0
- package/dist/lib/sandbox/control/executor.js +142 -0
- package/dist/lib/sandbox/control/lifecycle.js +557 -0
- package/dist/lib/sandbox/control/protocol.js +69 -26
- package/dist/lib/sandbox/control/server.js +395 -99
- package/dist/lib/sandbox/control/state.js +191 -0
- package/dist/lib/sandbox/control/timing.js +8 -0
- package/dist/lib/sandbox/index.js +2 -2
- package/dist/lib/sandbox/managed-fs.js +14 -2
- package/dist/lib/sandbox/mounts.js +22 -19
- package/dist/lib/sandbox/recovery.js +284 -50
- package/dist/lib/sandbox/workspace-view.js +90 -10
- package/dist/lib/sandbox/worktree-safety.js +196 -0
- package/dist/lib/server/daemon.js +1 -1
- package/dist/lib/server/process-control.js +17 -1
- package/dist/lib/server/process-state.js +57 -20
- package/dist/lib/task/artifact-lifecycle.js +87 -15
- package/dist/lib/task/artifact-receipts.js +128 -0
- package/dist/lib/task/codex-orchestration.js +236 -0
- package/dist/lib/task/commands/status.js +3 -0
- package/dist/lib/task/commands/validate.js +289 -0
- package/dist/lib/task/commit-finalization.js +36 -9
- package/dist/lib/task/create.js +10 -2
- package/dist/lib/task/delegation-receipts.js +109 -2
- package/dist/lib/task/events.js +149 -6
- package/dist/lib/task/finalization-artifacts.js +2 -1
- package/dist/lib/task/implementation-inputs.js +1 -7
- package/dist/lib/task/index.js +9 -0
- package/dist/lib/task/ledger.js +13 -1
- package/dist/lib/task/orchestration.js +365 -15
- package/dist/lib/task/sections.js +5 -1
- package/dist/lib/task/task-execution-lock.js +5 -4
- package/dist/lib/task/verification-engine.js +78 -14
- package/dist/lib/task/verification.js +1 -0
- package/dist/lifecycle-build-manifest.json +6 -0
- package/lib/agent-clients/adapters/codex-lifecycle/app-server.ts +202 -18
- package/lib/agent-clients/adapters/codex-lifecycle/build-identity.ts +227 -0
- package/lib/agent-clients/adapters/codex-lifecycle/capability-store.ts +321 -0
- package/lib/agent-clients/adapters/codex-lifecycle/evidence.ts +19 -3
- package/lib/agent-clients/adapters/codex-lifecycle/manifest-files.json +26 -0
- package/lib/agent-clients/adapters/codex-lifecycle/sandbox-controller.ts +453 -0
- package/lib/agent-clients/adapters/codex-lifecycle/store.ts +83 -6
- package/lib/agent-clients/adapters/codex.ts +1 -1
- package/lib/defaults.json +10 -2
- package/lib/git/workflow.ts +25 -3
- package/lib/internal/codex-lifecycle.ts +175 -4
- package/lib/internal/codex-sandbox-controller.ts +109 -0
- package/lib/internal/release-workflow.ts +107 -11
- package/lib/internal/sandbox-control.ts +38 -6
- package/lib/internal/task-create.ts +16 -4
- package/lib/internal/task-orchestration.ts +34 -7
- package/lib/platform/context.ts +8 -5
- package/lib/platform/github-client.ts +61 -3
- package/lib/platform/issue-comments.ts +2 -1
- package/lib/process-data/checkpoint.ts +335 -0
- package/lib/process-data/index.ts +112 -60
- package/lib/process-data/materialize.ts +83 -0
- package/lib/process-data/normalize.ts +29 -1
- package/lib/process-data/reconcile.ts +64 -2
- package/lib/process-data/sources.ts +449 -2
- package/lib/process-data/store.ts +304 -11
- package/lib/process-data/types.ts +124 -2
- package/lib/release/workflow.ts +69 -20
- package/lib/sandbox/commands/create.ts +70 -25
- package/lib/sandbox/commands/prune.ts +53 -15
- package/lib/sandbox/commands/rm.ts +423 -108
- package/lib/sandbox/commands/start.ts +4 -3
- package/lib/sandbox/control/client.ts +152 -28
- package/lib/sandbox/control/container-identity.ts +93 -0
- package/lib/sandbox/control/executor.ts +167 -0
- package/lib/sandbox/control/lifecycle.ts +573 -0
- package/lib/sandbox/control/protocol.ts +121 -68
- package/lib/sandbox/control/server.ts +398 -109
- package/lib/sandbox/control/state.ts +213 -0
- package/lib/sandbox/control/timing.ts +12 -0
- package/lib/sandbox/index.ts +2 -2
- package/lib/sandbox/managed-fs.ts +17 -2
- package/lib/sandbox/mounts.ts +16 -8
- package/lib/sandbox/recovery.ts +335 -65
- package/lib/sandbox/workspace-view.ts +102 -11
- package/lib/sandbox/worktree-safety.ts +234 -0
- package/lib/server/daemon.ts +1 -1
- package/lib/server/process-control.ts +24 -3
- package/lib/server/process-state.ts +82 -27
- package/lib/task/artifact-lifecycle.ts +78 -14
- package/lib/task/artifact-receipts.ts +161 -0
- package/lib/task/codex-orchestration.ts +319 -0
- package/lib/task/commands/status.ts +2 -0
- package/lib/task/commands/validate.ts +282 -0
- package/lib/task/commit-finalization.ts +52 -9
- package/lib/task/create.ts +11 -2
- package/lib/task/delegation-receipts.ts +208 -7
- package/lib/task/events.ts +131 -5
- package/lib/task/finalization-artifacts.ts +2 -1
- package/lib/task/implementation-inputs.ts +1 -5
- package/lib/task/index.ts +8 -0
- package/lib/task/ledger.ts +16 -1
- package/lib/task/orchestration.ts +552 -18
- package/lib/task/sections.ts +6 -2
- package/lib/task/task-execution-lock.ts +11 -9
- package/lib/task/verification-engine.ts +93 -24
- package/lib/task/verification.ts +2 -1
- package/package.json +1 -1
- package/templates/.agents/README.en.md +7 -0
- package/templates/.agents/README.zh-CN.md +5 -0
- package/templates/.agents/hooks/lifecycle-delegation.js +72 -12
- package/templates/.agents/rules/lifecycle-orchestration.en.md +8 -2
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +8 -2
- package/templates/.agents/rules/no-mid-flow-questions.en.md +1 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +1 -0
- package/templates/.agents/rules/pr-checks-commands.github.en.md +1 -1
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +1 -1
- package/templates/.agents/rules/review-handshake.en.md +3 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +3 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +3 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +3 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +4 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +4 -0
- package/templates/.agents/skills/post-release/SKILL.en.md +32 -6
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +32 -6
- package/templates/.agents/skills/run-manual-validation/SKILL.en.md +42 -0
- package/templates/.agents/skills/run-manual-validation/SKILL.zh-CN.md +42 -0
- package/templates/.agents/skills/run-manual-validation/config/verify.en.json +25 -0
- package/templates/.agents/skills/run-manual-validation/config/verify.zh-CN.json +25 -0
- package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.en.md +67 -0
- package/templates/.agents/skills/run-manual-validation/reference/discovery-and-execution.zh-CN.md +67 -0
- package/templates/.agents/skills/run-manual-validation/reference/report-template.en.md +69 -0
- package/templates/.agents/skills/run-manual-validation/reference/report-template.zh-CN.md +69 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +9 -7
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +9 -7
- package/templates/.agents/skills/run-task/reference/host-validation.en.md +5 -3
- package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +5 -3
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +75 -3
- package/templates/.claude/commands/run-manual-validation.en.md +9 -0
- package/templates/.claude/commands/run-manual-validation.zh-CN.md +9 -0
- package/templates/.codex/hooks.json +8 -8
- package/templates/.opencode/commands/run-manual-validation.en.md +11 -0
- package/templates/.opencode/commands/run-manual-validation.zh-CN.md +11 -0
- package/templates/.agents/workspace/README.en.md +0 -26
- package/templates/.agents/workspace/README.zh-CN.md +0 -26
|
@@ -5,16 +5,18 @@ Before publishing support for a client, prove the lifecycle evidence chain with
|
|
|
5
5
|
## Required Evidence
|
|
6
6
|
|
|
7
7
|
- Client version, enabled multi-agent capability, launch surface, and trust boundary.
|
|
8
|
-
- Raw start/stop events
|
|
8
|
+
- Raw start/stop events, or the parent PostTool spawn/completed-wait fallback when custom roles omit them, stably correlate the managed agent, parent/child identity, fresh spawn mode, actual model, and actual reasoning effort.
|
|
9
9
|
- Explicit requested model/effort reaches each executor/reviewer. A fallback of either field reports the corresponding actual value and its own non-empty reason.
|
|
10
10
|
- Candidate-checkout and packed-install behavior match, with model policy, receipts, and verification results auditable in `orchestration.json`.
|
|
11
|
+
- Direct-host project/managed source and sandbox isolated-user source preserve the same build, contract, profile, and controller provenance through prepare/start/stop/consume.
|
|
11
12
|
|
|
12
13
|
## Validation Sequence
|
|
13
14
|
|
|
14
15
|
1. Record client version, feature state, and launch command in a clean temporary repository.
|
|
15
|
-
2. Start a fresh executor and reviewer, retaining redacted raw stdin and the structured run. Never synthesize a field the host did not emit.
|
|
16
|
+
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.
|
|
16
17
|
3. Validate model/effort match paths, single and dual justified fallbacks, and fail-closed behavior for missing actual fields.
|
|
17
18
|
4. Validate the same commit from a candidate checkout and an `npm pack` install; record the tarball hash and results.
|
|
18
19
|
5. Commit only redacted summaries and non-sensitive fixtures. Remove or replace tokens, user-specific absolute paths, transcript content, and credentials.
|
|
20
|
+
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.
|
|
19
21
|
|
|
20
|
-
If any required field cannot be observed reliably from the real host, keep that client's orchestration capability `unsupported` and record the gap as manual validation.
|
|
22
|
+
If any required field cannot be observed reliably from the real host, keep that client's orchestration capability `unsupported` and record the gap as manual validation. Codex may advertise `experimental`, but every `prepare` must still pass static preflight and either native start/stop or the parent spawn/completed-wait fallback must produce verifiable consumed host evidence. The fallback may wait only for empty turns or protocol `inProgress`; malformed, identity/transport errors, or abnormal terminals pause deterministically.
|
|
@@ -5,16 +5,18 @@
|
|
|
5
5
|
## 必须证明的字段
|
|
6
6
|
|
|
7
7
|
- 客户端版本、启用的多代理能力、启动入口与信任边界。
|
|
8
|
-
- 原始 start/stop
|
|
8
|
+
- 原始 start/stop 事件,或 custom role 缺少它们时的 parent PostTool spawn/completed-wait fallback,能稳定关联 managed agent、parent/child identity、fresh spawn mode、actual model 和 actual reasoning effort。
|
|
9
9
|
- 显式 requested model/effort 能传给 executor/reviewer;宿主对任一字段回退时,事件能给出对应 actual 值与独立的非空 fallback reason。
|
|
10
10
|
- candidate checkout 与打包安装后的行为一致,且模型策略、receipt 与验证结果可从 `orchestration.json` 复核。
|
|
11
|
+
- direct-host 的 project/managed source 与 sandbox controller 的 isolated-user source、build/contract/profile/controller digest 必须在 prepare/start/stop/consume 全链路一致。
|
|
11
12
|
|
|
12
13
|
## 验证顺序
|
|
13
14
|
|
|
14
15
|
1. 在干净临时仓库记录客户端版本、feature 状态和启动命令。
|
|
15
|
-
2. 分别启动 fresh executor 与 fresh reviewer,保存去敏后的原始 stdin 和结构化 run
|
|
16
|
+
2. 分别启动 fresh executor 与 fresh reviewer,保存去敏后的原始 stdin 和结构化 run;同时验证原生 start/stop 与 parent PostTool fallback。timed-out wait 必须无动作;不得补写宿主未产生的字段。
|
|
16
17
|
3. 分别验证 model/effort 的 requested/actual 一致路径、单项与双项有理由 fallback 路径,并确认缺 actual 字段会失败关闭。
|
|
17
18
|
4. 对同一 commit 执行 candidate checkout 与 `npm pack` 安装验证,记录 tarball 哈希和结果。
|
|
18
19
|
5. 仅把去敏摘要与非敏感 fixture 纳入版本库;token、绝对用户路径、transcript 内容和凭证必须删除或替换。
|
|
20
|
+
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 失败注入和终态清理审计时启用。
|
|
19
21
|
|
|
20
|
-
任一字段无法从真实宿主稳定观察时,该客户端的 orchestration capability 保持 `unsupported`,并把缺口记录为人工验证项。
|
|
22
|
+
任一字段无法从真实宿主稳定观察时,该客户端的 orchestration capability 保持 `unsupported`,并把缺口记录为人工验证项。Codex 可声明为 `experimental`,但每次 `prepare` 仍必须通过静态 preflight,且原生 start/stop 或 parent spawn/completed-wait fallback 必须形成可验证的 consumed host evidence。fallback 只允许 empty turns/协议 `inProgress` 等待;malformed、身份/传输错误或异常 terminal 都稳定暂停。
|
|
@@ -82,7 +82,6 @@ const DEFAULTS = {
|
|
|
82
82
|
".agents/skills/",
|
|
83
83
|
".agents/templates/",
|
|
84
84
|
".agents/workflows/",
|
|
85
|
-
".agents/workspace/README.md",
|
|
86
85
|
".git-hooks/check-large-files.cjs",
|
|
87
86
|
".git-hooks/check-version-format.sh",
|
|
88
87
|
".github/scripts/",
|
|
@@ -110,7 +109,16 @@ const DEFAULTS = {
|
|
|
110
109
|
".git-hooks/pre-commit",
|
|
111
110
|
".gitignore"
|
|
112
111
|
],
|
|
113
|
-
"ejected": []
|
|
112
|
+
"ejected": [],
|
|
113
|
+
"retiredManaged": [
|
|
114
|
+
{
|
|
115
|
+
"path": ".agents/workspace/README.md",
|
|
116
|
+
"templateHashes": [
|
|
117
|
+
"sha256:967b27ca4008154c5abf99a1df728242f80ed3ace9bd98eb2828bc1c76af826c",
|
|
118
|
+
"sha256:15aa21942cf2a1396d27834f1d3d723b61a46f8d14600b706f39f3bebc21aea3"
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
114
122
|
}
|
|
115
123
|
};
|
|
116
124
|
|
|
@@ -1224,6 +1232,26 @@ function entryVariantRels(entry, allSet, platform) {
|
|
|
1224
1232
|
return rels;
|
|
1225
1233
|
}
|
|
1226
1234
|
|
|
1235
|
+
function ensureRuntimeWorkspace(projectRoot) {
|
|
1236
|
+
const directories = [
|
|
1237
|
+
path.join(projectRoot, '.agents'),
|
|
1238
|
+
path.join(projectRoot, '.agents', 'workspace'),
|
|
1239
|
+
...['active', 'blocked', 'completed', 'archive'].map((state) =>
|
|
1240
|
+
path.join(projectRoot, '.agents', 'workspace', state)
|
|
1241
|
+
)
|
|
1242
|
+
];
|
|
1243
|
+
for (const directory of directories) {
|
|
1244
|
+
if (fs.existsSync(directory)) {
|
|
1245
|
+
const stat = fs.lstatSync(directory);
|
|
1246
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
1247
|
+
throw new Error(`Runtime workspace path must be a real directory: ${directory}`);
|
|
1248
|
+
}
|
|
1249
|
+
continue;
|
|
1250
|
+
}
|
|
1251
|
+
fs.mkdirSync(directory, { mode: 0o700 });
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1227
1255
|
function syncTemplates(projectRoot, templateRootOverride) {
|
|
1228
1256
|
const configDir = path.join(projectRoot, '.agents');
|
|
1229
1257
|
const cfgPath = path.join(configDir, '.airc.json');
|
|
@@ -1234,6 +1262,7 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1234
1262
|
|
|
1235
1263
|
const originalConfigText = fs.readFileSync(cfgPath, 'utf8');
|
|
1236
1264
|
const cfg = JSON.parse(originalConfigText);
|
|
1265
|
+
ensureRuntimeWorkspace(projectRoot);
|
|
1237
1266
|
const configPathRel = norm(path.relative(projectRoot, cfgPath));
|
|
1238
1267
|
let templateRoot = templateRootOverride;
|
|
1239
1268
|
if (!templateRoot) {
|
|
@@ -1271,6 +1300,16 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1271
1300
|
merged: [...(cfg.files.merged || [])],
|
|
1272
1301
|
ejected: [...(cfg.files.ejected || [])]
|
|
1273
1302
|
};
|
|
1303
|
+
const retiredManaged = new Map((DEFAULTS.files.retiredManaged || []).map((retired) => {
|
|
1304
|
+
const descriptor = typeof retired === 'string' ? { path: retired } : retired;
|
|
1305
|
+
return [norm(descriptor.path), new Set(
|
|
1306
|
+
(descriptor.templateHashes || []).map(trustedBaseline).filter(Boolean)
|
|
1307
|
+
)];
|
|
1308
|
+
}));
|
|
1309
|
+
const planningRegistry = {
|
|
1310
|
+
...currentRegistry,
|
|
1311
|
+
managed: currentRegistry.managed.filter((entry) => !retiredManaged.has(norm(entry)))
|
|
1312
|
+
};
|
|
1274
1313
|
const sharedDefaults = {
|
|
1275
1314
|
managed: (DEFAULTS.files.managed || []).filter(
|
|
1276
1315
|
(entry) => !isPathOwnedByOtherPlatform(entry, platformType)
|
|
@@ -1280,7 +1319,7 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1280
1319
|
),
|
|
1281
1320
|
ejected: [...(DEFAULTS.files.ejected || [])]
|
|
1282
1321
|
};
|
|
1283
|
-
const assetPlan = planProjectRegistry(
|
|
1322
|
+
const assetPlan = planProjectRegistry(planningRegistry, sharedDefaults, enabledTUIs);
|
|
1284
1323
|
const managed = [...assetPlan.registry.managed];
|
|
1285
1324
|
const merged = [...assetPlan.registry.merged];
|
|
1286
1325
|
const ejected = [...assetPlan.registry.ejected];
|
|
@@ -1295,6 +1334,7 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1295
1334
|
for (const target of Object.keys(managedBaselines)) {
|
|
1296
1335
|
if (
|
|
1297
1336
|
!guardedManaged.has(norm(target))
|
|
1337
|
+
&& !retiredManaged.has(norm(target))
|
|
1298
1338
|
&& !allClientManaged.some((entry) => assetMatches(entry, target))
|
|
1299
1339
|
) {
|
|
1300
1340
|
delete managedBaselines[target];
|
|
@@ -1369,6 +1409,38 @@ function syncTemplates(projectRoot, templateRootOverride) {
|
|
|
1369
1409
|
)
|
|
1370
1410
|
);
|
|
1371
1411
|
|
|
1412
|
+
for (const [entry, historicalTemplateHashes] of retiredManaged) {
|
|
1413
|
+
const target = path.join(projectRoot, entry);
|
|
1414
|
+
const owned = currentRegistry.managed.some((candidate) => norm(candidate) === entry);
|
|
1415
|
+
if (!fs.existsSync(target)) continue;
|
|
1416
|
+
const stat = fs.lstatSync(target);
|
|
1417
|
+
const baseline = trustedBaseline(managedBaselines[entry]);
|
|
1418
|
+
const localHash = stat.isFile() && !stat.isSymbolicLink()
|
|
1419
|
+
? sha256(fs.readFileSync(target))
|
|
1420
|
+
: null;
|
|
1421
|
+
const safeToRemove = owned
|
|
1422
|
+
&& localHash !== null
|
|
1423
|
+
&& (localHash === baseline || historicalTemplateHashes.has(localHash));
|
|
1424
|
+
if (safeToRemove) {
|
|
1425
|
+
fs.unlinkSync(target);
|
|
1426
|
+
report.managed.removed.push(entry);
|
|
1427
|
+
if (Object.prototype.hasOwnProperty.call(managedBaselines, entry)) {
|
|
1428
|
+
delete managedBaselines[entry];
|
|
1429
|
+
baselinesChanged = true;
|
|
1430
|
+
}
|
|
1431
|
+
} else {
|
|
1432
|
+
report.managed.protected.push({
|
|
1433
|
+
target: entry,
|
|
1434
|
+
reason: owned && localHash !== null && baseline !== null
|
|
1435
|
+
? 'user-modified'
|
|
1436
|
+
: (owned && localHash === null ? 'invalid-type' : 'unknown-origin'),
|
|
1437
|
+
baseline,
|
|
1438
|
+
local: localHash,
|
|
1439
|
+
template: null
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1372
1444
|
const templateSources = Array.isArray(cfg.templates?.sources) ? cfg.templates.sources : [];
|
|
1373
1445
|
report.templateSources.configured = templateSources.length;
|
|
1374
1446
|
const { mergedRels, sourceMap } = mergeTemplateSources(templateRoot, templateSources, report);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Run host-side task validation and record sanitized evidence"
|
|
3
|
+
usage: "/run-manual-validation <task-ref> [--scope snapshot|inplace] [--timeout <ms>] [--format text|json] -- <command...>"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Read and execute the run-manual-validation skill from `.agents/skills/run-manual-validation/SKILL.md`.
|
|
8
|
+
|
|
9
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "运行宿主侧任务校验并记录去敏证据"
|
|
3
|
+
usage: "/run-manual-validation <task-ref> [--scope snapshot|inplace] [--timeout <ms>] [--format text|json] -- <command...>"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
读取并执行 `.agents/skills/run-manual-validation/SKILL.md` 中的 run-manual-validation 技能。
|
|
8
|
+
|
|
9
|
+
严格按照技能中定义的所有步骤执行。
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
|
|
16
|
+
"matcher": "^collaborationspawn_agent$",
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
20
|
"command": "node \"$(git rev-parse --show-toplevel)/.agents/hooks/lifecycle-delegation.js\" --client codex --event pre-tool",
|
|
21
|
-
"timeout":
|
|
21
|
+
"timeout": 15,
|
|
22
22
|
"statusMessage": "Recording Codex lifecycle spawn evidence"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
],
|
|
27
27
|
"PostToolUse": [
|
|
28
28
|
{
|
|
29
|
-
|
|
29
|
+
"matcher": "",
|
|
30
30
|
"hooks": [
|
|
31
31
|
{
|
|
32
32
|
"type": "command",
|
|
33
33
|
"command": "node \"$(git rev-parse --show-toplevel)/.agents/hooks/lifecycle-delegation.js\" --client codex --event post-tool",
|
|
34
|
-
"timeout":
|
|
34
|
+
"timeout": 15,
|
|
35
35
|
"statusMessage": "Recording Codex lifecycle tool completion"
|
|
36
36
|
}
|
|
37
37
|
]
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
],
|
|
40
40
|
"SubagentStart": [
|
|
41
41
|
{
|
|
42
|
-
"matcher": "
|
|
42
|
+
"matcher": "",
|
|
43
43
|
"hooks": [
|
|
44
44
|
{
|
|
45
45
|
"type": "command",
|
|
46
46
|
"command": "node \"$(git rev-parse --show-toplevel)/.agents/hooks/lifecycle-delegation.js\" --client codex --event subagent-start",
|
|
47
|
-
"timeout":
|
|
47
|
+
"timeout": 15,
|
|
48
48
|
"statusMessage": "Recording Codex child identity"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
],
|
|
53
53
|
"SubagentStop": [
|
|
54
54
|
{
|
|
55
|
-
"matcher": "
|
|
55
|
+
"matcher": "",
|
|
56
56
|
"hooks": [
|
|
57
57
|
{
|
|
58
58
|
"type": "command",
|
|
59
59
|
"command": "node \"$(git rev-parse --show-toplevel)/.agents/hooks/lifecycle-delegation.js\" --client codex --event subagent-stop",
|
|
60
|
-
"timeout":
|
|
60
|
+
"timeout": 15,
|
|
61
61
|
"statusMessage": "Recording Codex child stop evidence"
|
|
62
62
|
}
|
|
63
63
|
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Run host-side task validation and record sanitized evidence"
|
|
3
|
+
agent: general
|
|
4
|
+
subtask: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run manual validation: $ARGUMENTS
|
|
8
|
+
|
|
9
|
+
Read and execute the run-manual-validation skill from `.agents/skills/run-manual-validation/SKILL.md`.
|
|
10
|
+
|
|
11
|
+
Follow all steps defined in the skill exactly.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# AI Workspace
|
|
2
|
-
|
|
3
|
-
This directory is the runtime workspace for multi-AI collaboration. All contents are **git-ignored** except for this README and `.gitkeep` files.
|
|
4
|
-
|
|
5
|
-
## Directory Structure
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
.agents/workspace/
|
|
9
|
-
active/ # Currently active tasks and handoff documents
|
|
10
|
-
blocked/ # Tasks that are blocked and waiting for resolution
|
|
11
|
-
completed/ # Completed tasks (kept for reference)
|
|
12
|
-
logs/ # Collaboration logs and session records
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
- **active/**: Place task files here when work begins. Move them to `completed/` or `blocked/` as appropriate.
|
|
18
|
-
- **blocked/**: Move tasks here when they cannot proceed. Document the blocker in the task file.
|
|
19
|
-
- **completed/**: Move tasks here when they are done. These serve as a historical record.
|
|
20
|
-
- **logs/**: Store session logs, AI conversation exports, or collaboration notes.
|
|
21
|
-
|
|
22
|
-
## Important
|
|
23
|
-
|
|
24
|
-
- Contents of this directory are **not version-controlled** (git-ignored).
|
|
25
|
-
- Do not store anything here that needs to be shared via git.
|
|
26
|
-
- Templates and workflow definitions belong in `.agents/`, not here.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# AI 工作区
|
|
2
|
-
|
|
3
|
-
本目录是多 AI 协作的运行时工作区。除本 README 和 `.gitkeep` 文件外,所有内容均被 **git ignore**。
|
|
4
|
-
|
|
5
|
-
## 目录结构
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
.agents/workspace/
|
|
9
|
-
active/ # 当前活跃的任务和交接文档
|
|
10
|
-
blocked/ # 被阻塞的任务,等待解决
|
|
11
|
-
completed/ # 已完成的任务(保留供参考)
|
|
12
|
-
logs/ # 协作日志和会话记录
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## 使用方法
|
|
16
|
-
|
|
17
|
-
- **active/**:工作开始时将任务文件放在这里。根据情况将其移至 `completed/` 或 `blocked/`。
|
|
18
|
-
- **blocked/**:当任务无法继续时将其移至此处。在任务文件中记录阻塞原因。
|
|
19
|
-
- **completed/**:任务完成后将其移至此处。这些作为历史记录保留。
|
|
20
|
-
- **logs/**:存储会话日志、AI 对话导出或协作笔记。
|
|
21
|
-
|
|
22
|
-
## 重要事项
|
|
23
|
-
|
|
24
|
-
- 本目录的内容**不受版本控制**(已被 git ignore)。
|
|
25
|
-
- 不要在这里存储需要通过 git 共享的内容。
|
|
26
|
-
- 模板和工作流定义属于 `.agents/` 目录,而非此处。
|