@kylecheng3146/agent-ops 0.2.2 → 0.2.3
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/README.md +26 -14
- package/dist/packages/cli/src/args.js +34 -11
- package/dist/packages/cli/src/bin.js +21 -9
- package/dist/packages/cli/src/cli.js +15 -13
- package/dist/packages/cli/src/commands/review.js +123 -32
- package/dist/runtime/src/adapters/claude/output.js +2 -1
- package/dist/runtime/src/install/doctor.js +17 -7
- package/dist/runtime/src/install/harness.js +1 -1
- package/dist/runtime/src/review/attestation.js +180 -5
- package/dist/runtime/src/review/execute.js +183 -113
- package/dist/runtime/src/review/host-sandbox.js +3 -2
- package/dist/runtime/src/review/probe.js +3 -0
- package/dist/runtime/src/review/render.js +21 -6
- package/dist/runtime/src/review/roles.js +29 -20
- package/dist/runtime/src/review/runner.js +46 -31
- package/dist/runtime/src/task/completion.js +1 -1
- package/docs/en/guides/configuration.md +29 -27
- package/docs/en/spec/review.md +55 -28
- package/docs/zh-TW/guides/configuration.md +26 -24
- package/docs/zh-TW/spec/review.md +50 -22
- package/package.json +1 -1
|
@@ -24,18 +24,18 @@ English source version: 2026-07-23. Revalidate: when the English specification c
|
|
|
24
24
|
|
|
25
25
|
## REVIEW-HARNESS-001
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
完整 review MUST 使用 configured independent-review target selection;review
|
|
28
|
+
指令 MUST NOT 接受單次 harness override。
|
|
28
29
|
|
|
29
|
-
- Trigger:
|
|
30
|
-
- Action:
|
|
31
|
-
- Evidence: argument parsing
|
|
32
|
-
- Positive: `review --
|
|
33
|
-
- Negative:
|
|
30
|
+
- Trigger: 執行 `review`。
|
|
31
|
+
- Action: 解析設定的 targets,規劃恰好兩個全新 session。
|
|
32
|
+
- Evidence: argument parsing 拒絕 `--harness`;`init --review-target` 仍是設定入口。
|
|
33
|
+
- Positive: `review --task <id> --yes` 回報設定的 `plannedTargets`。
|
|
34
|
+
- Negative: `review --task <id> --yes --harness claude` 改變 reviewer 集合。
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
結果都以 `plannedTargets` 保存這個實際順序。
|
|
36
|
+
設定三個 target 時,`AGENT_OPS_HOST` MUST 指出目前 host;該 target 會被排除,
|
|
37
|
+
若可用則 agy 為 primary。設定兩個時依順序執行,即使其中一個是 host;設定一個
|
|
38
|
+
時,在全新 session 執行兩次。
|
|
39
39
|
|
|
40
40
|
## REVIEW-READONLY-001
|
|
41
41
|
|
|
@@ -48,9 +48,8 @@ review target MUST 以其自身的唯讀機制啟動;沒有唯讀機制的 tar
|
|
|
48
48
|
- Negative: `信任 prompt 能阻止審查者修改檔案。`
|
|
49
49
|
|
|
50
50
|
每次 review 都 MUST 使用全新 session(`sessionIsolation: "fresh"`)並在
|
|
51
|
-
disposable repository clone
|
|
52
|
-
|
|
53
|
-
標示 `DEGRADED: isolated self-review`。不得 resume 開發 session 作為獨立審查。
|
|
51
|
+
disposable repository clone 中執行。同 target pair 仍因 session 與 clone 全新而
|
|
52
|
+
具獨立性。不得 resume 開發 session 作為獨立審查。
|
|
54
53
|
|
|
55
54
|
Capability 與模型啟動進度即使在 JSON 模式也寫到 stderr;reviewer 原始輸出仍
|
|
56
55
|
維持 bounded capture,不直接串流。SIGINT 或 SIGTERM 會中止 active process
|
|
@@ -59,24 +58,53 @@ tree,不 fallback、不寫 attestation;timeout 保留獨立 NOT_RUN reason
|
|
|
59
58
|
|
|
60
59
|
## REVIEW-CHAIN-001
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
兩個規劃的 session MUST 依序為必要 reviewer 與 adversarial 複審。第一個
|
|
62
|
+
session 遇到 FAIL 或 NOT_RUN MUST 立即停止;不會在該結果後 fallback。
|
|
63
63
|
|
|
64
|
-
- Trigger:
|
|
65
|
-
- Action:
|
|
66
|
-
- Evidence:
|
|
67
|
-
- Positive: `
|
|
68
|
-
- Negative:
|
|
64
|
+
- Trigger: 第一個 target 不存在、未登入、不可用或回傳 malformed report。
|
|
65
|
+
- Action: 回傳含第一個 attempt 診斷的 NOT_RUN,不啟動第二個 session。
|
|
66
|
+
- Evidence: `attempts` 有第一個 diagnostic 且沒有第二個 attempt。
|
|
67
|
+
- Positive: `primary NOT_RUN` 是終局 NOT_RUN。
|
|
68
|
+
- Negative: `必要 reviewer 沒跑成後仍啟動第二個 target`。
|
|
69
69
|
|
|
70
70
|
## REVIEW-ADVERSARIAL-001
|
|
71
71
|
|
|
72
|
-
PASS MUST
|
|
72
|
+
PASS MUST 交給第二個規劃的 target 嘗試反駁,且反駁成立時 MUST 使整體判定為 FAIL。
|
|
73
73
|
|
|
74
|
-
- Trigger: primary target 回報 PASS
|
|
74
|
+
- Trigger: primary target 回報 PASS。
|
|
75
75
|
- Action: 將前一份 report 以不可信資料交給該 target 並要求它反駁;反駁成立即回報 FAIL,且無論結果都記錄為 `adversarial`。
|
|
76
76
|
- Evidence: `adversarial` 記載挑戰者與是否反駁成立;未能產出 report 的挑戰者則記錄在 attempt 清單。
|
|
77
77
|
- Positive: `codex 判 PASS,claude 找到 blocking 缺陷,整體判定 FAIL。`
|
|
78
78
|
- Negative: `為了讓複查看起來有效而編造反駁。`
|
|
79
|
-
- Note:
|
|
79
|
+
- Note: 只有一個設定 target 時,會在全新 session 再呼叫同一 target。FAIL 已是終局,不再複查。
|
|
80
|
+
|
|
81
|
+
## REVIEW-HOST-001
|
|
82
|
+
|
|
83
|
+
Host 缺少 network 或 loopback 能力時,MUST 在任何 reviewer invocation 前
|
|
84
|
+
fail closed。
|
|
85
|
+
|
|
86
|
+
- Trigger: host 宣告 network disabled 或 loopback probe 失敗。
|
|
87
|
+
- Action: 回傳 `REVIEW_NOT_RUN / host-required` 與 host restriction。
|
|
88
|
+
- Evidence: `attempts` 為空,沒有 target preflight 或 reviewer process 執行。
|
|
89
|
+
- Positive: 可信任的外部 host runner 可在具兩項能力的主機重跑同一指令一次。
|
|
90
|
+
- Negative: 把 child login error 當作 authenticated reviewer 不可用的證明。
|
|
91
|
+
|
|
92
|
+
repository 不提供 permission bypass。外部 host runner 不可用時,結果 MUST 保持
|
|
93
|
+
NOT_RUN,不得製造 PASS。
|
|
94
|
+
|
|
95
|
+
## REVIEW-EVIDENCE-001
|
|
96
|
+
|
|
97
|
+
完整 PASS MUST 在寫入 attestation 前具備 primary report、adversarial report、
|
|
98
|
+
兩個帶 fresh session ID 的 PASS attempt、穩定 source fingerprint,以及私密且
|
|
99
|
+
有大小上限的 report artifact。artifact 或 attestation 寫入失敗 MUST 回傳 NOT_RUN。
|
|
100
|
+
|
|
101
|
+
- Trigger: reviewer chain 得到 PASS verdict。
|
|
102
|
+
- Action: 寫入 attestation 前驗證兩份 report、兩個 fresh attempt、source
|
|
103
|
+
fingerprint 與私密且有大小上限的 artifact。
|
|
104
|
+
- Evidence: attestation 與 artifact 的 task、host、targets、session IDs、report
|
|
105
|
+
digests 及 source fingerprint 完全一致。
|
|
106
|
+
- Positive: 完整 pair 寫入 artifact 與相符的 PASS attestation。
|
|
107
|
+
- Negative: 不完整 PASS 或 evidence 寫入失敗會降為 NOT_RUN。
|
|
80
108
|
|
|
81
109
|
## REVIEW-CONTRACT-001
|
|
82
110
|
|