@botiverse/oar 0.15.2 → 0.16.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.
Files changed (80) hide show
  1. package/README.md +4 -3
  2. package/dist/observe/tool-activity.d.ts +9 -2
  3. package/dist/observe/tool-activity.d.ts.map +1 -1
  4. package/dist/observe/tool-activity.js +34 -9
  5. package/dist/observe/tool-activity.js.map +1 -1
  6. package/dist/observe/tool-groups.d.ts.map +1 -1
  7. package/dist/observe/tool-groups.js +1 -0
  8. package/dist/observe/tool-groups.js.map +1 -1
  9. package/dist/runtimes/cursor/index.d.ts +6 -3
  10. package/dist/runtimes/cursor/index.d.ts.map +1 -1
  11. package/dist/runtimes/cursor/index.js +6 -3
  12. package/dist/runtimes/cursor/index.js.map +1 -1
  13. package/dist/runtimes/cursor/installation.d.ts +7 -6
  14. package/dist/runtimes/cursor/installation.d.ts.map +1 -1
  15. package/dist/runtimes/cursor/installation.js +35 -13
  16. package/dist/runtimes/cursor/installation.js.map +1 -1
  17. package/dist/runtimes/cursor/list-models.d.ts +7 -8
  18. package/dist/runtimes/cursor/list-models.d.ts.map +1 -1
  19. package/dist/runtimes/cursor/list-models.js +50 -82
  20. package/dist/runtimes/cursor/list-models.js.map +1 -1
  21. package/dist/runtimes/cursor/model.d.ts +25 -0
  22. package/dist/runtimes/cursor/model.d.ts.map +1 -0
  23. package/dist/runtimes/cursor/model.js +98 -0
  24. package/dist/runtimes/cursor/model.js.map +1 -0
  25. package/dist/runtimes/cursor/projection.d.ts +40 -0
  26. package/dist/runtimes/cursor/projection.d.ts.map +1 -0
  27. package/dist/runtimes/cursor/projection.js +205 -0
  28. package/dist/runtimes/cursor/projection.js.map +1 -0
  29. package/dist/runtimes/cursor/run.d.ts +33 -0
  30. package/dist/runtimes/cursor/run.d.ts.map +1 -0
  31. package/dist/runtimes/cursor/run.js +68 -0
  32. package/dist/runtimes/cursor/run.js.map +1 -0
  33. package/dist/runtimes/cursor/sdk.d.ts +64 -0
  34. package/dist/runtimes/cursor/sdk.d.ts.map +1 -0
  35. package/dist/runtimes/cursor/sdk.js +50 -0
  36. package/dist/runtimes/cursor/sdk.js.map +1 -0
  37. package/dist/runtimes/cursor/session.d.ts +4 -37
  38. package/dist/runtimes/cursor/session.d.ts.map +1 -1
  39. package/dist/runtimes/cursor/session.js +265 -71
  40. package/dist/runtimes/cursor/session.js.map +1 -1
  41. package/dist/shared/acp/client-app.d.ts +0 -2
  42. package/dist/shared/acp/client-app.d.ts.map +1 -1
  43. package/dist/shared/acp/client-app.js +1 -8
  44. package/dist/shared/acp/client-app.js.map +1 -1
  45. package/dist/shared/acp/effort.d.ts +1 -1
  46. package/dist/shared/acp/effort.js +1 -1
  47. package/dist/shared/acp/model.d.ts +5 -8
  48. package/dist/shared/acp/model.d.ts.map +1 -1
  49. package/dist/shared/acp/model.js +6 -14
  50. package/dist/shared/acp/model.js.map +1 -1
  51. package/dist/shared/acp/process.d.ts +0 -2
  52. package/dist/shared/acp/process.d.ts.map +1 -1
  53. package/dist/shared/acp/process.js +2 -7
  54. package/dist/shared/acp/process.js.map +1 -1
  55. package/dist/shared/acp/profile.d.ts +2 -17
  56. package/dist/shared/acp/profile.d.ts.map +1 -1
  57. package/dist/shared/acp/profile.js +1 -5
  58. package/dist/shared/acp/profile.js.map +1 -1
  59. package/dist/shared/acp/records.d.ts +1 -3
  60. package/dist/shared/acp/records.d.ts.map +1 -1
  61. package/dist/shared/acp/records.js +6 -14
  62. package/dist/shared/acp/records.js.map +1 -1
  63. package/dist/shared/acp/session.d.ts.map +1 -1
  64. package/dist/shared/acp/session.js +1 -6
  65. package/dist/shared/acp/session.js.map +1 -1
  66. package/dist/shared/failure-class.js +1 -1
  67. package/dist/shared/failure-class.js.map +1 -1
  68. package/dist/shared/update.d.ts +1 -1
  69. package/dist/shared/update.d.ts.map +1 -1
  70. package/dist/shared/update.js +3 -4
  71. package/dist/shared/update.js.map +1 -1
  72. package/package.json +6 -5
  73. package/dist/runtimes/cursor/update.d.ts +0 -19
  74. package/dist/runtimes/cursor/update.d.ts.map +0 -1
  75. package/dist/runtimes/cursor/update.js +0 -88
  76. package/dist/runtimes/cursor/update.js.map +0 -1
  77. package/dist/shared/acp/vendor-updates.d.ts +0 -7
  78. package/dist/shared/acp/vendor-updates.d.ts.map +0 -1
  79. package/dist/shared/acp/vendor-updates.js +0 -46
  80. package/dist/shared/acp/vendor-updates.js.map +0 -1
@@ -1,38 +1,5 @@
1
- import { type AcpSessionProfile } from "../../shared/acp/session.js";
2
- import { type JsonRecord } from "../../shared/json.js";
3
- export declare function selectCursorAuthMethod(initialized: JsonRecord): string | undefined;
4
- /**
5
- * Without `parameterizedModelPicker` cursor-agent 2026.09.28 answers in its
6
- * "variants" picker mode: every model and effort pair is one flat `model`
7
- * value and no `thought_level` option exists. With it, `model` lists plain
8
- * model names and each model parameter is its own select option, the
9
- * reasoning one under category `thought_level`. Without `subagents` a child
10
- * is visible only as the parent's `task` tool call.
11
- */
12
- export declare function cursorClientCapabilitiesMeta(): JsonRecord;
13
- /**
14
- * With the `subagents` opt-in cursor-agent 2026.09.28 announces each child on
15
- * the parent's own `session/update` (`subagent_spawned`, then
16
- * `subagent_state_update` with completed, failed, cancelled or disconnected),
17
- * and the child's standard updates arrive under its own session id.
18
- */
19
- export declare const CURSOR_VENDOR_SESSION_UPDATES: readonly string[];
20
- /**
21
- * `--force` (alias `--yolo`) is a root option, so it precedes the hidden
22
- * `acp` subcommand. It runs commands without asking; a team whose admin
23
- * controls auto run can still switch it off, and then the agent asks
24
- * through `session/request_permission`.
25
- */
26
- export declare const cursorAcpArgs: readonly string[];
27
- /**
28
- * Requests cursor-agent 2026.09.28 sends its client beyond standard ACP. oar
29
- * implements none: each is recorded and refused with `-32601`, as an
30
- * unregistered method would be. On that refusal `cursor/ask_question` asks
31
- * one `session/request_permission` per single select question (oar picks its
32
- * first option), `cursor/create_plan` writes the plan to a local file, and
33
- * the rest were notices the agent does not wait on.
34
- */
35
- export declare const CURSOR_EXTENSION_REQUESTS: readonly string[];
36
- export declare const cursorAcpProfile: AcpSessionProfile;
37
- export declare const cursorSession: import("../../contracts/session.js").StartSession;
1
+ import type { StartSession } from "../../contracts/session.js";
2
+ import { type CursorSdk } from "./sdk.js";
3
+ export declare function cursorSessionWith(load: () => Promise<CursorSdk>): StartSession;
4
+ export declare const cursorSession: StartSession;
38
5
  //# sourceMappingURL=session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEjE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,IAAI,UAAU,CAEzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAAkD,CAAC;AAQ9G;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,MAAM,EAAuB,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAMtD,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,iBAgB9B,CAAC;AAEF,eAAO,MAAM,aAAa,mDAA+B,CAAC"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/cursor/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMV,YAAY,EACb,MAAM,4BAA4B,CAAC;AAepC,OAAO,EAA2D,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAuBnG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,GAAG,YAAY,CAuP9E;AAED,eAAO,MAAM,aAAa,EAAE,YAA+C,CAAC"}
@@ -1,74 +1,268 @@
1
- import { acpSession } from "../../shared/acp/session.js";
2
- import { asRecord } from "../../shared/json.js";
3
- export function selectCursorAuthMethod(initialized) {
4
- const methods = Array.isArray(initialized.authMethods) ? initialized.authMethods : [];
5
- return methods
6
- .map((method) => asRecord(method))
7
- .some((method) => method?.id === "cursor_login")
8
- ? "cursor_login"
9
- : undefined;
10
- }
11
- /**
12
- * Without `parameterizedModelPicker` cursor-agent 2026.09.28 answers in its
13
- * "variants" picker mode: every model and effort pair is one flat `model`
14
- * value and no `thought_level` option exists. With it, `model` lists plain
15
- * model names and each model parameter is its own select option, the
16
- * reasoning one under category `thought_level`. Without `subagents` a child
17
- * is visible only as the parent's `task` tool call.
18
- */
19
- export function cursorClientCapabilitiesMeta() {
20
- return { parameterizedModelPicker: true, subagents: true };
21
- }
22
- /**
23
- * With the `subagents` opt-in cursor-agent 2026.09.28 announces each child on
24
- * the parent's own `session/update` (`subagent_spawned`, then
25
- * `subagent_state_update` with completed, failed, cancelled or disconnected),
26
- * and the child's standard updates arrive under its own session id.
1
+ import { withInputImages } from "../../shared/input-images.js";
2
+ import { sealSession } from "../../shared/seal-session.js";
3
+ import { createSessionKernel } from "../../shared/session-kernel.js";
4
+ import { cursorModelSelection, validateCursorOptions } from "./model.js";
5
+ import { cursorOpenedFrame, cursorRunFailedFrame, cursorRunResultFrame, foldCursorDelta, initialCursorProjection, } from "./projection.js";
6
+ import { giveUp, newLaunch, steerRun, stopOrphan } from "./run.js";
7
+ import { loadCursorSdk } from "./sdk.js";
8
+ /*
9
+ * Cursor through `@cursor/sdk` (1.0.35), in process (settled 2026-10-03,
10
+ * replacing cursor-agent ACP): a session is one local SDK agent, its id the
11
+ * SDK's `agent-<uuid>`; a turn is one `send`, from the run it returns until
12
+ * `run.wait()` answers; steer is `run.steer`; abort is `run.cancel`; the
13
+ * agent takes one run at a time (a second `send` is refused "already has
14
+ * active run"), so queued input is held here and sent when the run ends.
15
+ * The agent's store keeps its last run as active until that run's own
16
+ * agent object ends it, so after a process that died mid-run, or a session
17
+ * closed before its first prompt, a resumed agent refuses every send the
18
+ * same way (probed 2026-10-03); the first send after a resume is `force`d,
19
+ * which takes the agent over. Arbitrating between processes is the host's.
27
20
  */
28
- export const CURSOR_VENDOR_SESSION_UPDATES = ["subagent_spawned", "subagent_state_update"];
29
- function validateCursorOptions(options) {
30
- if (options.systemPrompt !== undefined || options.appendSystemPrompt !== undefined) {
31
- throw new Error("Cursor ACP does not expose a system prompt override");
32
- }
21
+ const message = (error) => (error instanceof Error ? error.message : String(error));
22
+ /** How long dispose waits for a cancelled run to report its own end before releasing the agent. */
23
+ const DISPOSE_SETTLE_MS = 5000;
24
+ /** How long a `send` may take to return its run (a cold start took about 4 s in the probes). */
25
+ const SEND_TIMEOUT_MS = 60_000;
26
+ export function cursorSessionWith(load) {
27
+ return async (installation, options) => {
28
+ if (installation.via !== "bundled") {
29
+ throw new Error("The cursor session adapter needs the bundled @cursor/sdk installation");
30
+ }
31
+ validateCursorOptions(options);
32
+ const sdk = await load();
33
+ // No sandbox, as every OAR session runs by default (contracts/session.ts):
34
+ // without this a `~/.cursor/sandbox.json` would turn one on.
35
+ const agentOptions = {
36
+ model: await cursorModelSelection(sdk, options),
37
+ local: { cwd: options.cwd, sandboxOptions: { enabled: false } },
38
+ };
39
+ const agent = options.resume === undefined
40
+ ? await sdk.Agent.create(agentOptions)
41
+ : await sdk.Agent.resume(options.resume, agentOptions);
42
+ const kernel = createSessionKernel(agent.agentId);
43
+ let projection = initialCursorProjection;
44
+ // A turn is running from an accepted prompt (or a drained queue input)
45
+ // until its run's end is recorded. Held in an object so closures always
46
+ // read the live value.
47
+ const gate = { running: false };
48
+ // The send on its way to a run, and the run in flight.
49
+ let launching = null;
50
+ let active = null;
51
+ let forceNext = options.resume !== undefined;
52
+ let disposeRequest = null;
53
+ // Adapter-held queue, drained one input per run end.
54
+ const held = [];
55
+ const record = (frame) => {
56
+ kernel.frame({ type: frame.type, native: frame.native, events: frame.events }, frame.agentPath.length === 0 ? undefined : { agentPath: frame.agentPath });
57
+ };
58
+ const onDelta = ({ update }) => {
59
+ const folded = foldCursorDelta(projection, update);
60
+ projection = folded.state;
61
+ record(folded.frame);
62
+ };
63
+ record(cursorOpenedFrame(agent.agentId, agent.model));
64
+ const finish = (current, frame) => {
65
+ record(frame);
66
+ if (active === current) {
67
+ active = null;
68
+ }
69
+ gate.running = false;
70
+ drainHeld();
71
+ };
72
+ const adopt = (run) => {
73
+ const { promise: ended, resolve: onEnded } = Promise.withResolvers();
74
+ const current = { run, ended };
75
+ active = current;
76
+ void (async () => {
77
+ try {
78
+ finish(current, cursorRunResultFrame(await run.wait()));
79
+ }
80
+ catch (error) {
81
+ finish(current, cursorRunFailedFrame(message(error)));
82
+ }
83
+ finally {
84
+ onEnded();
85
+ }
86
+ })();
87
+ return current;
88
+ };
89
+ const launch = (input, images) => {
90
+ const attempt = newLaunch();
91
+ const content = images.length === 0
92
+ ? input
93
+ : { text: input, images: images.map((image) => ({ data: image.data, mimeType: image.mediaType })) };
94
+ const force = forceNext;
95
+ void (async () => {
96
+ try {
97
+ const run = await agent.send(content, { onDelta, ...(force ? { local: { force: true } } : {}) });
98
+ forceNext = false;
99
+ if (attempt.state === "given_up") {
100
+ stopOrphan(run, record);
101
+ return;
102
+ }
103
+ attempt.state = "sent";
104
+ attempt.current = adopt(run);
105
+ }
106
+ catch (error) {
107
+ if (attempt.state === "sending") {
108
+ attempt.state = "failed";
109
+ attempt.reason = message(error);
110
+ }
111
+ }
112
+ finally {
113
+ attempt.decide();
114
+ }
115
+ })();
116
+ return attempt;
117
+ };
118
+ const start = async (input, images) => {
119
+ gate.running = true;
120
+ const attempt = launch(input, images);
121
+ launching = attempt;
122
+ const deadline = setTimeout(() => {
123
+ giveUp(attempt, `cursor did not start the run within ${String(SEND_TIMEOUT_MS / 1000)} s`);
124
+ }, SEND_TIMEOUT_MS);
125
+ deadline.unref();
126
+ await attempt.decided;
127
+ clearTimeout(deadline);
128
+ if (launching === attempt) {
129
+ launching = null;
130
+ }
131
+ const { current } = attempt;
132
+ if (current === null) {
133
+ gate.running = false;
134
+ return { kind: "rejected", code: "runtime_refused", reason: attempt.reason };
135
+ }
136
+ if (attempt.abortRequested) {
137
+ // The abort was accepted before the run existed; its outcome is the
138
+ // run's own end, so a failed cancel leaves the run to finish.
139
+ try {
140
+ await current.run.cancel();
141
+ }
142
+ catch {
143
+ // The run may have ended on its own meanwhile.
144
+ }
145
+ }
146
+ return { kind: "accepted", native: { runId: current.run.id } };
147
+ };
148
+ function drainHeld() {
149
+ if (disposeRequest !== null || gate.running) {
150
+ return;
151
+ }
152
+ const next = held.shift();
153
+ if (next === undefined) {
154
+ return;
155
+ }
156
+ void (async () => {
157
+ const decided = await start(next.input, next.images);
158
+ if (decided.kind === "rejected") {
159
+ // The queue took the input over; the SDK refusing it is not silent.
160
+ kernel.frame({ type: "cursor/send_rejected", native: { message: decided.reason, input: next.input }, events: [] });
161
+ drainHeld();
162
+ }
163
+ })();
164
+ }
165
+ /** The run in flight, waiting out a `send` that has not returned it yet. */
166
+ const inFlight = async () => {
167
+ const pending = launching;
168
+ if (active !== null || pending === null) {
169
+ return active;
170
+ }
171
+ await pending.decided;
172
+ return pending.current;
173
+ };
174
+ const capabilities = { steer: true, queue: { durable: false }, attribution: "attributed", images: true };
175
+ const session = sealSession({
176
+ id: kernel.sessionId,
177
+ capabilities,
178
+ prompt: async (input, inputOptions) => {
179
+ const result = await kernel.control({ kind: "prompt", input, ...inputOptions }, async () => {
180
+ if (gate.running) {
181
+ return { kind: "rejected", code: "busy", reason: "busy" };
182
+ }
183
+ const decided = await withInputImages(capabilities, inputOptions?.images, async (images) => {
184
+ const started = await start(input, images);
185
+ return started;
186
+ });
187
+ return decided;
188
+ });
189
+ return result;
190
+ },
191
+ steer: async (input, inputOptions) => {
192
+ const result = await kernel.control({ kind: "steer", input, ...inputOptions }, async () => {
193
+ const current = gate.running ? await inFlight() : null;
194
+ if (current === null) {
195
+ return { kind: "rejected", code: "no_active_turn", reason: "not_steerable: no active turn" };
196
+ }
197
+ if ((inputOptions?.images ?? []).length > 0) {
198
+ return { kind: "rejected", code: "unsupported", reason: "not_steerable: cursor steers with text only" };
199
+ }
200
+ const decided = await steerRun(current, input);
201
+ return decided;
202
+ });
203
+ return result;
204
+ },
205
+ queue: async (input, inputOptions) => {
206
+ const result = await kernel.control({ kind: "queue", input, ...inputOptions }, () => withInputImages(capabilities, inputOptions?.images, (images) => {
207
+ held.push({ input, images });
208
+ drainHeld();
209
+ return { kind: "accepted" };
210
+ }));
211
+ return result;
212
+ },
213
+ abort: async () => {
214
+ const result = await kernel.control({ kind: "abort" }, async () => {
215
+ if (!gate.running) {
216
+ return { kind: "rejected", code: "no_active_turn", reason: "no active turn" };
217
+ }
218
+ if (active === null) {
219
+ // The run does not exist yet: cancelled as soon as `send` returns it.
220
+ if (launching !== null) {
221
+ launching.abortRequested = true;
222
+ }
223
+ return { kind: "accepted" };
224
+ }
225
+ // Accepted means taken over; the outcome is the run's own `cancelled`.
226
+ await active.run.cancel();
227
+ return { kind: "accepted" };
228
+ });
229
+ return result;
230
+ },
231
+ rawEvents: (observer, cursor) => kernel.rawEvents(observer, cursor),
232
+ records: () => kernel.records(),
233
+ graph: () => kernel.graph(),
234
+ dispose: async () => {
235
+ if (disposeRequest !== null) {
236
+ return;
237
+ }
238
+ held.splice(0);
239
+ const request = kernel.request("toRuntime", { kind: "dispose" });
240
+ disposeRequest = request;
241
+ if (launching !== null) {
242
+ // A send still on its way: its run, if it comes, is stopped, not adopted.
243
+ giveUp(launching, "the session was disposed before cursor started the run");
244
+ }
245
+ const current = active;
246
+ if (current !== null) {
247
+ // The run's own `cancelled` ends the turn in the stream.
248
+ try {
249
+ await current.run.cancel();
250
+ }
251
+ catch {
252
+ // The run may have ended on its own meanwhile.
253
+ }
254
+ await Promise.race([current.ended, new Promise((resolve) => {
255
+ setTimeout(resolve, DISPOSE_SETTLE_MS).unref();
256
+ })]);
257
+ }
258
+ agent.close();
259
+ // The agent runs in this process: there is no process exit to
260
+ // observe, so the dispose is answered as taken over.
261
+ kernel.respond(request.id, { kind: "accepted" });
262
+ },
263
+ });
264
+ return session;
265
+ };
33
266
  }
34
- /**
35
- * `--force` (alias `--yolo`) is a root option, so it precedes the hidden
36
- * `acp` subcommand. It runs commands without asking; a team whose admin
37
- * controls auto run can still switch it off, and then the agent asks
38
- * through `session/request_permission`.
39
- */
40
- export const cursorAcpArgs = ["--force", "acp"];
41
- /**
42
- * Requests cursor-agent 2026.09.28 sends its client beyond standard ACP. oar
43
- * implements none: each is recorded and refused with `-32601`, as an
44
- * unregistered method would be. On that refusal `cursor/ask_question` asks
45
- * one `session/request_permission` per single select question (oar picks its
46
- * first option), `cursor/create_plan` writes the plan to a local file, and
47
- * the rest were notices the agent does not wait on.
48
- */
49
- export const CURSOR_EXTENSION_REQUESTS = [
50
- "cursor/ask_question",
51
- "cursor/create_plan",
52
- "cursor/update_todos",
53
- "cursor/task",
54
- "cursor/generate_image",
55
- ];
56
- export const cursorAcpProfile = {
57
- args: cursorAcpArgs,
58
- // Cursor's ACP method set has no steer. Subagents, once opted into, speak
59
- // under their own session ids (attribution tier #3,
60
- // docs/spec/attribution.md): recorded under those ids and linked to the
61
- // parent.
62
- capabilities: { steer: false, queue: { durable: false }, attribution: "nested" },
63
- requestTimeoutMs: 30_000,
64
- selectAuthMethod: selectCursorAuthMethod,
65
- validateOptions: validateCursorOptions,
66
- clientCapabilitiesMeta: cursorClientCapabilitiesMeta,
67
- // `session/set_model` answers `{}` and cursor never pushes
68
- // `config_option_update`, so only `set_config_option` reports the switch.
69
- modelViaConfigOption: true,
70
- extensionRequests: CURSOR_EXTENSION_REQUESTS,
71
- vendorSessionUpdates: CURSOR_VENDOR_SESSION_UPDATES,
72
- };
73
- export const cursorSession = acpSession(cursorAcpProfile);
267
+ export const cursorSession = cursorSessionWith(loadCursorSdk);
74
268
  //# sourceMappingURL=session.js.map
@@ -1 +1 @@
1
- {"version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AAO;gBACT,CAAC;gBACD,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACf,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;gBACjE,cAAc,GAAG,OAAO,CAAC;gBACzB,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;oBACvB,0EAA0E;oBAC1E,MAAM,CAAC,SAAS,EAAE,wDAAwD,CAAC,CAAC;gBAC9E,CAAC;gBACD,MAAM,OAAO,GAAG,MAAM,CAAC;gBACvB,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;oBACrB,yDAAyD;oBACzD,IAAI,CAAC;wBACH,MAAM,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;oBAC7B,CAAC;oBAAC,MAAM,CAAC;wBACP,+CAA+C;oBACjD,CAAC;oBACD,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;4BAC/D,UAAU,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC,KAAK,EAAE,CAAC;wBACjD,CAAC,CAAC,CAAC,CAAC,CAAC;gBACP,CAAC;gBACD,KAAK,CAAC,KAAK,EAAE,CAAC;gBACd,8DAA8D;gBAC9D,qDAAqD;gBACrD,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;YACnD,CAAC;SACF,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAiB,iBAAiB,CAAC,aAAa,CAAC,CAAC"}
@@ -15,8 +15,6 @@ export interface AcpClientHooks {
15
15
  readonly answered: (id: string, reply: unknown) => void;
16
16
  readonly extension: (method: string, params: JsonRecord) => void;
17
17
  readonly extensionNotifications: readonly string[];
18
- /** Vendor request methods to record before refusing them as unknown. */
19
- readonly extensionRequests: readonly string[];
20
18
  }
21
19
  /** OAR's YOLO answer to a permission request: the broadest allow on offer, else cancel. */
22
20
  export declare function allowPermission(request: RequestPermissionRequest): RequestPermissionResponse;
@@ -1 +1 @@
1
- {"version":3,"file":"client-app.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/client-app.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EAKd,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAGzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC7D,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;IACnD,wEAAwE;IACxE,QAAQ,CAAC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,yBAAyB,CAM5F;AAcD,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,cAAc,GACpB,SAAS,CAyCX"}
1
+ {"version":3,"file":"client-app.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/client-app.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAKd,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAGzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC7D,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1E,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,sBAAsB,EAAE,SAAS,MAAM,EAAE,CAAC;CACpD;AAED,2FAA2F;AAC3F,wBAAgB,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,yBAAyB,CAM5F;AAcD,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,eAAe,EACzB,KAAK,EAAE,cAAc,GACpB,SAAS,CAkCX"}
@@ -1,5 +1,5 @@
1
1
  /* oxlint-disable typescript/promise-function-async -- SDK handlers deliberately return terminal promises directly. */
2
- import { client as createClient, methods, RequestError, } from "@agentclientprotocol/sdk";
2
+ import { client as createClient, methods, } from "@agentclientprotocol/sdk";
3
3
  import { asRecord } from "../json.js";
4
4
  /** OAR's YOLO answer to a permission request: the broadest allow on offer, else cancel. */
5
5
  export function allowPermission(request) {
@@ -50,13 +50,6 @@ export function createAcpClientApp(terminal, hooks) {
50
50
  hooks.extension(method, params);
51
51
  });
52
52
  }
53
- // The same -32601 the SDK sends for an unregistered method, so the agent
54
- // takes its own fallback, but the request and the refusal are on record.
55
- for (const method of hooks.extensionRequests) {
56
- app = app.onRequest(method, passthrough, observed(method, () => {
57
- throw RequestError.methodNotFound(method);
58
- }));
59
- }
60
53
  return app;
61
54
  }
62
55
  //# sourceMappingURL=client-app.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-app.js","sourceRoot":"","sources":["../../../src/shared/acp/client-app.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,OAAO,EACL,MAAM,IAAI,YAAY,EACtB,OAAO,EACP,YAAY,GAWb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC;AAqBvD,2FAA2F;AAC3F,MAAM,UAAU,eAAe,CAAC,OAAiC;IAC/D,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC;WAC5E,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;IACpE,OAAO,QAAQ,KAAK,SAAS;QAC3B,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE;QACvC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;AACxE,CAAC;AAED,IAAI,uBAAuB,GAAG,CAAC,CAAC;AAEhC,SAAS,WAAW,CAAC,OAA0C;IAC7D,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QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,MAA8B,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;SACnJ,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QAC5D,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACL,KAAK,MAAM,MAAM,IAAI,KAAK,CAAC,sBAAsB,EAAE,CAAC;QAClD,GAAG,GAAG,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;YAC3D,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -25,7 +25,7 @@ export declare function applyAcpEffort(process: AcpProcess, opened: {
25
25
  /**
26
26
  * Apply `SessionOptions.model`: `session/set_model {modelId}`, or with
27
27
  * `viaConfigOption` `session/set_config_option` on the `model` option (for
28
- * agents whose set_model answer reports nothing, cursor-agent 2026.09.28).
28
+ * agents whose set_model answer reports nothing, agy_acp_server 1.2.1).
29
29
  * The answer is observed like any handshake answer and returned.
30
30
  */
31
31
  export declare function applyAcpModel(process: AcpProcess, sessionId: string, model: string, context: {
@@ -47,7 +47,7 @@ export async function applyAcpEffort(process, opened, effort, context) {
47
47
  /**
48
48
  * Apply `SessionOptions.model`: `session/set_model {modelId}`, or with
49
49
  * `viaConfigOption` `session/set_config_option` on the `model` option (for
50
- * agents whose set_model answer reports nothing, cursor-agent 2026.09.28).
50
+ * agents whose set_model answer reports nothing, agy_acp_server 1.2.1).
51
51
  * The answer is observed like any handshake answer and returned.
52
52
  */
53
53
  export async function applyAcpModel(process, sessionId, model, context) {
@@ -22,16 +22,13 @@ export declare function acpReportedModel(frame: JsonRecord | null): string | nul
22
22
  /**
23
23
  * The agent's reasoning-effort selector: the config option in ACP's reserved
24
24
  * `thought_level` category (ACP schema `SessionConfigOptionCategory`:
25
- * "thought/reasoning level"), read off a frame's `configOptions`. Both ACP
26
- * runtimes put effort there, under their own ids ([env] 2026-09-29): grok
25
+ * "thought/reasoning level"), read off a frame's `configOptions`. grok and
26
+ * kimi put effort there, under their own ids ([env] 2026-09-29): grok
27
27
  * 1.0.41 `reasoning_effort` (xhigh/high/medium/low per model), kimi 2.0.0
28
- * `thinking` (low/high/max on k3). The category, not the id, is what this
29
- * shared layer relies on; it carries no runtime identity. Null when the frame
28
+ * `thinking` (low/high/max on k3); agy_acp_server 1.2.1 has none, its effort
29
+ * being part of the model id. The category, not the id, is what this shared
30
+ * layer relies on; it carries no runtime identity. Null when the frame
30
31
  * advertises none.
31
- *
32
- * cursor-agent 2026.09.28 lists two for most Claude models: `thinking`
33
- * (false/true) and `effort` (low…max). The level menu wins over the on/off
34
- * switch; a model whose only option is the switch (claude-haiku-4-5) keeps it.
35
32
  */
36
33
  export declare function acpThoughtLevelOption(frame: JsonRecord | null): JsonRecord | null;
37
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAexE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAMjF;AAOD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGzE"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAexE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAKjF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAGzE"}
@@ -37,27 +37,19 @@ export function acpReportedModel(frame) {
37
37
  /**
38
38
  * The agent's reasoning-effort selector: the config option in ACP's reserved
39
39
  * `thought_level` category (ACP schema `SessionConfigOptionCategory`:
40
- * "thought/reasoning level"), read off a frame's `configOptions`. Both ACP
41
- * runtimes put effort there, under their own ids ([env] 2026-09-29): grok
40
+ * "thought/reasoning level"), read off a frame's `configOptions`. grok and
41
+ * kimi put effort there, under their own ids ([env] 2026-09-29): grok
42
42
  * 1.0.41 `reasoning_effort` (xhigh/high/medium/low per model), kimi 2.0.0
43
- * `thinking` (low/high/max on k3). The category, not the id, is what this
44
- * shared layer relies on; it carries no runtime identity. Null when the frame
43
+ * `thinking` (low/high/max on k3); agy_acp_server 1.2.1 has none, its effort
44
+ * being part of the model id. The category, not the id, is what this shared
45
+ * layer relies on; it carries no runtime identity. Null when the frame
45
46
  * advertises none.
46
- *
47
- * cursor-agent 2026.09.28 lists two for most Claude models: `thinking`
48
- * (false/true) and `effort` (low…max). The level menu wins over the on/off
49
- * switch; a model whose only option is the switch (claude-haiku-4-5) keeps it.
50
47
  */
51
48
  export function acpThoughtLevelOption(frame) {
52
49
  if (frame === null) {
53
50
  return null;
54
51
  }
55
- const candidates = asRecordList(frame.configOptions).filter((entry) => entry.category === "thought_level");
56
- return candidates.find((entry) => !isOnOffSwitch(entry)) ?? candidates[0] ?? null;
57
- }
58
- function isOnOffSwitch(option) {
59
- const values = asRecordList(option.options).map((entry) => entry.value);
60
- return values.length === 2 && values.includes("false") && values.includes("true");
52
+ return asRecordList(frame.configOptions).find((entry) => entry.category === "thought_level") ?? null;
61
53
  }
62
54
  /**
63
55
  * The reasoning effort an ACP agent reports as in effect: the `thought_level`
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/shared/acp/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAmB,MAAM,YAAY,CAAC;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAwB;IACvD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC;IACvF,IAAI,OAAO,MAAM,EAAE,YAAY,KAAK,QAAQ,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,MAAM,cAAc,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IAC9D,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,cAAc,CAAC;IACxB,CAAC;IACD,iGAAiG;IACjG,MAAM,SAAS,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAC/C,OAAO,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D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,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5E,CAAC"}
@@ -4,8 +4,6 @@ export type { ClientApp, SessionNotification } from "@agentclientprotocol/sdk";
4
4
  export interface AcpProcessOptions {
5
5
  readonly cwd?: string;
6
6
  readonly env?: NodeJS.ProcessEnv;
7
- /** Vendor `session/update` kinds to carry past the SDK's parse (see vendor-updates.ts). */
8
- readonly vendorSessionUpdates?: readonly string[];
9
7
  }
10
8
  /** A child process connected directly to an official SDK client app. */
11
9
  export interface AcpProcess {
@@ -1 +1 @@
1
- {"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../../src/shared/acp/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC9E,YAAY,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAqB/E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACjC,2FAA2F;IAC3F,QAAQ,CAAC,oBAAoB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnD;AAED,wEAAwE;AACxE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,IAAI,IAAI,CAAC;CACd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AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAC5C,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,QAAQ,CAAC,GACxD,OAAO,CAAC,QAAQ,CAAC,CA4BnB;AAED,8EAA8E;AAC9E,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,SAAS,EACd,OAAO,GAAE,iBAAsB,GAC9B,UAAU,CAiCZ"}
@@ -2,7 +2,6 @@ import { ndJsonStream, } from "@agentclientprotocol/sdk";
2
2
  import { Readable, Writable } from "node:stream";
3
3
  import { spawnLineProcess } from "../executable/index.js";
4
4
  import { AcpError, acpProcessExitedError, acpRequestTimeoutError } from "./errors.js";
5
- import { vendorSessionUpdateCarrier } from "./vendor-updates.js";
6
5
  export { client as createAcpClient, methods } from "@agentclientprotocol/sdk";
7
6
  function deadline(method, timeoutMs, controller) {
8
7
  const { promise, reject } = Promise.withResolvers();
@@ -53,18 +52,14 @@ export async function withAcpDeadline(process, method, timeoutMs, send) {
53
52
  }
54
53
  /** Spawn a stdio ACP agent and let the official SDK own the wire protocol. */
55
54
  export function startAcpProcess(command, args, app, options = {}) {
56
- const { vendorSessionUpdates = [], ...spawnOptions } = options;
57
- const child = spawnLineProcess(command, args, spawnOptions);
55
+ const child = spawnLineProcess(command, args, options);
58
56
  // Node and TypeScript model the same WHATWG byte streams with incompatible
59
57
  // generic constraints.
60
58
  // oxlint-disable-next-line typescript/consistent-type-assertions, typescript/no-unsafe-type-assertion -- Native WHATWG stream expected by the SDK.
61
59
  const output = Writable.toWeb(child.stdin);
62
60
  // oxlint-disable-next-line typescript/consistent-type-assertions, typescript/no-unsafe-type-assertion -- Native WHATWG stream expected by the SDK.
63
61
  const input = Readable.toWeb(child.stdout);
64
- const stream = ndJsonStream(output, input);
65
- const connection = app.connect(vendorSessionUpdates.length === 0
66
- ? stream
67
- : { readable: stream.readable.pipeThrough(vendorSessionUpdateCarrier(vendorSessionUpdates)), writable: stream.writable });
62
+ const connection = app.connect(ndJsonStream(output, input));
68
63
  let ended = false;
69
64
  let exitCode = null;
70
65
  child.onExit((code) => {