@kylecheng3146/agent-ops 0.1.14 → 0.1.16
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 +32 -25
- package/dist/packages/cli/src/args.js +5 -0
- package/dist/packages/cli/src/bin.js +28 -27
- package/dist/packages/cli/src/commands/init.js +36 -9
- package/dist/packages/cli/src/commands/review.js +52 -32
- package/dist/packages/cli/src/commands/trust.js +28 -0
- package/dist/packages/cli/src/commands/uninstall.js +36 -9
- package/dist/packages/cli/src/commands/update.js +36 -9
- package/dist/packages/cli/src/context.js +13 -8
- package/dist/packages/cli/src/public-plan.js +8 -6
- package/dist/runtime/src/adapters/claude/config.js +33 -17
- package/dist/runtime/src/adapters/claude/output.js +13 -0
- package/dist/runtime/src/hooks/stop-service.js +45 -6
- package/dist/runtime/src/install/codex-loop.js +33 -3
- package/dist/runtime/src/install/harness.js +2 -2
- package/dist/runtime/src/install/hooks.js +1 -1
- package/dist/runtime/src/install/ownership.js +25 -9
- package/dist/runtime/src/install/plan.js +11 -7
- package/dist/runtime/src/install/probes.js +2 -2
- package/dist/runtime/src/review/attestation.js +65 -0
- package/dist/runtime/src/review/execute.js +66 -39
- package/dist/runtime/src/review/invocation.js +14 -6
- package/dist/runtime/src/review/probe.js +1 -4
- package/dist/runtime/src/review/render.js +7 -0
- package/dist/runtime/src/review/runner.js +14 -3
- package/dist/runtime/src/security/permissions.js +18 -3
- package/docs/en/guides/configuration.md +31 -26
- package/docs/en/spec/README.md +2 -1
- package/docs/en/spec/harness-adapters.md +2 -1
- package/docs/zh-TW/guides/configuration.md +26 -19
- package/docs/zh-TW/spec/README.md +2 -2
- package/docs/zh-TW/spec/harness-adapters.md +2 -2
- package/package.json +1 -1
|
@@ -42,26 +42,28 @@ Claude 與 Codex lifecycle support 為 `supported`,OpenCode 從 app initializa
|
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
`targets` 是**有序的後備鏈**。每次 review 都鎖定 staged/unstaged/untracked
|
|
45
|
-
變更(或乾淨的 `--base <ref>...HEAD
|
|
46
|
-
|
|
45
|
+
變更(或乾淨的 `--base <ref>...HEAD`)。裸跑使用內建 `change-quality` 準則;
|
|
46
|
+
`--task` 使用 task criteria,並要求必要驗證的最新 PASS evidence。完整 report
|
|
47
|
+
會顯示給人看,PASS 後只持久化 source-fingerprint attestation。
|
|
47
48
|
|
|
48
|
-
每次嘗試都從新的暫存 cwd
|
|
49
|
-
context
|
|
49
|
+
每次嘗試都從新的暫存 cwd 與原生唯讀模式啟動。Claude 使用完整 safe-mode
|
|
50
|
+
隔離;Codex 與 Agy 為了支援既有 OAuth 登入而保留登入環境,因此 context
|
|
51
|
+
隔離較弱,但仍不能修改 repository:
|
|
50
52
|
|
|
51
53
|
| 目標 | 呼叫方式 | 唯讀 |
|
|
52
54
|
| --- | --- | --- |
|
|
53
|
-
| `codex` | `codex exec` |
|
|
54
|
-
| `agy`(Antigravity)| `agy -p` |
|
|
55
|
+
| `codex` | `codex exec` | `-s read-only --ephemeral --ignore-user-config` |
|
|
56
|
+
| `agy`(Antigravity)| `agy -p` | `--sandbox --mode plan --disable-slash-commands` |
|
|
55
57
|
| `claude` | `claude -p` | `--permission-mode plan --safe-mode` |
|
|
56
58
|
|
|
57
59
|
`opencode` **不是** review 目標,即使它是支援的 harness。它的 `--agent plan`
|
|
58
60
|
會被判定為 subagent 而遭拒,並靜默退回可寫入的 agent,因此無法滿足唯讀前置
|
|
59
61
|
條件。沒有唯讀旗標的目標會被跳過,不會在無沙箱狀態下執行。
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
(每個目標預設
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
只要沒有取得有效 verdict 就換下一家,包括執行檔不存在、spawn 失敗、逾時
|
|
64
|
+
(每個目標預設 300 秒)、登入失敗、輸出過大或無法解析。文字與 JSON 輸出
|
|
65
|
+
都會保留每次 attempt 及原因。`PASS` 或 `FAIL` 判定是**終局**,因此不會產生
|
|
66
|
+
自動化的 review shopping。
|
|
65
67
|
|
|
66
68
|
若 host 是 Claude Code(`CLAUDECODE` 已設定),`claude` 會被移到鏈尾。
|
|
67
69
|
當它是唯一設定的目標時仍會執行,並附上 `reviewer == host` 警告。
|
|
@@ -90,18 +92,24 @@ agent-ops doctor --check-auth # 每個目標一次真實 print 呼叫
|
|
|
90
92
|
### Project-local loop profile
|
|
91
93
|
|
|
92
94
|
`--profile loop` 是明確 opt-in 的 project-scope profile。請選擇 `codex`、
|
|
93
|
-
`claude` 或兩者(例如 `--harness codex,claude
|
|
94
|
-
|
|
95
|
+
`claude` 或兩者(例如 `--harness codex,claude`)。Claude Code 已支援原生
|
|
96
|
+
Windows,會使用產生的 PowerShell launcher;Codex 的 loop launcher 仍需要
|
|
97
|
+
POSIX-compatible `bash`。建議先 dry run:
|
|
95
98
|
|
|
96
99
|
```bash
|
|
97
100
|
agent-ops init --dry-run --scope project --harness codex,claude --profile loop --json
|
|
98
101
|
agent-ops init --scope project --harness codex,claude --profile loop --yes
|
|
99
102
|
```
|
|
100
103
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
在原生 Windows 上,除非 Codex 是在 POSIX environment 執行,請選擇
|
|
105
|
+
`--harness claude`;Codex loop 仍會呼叫 `bash`。
|
|
106
|
+
|
|
107
|
+
對每個選定且支援的 harness,agent-ops 擁有最小的 native launcher:Codex 是
|
|
108
|
+
`.codex/hooks/agent-ops-loop.sh`;Claude Code 是
|
|
109
|
+
`.claude/hooks/agent-ops-loop.sh` 與 `.claude/hooks/agent-ops-loop.ps1`。兩個
|
|
110
|
+
Claude launcher 都委派給同一個已安裝的 Node runtime,因此不會複製
|
|
111
|
+
project-specific loop script。Windows 產生的 settings 會選用 PowerShell
|
|
112
|
+
launcher。Codex 只會在 `.codex/config.toml` 不存在時建立它。首次安裝會在不
|
|
105
113
|
覆寫既有內容的前提下,於選定 harness directory 建立 `loop-goal.md`、
|
|
106
114
|
`loop-state.md` 與 `loop-telemetry.jsonl`;並以 hash-commented `.gitignore`
|
|
107
115
|
block 忽略這些 local file。
|
|
@@ -175,7 +183,6 @@ config v2 feature,必須明確啟用且至少提供一個已確認的 command
|
|
|
175
183
|
|
|
176
184
|
```bash
|
|
177
185
|
agent-ops update
|
|
178
|
-
agent-ops trust grant
|
|
179
186
|
```
|
|
180
187
|
|
|
181
188
|
未執行 `update` 時,doctor 可因 registration drift 回報 `UPDATE_REQUIRED`。另
|
|
@@ -183,12 +190,12 @@ agent-ops trust grant
|
|
|
183
190
|
path-independent managed rules artifact 改變時,`artifact-staleness` 會回報帶有
|
|
184
191
|
`UPDATE_REQUIRED` 的 `DEGRADED`。`agent-ops update` 會重新產生 artifact 並清除
|
|
185
192
|
這個結果;artifact 缺失或 hash 不符時,`artifacts` check 仍為 `FAIL`。未重新
|
|
186
|
-
|
|
193
|
+
project update 經確認後,若有 verifier 會自動更新 stale trust binding。
|
|
187
194
|
|
|
188
195
|
doctor 從不寫入檔案,部分結果本來就無法修復:安裝根目錄以外的 surface,
|
|
189
196
|
或 harness 依 descriptor 宣告只部分支援的 capability(例如 opencode 的
|
|
190
197
|
`lifecycle-summary`),會永久回報 `UNKNOWN` 或 `DEGRADED` 且 exit 0。若 CI
|
|
191
|
-
需要自動修復,請直接呼叫 `agent-ops update
|
|
198
|
+
需要自動修復,請直接呼叫 `agent-ops update`;也可手動呼叫 `agent-ops trust grant`,
|
|
192
199
|
不要解析 doctor 的輸出。
|
|
193
200
|
|
|
194
201
|
Stop 是 report-only:`PASS`、`FAIL`
|
|
@@ -6,8 +6,8 @@ Harness adapter 規則涵蓋 Codex、Claude Code 與 opencode。opencode 整合
|
|
|
6
6
|
產生的 local plugin,不管理 `opencode.json`。
|
|
7
7
|
|
|
8
8
|
Configuration 與 manifest 分開版本化。Config v1 會遷移為預設 disabled Stop
|
|
9
|
-
verification 的 config v2;變更 capability
|
|
10
|
-
|
|
9
|
+
verification 的 config v2;變更 capability 後必須執行經確認的 project
|
|
10
|
+
`agent-ops update`,有 verifier 時會一併更新 trust。Stop verification 必須明確啟用、具備 trust、
|
|
11
11
|
為 report-only,且永遠不會完成 task。Dry-run plan 會隱藏 foreign settings
|
|
12
12
|
內容;routing migration 一旦套用即為單向。
|
|
13
13
|
|
|
@@ -72,8 +72,8 @@ Claude Code launcher 後使用同一個 shared runtime。它 MUST NOT 將 policy
|
|
|
72
72
|
project-specific script,也不得改變一般 permission request。
|
|
73
73
|
|
|
74
74
|
- Trigger: Project 以 Codex、Claude Code 或兩者選擇 `loop`。
|
|
75
|
-
- Action: 只產生選定的 `.codex/hooks/agent-ops-loop.sh` 與/或
|
|
76
|
-
`.claude/hooks/agent-ops-loop.sh` launcher,註冊文件化的 loop lifecycle event
|
|
75
|
+
- Action: 只產生選定的 `.codex/hooks/agent-ops-loop.sh` 與/或 Claude 的
|
|
76
|
+
`.claude/hooks/agent-ops-loop.sh`、`.claude/hooks/agent-ops-loop.ps1` launcher,註冊文件化的 loop lifecycle event
|
|
77
77
|
(不含 `Stop`),並保留 foreign hook group。只在 `UserPromptSubmit` 或 Bash
|
|
78
78
|
`PreToolUse` 的 high-confidence literal credential,以及 `PreToolUse` 的危險 Bash command 時,使用
|
|
79
79
|
文件化的 native denial shape 進行 blocking。對 `PermissionRequest`(包括
|