@botiverse/oar 0.95.1 → 0.96.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.
- package/README.md +59 -41
- package/dist/contracts/records.d.ts +2 -2
- package/dist/contracts/records.d.ts.map +1 -1
- package/dist/runtimes/codex/installation.d.ts +8 -0
- package/dist/runtimes/codex/installation.d.ts.map +1 -1
- package/dist/runtimes/codex/installation.js +22 -1
- package/dist/runtimes/codex/installation.js.map +1 -1
- package/dist/runtimes/grok/failure.d.ts.map +1 -1
- package/dist/runtimes/grok/failure.js +35 -6
- package/dist/runtimes/grok/failure.js.map +1 -1
- package/dist/runtimes/grok/native-turns.d.ts +13 -0
- package/dist/runtimes/grok/native-turns.d.ts.map +1 -0
- package/dist/runtimes/grok/native-turns.js +49 -0
- package/dist/runtimes/grok/native-turns.js.map +1 -0
- package/dist/runtimes/grok/session.d.ts.map +1 -1
- package/dist/runtimes/grok/session.js +12 -6
- package/dist/runtimes/grok/session.js.map +1 -1
- package/dist/runtimes/grok/spontaneous-usage.d.ts +6 -5
- package/dist/runtimes/grok/spontaneous-usage.d.ts.map +1 -1
- package/dist/runtimes/grok/spontaneous-usage.js +7 -6
- package/dist/runtimes/grok/spontaneous-usage.js.map +1 -1
- package/dist/runtimes/opencode/failure.d.ts +3 -0
- package/dist/runtimes/opencode/failure.d.ts.map +1 -0
- package/dist/runtimes/opencode/failure.js +29 -0
- package/dist/runtimes/opencode/failure.js.map +1 -0
- package/dist/runtimes/opencode/session.d.ts.map +1 -1
- package/dist/runtimes/opencode/session.js +2 -0
- package/dist/runtimes/opencode/session.js.map +1 -1
- package/dist/shared/acp/native-turns.d.ts +37 -0
- package/dist/shared/acp/native-turns.d.ts.map +1 -0
- package/dist/shared/acp/native-turns.js +107 -0
- package/dist/shared/acp/native-turns.js.map +1 -0
- package/dist/shared/acp/profile.d.ts +44 -2
- package/dist/shared/acp/profile.d.ts.map +1 -1
- package/dist/shared/acp/profile.js.map +1 -1
- package/dist/shared/acp/records.d.ts +4 -1
- package/dist/shared/acp/records.d.ts.map +1 -1
- package/dist/shared/acp/records.js +2 -2
- package/dist/shared/acp/records.js.map +1 -1
- package/dist/shared/acp/session-state.d.ts +22 -0
- package/dist/shared/acp/session-state.d.ts.map +1 -0
- package/dist/shared/acp/session-state.js +39 -0
- package/dist/shared/acp/session-state.js.map +1 -0
- package/dist/shared/acp/session.d.ts +3 -17
- package/dist/shared/acp/session.d.ts.map +1 -1
- package/dist/shared/acp/session.js +25 -43
- package/dist/shared/acp/session.js.map +1 -1
- package/dist/shared/acp/steer-request.d.ts +12 -0
- package/dist/shared/acp/steer-request.d.ts.map +1 -0
- package/dist/shared/acp/steer-request.js +56 -0
- package/dist/shared/acp/steer-request.js.map +1 -0
- package/dist/shared/acp/token-usage.d.ts +1 -1
- package/dist/shared/acp/token-usage.d.ts.map +1 -1
- package/dist/shared/acp/token-usage.js +2 -2
- package/dist/shared/acp/token-usage.js.map +1 -1
- package/dist/shared/acp/turns.d.ts +6 -2
- package/dist/shared/acp/turns.d.ts.map +1 -1
- package/dist/shared/acp/turns.js +4 -3
- package/dist/shared/acp/turns.js.map +1 -1
- package/dist/shared/record-retention.d.ts.map +1 -1
- package/dist/shared/record-retention.js +3 -1
- package/dist/shared/record-retention.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ if (installation?.kind === "available") {
|
|
|
18
18
|
}
|
|
19
19
|
}, { coalesceText: true });
|
|
20
20
|
const run = await promptAndWait(session, "Inspect this repository");
|
|
21
|
-
console.log(
|
|
21
|
+
console.log("outcome" in run ? run.outcome : run.kind);
|
|
22
22
|
console.log(session.usage(), await runtime.accountUsage?.(installation));
|
|
23
23
|
await session.dispose();
|
|
24
24
|
}
|
|
@@ -32,25 +32,33 @@ request-based fallback. For a lower-level wait, pass the inputId to
|
|
|
32
32
|
root turn end after that cursor. `session.prompt()` already generates an id
|
|
33
33
|
when omitted; it is recorded on the returned prompt request. A native
|
|
34
34
|
before-start cancellation resolves an input-scoped wait as `aborted`, even
|
|
35
|
-
without a turn-end event.
|
|
36
|
-
|
|
35
|
+
without a turn-end event. When the runtime handles the input natively without
|
|
36
|
+
a model turn (Pi, for an extension command), `promptAndWait` returns
|
|
37
|
+
`kind: "handled"` with the `input_handled` disposition; that is not success.
|
|
38
|
+
`awaitIdle` waits through an intervening notification while a host prompt
|
|
39
|
+
remains pending.
|
|
37
40
|
|
|
38
41
|
`session.events()` delivers flat, attributed `Event`s (native user message
|
|
39
42
|
echoes, text, reasoning, tool call start / later input / progress / end, turn
|
|
40
43
|
start and end, usage, model, effort, compaction start / end, retry, background
|
|
41
44
|
tasks and subagents started, updated and ended, runtime→app requests and oar's
|
|
42
|
-
answers, control rejections, withdrawn inputs, the process
|
|
43
|
-
the `seq` and `agentPath` of the record it was read from.
|
|
44
|
-
says (claude has no compaction start
|
|
45
|
-
|
|
45
|
+
answers, control rejections, withdrawn and natively handled inputs, the process
|
|
46
|
+
exit), each carrying the `seq` and `agentPath` of the record it was read from.
|
|
47
|
+
Kinds a runtime never says never appear (claude has no compaction start;
|
|
48
|
+
kimi, codebuddy and antigravity no compaction; of the core runtimes only
|
|
49
|
+
codex, pi and pi-durable report retry); the runtime pages say which. It is a
|
|
46
50
|
projection over the record stream, which `session.rawEvents()` and
|
|
47
51
|
`session.records()` expose (`RawEvent`: `Frame` with the native payload
|
|
48
52
|
verbatim, `RequestRecord`, `ResponseRecord`) for consumers who need the
|
|
49
|
-
runtime's own frames. `
|
|
53
|
+
runtime's own frames. `SessionOptions.retainedBytes` bounds what the process
|
|
54
|
+
retains: past it the oldest frames lose `native` and tool input and output and
|
|
55
|
+
carry `elided: true`, while live observers still receive every record complete
|
|
56
|
+
([bounding retained records](https://github.com/botiverse/oar/blob/main/docs/spec/record-stream.md#bounding-retained-records)).
|
|
57
|
+
`tool_call_ended.exitCode` is the exit status a runtime
|
|
50
58
|
reports for a command it ran, absent where it reports none (claude); see
|
|
51
59
|
[tool outcomes](https://github.com/botiverse/oar/blob/main/docs/spec/runtime-matrix.md#tool-outcomes).
|
|
52
60
|
In `session.usage()`, `TokenTotals.reasoning` is the part of `output` the
|
|
53
|
-
runtime reports as reasoning (codex, grok, pi, pi-durable, cursor; absent
|
|
61
|
+
runtime reports as reasoning (codex, grok, pi, pi-durable, cursor, dsh; absent
|
|
54
62
|
elsewhere): never add it to `output` again
|
|
55
63
|
([reasoning tokens](https://github.com/botiverse/oar/blob/main/docs/spec/attribution.md#reasoning-tokens)).
|
|
56
64
|
|
|
@@ -79,7 +87,11 @@ name; `deliver` and `steerOrQueue` queue where it is absent. `session.withdraw(i
|
|
|
79
87
|
sent (`accepted`), or answers `not_queued` once it went; with it a UI offers
|
|
80
88
|
withdraw, edit (withdraw, then `queue` again) and send now (withdraw, then
|
|
81
89
|
`deliver`). It exists where OAR holds the queue itself (claude, pi, qwen, qoder, cursor
|
|
82
|
-
and the ACP runtimes),
|
|
90
|
+
and the ACP runtimes), on pi-durable through native submission cancellation and on
|
|
91
|
+
dsh through native inbox removal where its method inventory advertises it, not on codex.
|
|
92
|
+
`session.stopTask(taskId)` stops one native task without aborting its parent
|
|
93
|
+
(claude, codex, qoder); acceptance is the native acknowledgement, never a task
|
|
94
|
+
end ([single-task stop](https://github.com/botiverse/oar/blob/main/docs/spec/runtime-matrix.md#native-tasks-and-single-task-stop)).
|
|
83
95
|
`session.compact()` is optional on Claude, Codex, Pi SDK/RPC, Grok, Qoder,
|
|
84
96
|
Cursor and OpenCode v2 sessions. OpenCode v1 omits it.
|
|
85
97
|
`runtime.manualCompaction` describes support and active-turn policy; these
|
|
@@ -145,18 +157,18 @@ The package has these public entry points, plus `@botiverse/oar/pi-durable` ([be
|
|
|
145
157
|
|
|
146
158
|
Brand SVG files are exported at `@botiverse/oar/assets/brands/<runtime-id>.svg`. Any other deep import (`@botiverse/oar/dist/...`, source paths) is internal and may break without notice.
|
|
147
159
|
|
|
148
|
-
Antigravity, CodeBuddy, Grok, Kimi, and OpenCode share an internal ACP v1 transport and session kernel, but only their concrete runtime identities are public. The registry deliberately does not expose a generic `acp` runtime.
|
|
160
|
+
Antigravity, CodeBuddy, Grok, Kimi, and OpenCode share an internal ACP v1 transport and session kernel, but only their concrete runtime identities are public. The registry deliberately does not expose a generic `acp` runtime. The pi SDK (`@earendil-works/pi-coding-agent`) is a dependency of this package. `@cursor/sdk` is an optional peer dependency, and cursor is not in `defaultRuntimes`: install the SDK (`npm install @cursor/sdk@1.2.0`) and hand it over, `createRuntimeRegistry([...defaultRuntimes.list(), createCursorRuntime({ sdk: () => import("@cursor/sdk") })])`. Written in your code, that import fails your compile if the package is missing. It is Cursor's own package under Cursor's terms, and it signs in with `CURSOR_API_KEY` or its own `Cursor.auth.login()`.
|
|
149
161
|
|
|
150
162
|
Community runtimes are contributed and maintained outside the core team (each maintainer is named on its runtime page). They ship in this package from a separate entry point, `@botiverse/oar/community`, and are not in `defaultRuntimes`: `createRuntimeRegistry([...defaultRuntimes.list(), createMorphRuntime()])` adds [Mister Morph](https://github.com/botiverse/oar/blob/main/docs/runtimes/morph.md), driven through its Console Runtime API. The `oar` CLI includes them.
|
|
151
163
|
|
|
152
|
-
**Pi 1.0.3
|
|
153
|
-
`azure-openai-responses
|
|
154
|
-
|
|
155
|
-
|
|
164
|
+
**Pi Azure provider (since Pi 1.0.3):** the provider is `azure`, not
|
|
165
|
+
`azure-openai-responses`; use that prefix in native provider configuration and
|
|
166
|
+
`SessionOptions.model`. When resuming an old Azure session, pass
|
|
167
|
+
`model: "azure/<model>"` explicitly; without it, Pi can retain the
|
|
156
168
|
conversation while selecting a different default model. The opening `model`
|
|
157
169
|
event and `Session.model()` report the effective selection. OAR's `^1.5.0`
|
|
158
|
-
dependency range includes this
|
|
159
|
-
[migration evidence and limits](https://github.com/botiverse/oar/blob/main/experiments/runtime-version-checks/2026-10-05.md).
|
|
170
|
+
dependency range includes this change
|
|
171
|
+
([migration evidence and limits](https://github.com/botiverse/oar/blob/main/experiments/runtime-version-checks/2026-10-05.md)).
|
|
160
172
|
|
|
161
173
|
**Pi 1.5.0 default prompt:** the bundled native default system prompt has
|
|
162
174
|
changed. Hosts that need stable wording should pass their own `systemPrompt`.
|
|
@@ -178,8 +190,9 @@ and `codebuddyRuntime` (CodeBuddy Code's ACP server) are in `defaultRuntimes`
|
|
|
178
190
|
too; see the [Qoder](https://github.com/botiverse/oar/blob/main/docs/runtimes/qoder.md)
|
|
179
191
|
and [CodeBuddy](https://github.com/botiverse/oar/blob/main/docs/runtimes/codebuddy.md) mappings.
|
|
180
192
|
`dshRuntime` (DeepSeek Harness through a private plugin on its native services, one
|
|
181
|
-
process per session, `0.2.1-rc.5` or later) is too;
|
|
182
|
-
|
|
193
|
+
process per session, `DSH_MINIMUM_VERSION` `0.2.1-rc.5` or later) is too; it selects
|
|
194
|
+
models as `provider/model`, takes stdio session MCP servers only, and most session
|
|
195
|
+
options stay refused until probed ([mapping](https://github.com/botiverse/oar/blob/main/docs/runtimes/dsh.md)).
|
|
183
196
|
|
|
184
197
|
The command-line interface is a separate package: `@botiverse/oar-cli`.
|
|
185
198
|
|
|
@@ -290,7 +303,7 @@ const session = await runtime.session(installation, {
|
|
|
290
303
|
});
|
|
291
304
|
try {
|
|
292
305
|
const run = await promptAndWait(session, "What is 2 + 2?");
|
|
293
|
-
if (
|
|
306
|
+
if ("outcome" in run && run.outcome.kind === "completed" && "structuredOutput" in run.outcome) {
|
|
294
307
|
console.log(run.outcome.structuredOutput);
|
|
295
308
|
}
|
|
296
309
|
} finally { await session.dispose(); }
|
|
@@ -305,11 +318,11 @@ fails: [structured output](https://github.com/botiverse/oar/blob/main/docs/spec/
|
|
|
305
318
|
args?, env?}` or streamable HTTP `{name, type: "http", url, headers?}`) to
|
|
306
319
|
one session, on top of the runtime's own, through each runtime's own channel
|
|
307
320
|
(claude reads them from a 0600 FIFO that never puts them on a disk, a
|
|
308
|
-
temporary file on Windows); cursor and pi-durable refuse them
|
|
309
|
-
again on `resume`. Their `env` and
|
|
310
|
-
appear in a record or an error; antigravity, which would
|
|
311
|
-
conversation database,
|
|
312
|
-
`mcpServerCredentials`; leave such entries out). Every runtime refuses the
|
|
321
|
+
temporary file on Windows); cursor and pi-durable refuse them, and dsh takes
|
|
322
|
+
stdio `command` and `args` only. Give them again on `resume`. Their `env` and
|
|
323
|
+
`headers` values never appear in a record or an error; antigravity, which would
|
|
324
|
+
store them in its conversation database, and dsh refuse an entry carrying them
|
|
325
|
+
(declared as `mcpServerCredentials`; leave such entries out). Every runtime refuses the
|
|
313
326
|
names `__proto__`, `__defineGetter__`, `__defineSetter__`, `__lookupGetter__`
|
|
314
327
|
and `__lookupSetter__` (`option: "mcpServers"`), which some runtimes drop
|
|
315
328
|
without a word. See the
|
|
@@ -319,7 +332,7 @@ and each runtime page's "Session MCP servers".
|
|
|
319
332
|
Tools the host implements itself go through the same option. `serveMcpTools`
|
|
320
333
|
serves them from an MCP server inside the host process and returns the
|
|
321
334
|
`mcpServers` entry to pass, so one implementation reaches every runtime that
|
|
322
|
-
takes an http entry with `headers` (all but cursor, pi-durable and
|
|
335
|
+
takes an http entry with `headers` (all but cursor, pi-durable, antigravity and dsh):
|
|
323
336
|
|
|
324
337
|
```ts
|
|
325
338
|
import { serveMcpTools } from "@botiverse/oar";
|
|
@@ -343,15 +356,17 @@ It listens on 127.0.0.1 behind a random bearer token (in the entry's
|
|
|
343
356
|
machine, as OAR's runtimes do. A handler returns text, or MCP content with
|
|
344
357
|
`isError` for a failed call; a thrown error becomes an `isError` result with
|
|
345
358
|
its message. Its `signal` aborts when the runtime cancels the call or the
|
|
346
|
-
server closes.
|
|
359
|
+
server closes. A tool's MCP `annotations` (`readOnlyHint`, `destructiveHint`,
|
|
360
|
+
...) go out unchanged in `tools/list`; runtimes may use them (for approval, for
|
|
361
|
+
example); OAR neither validates nor acts on them. One served set can back several sessions. `instructions` (guidance
|
|
347
362
|
across the tools) goes out as the MCP server instructions; claude, codex,
|
|
348
363
|
opencode and grok show them to the model, pi and kimi do not.
|
|
349
364
|
`served.setTools(tools)` replaces the tools while sessions run and sends MCP's
|
|
350
365
|
`notifications/tools/list_changed`. Whether a running session's model sees
|
|
351
366
|
the change is the runtime's choice, declared before opening as
|
|
352
367
|
`runtime.mcpToolsListChanged`: `full` (pi, opencode), `additions` (claude:
|
|
353
|
-
new tools appear, removed ones stay offered) or `none` (codex, kimi, grok, antigravity)
|
|
354
|
-
session that does not take it gets the new tools when the host opens its next
|
|
368
|
+
new tools appear, removed ones stay offered) or `none` (codex, kimi, grok, antigravity),
|
|
369
|
+
absent where unmeasured; a session that does not take it gets the new tools when the host opens its next
|
|
355
370
|
session. The declaration covers any MCP server that announces a change, so
|
|
356
371
|
antigravity declares `none`, though a served entry never attaches there. See
|
|
357
372
|
[host-served tools](https://github.com/botiverse/oar/blob/main/docs/spec/runtime-matrix.md#host-served-tools).
|
|
@@ -361,9 +376,10 @@ can run now (`ok`, `unauthenticated` or `unsupported`); every built-in runtime
|
|
|
361
376
|
has it. Entries include native `effortLevels` and `serviceTiers` where supported.
|
|
362
377
|
`default: true` marks the model a session uses when no `model` is set, where
|
|
363
378
|
the runtime says so (codex's configured model, else its catalog default; a new
|
|
364
|
-
session's current model on grok, kimi and
|
|
365
|
-
pi's settings). claude, cursor
|
|
366
|
-
|
|
379
|
+
session's current model on grok, kimi, antigravity and codebuddy; the native
|
|
380
|
+
default on qoder and dsh; the default saved in pi's settings). claude, cursor,
|
|
381
|
+
opencode and qwen mark none: OAR never picks one.
|
|
382
|
+
Where several providers serve models (pi, opencode, dsh), `provider: { id,
|
|
367
383
|
displayName? }` says which, so a host never parses `id`. A project's own
|
|
368
384
|
configuration can change the list and its default, so pass `options.cwd`, the
|
|
369
385
|
directory a session would run in (the host's cwd by default). Like the
|
|
@@ -387,8 +403,8 @@ updater would install and where that answer came from;
|
|
|
387
403
|
`runtime.upgrade(installation)` runs that updater without a terminal and
|
|
388
404
|
judges the result by the version the same executable reports afterwards,
|
|
389
405
|
never by its exit code. oar never upgrades on its own. Claude, Codex, Grok
|
|
390
|
-
and Kimi have both; Antigravity has only the check; CodeBuddy, OpenCode, Qwen and Qoder
|
|
391
|
-
yet; Pi and Cursor have neither, their SDK versions following oar's (Pi's
|
|
406
|
+
and Kimi have both; Antigravity has only the check; CodeBuddy, DSH, OpenCode, Qwen and Qoder
|
|
407
|
+
have neither yet; Pi and Cursor have neither, their SDK versions following oar's (Pi's
|
|
392
408
|
SDK is a dependency, Cursor's an exact peer dependency).
|
|
393
409
|
See [runtime updates](https://github.com/botiverse/oar/blob/main/docs/spec/update.md).
|
|
394
410
|
|
|
@@ -403,8 +419,9 @@ it, without a terminal and never with sudo, when `installation()` finds no
|
|
|
403
419
|
copy, and judges the result by `installation()` afterwards, never by the
|
|
404
420
|
installer's exit code. oar never installs on its own. Claude, Codex, Grok,
|
|
405
421
|
Kimi, OpenCode, Qwen, Qoder and Antigravity install through their vendors' macOS and Linux scripts;
|
|
406
|
-
CodeBuddy
|
|
407
|
-
the configured global prefix
|
|
422
|
+
CodeBuddy and DSH use their official npm packages on Linux, macOS and Windows
|
|
423
|
+
and check the configured global prefix; CodeBuddy's launcher is discovered even
|
|
424
|
+
off PATH.
|
|
408
425
|
Planning may run bounded local read-only queries with private temporary files
|
|
409
426
|
removed afterwards; it never installs, downloads packages or changes user files.
|
|
410
427
|
An unreadable prefix returns `location_unknown` with the failure category in
|
|
@@ -425,11 +442,12 @@ arrives as a `ProviderLoginInteraction` event, and a code the person pastes
|
|
|
425
442
|
back is answered through its `manual_code` prompt and written to the
|
|
426
443
|
runtime's stdin only. It never logs the current account out first, and
|
|
427
444
|
`interaction.signal` cancels it. `runtime.authStatus(installation)` reads the
|
|
428
|
-
runtime's own status, never a secret, and never starts a login
|
|
445
|
+
runtime's own status, never a secret, and never starts a login; a status read
|
|
446
|
+
past its `timeoutMs` returns `unknown` without waiting for process cleanup. Claude,
|
|
429
447
|
Codex, Cursor (through its SDK's own `Cursor.auth`), Qoder and Kimi (`kimi
|
|
430
448
|
login`, with `KimiLoginOptions.region`) have both. Qwen has only
|
|
431
449
|
`authStatus`, a local check of whether a provider credential is configured;
|
|
432
|
-
its provider settings are on `createQwenProviderAuth`. Grok, OpenCode and Pi
|
|
450
|
+
its provider settings are on `createQwenProviderAuth`. Grok, OpenCode, DSH and Pi
|
|
433
451
|
have neither yet (Pi's provider logins are on `createPiProviderAuth`).
|
|
434
452
|
CodeBuddy supports login and a private native account-state read, but no logout
|
|
435
453
|
([mapping](https://github.com/botiverse/oar/blob/main/docs/runtimes/codebuddy.md#international-login)).
|
|
@@ -502,8 +520,8 @@ in the default registry or CLI.
|
|
|
502
520
|
|
|
503
521
|
Every runtime exposes `skills(installation, options?)`,
|
|
504
522
|
`commands(installation, options?)`, `mcpServers(installation, options?)`, and `tools(installation, options?)`.
|
|
505
|
-
Options are `{ cwd?: string, timeoutMs?: number }
|
|
506
|
-
`process.cwd()`. Queries discover native information independently: they do
|
|
523
|
+
Options are `{ cwd?: string, timeoutMs?: number, env? }` (`env` is the
|
|
524
|
+
`SessionOptions.env` overlay); cwd defaults to `process.cwd()`. Queries discover native information independently: they do
|
|
507
525
|
not inspect an existing Session or submit a model prompt, though native
|
|
508
526
|
startup can load extensions and connect configured MCP servers.
|
|
509
527
|
|
|
@@ -517,7 +535,7 @@ exposes independent skills and MCP configuration discovery; Pi exposes skills
|
|
|
517
535
|
and registered tools with active membership. Pi commands include extension
|
|
518
536
|
commands and prompt templates; Claude commands come from native initialize.
|
|
519
537
|
Other core runtimes return unsupported for independent command discovery.
|
|
520
|
-
Antigravity, CodeBuddy, Cursor, Kimi, OpenCode, Qoder and Qwen inventory
|
|
538
|
+
Antigravity, CodeBuddy, Cursor, DSH, Kimi, OpenCode, Qoder and Qwen inventory
|
|
521
539
|
queries are unsupported.
|
|
522
540
|
|
|
523
541
|
```ts
|
|
@@ -233,7 +233,7 @@ export type RuntimeEventBody = {
|
|
|
233
233
|
readonly reason?: string;
|
|
234
234
|
readonly requestId?: string;
|
|
235
235
|
}
|
|
236
|
-
/** The runtime announced it will retry a failed provider call (pi `auto_retry_start`, `summarization_retry_scheduled`; codex `error` with `willRetry
|
|
236
|
+
/** The runtime announced it will retry a failed provider call (pi and pi-durable `auto_retry_start`, pi `summarization_retry_scheduled`; codex `error` with `willRetry`; community morph). Other shipped runtimes retry silently or not at all. */
|
|
237
237
|
| {
|
|
238
238
|
readonly kind: "retry";
|
|
239
239
|
readonly attempt: number;
|
|
@@ -259,7 +259,7 @@ export type RuntimeEventBody = {
|
|
|
259
259
|
readonly kind: "service_tier";
|
|
260
260
|
readonly serviceTier: string;
|
|
261
261
|
}
|
|
262
|
-
/** The runtime withdrew a `toApp` request it had sent (`app_request` with this `requestId`) and no longer waits on an answer: claude `control_cancel_request
|
|
262
|
+
/** The runtime withdrew a `toApp` request it had sent (`app_request` with this `requestId`) and no longer waits on an answer: claude `control_cancel_request`. Codex `serverRequest/resolved` produces none: oar answers every codex request as it arrives, so the resolution follows that answer. Never inferred from a turn ending. */
|
|
263
263
|
| {
|
|
264
264
|
readonly kind: "app_request_cancelled";
|
|
265
265
|
readonly requestId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sources":["../../src/contracts/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,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AAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACxF,iNAAiN;AACjN,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AACD,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
* by default `~/.local/bin/codex`, a link into
|
|
8
8
|
* `$CODEX_HOME/packages/standalone/current`), which it adds to PATH only in
|
|
9
9
|
* shell profiles.
|
|
10
|
+
*
|
|
11
|
+
* On Windows (none of them on PATH): npm's global `codex.cmd` shim in its
|
|
12
|
+
* default prefix (`%APPDATA%\npm`; OAR runs the shim's Node script without
|
|
13
|
+
* cmd.exe, windows-shim.ts), then the Codex Desktop app's CLI
|
|
14
|
+
* (`%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe`, or without
|
|
15
|
+
* `Programs` for a per-user install). Locations as Raft's own Codex driver
|
|
16
|
+
* resolves them; the `codex-command-runner` sandbox helper beside them is
|
|
17
|
+
* never a candidate.
|
|
10
18
|
*/
|
|
11
19
|
export declare function codexInstalledExecutableCandidates(platform?: NodeJS.Platform, home?: string, env?: Readonly<NodeJS.ProcessEnv>): readonly string[];
|
|
12
20
|
export declare const codexInstallation: import("../../browser.js").InstallationProbe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.d.ts","sources":["../../../src/runtimes/codex/installation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"installation.d.ts","sources":["../../../src/runtimes/codex/installation.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kCAAkC,CAChD,QAAQ,GAAE,MAAM,CAAC,QAA2B,EAC5C,IAAI,GAAE,MAAkB,EACxB,GAAG,GAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAe,GAC7C,SAAS,MAAM,EAAE,CA2BnB;AAGD,eAAO,MAAM,iBAAiB,8CAK7B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { environmentHome } from "../../shared/environment-home.js";
|
|
2
|
+
import { environmentValue } from "../../shared/environment.js";
|
|
2
3
|
import { homedir } from "node:os";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { executableInstallation } from "../../shared/installation.js";
|
|
@@ -11,10 +12,30 @@ import { executableInstallation } from "../../shared/installation.js";
|
|
|
11
12
|
* by default `~/.local/bin/codex`, a link into
|
|
12
13
|
* `$CODEX_HOME/packages/standalone/current`), which it adds to PATH only in
|
|
13
14
|
* shell profiles.
|
|
15
|
+
*
|
|
16
|
+
* On Windows (none of them on PATH): npm's global `codex.cmd` shim in its
|
|
17
|
+
* default prefix (`%APPDATA%\npm`; OAR runs the shim's Node script without
|
|
18
|
+
* cmd.exe, windows-shim.ts), then the Codex Desktop app's CLI
|
|
19
|
+
* (`%LOCALAPPDATA%\Programs\OpenAI\Codex\bin\codex.exe`, or without
|
|
20
|
+
* `Programs` for a per-user install). Locations as Raft's own Codex driver
|
|
21
|
+
* resolves them; the `codex-command-runner` sandbox helper beside them is
|
|
22
|
+
* never a candidate.
|
|
14
23
|
*/
|
|
15
24
|
export function codexInstalledExecutableCandidates(platform = process.platform, home = homedir(), env = process.env) {
|
|
16
25
|
if (platform === "win32") {
|
|
17
|
-
|
|
26
|
+
const win = path.win32;
|
|
27
|
+
// Windows variable names are case-insensitive (`AppData` is `APPDATA`).
|
|
28
|
+
const folder = (name, fallback) => {
|
|
29
|
+
const value = environmentValue(env, name, platform);
|
|
30
|
+
return value === undefined || value === "" ? fallback : value;
|
|
31
|
+
};
|
|
32
|
+
const roaming = folder("APPDATA", win.join(home, "AppData", "Roaming"));
|
|
33
|
+
const local = folder("LOCALAPPDATA", win.join(home, "AppData", "Local"));
|
|
34
|
+
return [
|
|
35
|
+
win.join(roaming, "npm", "codex.cmd"),
|
|
36
|
+
win.join(local, "Programs", "OpenAI", "Codex", "bin", "codex.exe"),
|
|
37
|
+
win.join(local, "OpenAI", "Codex", "bin", "codex.exe"),
|
|
38
|
+
];
|
|
18
39
|
}
|
|
19
40
|
const paths = path.posix;
|
|
20
41
|
const bundles = platform === "darwin"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation.js","sources":["../../../src/runtimes/codex/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE
|
|
1
|
+
{"version":3,"file":"installation.js","sources":["../../../src/runtimes/codex/installation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kCAAkC,CAChD,QAAQ,GAAoB,OAAO,CAAC,QAAQ,EAC5C,IAAI,GAAW,OAAO,EAAE,EACxB,GAAG,GAAgC,OAAO,CAAC,GAAG;IAE9C,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC;QACvB,wEAAwE;QACxE,MAAM,MAAM,GAAG,CAAC,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B,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC;IAC3I,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,MAAM,iBAAiB,GAAG,sBAAsB,CACrD,eAAe,EACf,OAAO,EACP,CAAC,GAAG,EAAE,EAAE,CAAC,kCAAkC,CAAC,OAAO,CAAC,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EACxF,CAAC,YAAY,EAAE,QAAQ,CAAC,CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure.d.ts","sources":["../../../src/runtimes/grok/failure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAgC,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"failure.d.ts","sources":["../../../src/runtimes/grok/failure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAgC,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAsDjE,eAAO,MAAM,kBAAkB,EAAE,gBAYhC,CAAC;AAEF,uGAAuG;AACvG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,WAAW,CAQnE"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { acpErrorReason, rpcErrorCode } from "../../shared/acp/failure.js";
|
|
2
|
+
import { failureFromErrorCode, failureFromStatus } from "../../shared/failure-class.js";
|
|
2
3
|
import { asRecord } from "../../shared/json.js";
|
|
3
4
|
/*
|
|
4
5
|
* A prompt grok answered with an error (docs/spec/runtime-matrix.md#opencode-kimi-grok-antigravity-acp),
|
|
5
|
-
* observed on 1.0.46 against a scripted provider: -32003 "Rate
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* is the `error_type` of the `retry_state`
|
|
6
|
+
* observed on 1.0.46 and 1.0.77 against a scripted provider: -32003 "Rate
|
|
7
|
+
* limited" for every HTTP 429, its `data` the provider's words as
|
|
8
|
+
* `API error (status 429 …): <error type>: <message>`; otherwise -32603
|
|
9
|
+
* "Internal error", whose cause is the `error_type` of the `retry_state`
|
|
10
|
+
* update that ended grok's retries, and whose `data.http_status` is the
|
|
11
|
+
* provider's status for an API error (sampling/error.rs
|
|
12
|
+
* `map_sampling_err_to_acp`, `error_data_with_status`).
|
|
9
13
|
*/
|
|
10
14
|
const RATE_LIMITED = -32_003;
|
|
15
|
+
/** Grok's own code for an exhausted free allowance on a 429 (sampling/error.rs `FREE_USAGE_EXHAUSTED_ERROR_CODE`). */
|
|
16
|
+
const FREE_USAGE_EXHAUSTED = "subscription:free-usage-exhausted";
|
|
11
17
|
const ERROR_TYPES = {
|
|
12
18
|
auth: "auth",
|
|
13
19
|
rate_limited: "rate_limited",
|
|
@@ -24,14 +30,37 @@ function finalRetryState(frames) {
|
|
|
24
30
|
}
|
|
25
31
|
return null;
|
|
26
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A 429 is throttling unless the provider named a spending limit: Grok's
|
|
35
|
+
* free-usage code, or an error type the shared table calls `quota` or
|
|
36
|
+
* `billing` (`insufficient_quota`, 1.0.77). The type is the word after
|
|
37
|
+
* Grok's `API error (status …): ` prefix.
|
|
38
|
+
*/
|
|
39
|
+
function limitFailure(detail) {
|
|
40
|
+
if (detail.includes(FREE_USAGE_EXHAUSTED)) {
|
|
41
|
+
return "quota";
|
|
42
|
+
}
|
|
43
|
+
const type = /API error \(status [^)]*\): ([\w.-]+):/u.exec(detail)?.[1];
|
|
44
|
+
const named = type === undefined ? null : failureFromErrorCode(type);
|
|
45
|
+
return named === "quota" || named === "billing" ? named : "rate_limited";
|
|
46
|
+
}
|
|
47
|
+
/** The provider's HTTP status Grok put on an API error's `data` (-32603 only). */
|
|
48
|
+
function httpStatus(error) {
|
|
49
|
+
const status = asRecord(error instanceof Error && "data" in error ? error.data : undefined)?.http_status;
|
|
50
|
+
return typeof status === "number" && Number.isInteger(status) ? status : null;
|
|
51
|
+
}
|
|
27
52
|
export const grokFailureOutcome = (error, frames) => {
|
|
28
53
|
const reason = acpErrorReason(error);
|
|
29
54
|
if (rpcErrorCode(error) === RATE_LIMITED) {
|
|
30
|
-
return { kind: "failed", reason, failure:
|
|
55
|
+
return { kind: "failed", reason, failure: limitFailure(reason), status: 429 };
|
|
31
56
|
}
|
|
32
57
|
const update = finalRetryState(frames);
|
|
33
58
|
const named = typeof update?.error_type === "string" ? ERROR_TYPES[update.error_type] : undefined;
|
|
34
|
-
|
|
59
|
+
// Grok's `api` is any API error; the status it kept says which (402: billing).
|
|
60
|
+
const status = httpStatus(error);
|
|
61
|
+
const byStatus = status === null ? "unknown" : failureFromStatus(status);
|
|
62
|
+
const failure = (named === undefined || named === "provider") && byStatus !== "unknown" ? byStatus : named;
|
|
63
|
+
return failure === undefined ? null : { kind: "failed", reason, failure, ...(status === null ? {} : { status }) };
|
|
35
64
|
};
|
|
36
65
|
/** Grok validates its schema and reports either a value or a typed error field, even with end_turn. */
|
|
37
66
|
export function grokPromptOutcome(response) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"failure.js","sources":["../../../src/runtimes/grok/failure.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAyB,MAAM,6BAA6B,CAAC;AAClG,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAEjE
|
|
1
|
+
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import type { AcpNativeTurns } from "../../shared/acp/profile.js";
|
|
2
|
+
/**
|
|
3
|
+
* Grok runs turns OAR never prompted: a finished sub-agent wakes its parent
|
|
4
|
+
* (`subagent-completed-*`), an interjection that missed its turn runs on its
|
|
5
|
+
* own (`interject-fallback-*`), and more (grok-build 2bdd1d6: `bash-completed-*`,
|
|
6
|
+
* `goal-summary-*`, ...). Grok takes the client's `_meta.promptId` verbatim
|
|
7
|
+
* (acp_agent.rs `prompt`), so OAR names its own prompts and every other name is
|
|
8
|
+
* Grok's. Its `_x.ai/queue/changed` lists held prompt ids and the running one
|
|
9
|
+
* (`runningPromptId`); its `turn_completed` closes a turn by `prompt_id`
|
|
10
|
+
* (live 1.0.77: experiments/grok-interject/README.md).
|
|
11
|
+
*/
|
|
12
|
+
export declare const grokNativeTurns: AcpNativeTurns;
|
|
13
|
+
//# sourceMappingURL=native-turns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-turns.d.ts","sources":["../../../src/runtimes/grok/native-turns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,cAoB7B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { classifyFailure } from "../../shared/failure-class.js";
|
|
2
|
+
import { asRecord } from "../../shared/json.js";
|
|
3
|
+
/**
|
|
4
|
+
* Grok runs turns OAR never prompted: a finished sub-agent wakes its parent
|
|
5
|
+
* (`subagent-completed-*`), an interjection that missed its turn runs on its
|
|
6
|
+
* own (`interject-fallback-*`), and more (grok-build 2bdd1d6: `bash-completed-*`,
|
|
7
|
+
* `goal-summary-*`, ...). Grok takes the client's `_meta.promptId` verbatim
|
|
8
|
+
* (acp_agent.rs `prompt`), so OAR names its own prompts and every other name is
|
|
9
|
+
* Grok's. Its `_x.ai/queue/changed` lists held prompt ids and the running one
|
|
10
|
+
* (`runningPromptId`); its `turn_completed` closes a turn by `prompt_id`
|
|
11
|
+
* (live 1.0.77: experiments/grok-interject/README.md).
|
|
12
|
+
*/
|
|
13
|
+
export const grokNativeTurns = {
|
|
14
|
+
promptMeta: (promptId) => ({ promptId }),
|
|
15
|
+
read(method, params) {
|
|
16
|
+
if (method === "_x.ai/queue/changed") {
|
|
17
|
+
const entries = Array.isArray(params.entries) ? params.entries : [];
|
|
18
|
+
const queued = entries.flatMap((entry) => {
|
|
19
|
+
const id = asRecord(entry)?.id;
|
|
20
|
+
return typeof id === "string" && id !== "" ? [id] : [];
|
|
21
|
+
});
|
|
22
|
+
const running = typeof params.runningPromptId === "string" && params.runningPromptId !== "" ? params.runningPromptId : null;
|
|
23
|
+
return { kind: "queue", running, queued };
|
|
24
|
+
}
|
|
25
|
+
if (method !== "_x.ai/session_notification") {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const update = asRecord(params.update);
|
|
29
|
+
if (update?.sessionUpdate !== "turn_completed" || typeof update.prompt_id !== "string" || update.prompt_id === "") {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
// A later wake of the same child reuses its prompt id; the native event id tells the reports apart.
|
|
33
|
+
// oxlint-disable-next-line eslint/no-underscore-dangle -- Native ACP extension envelope.
|
|
34
|
+
const key = asRecord(params._meta)?.eventId;
|
|
35
|
+
return { kind: "ended", promptId: update.prompt_id, outcome: grokTurnOutcome(update), ...(typeof key === "string" && key !== "" ? { key } : {}) };
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
/** `stop_reason`: the model's (`end_turn`, ...), `cancelled`, or `error` with the message in `agent_result` (turn_completion.rs). */
|
|
39
|
+
function grokTurnOutcome(update) {
|
|
40
|
+
if (update.stop_reason === "cancelled") {
|
|
41
|
+
return { kind: "aborted" };
|
|
42
|
+
}
|
|
43
|
+
if (update.stop_reason === "error") {
|
|
44
|
+
const reason = typeof update.agent_result === "string" && update.agent_result !== "" ? update.agent_result : "Grok reported an error";
|
|
45
|
+
return { kind: "failed", reason, failure: classifyFailure(reason) };
|
|
46
|
+
}
|
|
47
|
+
return { kind: "completed" };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=native-turns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-turns.js","sources":["../../../src/runtimes/grok/native-turns.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,eAAe,GAAmB;IAC7C,UAAU,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;IACxC,IAAI,CAAC,MAAM,EAAE,MAAM;QACjB,IAAI,MAAM,KAAK,qBAAqB,EAAE,CAAC;YACrC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACpE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,KAAc,EAAE,EAAE;gBAChD,MAAM,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;gBAC/B,OAAO,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACzD,CAAC,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,OAAO,MAAM,CAAC,eAAe,KAAK,QAAQ,IAAI,MAAM,CAAC,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5H,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;Q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,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sources":["../../../src/runtimes/grok/session.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sources":["../../../src/runtimes/grok/session.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAc3E,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAQhF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,UAAU,CAYtE;AAYD,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAc1E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,UAAU,GAAG,WAAW,GAAG,IAAI,CAUzE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAoBzD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,iBA6C5B,CAAC;AAEF,eAAO,MAAM,WAAW,mDAA6B,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { asNumber, asRecord } from "../../shared/json.js";
|
|
|
9
9
|
import { cacheParts, reasoningPart } from "../../shared/token-totals.js";
|
|
10
10
|
import { grokFailureOutcome, grokPromptOutcome } from "./failure.js";
|
|
11
11
|
import { grokSpontaneousTokens } from "./spontaneous-usage.js";
|
|
12
|
+
import { grokNativeTurns } from "./native-turns.js";
|
|
12
13
|
import { redactGrokNotification } from "../../shared/credential-redaction.js";
|
|
13
14
|
function authMethodIds(initialized) {
|
|
14
15
|
return (Array.isArray(initialized.authMethods) ? initialized.authMethods : [])
|
|
@@ -128,6 +129,8 @@ export const GROK_EXTENSION_NOTIFICATIONS = [
|
|
|
128
129
|
"_x.ai/mcp/init_progress",
|
|
129
130
|
"_x.ai/mcp/server_status",
|
|
130
131
|
"_x.ai/mcp_initialized",
|
|
132
|
+
// live 1.0.77: the echo of an accepted `_x.ai/interject` (experiments/grok-interject)
|
|
133
|
+
"_x.ai/session/interjection",
|
|
131
134
|
// [sym] only
|
|
132
135
|
"_x.ai/session/update",
|
|
133
136
|
"_x.ai/task_backgrounded",
|
|
@@ -165,12 +168,15 @@ export const grokAcpProfile = {
|
|
|
165
168
|
},
|
|
166
169
|
sessionMeta: () => ({ yoloMode: true }),
|
|
167
170
|
selectAuthMethod: selectGrokAuthMethod,
|
|
168
|
-
// `
|
|
169
|
-
// `
|
|
170
|
-
//
|
|
171
|
-
//
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
// `_x.ai/interject` adds the input to the running turn without cancelling
|
|
172
|
+
// it: Grok answers `queued` at once and the turn takes it at its next safe
|
|
173
|
+
// point; one that misses the turn runs as Grok's own (live 1.0.77,
|
|
174
|
+
// experiments/grok-interject). `_meta.sendNow` would cancel the turn instead.
|
|
175
|
+
steerRequest: ({ sessionId, input, prompt, inputId }) => ({
|
|
176
|
+
method: "_x.ai/interject",
|
|
177
|
+
params: { sessionId, text: input, interjectionId: inputId, ...(prompt.some((block) => block.type === "image") ? { content: prompt } : {}) },
|
|
178
|
+
}),
|
|
179
|
+
nativeTurns: grokNativeTurns,
|
|
174
180
|
promptMeta: (options) => options.outputSchema === undefined ? undefined : { outputSchema: options.outputSchema },
|
|
175
181
|
promptOutcome: grokPromptOutcome,
|
|
176
182
|
promptContextUsage: grokContextUsage,
|