@zvada/agent-server 0.3.24 → 0.3.25
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 +30 -0
- package/dist/client/client.js +93 -34
- package/dist/core/agents/scripted/scripted-agent.js +2 -1
- package/dist/core/agents/scripted/steps.js +1 -1
- package/dist/core/processes/identity.js +1 -0
- package/dist/core/processes/lifeline.js +9 -1
- package/dist/core/processes/process-table.js +1 -0
- package/dist/core/provision/extract.js +1 -0
- package/dist/core/runtime/agent-runtime.js +6 -3
- package/dist/core/runtime/turn.js +20 -10
- package/dist/protocol/credentials.js +2 -1
- package/dist/protocol/errors.js +12 -3
- package/dist/server/routes.js +3 -2
- package/dist/types/client/client.d.ts +6 -1
- package/dist/types/client/client.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/options.d.ts +4 -0
- package/dist/types/core/agents/claude-code/options.d.ts.map +1 -1
- package/dist/types/core/agents/scripted/scripted-agent.d.ts.map +1 -1
- package/dist/types/core/agents/scripted/steps.d.ts +1 -1
- package/dist/types/core/processes/identity.d.ts.map +1 -1
- package/dist/types/core/processes/lifeline.d.ts.map +1 -1
- package/dist/types/core/processes/process-table.d.ts.map +1 -1
- package/dist/types/core/provision/extract.d.ts.map +1 -1
- package/dist/types/core/runtime/agent-runtime.d.ts +4 -1
- package/dist/types/core/runtime/agent-runtime.d.ts.map +1 -1
- package/dist/types/core/runtime/turn.d.ts +12 -7
- package/dist/types/core/runtime/turn.d.ts.map +1 -1
- package/dist/types/protocol/clis.d.ts +3 -3
- package/dist/types/protocol/conversation.d.ts +6 -6
- package/dist/types/protocol/credentials.d.ts +13 -1
- package/dist/types/protocol/credentials.d.ts.map +1 -1
- package/dist/types/protocol/errors.d.ts +6 -4
- package/dist/types/protocol/errors.d.ts.map +1 -1
- package/dist/types/protocol/lifecycle.d.ts +4 -4
- package/dist/types/protocol/wire-api.d.ts +12 -12
- package/dist/types/protocol/wire.d.ts +8 -8
- package/dist/types/server/routes.d.ts.map +1 -1
- package/docs/consuming.md +26 -3
- package/docs/deploy.md +7 -0
- package/docs/harnesses.md +17 -4
- package/package.json +1 -1
- package/src/client/client.ts +114 -44
- package/src/core/agents/claude-code/options.ts +4 -0
- package/src/core/agents/scripted/scripted-agent.ts +2 -1
- package/src/core/agents/scripted/steps.ts +1 -1
- package/src/core/processes/identity.ts +1 -0
- package/src/core/processes/lifeline.ts +10 -1
- package/src/core/processes/process-table.ts +1 -0
- package/src/core/provision/extract.ts +1 -0
- package/src/core/runtime/agent-runtime.ts +6 -3
- package/src/core/runtime/turn.ts +21 -9
- package/src/protocol/credentials.ts +19 -5
- package/src/protocol/errors.ts +12 -3
- package/src/server/routes.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ and the measurements. Evidence lives in the LLP, not here. A release groups
|
|
|
7
7
|
its bullets under Breaking, Added, Changed and Fixed, breaking first. The
|
|
8
8
|
released sections below that predate this convention are kept as written.
|
|
9
9
|
|
|
10
|
+
## 0.3.25
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- A Codex resume refused because another app-server still holds the thread ("already
|
|
15
|
+
has an active writer") fails with the new error category `resume_busy`, not
|
|
16
|
+
`resume_failed`: the same resume succeeds once that one lets go. A product that
|
|
17
|
+
matched `resume_failed` retries later on `resume_busy` instead of starting fresh (LLP 0002).
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Under Bun, the lifeline shell and the `ps` and `sysctl` the engine runs get its
|
|
22
|
+
`process.env` as it is now, not as Bun was launched: a secret your product, or the
|
|
23
|
+
bin's own `AGENT_SERVER_*_TOKEN`, deleted from `process.env` no longer lives on in
|
|
24
|
+
the lifeline for as long as the engine runs (LLP 0007, The environment a process is given).
|
|
25
|
+
- A cancel that lands after a turn is admitted and before its harness begins it ends
|
|
26
|
+
the turn `cancelled`, where the turn ran to its own end; its answer is still
|
|
27
|
+
`hadTurn: false` (on the wire `unconfirmed`). A scripted `hang` takes `stopTakes`
|
|
28
|
+
also when the cancel came first, so a test can cancel without a sleep (LLP 0001, D9).
|
|
29
|
+
- `AgentServerClient.cancelTurn` for a turn the same client is starting (`runTurn`,
|
|
30
|
+
`startTurn`) is sent after that start's first send: a cancel in the same tick as the
|
|
31
|
+
start ends the turn `cancelled`, where it got `no_active_turn` and the turn ran on
|
|
32
|
+
(LLP 0001, D9).
|
|
33
|
+
- The error classifier no longer reads a status code out of an identifier: a thread
|
|
34
|
+
id holding `-b401-` or `-a429-` no longer makes a failure `auth` or `rate_limit`
|
|
35
|
+
(LLP 0002, Open vocabularies).
|
|
36
|
+
- `credentialRunsOn` takes any `AgentHarness` and answers `{ ok: false, error }` for
|
|
37
|
+
ACP and scripted, which run on no credential a product holds, where it threw a
|
|
38
|
+
`TypeError`; a caller naming Claude or Codex keeps the narrow type (LLP 0012).
|
|
39
|
+
|
|
10
40
|
## 0.3.24
|
|
11
41
|
|
|
12
42
|
### Added
|
package/dist/client/client.js
CHANGED
|
@@ -21,6 +21,40 @@ function stopOn(handle, signal) {
|
|
|
21
21
|
const off = () => signal.removeEventListener("abort", stop);
|
|
22
22
|
void handle.result.then(off, off);
|
|
23
23
|
}
|
|
24
|
+
// @ref LLP 0001#d9--the-wire-is-quick-ack-json-rpc-requests-flow-one-way — a cancel sent right behind its start reaches the turn
|
|
25
|
+
/**
|
|
26
|
+
* The `turn/start`s this client has not sent yet, each from before its
|
|
27
|
+
* first `await` until its first send or its end. The server takes a
|
|
28
|
+
* connection's requests in order and admits a turn in its start's handler,
|
|
29
|
+
* so a cancel for one of their turns goes out after that first send. Once
|
|
30
|
+
* sent, a start delays no cancel: after a redial a cancel can overtake its
|
|
31
|
+
* re-send, and is answered `no_active_turn`. Before its first send a start
|
|
32
|
+
* waits only on the handshake, a request the client's close fails, so no
|
|
33
|
+
* cancel waits past the close.
|
|
34
|
+
*/
|
|
35
|
+
class Starts {
|
|
36
|
+
unsent = new Set();
|
|
37
|
+
/** Record a start; the function returned lets it go (its first send, or its end), and may be called again. */
|
|
38
|
+
begin(sessionId, turnId) {
|
|
39
|
+
let settle = () => { };
|
|
40
|
+
const gone = new Promise((resolve) => {
|
|
41
|
+
settle = resolve;
|
|
42
|
+
});
|
|
43
|
+
const start = { sessionId, turnId, gone };
|
|
44
|
+
this.unsent.add(start);
|
|
45
|
+
return () => {
|
|
46
|
+
this.unsent.delete(start);
|
|
47
|
+
settle();
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** `send`, once no start of `turnId` (without one, of the session) is unsent; in the call when none is. */
|
|
51
|
+
after(sessionId, turnId, send) {
|
|
52
|
+
const waiting = [...this.unsent].filter((start) => start.sessionId === sessionId && (turnId === undefined || start.turnId === turnId));
|
|
53
|
+
if (waiting.length === 0)
|
|
54
|
+
return send();
|
|
55
|
+
return Promise.all(waiting.map((start) => start.gone)).then(send);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
24
58
|
/** How often `prepareClis` asks again while an install runs, besides when one ends. */
|
|
25
59
|
const PREPARE_POLL_MS = 2_000;
|
|
26
60
|
/**
|
|
@@ -36,6 +70,7 @@ export class AgentServerClient {
|
|
|
36
70
|
options;
|
|
37
71
|
connection;
|
|
38
72
|
turns = new Turns();
|
|
73
|
+
starts = new Starts();
|
|
39
74
|
progress = new Listeners();
|
|
40
75
|
authUpdates = new Listeners();
|
|
41
76
|
streams;
|
|
@@ -123,37 +158,47 @@ export class AgentServerClient {
|
|
|
123
158
|
* it), and `onEvent` hears it to its end.
|
|
124
159
|
*/
|
|
125
160
|
async runTurn(params, options = {}) {
|
|
126
|
-
await this.initialize();
|
|
127
161
|
const sessionId = params.sessionId ?? generateUUIDv7();
|
|
128
162
|
const turnId = params.turnId ?? generateUUIDv7();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const handle = this.turns.open(sessionId, turnId, true);
|
|
132
|
-
stopOn(handle, options.signal);
|
|
163
|
+
// Before the first `await`: a cancel sent right behind this call goes out after the start.
|
|
164
|
+
const release = this.starts.begin(sessionId, turnId);
|
|
133
165
|
try {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
await
|
|
149
|
-
|
|
150
|
-
|
|
166
|
+
await this.initialize();
|
|
167
|
+
if (this.turns.running(sessionId))
|
|
168
|
+
throw new Error(`session ${sessionId} already has an active turn`);
|
|
169
|
+
const handle = this.turns.open(sessionId, turnId, true);
|
|
170
|
+
try {
|
|
171
|
+
stopOn(handle, options.signal);
|
|
172
|
+
// `resend` sends (or fails for no connection) before its first `await`, in this call.
|
|
173
|
+
const sending = this.connection.resend(WIRE_METHODS.turnStart, { ...params, sessionId, turnId, subscribe: true },
|
|
174
|
+
// A turn that already ended streams nothing: its end is in the ack.
|
|
175
|
+
(ack) => {
|
|
176
|
+
if (!ack.terminal)
|
|
177
|
+
this.joinAt(handle, ack.headSeq, { turnId });
|
|
178
|
+
});
|
|
179
|
+
release();
|
|
180
|
+
const accepted = await sending;
|
|
181
|
+
const { terminal } = accepted;
|
|
182
|
+
if (terminal && (terminal.sessionId !== sessionId || terminal.turnId !== turnId))
|
|
183
|
+
throw new Error("Turn receipt belongs to a different request");
|
|
184
|
+
// A retried start of a turn that already ended: its end, without its events
|
|
185
|
+
// (`replay` or `history` serve its transcript).
|
|
186
|
+
if (terminal)
|
|
187
|
+
handle.push(terminal);
|
|
188
|
+
else
|
|
189
|
+
await this.catchUp(handle, accepted.deduplicated
|
|
190
|
+
? (accepted.startedSeq ?? accepted.headSeq + 1)
|
|
191
|
+
: accepted.headSeq + 1, accepted.headSeq);
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
handle.fail(error);
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
return this.handleOf(handle);
|
|
151
198
|
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
throw error;
|
|
199
|
+
finally {
|
|
200
|
+
release();
|
|
155
201
|
}
|
|
156
|
-
return this.handleOf(handle);
|
|
157
202
|
}
|
|
158
203
|
/**
|
|
159
204
|
* Quick-ack only: the turn's events reach `onEvent` through its
|
|
@@ -161,13 +206,23 @@ export class AgentServerClient {
|
|
|
161
206
|
* before.
|
|
162
207
|
*/
|
|
163
208
|
async startTurn(params) {
|
|
164
|
-
await this.initialize();
|
|
165
209
|
const sessionId = params.sessionId ?? generateUUIDv7();
|
|
166
210
|
const turnId = params.turnId ?? generateUUIDv7();
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
211
|
+
// As in `runTurn`: a cancel sent right behind this call goes out after the start.
|
|
212
|
+
const release = this.starts.begin(sessionId, turnId);
|
|
213
|
+
try {
|
|
214
|
+
await this.initialize();
|
|
215
|
+
// `request` sends (or fails for no connection) in this call.
|
|
216
|
+
const answer = this.connection.request(WIRE_METHODS.turnStart, { ...params, sessionId, turnId }, (ack) => {
|
|
217
|
+
if (params.subscribe !== false && !ack.terminal)
|
|
218
|
+
this.streams.joined(sessionId, ack.headSeq, { turnId });
|
|
219
|
+
});
|
|
220
|
+
release();
|
|
221
|
+
return await answer;
|
|
222
|
+
}
|
|
223
|
+
finally {
|
|
224
|
+
release();
|
|
225
|
+
}
|
|
171
226
|
}
|
|
172
227
|
/**
|
|
173
228
|
* Join the turn running in `sessionId`. Yields, each once and in seq
|
|
@@ -228,13 +283,17 @@ export class AgentServerClient {
|
|
|
228
283
|
* finished turn then returns `{outcome: "no_active_turn", activeTurnId}`
|
|
229
284
|
* instead of killing the turn that replaced it. `{outcome: "unconfirmed"}`
|
|
230
285
|
* means the harness did not acknowledge the interrupt — the agent may still
|
|
231
|
-
* be running; `turn.ended` remains the source of truth.
|
|
286
|
+
* be running; `turn.ended` remains the source of truth. A cancel for a
|
|
287
|
+
* turn this client is starting (`runTurn`, `startTurn`) goes out after
|
|
288
|
+
* that start's first send, so one sent right behind the start reaches the
|
|
289
|
+
* turn. After a reconnect a cancel can reach the server before a re-sent
|
|
290
|
+
* start, and is then answered `no_active_turn`.
|
|
232
291
|
*/
|
|
233
292
|
cancelTurn(sessionId, turnId) {
|
|
234
|
-
return this.connection.request(WIRE_METHODS.turnCancel, {
|
|
293
|
+
return this.starts.after(sessionId, turnId, () => this.connection.request(WIRE_METHODS.turnCancel, {
|
|
235
294
|
sessionId,
|
|
236
295
|
...(turnId !== undefined ? { turnId } : {}),
|
|
237
|
-
});
|
|
296
|
+
}));
|
|
238
297
|
}
|
|
239
298
|
/** Answer a `permission.requested` event. */
|
|
240
299
|
async respondPermission(sessionId, requestId, outcome) {
|
|
@@ -157,7 +157,8 @@ export class ScriptedAgent extends SessionAgent {
|
|
|
157
157
|
}
|
|
158
158
|
async *play(step, turn) {
|
|
159
159
|
const { options, signal } = turn;
|
|
160
|
-
|
|
160
|
+
// A hang takes its `stopTakes` whenever the cancel came: a product's test cancels without a sleep.
|
|
161
|
+
if (signal.aborted && !("hang" in step))
|
|
161
162
|
throw stopped();
|
|
162
163
|
if ("say" in step)
|
|
163
164
|
yield { type: "text", text: step.say };
|
|
@@ -59,7 +59,7 @@ export const ScriptStepSchema = z.union([
|
|
|
59
59
|
z.strictObject({ echo: z.enum(["input", "config"]) }),
|
|
60
60
|
/** A pause of this many ms. */
|
|
61
61
|
z.strictObject({ wait: Ms }),
|
|
62
|
-
/** Runs until the turn is cancelled, then `stopTakes` ms more before it stops. */
|
|
62
|
+
/** Runs until the turn is cancelled, then `stopTakes` ms more before it stops, also when the cancel came first. */
|
|
63
63
|
z.strictObject({ hang: z.literal(true), stopTakes: Ms.optional() }),
|
|
64
64
|
/**
|
|
65
65
|
* Ends the turn in an error with this message: of `category` when given,
|
|
@@ -96,6 +96,10 @@ function startShell(ticks, exited, failed) {
|
|
|
96
96
|
stdout: "ignore",
|
|
97
97
|
stderr: "ignore",
|
|
98
98
|
detached: true,
|
|
99
|
+
// @ref LLP 0007#the-environment-a-process-is-given — this process's environment now
|
|
100
|
+
// Without one, Bun gives the environment it was launched with: a
|
|
101
|
+
// secret the host deleted from `process.env` would live on here.
|
|
102
|
+
env: process.env,
|
|
99
103
|
onExit: exited,
|
|
100
104
|
});
|
|
101
105
|
child.unref();
|
|
@@ -110,7 +114,11 @@ function startShell(ticks, exited, failed) {
|
|
|
110
114
|
};
|
|
111
115
|
}
|
|
112
116
|
// Node writes a pipe at once when it can (libuv's `uv_try_write`).
|
|
113
|
-
const child = spawn("/bin/sh", args, {
|
|
117
|
+
const child = spawn("/bin/sh", args, {
|
|
118
|
+
detached: true,
|
|
119
|
+
env: process.env,
|
|
120
|
+
stdio: ["pipe", "ignore", "ignore"],
|
|
121
|
+
});
|
|
114
122
|
child.unref();
|
|
115
123
|
child.stdin?.unref?.();
|
|
116
124
|
child.stdin?.on("error", () => { });
|
|
@@ -10,6 +10,7 @@ const EXTRACT_TIMEOUT_MS = 5 * 60_000;
|
|
|
10
10
|
export async function extractTarGz(tgzPath, destDir) {
|
|
11
11
|
await new Promise((resolve, reject) => {
|
|
12
12
|
const proc = spawn("tar", ["-xzf", tgzPath, "-C", destDir], {
|
|
13
|
+
env: process.env,
|
|
13
14
|
stdio: ["ignore", "ignore", "pipe"],
|
|
14
15
|
timeout: EXTRACT_TIMEOUT_MS,
|
|
15
16
|
});
|
|
@@ -283,11 +283,14 @@ export class AgentRuntime {
|
|
|
283
283
|
* Cancel the session's in-flight turn. An idle session is a clean no-op ack
|
|
284
284
|
* (`{confirmed: true, hadTurn: false}`); `confirmed: false` means a turn
|
|
285
285
|
* existed but the harness did not acknowledge the interrupt — the agent may
|
|
286
|
-
* still be running; `turn.ended` remains the source of truth.
|
|
286
|
+
* still be running; `turn.ended` remains the source of truth. A turn
|
|
287
|
+
* admitted but not yet on its harness answers `hadTurn: false` too (the
|
|
288
|
+
* harness had nothing to interrupt), and still ends `cancelled`: the turn
|
|
289
|
+
* keeps the cancel, and its harness begins it stopped.
|
|
287
290
|
*/
|
|
288
291
|
async cancel(harness, sessionId) {
|
|
289
|
-
//
|
|
290
|
-
// the agent-level abort.
|
|
292
|
+
// The turn keeps the cancel (its signal), and any harness parked on an
|
|
293
|
+
// approval is unblocked, before (and regardless of) the agent-level abort.
|
|
291
294
|
for (const turn of this.turnsOf(sessionId))
|
|
292
295
|
void turn.requestCancel();
|
|
293
296
|
return await this.registry.getAgent(harness).cancel(sessionId);
|
|
@@ -53,7 +53,6 @@ export class Turn {
|
|
|
53
53
|
request;
|
|
54
54
|
inputKey;
|
|
55
55
|
sink;
|
|
56
|
-
signal;
|
|
57
56
|
host;
|
|
58
57
|
sessionId;
|
|
59
58
|
turnId;
|
|
@@ -70,8 +69,14 @@ export class Turn {
|
|
|
70
69
|
processor;
|
|
71
70
|
/** Its durable sink failed: the turn stops, and every later write fails with it. */
|
|
72
71
|
sinkFailure;
|
|
73
|
-
/**
|
|
74
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Aborted when `cancel` or `closeSession` asks the turn to stop: part of
|
|
74
|
+
* the signal its harness is given, so a cancel that comes before the
|
|
75
|
+
* harness has the turn is not lost.
|
|
76
|
+
*/
|
|
77
|
+
cancelled = new AbortController();
|
|
78
|
+
/** The caller's signal, the runtime's shutdown and the turn's own cancel, together. */
|
|
79
|
+
signal;
|
|
75
80
|
nativeSessionId;
|
|
76
81
|
/** When the turn requested a resume: whether the harness honored it. */
|
|
77
82
|
resumed;
|
|
@@ -85,9 +90,9 @@ export class Turn {
|
|
|
85
90
|
this.request = request;
|
|
86
91
|
this.inputKey = inputKey;
|
|
87
92
|
this.sink = sink;
|
|
88
|
-
this.signal = signal;
|
|
89
93
|
this.host = host;
|
|
90
94
|
const { sessionId, turnId, config } = request;
|
|
95
|
+
this.signal = AbortSignal.any([signal, this.cancelled.signal]);
|
|
91
96
|
this.sessionId = sessionId;
|
|
92
97
|
this.turnId = turnId;
|
|
93
98
|
this.harness = config.harness;
|
|
@@ -106,14 +111,19 @@ export class Turn {
|
|
|
106
111
|
});
|
|
107
112
|
this.running = Promise.resolve().then(() => this.execute());
|
|
108
113
|
}
|
|
114
|
+
// @ref LLP 0001#d9--the-wire-is-quick-ack-json-rpc-requests-flow-one-way — a cancel before the harness has the turn
|
|
109
115
|
/**
|
|
110
|
-
* A cancel was asked for:
|
|
111
|
-
*
|
|
112
|
-
*
|
|
116
|
+
* A cancel was asked for: the turn's signal is aborted, so a harness that
|
|
117
|
+
* has not begun the turn yet begins it stopped; its open requests are
|
|
118
|
+
* answered as cancelled; and what the harness throws from now on is it
|
|
119
|
+
* stopping. Resolves once their `*.resolved` are written.
|
|
113
120
|
*/
|
|
114
121
|
requestCancel() {
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
// Taken before the abort, which settles each request bound to the turn's
|
|
123
|
+
// signal and takes it out of the broker: the cancel would not wait for it.
|
|
124
|
+
const answered = this.requests.cancelAll();
|
|
125
|
+
this.cancelled.abort();
|
|
126
|
+
return answered;
|
|
117
127
|
}
|
|
118
128
|
async execute() {
|
|
119
129
|
const { sessionId, turnId, input, config } = this.request;
|
|
@@ -176,7 +186,7 @@ export class Turn {
|
|
|
176
186
|
throw this.sinkFailure;
|
|
177
187
|
// A harness asked to stop throws as it stops, whatever its words say;
|
|
178
188
|
// one that was not is failing.
|
|
179
|
-
threw = this.
|
|
189
|
+
threw = this.signal.aborted ? "cancelled" : errorInfo(error);
|
|
180
190
|
if (threw !== "cancelled") {
|
|
181
191
|
await this.emit({
|
|
182
192
|
type: "error",
|
|
@@ -46,8 +46,9 @@ const RUNS_ON = {
|
|
|
46
46
|
"claude-code": ClaudeCredentialSchema,
|
|
47
47
|
"codex-app-server": CodexCredentialSchema,
|
|
48
48
|
};
|
|
49
|
-
/** The credential as the kind `harness` runs on, or why that harness cannot run it. */
|
|
50
49
|
export function credentialRunsOn(harness, credential) {
|
|
50
|
+
if (!Object.hasOwn(RUNS_ON, harness))
|
|
51
|
+
return { ok: false, error: `${harness} runs on no credential a product holds.` };
|
|
51
52
|
const parsed = RUNS_ON[harness].safeParse(credential);
|
|
52
53
|
if (parsed.success)
|
|
53
54
|
return { ok: true, credential: parsed.data };
|
package/dist/protocol/errors.js
CHANGED
|
@@ -8,7 +8,9 @@ import { openVocabulary } from "./vocabulary.js";
|
|
|
8
8
|
* unknown non-`_` values are reserved for this protocol.
|
|
9
9
|
* `usage_limit` (plan/quota exhausted) and `rate_limit` (429/backoff) are
|
|
10
10
|
* deliberately distinct — they need different user guidance; collapsing them
|
|
11
|
-
* is a display choice, never a wire merge.
|
|
11
|
+
* is a display choice, never a wire merge. So are `resume_failed` (the
|
|
12
|
+
* conversation is gone: offer a fresh start) and `resume_busy` (another
|
|
13
|
+
* process holds it now: try again once that one has let it go).
|
|
12
14
|
*/
|
|
13
15
|
export const ERROR_CATEGORIES = [
|
|
14
16
|
"auth",
|
|
@@ -21,6 +23,7 @@ export const ERROR_CATEGORIES = [
|
|
|
21
23
|
"invalid_request",
|
|
22
24
|
"process_exit",
|
|
23
25
|
"resume_failed",
|
|
26
|
+
"resume_busy",
|
|
24
27
|
"mcp_unavailable",
|
|
25
28
|
"server_restart",
|
|
26
29
|
"internal",
|
|
@@ -42,6 +45,8 @@ export const ErrorInfoSchema = z.object({
|
|
|
42
45
|
* classifier; lives in /protocol because categories are vocabulary.
|
|
43
46
|
*/
|
|
44
47
|
const RULES = [
|
|
48
|
+
// Codex 0.160 and newer: another app-server holds the thread warm.
|
|
49
|
+
["resume_busy", ["already has an active writer"]],
|
|
45
50
|
["resume_failed", ["no conversation found with session id", "no rollout found for thread id"]],
|
|
46
51
|
["abort", ["aborted", "aborterror", "cancelled", "canceled", "interrupted", "sigint"]],
|
|
47
52
|
[
|
|
@@ -133,14 +138,18 @@ export function classifyError(error) {
|
|
|
133
138
|
}
|
|
134
139
|
return "internal";
|
|
135
140
|
}
|
|
136
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* A status code counts where it stands as a number of its own, never inside
|
|
143
|
+
* a longer number ("240129 tokens") or an identifier's alphanumeric run (a
|
|
144
|
+
* thread id's "-b401-" or "-a429-"): no letter or digit touches it.
|
|
145
|
+
*/
|
|
137
146
|
function mentions(message, needle) {
|
|
138
147
|
if (!/\d$/.test(needle))
|
|
139
148
|
return message.includes(needle);
|
|
140
149
|
for (let at = message.indexOf(needle); at >= 0; at = message.indexOf(needle, at + 1)) {
|
|
141
150
|
const before = message[at - 1] ?? "";
|
|
142
151
|
const after = message[at + needle.length] ?? "";
|
|
143
|
-
if (
|
|
152
|
+
if (!/[a-z0-9]/.test(before) && !/[a-z0-9]/.test(after))
|
|
144
153
|
return true;
|
|
145
154
|
}
|
|
146
155
|
return false;
|
package/dist/server/routes.js
CHANGED
|
@@ -135,8 +135,9 @@ export function executionRoutes(host) {
|
|
|
135
135
|
// running and `turn.ended` stays the source of truth. `hadTurn: false`
|
|
136
136
|
// while the server tracks an active turn is the pre-first-yield window
|
|
137
137
|
// (between the turn/start quick-ack and the harness registering its
|
|
138
|
-
// abortable turn)
|
|
139
|
-
//
|
|
138
|
+
// abortable turn): the turn keeps the cancel and its harness begins it
|
|
139
|
+
// stopped, but nothing has confirmed a stop yet, so it reports
|
|
140
|
+
// `unconfirmed`, never a clean cancel, and `turn.ended` says `cancelled`.
|
|
140
141
|
return {
|
|
141
142
|
outcome: confirmed && hadTurn ? "cancelled" : "unconfirmed",
|
|
142
143
|
turnId: active.turnId,
|
|
@@ -52,6 +52,7 @@ export declare class AgentServerClient {
|
|
|
52
52
|
private readonly options;
|
|
53
53
|
private readonly connection;
|
|
54
54
|
private readonly turns;
|
|
55
|
+
private readonly starts;
|
|
55
56
|
private readonly progress;
|
|
56
57
|
private readonly authUpdates;
|
|
57
58
|
private readonly streams;
|
|
@@ -122,7 +123,11 @@ export declare class AgentServerClient {
|
|
|
122
123
|
* finished turn then returns `{outcome: "no_active_turn", activeTurnId}`
|
|
123
124
|
* instead of killing the turn that replaced it. `{outcome: "unconfirmed"}`
|
|
124
125
|
* means the harness did not acknowledge the interrupt — the agent may still
|
|
125
|
-
* be running; `turn.ended` remains the source of truth.
|
|
126
|
+
* be running; `turn.ended` remains the source of truth. A cancel for a
|
|
127
|
+
* turn this client is starting (`runTurn`, `startTurn`) goes out after
|
|
128
|
+
* that start's first send, so one sent right behind the start reaches the
|
|
129
|
+
* turn. After a reconnect a cancel can reach the server before a re-sent
|
|
130
|
+
* start, and is then answered `no_active_turn`.
|
|
126
131
|
*/
|
|
127
132
|
cancelTurn(sessionId: string, turnId?: string): Promise<TurnCancelResult>;
|
|
128
133
|
/** Answer a `permission.requested` event. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAGhC,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EAGpB,KAAK,aAAa,EAIlB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,KAAK,wBAAwB,EAE7B,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,4BAA4B,EAC5B,KAAK,gBAAgB,EACrB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,KAAK,WAAW,EAAc,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAe,KAAK,eAAe,EAAW,MAAM,cAAc,CAAC;AACzF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E: `replaced` sessions usually respawn immediately with context
|
|
122
122
|
* preserved; drop only resources bound to the dead subprocess.
|
|
123
|
+
* A cancel during a start answers at once; this callback for that
|
|
124
|
+
* process (`released`, as for a close) can come after the cancel's
|
|
125
|
+
* answer, and comes before that turn's end: set up the next turn's
|
|
126
|
+
* per-session resources after the turn's end, not the cancel's answer.
|
|
123
127
|
*/
|
|
124
128
|
onSessionEnd?: (sessionId: string, reason: ClaudeSessionEndReason) => void;
|
|
125
129
|
/** Operational diagnostics (interrupt timeouts). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/claude-code/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,OAAO,IAAI,SAAS,EACpB,8BAA8B,EAC9B,gBAAgB,EAChB,gBAAgB,EAEhB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,KAAK,WAAW,EAAiB,MAAM,YAAY,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC;AAE3E;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC7C,IAAI,CACH,SAAS,EACP,YAAY,GACZ,eAAe,GACf,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,KAAK,GACL,KAA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AoB,GACpB,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,KAAK,GACL,QAAQ,GACR,cAAc,CAChB,GAAG;IACH;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,aAAa,CAAC,EAAE,aAAa,GAC3B,mBAAmB,CAsBrB;AAmBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAyBlE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAgBjG;AAED,iGAAiG;AACjG,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAe1F;AA2CD,wGAAwG;AACxG,wBAAgB,SAAS,CACxB,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,eAAe,CAAC,GACxD,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,IAAI,CAAC,mBAAmB,EAAE,YAAY,CAAC,EAC/C,aAAa,CAAC,EAAE,aAAa,EAC7B,SAAS,CAAC,EAAE,wBAAwB,EACpC,KAAK,CAAC,EAAE,WAAW,GACjB,SAAS,CA6EX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scripted-agent.d.ts","sourceRoot":"","sources":["../../../../../src/core/agents/scripted/scripted-agent.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEN,KAAK,UAAU,EACf,KAAK,eAAe,EAIpB,MAAM,4BAA4B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ber>;
|
|
82
82
|
}, z.core.$strict>, z.ZodObject<{
|
|
83
83
|
fail: z.ZodString;
|
|
84
|
-
category: z.ZodOptional<z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "mcp_unavailable" | "server_restart" | "internal", unknown>>>;
|
|
84
|
+
category: z.ZodOptional<z.ZodType<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "resume_busy" | "mcp_unavailable" | "server_restart" | "internal", unknown, z.core.$ZodTypeInternals<"abort" | (string & {}) | "auth" | "rate_limit" | "overloaded" | "usage_limit" | "context_limit" | "network" | "invalid_request" | "process_exit" | "resume_failed" | "resume_busy" | "mcp_unavailable" | "server_restart" | "internal", unknown>>>;
|
|
85
85
|
}, z.core.$strict>, z.ZodObject<{
|
|
86
86
|
end: z.ZodLiteral<true>;
|
|
87
87
|
stopReason: z.ZodOptional<z.ZodType<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown, z.core.$ZodTypeInternals<"error" | (string & {}) | "cancelled" | "end_turn" | "max_tokens" | "max_turn_requests" | "refusal", unknown>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/identity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,uFAAuF;IACvF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,qGAAqG;IACrG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,oHAAoH;IACpH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;CACnB;AAMD,0FAA0F;AAC1F,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/identity.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,uFAAuF;IACvF,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,qGAAqG;IACrG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,oHAAoH;IACpH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,2FAA2F;IAC3F,UAAU,EAAE,MAAM,CAAC;CACnB;AAMD,0FAA0F;AAC1F,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CAgBtC;AA4CD,+EAA+E;AAC/E,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,CAYnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifeline.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/lifeline.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lifeline.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/lifeline.ts"],"names":[],"mappings":"AAqKA;;;;GAIG;AACH,cAAM,QAAQ;IAOD,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,SAAS,CAAK;IACtB,mFAAmF;IACnF,OAAO,CAAC,MAAM,CAAS;gBAEM,OAAO,EAAE,MAAM;IAE5C,uEAAuE;IACvE,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;IAED,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI1B,qFAAqF;IACrF,OAAO,CAAC,MAAM;IAoCd,OAAO,CAAC,KAAK;CAQb;AAID,qGAAqG;AACrG,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAGlD;AAED,yDAAyD;AACzD,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-table.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/process-table.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,8EAA8E;AAC9E,eAAO,MAAM,KAAK,SAA+B,CAAC;AAKlD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAO5D;
|
|
1
|
+
{"version":3,"file":"process-table.d.ts","sourceRoot":"","sources":["../../../../src/core/processes/process-table.ts"],"names":[],"mappings":"AAGA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,8EAA8E;AAC9E,eAAO,MAAM,KAAK,SAA+B,CAAC;AAKlD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAO5D;AAuCD,yFAAyF;AACzF,wBAAgB,gBAAgB,IAAI,UAAU,EAAE,GAAG,SAAS,CAO3D;AASD;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CAoC/F;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAC3B,KAAK,EAAE,SAAS,UAAU,EAAE,EAC5B,OAAO,EAAE,SAAS,UAAU,EAAE,GAC5B,UAAU,EAAE,CASd;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAC5B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,MAAM,EAAE,MAAM,CAAC,OAAO,GACpB,UAAU,EAAE,CAWd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/core/provision/extract.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/core/provision/extract.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BlF"}
|
|
@@ -134,7 +134,10 @@ export declare class AgentRuntime {
|
|
|
134
134
|
* Cancel the session's in-flight turn. An idle session is a clean no-op ack
|
|
135
135
|
* (`{confirmed: true, hadTurn: false}`); `confirmed: false` means a turn
|
|
136
136
|
* existed but the harness did not acknowledge the interrupt — the agent may
|
|
137
|
-
* still be running; `turn.ended` remains the source of truth.
|
|
137
|
+
* still be running; `turn.ended` remains the source of truth. A turn
|
|
138
|
+
* admitted but not yet on its harness answers `hadTurn: false` too (the
|
|
139
|
+
* harness had nothing to interrupt), and still ends `cancelled`: the turn
|
|
140
|
+
* keeps the cancel, and its harness begins it stopped.
|
|
138
141
|
*/
|
|
139
142
|
cancel(harness: AgentHarness, sessionId: string): Promise<CancelResult>;
|
|
140
143
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-runtime.d.ts","sourceRoot":"","sources":["../../../../src/core/runtime/agent-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAG1F,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,iBAAiB,CAAC;AAMjE,OAAO,EACN,KAAK,UAAU,EAKf,MAAM,WAAW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