car-runtime 0.50.0 → 0.52.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.
@@ -0,0 +1,10 @@
1
+ # WebSocket JSON-RPC protocol reference
2
+
3
+ Not bundled in this package by default — the full reference is roughly
4
+ 510KB (see `docs/proposals/public-docs-unification.md` in the CAR source
5
+ repo for the size accounting), which is too large to add to every install.
6
+
7
+ Read it at: https://car.parslee.ai/websocket-protocol.md
8
+
9
+ That page is published verbatim, at every release, from the same
10
+ `docs/websocket-protocol.md` this stub was generated alongside.
package/index.d.ts CHANGED
@@ -420,6 +420,24 @@ export class CarRuntime {
420
420
  * dispatches the chosen components.
421
421
  */
422
422
  planEvolutionLive(requestJson: string): Promise<string>;
423
+ /**
424
+ * `memory.set_admission_table` — install or clear the durable-state
425
+ * admission rules: `{ table?: OwnershipTable | null }` →
426
+ * `{ enabled, ungated_surfaces }`.
427
+ *
428
+ * A null or absent `table` turns the gate OFF, which is the default. Off is
429
+ * not the same as an empty table: an empty table is fail-closed and refuses
430
+ * every externally-authored fact.
431
+ */
432
+ memorySetAdmissionTable(requestJson: string): Promise<string>;
433
+ /**
434
+ * `memory.admission_table` — read back the installed admission rules: `{}` →
435
+ * `{ enabled, table, ungated_surfaces }`.
436
+ *
437
+ * `ungated_surfaces` names surfaces whose rule imposes no real constraint —
438
+ * worth checking after installing a table that only looks governed.
439
+ */
440
+ memoryAdmissionTable(requestJson: string): Promise<string>;
423
441
  /**
424
442
  * `supervision.subscribe` — register this connection as a supervisor of the
425
443
  * admission gate: `{ filter?: { tools?, sessions?, min_reversibility? } }`.
@@ -444,6 +462,14 @@ export class CarRuntime {
444
462
  syncStatus(requestJson: string): Promise<string>;
445
463
  /** `sync.append` — record an op on any surface: `{ surface, payload, scope? }` (B6). */
446
464
  syncAppend(requestJson: string): Promise<string>;
465
+ /** `agents.peers` — the agents this runtime can message, from the daemon's live connection table. */
466
+ agentsPeers(requestJson: string): Promise<string>;
467
+ /** `agents.message` — send text to one peer: `{ to, body, summary? }`. The sender is derived server-side. */
468
+ agentsMessage(requestJson: string): Promise<string>;
469
+ /** `agents.message.pending` — peer messages awaiting an operator decision. Host-only. */
470
+ agentsMessagePending(requestJson: string): Promise<string>;
471
+ /** `agents.message.approve` — release or drop one held message: `{ id, decision }`. Host-only. */
472
+ agentsMessageApprove(requestJson: string): Promise<string>;
447
473
  /** Store/load exact supervised-assistant checkpoints in the durable oplog. */
448
474
  syncAssistantCheckpointPut(requestJson: string): Promise<string>;
449
475
  syncAssistantCheckpointGet(requestJson: string): Promise<string>;
@@ -1029,6 +1055,37 @@ export class CarRuntime {
1029
1055
  */
1030
1056
  registerModel(schemaJson: string): Promise<string>;
1031
1057
 
1058
+ /**
1059
+ * `assistant.identity.get` — the name the flagship assistant answers to.
1060
+ *
1061
+ * Returns `{ name, spellings, aliases, user_name, brand, updated_at_unix }`.
1062
+ * `aliases` is the derived match set (name and spellings crossed with
1063
+ * "hey"/"ok"/…), longest first — hosts match wake phrases against it locally
1064
+ * so their matcher works before the daemon answers.
1065
+ *
1066
+ * `brand` is the fixed product name and never changes; `name` is what this
1067
+ * user calls the assistant. Both travel together: store copy uses the brand,
1068
+ * addressing copy uses the name.
1069
+ *
1070
+ * Ungated — a name is not a credential. A malformed `identity.json` rejects
1071
+ * rather than silently answering with the default name.
1072
+ */
1073
+ assistantIdentityGet(): Promise<string>;
1074
+
1075
+ /**
1076
+ * `assistant.identity.set` — name the assistant. Host/local-auth gated on the
1077
+ * daemon, because a rename repoints the voice wake word.
1078
+ *
1079
+ * `requestJson` is `{ name?, spellings?, user_name? }`. Every field is
1080
+ * optional and unset fields are preserved, so a caller that only knows about
1081
+ * the name cannot wipe spellings another surface wrote. Pass
1082
+ * `user_name: null` to clear it.
1083
+ *
1084
+ * Returns the updated identity JSON, in the same shape as
1085
+ * `assistantIdentityGet`.
1086
+ */
1087
+ assistantIdentitySet(requestJson: string): Promise<string>;
1088
+
1032
1089
  /**
1033
1090
  * `messaging.config.get` — read the multi-channel approval-transport config
1034
1091
  * for one channel (enabled flag, allowlisted handles, whether a pairing is
@@ -1513,6 +1570,21 @@ export class CarRuntime {
1513
1570
  /** Close any persistent browser session attached to this runtime. */
1514
1571
  browserClose(): Promise<void>;
1515
1572
 
1573
+ // `browserRun`/`browserClose` above are this runtime's OWN
1574
+ // per-connection scripted browser. Separate from that: the browser
1575
+ // DRAWER surface (`browser.view.*` / `browser.producer.*` /
1576
+ // `agent.browser.*`), which watches and drives the ASSISTANT's
1577
+ // browser (or the shared standing session) for a human at the
1578
+ // Command Deck. It is WS-only — no method here — the same decision
1579
+ // as `runs.subscribe` / `coder.subscribe`: `browser.view.*` requires
1580
+ // the host-management client (`session.auth { host_token }`, stricter
1581
+ // than `runs.subscribe`), so CarHost speaks it directly over the
1582
+ // daemon's WS. `browser.producer.*` / `agent.browser.*` is the agent
1583
+ // side of the same relay; today its only producer is the Rust
1584
+ // `car-cli` binary, so it likewise has no binding here. Full wire
1585
+ // contract: `docs/websocket-protocol.md` (`### browser`) and
1586
+ // `docs/host-protocol.md` (`Live browser view`).
1587
+
1516
1588
  /**
1517
1589
  * Register a tool with a full JSON-serialized `ToolSchema`.
1518
1590
  * `verifyProposal` validates `Action.parameters` against the schema's
@@ -2642,6 +2714,18 @@ export function equivalent(proposal1Json: string, proposal2Json: string): boolea
2642
2714
  */
2643
2715
  export function protocolVersion(): number;
2644
2716
 
2717
+ /**
2718
+ * Version of THIS `car-runtime` npm package — the client library that talks to
2719
+ * the daemon, and the number the version-skew notice compares against
2720
+ * `car-server`.
2721
+ *
2722
+ * Not the same thing as `car --version`: on macOS `/usr/local/bin/car` is a
2723
+ * symlink into `CarHost.app`, so that reports the bundled CLI. When the stale
2724
+ * component is this package the CLI's version is the wrong one to check
2725
+ * (Parslee-ai/car#1050).
2726
+ */
2727
+ export function clientVersion(): string;
2728
+
2645
2729
  /**
2646
2730
  * Check a proposal for transactional conflicts against the current shared
2647
2731
  * state (survey "Code as Agent Harness" §4.3/§5.2.4 — the shared
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "description": "Common Agent Runtime — a deterministic execution layer for AI agents",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -40,10 +40,12 @@
40
40
  "assets.json",
41
41
  "bin/car-server",
42
42
  "README.md",
43
- "LICENSE"
43
+ "LICENSE",
44
+ "docs"
44
45
  ],
45
46
  "scripts": {
46
- "install": "node install.js"
47
+ "install": "node install.js",
48
+ "prepack": "node sync-docs.js"
47
49
  },
48
50
  "license": "SEE LICENSE IN LICENSE",
49
51
  "private": false