holo-codex 0.1.0 → 0.1.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 +21 -0
- package/README.md +141 -75
- package/README.zh-CN.md +141 -75
- package/docs/release-checklist.md +39 -9
- package/package.json +4 -2
- package/plugins/autonomous-pr-loop/.codex-plugin/plugin.json +1 -1
- package/plugins/autonomous-pr-loop/.mcp.json +2 -4
- package/plugins/autonomous-pr-loop/core/cli.ts +89 -1
- package/plugins/autonomous-pr-loop/core/doctor.ts +35 -11
- package/plugins/autonomous-pr-loop/core/hook-diagnostics.ts +153 -0
- package/plugins/autonomous-pr-loop/core/hook-policy.ts +230 -23
- package/plugins/autonomous-pr-loop/core/local-install.ts +13 -19
- package/plugins/autonomous-pr-loop/core/storage.ts +5 -5
- package/plugins/autonomous-pr-loop/core/types.ts +2 -0
- package/plugins/autonomous-pr-loop/core/workflow-board.ts +78 -14
- package/plugins/autonomous-pr-loop/hooks/dist/permission-request.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/post-compact.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/post-tool-use.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/pre-compact.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/pre-tool-use.js +191 -27
- package/plugins/autonomous-pr-loop/hooks/dist/session-start.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/stop.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/dist/user-prompt-submit.js +4 -4
- package/plugins/autonomous-pr-loop/hooks/hooks.json +1 -104
- package/plugins/autonomous-pr-loop/mcp-server/dist/index.js +10551 -0
- package/plugins/autonomous-pr-loop/mcp-server/src/index.ts +6 -3
- package/plugins/autonomous-pr-loop/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
- Added the manual GitHub Actions Release workflow for npm Trusted Publishing, dry-run tarball validation, and registry install smoke.
|
|
6
|
+
- Added audited maintainer override support for lifecycle gates so verified release and merge operations can proceed with recorded evidence.
|
|
7
|
+
- Relaxed the hook allowlist for maintainer-owned commands after verified evidence is present.
|
|
8
|
+
- Hardened Codex hook and MCP startup compatibility for current Codex configurations.
|
|
9
|
+
- Fixed dashboard Cleanup status consistency so sidebar substages and the main cleanup checklist use the same cleanup evidence.
|
|
10
|
+
- Added the `next_issue_selected` cleanup checklist item to keep cleanup progress complete and visible.
|
|
11
|
+
- Validated the release path with the existing GitHub Actions Release workflow, tarball checks, and dashboard smoke requirements.
|
|
12
|
+
- Kept #16, #17, #18, and #19 as follow-up improvements outside this release-prep PR.
|
|
13
|
+
|
|
14
|
+
## 0.1.1
|
|
15
|
+
|
|
16
|
+
- Fixed the bundled Codex plugin hooks schema for newer Codex config parsers.
|
|
17
|
+
- Kept stable runtime identifiers unchanged: `agent-loop`, `.agent-loop/`, and `autonomous-pr-loop`.
|
|
18
|
+
|
|
19
|
+
## 0.1.0
|
|
20
|
+
|
|
21
|
+
- Initial public npm release of HOLO-Codex.
|
package/README.md
CHANGED
|
@@ -4,62 +4,109 @@
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/holo-codex)
|
|
8
|
+
[](https://www.npmjs.com/package/holo-codex)
|
|
9
|
+
[](https://github.com/tizerluo/HOLO-Codex/releases)
|
|
10
|
+
[](https://github.com/tizerluo/HOLO-Codex/actions/workflows/ci.yml)
|
|
11
|
+
[](./LICENSE)
|
|
12
|
+

|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
HOLO-Codex, short for **Human On Loop Codex**, turns long-running Codex workflows into observable, recoverable systems that you can supervise without living inside chat history.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Codex can plan, edit, test, review, and hand work across agents. HOLO-Codex gives that work a local control plane: workflow state, evidence, gates, hooks, review status, recovery actions, and a dashboard you can open while the work is running.
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
- The `agent-loop` CLI for local loop state, hooks, dashboard, workflow evidence, and rollback-safe local install.
|
|
15
|
-
- Local SQLite state under `.agent-loop/`.
|
|
16
|
-
- A local dashboard for Mission Control, workflow board, observability, gates, review/CI state, workers, artifacts, recovery, notifications, policy config, and theme modes.
|
|
17
|
-
- stdio MCP control plane.
|
|
18
|
-
- Codex hooks for policy checks and observability.
|
|
19
|
-
- TypeScript + Vitest test suite.
|
|
20
|
-
- Bilingual display support for `zh-CN`, `en-US`, and `system` locale selection.
|
|
21
|
-
- Workflow profiles, role profiles, `generic-loop`, and the first bundled workflow: `pr-loop`.
|
|
18
|
+
## Quickstart
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Install the package and attach HOLO-Codex to a target repository:
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npm install --global holo-codex
|
|
24
|
+
agent-loop --repo /path/to/repo init
|
|
25
|
+
agent-loop install-hooks --repo /path/to/repo
|
|
26
|
+
agent-loop --repo /path/to/repo dashboard
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Open the printed loopback URL. The dashboard unlocks locally without putting a token in the URL.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
Plugin enablement is separate from the CLI install:
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- Source directory: `plugins/autonomous-pr-loop/`
|
|
33
|
-
- npm package name: `holo-codex`
|
|
34
|
-
- Local marketplace entry name: `codex-auto-pr-loop`
|
|
33
|
+
```bash
|
|
34
|
+
codex plugin marketplace add "$(npm root -g)/holo-codex"
|
|
35
|
+
```
|
|
35
36
|
|
|
36
|
-
|
|
37
|
+
Then enable the `autonomous-pr-loop` plugin in Codex. The CLI is called `agent-loop` for compatibility.
|
|
37
38
|
|
|
38
|
-
##
|
|
39
|
+
## Why HOLO-Codex?
|
|
40
|
+
|
|
41
|
+
| Problem | What HOLO-Codex adds |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Long Codex tasks disappear into a thread. | A workflow board shows the current stage, state source, evidence, and next action. |
|
|
44
|
+
| Manual decisions, review reports, and CI signals live in different places. | Evidence is recorded as append-only workflow events and surfaced in the dashboard. |
|
|
45
|
+
| Recovery gets hard after a pause, gate, failed worker, or context switch. | Gates, recovery actions, timeline, artifacts, and hook diagnostics stay tied to the run. |
|
|
46
|
+
|
|
47
|
+
## What It Gives You
|
|
48
|
+
|
|
49
|
+
- Workflow Board for long Codex workflows, including stage status, evidence counts, and current-stage details.
|
|
50
|
+
- Evidence Trail for plans, implementation notes, tests, reviews, PR actions, CI checks, merge readiness, and cleanup.
|
|
51
|
+
- Gates and Recovery for policy blocks, human approval, stale runs, and historical gate re-evaluation.
|
|
52
|
+
- Hook-based Observability that routes Codex hook events by repo, worktree, and session context.
|
|
53
|
+
- Local Dashboard for Mission Control, observability, gates, review/CI state, workers, artifacts, notifications, policy config, and theme modes.
|
|
54
|
+
- CLI and stdio MCP control plane for scripts, skills, and Codex plugin actions.
|
|
55
|
+
- Review and CI visibility through structured review evidence, severity summaries, PR comment links, and merge readiness checks.
|
|
56
|
+
|
|
57
|
+
HOLO-Codex is local-first. It is not a hosted service, and it does not run cloud workers or GitHub webhooks for you.
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
## How It Fits Together
|
|
41
60
|
|
|
42
|
-
|
|
61
|
+
```mermaid
|
|
62
|
+
flowchart LR
|
|
63
|
+
A["Codex skill or commander"] --> B["agent-loop CLI / MCP"]
|
|
64
|
+
B --> C["Local workflow state<br/>.agent-loop SQLite"]
|
|
65
|
+
B --> D["Codex hooks<br/>repo / worktree / session routing"]
|
|
66
|
+
C --> E["Dashboard workflow board"]
|
|
67
|
+
D --> E
|
|
68
|
+
E --> F["Gates and recovery"]
|
|
69
|
+
E --> G["Review, CI, PR, cleanup evidence"]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The dashboard and MCP tools read persisted loop state. They do not depend on the chat transcript being intact.
|
|
73
|
+
|
|
74
|
+
## First Workflow: PR Delivery
|
|
75
|
+
|
|
76
|
+
PR delivery is the first bundled workflow. It is the strongest sample today, not the product boundary.
|
|
43
77
|
|
|
44
78
|
```text
|
|
45
|
-
|
|
46
|
-
bind work item
|
|
47
|
-
plan
|
|
48
|
-
build
|
|
49
|
-
verify
|
|
50
|
-
open PR
|
|
51
|
-
run review / CI
|
|
52
|
-
fix findings
|
|
53
|
-
check merge readiness
|
|
54
|
-
merge
|
|
55
|
-
cleanup
|
|
79
|
+
Work Item -> Plan -> Build -> Verify -> PR -> Review -> Merge Readiness -> Cleanup
|
|
56
80
|
```
|
|
57
81
|
|
|
58
|
-
The
|
|
82
|
+
The bundled PR workflow can bind a GitHub issue, track implementation evidence, collect tester and reviewer reports, show PR and CI readiness, and keep cleanup visible after merge.
|
|
83
|
+
|
|
84
|
+
The same control-plane model can support other long-running Codex workflows:
|
|
85
|
+
|
|
86
|
+
- release preparation
|
|
87
|
+
- repo hygiene
|
|
88
|
+
- security review
|
|
89
|
+
- docs publishing
|
|
90
|
+
- migrations
|
|
91
|
+
- evaluations
|
|
92
|
+
- customer issue triage
|
|
93
|
+
|
|
94
|
+
## Compatibility Names
|
|
95
|
+
|
|
96
|
+
HOLO-Codex is the public product name. Some runtime identifiers keep older names so existing installs and local state do not break:
|
|
59
97
|
|
|
60
|
-
|
|
98
|
+
| Public concept | Stable identifier |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| CLI command | `agent-loop` |
|
|
101
|
+
| Runtime state directory | `.agent-loop/` |
|
|
102
|
+
| Plugin id and MCP server id | `autonomous-pr-loop` |
|
|
103
|
+
| Source directory | `plugins/autonomous-pr-loop/` |
|
|
104
|
+
| npm package | `holo-codex` |
|
|
105
|
+
| Local marketplace entry | `codex-auto-pr-loop` |
|
|
61
106
|
|
|
62
|
-
|
|
107
|
+
These are compatibility identifiers, not separate products.
|
|
108
|
+
|
|
109
|
+
## Install Details
|
|
63
110
|
|
|
64
111
|
Canonical public source:
|
|
65
112
|
|
|
@@ -74,69 +121,56 @@ Requirements:
|
|
|
74
121
|
- GitHub CLI `gh`
|
|
75
122
|
- Codex CLI / plugin support
|
|
76
123
|
- `pnpm` when installing from source or using rollback-snapshot local install
|
|
77
|
-
- Optional
|
|
124
|
+
- Optional: GitNexus via `npx gitnexus`
|
|
78
125
|
|
|
79
126
|
Install from npm:
|
|
80
127
|
|
|
81
128
|
```bash
|
|
82
129
|
npm install --global holo-codex
|
|
83
|
-
# Replace /path/to/repo with the repository you want HOLO-Codex to supervise.
|
|
84
130
|
agent-loop --repo /path/to/repo init
|
|
85
131
|
agent-loop install-hooks --repo /path/to/repo
|
|
86
132
|
agent-loop --repo /path/to/repo doctor
|
|
87
133
|
```
|
|
88
134
|
|
|
89
|
-
The npm package installs the `agent-loop` CLI. `agent-loop install-hooks` installs or refreshes the hook router and target binding without reinstalling the global CLI.
|
|
135
|
+
The npm package installs the `agent-loop` CLI. `agent-loop install-hooks` installs or refreshes the hook router and target binding without reinstalling the global CLI.
|
|
136
|
+
|
|
137
|
+
To remove an npm install:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
agent-loop hooks unbind --repo /path/to/repo
|
|
141
|
+
npm uninstall --global holo-codex
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Remove HOLO-Codex router entries from `~/.codex/hooks.json` only when no target repositories still use them.
|
|
90
145
|
|
|
91
|
-
Install from source when developing HOLO-Codex or when you want to inspect the
|
|
146
|
+
Install from source when developing HOLO-Codex or when you want to inspect the checkout:
|
|
92
147
|
|
|
93
148
|
```bash
|
|
94
149
|
git clone https://github.com/tizerluo/HOLO-Codex.git
|
|
95
150
|
cd HOLO-Codex
|
|
96
151
|
pnpm install
|
|
97
152
|
pnpm build:hooks
|
|
98
|
-
# Replace /path/to/repo with the repository you want HOLO-Codex to supervise.
|
|
99
153
|
pnpm agent-loop local install --repo /path/to/repo
|
|
100
154
|
agent-loop --repo /path/to/repo status
|
|
101
155
|
```
|
|
102
156
|
|
|
103
|
-
`pnpm agent-loop ...`
|
|
157
|
+
`pnpm agent-loop ...` runs from the source checkout. `agent-loop ...` is the global command after npm or local source install.
|
|
104
158
|
|
|
105
|
-
For
|
|
159
|
+
For the full install, upgrade, reinstall, uninstall, rollback, and smoke-test checklist, see [Local Release Readiness](./docs/local-release-readiness.md).
|
|
106
160
|
|
|
107
|
-
|
|
161
|
+
## Initialize A Repo
|
|
108
162
|
|
|
109
|
-
|
|
110
|
-
codex plugin marketplace add "$(npm root -g)/holo-codex"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
For source installs:
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
codex plugin marketplace add /path/to/HOLO-Codex
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Then enable the `autonomous-pr-loop` plugin in Codex. Plugin enablement and global CLI installation are separate steps.
|
|
120
|
-
|
|
121
|
-
## Initialize State
|
|
122
|
-
|
|
123
|
-
Run from the target repository root:
|
|
163
|
+
Run from the target repository root or pass `--repo`:
|
|
124
164
|
|
|
125
165
|
```bash
|
|
126
166
|
agent-loop --repo /path/to/repo init
|
|
127
167
|
agent-loop --repo /path/to/repo doctor
|
|
128
|
-
agent-loop --repo /path/to/repo status
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Install Codex hooks:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
168
|
agent-loop install-hooks --repo /path/to/repo
|
|
135
169
|
```
|
|
136
170
|
|
|
137
|
-
|
|
171
|
+
Hook installation writes one router into `~/.codex/hooks.json`, preserves existing hooks, and records target repository bindings under `~/.codex/agent-loop/hook-bindings.json`.
|
|
138
172
|
|
|
139
|
-
|
|
173
|
+
Multiple repositories can share the same `CODEX_HOME`. Hook events are routed by Codex cwd, worktree, and session context before any repository state is written or policy is applied. A separate `CODEX_HOME` is still useful for high-isolation sandbox testing.
|
|
140
174
|
|
|
141
175
|
Runtime files are written to `.agent-loop/` and must not be committed.
|
|
142
176
|
|
|
@@ -146,7 +180,7 @@ Runtime files are written to `.agent-loop/` and must not be committed.
|
|
|
146
180
|
agent-loop --repo /path/to/repo dashboard
|
|
147
181
|
```
|
|
148
182
|
|
|
149
|
-
The command prints a loopback URL
|
|
183
|
+
The command prints a loopback URL:
|
|
150
184
|
|
|
151
185
|
```text
|
|
152
186
|
dashboard started
|
|
@@ -154,9 +188,9 @@ url: http://127.0.0.1:<port>/
|
|
|
154
188
|
targetRepoRoot: /path/to/repo
|
|
155
189
|
```
|
|
156
190
|
|
|
157
|
-
Dashboard mutations require the local session token and go through the shared controller. The UI does not write SQLite directly. Loopback dashboard sessions unlock through a same-origin
|
|
191
|
+
Dashboard mutations require the local session token and go through the shared controller. The UI does not write SQLite directly. Loopback dashboard sessions unlock through a same-origin bootstrap; the stderr token is only a fallback for static UI or recovery. Do not copy it into docs, logs, PR bodies, commits, artifacts, or screenshots.
|
|
158
192
|
|
|
159
|
-
Dashboard-visible delivery work
|
|
193
|
+
Dashboard-visible delivery work comes from persisted `agent-loop` actions and workflow evidence. Direct terminal edits or commander decisions become visible only when they are recorded as agent-loop events, artifacts, or PR comments.
|
|
160
194
|
|
|
161
195
|
## Common CLI
|
|
162
196
|
|
|
@@ -182,7 +216,7 @@ Human-readable CLI output supports `--locale zh-CN|en-US|system`. JSON output re
|
|
|
182
216
|
|
|
183
217
|
## Workflow Profiles And Themes
|
|
184
218
|
|
|
185
|
-
The default workflow
|
|
219
|
+
The default workflow is `pr-loop` with `default_pr_loop` and `default_pr_roles`. Policy Config can also select `generic-loop` with built-in profiles for research reports, document preparation, repo hygiene, weekly review, and data extraction workflows. For a concrete non-PR workflow, see the [generic-loop repo hygiene example](./docs/examples/generic-loop-repo-hygiene.md).
|
|
186
220
|
|
|
187
221
|
Dashboard theme is a local browser preference. It supports `light`, `dark`, and `system`, and does not write to repo config or SQLite.
|
|
188
222
|
|
|
@@ -192,9 +226,41 @@ Dashboard theme is a local browser preference. It supports `light`, `dark`, and
|
|
|
192
226
|
- The supervisor owns Git and GitHub lifecycle actions.
|
|
193
227
|
- Destructive Git/GitHub commands are blocked by command policy and hooks.
|
|
194
228
|
- Merge readiness depends on config, review/CI evidence, open review comments, scope guard, and policy decisions.
|
|
195
|
-
-
|
|
229
|
+
- HOLO-Codex must not store secrets, raw prompts, raw transcripts, dashboard tokens, or raw hook payloads in docs, logs, artifacts, commits, or PR bodies.
|
|
196
230
|
- Hooks cover the Codex tool loop, not manual commands run in an external terminal.
|
|
197
231
|
|
|
232
|
+
See [Trust and Safety](./docs/trust-and-safety.md) and [Security](./SECURITY.md).
|
|
233
|
+
|
|
234
|
+
## FAQ
|
|
235
|
+
|
|
236
|
+
### Is HOLO-Codex hosted?
|
|
237
|
+
|
|
238
|
+
No. HOLO-Codex runs locally. The dashboard, SQLite state, hooks, and CLI live on your machine.
|
|
239
|
+
|
|
240
|
+
### Does it replace Codex?
|
|
241
|
+
|
|
242
|
+
No. Codex still does the work. HOLO-Codex gives long Codex workflows state, evidence, gates, recovery, and a dashboard.
|
|
243
|
+
|
|
244
|
+
### Why is the CLI still called `agent-loop`?
|
|
245
|
+
|
|
246
|
+
`agent-loop` is the stable runtime command. Keeping it avoids breaking existing installs, scripts, hooks, and local state.
|
|
247
|
+
|
|
248
|
+
### Why is the plugin id still `autonomous-pr-loop`?
|
|
249
|
+
|
|
250
|
+
That id is part of the existing plugin and MCP wiring. HOLO-Codex is the public product name; `autonomous-pr-loop` is a compatibility identifier.
|
|
251
|
+
|
|
252
|
+
### Does it auto-merge PRs?
|
|
253
|
+
|
|
254
|
+
No. HOLO-Codex can track merge readiness and evidence, but the supervisor controls Git and GitHub lifecycle actions.
|
|
255
|
+
|
|
256
|
+
### Does it require GitHub?
|
|
257
|
+
|
|
258
|
+
The bundled PR delivery workflow expects GitHub and `gh`. The underlying loop model can support non-PR workflows through `generic-loop`.
|
|
259
|
+
|
|
260
|
+
### Where is state stored?
|
|
261
|
+
|
|
262
|
+
Repository runtime state lives under `.agent-loop/`. Hook routing bindings live under `~/.codex/agent-loop/`. Runtime files should not be committed.
|
|
263
|
+
|
|
198
264
|
## Development
|
|
199
265
|
|
|
200
266
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -4,62 +4,109 @@
|
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/holo-codex)
|
|
8
|
+
[](https://www.npmjs.com/package/holo-codex)
|
|
9
|
+
[](https://github.com/tizerluo/HOLO-Codex/releases)
|
|
10
|
+
[](https://github.com/tizerluo/HOLO-Codex/actions/workflows/ci.yml)
|
|
11
|
+
[](./LICENSE)
|
|
12
|
+

|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
HOLO-Codex 是 **Human On Loop Codex** 的缩写。它把长流程 Codex workflow 变成可观察、可恢复、可人工接管的系统,让你不用一直守在聊天记录里猜它做到了哪一步。
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Codex 负责计划、改代码、测试、review 和调用子代理。HOLO-Codex 负责把这些工作落到本地 control plane 上:workflow 状态、evidence、gates、hooks、review 状态、恢复动作,以及一个可以边跑边看的 dashboard。
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
- `agent-loop` CLI:管理本地 loop 状态、hooks、dashboard、workflow evidence 和可回滚本地安装。
|
|
15
|
-
- `.agent-loop/` 下的本地 SQLite 状态。
|
|
16
|
-
- 本地 dashboard:Mission Control、workflow board、Observability Console、Gate、Review/CI、Worker、Artifact、Notifications、Recovery、Policy Config、主题模式。
|
|
17
|
-
- stdio MCP control plane。
|
|
18
|
-
- 用于 policy 检查和 observability 的 Codex hooks。
|
|
19
|
-
- TypeScript + Vitest 测试套件。
|
|
20
|
-
- `zh-CN`、`en-US`、`system` 双语显示支持。
|
|
21
|
-
- workflow profile、role profile、`generic-loop`,以及第一个内置 workflow:`pr-loop`。
|
|
18
|
+
## 快速开始
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
安装 npm package,并把 HOLO-Codex 接到一个目标仓库:
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
```bash
|
|
23
|
+
npm install --global holo-codex
|
|
24
|
+
agent-loop --repo /path/to/repo init
|
|
25
|
+
agent-loop install-hooks --repo /path/to/repo
|
|
26
|
+
agent-loop --repo /path/to/repo dashboard
|
|
27
|
+
```
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
打开命令打印出来的本地 URL。Dashboard 会在本机自动解锁,不会把 token 放进 URL。
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
- 运行态目录:`.agent-loop/`
|
|
31
|
-
- Plugin id 和 MCP server id:`autonomous-pr-loop`
|
|
32
|
-
- 源码目录:`plugins/autonomous-pr-loop/`
|
|
33
|
-
- npm package 名:`holo-codex`
|
|
34
|
-
- 本地 marketplace 条目名:`codex-auto-pr-loop`
|
|
31
|
+
Codex plugin 启用和 CLI 安装是两件事:
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
```bash
|
|
34
|
+
codex plugin marketplace add "$(npm root -g)/holo-codex"
|
|
35
|
+
```
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
然后在 Codex 里启用 `autonomous-pr-loop` 插件。CLI 继续叫 `agent-loop`,这是兼容已有安装和本地状态的名字。
|
|
38
|
+
|
|
39
|
+
## 为什么需要 HOLO-Codex
|
|
39
40
|
|
|
40
|
-
|
|
41
|
+
| 问题 | HOLO-Codex 补上的东西 |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| 长流程 Codex 任务容易消失在一个聊天线程里。 | Workflow board 会显示当前阶段、状态来源、证据和下一步。 |
|
|
44
|
+
| 人工决策、review report、CI 信号分散在不同地方。 | Evidence 会作为 append-only workflow event 记录下来,并显示在 dashboard。 |
|
|
45
|
+
| 一旦暂停、遇到 gate、worker 失败或切上下文,恢复成本很高。 | Gate、recovery、timeline、artifact 和 hook 诊断都会绑定到同一个 run。 |
|
|
41
46
|
|
|
42
|
-
|
|
47
|
+
## 它提供什么
|
|
48
|
+
|
|
49
|
+
- Workflow Board:展示长流程 Codex workflow 的阶段状态、证据数量和当前阶段详情。
|
|
50
|
+
- Evidence Trail:记录计划、实现、测试、review、PR、CI、merge readiness 和 cleanup。
|
|
51
|
+
- Gates and Recovery:处理 policy block、人工批准、stale run 和历史 gate re-evaluate。
|
|
52
|
+
- Hook-based Observability:按 repo、worktree、session context 路由 Codex hook events。
|
|
53
|
+
- Local Dashboard:包含 Mission Control、Observability Console、Gate、Review/CI、Worker、Artifact、Notifications、Recovery、Policy Config 和主题模式。
|
|
54
|
+
- CLI 和 stdio MCP control plane:供脚本、skills 和 Codex plugin 调用。
|
|
55
|
+
- Review and CI visibility:通过结构化 review evidence、severity summary、PR comment link 和 merge readiness 追踪交付状态。
|
|
56
|
+
|
|
57
|
+
HOLO-Codex 是 local-first 工具。它不是托管服务,也不会替你运行云端 worker 或 GitHub webhook daemon。
|
|
58
|
+
|
|
59
|
+
## 它如何工作
|
|
60
|
+
|
|
61
|
+
```mermaid
|
|
62
|
+
flowchart LR
|
|
63
|
+
A["Codex skill or commander"] --> B["agent-loop CLI / MCP"]
|
|
64
|
+
B --> C["Local workflow state<br/>.agent-loop SQLite"]
|
|
65
|
+
B --> D["Codex hooks<br/>repo / worktree / session routing"]
|
|
66
|
+
C --> E["Dashboard workflow board"]
|
|
67
|
+
D --> E
|
|
68
|
+
E --> F["Gates and recovery"]
|
|
69
|
+
E --> G["Review, CI, PR, cleanup evidence"]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Dashboard 和 MCP tools 读取持久化 loop 状态,不依赖聊天记录还在不在。
|
|
73
|
+
|
|
74
|
+
## 第一个工作流:PR 交付
|
|
75
|
+
|
|
76
|
+
PR 交付是 HOLO-Codex 随附的第一个完整 workflow,也是目前最完整的样板,但它不是产品边界。
|
|
43
77
|
|
|
44
78
|
```text
|
|
45
|
-
|
|
46
|
-
bind work item
|
|
47
|
-
plan
|
|
48
|
-
build
|
|
49
|
-
verify
|
|
50
|
-
open PR
|
|
51
|
-
run review / CI
|
|
52
|
-
fix findings
|
|
53
|
-
check merge readiness
|
|
54
|
-
merge
|
|
55
|
-
cleanup
|
|
79
|
+
Work Item -> Plan -> Build -> Verify -> PR -> Review -> Merge Readiness -> Cleanup
|
|
56
80
|
```
|
|
57
81
|
|
|
58
|
-
|
|
82
|
+
内置 PR workflow 可以绑定 GitHub issue、追踪实现证据、收集 tester 和 reviewer report、显示 PR/CI readiness,并在 merge 后继续保留 cleanup 状态。
|
|
83
|
+
|
|
84
|
+
同一套 control plane 以后也可以承载其他长流程 Codex workflow:
|
|
85
|
+
|
|
86
|
+
- release 准备
|
|
87
|
+
- repo hygiene
|
|
88
|
+
- security review
|
|
89
|
+
- docs publishing
|
|
90
|
+
- migration
|
|
91
|
+
- evaluation
|
|
92
|
+
- customer issue triage
|
|
93
|
+
|
|
94
|
+
## 兼容名称
|
|
95
|
+
|
|
96
|
+
HOLO-Codex 是公开产品名。一些运行时标识会继续保留旧名称,避免破坏已有安装、脚本、hooks 和本地状态:
|
|
59
97
|
|
|
60
|
-
|
|
98
|
+
| 公开概念 | 稳定标识 |
|
|
99
|
+
| --- | --- |
|
|
100
|
+
| CLI 命令 | `agent-loop` |
|
|
101
|
+
| 运行态目录 | `.agent-loop/` |
|
|
102
|
+
| Plugin id 和 MCP server id | `autonomous-pr-loop` |
|
|
103
|
+
| 源码目录 | `plugins/autonomous-pr-loop/` |
|
|
104
|
+
| npm package | `holo-codex` |
|
|
105
|
+
| 本地 marketplace 条目 | `codex-auto-pr-loop` |
|
|
106
|
+
|
|
107
|
+
这些是兼容标识,不是第二个产品名。
|
|
61
108
|
|
|
62
|
-
##
|
|
109
|
+
## 安装细节
|
|
63
110
|
|
|
64
111
|
公开源码入口:
|
|
65
112
|
|
|
@@ -74,19 +121,27 @@ https://github.com/tizerluo/HOLO-Codex
|
|
|
74
121
|
- GitHub CLI `gh`
|
|
75
122
|
- Codex CLI / plugin support
|
|
76
123
|
- 从源码安装或使用 snapshot/rollback local install 时需要 `pnpm`
|
|
77
|
-
-
|
|
124
|
+
- 可选:GitNexus,使用 `npx gitnexus`
|
|
78
125
|
|
|
79
126
|
从 npm 安装:
|
|
80
127
|
|
|
81
128
|
```bash
|
|
82
129
|
npm install --global holo-codex
|
|
83
|
-
# 将 /path/to/repo 替换成你要让 HOLO-Codex 监督的目标仓库。
|
|
84
130
|
agent-loop --repo /path/to/repo init
|
|
85
131
|
agent-loop install-hooks --repo /path/to/repo
|
|
86
132
|
agent-loop --repo /path/to/repo doctor
|
|
87
133
|
```
|
|
88
134
|
|
|
89
|
-
npm package 会安装 `agent-loop` CLI。`agent-loop install-hooks` 会安装或刷新 hook router 和目标仓库绑定,不会重新安装全局 CLI
|
|
135
|
+
npm package 会安装 `agent-loop` CLI。`agent-loop install-hooks` 会安装或刷新 hook router 和目标仓库绑定,不会重新安装全局 CLI。
|
|
136
|
+
|
|
137
|
+
移除 npm 安装:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
agent-loop hooks unbind --repo /path/to/repo
|
|
141
|
+
npm uninstall --global holo-codex
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
只有确认没有任何目标仓库还在使用 HOLO-Codex router 后,才从 `~/.codex/hooks.json` 移除 HOLO-Codex router entries。
|
|
90
145
|
|
|
91
146
|
开发 HOLO-Codex 或需要直接检查源码 checkout 时,从源码安装:
|
|
92
147
|
|
|
@@ -95,48 +150,27 @@ git clone https://github.com/tizerluo/HOLO-Codex.git
|
|
|
95
150
|
cd HOLO-Codex
|
|
96
151
|
pnpm install
|
|
97
152
|
pnpm build:hooks
|
|
98
|
-
# 将 /path/to/repo 替换成你要让 HOLO-Codex 监督的目标仓库。
|
|
99
153
|
pnpm agent-loop local install --repo /path/to/repo
|
|
100
154
|
agent-loop --repo /path/to/repo status
|
|
101
155
|
```
|
|
102
156
|
|
|
103
|
-
`pnpm agent-loop ...` 是源码 checkout 内的命令。`agent-loop ...` 是 npm
|
|
104
|
-
|
|
105
|
-
完整的本地安装、升级、重装、卸载和 smoke test 清单见:[Local Release Readiness](./docs/local-release-readiness.md)。
|
|
106
|
-
|
|
107
|
-
把 HOLO-Codex 加入本地 Codex plugin marketplace。npm 安装时:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
codex plugin marketplace add "$(npm root -g)/holo-codex"
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
源码安装时:
|
|
157
|
+
`pnpm agent-loop ...` 是源码 checkout 内的命令。`agent-loop ...` 是 npm 或本地源码安装后从任意目录使用的全局命令。
|
|
114
158
|
|
|
115
|
-
|
|
116
|
-
codex plugin marketplace add /path/to/HOLO-Codex
|
|
117
|
-
```
|
|
159
|
+
完整的安装、升级、重装、卸载、rollback 和 smoke test 清单见:[Local Release Readiness](./docs/local-release-readiness.md)。
|
|
118
160
|
|
|
119
|
-
|
|
161
|
+
## 初始化一个仓库
|
|
120
162
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
在目标仓库根目录执行:
|
|
163
|
+
在目标仓库根目录执行,或显式传 `--repo`:
|
|
124
164
|
|
|
125
165
|
```bash
|
|
126
166
|
agent-loop --repo /path/to/repo init
|
|
127
167
|
agent-loop --repo /path/to/repo doctor
|
|
128
|
-
agent-loop --repo /path/to/repo status
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
安装 Codex hooks:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
168
|
agent-loop install-hooks --repo /path/to/repo
|
|
135
169
|
```
|
|
136
170
|
|
|
137
|
-
|
|
171
|
+
Hook 安装会向 `~/.codex/hooks.json` 写入一组 router,保留已有 hooks,并在 `~/.codex/agent-loop/hook-bindings.json` 记录目标仓库绑定。
|
|
138
172
|
|
|
139
|
-
|
|
173
|
+
多个仓库可以共用同一个 `CODEX_HOME`。Hook event 会先按 Codex cwd、worktree 和 session context 路由,再写入仓库状态或执行 policy。独立 `CODEX_HOME` 仍适合高隔离 sandbox 测试。
|
|
140
174
|
|
|
141
175
|
运行态文件写入 `.agent-loop/`,不要提交。
|
|
142
176
|
|
|
@@ -146,7 +180,7 @@ agent-loop install-hooks --repo /path/to/repo
|
|
|
146
180
|
agent-loop --repo /path/to/repo dashboard
|
|
147
181
|
```
|
|
148
182
|
|
|
149
|
-
|
|
183
|
+
命令会打印一个本地 URL:
|
|
150
184
|
|
|
151
185
|
```text
|
|
152
186
|
dashboard 已启动
|
|
@@ -154,9 +188,9 @@ url: http://127.0.0.1:<port>/
|
|
|
154
188
|
targetRepoRoot: /path/to/repo
|
|
155
189
|
```
|
|
156
190
|
|
|
157
|
-
Dashboard mutation 必须带本地 session token,并统一走 controller。UI 不直接写 SQLite。本地 loopback dashboard 会用同源
|
|
191
|
+
Dashboard mutation 必须带本地 session token,并统一走 controller。UI 不直接写 SQLite。本地 loopback dashboard 会用同源 bootstrap 自动解锁。stderr token 只作为静态 UI 或恢复场景的 fallback,不要把它复制到 docs、日志、PR body、commit、artifact 或截图里。
|
|
158
192
|
|
|
159
|
-
Dashboard 能看到的交付工作来自持久化的 `agent-loop` 动作和 workflow evidence。直接在终端改文件或 commander 决策不会自动出现在 dashboard,除非它们被记录成 agent-loop event、artifact 或 PR comment
|
|
193
|
+
Dashboard 能看到的交付工作来自持久化的 `agent-loop` 动作和 workflow evidence。直接在终端改文件或 commander 决策不会自动出现在 dashboard,除非它们被记录成 agent-loop event、artifact 或 PR comment。
|
|
160
194
|
|
|
161
195
|
## 常用 CLI
|
|
162
196
|
|
|
@@ -182,9 +216,9 @@ agent-loop --repo /path/to/repo dashboard
|
|
|
182
216
|
|
|
183
217
|
## Workflow Profiles 和主题
|
|
184
218
|
|
|
185
|
-
默认 workflow
|
|
219
|
+
默认 workflow 是 `pr-loop`,使用 `default_pr_loop` 和 `default_pr_roles`。Policy Config 也可以选择 `generic-loop`,并使用内置的调研报告、文档准备、仓库卫生审计、周报、数据抽取 workflow profiles。具体非 PR 工作流可参考:[generic-loop 仓库卫生审计示例](./docs/examples/generic-loop-repo-hygiene.md)。
|
|
186
220
|
|
|
187
|
-
Dashboard 主题是浏览器本地显示偏好,支持 `light`、`dark
|
|
221
|
+
Dashboard 主题是浏览器本地显示偏好,支持 `light`、`dark` 和 `system`,不会写入 repo config 或 SQLite。
|
|
188
222
|
|
|
189
223
|
## 安全边界
|
|
190
224
|
|
|
@@ -192,9 +226,41 @@ Dashboard 主题是浏览器本地显示偏好,支持 `light`、`dark`、`syst
|
|
|
192
226
|
- Supervisor 负责 Git 和 GitHub 生命周期。
|
|
193
227
|
- 破坏性 Git/GitHub 命令由 command policy 和 hooks 阻止。
|
|
194
228
|
- Merge readiness 由 config、review/CI evidence、open review comments、scope guard 和 policy decisions 共同决定。
|
|
195
|
-
-
|
|
229
|
+
- HOLO-Codex 不应该把 secrets、raw prompts、raw transcripts、dashboard tokens 或 raw hook payloads 写入 docs、日志、artifacts、commit 或 PR body。
|
|
196
230
|
- Hooks 只覆盖 Codex tool loop,不拦截外部 Terminal 手动命令。
|
|
197
231
|
|
|
232
|
+
更多细节见:[信任与安全](./docs/trust-and-safety.md) 和 [安全政策](./SECURITY.md)。
|
|
233
|
+
|
|
234
|
+
## FAQ
|
|
235
|
+
|
|
236
|
+
### HOLO-Codex 是托管服务吗?
|
|
237
|
+
|
|
238
|
+
不是。HOLO-Codex 在本机运行。Dashboard、SQLite 状态、hooks 和 CLI 都在你的机器上。
|
|
239
|
+
|
|
240
|
+
### 它会替代 Codex 吗?
|
|
241
|
+
|
|
242
|
+
不会。Codex 还是负责做事。HOLO-Codex 给长流程 Codex 工作补上状态、证据、gate、恢复动作和 dashboard。
|
|
243
|
+
|
|
244
|
+
### 为什么 CLI 还叫 `agent-loop`?
|
|
245
|
+
|
|
246
|
+
`agent-loop` 是稳定运行时命令。保留这个名字可以避免破坏已有安装、脚本、hooks 和本地状态。
|
|
247
|
+
|
|
248
|
+
### 为什么 plugin id 还是 `autonomous-pr-loop`?
|
|
249
|
+
|
|
250
|
+
这个 id 已经接入现有 plugin 和 MCP wiring。HOLO-Codex 是公开产品名,`autonomous-pr-loop` 是兼容标识。
|
|
251
|
+
|
|
252
|
+
### 它会自动 merge PR 吗?
|
|
253
|
+
|
|
254
|
+
不会。HOLO-Codex 可以追踪 merge readiness 和 evidence,但 Git 和 GitHub 生命周期动作仍由 supervisor 控制。
|
|
255
|
+
|
|
256
|
+
### 它必须依赖 GitHub 吗?
|
|
257
|
+
|
|
258
|
+
内置 PR delivery workflow 需要 GitHub 和 `gh`。底层 loop 模型可以通过 `generic-loop` 承载非 PR workflow。
|
|
259
|
+
|
|
260
|
+
### 状态存在哪里?
|
|
261
|
+
|
|
262
|
+
仓库运行态状态在 `.agent-loop/` 下。Hook routing bindings 在 `~/.codex/agent-loop/` 下。运行态文件不要提交。
|
|
263
|
+
|
|
198
264
|
## 开发
|
|
199
265
|
|
|
200
266
|
```bash
|