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.
@@ -11,8 +11,8 @@ P3-C is done when:
11
11
 
12
12
  - the runtime creates a detached git worktree before the backend call;
13
13
  - the backend turn runs with that worktree as its workspace;
14
- - unchanged isolated worktrees are removed after the agent finishes;
15
- - changed or unsafe-to-clean worktrees are preserved for review;
14
+ - isolated worktrees are preserved after the agent finishes, including clean,
15
+ changed, stalled, aborted, or status-unavailable worktrees;
16
16
  - `semanticOpts.isolation` participates in the agent cache key.
17
17
 
18
18
  ## Authority Model
@@ -22,8 +22,8 @@ P3-C is done when:
22
22
  | isolation request | workflow script | Only `isolation: "worktree"` is accepted. |
23
23
  | worktree path | runtime | Runtime creates paths outside the source repo working tree. |
24
24
  | backend cwd | runtime request packet | Subagent backend executes the turn in `worktreePath`. |
25
- | changed/unchanged decision | runtime git status | `git status --porcelain --untracked-files=all --ignored=matching` decides preserve vs cleanup. |
26
- | preserved path projection | runtime event | Changed or unsafe-to-clean worktrees are surfaced on agent final events. |
25
+ | changed/unchanged decision | runtime git status | `git status --porcelain --untracked-files=all --ignored=matching` decides the preservation reason. |
26
+ | preserved path projection | runtime event | Preserved worktrees are surfaced on agent final events. |
27
27
 
28
28
  The accepted isolation values are `"none"` and `"worktree"`; any other value
29
29
  fails as invalid workflow input.
@@ -48,13 +48,13 @@ copied into the isolated worktree.
48
48
  4. Pass `worktreePath` to the subagent backend and append path-free worktree
49
49
  context to the backend prompt.
50
50
  5. Inspect worktree status after the attempt settles.
51
- 6. Remove clean worktrees.
52
- 7. Preserve changed, stalled, aborted, status-unavailable, or cleanup-failed
53
- worktrees and surface them on the agent final event.
51
+ 6. Preserve the worktree with reason `clean`, `changed`, `stalled`, `aborted`,
52
+ or `status_unavailable` and surface it on the agent final event.
54
53
 
55
54
  ## Verification
56
55
 
57
56
  - `test/codex-isolation.test.mjs` verifies Codex backend request projection.
58
- - `test/workflow-runtime.test.mjs` verifies changed worktree preservation.
57
+ - `test/workflow-runtime.test.mjs` verifies clean and changed worktree
58
+ preservation.
59
59
  - `scripts/e2e-installed-ultracode-for-codex.mjs` verifies packaged CLI workflow
60
60
  execution through the fake Codex app-server boundary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracode-for-codex",
3
- "version": "0.2.5",
3
+ "version": "0.3.0",
4
4
  "description": "Run local Codex-backed workflows from a command-owned CLI runtime.",
5
5
  "keywords": [
6
6
  "codex",
@@ -36,6 +36,8 @@
36
36
  "dist/ultracode-install-guide.d.ts",
37
37
  "dist/settings.js",
38
38
  "dist/settings.d.ts",
39
+ "dist/runtime/package-info.js",
40
+ "dist/runtime/package-info.d.ts",
39
41
  "dist/codex/",
40
42
  "dist/runtime/",
41
43
  "skills/ultracode-for-codex/",
@@ -56,6 +58,7 @@
56
58
  "publish:dry-run": "npm publish --dry-run --access public",
57
59
  "publish:npm": "npm publish --access public",
58
60
  "publish:npm:provenance": "npm publish --access public --provenance",
61
+ "smoke:live": "node scripts/live-smoke-ultracode-for-codex.mjs",
59
62
  "test:e2e:ultracode-for-codex": "node scripts/e2e-installed-ultracode-for-codex.mjs",
60
63
  "test:all": "npm test && npm run test:e2e:ultracode-for-codex",
61
64
  "test": "npm run build && npm run verify:runtime-boundary && node --test --test-concurrency=2 test/*.test.mjs",
package/settings.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "progress": "jsonl",
5
5
  "permission": "ask",
6
6
  "retryLimit": 0,
7
- "timeoutMs": 900000,
7
+ "timeoutMs": 0,
8
8
  "background": {
9
9
  "runDir": ".ultracode-for-codex/background/{jobId}",
10
10
  "resultFile": "result.json",
@@ -13,9 +13,10 @@ binary, tests, package exports, journal layer, and workflow runtime code.
13
13
 
14
14
  Workflow execution runs through the local CLI command. Progress,
15
15
  cancellation, permission review, retry, and result projection stay in that
16
- command process. `settings.json` defaults runs to OS background execution.
17
- Attached runs stream stderr JSONL for Codex-readable status, while stdout
18
- remains the final workflow result JSON.
16
+ command process. `settings.json` defaults runs to OS background execution; use
17
+ that path for long Codex-launched work so Codex can keep doing other tasks and
18
+ inspect the background job later. Attached runs stream stderr JSONL for
19
+ Codex-readable status, while stdout remains the final workflow result JSON.
19
20
 
20
21
  The default Ultracode work shape is phase-wise parallel execution: built-in
21
22
  `task` and `code-review` first call a planner agent, then execute each planned
@@ -44,25 +45,42 @@ For source-checkout validation before publish:
44
45
 
45
46
  ```bash
46
47
  npm run pack:ultracode-for-codex
47
- npm install --save-dev ./artifacts/ultracode-for-codex-0.2.5.tgz
48
+ npm install --save-dev ./artifacts/ultracode-for-codex-<version>.tgz
48
49
  ```
49
50
 
50
51
  CLI behavior:
51
52
 
53
+ - `--version` or `-v` prints the installed package version;
52
54
  - default execution is `background`; stdout contains a launch record with
53
55
  `jobId`, `pid`, `resultPath`, `progressPath`, `metadataPath`, and `pidPath`;
54
- - attached execution is available with `--execution attached`;
56
+ - background jobs can be inspected with `status`, waited with `wait`, read with
57
+ `logs` and `result`, and cancelled with `cancel`;
58
+ - background jobs can be enumerated with `jobs` or `list`, and exported without
59
+ deletion with `archive` or `export`;
60
+ - `wait --result`, `cancel --wait`, `logs --event <event>`, and `--plain`
61
+ provide focused foreground checks;
62
+ - attached execution is available with `--execution attached` when the caller
63
+ should stay connected until completion;
55
64
  - attached progress prints to stderr as JSONL by default;
56
65
  - attached final workflow result prints as JSON to stdout;
57
66
  - JSONL records include `kind`, `version`, `event`, `status`, and `summary`,
58
67
  with agent identity and label fields on agent records;
59
- - built-in `task` and `code-review` emit `workflow.plan.ready` before phase
60
- agents start, including phase titles and planned agent role labels;
68
+ - built-in `task` and `code-review` emit `workflow.plan.ready` as a planning
69
+ snapshot, not a promise that every later phase is already known;
70
+ - `workflow.phase.planned` is emitted immediately before each phase starts and
71
+ carries that phase's current planned agent role labels;
72
+ - each `workflow.phase.started` record repeats the same role labels when the
73
+ phase begins;
74
+ - each `workflow.agent.completed` record includes phase progress, total known
75
+ agent progress, and elapsed time;
76
+ - after a completed run, `workflow.summary.ready` reports phase-level agent
77
+ counts and angles, then `workflow.review.recommended` asks the current
78
+ session LLM to critically re-check the final result before acting on it;
61
79
  - `Ctrl-C` cancels the active attached workflow;
62
80
  - `--retry-limit <n>` retries failed workflows inside the same process;
63
- - `--timeout-ms` is the workflow timeout and the default per-agent silence
64
- budget; the package default is `900000` ms, or 15 minutes, and it is not
65
- divided by the retry budget.
81
+ - `--timeout-ms 0` waits for completion, cancellation, or app-server exit;
82
+ positive values opt into a workflow deadline and per-agent silence budget,
83
+ and that budget is not divided by the retry budget.
66
84
  - `--permission ask|allow|deny` handles project/user/plugin/scriptPath reviews.
67
85
  - `--progress plain` switches to human-readable progress lines.
68
86
  - background file locations are controlled by `workflow.background` in
@@ -77,14 +95,15 @@ CLI behavior:
77
95
  - Built-in `task` and `code-review` inject deterministic workspace context into
78
96
  planner-selected phase-wise parallel subagents.
79
97
  - Keep workflow execution local and command-owned; settings default to OS
80
- background execution and `--execution attached` keeps the process connected
81
- until completion.
98
+ background execution so long runs can keep waiting while Codex does other
99
+ work.
82
100
  - Keep `journalPath`, `journal.jsonl`, and journal contents out of CLI output.
83
101
  - Treat `.ultracode-for-codex` workflow state as sensitive local data.
84
102
  - Keep `resumeFromRunId` runtime-internal unless cross-process resume
85
103
  gets an explicit durable design.
86
104
  - Use `isolation: "worktree"` only inside a git repo with at least one commit;
87
- changed or unsafe worktrees are intentionally preserved for review.
105
+ isolated worktrees are intentionally preserved for review, including clean
106
+ worktrees.
88
107
 
89
108
  ## Packaging And Verification
90
109