@botiverse/oar 0.15.2 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +9 -3
  2. package/dist/agents/crew.d.ts.map +1 -1
  3. package/dist/agents/crew.js +7 -1
  4. package/dist/agents/crew.js.map +1 -1
  5. package/dist/contracts/runtime.d.ts +14 -0
  6. package/dist/contracts/runtime.d.ts.map +1 -1
  7. package/dist/contracts/runtime.js.map +1 -1
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/observe/tool-activity.d.ts +9 -2
  11. package/dist/observe/tool-activity.d.ts.map +1 -1
  12. package/dist/observe/tool-activity.js +34 -9
  13. package/dist/observe/tool-activity.js.map +1 -1
  14. package/dist/observe/tool-groups.d.ts.map +1 -1
  15. package/dist/observe/tool-groups.js +1 -0
  16. package/dist/observe/tool-groups.js.map +1 -1
  17. package/dist/runtimes/antigravity/index.d.ts +1 -0
  18. package/dist/runtimes/antigravity/index.d.ts.map +1 -1
  19. package/dist/runtimes/antigravity/index.js +2 -1
  20. package/dist/runtimes/antigravity/index.js.map +1 -1
  21. package/dist/runtimes/antigravity/session.d.ts +3 -1
  22. package/dist/runtimes/antigravity/session.d.ts.map +1 -1
  23. package/dist/runtimes/antigravity/session.js +8 -6
  24. package/dist/runtimes/antigravity/session.js.map +1 -1
  25. package/dist/runtimes/cursor/index.d.ts +7 -3
  26. package/dist/runtimes/cursor/index.d.ts.map +1 -1
  27. package/dist/runtimes/cursor/index.js +8 -3
  28. package/dist/runtimes/cursor/index.js.map +1 -1
  29. package/dist/runtimes/cursor/installation.d.ts +7 -6
  30. package/dist/runtimes/cursor/installation.d.ts.map +1 -1
  31. package/dist/runtimes/cursor/installation.js +35 -13
  32. package/dist/runtimes/cursor/installation.js.map +1 -1
  33. package/dist/runtimes/cursor/list-models.d.ts +7 -8
  34. package/dist/runtimes/cursor/list-models.d.ts.map +1 -1
  35. package/dist/runtimes/cursor/list-models.js +50 -82
  36. package/dist/runtimes/cursor/list-models.js.map +1 -1
  37. package/dist/runtimes/cursor/model.d.ts +30 -0
  38. package/dist/runtimes/cursor/model.d.ts.map +1 -0
  39. package/dist/runtimes/cursor/model.js +97 -0
  40. package/dist/runtimes/cursor/model.js.map +1 -0
  41. package/dist/runtimes/cursor/projection.d.ts +40 -0
  42. package/dist/runtimes/cursor/projection.d.ts.map +1 -0
  43. package/dist/runtimes/cursor/projection.js +205 -0
  44. package/dist/runtimes/cursor/projection.js.map +1 -0
  45. package/dist/runtimes/cursor/run.d.ts +33 -0
  46. package/dist/runtimes/cursor/run.d.ts.map +1 -0
  47. package/dist/runtimes/cursor/run.js +68 -0
  48. package/dist/runtimes/cursor/run.js.map +1 -0
  49. package/dist/runtimes/cursor/sdk.d.ts +64 -0
  50. package/dist/runtimes/cursor/sdk.d.ts.map +1 -0
  51. package/dist/runtimes/cursor/sdk.js +50 -0
  52. package/dist/runtimes/cursor/sdk.js.map +1 -0
  53. package/dist/runtimes/cursor/session.d.ts +4 -37
  54. package/dist/runtimes/cursor/session.d.ts.map +1 -1
  55. package/dist/runtimes/cursor/session.js +266 -71
  56. package/dist/runtimes/cursor/session.js.map +1 -1
  57. package/dist/runtimes/kimi/index.d.ts +1 -0
  58. package/dist/runtimes/kimi/index.d.ts.map +1 -1
  59. package/dist/runtimes/kimi/index.js +2 -1
  60. package/dist/runtimes/kimi/index.js.map +1 -1
  61. package/dist/runtimes/kimi/session.d.ts +3 -1
  62. package/dist/runtimes/kimi/session.d.ts.map +1 -1
  63. package/dist/runtimes/kimi/session.js +8 -6
  64. package/dist/runtimes/kimi/session.js.map +1 -1
  65. package/dist/shared/acp/client-app.d.ts +0 -2
  66. package/dist/shared/acp/client-app.d.ts.map +1 -1
  67. package/dist/shared/acp/client-app.js +1 -8
  68. package/dist/shared/acp/client-app.js.map +1 -1
  69. package/dist/shared/acp/effort.d.ts +1 -1
  70. package/dist/shared/acp/effort.js +1 -1
  71. package/dist/shared/acp/model.d.ts +5 -8
  72. package/dist/shared/acp/model.d.ts.map +1 -1
  73. package/dist/shared/acp/model.js +6 -14
  74. package/dist/shared/acp/model.js.map +1 -1
  75. package/dist/shared/acp/process.d.ts +0 -2
  76. package/dist/shared/acp/process.d.ts.map +1 -1
  77. package/dist/shared/acp/process.js +2 -7
  78. package/dist/shared/acp/process.js.map +1 -1
  79. package/dist/shared/acp/profile.d.ts +2 -17
  80. package/dist/shared/acp/profile.d.ts.map +1 -1
  81. package/dist/shared/acp/profile.js +1 -5
  82. package/dist/shared/acp/profile.js.map +1 -1
  83. package/dist/shared/acp/records.d.ts +1 -3
  84. package/dist/shared/acp/records.d.ts.map +1 -1
  85. package/dist/shared/acp/records.js +6 -14
  86. package/dist/shared/acp/records.js.map +1 -1
  87. package/dist/shared/acp/session.d.ts.map +1 -1
  88. package/dist/shared/acp/session.js +1 -6
  89. package/dist/shared/acp/session.js.map +1 -1
  90. package/dist/shared/failure-class.js +1 -1
  91. package/dist/shared/failure-class.js.map +1 -1
  92. package/dist/shared/session-options.d.ts +7 -0
  93. package/dist/shared/session-options.d.ts.map +1 -0
  94. package/dist/shared/session-options.js +17 -0
  95. package/dist/shared/session-options.js.map +1 -0
  96. package/dist/shared/update.d.ts +1 -1
  97. package/dist/shared/update.d.ts.map +1 -1
  98. package/dist/shared/update.js +3 -4
  99. package/dist/shared/update.js.map +1 -1
  100. package/package.json +6 -5
  101. package/dist/runtimes/cursor/update.d.ts +0 -19
  102. package/dist/runtimes/cursor/update.d.ts.map +0 -1
  103. package/dist/runtimes/cursor/update.js +0 -88
  104. package/dist/runtimes/cursor/update.js.map +0 -1
  105. package/dist/shared/acp/vendor-updates.d.ts +0 -7
  106. package/dist/shared/acp/vendor-updates.d.ts.map +0 -1
  107. package/dist/shared/acp/vendor-updates.js +0 -46
  108. package/dist/shared/acp/vendor-updates.js.map +0 -1
@@ -1,74 +1,269 @@
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 { refuseSessionOptions } from "../../shared/session-options.js";
5
+ import { cursorModelSelection, cursorRefusedSessionOptions } from "./model.js";
6
+ import { cursorOpenedFrame, cursorRunFailedFrame, cursorRunResultFrame, foldCursorDelta, initialCursorProjection, } from "./projection.js";
7
+ import { giveUp, newLaunch, steerRun, stopOrphan } from "./run.js";
8
+ import { loadCursorSdk } from "./sdk.js";
9
+ /*
10
+ * Cursor through `@cursor/sdk` (1.0.35), in process (settled 2026-10-03,
11
+ * replacing cursor-agent ACP): a session is one local SDK agent, its id the
12
+ * SDK's `agent-<uuid>`; a turn is one `send`, from the run it returns until
13
+ * `run.wait()` answers; steer is `run.steer`; abort is `run.cancel`; the
14
+ * agent takes one run at a time (a second `send` is refused "already has
15
+ * active run"), so queued input is held here and sent when the run ends.
16
+ * The agent's store keeps its last run as active until that run's own
17
+ * agent object ends it, so after a process that died mid-run, or a session
18
+ * closed before its first prompt, a resumed agent refuses every send the
19
+ * same way (probed 2026-10-03); the first send after a resume is `force`d,
20
+ * which takes the agent over. Arbitrating between processes is the host's.
27
21
  */
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
- }
22
+ const message = (error) => (error instanceof Error ? error.message : String(error));
23
+ /** How long dispose waits for a cancelled run to report its own end before releasing the agent. */
24
+ const DISPOSE_SETTLE_MS = 5000;
25
+ /** How long a `send` may take to return its run (a cold start took about 4 s in the probes). */
26
+ const SEND_TIMEOUT_MS = 60_000;
27
+ export function cursorSessionWith(load) {
28
+ return async (installation, options) => {
29
+ if (installation.via !== "bundled") {
30
+ throw new Error("The cursor session adapter needs the bundled @cursor/sdk installation");
31
+ }
32
+ refuseSessionOptions(cursorRefusedSessionOptions, options);
33
+ const sdk = await load();
34
+ // No sandbox, as every OAR session runs by default (contracts/session.ts):
35
+ // without this a `~/.cursor/sandbox.json` would turn one on.
36
+ const agentOptions = {
37
+ model: await cursorModelSelection(sdk, options),
38
+ local: { cwd: options.cwd, sandboxOptions: { enabled: false } },
39
+ };
40
+ const agent = options.resume === undefined
41
+ ? await sdk.Agent.create(agentOptions)
42
+ : await sdk.Agent.resume(options.resume, agentOptions);
43
+ const kernel = createSessionKernel(agent.agentId);
44
+ let projection = initialCursorProjection;
45
+ // A turn is running from an accepted prompt (or a drained queue input)
46
+ // until its run's end is recorded. Held in an object so closures always
47
+ // read the live value.
48
+ const gate = { running: false };
49
+ // The send on its way to a run, and the run in flight.
50
+ let launching = null;
51
+ let active = null;
52
+ let forceNext = options.resume !== undefined;
53
+ let disposeRequest = null;
54
+ // Adapter-held queue, drained one input per run end.
55
+ const held = [];
56
+ const record = (frame) => {
57
+ kernel.frame({ type: frame.type, native: frame.native, events: frame.events }, frame.agentPath.length === 0 ? undefined : { agentPath: frame.agentPath });
58
+ };
59
+ const onDelta = ({ update }) => {
60
+ const folded = foldCursorDelta(projection, update);
61
+ projection = folded.state;
62
+ record(folded.frame);
63
+ };
64
+ record(cursorOpenedFrame(agent.agentId, agent.model));
65
+ const finish = (current, frame) => {
66
+ record(frame);
67
+ if (active === current) {
68
+ active = null;
69
+ }
70
+ gate.running = false;
71
+ drainHeld();
72
+ };
73
+ const adopt = (run) => {
74
+ const { promise: ended, resolve: onEnded } = Promise.withResolvers();
75
+ const current = { run, ended };
76
+ active = current;
77
+ void (async () => {
78
+ try {
79
+ finish(current, cursorRunResultFrame(await run.wait()));
80
+ }
81
+ catch (error) {
82
+ finish(current, cursorRunFailedFrame(message(error)));
83
+ }
84
+ finally {
85
+ onEnded();
86
+ }
87
+ })();
88
+ return current;
89
+ };
90
+ const launch = (input, images) => {
91
+ const attempt = newLaunch();
92
+ const content = images.length === 0
93
+ ? input
94
+ : { text: input, images: images.map((image) => ({ data: image.data, mimeType: image.mediaType })) };
95
+ const force = forceNext;
96
+ void (async () => {
97
+ try {
98
+ const run = await agent.send(content, { onDelta, ...(force ? { local: { force: true } } : {}) });
99
+ forceNext = false;
100
+ if (attempt.state === "given_up") {
101
+ stopOrphan(run, record);
102
+ return;
103
+ }
104
+ attempt.state = "sent";
105
+ attempt.current = adopt(run);
106
+ }
107
+ catch (error) {
108
+ if (attempt.state === "sending") {
109
+ attempt.state = "failed";
110
+ attempt.reason = message(error);
111
+ }
112
+ }
113
+ finally {
114
+ attempt.decide();
115
+ }
116
+ })();
117
+ return attempt;
118
+ };
119
+ const start = async (input, images) => {
120
+ gate.running = true;
121
+ const attempt = launch(input, images);
122
+ launching = attempt;
123
+ const deadline = setTimeout(() => {
124
+ giveUp(attempt, `cursor did not start the run within ${String(SEND_TIMEOUT_MS / 1000)} s`);
125
+ }, SEND_TIMEOUT_MS);
126
+ deadline.unref();
127
+ await attempt.decided;
128
+ clearTimeout(deadline);
129
+ if (launching === attempt) {
130
+ launching = null;
131
+ }
132
+ const { current } = attempt;
133
+ if (current === null) {
134
+ gate.running = false;
135
+ return { kind: "rejected", code: "runtime_refused", reason: attempt.reason };
136
+ }
137
+ if (attempt.abortRequested) {
138
+ // The abort was accepted before the run existed; its outcome is the
139
+ // run's own end, so a failed cancel leaves the run to finish.
140
+ try {
141
+ await current.run.cancel();
142
+ }
143
+ catch {
144
+ // The run may have ended on its own meanwhile.
145
+ }
146
+ }
147
+ return { kind: "accepted", native: { runId: current.run.id } };
148
+ };
149
+ function drainHeld() {
150
+ if (disposeRequest !== null || gate.running) {
151
+ return;
152
+ }
153
+ const next = held.shift();
154
+ if (next === undefined) {
155
+ return;
156
+ }
157
+ void (async () => {
158
+ const decided = await start(next.input, next.images);
159
+ if (decided.kind === "rejected") {
160
+ // The queue took the input over; the SDK refusing it is not silent.
161
+ kernel.frame({ type: "cursor/send_rejected", native: { message: decided.reason, input: next.input }, events: [] });
162
+ drainHeld();
163
+ }
164
+ })();
165
+ }
166
+ /** The run in flight, waiting out a `send` that has not returned it yet. */
167
+ const inFlight = async () => {
168
+ const pending = launching;
169
+ if (active !== null || pending === null) {
170
+ return active;
171
+ }
172
+ await pending.decided;
173
+ return pending.current;
174
+ };
175
+ const capabilities = { steer: true, queue: { durable: false }, attribution: "attributed", images: true };
176
+ const session = sealSession({
177
+ id: kernel.sessionId,
178
+ capabilities,
179
+ prompt: async (input, inputOptions) => {
180
+ const result = await kernel.control({ kind: "prompt", input, ...inputOptions }, async () => {
181
+ if (gate.running) {
182
+ return { kind: "rejected", code: "busy", reason: "busy" };
183
+ }
184
+ const decided = await withInputImages(capabilities, inputOptions?.images, async (images) => {
185
+ const started = await start(input, images);
186
+ return started;
187
+ });
188
+ return decided;
189
+ });
190
+ return result;
191
+ },
192
+ steer: async (input, inputOptions) => {
193
+ const result = await kernel.control({ kind: "steer", input, ...inputOptions }, async () => {
194
+ const current = gate.running ? await inFlight() : null;
195
+ if (current === null) {
196
+ return { kind: "rejected", code: "no_active_turn", reason: "not_steerable: no active turn" };
197
+ }
198
+ if ((inputOptions?.images ?? []).length > 0) {
199
+ return { kind: "rejected", code: "unsupported", reason: "not_steerable: cursor steers with text only" };
200
+ }
201
+ const decided = await steerRun(current, input);
202
+ return decided;
203
+ });
204
+ return result;
205
+ },
206
+ queue: async (input, inputOptions) => {
207
+ const result = await kernel.control({ kind: "queue", input, ...inputOptions }, () => withInputImages(capabilities, inputOptions?.images, (images) => {
208
+ held.push({ input, images });
209
+ drainHeld();
210
+ return { kind: "accepted" };
211
+ }));
212
+ return result;
213
+ },
214
+ abort: async () => {
215
+ const result = await kernel.control({ kind: "abort" }, async () => {
216
+ if (!gate.running) {
217
+ return { kind: "rejected", code: "no_active_turn", reason: "no active turn" };
218
+ }
219
+ if (active === null) {
220
+ // The run does not exist yet: cancelled as soon as `send` returns it.
221
+ if (launching !== null) {
222
+ launching.abortRequested = true;
223
+ }
224
+ return { kind: "accepted" };
225
+ }
226
+ // Accepted means taken over; the outcome is the run's own `cancelled`.
227
+ await active.run.cancel();
228
+ return { kind: "accepted" };
229
+ });
230
+ return result;
231
+ },
232
+ rawEvents: (observer, cursor) => kernel.rawEvents(observer, cursor),
233
+ records: () => kernel.records(),
234
+ graph: () => kernel.graph(),
235
+ dispose: async () => {
236
+ if (disposeRequest !== null) {
237
+ return;
238
+ }
239
+ held.splice(0);
240
+ const request = kernel.request("toRuntime", { kind: "dispose" });
241
+ disposeRequest = request;
242
+ if (launching !== null) {
243
+ // A send still on its way: its run, if it comes, is stopped, not adopted.
244
+ giveUp(launching, "the session was disposed before cursor started the run");
245
+ }
246
+ const current = active;
247
+ if (current !== null) {
248
+ // The run's own `cancelled` ends the turn in the stream.
249
+ try {
250
+ await current.run.cancel();
251
+ }
252
+ catch {
253
+ // The run may have ended on its own meanwhile.
254
+ }
255
+ await Promise.race([current.ended, new Promise((resolve) => {
256
+ setTimeout(resolve, DISPOSE_SETTLE_MS).unref();
257
+ })]);
258
+ }
259
+ agent.close();
260
+ // The agent runs in this process: there is no process exit to
261
+ // observe, so the dispose is answered as taken over.
262
+ kernel.respond(request.id, { kind: "accepted" });
263
+ },
264
+ });
265
+ return session;
266
+ };
33
267
  }
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);
268
+ export const cursorSession = cursorSessionWith(loadCursorSdk);
74
269
  //# sourceMappingURL=session.js.map
@@ -1 +1 @@
1
- {"version":3,"file":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ecker;
15
15
  readonly upgrade: import("../../index.js").Upgrader;
16
16
  readonly session: import("../../index.js").StartSession;
17
+ readonly refusedSessionOptions: Readonly<Partial<Record<import("../../contracts/runtime.js").RefusableSessionOption, string>>>;
17
18
  } & import("../../index.js").RuntimeInventories & {
18
19
  readonly brand: import("../../brands.js").RuntimeBrand;
19
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtimes/kimi/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;CAStB,CAAC;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/runtimes/kimi/index.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;CAUtB,CAAC;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -4,7 +4,7 @@ import { kimiAccountUsage } from "./account-usage.js";
4
4
  import { kimiInstallation } from "./installation.js";
5
5
  import { kimiListModels } from "./list-models.js";
6
6
  import { kimiCheckUpdate, kimiUpgrade } from "./update.js";
7
- import { kimiSession } from "./session.js";
7
+ import { kimiRefusedSessionOptions, kimiSession } from "./session.js";
8
8
  export const kimiRuntime = defineRuntime({
9
9
  id: "kimi",
10
10
  brand: runtimeBrands.kimi,
@@ -14,6 +14,7 @@ export const kimiRuntime = defineRuntime({
14
14
  checkUpdate: kimiCheckUpdate,
15
15
  upgrade: kimiUpgrade,
16
16
  session: kimiSession,
17
+ refusedSessionOptions: kimiRefusedSessionOptions,
17
18
  });
18
19
  export { kimiAccountUsage, projectKimiUsage } from "./account-usage.js";
19
20
  export { kimiAccountDisplayName, kimiAccountEmail } from "./profile.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtimes/kimi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACvC,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,aAAa,CAAC,IAAI;IACzB,YAAY,EAAE,gBAAgB;IAC9B,YAAY,EAAE,gBAAgB;IAC9B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;CACrB,CAAC,CAAC;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/runtimes/kimi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtE,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;IACvC,EAAE,EAAE,MAAM;IACV,KAAK,EAAE,aAAa,CAAC,IAAI;IACzB,YAAY,EAAE,gBAAgB;IAC9B,YAAY,EAAE,gBAAgB;IAC9B,UAAU,EAAE,cAAc;IAC1B,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,qBAAqB,EAAE,yBAAyB;CACjD,CAAC,CAAC;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
@@ -1,7 +1,9 @@
1
+ import type { RefusedSessionOptions } from "../../contracts/runtime.js";
1
2
  import { type AcpSessionProfile } from "../../shared/acp/session.js";
2
3
  import { type JsonRecord } from "../../shared/json.js";
3
4
  export declare function selectKimiAuthMethod(initialized: JsonRecord): string | undefined;
4
5
  export declare function supportsKimiYolo(response: JsonRecord): boolean;
6
+ export declare const kimiRefusedSessionOptions: RefusedSessionOptions;
5
7
  export declare const kimiAcpProfile: AcpSessionProfile;
6
- export declare const kimiSession: import("../../contracts/session.js").StartSession;
8
+ export declare const kimiSession: import("../../index.js").StartSession;
7
9
  //# sourceMappingURL=session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/kimi/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEjE,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAOhF;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAU9D;AAQD,eAAO,MAAM,cAAc,EAAE,iBAsB5B,CAAC;AAEF,eAAO,MAAM,WAAW,mDAA6B,CAAC"}
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/runtimes/kimi/session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGjE,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAOhF;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAU9D;AAED,eAAO,MAAM,yBAAyB,EAAE,qBAGvC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBAwB5B,CAAC;AAEF,eAAO,MAAM,WAAW,uCAA6B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { acpSession } from "../../shared/acp/session.js";
2
2
  import { asRecord } from "../../shared/json.js";
3
+ import { refuseSessionOptions } from "../../shared/session-options.js";
3
4
  export function selectKimiAuthMethod(initialized) {
4
5
  const methods = Array.isArray(initialized.authMethods) ? initialized.authMethods : [];
5
6
  return methods
@@ -19,11 +20,10 @@ export function supportsKimiYolo(response) {
19
20
  const values = Array.isArray(mode?.options) ? mode.options : [];
20
21
  return values.map((value) => asRecord(value)).some((option) => option?.value === "yolo");
21
22
  }
22
- function validateKimiOptions(options) {
23
- if (options.systemPrompt !== undefined || options.appendSystemPrompt !== undefined) {
24
- throw new Error("Kimi ACP does not expose a system prompt override");
25
- }
26
- }
23
+ export const kimiRefusedSessionOptions = {
24
+ systemPrompt: "Kimi ACP does not expose a system prompt override",
25
+ appendSystemPrompt: "Kimi ACP does not expose a system prompt override",
26
+ };
27
27
  export const kimiAcpProfile = {
28
28
  args: ["acp"],
29
29
  // `kimi acp` binds the native session's `main` agent only (kimi-code
@@ -33,7 +33,9 @@ export const kimiAcpProfile = {
33
33
  capabilities: { steer: false, queue: { durable: false }, attribution: "opaque" },
34
34
  requestTimeoutMs: 30_000,
35
35
  selectAuthMethod: selectKimiAuthMethod,
36
- validateOptions: validateKimiOptions,
36
+ validateOptions: (options) => {
37
+ refuseSessionOptions(kimiRefusedSessionOptions, options);
38
+ },
37
39
  // kimi-code f9ca33376 acp-server session.ts onTurnEnded: prompt answered
38
40
  // first, usage_update pushed afterwards from an un-awaited async task.
39
41
  usageUpdateAfterPrompt: true,
@@ -1 +1 @@
1
- {"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/runtimes/kimi/session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAA0B,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAEjE,MAAM,UAAU,oBAAoB,CAAC,WAAuB;IAC1D,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CA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E;QAC9E,IAAI,gBAAgB,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,MAAM,UAAU,CAAC,KAAK,CAAC,OAAO,CAC5B,kBAAkB,EAClB,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,EAC7B,cAAc,CACf,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC,cAAc,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,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AC;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,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AAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,MAAkC,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;SACnK,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,MAA2B,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACvI,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,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"}