car-runtime 0.54.0 → 0.55.0-nightly.20260920

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 CHANGED
@@ -21,6 +21,29 @@ Both the `.node` module **and** the `car-server` daemon binary are
21
21
  included. Supported platforms: macOS (14+) arm64/x64, Linux
22
22
  x64/arm64 glibc, Windows x64.
23
23
 
24
+ ## Daemon/package compatibility
25
+
26
+ The npm package and the daemon use a versioned JSON-RPC wire protocol. Read
27
+ `carProtocolVersion` from `car-runtime/package.json` when compatibility must be
28
+ checked before the native module loads; `protocolVersion()` returns the same
29
+ number at runtime:
30
+
31
+ ```javascript
32
+ const pkg = require('car-runtime/package.json');
33
+ const { protocolVersion } = require('car-runtime');
34
+
35
+ if (protocolVersion() !== pkg.carProtocolVersion) {
36
+ throw new Error('car-runtime package metadata does not match its native binding');
37
+ }
38
+ ```
39
+
40
+ The daemon handshake fails closed and names both wire versions when the client
41
+ and daemon are incompatible. `CarHost.app` can update its bundled daemon
42
+ independently of project dependencies, so update this package in the project
43
+ that loads it; while CAR is pre-1.0, pinning the package to the daemon's CAR
44
+ release is the safest choice (`npm install car-runtime@<version>`). A caret
45
+ range does not cross a `0.x` minor release.
46
+
24
47
  ## Call the daemon
25
48
 
26
49
  `CarRuntime` connects lazily. Params and results are JSON strings; generated typed
@@ -112,13 +135,18 @@ main({
112
135
  });
113
136
  ```
114
137
 
115
- `runAgent(config, goal)` is also exported for embedding and tests. `main(config)`
116
- provides `--task`, `--json`, and `--serve`. The loop adds `finish`, statically
117
- verifies every proposal before execution, preserves tool-call/result IDs,
118
- honors per-schema `timeoutMs`, traces task and chat runs, and uses request-shaped
119
- inference with prompt-cache breakpoints. It loads the native binding only when a
120
- loop runs, so `require('car-runtime/agent-loop')` is safe for package discovery.
121
- Type declarations ship as `agent-loop.d.ts` and shared config/outcome types in
138
+ `runAgent(config, goal)` is also exported for embedding and tests. Its
139
+ `AgentOutcome.run_id` is the durable key accepted by `runsGetTrace`; it is
140
+ `null` when an older daemon has no `runs.*` surface or did not acknowledge the
141
+ start. `runChatTurn` keeps returning bare text by default; pass
142
+ `{ includeRunId: true }` as its final options argument to receive
143
+ `{ text, run_id }`. `main(config)` provides `--task`, `--json`, and `--serve`.
144
+ The loop adds `finish`, statically verifies every proposal before execution,
145
+ preserves tool-call/result IDs, honors per-schema `timeoutMs`, traces task and
146
+ chat runs, and uses request-shaped inference with prompt-cache breakpoints. It
147
+ loads the native binding only when a loop runs, so
148
+ `require('car-runtime/agent-loop')` is safe for package discovery. Type
149
+ declarations ship as `agent-loop.d.ts` and shared config/outcome types in
122
150
  `index.d.ts`.
123
151
 
124
152
  Full API reference lives in [`index.d.ts`](./index.d.ts). The package also
package/agent-loop.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import type {
2
+ AgentChatTurnOptions,
3
+ AgentChatTurnResult,
2
4
  AgentLoopConfig,
3
5
  AgentLoopOptions,
4
6
  AgentOutcome,
@@ -13,6 +15,18 @@ export function runAgent(
13
15
  options?: AgentLoopOptions,
14
16
  ): Promise<AgentOutcome>;
15
17
 
18
+ export function runChatTurn(
19
+ runtime: CarRuntime,
20
+ config: AgentLoopConfig,
21
+ toolSchemas: AgentToolSchema[],
22
+ tools: Record<string, AgentTool>,
23
+ toolTimeouts: Record<string, number>,
24
+ sessionId: string,
25
+ messages: Record<string, unknown>[],
26
+ requestedModel: string | null | undefined,
27
+ options: AgentChatTurnOptions & { includeRunId: true },
28
+ ): Promise<AgentChatTurnResult>;
29
+
16
30
  export function runChatTurn(
17
31
  runtime: CarRuntime,
18
32
  config: AgentLoopConfig,
@@ -22,6 +36,7 @@ export function runChatTurn(
22
36
  sessionId: string,
23
37
  messages: Record<string, unknown>[],
24
38
  requestedModel?: string | null,
39
+ options?: AgentChatTurnOptions & { includeRunId?: false },
25
40
  ): Promise<string>;
26
41
 
27
42
  export function main(config: AgentLoopConfig): Promise<void>;
package/agent-loop.js CHANGED
@@ -157,7 +157,7 @@ async function inferTurn(rt, { model, maxTokens, toolSchemas, messages, toolChoi
157
157
 
158
158
  /**
159
159
  * Run the agent once toward `goal`. Returns an AgentOutcome-shaped object:
160
- * { status, summary, evidence[], metrics{}, tools_called[] }
160
+ * { status, summary, evidence[], metrics{}, tools_called[], run_id }
161
161
  * `status` is one of the six OutcomeStatus values (success|partial_success|
162
162
  * done|give_up|timeout|failure). AgentOutcome is caller-built — CAR does not
163
163
  * return it; we assemble it from what the loop observed.
@@ -166,7 +166,7 @@ async function inferTurn(rt, { model, maxTokens, toolSchemas, messages, toolChoi
166
166
  * proposal we bracket the run open with `rt.runsStart` (daemon mints a durable
167
167
  * `run_id`); after the terminal AgentOutcome is assembled we close it with
168
168
  * `rt.runsComplete`. Both are best-effort and never print, so the daemon traces
169
- * the run for CarHost while older daemons (no runs.*) behave exactly as before.
169
+ * the run for CarHost while older daemons report `run_id: null` and still run.
170
170
  */
171
171
  async function runAgent(config, goal, { maxTurns } = {}) {
172
172
  const { CarRuntime, executeProposal } = runtimeApi();
@@ -198,7 +198,7 @@ async function runAgent(config, goal, { maxTurns } = {}) {
198
198
  // CAR_AGENT_ID (the supervisor injects it) when supervised, else falls back to
199
199
  // config.agentName for the unsupervised one-shot / run_scenarios path.
200
200
  // Best-effort, exactly like registerAgentBasics: a daemon without runs.* (an
201
- // older build) makes this throw, and the run must continue unchanged. NEVER
201
+ // older build) makes this throw, and the run must continue with a null id. NEVER
202
202
  // print here — the last stdout line in --json mode must stay the AgentOutcome
203
203
  // (run_scenarios.py parses it).
204
204
  let runId = null;
@@ -209,7 +209,9 @@ async function runAgent(config, goal, { maxTurns } = {}) {
209
209
  agent_name: config.agentName,
210
210
  outcome_description: config.targetOutcome ?? '',
211
211
  })));
212
- runId = started.run_id ?? null;
212
+ runId = typeof started.run_id === 'string' && started.run_id.length > 0
213
+ ? started.run_id
214
+ : null;
213
215
  } catch { /* daemon lacks runs.* — degrade to untraced behavior */ }
214
216
 
215
217
  // Local Qwen3 models default to "thinking" (they emit a long <think> block
@@ -329,13 +331,17 @@ async function runAgent(config, goal, { maxTurns } = {}) {
329
331
  // before returning (the connection may close right after) so a healthy run is
330
332
  // never raced into `Incomplete`. Best-effort + never prints, mirroring the
331
333
  // open bracket: an older daemon without runs.* (or one that never acked the
332
- // start, leaving runId null) just skips this and behaves as before.
334
+ // start, leaving runId null) just skips completion and returns the null id.
333
335
  if (runId !== null) {
334
336
  try {
335
337
  await rt.runsComplete(JSON.stringify({ run_id: runId, outcome }));
336
338
  } catch { /* daemon lacks runs.* — nothing to report to */ }
337
339
  }
338
340
 
341
+ // `run_id` is package return metadata, not part of the daemon's car-ir
342
+ // AgentOutcome. Add it only after runs.complete so the wire shape stays
343
+ // unchanged. Null reports an older daemon or unacknowledged runs.start.
344
+ outcome.run_id = runId;
339
345
  return outcome;
340
346
  }
341
347
 
@@ -371,9 +377,15 @@ function parseArgs(argv) {
371
377
  // declared policies still gate tool execution, so guardrails (draft-only, etc.)
372
378
  // carry into the conversation.
373
379
 
374
- /** Run one chat turn against a persistent `messages` thread; stream via chatEvent. */
380
+ /**
381
+ * Run one chat turn against a persistent `messages` thread; stream via
382
+ * chatEvent. The default return stays the historical bare string. Callers that
383
+ * need to inspect the durable trace opt into `{ includeRunId: true }` and get
384
+ * `{ text, run_id }` instead.
385
+ */
375
386
  async function runChatTurn(
376
387
  rt, config, toolSchemas, tools, toolTimeouts, sessionId, messages, requestedModel = null,
388
+ options = {},
377
389
  ) {
378
390
  const { executeProposal } = runtimeApi();
379
391
  const turnsCap = config.maxTurns ?? 8;
@@ -399,7 +411,9 @@ async function runChatTurn(
399
411
  agent_name: config.agentName,
400
412
  outcome_description: config.targetOutcome ?? '',
401
413
  })));
402
- runId = started.run_id ?? null;
414
+ runId = typeof started.run_id === 'string' && started.run_id.length > 0
415
+ ? started.run_id
416
+ : null;
403
417
  } catch { /* daemon lacks runs.* — degrade to untraced behavior */ }
404
418
 
405
419
  const metrics = { turns: 0, tool_calls: 0, actions_succeeded: 0, actions_failed: 0 };
@@ -462,20 +476,20 @@ async function runChatTurn(
462
476
  // Run-trace bracket (close). The outcome is assembled exactly as `runAgent`
463
477
  // assembles it, so a chat-driven run and a --task run are the same shape in
464
478
  // the trace and a host reads one code path, not two.
479
+ const outcome = terminal === 'success'
480
+ ? mkOutcome('success', finalText,
481
+ [{ kind: 'tool_result', description: 'finish called', data: { answer: finalText } }], metrics, toolsCalled)
482
+ : (terminal === 'done'
483
+ ? mkOutcome('done', finalText || 'no further actions',
484
+ [{ kind: 'self_assessment', description: finalText || '', data: null }], metrics, toolsCalled)
485
+ : mkOutcome('timeout', `hit ${turnsCap}-turn cap without finishing`,
486
+ [{ kind: 'stop_reason', description: 'max turns', data: { turnsCap } }], metrics, toolsCalled));
465
487
  if (runId !== null) {
466
- const outcome = terminal === 'success'
467
- ? mkOutcome('success', finalText,
468
- [{ kind: 'tool_result', description: 'finish called', data: { answer: finalText } }], metrics, toolsCalled)
469
- : (terminal === 'done'
470
- ? mkOutcome('done', finalText || 'no further actions',
471
- [{ kind: 'self_assessment', description: finalText || '', data: null }], metrics, toolsCalled)
472
- : mkOutcome('timeout', `hit ${turnsCap}-turn cap without finishing`,
473
- [{ kind: 'stop_reason', description: 'max turns', data: { turnsCap } }], metrics, toolsCalled));
474
488
  try {
475
489
  await rt.runsComplete(JSON.stringify({ run_id: runId, outcome }));
476
490
  } catch { /* daemon lacks runs.* — nothing to report to */ }
477
491
  }
478
- return finalText;
492
+ return options?.includeRunId ? { text: finalText, run_id: runId } : finalText;
479
493
  }
480
494
 
481
495
  /** Set up the long-lived chat runtime: register tools/policies + the agent.chat handler. */
@@ -3954,6 +3954,84 @@ const DAEMON_WRAPPER_ROWS = Object.freeze([
3954
3954
  },
3955
3955
  "role": "operator"
3956
3956
  },
3957
+ {
3958
+ "javascript": {
3959
+ "generated": true,
3960
+ "name": "multiplayerGet"
3961
+ },
3962
+ "method": "multiplayer.get",
3963
+ "owner": "CarRuntime",
3964
+ "python": {
3965
+ "generated": true,
3966
+ "name": "multiplayer_get"
3967
+ },
3968
+ "role": "operator"
3969
+ },
3970
+ {
3971
+ "javascript": {
3972
+ "generated": true,
3973
+ "name": "multiplayerList"
3974
+ },
3975
+ "method": "multiplayer.list",
3976
+ "owner": "CarRuntime",
3977
+ "python": {
3978
+ "generated": true,
3979
+ "name": "multiplayer_list"
3980
+ },
3981
+ "role": "operator"
3982
+ },
3983
+ {
3984
+ "javascript": {
3985
+ "generated": true,
3986
+ "name": "multiplayerMergeCheck"
3987
+ },
3988
+ "method": "multiplayer.merge_check",
3989
+ "owner": "CarRuntime",
3990
+ "python": {
3991
+ "generated": true,
3992
+ "name": "multiplayer_merge_check"
3993
+ },
3994
+ "role": "operator"
3995
+ },
3996
+ {
3997
+ "javascript": {
3998
+ "generated": true,
3999
+ "name": "multiplayerPublish"
4000
+ },
4001
+ "method": "multiplayer.publish",
4002
+ "owner": "CarRuntime",
4003
+ "python": {
4004
+ "generated": true,
4005
+ "name": "multiplayer_publish"
4006
+ },
4007
+ "role": "operator"
4008
+ },
4009
+ {
4010
+ "javascript": {
4011
+ "generated": true,
4012
+ "name": "multiplayerStartStage"
4013
+ },
4014
+ "method": "multiplayer.start_stage",
4015
+ "owner": "CarRuntime",
4016
+ "python": {
4017
+ "generated": true,
4018
+ "name": "multiplayer_start_stage"
4019
+ },
4020
+ "role": "operator"
4021
+ },
4022
+ {
4023
+ "javascript": {
4024
+ "generated": true,
4025
+ "name": "multiplayerSubmitStage"
4026
+ },
4027
+ "method": "multiplayer.submit_stage",
4028
+ "owner": "CarRuntime",
4029
+ "python": {
4030
+ "generated": true,
4031
+ "name": "multiplayer_submit_stage"
4032
+ },
4033
+ "role": "operator"
4034
+ },
3957
4035
  {
3958
4036
  "javascript": {
3959
4037
  "generated": true,
@@ -4591,6 +4669,19 @@ const DAEMON_WRAPPER_ROWS = Object.freeze([
4591
4669
  },
4592
4670
  "role": "operator"
4593
4671
  },
4672
+ {
4673
+ "javascript": {
4674
+ "generated": true,
4675
+ "name": "scheduleSuggest"
4676
+ },
4677
+ "method": "schedule.suggest",
4678
+ "owner": "CarRuntime",
4679
+ "python": {
4680
+ "generated": true,
4681
+ "name": "schedule_suggest"
4682
+ },
4683
+ "role": "operator"
4684
+ },
4594
4685
  {
4595
4686
  "javascript": {
4596
4687
  "generated": true,
@@ -4851,6 +4942,19 @@ const DAEMON_WRAPPER_ROWS = Object.freeze([
4851
4942
  },
4852
4943
  "role": "operator"
4853
4944
  },
4945
+ {
4946
+ "javascript": {
4947
+ "generated": false,
4948
+ "name": "serverSchema"
4949
+ },
4950
+ "method": "server.schema",
4951
+ "owner": "CarRuntime",
4952
+ "python": {
4953
+ "generated": false,
4954
+ "name": "server_schema"
4955
+ },
4956
+ "role": "operator"
4957
+ },
4854
4958
  {
4855
4959
  "javascript": {
4856
4960
  "generated": true,
package/docs/CLI.md CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  > **Generated file — do not hand-edit below the task map.** Produced by
4
4
  > `scripts/gen-cli-docs.sh` from `car --help` / `car help <command>` on car
5
- > 0.54.0 (2026-09-15). Every subcommand the installed binary reports is
5
+ > 0.54.0 (2026-09-19). Every subcommand the installed binary reports is
6
6
  > below; a new subcommand cannot ship without appearing here the next time
7
7
  > this script runs. To regenerate: `bash scripts/gen-cli-docs.sh`.
8
8
  >
9
- > 73 top-level commands, 117 nested subcommands
9
+ > 74 top-level commands, 123 nested subcommands
10
10
  > (one level deep) — counted from the live binary at generation time, not
11
11
  > typed by hand.
12
12
 
13
13
  ## Finding your way around
14
14
 
15
- `car` is one binary with 73 subcommands spanning several different jobs:
15
+ `car` is one binary with 74 subcommands spanning several different jobs:
16
16
  running the built-in agent, coding, local model management, OS integrations,
17
17
  and installing other people's agents on your machine. This map groups the
18
18
  commands people actually reach for; the full alphabetical reference with every
@@ -37,11 +37,21 @@ flag follows below.
37
37
 
38
38
  ### Code
39
39
 
40
+ Run `car code` in a repository to open a conversation. Ask questions or describe
41
+ a change, then use `/build` to draft an editable task and review its checks.
42
+ `/help` shows controls, `/sessions` opens coding session history (`d` returns
43
+ to the conversation), and `/quit` exits. Running tasks survive closing the
44
+ terminal. Resume a saved discussion with `car code --resume <discussion-id>`
45
+ from the same repository; the exit summary prints its id. An explicit
46
+ task or execution flags such as `--engine` select the single-task flow.
47
+ Delivered revisions remain available as the base for follow-up conversation tasks.
48
+
40
49
  - [`car code`](#car-code) — built-in coding agent: state an intent, confirm
41
50
  the verifiable outcome contract, and CAR delivers it in an isolated git
42
- worktree (natively or via an installed frontier CLI). Results land on a
43
- `car/coder/<id>` branch after your approval; your checkout is never
44
- touched.
51
+ worktree (natively or via an installed frontier CLI). Apply reviewed results
52
+ to your checkout, preserving HEAD and the staged index, or explicitly request
53
+ `--delivery branch` to publish a result branch — which is also what `--yes`
54
+ defaults to, so an unattended run never writes into your checkout.
45
55
  - [`car code-task`](#car-code-task) — run a coder session headlessly and in
46
56
  this process, driving to a green outcome contract and delivering a PR.
47
57
  - [`car coder-ab`](#car-coder-ab) — A/B-test CAR's coder against an external
@@ -194,7 +204,7 @@ commands on a cadence via launchd / cron / schtasks).
194
204
  | [`car feedback`](#car-feedback) | Report a problem to Parslee. Captures a redacted diagnostic bundle (your description, the `car doctor` report, bounded log tails, and a version stamp) into the local outbox at `~/.car/feedback-outbox` — nothing is uploaded by this command; queued reports send when CAR can reach Parslee. Works with the daemon down, like `car doctor`. macOS-only in this release |
195
205
  | [`car update`](#car-update) | Update the locally-installed `car` CLI and its sibling `car-server` daemon to the latest release (or `--version <X.Y.Z>`), in place — regardless of how they were installed. Reconciles the drift that otherwise builds up when one channel updates and another doesn't (e.g. CarHost.app auto-updates its bundled daemon via Sparkle but leaves the `/usr/local/bin/car` CLI behind). The npm/PyPI `car-runtime` client packages are separate — this command never touches them; `car doctor` reports which of your agents have drifted, and prints the exact command per environment. Both remedies pin: `npm install car-runtime@<version>` (`npm update` CANNOT cross a 0.x minor — npm reads `^0.41.0` as `>=0.41.0 <0.42.0`, so it is a no-op) and `<venv>/bin/python -m pip install -U car-runtime==<version>` (a bare `-U` can be silently defeated by the consumer's own pin, and the wrong interpreter installs into an environment that does not hold the stale wheel) |
196
206
  | [`car purge`](#car-purge) | Remove this CAR install's own state under `~/.car` (config, logs, managed models, binaries) and reap any OS-level schedules CAR installed — for a clean slate before a reinstall. On macOS this also clears CarHost.app's user-level state and resets its privacy (TCC) permissions, so a reinstall really does re-run permission onboarding. NEVER touches the shared HuggingFace model cache (other tools use it); managed models are symlinks into it, so only the links are removed, not the multi-GB blobs. (To uninstall a single contributed agent instead, use `car uninstall <id>`.) |
197
- | [`car code`](#car-code) | Built-in coding agent: state an intent, confirm the verifiable outcome contract, and CAR delivers it in an isolated git worktree — natively or via an installed frontier CLI. Results land on a `car/coder/<id>` branch after your approval; your checkout is never touched |
207
+ | [`car code`](#car-code) | Built-in coding agent: state an intent, confirm the verifiable outcome contract, and CAR delivers it in an isolated git worktree — natively or via an installed frontier CLI. Review and apply results to your checkout, or publish a branch with --delivery branch (which is what --yes does by default — an unattended run never edits your checkout) |
198
208
  | [`car board`](#car-board) | Fullscreen supervision board for coder sessions — one screen for every run on this host, whoever started it (`car code`, CarHost, milo, another board). Attach to a run's full history, confirm its outcome contract, answer its questions, approve its diff, or scope work in a repo-grounded discussion first. Closing the board never stops a run |
199
209
  | [`car do`](#car-do) | CAR Assistant: a general-purpose agent that works out of the box |
200
210
  | [`car policy-check-hook`](#car-policy-check-hook) | Evaluate a host's proposed tool call against `.car/policies/` and answer on stdout with that host's hook decision envelope |
@@ -233,6 +243,7 @@ commands on a cadence via launchd / cron / schtasks).
233
243
  | [`car schedule`](#car-schedule) | Schedule commands to run on a cadence (launchd / cron / schtasks) |
234
244
  | [`car registry`](#car-registry) | Registry tooling for the contributed-agents registry (Parslee-ai/car#182 phase 5): `digest` a manifest, or `validate` a registry directory (the CI gate run by Parslee-ai/car-agent-registry) |
235
245
  | [`car fleet`](#car-fleet) | What every CAR instance you can reach can do — agents, capabilities and models across the fleet — and whether this machine takes coding subtasks farmed out by peers (`car fleet enroll`). Needs a running daemon |
246
+ | [`car mp`](#car-mp) | Multiplayer development: a work item moves Build → Improve → Polish through different developers before it merges, each stage a coder session on its owner's machine with the engine they choose. Needs a running daemon and a shared git remote |
236
247
  | [`car publish`](#car-publish) | Publish a contributed agent to the registry (Parslee-ai/car#182 phase 5). Reads a local agent's `manifest.toml`, signs it for `--audience public` (ed25519 key at `$CAR_PUBLISH_KEY_PATH`), stages it at the versioned `agents/<namespace>/<name>/<version>/` path, updates `index.json` + the README catalog, re-runs the EXACT `car registry validate` CI gate locally, and opens a PR against the registry repo. Aborts (no PR) on a missing signing key or a validation failure |
237
248
  | [`car help`](#car-help) | Print this message or the help of the given subcommand(s) |
238
249
 
@@ -1572,16 +1583,22 @@ Options:
1572
1583
 
1573
1584
  ```text
1574
1585
  Built-in coding agent: state an intent, confirm the verifiable outcome contract, and CAR delivers it
1575
- in an isolated git worktree — natively or via an installed frontier CLI. Results land on a
1576
- `car/coder/<id>` branch after your approval; your checkout is never touched
1586
+ in an isolated git worktree — natively or via an installed frontier CLI. Review and apply results to
1587
+ your checkout, or publish a branch with --delivery branch (which is what --yes does by default — an
1588
+ unattended run never edits your checkout)
1577
1589
 
1578
1590
  Usage: car code [OPTIONS] [INTENT]...
1579
1591
 
1580
1592
  Arguments:
1581
1593
  [INTENT]...
1582
- What to build or fix, in plain English
1594
+ What to build or fix. With no task, opens a repository conversation in an interactive
1595
+ terminal. --model also works in this mode; other execution flags select the single-task
1596
+ workflow
1583
1597
 
1584
1598
  Options:
1599
+ --resume <RESUME>
1600
+ Resume a saved repository conversation by its displayed id
1601
+
1585
1602
  --repo <REPO>
1586
1603
  Repository to work on. Relative paths (`.`, `../sibling`) resolve against your current
1587
1604
  directory (default: `.`)
@@ -1604,16 +1621,26 @@ Options:
1604
1621
  Restrict a distributed run to these instances. Repeatable; default is every instance that
1605
1622
  can serve this repository
1606
1623
 
1624
+ --delivery <DELIVERY>
1625
+ Deliver reviewed edits to your checkout (the default when you are there to answer the
1626
+ prompt), or explicitly publish a branch. With `--yes` the default is `branch`: an
1627
+ unattended run never writes into your checkout unless you ask for it with `--delivery
1628
+ checkout`
1629
+
1630
+ [possible values: checkout, branch]
1631
+
1607
1632
  -y, --yes
1608
- Skip the interactive contract and merge prompts
1633
+ Skip the interactive contract and delivery prompts. Delivery then defaults to publishing a
1634
+ branch; pass `--delivery checkout` to apply the result to your checkout unattended
1609
1635
 
1610
1636
  --max-iterations <MAX_ITERATIONS>
1611
1637
  Max plan→edit→verify iterations before giving up
1612
1638
 
1613
1639
  --model <MODEL>
1614
- Pin the native loop's inference model for this session (e.g. `parslee/reasoning` for
1615
- gpt-5.5), overriding `~/.car/coder.toml`. Blank/omitted keeps the config default, then
1616
- adaptive routing
1640
+ Choose a model (see `car models list`). In a conversation, saves the choice for replies
1641
+ and new native tasks; --resume restores it unless overridden here. Use `auto` to clear a
1642
+ conversation's saved choice. For a single task, pins native planning, check revision, and
1643
+ execution, overriding `~/.car/coder.toml`; omitted keeps the configured default
1617
1644
 
1618
1645
  --browser
1619
1646
  Expose the assistant's browser tools to this coder session. Off by default; calls remain
@@ -1669,7 +1696,13 @@ Options:
1669
1696
  Working directory (default: current directory)
1670
1697
 
1671
1698
  --model <MODEL>
1672
- Inference model id (default: a tool-capable model chosen for you)
1699
+ Inference model id. The default is `parslee/advisor`: the out-of-the-box agent runs on
1700
+ Parslee inference through your Parslee account (`car auth login`), and that default is
1701
+ never swapped for another model — signed out, a turn asks you to sign in instead of
1702
+ quietly running somewhere else. Naming a model here (or setting CAR_DO_MODEL) is an
1703
+ explicit choice and restores the adaptive behaviour for it, including the on-device last
1704
+ resort — except when the Parslee account has no workspace yet, which ends the chain rather
1705
+ than falling back, because no model on that account can serve
1673
1706
 
1674
1707
  --image <IMAGE>
1675
1708
  Docker image for the sandbox (default: python:3.11, which bundles git/gcc/curl). Ignored
@@ -1734,7 +1767,8 @@ Options:
1734
1767
  a usable tool-capable model when the named one is unavailable here (and says so); with it
1735
1768
  a substitution is a startup error, and the inference layer will not fall back to an
1736
1769
  on-device model on a remote failure either. Off by default: the substitution is the right
1737
- call for an interactive run
1770
+ call for an interactive run. This flag only affects a model you name — the out-of-the-box
1771
+ default is strict on its own and is never substituted
1738
1772
 
1739
1773
  --context-window <TOKENS>
1740
1774
  Bound the running conversation to this many tokens instead of the model's registry window
@@ -1893,7 +1927,8 @@ Options:
1893
1927
  Describe an agent in plain language; CAR builds, verifies, and registers it to run in-daemon.
1894
1928
 
1895
1929
  CAR uses the complete description to generate the agent's identity, standing goal, and scenarios.
1896
- Long descriptions get a bounded project directory name without truncating that build input.
1930
+ Long descriptions get an at-most-64-character project id containing only lowercase ASCII letters,
1931
+ digits, and hyphens, without truncating that build input.
1897
1932
 
1898
1933
  The project's agent.json is committed build output. After approval, the daemon runs the separately
1899
1934
  registered copy in declagents.json; editing agent.json alone does not update the active agent.
@@ -2747,7 +2782,7 @@ Options:
2747
2782
  --accounts <ACCOUNTS>
2748
2783
  --mailbox <MAILBOX> Mailbox selector — a `full_name` from `car mail mailboxes`, or a bare
2749
2784
  leaf name like "Travel". Defaults to INBOX
2750
- --limit <LIMIT> [default: 50]
2785
+ --limit <LIMIT> Number of rows to return (maximum 500) [default: 50]
2751
2786
  --since <SINCE> Only messages received at or after this RFC3339 instant
2752
2787
  --include-body Include each message's body inline (bounded per message)
2753
2788
  -h, --help Print help
@@ -2829,7 +2864,7 @@ Usage: car messages read [OPTIONS]
2829
2864
  Options:
2830
2865
  --chats <CHATS> Optional comma-separated chat GUIDs from `car messages chats`
2831
2866
  --since <SINCE> Only messages at or after this RFC3339 instant
2832
- --limit <LIMIT> [default: 50]
2867
+ --limit <LIMIT> Number of rows to return (maximum 500) [default: 50]
2833
2868
  --include-body Include decoded message bodies inline (bounded per message)
2834
2869
  -h, --help Print help
2835
2870
  ```
@@ -3559,6 +3594,138 @@ Options:
3559
3594
  Print help (see a summary with '-h')
3560
3595
  ```
3561
3596
 
3597
+ ### car mp
3598
+
3599
+ ```text
3600
+ Multiplayer development: a work item moves Build → Improve → Polish through different developers
3601
+ before it merges, each stage a coder session on its owner's machine with the engine they choose.
3602
+ Needs a running daemon and a shared git remote
3603
+
3604
+ Usage: car mp <COMMAND>
3605
+
3606
+ Commands:
3607
+ list Work items on the shared remote, and whether you can take the next stage of each (you may
3608
+ own at most one stage per item)
3609
+ show One work item's full record
3610
+ take Start the item's next stage: a coder session at the item's tip. Then confirm the item's
3611
+ locked contract (adding checks later is fine) and work it like any coder session, e.g. in `car
3612
+ board`
3613
+ publish Publish a finished coder session as a stage: an approved diff, or an accepted no-change
3614
+ finding. Without --item this publishes a Build and creates the work item
3615
+ submit Submit a stage you did outside CAR (for example in Claude Code or Codex). CAR runs the
3616
+ item's contract on the commit itself, without credentials, before recording it
3617
+ check Re-verify an item end to end and, if it holds, create `car/mp/<id>-final` for a pull
3618
+ request. Runs the item's contract here
3619
+ help Print this message or the help of the given subcommand(s)
3620
+
3621
+ Options:
3622
+ -h, --help Print help
3623
+ ```
3624
+
3625
+ #### car mp list
3626
+
3627
+ ```text
3628
+ Work items on the shared remote, and whether you can take the next stage of each (you may own at
3629
+ most one stage per item)
3630
+
3631
+ Usage: car mp list [OPTIONS]
3632
+
3633
+ Options:
3634
+ --repo <REPO> The repository (a clone of the shared remote) [default: .]
3635
+ --remote <REMOTE> The shared remote [default: origin]
3636
+ --json
3637
+ -h, --help Print help
3638
+ ```
3639
+
3640
+ #### car mp show
3641
+
3642
+ ```text
3643
+ One work item's full record
3644
+
3645
+ Usage: car mp show [OPTIONS] <ITEM>
3646
+
3647
+ Arguments:
3648
+ <ITEM>
3649
+
3650
+ Options:
3651
+ --repo <REPO> [default: .]
3652
+ --remote <REMOTE> [default: origin]
3653
+ -h, --help Print help
3654
+ ```
3655
+
3656
+ #### car mp take
3657
+
3658
+ ```text
3659
+ Start the item's next stage: a coder session at the item's tip. Then confirm the item's locked
3660
+ contract (adding checks later is fine) and work it like any coder session, e.g. in `car board`
3661
+
3662
+ Usage: car mp take [OPTIONS] <ITEM>
3663
+
3664
+ Arguments:
3665
+ <ITEM>
3666
+
3667
+ Options:
3668
+ --repo <REPO> [default: .]
3669
+ --remote <REMOTE> [default: origin]
3670
+ --engine <ENGINE> `auto`, `native`, `external:<agent>` (e.g. `external:claude-code`), or
3671
+ `foreman:<agent>`
3672
+ --model <MODEL>
3673
+ --yes Confirm the locked contract without asking
3674
+ -h, --help Print help
3675
+ ```
3676
+
3677
+ #### car mp publish
3678
+
3679
+ ```text
3680
+ Publish a finished coder session as a stage: an approved diff, or an accepted no-change finding.
3681
+ Without --item this publishes a Build and creates the work item
3682
+
3683
+ Usage: car mp publish [OPTIONS] <SESSION_ID>
3684
+
3685
+ Arguments:
3686
+ <SESSION_ID>
3687
+
3688
+ Options:
3689
+ --item <ITEM>
3690
+ --remote <REMOTE> [default: origin]
3691
+ -h, --help Print help
3692
+ ```
3693
+
3694
+ #### car mp submit
3695
+
3696
+ ```text
3697
+ Submit a stage you did outside CAR (for example in Claude Code or Codex). CAR runs the item's
3698
+ contract on the commit itself, without credentials, before recording it
3699
+
3700
+ Usage: car mp submit [OPTIONS] <ITEM>
3701
+
3702
+ Arguments:
3703
+ <ITEM>
3704
+
3705
+ Options:
3706
+ --commit <COMMIT> The stage's work: a commit descending from the item's tip [default: HEAD]
3707
+ --repo <REPO> [default: .]
3708
+ --remote <REMOTE> [default: origin]
3709
+ -h, --help Print help
3710
+ ```
3711
+
3712
+ #### car mp check
3713
+
3714
+ ```text
3715
+ Re-verify an item end to end and, if it holds, create `car/mp/<id>-final` for a pull request. Runs
3716
+ the item's contract here
3717
+
3718
+ Usage: car mp check [OPTIONS] <ITEM>
3719
+
3720
+ Arguments:
3721
+ <ITEM>
3722
+
3723
+ Options:
3724
+ --repo <REPO> [default: .]
3725
+ --remote <REMOTE> [default: origin]
3726
+ -h, --help Print help
3727
+ ```
3728
+
3562
3729
  ### car publish
3563
3730
 
3564
3731
  ```text
package/index.d.ts CHANGED
@@ -54,6 +54,8 @@ export type AgentOutcomeStatus =
54
54
  | 'success' | 'partial_success' | 'done' | 'give_up' | 'timeout' | 'failure';
55
55
 
56
56
  export interface AgentOutcome {
57
+ /** Durable trace key, or null when runs.start was unavailable/unacknowledged. */
58
+ run_id: string | null;
57
59
  status: AgentOutcomeStatus;
58
60
  summary: string;
59
61
  evidence: Array<{ kind: string; description: string; data: unknown }>;
@@ -87,6 +89,17 @@ export interface AgentLoopOptions {
87
89
  maxTurns?: number;
88
90
  }
89
91
 
92
+ export interface AgentChatTurnOptions {
93
+ /** Return `{ text, run_id }` instead of the backward-compatible bare text. */
94
+ includeRunId?: boolean;
95
+ }
96
+
97
+ export interface AgentChatTurnResult {
98
+ text: string;
99
+ /** Durable trace key, or null when runs.start was unavailable/unacknowledged. */
100
+ run_id: string | null;
101
+ }
102
+
90
103
  /** Persistent runtime instance with state, memory, tools, and policies. */
91
104
  /**
92
105
  * Optional settings for `coderStart`. Every field is independently omittable;
@@ -145,6 +158,14 @@ export interface CoderStartOptions {
145
158
  * ungrounded run.
146
159
  */
147
160
  discussionId?: string | undefined | null;
161
+ /**
162
+ * Commit-ish to start the worktree at instead of the repository's `HEAD` —
163
+ * e.g. another developer's published branch. The daemon resolves it to a
164
+ * full SHA (echoed as `base` in the reply) and fails the start on an unknown
165
+ * revision, before anything is provisioned. Not valid with a managed
166
+ * `project`.
167
+ */
168
+ base?: string | undefined | null;
148
169
  }
149
170
 
150
171
  export interface DaemonRpcError extends Error {
@@ -714,6 +735,24 @@ export class CarRuntime {
714
735
  /** Generated daemon wrapper for `multi.vote` (operator). */
715
736
  multiVote(paramsJson: string): Promise<string>;
716
737
 
738
+ /** Generated daemon wrapper for `multiplayer.get` (operator). */
739
+ multiplayerGet(paramsJson: string): Promise<string>;
740
+
741
+ /** Generated daemon wrapper for `multiplayer.list` (operator). */
742
+ multiplayerList(paramsJson: string): Promise<string>;
743
+
744
+ /** Generated daemon wrapper for `multiplayer.merge_check` (operator). */
745
+ multiplayerMergeCheck(paramsJson: string): Promise<string>;
746
+
747
+ /** Generated daemon wrapper for `multiplayer.publish` (operator). */
748
+ multiplayerPublish(paramsJson: string): Promise<string>;
749
+
750
+ /** Generated daemon wrapper for `multiplayer.start_stage` (operator). */
751
+ multiplayerStartStage(paramsJson: string): Promise<string>;
752
+
753
+ /** Generated daemon wrapper for `multiplayer.submit_stage` (operator). */
754
+ multiplayerSubmitStage(paramsJson: string): Promise<string>;
755
+
717
756
  /** Generated daemon wrapper for `nlp.extract_entities` (operator). */
718
757
  nlpExtractEntities(paramsJson: string): Promise<string>;
719
758
 
@@ -807,6 +846,9 @@ export class CarRuntime {
807
846
  /** Generated daemon wrapper for `runs.unsubscribe` (operator). */
808
847
  runsUnsubscribe(paramsJson: string): Promise<string>;
809
848
 
849
+ /** Generated daemon wrapper for `schedule.suggest` (operator). */
850
+ scheduleSuggest(paramsJson: string): Promise<string>;
851
+
810
852
  /** Generated daemon wrapper for `scheduler.create` (operator). */
811
853
  schedulerCreate(paramsJson: string): Promise<string>;
812
854
 
@@ -1169,6 +1211,16 @@ export class CarRuntime {
1169
1211
  */
1170
1212
  listTools(): Promise<string>;
1171
1213
 
1214
+ /**
1215
+ * Return the exact machine-readable wire schema embedded in the daemon
1216
+ * release, its SHA-256 digest, and the release version, as JSON:
1217
+ * `{ schema, digest, digest_algorithm, car_version }`. The version is read
1218
+ * at serve time and is not part of the digested document. Within `schema`,
1219
+ * `coverage.rpc_results` and `coverage.journal_event_payloads` partition the
1220
+ * source-derived inventories into exact `covered` and `uncovered` lists.
1221
+ */
1222
+ serverSchema(): Promise<string>;
1223
+
1172
1224
  /**
1173
1225
  * Remove a tool by name. Resolves to how many were removed — `0` means
1174
1226
  * nothing matched, which is not an error, so cleanup can call this
@@ -2134,7 +2186,8 @@ export class CarRuntime {
2134
2186
  /**
2135
2187
  * `assistant.identity.get` — the name the flagship assistant answers to.
2136
2188
  *
2137
- * Returns `{ name, spellings, aliases, user_name, brand, updated_at_unix }`.
2189
+ * Returns `{ name, spellings, aliases, user_name, role, focus_areas, apps,
2190
+ * brand, updated_at_unix }`.
2138
2191
  * `aliases` is the derived match set (name and spellings crossed with
2139
2192
  * "hey"/"ok"/…), longest first — hosts match wake phrases against it locally
2140
2193
  * so their matcher works before the daemon answers.
@@ -2152,10 +2205,10 @@ export class CarRuntime {
2152
2205
  * `assistant.identity.set` — name the assistant. Host/local-auth gated on the
2153
2206
  * daemon, because a rename repoints the voice wake word.
2154
2207
  *
2155
- * `requestJson` is `{ name?, spellings?, user_name? }`. Every field is
2156
- * optional and unset fields are preserved, so a caller that only knows about
2157
- * the name cannot wipe spellings another surface wrote. Pass
2158
- * `user_name: null` to clear it.
2208
+ * `requestJson` is `{ name?, spellings?, user_name?, role?, focus_areas?,
2209
+ * apps? }`. Every field is optional and unset fields are preserved. The focus
2210
+ * vocabulary is calendar/email/files/browser/research/writing/other. Pass
2211
+ * `null` to clear any profile field.
2159
2212
  *
2160
2213
  * Returns the updated identity JSON, in the same shape as
2161
2214
  * `assistantIdentityGet`.
@@ -2246,10 +2299,28 @@ export class CarRuntime {
2246
2299
  *
2247
2300
  * Start a session: provisions an isolated git worktree of `repo` and
2248
2301
  * derives a verifiable outcome contract from `intent`. `engine` is
2249
- * `"auto" | "native" | "external[:agent_id]"` (default auto). Returns
2250
- * `{session_id, state, engine, worktree, contract, model}` JSON, where
2251
- * `model` is the effective native-loop pin (per-session `model`, else
2252
- * `~/.car/coder.toml`, else `null` = adaptive routing). Set
2302
+ * `"auto" | "native" | "external[:agent_id]"` (default auto). Returns, in
2303
+ * this order, `{session_id, state, engine, requested_engine, engine_ran,
2304
+ * worktree, base, contract, baseline, baseline_gates_nothing, model,
2305
+ * browser, journal_path}` JSON. `base` is the commit the worktree started
2306
+ * at when `options.base` named one, else `null` (the repository's `HEAD`).
2307
+ *
2308
+ * `engine` is the RESOLVED choice; `requested_engine` is what the caller
2309
+ * ASKED for, which resolution can differ from (`"auto"` that picks
2310
+ * claude-code and an explicit `"external:claude-code"` both leave `engine`
2311
+ * reading `"external:claude-code"`). `requested_engine` is ALWAYS recorded
2312
+ * when a session starts on this version — JSON `null` only on a session
2313
+ * persisted by a daemon older than the field. `engine_ran` is the engine
2314
+ * that produced the outcome (`"native"` after an external engine fell
2315
+ * back); it is JSON `null` until one has, so always `null` in THIS reply,
2316
+ * and `null` on an older session too.
2317
+ *
2318
+ * `baseline` is the contract's per-check red-green baseline against the
2319
+ * untouched worktree and `baseline_gates_nothing` says every check already
2320
+ * passed; `model` is the effective native-loop pin (per-session `model`,
2321
+ * else `~/.car/coder.toml`, else `null` = adaptive routing); `browser`
2322
+ * echoes the effective opt-in; `journal_path` is the `car_eventlog` JSONL
2323
+ * this session journals to. Set
2253
2324
  * `options.browser` to opt into the assistant's browser tool surface for this
2254
2325
  * session; it remains absent by default and policy-gated when enabled.
2255
2326
  */
@@ -2268,24 +2339,60 @@ export class CarRuntime {
2268
2339
  contractJson?: string | undefined | null,
2269
2340
  ): Promise<string>;
2270
2341
 
2271
- /** List coder sessions (live and persisted), newest first. */
2342
+ /**
2343
+ * List coder sessions (live and persisted), newest first. Each row is the
2344
+ * same summary `coderWatch` returns, so it carries `requested_engine` (what
2345
+ * the caller asked for — always recorded on this version, JSON `null` only
2346
+ * for a session persisted by an older daemon) and `engine_ran` (the engine
2347
+ * that produced the outcome, `"native"` after an external engine fell back
2348
+ * — JSON `null` while the session is still running, or if it never reached
2349
+ * an engine, and on older sessions).
2350
+ */
2272
2351
  coderList(): Promise<string>;
2273
2352
 
2274
- /** Full session detail, including contract and check results. */
2353
+ /**
2354
+ * Full session detail, including contract and check results. Carries the
2355
+ * same summary row as `coderWatch`, so once a session ends `engine_ran`
2356
+ * names the engine that actually produced the outcome — `"native"` when an
2357
+ * external engine fell back — beside the `requested_engine` that was asked
2358
+ * for. This is where `car code` reads its end-of-run engine line.
2359
+ *
2360
+ * Both are nullable (JSON `null`): `requested_engine` is always recorded
2361
+ * when a session starts on this version, so `null` there means a session
2362
+ * persisted by an older daemon; `engine_ran` is `null` until an engine has
2363
+ * produced the outcome — a run still in progress, or one that never reached
2364
+ * an engine — and on older sessions.
2365
+ */
2275
2366
  coderGet(sessionId: string): Promise<string>;
2276
2367
 
2277
2368
  /**
2278
- * Answer a `user_input_requested` event (reserved — neither engine
2279
- * requests mid-session input yet).
2369
+ * Answer a `user_input_requested` event, or queue native steering with steer=true.
2280
2370
  */
2281
2371
  coderRespond(sessionId: string, text: string): Promise<string>;
2372
+ coderRespond(sessionId: string, text: string, steer: boolean | null): Promise<string>;
2282
2373
 
2283
2374
  /**
2284
2375
  * Approve (publish the `car/coder/<id>` branch in the repo) or deny
2285
2376
  * (abandon) a session awaiting merge approval. Agent-project approvals
2286
2377
  * return additive `agent_id` and daemon-derived `registry_path` fields.
2378
+ *
2379
+ * A session waiting on a no-change finding (`needs_you: "finding"`) is
2380
+ * accepted only with `acceptFinding: true`: nothing is published and the
2381
+ * reply is `{state: "reported", branch: null}`. A plain `approve: true` on
2382
+ * a finding, or `acceptFinding` on a diff, is refused.
2287
2383
  */
2288
- coderApproveMerge(sessionId: string, approve: boolean): Promise<string>;
2384
+ coderApproveMerge(
2385
+ sessionId: string,
2386
+ approve: boolean,
2387
+ acceptFinding?: boolean | undefined | null,
2388
+ ): Promise<string>;
2389
+ /** Apply to the checkout without a branch, or explicitly publish a branch. */
2390
+ coderApproveMerge(
2391
+ sessionId: string,
2392
+ approve: boolean,
2393
+ acceptFinding: boolean | undefined | null,
2394
+ delivery: 'checkout' | 'branch',
2395
+ ): Promise<string>;
2289
2396
 
2290
2397
  /**
2291
2398
  * Cancel a session: stop the loop, abandon, remove the worktree. Returns
@@ -2307,7 +2414,13 @@ export class CarRuntime {
2307
2414
  *
2308
2415
  * Each row carries the full summary: the pre-existing
2309
2416
  * `{session_id, state, intent, repo, engine, iterations, updated_at, live,
2310
- * error}` plus `needs_you` (`"contract" | "question" | "approval" | "auth" |
2417
+ * error}` plus `requested_engine` (the engine the caller asked for; `engine`
2418
+ * is the RESOLVED choice — always recorded when a session starts on this
2419
+ * version, so JSON `null` there means a session persisted by an older
2420
+ * daemon) and `engine_ran` (the engine that produced the outcome, `"native"`
2421
+ * after an external engine fell back — JSON `null` until one has, i.e. a run
2422
+ * still in progress or one that never reached an engine, and on older
2423
+ * sessions) — plus `needs_you` (`"contract" | "question" | "approval" | "auth" |
2311
2424
  * null`), `needs_you_label` (the daemon-owned wording, so every client says
2312
2425
  * the same thing), `question_prompt`, `auth_message`, `auth_wait_secs`,
2313
2426
  * `failure_kind` (`"budget_exhausted" | "auth_required" | "configuration" |
@@ -2347,6 +2460,8 @@ export class CarRuntime {
2347
2460
  * `{discussion_id, repo, repo_summary}`; a non-git path is a clear error.
2348
2461
  */
2349
2462
  coderDiscussStart(repo: string): Promise<string>;
2463
+ coderDiscussStart(repo: string, resumeId: string): Promise<string>;
2464
+ coderDiscussStart(repo: string, resumeId: string | null | undefined, model: string | null): Promise<string>;
2350
2465
 
2351
2466
  /**
2352
2467
  * Send one operator message. Returns `{ok, seq}` where `seq` is the first
@@ -2379,9 +2494,12 @@ export class CarRuntime {
2379
2494
  *
2380
2495
  * Create (or load) a CAR-managed git-backed project under
2381
2496
  * `~/.car/projects/`. `kind` is `"app"` (code) or `"agent"` (an in-daemon
2382
- * declarative agent). Returns the `CoderProject` JSON.
2497
+ * declarative agent). For an edit, `existingAgentId` identifies the agent to
2498
+ * replace and `builderDraftJson` contains the seven answers plus
2499
+ * `template_id`. Returns the `CoderProject` JSON.
2383
2500
  */
2384
2501
  projectCreate(name: string, kind?: string | undefined | null): Promise<string>;
2502
+ projectCreate(name: string, kind?: string | undefined | null, existingAgentId?: string | undefined | null, builderDraftJson?: string | undefined | null): Promise<string>;
2385
2503
  /** List managed projects, newest first. */
2386
2504
  projectList(): Promise<string>;
2387
2505
  /** One project's metadata by slug. */
@@ -2883,7 +3001,8 @@ export class CarRuntime {
2883
3001
  /**
2884
3002
  * Read message rows, newest first. `queryJson` is a `MessageQuery`:
2885
3003
  * `{account_ids?: string[], mailbox?: string | null, limit?: number,
2886
- * since?: string, include_body?: boolean}`. Every field defaults, and
3004
+ * since?: string, include_body?: boolean}`. `limit` may not exceed 500.
3005
+ * Every field defaults, and
2887
3006
  * `mailbox: null` means INBOX — so `"{}"` reproduces the pre-existing
2888
3007
  * INBOX-only read.
2889
3008
  *
@@ -2896,7 +3015,10 @@ export class CarRuntime {
2896
3015
  * each row carries a stable opaque `id` accepted by `mailMessageBody`, and
2897
3016
  * a `mailbox` holding the mailbox as the backend RESOLVED it (a query for
2898
3017
  * `"travel"` comes back stamped `"Travel/2026"`), so rows match
2899
- * `mailMailboxes` output. An unresolvable mailbox or an unmatched
3018
+ * `mailMailboxes` output. Mail.app rows also carry `message_id`, the RFC
3019
+ * 5322 Message-ID header exactly as Mail exposes it; it is `null` if Mail
3020
+ * does not expose the header and on Microsoft Graph rows. An unresolvable
3021
+ * mailbox or an unmatched
2900
3022
  * `account_ids` returns `available: false` with a reason, never an empty
2901
3023
  * list.
2902
3024
  */
@@ -2924,7 +3046,8 @@ export class CarRuntime {
2924
3046
  /**
2925
3047
  * Read Messages.app rows newest first. `queryJson` is
2926
3048
  * `{chat_ids?: string[], since?: string, limit?: number,
2927
- * include_body?: boolean}`. Returns `{available, backend, reason?, messages}`;
3049
+ * include_body?: boolean}`. `limit` may not exceed 500. Returns
3050
+ * `{available, backend, reason?, messages}`;
2928
3051
  * an unreadable database is unavailable, not an empty conversation.
2929
3052
  */
2930
3053
  messagesRead(queryJson: string): string;
@@ -4989,6 +5112,9 @@ export function listOsSchedules(): string;
4989
5112
  * schedulable. Returns the reconcile report `{ removed, kept, errors }`.
4990
5113
  */
4991
5114
  export function reconcileOsSchedules(): string;
5115
+ /** Parse the supported cadence phrase grammar without inference.
5116
+ * Returns `{ cadence, reason? }`; unsupported input has `cadence: null`. */
5117
+ export function suggestSchedule(phrase: string, timezone?: string | null): string;
4992
5118
  /** Schedule a deterministic command on a cadence, hiding the OS backend (#72).
4993
5119
  * specJson = { name, program, args?, cadence: { intervalSecs? | cron? },
4994
5120
  * durable?, workingDir?, env?, permissionTier? }.
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.54.0",
3
+ "version": "0.55.0-nightly.20260920",
4
+ "carProtocolVersion": 3,
4
5
  "description": "Common Agent Runtime — a deterministic execution layer for AI agents",
5
6
  "main": "index.js",
6
7
  "types": "index.d.ts",