ultra-builder-pro-cli 3.0.2 → 5.0.1

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.
Files changed (42) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +6 -0
  2. package/CHANGELOG.md +83 -1
  3. package/README.md +126 -36
  4. package/README.zh-CN.md +440 -0
  5. package/adapters/_shared/host-profile.cjs +3 -151
  6. package/adapters/_shared/plugin-core.cjs +57 -0
  7. package/adapters/_shared/runtime-assets.cjs +64 -12
  8. package/adapters/codex.js +3 -6
  9. package/bin/delegate-worker.cjs +2 -345
  10. package/bin/delegate.cjs +3 -530
  11. package/docs/ARCHITECTURE.md +59 -18
  12. package/docs/ARTIFACT-AUTHORITY.md +21 -5
  13. package/docs/DECISIONS.md +31 -10
  14. package/docs/PLUGIN-ISOLATION-CONTRACT.md +28 -12
  15. package/docs/RUNTIME-COMPAT-MATRIX.md +106 -26
  16. package/docs/SKILL-AUTHORING.md +15 -3
  17. package/docs/WORKFLOW-LIFECYCLE.md +83 -29
  18. package/docs/evals/ultra-5-0-journey-results.md +62 -0
  19. package/docs/evals/ultra-5-0-live-acp-conformance.md +93 -0
  20. package/docs/evals/ultra-5-0-route-journeys.md +145 -0
  21. package/package.json +2 -1
  22. package/skills/ultra-change/SKILL.md +30 -4
  23. package/skills/ultra-delegate/SKILL.md +80 -7
  24. package/skills/ultra-delegate/patches/zcode-acp-0.1.0-zcode-0.16.5.patch +184 -0
  25. package/skills/ultra-delegate/references/delegation-contract.md +60 -1
  26. package/skills/ultra-delegate/scripts/acp-conformance.cjs +287 -0
  27. package/skills/ultra-delegate/scripts/acp-driver.cjs +762 -0
  28. package/skills/ultra-delegate/scripts/agent-execution-driver.cjs +320 -0
  29. package/skills/ultra-delegate/scripts/cli-driver.cjs +61 -0
  30. package/skills/ultra-delegate/scripts/delegate-worker.cjs +328 -0
  31. package/skills/ultra-delegate/scripts/delegate.cjs +690 -0
  32. package/skills/ultra-delegate/scripts/host-profile.cjs +267 -0
  33. package/skills/ultra-deliver/SKILL.md +13 -0
  34. package/skills/ultra-dev/SKILL.md +18 -2
  35. package/skills/ultra-init/SKILL.md +12 -0
  36. package/skills/ultra-plan/SKILL.md +21 -3
  37. package/skills/ultra-research/SKILL.md +33 -5
  38. package/skills/ultra-status/SKILL.md +37 -7
  39. package/skills/ultra-status/references/route-contract.md +100 -0
  40. package/skills/ultra-test/SKILL.md +16 -1
  41. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-read-only.md +0 -0
  42. /package/{adapters/_shared → skills/ultra-delegate/scripts}/delegate-profiles/kimi-write.md +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ultra-delegate
3
- description: Delegate one bounded workflow segment to another installed CLI in an isolated worktree and return only its stable result artifact. Use when the owner asks for another model or host to execute, review, verify, or continue a specific slice of current work.
3
+ description: Delegate one bounded workflow segment to another installed Agent runtime through a conformance-gated ACP or CLI driver in an isolated worktree, then return only its stable result artifact. Use when the owner asks for another model or host to execute, review, verify, or continue a specific slice of current work.
4
4
  ---
5
5
 
6
6
  # Run a bounded worker without giving it project authority
@@ -14,6 +14,20 @@ another Agent requires the owner-directed OFFER → ACK → RESULT protocol in
14
14
  `../ultra-change/references/primary-transfer.md`, which stays mutually exclusive
15
15
  with this bounded-worker path.
16
16
 
17
+ ## Route modes
18
+
19
+ | Mode | Entry | Observable exit | Next |
20
+ |---|---|---|---|
21
+ | `task` | Explicit owner authorization for one task execution or continuation slice | One validated terminal worker result and isolated diff are returned to the primary writer | Return to the primary `ultra-dev` task for interpretation and integration |
22
+ | `research` | Explicit owner authorization for one active Change's bounded evidence question | One validated terminal result carries the named evidence or a bounded unavailable path | Return to `ultra-research/change-scoped` under the primary writer |
23
+ | `aggregate` | Explicit owner authorization for one Change-level review or verification question | One validated terminal finding result is available without canonical `.ultra` writes | Return to the primary `ultra-test`, `ultra-review`, or requesting route |
24
+
25
+ Follow `../ultra-status/references/route-contract.md`. Delegation always remains an
26
+ explicit-entry capability, even when the surrounding Change has an Execution Grant.
27
+ Show one Route Card before launch and one after the terminal result. Worker events and
28
+ transport progress may update `Position`, `Delta`, or `Reality`; they never prove the
29
+ delegated slice complete or select the primary route.
30
+
17
31
  ## Before you start
18
32
 
19
33
  1. Resolve exactly one active `change_id`, then select one scope and name it in
@@ -39,6 +53,8 @@ with this bounded-worker path.
39
53
  - No `writable_roots` entry is `.ultra/` or sits under it, and the actual diff touches
40
54
  nothing there.
41
55
  - Timeout and cancellation reach a terminal failed result and release `run.lock`.
56
+ - ACP updates stay in a derived redacted event journal; no `agent_thought_chunk`, raw tool
57
+ input/output, credential, session, or stop reason can establish Ultra completion.
42
58
  - The primary host verifies the result against the selected scope's task acceptance,
43
59
  Research exit evidence, or aggregate review/verification question.
44
60
 
@@ -66,15 +82,66 @@ policy.
66
82
  Create `.ultra/.runtime/worktrees/<id>` as a real Git worktree and run:
67
83
 
68
84
  ```text
69
- ubp delegate run --to <host> --instruction <file> --permission <file> --worktree <dir> --timeout <seconds>
85
+ node <loaded-ultra-delegate-skill-dir>/scripts/delegate.cjs run --to <host> --instruction <file> --permission <file> --worktree <dir> --timeout <seconds>
70
86
  ```
71
87
 
88
+ Resolve `<loaded-ultra-delegate-skill-dir>` from this Skill's actual loaded path. The
89
+ Skill-local launcher and worker are the canonical runtime. Do not search `PATH` for
90
+ `ubp`, install a global Ultra package, or invoke `npx` to locate Ultra during
91
+ delegation. The Claude and Codex ACP profiles may separately execute their exact pinned
92
+ adapter packages through `npx`; that transport dependency is declared in the profile.
93
+ `ubp delegate ...` is a one-release compatibility wrapper only.
94
+
72
95
  `<host>` is `claude`, `codex`, `opencode`, `kimi`, `grok`, or `zcode`. Kimi accepts an
73
96
  optional `--model <id>` when its account has no default headless model. A ZCode primary
74
97
  host uses this same command to delegate to any other installed CLI; a different primary
75
98
  host can select `--to zcode` through the ZCode headless profile.
76
99
 
77
- The ZCode headless transport is `experimental`: it is an App-internal or PATH CLI with
100
+ The launcher selects one `AgentExecutionDriver` per Host. A stable ACP v1 stdio
101
+ candidate is preferred only when that exact Host's versioned conformance row is
102
+ `passed`, names a non-empty evidence reference, and its executable and declared
103
+ candidate-identity probes succeed. The probes are bounded local version checks; they
104
+ inspect capability, executability, and pinned runtime identity without starting a
105
+ provider task. Every other case uses the
106
+ result-compatible `CliDriver` and records `execution_driver`, `acp_capability`, and the
107
+ exact `driver_fallback_reason` in the receipt and terminal result. Do not edit a
108
+ conformance row merely because a binary or help command exists.
109
+ `ULTRA_DELEGATE_FORCE_CLI=1` is the explicit operator recovery switch: it selects the
110
+ same bounded `CliDriver` with `acp_forced_cli` without deleting the ACP candidate or
111
+ changing its evidence row.
112
+
113
+ `AcpDriver` sends `initialize` with protocol v1 and no client filesystem, terminal, or
114
+ interactive-auth capability; creates one session at the absolute isolated-worktree
115
+ `cwd`; sends the digest-bound packet as one text prompt; and consumes `session/update`,
116
+ permission, cancellation, and terminal messages. It retains only bounded redacted
117
+ event metadata. An edit/delete/move request is granted with `allow_once` only when all
118
+ declared locations are already inside `writable_roots`; scope widening and execution,
119
+ fetch, mode-switch, or unknown operations are denied and force a typed terminal
120
+ failure. `allow_always` is never selected. If `session/new` reports
121
+ `acp_auth_required` before any prompt is sent, the launcher runs the already-bound
122
+ `CliDriver` once and records the failed ACP attempt as redacted fallback metadata. It
123
+ never retries any post-prompt or other ACP failure, so this recovery cannot duplicate a
124
+ provider task. The driver does not copy or solicit credentials.
125
+ Some agents emit creation-time session metadata before their `session/new` response.
126
+ The driver transiently buffers only a bounded set of metadata update kinds, then checks
127
+ every buffered `sessionId` against the returned identity before publishing an event.
128
+ Early message/tool content, an identity mismatch, or a count/byte overflow fails typed.
129
+
130
+ The ZCode headless transport is `experimental`: its thin profile invokes the
131
+ independently installed `zcode-acp` v0.1.0 bridge, pinned to source commit
132
+ `42fe149d4b501469343c01f23ba3801832306d53` plus the digest-bound ZCode 0.16.5
133
+ runtime-preferences patch under this Skill's `patches/` directory, and passes only the
134
+ installed ZCode Desktop runtime path (or the operator's explicit PATH/test override).
135
+ Selection verifies both the bridge build marker
136
+ `zcode-acp 0.1.0+ultra.zcode.0.16.5` and the installed runtime version `0.16.5` before
137
+ using the passing receipt.
138
+ Ultra ships the source patch but never redistributes the bridge binary or App bytes.
139
+ Host identity and provider identity are separate; the verified local runtime uses the
140
+ Owner's domestic BigModel provider rather than international Z.AI OAuth. The installed
141
+ `app-server` remains a
142
+ ZCode Protocol surface behind that bridge, not ACP evidence by itself; the ZCode row
143
+ can pass only from its own provider-backed conformance receipt. The runtime remains
144
+ an App-internal or PATH CLI with
78
145
  no public stability contract, and it is **not** the documented ZCode Desktop
79
146
  interactive surface. `delegate run --to zcode` refuses to launch until the invocation
80
147
  explicitly carries `--ack-experimental`; every launch then prints a stderr warning and
@@ -83,10 +150,14 @@ and `experimental_ack: true` in the receipt, the worker spec, and the terminal r
83
150
  (including failure and timeout recovery results), so no receipt can imply a documented
84
151
  Desktop session. Promotion requires official documentation plus a full recovery drill.
85
152
 
86
- The command returns a receipt. Immediately run `scripts/delegate_wait.py`; read no
87
- intermediate output. Use `ubp delegate status --delegation <dir>` for a read-only state
88
- and `ubp delegate cancel --delegation <dir>` to request termination. Never delete a lock
89
- to manufacture completion.
153
+ The command returns a receipt. `status --delegation <dir>` reports the active driver,
154
+ fallback reason, and latest safe derived ACP observation when present; that observation
155
+ is execution telemetry, not a route or completion verdict. Immediately run
156
+ `python3 <loaded-ultra-delegate-skill-dir>/scripts/delegate_wait.py <result.json>`; read
157
+ no intermediate output. Use the same Skill-local Node entrypoint with `status
158
+ --delegation <dir>` for a read-only state and `cancel --delegation <dir>` to request
159
+ termination. The receipt carries the exact canonical cancel command. Never delete a
160
+ lock to manufacture completion.
90
161
 
91
162
  The worker returns one schema-constrained JSON final response. The launcher extracts it
92
163
  from the host's native structured output, validates digests, process exit, exact schema,
@@ -117,6 +188,8 @@ interpretation, risk acceptance, integration and task state.
117
188
  ## References
118
189
 
119
190
  - `references/delegation-contract.md` — strict permission, receipt and result schemas.
191
+ - `scripts/delegate.cjs` — canonical installed launcher and status/cancel entrypoint.
120
192
  - `scripts/delegate_wait.py` — run immediately after the launch receipt.
193
+ - `../ultra-status/references/route-contract.md` — owner-visible route, checkpoint, and recovery output.
121
194
  - `../ultra-think/SKILL.md` — read when No Consensus exposes a consequential decision.
122
195
  - `../ultra-think/references/autonomy-boundary.md` — read before granting write effects.
@@ -0,0 +1,184 @@
1
+ diff --git a/Cargo.lock b/Cargo.lock
2
+ index bfadfbb..4b1d665 100644
3
+ --- a/Cargo.lock
4
+ +++ b/Cargo.lock
5
+ @@ -2492,7 +2492,7 @@ dependencies = [
6
+
7
+ [[package]]
8
+ name = "zcode-acp"
9
+ -version = "0.1.0"
10
+ +version = "0.1.0+ultra.zcode.0.16.5"
11
+ dependencies = [
12
+ "aes-gcm",
13
+ "agent-client-protocol",
14
+ diff --git a/Cargo.toml b/Cargo.toml
15
+ index f096b91..4b4d985 100644
16
+ --- a/Cargo.toml
17
+ +++ b/Cargo.toml
18
+ @@ -1,6 +1,6 @@
19
+ [package]
20
+ name = "zcode-acp"
21
+ -version = "0.1.0"
22
+ +version = "0.1.0+ultra.zcode.0.16.5"
23
+ edition = "2024"
24
+ description = "ACP adapter that bridges Buzz relay events to the ZCode CLI via its stdio app-server"
25
+ license = "Apache-2.0"
26
+ diff --git a/src/zcode/mod.rs b/src/zcode/mod.rs
27
+ index 7963959..14725bb 100644
28
+ --- a/src/zcode/mod.rs
29
+ +++ b/src/zcode/mod.rs
30
+ @@ -266,6 +266,13 @@ impl DriverState {
31
+ }
32
+ }
33
+ Some(Incoming::ServerRequest { id, method, params }) => {
34
+ + if method == methods::SESSION_REQUEST_RUNTIME_PREFERENCES {
35
+ + let _ = self.write_tx.send(json!({
36
+ + "id": id,
37
+ + "result": default_runtime_preferences(),
38
+ + }));
39
+ + return;
40
+ + }
41
+ // The ACP layer answers via `reply_tx`; a side task writes the
42
+ // reply back through `write_tx` echoing the wire id.
43
+ let (reply_tx, reply_rx) = oneshot::channel();
44
+ @@ -373,6 +380,32 @@ impl DriverState {
45
+ }
46
+ }
47
+
48
+ +fn default_runtime_preferences() -> Value {
49
+ + json!({
50
+ + "nativeSearchEnhancementsEnabled": true,
51
+ + "memoryEnabled": false,
52
+ + "askUserQuestionAutoResolutionEnabled": true,
53
+ + "modelContextBudgetStrategy": "preflight-v1",
54
+ + })
55
+ +}
56
+ +
57
+ +fn bootstrap_server_request_response(id: RequestId, method: &str) -> Value {
58
+ + if method == methods::SESSION_REQUEST_RUNTIME_PREFERENCES {
59
+ + json!({
60
+ + "id": id,
61
+ + "result": default_runtime_preferences(),
62
+ + })
63
+ + } else {
64
+ + json!({
65
+ + "id": id,
66
+ + "error": {
67
+ + "code": -32601,
68
+ + "message": format!("Unsupported app-server request: {method}"),
69
+ + },
70
+ + })
71
+ + }
72
+ +}
73
+ +
74
+ /// Run the dispatcher: read framed messages, dispatch each into shared state.
75
+ async fn run_dispatcher(
76
+ state: Arc<Mutex<DriverState>>,
77
+ @@ -647,6 +680,15 @@ pub async fn build_session(
78
+ protocol::ResponseResult::Ok(v) => break v,
79
+ protocol::ResponseResult::Err(e) => return Err(SessionError::CreateFailed(e)),
80
+ },
81
+ + Some(Incoming::ServerRequest {
82
+ + id: request_id,
83
+ + method,
84
+ + ..
85
+ + }) => {
86
+ + write_tx
87
+ + .send(bootstrap_server_request_response(request_id, &method))
88
+ + .map_err(|e| SessionError::Send(e.to_string()))?;
89
+ + }
90
+ _ => continue,
91
+ },
92
+ None => return Err(SessionError::TransportClosed),
93
+ diff --git a/src/zcode/protocol.rs b/src/zcode/protocol.rs
94
+ index 71fa3e9..6e3e595 100644
95
+ --- a/src/zcode/protocol.rs
96
+ +++ b/src/zcode/protocol.rs
97
+ @@ -138,6 +138,7 @@ impl IncomingMessage {
98
+
99
+ pub mod methods {
100
+ pub const SESSION_CREATE: &str = "session/create";
101
+ + pub const SESSION_REQUEST_RUNTIME_PREFERENCES: &str = "session/requestRuntimePreferences";
102
+ pub const SESSION_RESUME: &str = "session/resume";
103
+ pub const SESSION_LIST: &str = "session/list";
104
+ pub const SESSION_SUBSCRIBE: &str = "session/subscribe";
105
+ diff --git a/tests/acp_client.py b/tests/acp_client.py
106
+ index a407220..0e46772 100644
107
+ --- a/tests/acp_client.py
108
+ +++ b/tests/acp_client.py
109
+ @@ -22,6 +22,7 @@ from __future__ import annotations
110
+
111
+ import json
112
+ import os
113
+ +import select
114
+ import subprocess
115
+ import sys
116
+ from pathlib import Path
117
+ @@ -40,6 +41,9 @@ def send(proc: subprocess.Popen, obj: dict) -> None:
118
+
119
+ def read_message(proc: subprocess.Popen) -> dict:
120
+ assert proc.stdout is not None
121
+ + readable, _, _ = select.select([proc.stdout], [], [], 5)
122
+ + if not readable:
123
+ + raise TimeoutError("agent did not emit an ACP message within 5 seconds")
124
+ raw = proc.stdout.readline()
125
+ if not raw:
126
+ raise EOFError("agent closed stdout")
127
+ @@ -74,6 +78,7 @@ def main() -> int:
128
+ stdin=subprocess.PIPE,
129
+ stdout=subprocess.PIPE,
130
+ stderr=sys.stderr, # surface shim logs inline for debugging
131
+ + bufsize=0,
132
+ )
133
+
134
+ try:
135
+ diff --git a/tests/fake-app-server.cjs b/tests/fake-app-server.cjs
136
+ index f6a5991..e690fbe 100644
137
+ --- a/tests/fake-app-server.cjs
138
+ +++ b/tests/fake-app-server.cjs
139
+ @@ -21,6 +21,8 @@ const rl = readline.createInterface({ input: process.stdin, terminal: false });
140
+ let sessionIdCounter = 0;
141
+ let activeSession = null;
142
+ let seqCounter = 0;
143
+ +let pendingCreateId = null;
144
+ +let runtimePreferencesRequestId = null;
145
+
146
+ function send(obj) {
147
+ process.stdout.write(JSON.stringify(obj) + "\n");
148
+ @@ -54,10 +56,35 @@ function handle(line) {
149
+ return;
150
+ }
151
+ const { id, method, params } = msg;
152
+ + if (!method && id === runtimePreferencesRequestId) {
153
+ + const prefs = msg.result;
154
+ + const valid = prefs
155
+ + && prefs.nativeSearchEnhancementsEnabled === true
156
+ + && prefs.memoryEnabled === false
157
+ + && prefs.askUserQuestionAutoResolutionEnabled === true
158
+ + && prefs.modelContextBudgetStrategy === "preflight-v1";
159
+ + if (!valid) {
160
+ + send({
161
+ + id: pendingCreateId,
162
+ + error: { code: -32602, message: "Invalid runtime preferences response" },
163
+ + });
164
+ + } else {
165
+ + respond(pendingCreateId, { sessionId: activeSession });
166
+ + }
167
+ + pendingCreateId = null;
168
+ + runtimePreferencesRequestId = null;
169
+ + return;
170
+ + }
171
+ switch (method) {
172
+ case "session/create": {
173
+ activeSession = `sess_fake_${++sessionIdCounter}`;
174
+ - respond(id, { sessionId: activeSession });
175
+ + pendingCreateId = id;
176
+ + runtimePreferencesRequestId = "server-runtime-preferences-1";
177
+ + send({
178
+ + id: runtimePreferencesRequestId,
179
+ + method: "session/requestRuntimePreferences",
180
+ + params: { sessionId: activeSession, scope: "runtime-materialization" },
181
+ + });
182
+ break;
183
+ }
184
+ case "session/subscribe": {
@@ -1,5 +1,18 @@
1
1
  # Delegation artifact contract
2
2
 
3
+ ## Runtime ownership
4
+
5
+ The loaded `ultra-delegate` Skill owns `scripts/delegate.cjs`,
6
+ `scripts/delegate-worker.cjs`, `scripts/host-profile.cjs`,
7
+ `scripts/agent-execution-driver.cjs`, `scripts/acp-driver.cjs`,
8
+ `scripts/cli-driver.cjs`, `scripts/acp-conformance.cjs`, and its launch-only profiles.
9
+ Invoke the launcher with the loaded Skill's absolute path. It has no package-root or
10
+ global `ubp` dependency. The Claude and Codex profiles separately invoke exact pinned
11
+ ACP adapter packages through `npx`; no `npx` lookup is used to locate Ultra itself.
12
+ The package `ubp delegate` command is a thin
13
+ one-release compatibility import of the same functions; it contains no launcher or
14
+ worker behavior of its own.
15
+
3
16
  ## Permission
4
17
 
5
18
  ```json
@@ -61,7 +74,7 @@ the host prompt, extracts this object from native structured output, and adds
61
74
  failures also add `failure_type`. A nonzero process cannot publish `finished`.
62
75
 
63
76
  Every receipt, worker spec, and terminal result also records the transport truth:
64
- `transport_maturity` (from the shared host profile) and the exact `transport_surface`
77
+ `transport_maturity` (from the Skill-local host profile) and the exact `transport_surface`
65
78
  wording. The ZCode headless transport is `experimental` with no public stability
66
79
  contract and is not the documented ZCode Desktop interactive surface; launching it
67
80
  requires the explicit `--ack-experimental` flag, prints a stderr warning, and stamps
@@ -69,11 +82,57 @@ requires the explicit `--ack-experimental` flag, prints a stderr warning, and st
69
82
  internal CLI run as a documented Desktop session — including failure, cancellation,
70
83
  and timeout recovery results.
71
84
 
85
+ They also record `execution_driver`, `driver_fallback_reason`, and the probed
86
+ `acp_capability`, including candidate-identity validity when the profile declares
87
+ bounded local version probes. ACP results add negotiated `acp_protocol_version`, observed
88
+ `acp_stop_reason`, and `events_file`. These are mechanical observations only. In
89
+ particular, `stopReason: end_turn`, a completed tool call, an ACP plan, or process exit
90
+ cannot synthesize the exact model response above or satisfy its Git-diff validation.
91
+
92
+ ## ACP v1 permission and event boundary
93
+
94
+ The stdio client advertises no client filesystem, terminal, or terminal-auth
95
+ capability. It creates one fresh session with the isolated worktree as absolute `cwd`,
96
+ an empty MCP-server list, and one digest-bound text prompt. Agent-side file tools remain
97
+ inside the Host process and the existing worktree/diff enforcement remains final.
98
+
99
+ ACP `session/request_permission` uses least authority:
100
+
101
+ - read, search, and think may select an offered `allow_once`;
102
+ - edit, delete, and move may select `allow_once` only when every non-empty absolute
103
+ location is already inside a granted real writable root and outside `.ultra/`;
104
+ - execute, fetch, mode switching, unknown operations, read-only writes, symlink escape,
105
+ and every other widening select an offered rejection and make the run terminally
106
+ denied;
107
+ - `allow_always` is never selected; cancellation answers any pending permission request
108
+ with ACP's `cancelled` outcome.
109
+
110
+ An agent may send creation-time `available_commands_update`, `current_mode_update`,
111
+ `config_option_update`, or `session_info_update` before the `session/new` response.
112
+ Ultra holds at most 32 such messages and 256 KiB transiently, persists no raw payload,
113
+ and replays them only after every message session ID equals the returned session ID.
114
+ Any other early update kind, identity mismatch, count overflow, or byte overflow is a
115
+ typed failure; pre-session buffering cannot contribute model result text.
116
+
117
+ `events.jsonl` is bounded disposable telemetry. It stores phase/update type, tool kind
118
+ and status, counts, permission decision/scope, and terminal stop reason. It drops
119
+ `agent_thought_chunk` entirely and never stores message text, titles, raw tool
120
+ input/output, credentials, or protocol wire payloads. Status re-projects the latest
121
+ record through the same fixed safe shape, so a malformed or replaced journal becomes
122
+ `event_journal_malformed` instead of being echoed. Loss of the journal does not affect
123
+ recovery or completion.
124
+
72
125
  ## Recovery
73
126
 
74
127
  - `status` distinguishes running, cancelling, stalled, and terminal artifacts.
128
+ - ACP status may also expose the latest redacted derived event; it remains non-authoritative.
75
129
  - `cancel` writes `cancel.request`; the worker terminates its host process, publishes a
76
130
  failed result with `failure_type: cancelled`, and removes `run.lock`.
77
131
  - `--timeout` does the same with `failure_type: timeout`.
132
+ - `ULTRA_DELEGATE_FORCE_CLI=1` bypasses ACP selection for one operator-controlled run
133
+ and records `acp_forced_cli`; it does not mutate the conformance record.
134
+ - `acp_auth_required` reported by `session/new` before any prompt was sent runs the
135
+ immutable bounded CLI fallback once and records `acp_fallback.prompt_sent: false`.
136
+ No other ACP failure is retried, preventing duplicate provider work.
78
137
  - A stopped worker with no result is recoverable through `cancel`, which finalizes the
79
138
  stale run. Retry under a new delegation id and fresh digests.