ultracode-for-codex 0.2.5 → 0.3.0
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 +54 -12
- package/ULTRACODE_INSTALL.md +58 -13
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +848 -11
- package/dist/codex/subagent-backend.d.ts +1 -0
- package/dist/codex/subagent-backend.js +22 -10
- package/dist/runtime/package-info.d.ts +1 -0
- package/dist/runtime/package-info.js +12 -0
- package/dist/runtime/workflow-journal.d.ts +0 -1
- package/dist/runtime/workflow-journal.js +1 -4
- package/dist/runtime/workflow-runtime.d.ts +19 -1
- package/dist/runtime/workflow-runtime.js +144 -80
- package/dist/settings.js +1 -6
- package/docs/provenance-audit.md +3 -2
- package/docs/ultracode-p3c-worktree-isolation.md +8 -8
- package/package.json +4 -1
- package/settings.json +1 -1
- package/skills/ultracode-for-codex/SKILL.md +32 -13
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm run pack:ultracode-for-codex
|
|
|
26
26
|
Install the tarball from a target project:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
npm install --save-dev /path/to/ultracode-for-codex
|
|
29
|
+
npm install --save-dev /path/to/ultracode-for-codex-<version>.tgz
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Run a workflow:
|
|
@@ -41,6 +41,17 @@ npm exec -- ultracode-for-codex run \
|
|
|
41
41
|
|
|
42
42
|
By default this prints a background launch record to stdout. The record contains
|
|
43
43
|
`jobId`, `pid`, `resultPath`, `progressPath`, `metadataPath`, and `pidPath`.
|
|
44
|
+
Use the job id to inspect or control the background run:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/target-repo
|
|
48
|
+
npm exec -- ultracode-for-codex wait <jobId> --cwd /path/to/target-repo
|
|
49
|
+
npm exec -- ultracode-for-codex logs <jobId> --cwd /path/to/target-repo --tail 40
|
|
50
|
+
npm exec -- ultracode-for-codex result <jobId> --cwd /path/to/target-repo
|
|
51
|
+
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/target-repo
|
|
52
|
+
npm exec -- ultracode-for-codex jobs --cwd /path/to/target-repo
|
|
53
|
+
npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/target-repo
|
|
54
|
+
```
|
|
44
55
|
|
|
45
56
|
Run attached to the current terminal:
|
|
46
57
|
|
|
@@ -84,7 +95,7 @@ Package defaults live in `settings.json`:
|
|
|
84
95
|
"progress": "jsonl",
|
|
85
96
|
"permission": "ask",
|
|
86
97
|
"retryLimit": 0,
|
|
87
|
-
"timeoutMs":
|
|
98
|
+
"timeoutMs": 0,
|
|
88
99
|
"background": {
|
|
89
100
|
"runDir": ".ultracode-for-codex/background/{jobId}",
|
|
90
101
|
"resultFile": "result.json",
|
|
@@ -98,25 +109,51 @@ Package defaults live in `settings.json`:
|
|
|
98
109
|
|
|
99
110
|
Use `--execution attached`, `--progress`, `--permission`, `--retry-limit`, and
|
|
100
111
|
`--timeout-ms` to override settings for one run.
|
|
101
|
-
The package default workflow timeout is `
|
|
112
|
+
The package default workflow timeout is `0`, meaning the workflow waits until it
|
|
113
|
+
completes, is cancelled, or the Codex app-server exits. Set `--timeout-ms` to a
|
|
114
|
+
positive value to opt into a deadline for one run.
|
|
115
|
+
Use the default background execution for long Codex-launched work so Codex can
|
|
116
|
+
continue other tasks and inspect the job later with `status`, `logs`, or
|
|
117
|
+
`result`. Use
|
|
118
|
+
`--execution attached` only when the caller must block until the final result.
|
|
102
119
|
|
|
103
120
|
## CLI Controls
|
|
104
121
|
|
|
122
|
+
- Use `--version` or `-v` to print the installed package version.
|
|
123
|
+
- Use `status`, `wait`, `logs`, `result`, and `cancel` with a background
|
|
124
|
+
`jobId` or `metadata.json` path to inspect, wait for, read, or cancel OS
|
|
125
|
+
background runs.
|
|
126
|
+
- Use `jobs` or `list` to enumerate local background runs.
|
|
127
|
+
- Use `archive` or `export` to write a sensitive local JSON bundle for one run
|
|
128
|
+
without deleting runtime state.
|
|
129
|
+
- Use `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain`
|
|
130
|
+
for shorter foreground checks.
|
|
105
131
|
- Progress is printed to stderr as JSONL by default.
|
|
106
132
|
- The final workflow result is printed as JSON to stdout.
|
|
107
133
|
- JSONL records include `kind`, `version`, `event`, `status`, and `summary`;
|
|
108
134
|
agent records also include stable agent identity and label fields.
|
|
109
|
-
- Built-in `task` and `code-review` emit `workflow.plan.ready`
|
|
110
|
-
|
|
135
|
+
- Built-in `task` and `code-review` emit `workflow.plan.ready` as a planning
|
|
136
|
+
snapshot, not a promise that every later phase is already known.
|
|
137
|
+
- `workflow.phase.planned` is emitted immediately before each phase starts and
|
|
138
|
+
carries that phase's current planned agent role labels. Each
|
|
139
|
+
`workflow.phase.started` record repeats the same role labels when the phase
|
|
140
|
+
begins.
|
|
141
|
+
- Each `workflow.agent.completed` record includes phase progress, total known
|
|
142
|
+
agent progress, and elapsed time.
|
|
143
|
+
- After a completed run, `workflow.summary.ready` reports each phase with its
|
|
144
|
+
planned agent count and angle/focus list, then `workflow.review.recommended`
|
|
145
|
+
asks the current session LLM to critically re-check the final result before
|
|
146
|
+
acting on it.
|
|
111
147
|
- Press `Ctrl-C` once to cancel the active workflow.
|
|
112
148
|
- Use `--retry-limit <n>` to retry failed workflows inside the same process.
|
|
113
|
-
- `--timeout-ms`
|
|
114
|
-
|
|
149
|
+
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
150
|
+
Positive values opt into a workflow deadline and per-agent silence budget;
|
|
151
|
+
that budget is not divided by the retry budget.
|
|
115
152
|
- Use `--permission ask|allow|deny` for project/user/plugin/scriptPath workflow
|
|
116
153
|
permission reviews.
|
|
117
154
|
- Use `--progress plain` for human-readable log lines.
|
|
118
155
|
- Use `--execution background` for OS background runs and `--execution attached`
|
|
119
|
-
when
|
|
156
|
+
only when the caller should stay connected until completion.
|
|
120
157
|
|
|
121
158
|
## Codex Companion Skill
|
|
122
159
|
|
|
@@ -138,8 +175,8 @@ want Codex to auto-load the package boundaries and verification routine.
|
|
|
138
175
|
planner-selected phase-wise parallel subagents, then synthesize each phase and
|
|
139
176
|
the final result.
|
|
140
177
|
- Workflow execution is local and command-owned; settings default to OS
|
|
141
|
-
background execution
|
|
142
|
-
|
|
178
|
+
background execution so long runs can keep waiting while Codex does other
|
|
179
|
+
work.
|
|
143
180
|
- `.ultracode-for-codex` workflow state is sensitive local data.
|
|
144
181
|
- `journalPath`, `journal.jsonl`, and journal contents stay out of CLI output.
|
|
145
182
|
Local runtime state may still contain runtime-owned
|
|
@@ -147,8 +184,7 @@ want Codex to auto-load the package boundaries and verification routine.
|
|
|
147
184
|
- `resumeFromRunId` remains runtime-internal and same-session; users retry the
|
|
148
185
|
active run or rerun the workflow command.
|
|
149
186
|
- `agent(..., { isolation: "worktree" })` runs the agent in a detached git
|
|
150
|
-
worktree
|
|
151
|
-
worktrees for review.
|
|
187
|
+
worktree and preserves the worktree for review, including clean worktrees.
|
|
152
188
|
|
|
153
189
|
## Development
|
|
154
190
|
|
|
@@ -184,6 +220,12 @@ For supported CI/CD environments, provenance is available as an explicit opt-in:
|
|
|
184
220
|
npm run publish:npm:provenance
|
|
185
221
|
```
|
|
186
222
|
|
|
223
|
+
Optional live smoke against the local Codex CLI:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
ULTRACODE_LIVE_SMOKE=1 npm run smoke:live
|
|
227
|
+
```
|
|
228
|
+
|
|
187
229
|
Useful local run:
|
|
188
230
|
|
|
189
231
|
```bash
|
package/ULTRACODE_INSTALL.md
CHANGED
|
@@ -13,6 +13,15 @@ workflow runs to OS background execution with result and progress files under
|
|
|
13
13
|
Production surface:
|
|
14
14
|
|
|
15
15
|
- `ultracode-for-codex run`
|
|
16
|
+
- `ultracode-for-codex status`
|
|
17
|
+
- `ultracode-for-codex wait`
|
|
18
|
+
- `ultracode-for-codex logs`
|
|
19
|
+
- `ultracode-for-codex result`
|
|
20
|
+
- `ultracode-for-codex cancel`
|
|
21
|
+
- `ultracode-for-codex jobs`
|
|
22
|
+
- `ultracode-for-codex list`
|
|
23
|
+
- `ultracode-for-codex archive`
|
|
24
|
+
- `ultracode-for-codex export`
|
|
16
25
|
|
|
17
26
|
Progress, cancellation, permission review, retry, and final result projection
|
|
18
27
|
are handled inside the CLI process. Progress is JSONL on stderr by
|
|
@@ -31,7 +40,7 @@ npm exec -- ultracode-for-codex --llm-guide
|
|
|
31
40
|
For source-checkout validation, install the generated tarball instead:
|
|
32
41
|
|
|
33
42
|
```bash
|
|
34
|
-
npm install --save-dev ./ultracode-for-codex
|
|
43
|
+
npm install --save-dev ./ultracode-for-codex-<version>.tgz
|
|
35
44
|
```
|
|
36
45
|
|
|
37
46
|
Optional Codex companion skill:
|
|
@@ -55,8 +64,22 @@ npm exec -- ultracode-for-codex run \
|
|
|
55
64
|
--args '{"prompt":"review the current change"}'
|
|
56
65
|
```
|
|
57
66
|
|
|
58
|
-
The default run prints a background launch record to stdout.
|
|
59
|
-
|
|
67
|
+
The default run prints a background launch record to stdout. Prefer that
|
|
68
|
+
background path for long Codex-launched work so Codex can continue other tasks
|
|
69
|
+
and inspect the job later with `status`, `logs`, or `result`. Use
|
|
70
|
+
`--execution attached` only when the caller must block until completion.
|
|
71
|
+
|
|
72
|
+
Use the background `jobId` from the launch record to inspect or control the run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm exec -- ultracode-for-codex status <jobId> --cwd /path/to/project
|
|
76
|
+
npm exec -- ultracode-for-codex wait <jobId> --cwd /path/to/project
|
|
77
|
+
npm exec -- ultracode-for-codex logs <jobId> --cwd /path/to/project --tail 40
|
|
78
|
+
npm exec -- ultracode-for-codex result <jobId> --cwd /path/to/project
|
|
79
|
+
npm exec -- ultracode-for-codex cancel <jobId> --cwd /path/to/project
|
|
80
|
+
npm exec -- ultracode-for-codex jobs --cwd /path/to/project
|
|
81
|
+
npm exec -- ultracode-for-codex archive <jobId> --cwd /path/to/project
|
|
82
|
+
```
|
|
60
83
|
|
|
61
84
|
Use built-in `task` for general work and `code-review` for review-specific work.
|
|
62
85
|
Both start with an LLM planner, execute phase by phase, run multiple focused
|
|
@@ -76,7 +99,7 @@ Settings defaults:
|
|
|
76
99
|
"progress": "jsonl",
|
|
77
100
|
"permission": "ask",
|
|
78
101
|
"retryLimit": 0,
|
|
79
|
-
"timeoutMs":
|
|
102
|
+
"timeoutMs": 0,
|
|
80
103
|
"background": {
|
|
81
104
|
"runDir": ".ultracode-for-codex/background/{jobId}",
|
|
82
105
|
"resultFile": "result.json",
|
|
@@ -90,29 +113,49 @@ Settings defaults:
|
|
|
90
113
|
|
|
91
114
|
Useful controls:
|
|
92
115
|
|
|
116
|
+
- `--version` or `-v` prints the installed package version.
|
|
117
|
+
- `status`, `wait`, `logs`, `result`, and `cancel` accept a background `jobId`
|
|
118
|
+
or `metadata.json` path.
|
|
119
|
+
- `jobs` and `list` enumerate local background runs.
|
|
120
|
+
- `archive` and `export` write a sensitive local JSON bundle for one run without
|
|
121
|
+
deleting runtime state.
|
|
122
|
+
- `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain` are
|
|
123
|
+
available for shorter foreground checks.
|
|
93
124
|
- Progress events are printed to stderr as JSONL by default.
|
|
94
125
|
- The final workflow result is printed as JSON to stdout.
|
|
95
|
-
- The package default workflow timeout is `
|
|
126
|
+
- The package default workflow timeout is `0`, meaning the workflow waits until
|
|
127
|
+
it completes, is cancelled, or the Codex app-server exits.
|
|
96
128
|
- JSONL records include `kind`, `version`, `event`, `status`, and `summary`;
|
|
97
129
|
agent records also include stable agent identity and label fields.
|
|
98
|
-
- Built-in `task` and `code-review` emit `workflow.plan.ready`
|
|
99
|
-
|
|
130
|
+
- Built-in `task` and `code-review` emit `workflow.plan.ready` as a planning
|
|
131
|
+
snapshot, not a promise that every later phase is already known.
|
|
132
|
+
- `workflow.phase.planned` is emitted immediately before each phase starts and
|
|
133
|
+
carries that phase's current planned agent role labels. Each
|
|
134
|
+
`workflow.phase.started` record repeats the same role labels when the phase
|
|
135
|
+
begins.
|
|
136
|
+
- Each `workflow.agent.completed` record includes phase progress, total known
|
|
137
|
+
agent progress, and elapsed time.
|
|
138
|
+
- After a completed run, `workflow.summary.ready` reports each phase with its
|
|
139
|
+
planned agent count and angle/focus list, then `workflow.review.recommended`
|
|
140
|
+
asks the current session LLM to critically re-check the final result before
|
|
141
|
+
acting on it.
|
|
100
142
|
- Press `Ctrl-C` once to cancel the running workflow.
|
|
101
143
|
- Use `--retry-limit <n>` to retry failed runs in the same process.
|
|
102
|
-
- `--timeout-ms`
|
|
103
|
-
|
|
144
|
+
- `--timeout-ms 0` waits for completion, cancellation, or app-server exit.
|
|
145
|
+
Positive values opt into a workflow deadline and per-agent silence budget;
|
|
146
|
+
that budget is not divided by the retry budget.
|
|
104
147
|
- Use `--permission ask|allow|deny` for project/user/plugin/scriptPath
|
|
105
148
|
workflow permission reviews.
|
|
106
149
|
- Use `--progress plain` for human-readable log lines.
|
|
107
150
|
- Use `--execution background` for OS background runs and `--execution attached`
|
|
108
|
-
|
|
151
|
+
only when the caller should stay connected until completion.
|
|
109
152
|
|
|
110
153
|
## Runtime Contract
|
|
111
154
|
|
|
112
155
|
- Use Codex app-server over stdio as the production backend.
|
|
113
156
|
- Keep workflow execution local and command-owned; settings default to OS
|
|
114
|
-
background execution
|
|
115
|
-
|
|
157
|
+
background execution so long runs can keep waiting while Codex does other
|
|
158
|
+
work.
|
|
116
159
|
- Route progress, cancellation, permission review, retry, and result projection
|
|
117
160
|
through the CLI command.
|
|
118
161
|
- Keep stdout reserved for the final JSON result; stream progress records to
|
|
@@ -130,13 +173,15 @@ Useful controls:
|
|
|
130
173
|
- `resumeFromRunId` remains a runtime-internal same-session capability; the
|
|
131
174
|
CLI uses retry or explicit reruns for user-facing recovery.
|
|
132
175
|
- Use `isolation: "worktree"` only in git repositories with at least one commit.
|
|
133
|
-
|
|
176
|
+
Isolated worktrees are intentionally preserved for review, including clean
|
|
177
|
+
worktrees.
|
|
134
178
|
- Treat `.ultracode-for-codex` workflow state as sensitive local data.
|
|
135
179
|
|
|
136
180
|
## First Checks After Install
|
|
137
181
|
|
|
138
182
|
```bash
|
|
139
183
|
npm exec -- ultracode-for-codex --help
|
|
184
|
+
npm exec -- ultracode-for-codex --version
|
|
140
185
|
npm exec -- ultracode-for-codex --llm-guide
|
|
141
186
|
```
|
|
142
187
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -20,5 +20,20 @@ interface ParsedOptions {
|
|
|
20
20
|
readonly resumeFromRunId?: string;
|
|
21
21
|
readonly permission?: string;
|
|
22
22
|
readonly retryLimit?: string;
|
|
23
|
+
readonly jobId?: string;
|
|
24
|
+
readonly metadataPath?: string;
|
|
25
|
+
readonly resultPath?: string;
|
|
26
|
+
readonly progressPath?: string;
|
|
27
|
+
readonly pidPath?: string;
|
|
28
|
+
readonly intervalMs?: string;
|
|
29
|
+
readonly tail?: string;
|
|
30
|
+
readonly signal?: string;
|
|
31
|
+
readonly plain?: string;
|
|
32
|
+
readonly format?: string;
|
|
33
|
+
readonly event?: string;
|
|
34
|
+
readonly result?: string;
|
|
35
|
+
readonly wait?: string;
|
|
36
|
+
readonly outDir?: string;
|
|
37
|
+
readonly outputPath?: string;
|
|
23
38
|
}
|
|
24
39
|
export declare function parseOptions(args: readonly string[]): ParsedOptions;
|