@excitedjs/agent-runtime-claude-code 0.7.0-alpha.g5e5d9ff8fb89 → 0.7.0-alpha.g72af66e58ab3
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 +29 -17
- package/dist/rpc.d.ts +20 -25
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +106 -98
- package/dist/rpc.js.map +1 -1
- package/dist/runtime-submissions.d.ts +10 -9
- package/dist/runtime-submissions.d.ts.map +1 -1
- package/dist/runtime-submissions.js +7 -75
- package/dist/runtime-submissions.js.map +1 -1
- package/dist/runtime.d.ts +1 -2
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +13 -28
- package/dist/runtime.js.map +1 -1
- package/dist/stream.d.ts +7 -5
- package/dist/stream.d.ts.map +1 -1
- package/dist/stream.js +12 -14
- package/dist/stream.js.map +1 -1
- package/dist/supervisor.d.ts.map +1 -1
- package/dist/supervisor.js +0 -15
- package/dist/supervisor.js.map +1 -1
- package/dist/types.d.ts +6 -7
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/control-rpc.d.ts +0 -21
- package/dist/control-rpc.d.ts.map +0 -1
- package/dist/control-rpc.js +0 -103
- package/dist/control-rpc.js.map +0 -1
package/README.md
CHANGED
|
@@ -35,24 +35,25 @@ through the same package-loader path as external `npm:` providers.
|
|
|
35
35
|
## Turn lifecycle
|
|
36
36
|
|
|
37
37
|
The public runtime boundary returns one `RuntimeSubmission` handle per accepted
|
|
38
|
-
send
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
state and a final result must be captured before the object settles. Live steer
|
|
44
|
-
fails loudly without that capability. Runtime stop fences queued session work,
|
|
45
|
-
terminates the supervised process group with absence proof, and resolves every
|
|
46
|
-
unsettled public object as stopped.
|
|
38
|
+
send. Each native result creates one immutable `RuntimeCompletion` shared by the
|
|
39
|
+
submissions it answers. Folded inputs share that completion object; queued inputs
|
|
40
|
+
wait for their own result. RPC derives the answered command group from started
|
|
41
|
+
commands and matching result UUID evidence. Request-window drainage separately
|
|
42
|
+
waits for terminal lifecycle states and the attributed results.
|
|
47
43
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
`
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
Background native turns may run without a submission. Their activity and result
|
|
45
|
+
boundaries remain observable, but they settle no unrelated request and do not
|
|
46
|
+
terminate the resident process. Explicit inputs steered into a background turn
|
|
47
|
+
settle normally once they join it. Live steering fails loudly without
|
|
48
|
+
`msg_lifecycle_v1`; lifecycle-less sessions retain single-input compatibility.
|
|
49
|
+
|
|
50
|
+
Core owns source deduplication, captured recipients and completion-token delivery.
|
|
51
|
+
The provider owns native admission: `failed` means the command was proven not
|
|
52
|
+
written, while `ambiguous` means a native write may have been accepted and must
|
|
53
|
+
not be retried automatically. Runtime stop synchronously fences new input,
|
|
54
|
+
releases pending capability/write waiters, terminates the supervised process
|
|
55
|
+
group with absence proof, resolves unsettled submissions as stopped, and drains
|
|
56
|
+
already-started admission calls before it resolves.
|
|
56
57
|
|
|
57
58
|
## Native sessions and transcripts
|
|
58
59
|
|
|
@@ -72,3 +73,14 @@ message/tool blocks in chronological order, and owns opaque cursors, query and
|
|
|
72
73
|
rewrite mismatch detection, payload redaction/truncation, and the fixed host
|
|
73
74
|
output budget. Native command/session IDs and filesystem paths never appear in
|
|
74
75
|
transcript pages.
|
|
76
|
+
|
|
77
|
+
## Custom session factories
|
|
78
|
+
|
|
79
|
+
A custom `ClaudeCodeSessionFactory` that emits `onProtocolEvent` results must
|
|
80
|
+
include `commandUuids`: the submitted commands answered by that result. Use an
|
|
81
|
+
empty array for a native turn with no related submission. Folded inputs share
|
|
82
|
+
one result and its command group; a queued input is included only in the result
|
|
83
|
+
that answers it. The default session computes this group from native command
|
|
84
|
+
lifecycle and matching result UUID evidence. The turn's original trigger does
|
|
85
|
+
not decide completion delivery. This Claude-specific callback requirement does
|
|
86
|
+
not change the neutral `AgentRuntime` or `RuntimeSubmission` contracts.
|
package/dist/rpc.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Claude Code stream-json turn RPC.
|
|
3
3
|
*
|
|
4
4
|
* The supervisor owns the child process. This class owns one in-flight command
|
|
5
|
-
* group, stdout line demux, command drainage,
|
|
5
|
+
* group, resident native-turn aggregation, stdout line demux, command drainage,
|
|
6
|
+
* and defensive control replies.
|
|
6
7
|
*
|
|
7
8
|
* One resident CLI execution window can span several submitted commands: a
|
|
8
9
|
* live steer is written while the CLI is already running. How the CLI answers them is
|
|
@@ -16,16 +17,17 @@
|
|
|
16
17
|
* - **Or they do not.** A command that arrives between turns runs on its own
|
|
17
18
|
* and gets its own `result`.
|
|
18
19
|
* - **`result.user_message_uuid` is not a completion ledger.** It is present
|
|
19
|
-
* only sometimes
|
|
20
|
-
* is
|
|
21
|
-
*
|
|
20
|
+
* only sometimes, is not reliably the first-submitted uuid of a fold, and
|
|
21
|
+
* is absent entirely on the `error_during_execution` artifact an
|
|
22
|
+
* interrupt produces.
|
|
22
23
|
* - **`command_lifecycle` is the attribution signal.** Started commands identify
|
|
23
24
|
* the submissions represented by the next native `result`; terminal states
|
|
24
25
|
* drain the resident execution window. Its ordering against `result` is not
|
|
25
26
|
* stable.
|
|
26
27
|
*
|
|
27
|
-
* Every valid `result` is forwarded immediately as its own native
|
|
28
|
-
*
|
|
28
|
+
* Every valid `result` is forwarded immediately as its own native boundary,
|
|
29
|
+
* including background results with no submitted group. Lifecycle terminality
|
|
30
|
+
* and attributed results decide when the command group has
|
|
29
31
|
* drained and the resident session may accept a new initial command; it never
|
|
30
32
|
* aggregates several results into one completion.
|
|
31
33
|
*/
|
|
@@ -47,36 +49,26 @@ export declare class ClaudeCodeStreamRpc {
|
|
|
47
49
|
private readonly stdin;
|
|
48
50
|
private readonly options;
|
|
49
51
|
private readonly lineBuf;
|
|
52
|
+
private readonly aggregator;
|
|
50
53
|
private pending;
|
|
51
54
|
private lifecycleSupported;
|
|
52
|
-
private
|
|
55
|
+
private remoteControlRequestId;
|
|
53
56
|
constructor(stdin: Writable, options: ClaudeCodeStreamRpcOptions);
|
|
54
57
|
submitTurn(prompt: string, options?: TurnSubmitOptions, commandUuid?: string): Promise<void>;
|
|
55
58
|
steerTurn(prompt: string, options?: TurnSubmitOptions, commandUuid?: string): Promise<void>;
|
|
56
59
|
private writeSteer;
|
|
57
60
|
onStdoutChunk(chunk: string): void;
|
|
58
61
|
failPending(err: Error): void;
|
|
59
|
-
interruptTurn(reason: string): Promise<boolean>;
|
|
60
62
|
enableRemoteControl(): void;
|
|
61
63
|
/**
|
|
62
64
|
* Detach the in-flight turn: clear its deadline timer and null `pending`,
|
|
63
65
|
* returning it so the caller can resolve or reject it exactly once.
|
|
64
66
|
*/
|
|
65
67
|
private settlePending;
|
|
66
|
-
/**
|
|
67
|
-
* End the execution window on the artifact of an accepted interrupt. This is
|
|
68
|
-
* the only settlement an interrupt has, deliberately: a lifecycle
|
|
69
|
-
* `cancelled` for the same command arrives *after* the artifact and is then
|
|
70
|
-
* a no-op, so no path can settle the turn early and leave the artifact to
|
|
71
|
-
* arrive against an empty `pending` — which the `result` case reads as an
|
|
72
|
-
* unattributable envelope and answers by reaping the resident child.
|
|
73
|
-
*/
|
|
74
|
-
private settleInterrupted;
|
|
75
68
|
/**
|
|
76
69
|
* Mark a submitted command as producing nothing further, then re-check
|
|
77
|
-
*
|
|
78
|
-
* and a short phrase for a command
|
|
79
|
-
* because the CLI gives no other trace of a command it declined.
|
|
70
|
+
* drainage. `abnormalReason` is `null` for the normal ending (`completed`)
|
|
71
|
+
* and a short phrase for a command declined or cancelled by the CLI.
|
|
80
72
|
*
|
|
81
73
|
* A command ending abnormally never fails the turn by itself: the probe
|
|
82
74
|
* shows a `cancelled` command coexisting with another that answers normally
|
|
@@ -86,21 +78,22 @@ export declare class ClaudeCodeStreamRpc {
|
|
|
86
78
|
private markCommandTerminal;
|
|
87
79
|
/**
|
|
88
80
|
* The drainage gate: every submitted command has reached a terminal
|
|
89
|
-
* lifecycle state
|
|
90
|
-
*
|
|
81
|
+
* lifecycle state, no started command awaits a result, AND a result has
|
|
82
|
+
* answered a submitted command. Background results do not satisfy that last
|
|
83
|
+
* condition. Each native boundary has already been forwarded separately.
|
|
91
84
|
*
|
|
92
85
|
* Two escapes, both anti-hang:
|
|
93
86
|
*
|
|
94
87
|
* - no lifecycle signal at all (`msg_lifecycle_v1` absent, so no
|
|
95
88
|
* `command_lifecycle` will ever arrive) — the `result` is then the only
|
|
96
89
|
* terminal event there is, so settle on it;
|
|
97
|
-
* - every command terminal, none
|
|
98
|
-
* can answer this
|
|
90
|
+
* - every command terminal, none completed, and no attributed result —
|
|
91
|
+
* nothing can answer this window, so fail it loudly. The idle deadline is not an
|
|
99
92
|
* acceptable backstop here: it reaps the resident child, and any inbound
|
|
100
93
|
* line re-arms it, so a healthy session could be killed long after the
|
|
101
94
|
* turn became unanswerable.
|
|
102
95
|
*
|
|
103
|
-
* When a command
|
|
96
|
+
* When a command completed but no result has arrived yet, this waits: the
|
|
104
97
|
* probe shows terminal lifecycle states arriving both before and after the
|
|
105
98
|
* result they belong to, so "terminal, therefore no result is coming" is not
|
|
106
99
|
* a sound inference.
|
|
@@ -121,5 +114,7 @@ export declare class ClaudeCodeStreamRpc {
|
|
|
121
114
|
private resolveWriteWaiter;
|
|
122
115
|
private rejectWriteWaiter;
|
|
123
116
|
private rejectWriteWaiters;
|
|
117
|
+
private onControlRequest;
|
|
118
|
+
private onControlResponse;
|
|
124
119
|
}
|
|
125
120
|
//# sourceMappingURL=rpc.d.ts.map
|
package/dist/rpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],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IA6CV,SAAS,CACb,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,iBAAsB,EAC/B,WAAW,GAAE,MAAqB,GACjC,OAAO,CAAC,IAAI,CAAC;IAuBhB,OAAO,CAAC,UAAU;IA6ClB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIlC,WAAW,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI;IAI7B,mBAAmB,IAAI,IAAI;IAM3B;;;OAGG;IACH,OAAO,CAAC,aAAa;IAiBrB;;;;;;;;;OASG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,aAAa;IAwBrB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,MAAM;IAoHd,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,uBAAuB;IAQ/B,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,gBAAgB;IAwBxB,OAAO,CAAC,iBAAiB;CAyB1B"}
|
package/dist/rpc.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Claude Code stream-json turn RPC.
|
|
3
3
|
*
|
|
4
4
|
* The supervisor owns the child process. This class owns one in-flight command
|
|
5
|
-
* group, stdout line demux, command drainage,
|
|
5
|
+
* group, resident native-turn aggregation, stdout line demux, command drainage,
|
|
6
|
+
* and defensive control replies.
|
|
6
7
|
*
|
|
7
8
|
* One resident CLI execution window can span several submitted commands: a
|
|
8
9
|
* live steer is written while the CLI is already running. How the CLI answers them is
|
|
@@ -16,22 +17,22 @@
|
|
|
16
17
|
* - **Or they do not.** A command that arrives between turns runs on its own
|
|
17
18
|
* and gets its own `result`.
|
|
18
19
|
* - **`result.user_message_uuid` is not a completion ledger.** It is present
|
|
19
|
-
* only sometimes
|
|
20
|
-
* is
|
|
21
|
-
*
|
|
20
|
+
* only sometimes, is not reliably the first-submitted uuid of a fold, and
|
|
21
|
+
* is absent entirely on the `error_during_execution` artifact an
|
|
22
|
+
* interrupt produces.
|
|
22
23
|
* - **`command_lifecycle` is the attribution signal.** Started commands identify
|
|
23
24
|
* the submissions represented by the next native `result`; terminal states
|
|
24
25
|
* drain the resident execution window. Its ordering against `result` is not
|
|
25
26
|
* stable.
|
|
26
27
|
*
|
|
27
|
-
* Every valid `result` is forwarded immediately as its own native
|
|
28
|
-
*
|
|
28
|
+
* Every valid `result` is forwarded immediately as its own native boundary,
|
|
29
|
+
* including background results with no submitted group. Lifecycle terminality
|
|
30
|
+
* and attributed results decide when the command group has
|
|
29
31
|
* drained and the resident session may accept a new initial command; it never
|
|
30
32
|
* aggregates several results into one completion.
|
|
31
33
|
*/
|
|
32
34
|
import { randomUUID } from 'node:crypto';
|
|
33
|
-
import { buildUserMessage, LineBuffer, parseLine, TurnAggregator, } from './stream.js';
|
|
34
|
-
import { ClaudeCodeControlRpc } from './control-rpc.js';
|
|
35
|
+
import { buildCanUseToolAllow, buildControlAck, buildRemoteControlEnable, buildUserMessage, LineBuffer, parseLine, TurnAggregator, } from './stream.js';
|
|
35
36
|
/** Provider-private admission classification; never crosses the neutral API. */
|
|
36
37
|
export class ClaudeSteerAdmissionError extends Error {
|
|
37
38
|
admission;
|
|
@@ -45,13 +46,13 @@ export class ClaudeCodeStreamRpc {
|
|
|
45
46
|
stdin;
|
|
46
47
|
options;
|
|
47
48
|
lineBuf = new LineBuffer();
|
|
49
|
+
aggregator = new TurnAggregator();
|
|
48
50
|
pending = null;
|
|
49
51
|
lifecycleSupported = null;
|
|
50
|
-
|
|
52
|
+
remoteControlRequestId = null;
|
|
51
53
|
constructor(stdin, options) {
|
|
52
54
|
this.stdin = stdin;
|
|
53
55
|
this.options = options;
|
|
54
|
-
this.control = new ClaudeCodeControlRpc(stdin, options);
|
|
55
56
|
}
|
|
56
57
|
async submitTurn(prompt, options = {}, commandUuid = randomUUID()) {
|
|
57
58
|
if (!this.stdin.writable) {
|
|
@@ -64,14 +65,12 @@ export class ClaudeCodeStreamRpc {
|
|
|
64
65
|
const pending = {
|
|
65
66
|
resolve,
|
|
66
67
|
reject,
|
|
67
|
-
aggregator: new TurnAggregator(),
|
|
68
68
|
timer: null,
|
|
69
69
|
submitted: [commandUuid],
|
|
70
70
|
terminal: new Set(),
|
|
71
71
|
startedSinceResult: new Set(),
|
|
72
72
|
ranAnyCommand: false,
|
|
73
73
|
sawResult: false,
|
|
74
|
-
interruptRequested: false,
|
|
75
74
|
lastAbnormalReason: null,
|
|
76
75
|
capabilityWaiters: [],
|
|
77
76
|
writeWaiters: new Map(),
|
|
@@ -155,24 +154,23 @@ export class ClaudeCodeStreamRpc {
|
|
|
155
154
|
failPending(err) {
|
|
156
155
|
this.settlePending(err)?.reject(err);
|
|
157
156
|
}
|
|
158
|
-
interruptTurn(reason) {
|
|
159
|
-
return this.control.interruptTurn(this.pending, reason);
|
|
160
|
-
}
|
|
161
157
|
enableRemoteControl() {
|
|
162
|
-
this.
|
|
158
|
+
if (!this.stdin.writable)
|
|
159
|
+
return;
|
|
160
|
+
this.remoteControlRequestId = randomUUID();
|
|
161
|
+
this.stdin.write(`${buildRemoteControlEnable(this.remoteControlRequestId)}\n`);
|
|
163
162
|
}
|
|
164
163
|
/**
|
|
165
164
|
* Detach the in-flight turn: clear its deadline timer and null `pending`,
|
|
166
165
|
* returning it so the caller can resolve or reject it exactly once.
|
|
167
166
|
*/
|
|
168
|
-
settlePending(failure
|
|
167
|
+
settlePending(failure) {
|
|
169
168
|
const pending = this.pending;
|
|
170
169
|
if (pending === null)
|
|
171
170
|
return null;
|
|
172
171
|
if (pending.timer !== null)
|
|
173
172
|
clearTimeout(pending.timer);
|
|
174
173
|
this.pending = null;
|
|
175
|
-
this.control.settleTurn(pending, failure, interruptOutcome);
|
|
176
174
|
// On an explicit failure (write error, stop, idle reap) both waiter kinds
|
|
177
175
|
// get the real error. On a clean `result` settlement there is no error:
|
|
178
176
|
// capability waiters never got a decision, while write waiters were written
|
|
@@ -181,25 +179,10 @@ export class ClaudeCodeStreamRpc {
|
|
|
181
179
|
this.rejectWriteWaiters(pending, failure ?? steerWriteUnconfirmedError());
|
|
182
180
|
return pending;
|
|
183
181
|
}
|
|
184
|
-
/**
|
|
185
|
-
* End the execution window on the artifact of an accepted interrupt. This is
|
|
186
|
-
* the only settlement an interrupt has, deliberately: a lifecycle
|
|
187
|
-
* `cancelled` for the same command arrives *after* the artifact and is then
|
|
188
|
-
* a no-op, so no path can settle the turn early and leave the artifact to
|
|
189
|
-
* arrive against an empty `pending` — which the `result` case reads as an
|
|
190
|
-
* unattributable envelope and answers by reaping the resident child.
|
|
191
|
-
*/
|
|
192
|
-
settleInterrupted(pending) {
|
|
193
|
-
if (this.pending !== pending)
|
|
194
|
-
return;
|
|
195
|
-
this.options.onProtocolEvent?.({ kind: 'interrupted' });
|
|
196
|
-
this.settlePending(undefined, true)?.resolve();
|
|
197
|
-
}
|
|
198
182
|
/**
|
|
199
183
|
* Mark a submitted command as producing nothing further, then re-check
|
|
200
|
-
*
|
|
201
|
-
* and a short phrase for a command
|
|
202
|
-
* because the CLI gives no other trace of a command it declined.
|
|
184
|
+
* drainage. `abnormalReason` is `null` for the normal ending (`completed`)
|
|
185
|
+
* and a short phrase for a command declined or cancelled by the CLI.
|
|
203
186
|
*
|
|
204
187
|
* A command ending abnormally never fails the turn by itself: the probe
|
|
205
188
|
* shows a `cancelled` command coexisting with another that answers normally
|
|
@@ -224,21 +207,22 @@ export class ClaudeCodeStreamRpc {
|
|
|
224
207
|
}
|
|
225
208
|
/**
|
|
226
209
|
* The drainage gate: every submitted command has reached a terminal
|
|
227
|
-
* lifecycle state
|
|
228
|
-
*
|
|
210
|
+
* lifecycle state, no started command awaits a result, AND a result has
|
|
211
|
+
* answered a submitted command. Background results do not satisfy that last
|
|
212
|
+
* condition. Each native boundary has already been forwarded separately.
|
|
229
213
|
*
|
|
230
214
|
* Two escapes, both anti-hang:
|
|
231
215
|
*
|
|
232
216
|
* - no lifecycle signal at all (`msg_lifecycle_v1` absent, so no
|
|
233
217
|
* `command_lifecycle` will ever arrive) — the `result` is then the only
|
|
234
218
|
* terminal event there is, so settle on it;
|
|
235
|
-
* - every command terminal, none
|
|
236
|
-
* can answer this
|
|
219
|
+
* - every command terminal, none completed, and no attributed result —
|
|
220
|
+
* nothing can answer this window, so fail it loudly. The idle deadline is not an
|
|
237
221
|
* acceptable backstop here: it reaps the resident child, and any inbound
|
|
238
222
|
* line re-arms it, so a healthy session could be killed long after the
|
|
239
223
|
* turn became unanswerable.
|
|
240
224
|
*
|
|
241
|
-
* When a command
|
|
225
|
+
* When a command completed but no result has arrived yet, this waits: the
|
|
242
226
|
* probe shows terminal lifecycle states arriving both before and after the
|
|
243
227
|
* result they belong to, so "terminal, therefore no result is coming" is not
|
|
244
228
|
* a sound inference.
|
|
@@ -291,18 +275,17 @@ export class ClaudeCodeStreamRpc {
|
|
|
291
275
|
}, this.options.turnTimeoutMs);
|
|
292
276
|
}
|
|
293
277
|
onLine(line) {
|
|
294
|
-
//
|
|
295
|
-
//
|
|
296
|
-
// timer via `settlePending` below.
|
|
278
|
+
// Native activity refreshes the pending commands' idle deadline, even
|
|
279
|
+
// during a background turn. Only command drainage clears the timer.
|
|
297
280
|
if (this.pending !== null)
|
|
298
281
|
this.armIdleTimer(this.pending);
|
|
299
282
|
switch (line.kind) {
|
|
300
283
|
case 'init':
|
|
301
284
|
this.decideLifecycleSupport(line.capabilities.includes('msg_lifecycle_v1'));
|
|
302
|
-
this.
|
|
285
|
+
this.aggregator.accept(line);
|
|
303
286
|
break;
|
|
304
287
|
case 'assistant':
|
|
305
|
-
this.
|
|
288
|
+
this.aggregator.accept(line);
|
|
306
289
|
this.options.onProtocolEvent?.({ kind: 'stream', line });
|
|
307
290
|
break;
|
|
308
291
|
case 'user':
|
|
@@ -311,24 +294,26 @@ export class ClaudeCodeStreamRpc {
|
|
|
311
294
|
break;
|
|
312
295
|
case 'command_lifecycle': {
|
|
313
296
|
const pending = this.pending;
|
|
314
|
-
if (
|
|
297
|
+
if (line.commandUuid === null || line.state === null)
|
|
315
298
|
break;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
if (line.state === 'started')
|
|
324
|
-
pending.startedSinceResult.add(line.commandUuid);
|
|
299
|
+
this.options.onProtocolEvent?.({
|
|
300
|
+
kind: 'command_lifecycle',
|
|
301
|
+
commandUuid: line.commandUuid,
|
|
302
|
+
state: line.state,
|
|
303
|
+
});
|
|
325
304
|
// `command_lifecycle` does double duty: it coordinates live-steer
|
|
326
305
|
// admission (writeWaiters) and proves lifecycle capability, and its
|
|
327
306
|
// terminal states are the drainage gate when the CLI represents several
|
|
328
307
|
// started commands with one `result`.
|
|
329
308
|
const newlySupported = this.lifecycleSupported === null;
|
|
330
|
-
|
|
331
|
-
|
|
309
|
+
this.lifecycleSupported = true;
|
|
310
|
+
if (line.state === 'cancelled')
|
|
311
|
+
this.aggregator.discard();
|
|
312
|
+
if (pending === null)
|
|
313
|
+
break;
|
|
314
|
+
if (line.state === 'started' && pending.submitted.includes(line.commandUuid)) {
|
|
315
|
+
pending.startedSinceResult.add(line.commandUuid);
|
|
316
|
+
}
|
|
332
317
|
this.resolveWriteWaiter(pending, line.commandUuid);
|
|
333
318
|
if (newlySupported && this.pending === pending) {
|
|
334
319
|
this.flushCapabilityWaiters(pending);
|
|
@@ -346,62 +331,49 @@ export class ClaudeCodeStreamRpc {
|
|
|
346
331
|
}
|
|
347
332
|
case 'result': {
|
|
348
333
|
const pending = this.pending;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
break;
|
|
354
|
-
}
|
|
355
|
-
const commandUuid = line.outcome.userMessageUuid;
|
|
356
|
-
if (commandUuid !== null && !pending.submitted.includes(commandUuid)) {
|
|
357
|
-
const error = new Error(`claude result envelope for unsubmitted command ${commandUuid}; ` +
|
|
358
|
-
'native completion ownership is ambiguous');
|
|
359
|
-
this.options.log?.('error', error.message, error);
|
|
360
|
-
this.settlePending(error)?.reject(error);
|
|
361
|
-
this.options.reapOnTimeout();
|
|
362
|
-
break;
|
|
363
|
-
}
|
|
364
|
-
// The artifact an accepted interrupt leaves behind is not a native
|
|
365
|
-
// answer boundary. Measured against claude 2.1.263 (both an interrupted
|
|
366
|
-
// stream and an interrupted tool call): it is a `result` with subtype
|
|
367
|
-
// `error_during_execution`, `is_error: true`, no result text, and the
|
|
368
|
-
// interrupted command's own `user_message_uuid`. Nothing in its shape
|
|
369
|
-
// separates it from a genuine execution error, so our own accepted
|
|
370
|
-
// request is the discriminator — an `error_during_execution` nobody
|
|
371
|
-
// asked for stays a real failure and falls through below.
|
|
372
|
-
if (pending.interruptRequested &&
|
|
373
|
-
line.outcome.subtype === 'error_during_execution') {
|
|
374
|
-
this.settleInterrupted(pending);
|
|
375
|
-
break;
|
|
376
|
-
}
|
|
377
|
-
// Inherited from #342: an `error_during_execution` carrying neither a
|
|
378
|
-
// uuid nor result text is nobody's answer and mints no boundary. Its
|
|
379
|
-
// premise was not reproduced here — a steer sent mid-tool-call did not
|
|
380
|
-
// abort the turn and produced no artifact at all (claude 2.1.263) —
|
|
381
|
-
// and the streaming-phase steer was not probed, so it stays as it was
|
|
382
|
-
// rather than being deleted on one negative observation.
|
|
334
|
+
this.aggregator.accept(line);
|
|
335
|
+
const outcome = this.aggregator.takeOutcome();
|
|
336
|
+
// The interrupt artifact (`error_during_execution` with no result) is
|
|
337
|
+
// not a native answer boundary. Older valid results may omit the uuid.
|
|
383
338
|
if (line.outcome.subtype === 'error_during_execution' &&
|
|
384
339
|
line.outcome.userMessageUuid === null &&
|
|
385
340
|
line.outcome.text === null) {
|
|
386
341
|
this.options.log?.('warn', 'claude interrupt result artifact ignored');
|
|
387
342
|
break;
|
|
388
343
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
344
|
+
// Every started command participates, including background steers.
|
|
345
|
+
// A matching result UUID also identifies a submitted input whose
|
|
346
|
+
// started event was omitted; a foreign UUID never vetoes the group.
|
|
347
|
+
const commandUuids = new Set(pending?.startedSinceResult);
|
|
348
|
+
if (pending !== null) {
|
|
349
|
+
const commandUuid = line.outcome.userMessageUuid;
|
|
350
|
+
if (commandUuid !== null && pending.submitted.includes(commandUuid)) {
|
|
351
|
+
commandUuids.add(commandUuid);
|
|
352
|
+
}
|
|
353
|
+
// Without lifecycle, admission allows only the initial input. Its
|
|
354
|
+
// legacy UUID-less result is attributable, but an explicit foreign
|
|
355
|
+
// UUID is not. Lifecycle-capable background results stay unassigned.
|
|
356
|
+
if (this.lifecycleSupported !== true && commandUuid === null) {
|
|
357
|
+
commandUuids.add(pending.submitted[0]);
|
|
358
|
+
}
|
|
359
|
+
pending.startedSinceResult.clear();
|
|
360
|
+
if (commandUuids.size > 0)
|
|
361
|
+
pending.sawResult = true;
|
|
362
|
+
}
|
|
393
363
|
this.options.onProtocolEvent?.({
|
|
394
364
|
kind: 'result',
|
|
395
365
|
outcome,
|
|
366
|
+
commandUuids: [...commandUuids],
|
|
396
367
|
});
|
|
397
|
-
|
|
368
|
+
if (pending !== null)
|
|
369
|
+
this.settleIfReady(pending);
|
|
398
370
|
break;
|
|
399
371
|
}
|
|
400
372
|
case 'control_request':
|
|
401
|
-
this.
|
|
373
|
+
this.onControlRequest(line.requestId, line.subtype, line.request);
|
|
402
374
|
break;
|
|
403
375
|
case 'control_response':
|
|
404
|
-
this.
|
|
376
|
+
this.onControlResponse(line.requestId, line.ok, line.response, line.error);
|
|
405
377
|
break;
|
|
406
378
|
case 'parse_error':
|
|
407
379
|
this.options.log?.('warn', `claude stream-json parse error: ${line.raw}`);
|
|
@@ -465,6 +437,42 @@ export class ClaudeCodeStreamRpc {
|
|
|
465
437
|
for (const waiter of waiters)
|
|
466
438
|
waiter.reject(failure);
|
|
467
439
|
}
|
|
440
|
+
onControlRequest(requestId, subtype, request) {
|
|
441
|
+
if (requestId === null || !this.stdin.writable)
|
|
442
|
+
return;
|
|
443
|
+
// Unattended posture: answer permission callbacks so a turn never wedges
|
|
444
|
+
// waiting on a human.
|
|
445
|
+
let reply;
|
|
446
|
+
if (subtype === 'can_use_tool') {
|
|
447
|
+
const rawInput = request['input'];
|
|
448
|
+
const input = typeof rawInput === 'object' &&
|
|
449
|
+
rawInput !== null &&
|
|
450
|
+
!Array.isArray(rawInput)
|
|
451
|
+
? rawInput
|
|
452
|
+
: {};
|
|
453
|
+
reply = buildCanUseToolAllow(requestId, input);
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
reply = buildControlAck(requestId);
|
|
457
|
+
}
|
|
458
|
+
this.stdin.write(`${reply}\n`);
|
|
459
|
+
}
|
|
460
|
+
onControlResponse(requestId, ok, response, error) {
|
|
461
|
+
if (requestId === null || requestId !== this.remoteControlRequestId)
|
|
462
|
+
return;
|
|
463
|
+
this.remoteControlRequestId = null;
|
|
464
|
+
if (ok && response !== null) {
|
|
465
|
+
const url = response['session_url'] ?? response['connect_url'];
|
|
466
|
+
if (typeof url === 'string') {
|
|
467
|
+
this.options.onRemoteControlUrl?.(url);
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
this.options.log?.('warn', 'claude remote control enable succeeded without a URL');
|
|
471
|
+
}
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
this.options.log?.('warn', `claude remote control enable failed${error !== null ? `: ${error}` : ''}`);
|
|
475
|
+
}
|
|
468
476
|
}
|
|
469
477
|
function lifecycleUnsupportedError() {
|
|
470
478
|
return preAdmissionError('claude resident session cannot prove live-steer lifecycle: ' +
|
package/dist/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,O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