car-runtime 0.55.0 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -83,6 +83,8 @@ export interface AgentLoopConfig {
83
83
  targetOutcome?: string;
84
84
  standingGoal?: string | null;
85
85
  intervalSecs?: number;
86
+ /** Reuse this daemon connection across sequential task and chat runs. */
87
+ runtime?: CarRuntime;
86
88
  }
87
89
 
88
90
  export interface AgentLoopOptions {
@@ -109,9 +111,38 @@ export interface AgentChatTurnResult {
109
111
  * of them numbers — which callers could silently mis-order.
110
112
  */
111
113
  export interface CoderStartOptions {
114
+ /**
115
+ * Caller-owned OutcomeContract JSON. The daemon validates it, skips model
116
+ * derivation, and runs it verbatim; not valid for Agent projects.
117
+ */
118
+ contractJson?: string | undefined | null;
119
+ /**
120
+ * Classify `contractJson` as operator ground truth (`"supplied"`, the
121
+ * default) or as model-derived (`"derived"`). Derived contracts keep network
122
+ * denied and approve no credentials unless an operator later approves them.
123
+ */
124
+ contractSource?: string | undefined | null;
125
+ /** Operator-authored replay provenance; live sessions leave this unset. */
126
+ trustSourceRepo?: string | undefined | null;
127
+ /**
128
+ * Run in this organization (one a signed-in login holds). A repository that
129
+ * declares `[organization] id` accepts only its own org. Omitted: the
130
+ * repository's org, else your default org (a distributed run is refused),
131
+ * else personal.
132
+ */
133
+ organizationId?: string | undefined | null;
134
+ /** Run as personal, org-less work even where a default org applies. */
135
+ personal?: boolean | undefined | null;
136
+ /** Subscribe this connection before contract derivation starts. */
137
+ subscribe?: boolean | undefined | null;
138
+ /**
139
+ * Declare that no person is attached to answer approval or `ask_user`
140
+ * prompts. Approval-required actions fail closed immediately.
141
+ */
142
+ headless?: boolean | undefined | null;
112
143
  /** `"auto" | "native" | "external[:agent_id]" | "foreman[:agent_id]"`. */
113
144
  engine?: string | undefined | null;
114
- /** Contract-evaluation rounds before the native loop gives up. */
145
+ /** Explicit iteration cap; omitted or 0 means unlimited. */
115
146
  maxIterations?: number | undefined | null;
116
147
  /** Per-session backbone pin, reaching whichever engine runs. */
117
148
  model?: string | undefined | null;
@@ -132,6 +163,21 @@ export interface CoderStartOptions {
132
163
  * recorded in the session event stream.
133
164
  */
134
165
  browser?: boolean | undefined | null;
166
+ /**
167
+ * Join the CAR Lattice for the run, as JSON
168
+ * `{ project, capabilities, display_name? }`. Other Lattice nodes (Claude Code,
169
+ * Codex, CAR agents) can then find this coder by capability, and the native
170
+ * loop gets `lattice_find`, `peer_message`, `peer_inbox` and the `work_*`
171
+ * claim tools. Selects the native engine; an explicitly external engine is
172
+ * refused. Omitted keeps the run invisible to the Lattice.
173
+ */
174
+ latticeJson?: string | undefined | null;
175
+ /**
176
+ * Run an external engine with no route off the machine: no web search or
177
+ * fetch, browser, app connectors or MCP servers, and a shell without
178
+ * network. An engine that cannot guarantee it refuses. Off by default.
179
+ */
180
+ isolateExternalNetwork?: boolean | undefined | null;
135
181
  /**
136
182
  * Farm a **foreman** session's subtasks across every reachable CAR instance
137
183
  * that can serve this repository, instead of this machine alone. The
@@ -180,6 +226,12 @@ export interface DaemonRpcError extends Error {
180
226
  export class CarRuntime {
181
227
  constructor();
182
228
 
229
+ /** Release the daemon socket and browser session. A later call reconnects. */
230
+ close(): Promise<void>;
231
+
232
+ /** Transport-named alias for `close()`. */
233
+ disconnect(): Promise<void>;
234
+
183
235
  /**
184
236
  * Invoke any daemon JSON-RPC method with a JSON-encoded params value.
185
237
  * `daemonCall` is the call-by-name escape hatch; use the typed wrappers as the primary API.
@@ -191,6 +243,12 @@ export class CarRuntime {
191
243
  /** Host-management-token twin of `daemonCall`; the method allowlist remains enforced. */
192
244
  daemonCallHostManagement(method: string, paramsJson: string): Promise<string>;
193
245
 
246
+ /** List durable permission grants using host-management authority. */
247
+ agentPermissionsListGrants(paramsJson: string): Promise<string>;
248
+
249
+ /** Revoke one durable permission grant using host-management authority. */
250
+ agentPermissionsRevokeGrant(paramsJson: string): Promise<string>;
251
+
194
252
  /** Register a server-initiated JSON-RPC request handler. */
195
253
  registerDaemonHandler(
196
254
  method: string,
@@ -456,6 +514,9 @@ export class CarRuntime {
456
514
  /** Generated daemon wrapper for `concierge.dismiss` (operator). */
457
515
  conciergeDismiss(paramsJson: string): Promise<string>;
458
516
 
517
+ /** Generated daemon wrapper for `concierge.portfolio` (operator). */
518
+ conciergePortfolio(paramsJson: string): Promise<string>;
519
+
459
520
  /** Generated daemon wrapper for `concierge.refresh_catalog` (operator). */
460
521
  conciergeRefreshCatalog(paramsJson: string): Promise<string>;
461
522
 
@@ -516,6 +577,9 @@ export class CarRuntime {
516
577
  /** Generated daemon wrapper for `declagents.routing_stats` (operator). */
517
578
  declagentsRoutingStats(paramsJson: string): Promise<string>;
518
579
 
580
+ /** Generated daemon wrapper for `declagents.run_scenarios` (operator). */
581
+ declagentsRunScenarios(paramsJson: string): Promise<string>;
582
+
519
583
  /** Generated daemon wrapper for `events.chain.enable` (operator). */
520
584
  eventsChainEnable(paramsJson: string): Promise<string>;
521
585
 
@@ -600,6 +664,30 @@ export class CarRuntime {
600
664
  /** Generated daemon wrapper for `inference.runner.fail` (operator). */
601
665
  inferenceRunnerFail(paramsJson: string): Promise<string>;
602
666
 
667
+ /** Generated daemon wrapper for `lattice.claim` (operator). */
668
+ latticeClaim(paramsJson: string): Promise<string>;
669
+
670
+ /** Generated daemon wrapper for `lattice.claims` (operator). */
671
+ latticeClaims(paramsJson: string): Promise<string>;
672
+
673
+ /** Generated daemon wrapper for `lattice.find` (operator). */
674
+ latticeFind(paramsJson: string): Promise<string>;
675
+
676
+ /** Generated daemon wrapper for `lattice.join` (operator). */
677
+ latticeJoin(paramsJson: string): Promise<string>;
678
+
679
+ /** Generated daemon wrapper for `lattice.leave` (operator). */
680
+ latticeLeave(paramsJson: string): Promise<string>;
681
+
682
+ /** Generated daemon wrapper for `lattice.nodes` (operator). */
683
+ latticeNodes(paramsJson: string): Promise<string>;
684
+
685
+ /** Generated daemon wrapper for `lattice.release` (operator). */
686
+ latticeRelease(paramsJson: string): Promise<string>;
687
+
688
+ /** Generated daemon wrapper for `lattice.wait` (operator). */
689
+ latticeWait(paramsJson: string): Promise<string>;
690
+
603
691
  /** Generated daemon wrapper for `meeting.get` (operator). */
604
692
  meetingGet(paramsJson: string): Promise<string>;
605
693
 
@@ -735,6 +823,9 @@ export class CarRuntime {
735
823
  /** Generated daemon wrapper for `multi.vote` (operator). */
736
824
  multiVote(paramsJson: string): Promise<string>;
737
825
 
826
+ /** Generated daemon wrapper for `multiplayer.abandon` (operator). */
827
+ multiplayerAbandon(paramsJson: string): Promise<string>;
828
+
738
829
  /** Generated daemon wrapper for `multiplayer.get` (operator). */
739
830
  multiplayerGet(paramsJson: string): Promise<string>;
740
831
 
@@ -1264,6 +1355,14 @@ export class CarRuntime {
1264
1355
  */
1265
1356
  runsComplete(paramsJson: string): Promise<string>;
1266
1357
 
1358
+ /**
1359
+ * Record one completed inference before its requested actions execute.
1360
+ * `paramsJson` contains `run_id`, one-based `turn_index`, assistant text,
1361
+ * requested tool calls/ids, `model_id`, optional token usage, and
1362
+ * `duration_ms`. Returns the durable append acknowledgement as JSON.
1363
+ */
1364
+ runsRecordModelTurn(paramsJson: string): Promise<string>;
1365
+
1267
1366
  /**
1268
1367
  * Open a policy-scoping session and return its opaque id. Hosts
1269
1368
  * that drive multiple concurrent agent contexts through one
@@ -1573,7 +1672,11 @@ export class CarRuntime {
1573
1672
  /** Append/load monotone supervised-action lifecycle records. */
1574
1673
  syncAssistantActionPut(requestJson: string): Promise<string>;
1575
1674
  syncAssistantActionGet(requestJson: string): Promise<string>;
1576
- /** `sync.record_turn` — route a conversation turn through the oplog so `syncResume` is real (B6). */
1675
+ /**
1676
+ * `sync.record_turn` — route a conversation turn through the oplog so `syncResume` is real (B6).
1677
+ * A tool turn may carry `provenance: "external"` and `ok` (the call's recorded outcome); both
1678
+ * come back from `syncTranscript` / `syncResume`.
1679
+ */
1577
1680
  syncRecordTurn(requestJson: string): Promise<string>;
1578
1681
  /** `sync.record_intent` — write the leased-execution intent ledger; feeds the fence oracle (B6). */
1579
1682
  syncRecordIntent(requestJson: string): Promise<string>;
@@ -1759,17 +1862,17 @@ export class CarRuntime {
1759
1862
  ingestSkillGoverned(requestJson: string): Promise<string>;
1760
1863
 
1761
1864
  /**
1762
- * Adopt an installed skill pack on the daemon through the skill-trust
1763
- * deployment gate (arXiv 2602.12430 "Agent Skills" — the pack-adoption
1764
- * call-site). `requestJson` carries `pack` (an `ApprovedSkillPack`),
1765
- * `requested_tier?` (default `read_only`), and either `manifest?` — the signed
1766
- * bundle, whose signature trust is derived against the operator's
1767
- * `.car/config.toml` `trusted_skill_signers` keyring — or `provenance?`
1768
- * (caller-assembled), plus optional `scanned?`/`vulnerabilities?`/`source?`.
1769
- * Governance is unconditional: a denied skill never enters the graph. Returns
1770
- * `{ loaded, pending, refused, requested_tier, provenance, trusted_signers }`;
1771
- * a pending deny is resolved via `permission.approve`/`permission.reject` by
1772
- * the returned `fingerprint`, then re-adopted.
1865
+ * Adopt a skill pack through the daemon deployment gate.
1866
+ * `requestJson` carries `pack` and optional `requested_tier` (default
1867
+ * `read_only`). Original-recipient-bound engines treat supplied publisher
1868
+ * signature, scan and provenance claims as untrusted candidate metadata.
1869
+ * Legacy unbound local operator engines retain their manifest/provenance
1870
+ * contract. The JSON receipt reports `loaded`, `pending`, `refused`,
1871
+ * `requested_tier`, `provenance` and `trusted_signers`. Receiver-bound pending
1872
+ * reviews include the original `recipient`, `candidate_digest`, requested tier
1873
+ * and exact `fingerprint`. Resolve that fingerprint through the receiver's
1874
+ * approval authority, then re-adopt. Unchanged admitted skills retain their
1875
+ * receiver-owned outcomes and health during partial-pack replay.
1773
1876
  */
1774
1877
  adoptSkillPack(requestJson: string): Promise<string>;
1775
1878
 
@@ -2009,7 +2112,16 @@ export class CarRuntime {
2009
2112
  instruction?: string | null,
2010
2113
  ): Promise<string>;
2011
2114
 
2012
- /** Classify text against labels. Returns JSON array of `{label, score}`. */
2115
+ /**
2116
+ * Classify text against labels. Returns a JSON array of `{label, score}`,
2117
+ * best first. With `model: "parslee/jev"` (TypeSafe's Jev through Parslee;
2118
+ * also the default when `model` is omitted, none is configured, and you are
2119
+ * signed in to Parslee) `score` is the model's probability for the label. On a generative model
2120
+ * `score` is a normalized match strength
2121
+ * between the model's reply and the label, not a probability; labels match
2122
+ * case-insensitively with `_`/`-`/punctuation read as spaces. Rejects when
2123
+ * the reply names none of the labels.
2124
+ */
2013
2125
  classify(text: string, labels: string[], model?: string | null): Promise<string>;
2014
2126
 
2015
2127
  /**
@@ -2296,13 +2408,29 @@ export class CarRuntime {
2296
2408
  * live in the daemon and are visible in CarHost. Live `coder.event`
2297
2409
  * streaming is WebSocket-only: call `coder.subscribe` on the daemon's
2298
2410
  * WS directly (same contract as `infer_stream`).
2411
+ * `tool_result.worktree_changed` is omitted when false;
2412
+ * `check_started` carries one-based `index` and `total`; and
2413
+ * `check_completed.result` adds `command`, `started_at`, `network_isolation`
2414
+ * (`"sandboxed" | "unwrapped_approved" | "unavailable"`), `secret_isolation`
2415
+ * (`"sandboxed" | "unavailable"`, default unavailable for old records), `evidence_dir`,
2416
+ * `evidence_files`, runtime-injected `env`, `cwd`, and `protected_edits`, while
2417
+ * `output_tail` keeps its type and size bound but is redacted with the evidence
2418
+ * scrub; `contract_protected_edits` carries `edits`, `allowed`, and `note`;
2419
+ * `contract_protected_surface` carries `paths` (`path`, `origin`, `kind`),
2420
+ * `unprotected_checks`, `partially_protected` (`check`, `script`, `line`,
2421
+ * `reason`), and `invoked_product_files` (`path`, `invoked_by`);
2422
+ * `contract_unprotected_check` carries `check` and the
2423
+ * operator-facing `warning`; `contract_partial_protection` carries `partial`
2424
+ * and its operator-facing `warning`; and
2425
+ * `iteration_started.max === 0` means unlimited.
2299
2426
  *
2300
2427
  * Start a session: provisions an isolated git worktree of `repo` and
2301
2428
  * derives a verifiable outcome contract from `intent`. `engine` is
2302
2429
  * `"auto" | "native" | "external[:agent_id]"` (default auto). Returns, in
2303
2430
  * 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
2431
+ * worktree, base, contract, outcomes_path, outcome_groups, outcome_count,
2432
+ * dropped_outcomes, baseline, baseline_gates_nothing, model, browser,
2433
+ * journal_path}` JSON. `base` is the commit the worktree started
2306
2434
  * at when `options.base` named one, else `null` (the repository's `HEAD`).
2307
2435
  *
2308
2436
  * `engine` is the RESOLVED choice; `requested_engine` is what the caller
@@ -2323,6 +2451,26 @@ export class CarRuntime {
2323
2451
  * this session journals to. Set
2324
2452
  * `options.browser` to opt into the assistant's browser tool surface for this
2325
2453
  * session; it remains absent by default and policy-gated when enabled.
2454
+ * Contract checks carry optional `timeout_secs` and `credentials: string[]`.
2455
+ * Credential declarations grant nothing. Supplied contracts approve their
2456
+ * own declarations; model-derived outcomes leave `approved_credentials`
2457
+ * empty. Check results expose only `credential_sources` labels and
2458
+ * `credentials_withheld`, never values.
2459
+ * `outcomes_path` names the `<state_dir>/<session_id>.outcomes.md` review
2460
+ * artifact; `outcome_groups` is `[{group,
2461
+ * outcomes:[{id,text,check,network_approved,approved_credentials?}]}]`;
2462
+ * each `id` is stable after confirmation and is never renumbered,
2463
+ * `outcome_count` is its total,
2464
+ * and `dropped_outcomes` is `[{kept,dropped,group,reason}]`. The WS-only
2465
+ * event stream adds `outcomes_step {step,group?,phase,outcomes?,detail?}`,
2466
+ * `outcome_dropped {kept,dropped,group,reason}`, and
2467
+ * `outcomes_written {path,groups:[{group,outcomes}]}`,
2468
+ * `contract_protected_surface {paths,unprotected_checks,partially_protected,invoked_product_files}`,
2469
+ * `contract_unprotected_check {check,warning}`,
2470
+ * `contract_partial_protection {partial,warning}`,
2471
+ * `verification_started {round}`,
2472
+ * `outcome_verdict {outcome_id,verdict,probes}`, and
2473
+ * `audit_completed {provider,model_served,family,findings,unresolved}`.
2326
2474
  */
2327
2475
  coderStart(
2328
2476
  repo: string,
@@ -2332,7 +2480,11 @@ export class CarRuntime {
2332
2480
 
2333
2481
  /**
2334
2482
  * Confirm the proposed outcome contract (optionally replacing it with
2335
- * the edited `contractJson`) and start the work loop.
2483
+ * the edited `contractJson`) and start the work loop. A check in the edited
2484
+ * JSON may carry `network_approved: true` and
2485
+ * `approved_credentials: string[]`. Credential approval is limited to names
2486
+ * declared by that exact check; changing its name, command, or declarations
2487
+ * drops carried approval.
2336
2488
  */
2337
2489
  coderConfirmContract(
2338
2490
  sessionId: string,
@@ -2346,7 +2498,11 @@ export class CarRuntime {
2346
2498
  * for a session persisted by an older daemon) and `engine_ran` (the engine
2347
2499
  * that produced the outcome, `"native"` after an external engine fell back
2348
2500
  * — JSON `null` while the session is still running, or if it never reached
2349
- * an engine, and on older sessions).
2501
+ * an engine, and on older sessions). Rows also carry `excluded_artifacts`
2502
+ * as `{path, reason, size_bytes}[]` when review staging withheld generated
2503
+ * files; the array is empty when none were withheld.
2504
+ * Summary rows may report `state: "verifying"` and
2505
+ * `failure_kind: "verification"`.
2350
2506
  */
2351
2507
  coderList(): Promise<string>;
2352
2508
 
@@ -2361,7 +2517,26 @@ export class CarRuntime {
2361
2517
  * when a session starts on this version, so `null` there means a session
2362
2518
  * persisted by an older daemon; `engine_ran` is `null` until an engine has
2363
2519
  * produced the outcome — a run still in progress, or one that never reached
2364
- * an engine — and on older sessions.
2520
+ * an engine — and on older sessions. After a daemon restart interrupted an
2521
+ * active check, `interrupted_checks` contains
2522
+ * `{name, completed: false, rerun_required: true}` entries with no verdict.
2523
+ * `evidence_dir` names the durable session evidence root and
2524
+ * `evidence_bytes` reports its recursive size.
2525
+ * Every entry in `last_check_results` carries `network_isolation` and
2526
+ * `secret_isolation` with the
2527
+ * same three values.
2528
+ * `excluded_artifacts` lists `{path, reason, size_bytes}` records withheld
2529
+ * from the current review and delivery staging pass.
2530
+ * It also carries `outcomes_path`, the full
2531
+ * `outcomes:{source,groups,not_verified,not_in_this_version,dropped,
2532
+ * missing_groups,critic_ran}` record; `not_verified[].check`, when present,
2533
+ * is the full held `ContractCheck` object rather than only its name. It also carries
2534
+ * `contract_derivation:{calls,prompt_tokens,completion_tokens,cost_usd,
2535
+ * billing,models}` where billing is `"metered" | "subscription" |
2536
+ * "unknown" | null`; derivation usage is separate from execution-loop usage.
2537
+ * After independent verification starts, `verification` carries
2538
+ * `{round,grades,probes,isolation,audit?}`. Delivery requires every grade to
2539
+ * be `PASS` and a clean audit whose served family differs from the builder.
2365
2540
  */
2366
2541
  coderGet(sessionId: string): Promise<string>;
2367
2542
 
@@ -2379,7 +2554,9 @@ export class CarRuntime {
2379
2554
  * A session waiting on a no-change finding (`needs_you: "finding"`) is
2380
2555
  * accepted only with `acceptFinding: true`: nothing is published and the
2381
2556
  * reply is `{state: "reported", branch: null}`. A plain `approve: true` on
2382
- * a finding, or `acceptFinding` on a diff, is refused.
2557
+ * a finding, or `acceptFinding` on a diff, is refused. Successful delivery
2558
+ * replies include `excluded_artifacts` with the exact records used by the
2559
+ * committed staging pass.
2383
2560
  */
2384
2561
  coderApproveMerge(
2385
2562
  sessionId: string,
@@ -2395,8 +2572,10 @@ export class CarRuntime {
2395
2572
  ): Promise<string>;
2396
2573
 
2397
2574
  /**
2398
- * Cancel a session: stop the loop, abandon, remove the worktree. Returns
2399
- * `{state, already_terminal, message}`.
2575
+ * Cancel a session: stop the loop and abandon. During standalone contract
2576
+ * drafting it removes the unpublished worktree; after a contract is proposed
2577
+ * it preserves unfinished work for recovery. Returns
2578
+ * `{state, already_terminal, message, worktree, recoverable}`.
2400
2579
  *
2401
2580
  * An already-finished session **succeeds** rather than rejecting: `state`
2402
2581
  * keeps its pre-existing name and type, `already_terminal` is `true`, and
@@ -2404,7 +2583,8 @@ export class CarRuntime {
2404
2583
  * on shutdown depend on that — rejecting would turn a quiet exit into a
2405
2584
  * protocol error whenever the session raced to terminal first.
2406
2585
  */
2407
- coderCancel(sessionId: string): Promise<string>;
2586
+ /** `reason` names a non-operator cause and is recorded as `cancelled: <reason>`; omit it only when a person cancelled. */
2587
+ coderCancel(sessionId: string, reason?: string | undefined | null): Promise<string>;
2408
2588
 
2409
2589
  /**
2410
2590
  * The current session list AND registration for `coder.session_changed` on
@@ -2423,8 +2603,10 @@ export class CarRuntime {
2423
2603
  * sessions) — plus `needs_you` (`"contract" | "question" | "approval" | "auth" |
2424
2604
  * null`), `needs_you_label` (the daemon-owned wording, so every client says
2425
2605
  * the same thing), `question_prompt`, `auth_message`, `auth_wait_secs`,
2426
- * `failure_kind` (`"budget_exhausted" | "auth_required" | "configuration" |
2427
- * "infrastructure" | "error"` when failed), `worktree` (only when it still exists on disk),
2606
+ * `state` may be `"verifying"`. `failure_kind` (`"checks_red" | "stalled" | "no_progress" | "cancelled" | "inference_unavailable" |
2607
+ * "model_not_found" | "engine_fallback_then_failed" | "delivery_failed" | "interrupted" |
2608
+ * "budget_exhausted" | "auth_required" | "configuration" | "infrastructure" | "verification" | "error"`
2609
+ * when failed), `worktree` (only when it still exists on disk),
2428
2610
  * `project`, `result_branch`, `model`, `discussion_id`, and `next_seq` (live
2429
2611
  * only — the `coder.subscribe` cursor).
2430
2612
  *
@@ -2438,6 +2620,18 @@ export class CarRuntime {
2438
2620
  /** Stop receiving `coder.session_changed` on this connection. */
2439
2621
  coderUnwatch(): Promise<string>;
2440
2622
 
2623
+ /**
2624
+ * Rerun a pending native review's accepted checks against the task's current
2625
+ * files and restage the diff — no inference, no replanning. Available when
2626
+ * `coderGet` reports `review_refresh_available`.
2627
+ *
2628
+ * Returns `{state: "running", review_refresh: true}`; the outcome arrives on
2629
+ * the event stream. Passing checks return the session to `needs_approval`
2630
+ * with a new diff; failing checks fail it and keep the worktree. Delivery
2631
+ * still needs a separate `coderApproveMerge`.
2632
+ */
2633
+ coderRefreshReview(sessionId: string): Promise<string>;
2634
+
2441
2635
  /**
2442
2636
  * Redraft a PROPOSED outcome contract from a plain-English request (e.g.
2443
2637
  * "also verify the Windows path"). Legal only in `contract_proposed`;
@@ -2479,12 +2673,17 @@ export class CarRuntime {
2479
2673
  */
2480
2674
  coderDiscussPromote(discussionId: string): Promise<string>;
2481
2675
 
2482
- /** Free an in-memory discussion. Discussions do not survive a daemon restart. */
2676
+ /**
2677
+ * Close a live discussion now, cancelling any turn in flight. A discussion
2678
+ * otherwise outlives the connection that opened it; it stays saved and
2679
+ * reopens with `coderDiscussStart(repo, resumeId)`.
2680
+ */
2483
2681
  coderDiscussClose(discussionId: string): Promise<string>;
2484
2682
 
2485
2683
  /**
2486
- * Open discussions: `{discussions: [{discussion_id, repo, created_at,
2487
- * turns}]}`. Also the capability probe — a daemon predating this surface
2684
+ * The caller's principal's discussions: `{discussions: [{discussion_id,
2685
+ * repo, created_at, turns, answering}], saved: [{discussion_id, repo,
2686
+ * created_at}]}`. Also the capability probe — a daemon predating this surface
2488
2687
  * answers JSON-RPC `-32601`.
2489
2688
  */
2490
2689
  coderDiscussList(): Promise<string>;
@@ -2525,9 +2724,13 @@ export class CarRuntime {
2525
2724
  declagentRemove(id: string): Promise<string>;
2526
2725
  /** Enable or disable a declarative agent. */
2527
2726
  declagentSetEnabled(id: string, enabled: boolean): Promise<string>;
2727
+ /** Restore the immediately preceding registered spec under the same id. */
2728
+ declagentRevert(id: string): Promise<string>;
2729
+ /** Re-run all stored acceptance scenarios through the build evaluator. */
2730
+ declagentRunScenarios(id: string): Promise<string>;
2528
2731
  /**
2529
- * Run a declarative agent on an input, in-daemon (no external process).
2530
- * Returns `{ output, turns, tool_calls, error? }` JSON.
2732
+ * Run a declarative agent on an input with its saved inference selection.
2733
+ * Returns `{ output, turns, tool_calls, model_served?, error? }` JSON.
2531
2734
  */
2532
2735
  declagentInvoke(id: string, input: string): Promise<string>;
2533
2736
  /**
@@ -3108,12 +3311,18 @@ export class HostClient {
3108
3311
  /** Generated host wrapper for `agent_permissions.evaluate_tool`. */
3109
3312
  agentPermissionsEvaluateTool(paramsJson: string): Promise<string>;
3110
3313
 
3314
+ /** Generated host wrapper for `agent_permissions.list_grants`. */
3315
+ agentPermissionsListGrants(paramsJson: string): Promise<string>;
3316
+
3111
3317
  /** Generated host wrapper for `agent_permissions.reset`. */
3112
3318
  agentPermissionsReset(paramsJson: string): Promise<string>;
3113
3319
 
3114
3320
  /** Generated host wrapper for `agent_permissions.reset_tool`. */
3115
3321
  agentPermissionsResetTool(paramsJson: string): Promise<string>;
3116
3322
 
3323
+ /** Generated host wrapper for `agent_permissions.revoke_grant`. */
3324
+ agentPermissionsRevokeGrant(paramsJson: string): Promise<string>;
3325
+
3117
3326
  /** Generated host wrapper for `agent_permissions.set`. */
3118
3327
  agentPermissionsSet(paramsJson: string): Promise<string>;
3119
3328
 
@@ -3126,6 +3335,12 @@ export class HostClient {
3126
3335
  /** Generated host wrapper for `agents.install`. */
3127
3336
  agentsInstall(paramsJson: string): Promise<string>;
3128
3337
 
3338
+ /** Generated host wrapper for `agents.message.approve`. */
3339
+ agentsMessageApprove(paramsJson: string): Promise<string>;
3340
+
3341
+ /** Generated host wrapper for `agents.message.pending`. */
3342
+ agentsMessagePending(paramsJson: string): Promise<string>;
3343
+
3129
3344
  /** Generated host wrapper for `agents.remove`. */
3130
3345
  agentsRemove(paramsJson: string): Promise<string>;
3131
3346
 
@@ -3147,12 +3362,27 @@ export class HostClient {
3147
3362
  /** Generated host wrapper for `auth.completion_status`. */
3148
3363
  authCompletionStatus(paramsJson: string): Promise<string>;
3149
3364
 
3365
+ /** Generated host wrapper for `auth.default_context.clear`. */
3366
+ authDefaultContextClear(paramsJson: string): Promise<string>;
3367
+
3368
+ /** Generated host wrapper for `auth.default_context.get`. */
3369
+ authDefaultContextGet(paramsJson: string): Promise<string>;
3370
+
3371
+ /** Generated host wrapper for `auth.default_context.set`. */
3372
+ authDefaultContextSet(paramsJson: string): Promise<string>;
3373
+
3150
3374
  /** Generated host wrapper for `auth.logout`. */
3151
3375
  authLogout(paramsJson: string): Promise<string>;
3152
3376
 
3377
+ /** Generated host wrapper for `auth.organizations`. */
3378
+ authOrganizations(paramsJson: string): Promise<string>;
3379
+
3153
3380
  /** Generated host wrapper for `auth.remove_account`. */
3154
3381
  authRemoveAccount(paramsJson: string): Promise<string>;
3155
3382
 
3383
+ /** Generated host wrapper for `auth.resolve_context`. */
3384
+ authResolveContext(paramsJson: string): Promise<string>;
3385
+
3156
3386
  /** Generated host wrapper for `auth.snapshot`. */
3157
3387
  authSnapshot(paramsJson: string): Promise<string>;
3158
3388
 
@@ -3168,15 +3398,72 @@ export class HostClient {
3168
3398
  /** Generated host wrapper for `auth.switch_org`. */
3169
3399
  authSwitchOrg(paramsJson: string): Promise<string>;
3170
3400
 
3401
+ /** Generated host wrapper for `concierge.maintain`. */
3402
+ conciergeMaintain(paramsJson: string): Promise<string>;
3403
+
3171
3404
  /** Generated host wrapper for `declagents.remove`. */
3172
3405
  declagentsRemove(paramsJson: string): Promise<string>;
3173
3406
 
3407
+ /** Generated host wrapper for `declagents.revert`. */
3408
+ declagentsRevert(paramsJson: string): Promise<string>;
3409
+
3174
3410
  /** Generated host wrapper for `declagents.set_enabled`. */
3175
3411
  declagentsSetEnabled(paramsJson: string): Promise<string>;
3176
3412
 
3177
3413
  /** Generated host wrapper for `diagnostics.secret_store_activity`. */
3178
3414
  diagnosticsSecretStoreActivity(paramsJson: string): Promise<string>;
3179
3415
 
3416
+ /** Generated host wrapper for `lattice.connect.accept`. */
3417
+ latticeConnectAccept(paramsJson: string): Promise<string>;
3418
+
3419
+ /** Generated host wrapper for `lattice.connect.confirm`. */
3420
+ latticeConnectConfirm(paramsJson: string): Promise<string>;
3421
+
3422
+ /** Generated host wrapper for `lattice.connect.inspect`. */
3423
+ latticeConnectInspect(paramsJson: string): Promise<string>;
3424
+
3425
+ /** Generated host wrapper for `lattice.connect.invite`. */
3426
+ latticeConnectInvite(paramsJson: string): Promise<string>;
3427
+
3428
+ /** Generated host wrapper for `lattice.connect.share`. */
3429
+ latticeConnectShare(paramsJson: string): Promise<string>;
3430
+
3431
+ /** Generated host wrapper for `lattice.connections`. */
3432
+ latticeConnections(paramsJson: string): Promise<string>;
3433
+
3434
+ /** Generated host wrapper for `lattice.directory`. */
3435
+ latticeDirectory(paramsJson: string): Promise<string>;
3436
+
3437
+ /** Generated host wrapper for `lattice.disconnect`. */
3438
+ latticeDisconnect(paramsJson: string): Promise<string>;
3439
+
3440
+ /** Generated host wrapper for `lattice.org.attest`. */
3441
+ latticeOrgAttest(paramsJson: string): Promise<string>;
3442
+
3443
+ /** Generated host wrapper for `lattice.org.policy`. */
3444
+ latticeOrgPolicy(paramsJson: string): Promise<string>;
3445
+
3446
+ /** Generated host wrapper for `lattice.org.revoke`. */
3447
+ latticeOrgRevoke(paramsJson: string): Promise<string>;
3448
+
3449
+ /** Generated host wrapper for `lattice.org.rule.add`. */
3450
+ latticeOrgRuleAdd(paramsJson: string): Promise<string>;
3451
+
3452
+ /** Generated host wrapper for `lattice.org.rule.remove`. */
3453
+ latticeOrgRuleRemove(paramsJson: string): Promise<string>;
3454
+
3455
+ /** Generated host wrapper for `lattice.org.rules`. */
3456
+ latticeOrgRules(paramsJson: string): Promise<string>;
3457
+
3458
+ /** Generated host wrapper for `lattice.org.status`. */
3459
+ latticeOrgStatus(paramsJson: string): Promise<string>;
3460
+
3461
+ /** Generated host wrapper for `lattice.requests`. */
3462
+ latticeRequests(paramsJson: string): Promise<string>;
3463
+
3464
+ /** Generated host wrapper for `lattice.respond`. */
3465
+ latticeRespond(paramsJson: string): Promise<string>;
3466
+
3180
3467
  /** Generated host wrapper for `messaging.config.get`. */
3181
3468
  messagingConfigGet(paramsJson: string): Promise<string>;
3182
3469
 
@@ -3210,6 +3497,9 @@ export class HostClient {
3210
3497
  /** Generated host wrapper for `models.resource_policy.set`. */
3211
3498
  modelsResourcePolicySet(paramsJson: string): Promise<string>;
3212
3499
 
3500
+ /** Generated host wrapper for `models.retire`. */
3501
+ modelsRetire(paramsJson: string): Promise<string>;
3502
+
3213
3503
  /** Generated host wrapper for `models.storage_roots`. */
3214
3504
  modelsStorageRoots(paramsJson: string): Promise<string>;
3215
3505
 
@@ -3669,7 +3959,11 @@ export type VoiceTurnEvent =
3669
3959
  /**
3670
3960
  * Dispatch a voice-turn utterance through the two-track sidecar pattern.
3671
3961
  *
3672
- * Returns `{"turn_id": N}` (JSON-encoded) synchronously. Subsequent
3962
+ * Returns `{"turn_id": N}` (JSON-encoded) once the utterance is routed:
3963
+ * where the OS's on-device model is available it classifies the utterance
3964
+ * first (~0.4 s, at most ~2 s). A dispatch superseded while it is being
3965
+ * classified, by a newer dispatch or `cancelVoiceTurn`, rejects instead of
3966
+ * returning a turn id. Subsequent
3673
3967
  * fast deltas, bridge phrases, sidecar results, errors, and
3674
3968
  * cancellations flow through the JS callback registered via
3675
3969
  * `registerVoiceEventHandler` as JSON-encoded `VoiceTurnEvent` objects.
@@ -4801,8 +5095,11 @@ export function evolutionEvaluate(
4801
5095
  * authorization (survey §3.5/§5.2.3). `humanApproved=true` applies under the
4802
5096
  * HITL path — the only path that may land a safety-affecting mutation;
4803
5097
  * otherwise `decisionJson` (a `PromotionDecision`) must be `promote` and the
4804
- * mutation must be non-safety. Returns `{ config, rollback }` (the updated
4805
- * config and the inverse patch that restores it), or throws when refused.
5098
+ * mutation must be non-safety — which means both a non-safety-affecting
5099
+ * component AND a patch that leaves model-facing text (`prompt_overlay`,
5100
+ * `tool_description_overlay`) alone. Returns `{ config, rollback }` (the
5101
+ * updated config and the inverse patch that restores it), or throws when
5102
+ * refused.
4806
5103
  */
4807
5104
  export function evolutionApply(
4808
5105
  configJson: string,
@@ -5536,6 +5833,7 @@ export function agentsHealthExternal(
5536
5833
  * "cwd"?: string, // working directory
5537
5834
  * "allowed_tools"?: string[], // tool allowlist; [] denies all
5538
5835
  * "max_turns"?: number, // turn cap
5836
+ * "isolate_network"?: boolean, // no web, browser, connectors, MCP; shell offline
5539
5837
  * "timeout_secs"?: number, // hard deadline (default 300s)
5540
5838
  * "mcp_endpoint"?: string, // MCP server URL passed via
5541
5839
  * // --mcp-config; daemon callers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.55.0",
3
+ "version": "0.56.1",
4
4
  "carProtocolVersion": 3,
5
5
  "description": "Common Agent Runtime — a deterministic execution layer for AI agents",
6
6
  "main": "index.js",