car-runtime 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +118 -11
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
* - `openSession`, `closeSession`, `registerPolicy(sessionId)` — use
|
|
24
24
|
* `session.open` / `session.close` JSON-RPC methods
|
|
25
25
|
* - `stateSnapshot`, `stateKeys` — daemon-side endpoints pending
|
|
26
|
-
* - `removeModel` — daemon owns models_dir / models.json
|
|
27
26
|
*
|
|
28
27
|
* (`registerModel` was re-exposed in #39 — it now proxies to the
|
|
29
28
|
* daemon's `models.register` JSON-RPC. See its docstring for
|
|
@@ -421,6 +420,24 @@ export class CarRuntime {
|
|
|
421
420
|
* dispatches the chosen components.
|
|
422
421
|
*/
|
|
423
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>;
|
|
424
441
|
/**
|
|
425
442
|
* `supervision.subscribe` — register this connection as a supervisor of the
|
|
426
443
|
* admission gate: `{ filter?: { tools?, sessions?, min_reversibility? } }`.
|
|
@@ -445,6 +462,20 @@ export class CarRuntime {
|
|
|
445
462
|
syncStatus(requestJson: string): Promise<string>;
|
|
446
463
|
/** `sync.append` — record an op on any surface: `{ surface, payload, scope? }` (B6). */
|
|
447
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>;
|
|
473
|
+
/** Store/load exact supervised-assistant checkpoints in the durable oplog. */
|
|
474
|
+
syncAssistantCheckpointPut(requestJson: string): Promise<string>;
|
|
475
|
+
syncAssistantCheckpointGet(requestJson: string): Promise<string>;
|
|
476
|
+
/** Append/load monotone supervised-action lifecycle records. */
|
|
477
|
+
syncAssistantActionPut(requestJson: string): Promise<string>;
|
|
478
|
+
syncAssistantActionGet(requestJson: string): Promise<string>;
|
|
448
479
|
/** `sync.record_turn` — route a conversation turn through the oplog so `syncResume` is real (B6). */
|
|
449
480
|
syncRecordTurn(requestJson: string): Promise<string>;
|
|
450
481
|
/** `sync.record_intent` — write the leased-execution intent ledger; feeds the fence oracle (B6). */
|
|
@@ -943,14 +974,28 @@ export class CarRuntime {
|
|
|
943
974
|
/** Download a model. Returns its local path. */
|
|
944
975
|
pullModel(name: string): Promise<string>;
|
|
945
976
|
|
|
946
|
-
/** Remove a
|
|
947
|
-
removeModel(
|
|
977
|
+
/** Remove only a receipt-backed CAR-managed artifact. Returns result JSON. */
|
|
978
|
+
removeModel(modelId: string): Promise<string>;
|
|
979
|
+
|
|
980
|
+
/** Adopt an already-usable local artifact into CAR ownership. */
|
|
981
|
+
adoptModel(modelId: string): Promise<string>;
|
|
982
|
+
|
|
983
|
+
/** Read the saved local-model resource policy and evaluated budget. */
|
|
984
|
+
modelResourcePolicyGet(): Promise<string>;
|
|
985
|
+
|
|
986
|
+
/** Persist an exact resource-policy JSON object. */
|
|
987
|
+
modelResourcePolicySet(policyJson: string): Promise<string>;
|
|
988
|
+
|
|
989
|
+
/** Evaluate one local model without downloading or loading it. */
|
|
990
|
+
modelPreflight(modelId: string, contextTokens?: number): Promise<string>;
|
|
948
991
|
|
|
949
992
|
/**
|
|
950
993
|
* Unified registry (local + remote). Returns JSON array of
|
|
951
994
|
* `{ id, name, provider, capabilities, param_count, size_mb,
|
|
952
|
-
* context_length, available, is_local,
|
|
953
|
-
*
|
|
995
|
+
* context_length, available, is_local, operator_managed_external_runtime,
|
|
996
|
+
* weights_ready, downloads_weights,
|
|
997
|
+
* max_output_tokens, public_benchmarks, cost, car_enabled, can_remove,
|
|
998
|
+
* in_use, management_evidence }`. `available` means CAR
|
|
954
999
|
* can use the model
|
|
955
1000
|
* here — for a local MLX entry with a declared `hf_repo` it is `true`
|
|
956
1001
|
* before a byte is fetched, because it lazy-downloads on first use —
|
|
@@ -958,13 +1003,17 @@ export class CarRuntime {
|
|
|
958
1003
|
* models, having none to install, report `true`). Older daemons omit
|
|
959
1004
|
* `weights_ready`; it defaults to `false` rather than failing.
|
|
960
1005
|
* `downloads_weights` is `true` only for entries whose weights CAR fetches
|
|
961
|
-
* before use (GGUF, MLX, whisper.cpp
|
|
962
|
-
*
|
|
963
|
-
* `apple/foundation:default`,
|
|
964
|
-
*
|
|
1006
|
+
* before use (GGUF, MLX, whisper.cpp, and CAR-owned managed vLLM-MLX).
|
|
1007
|
+
* When it is `false` — OS-provided models such as
|
|
1008
|
+
* `windows/speech-synthesis:os` and `apple/foundation:default`,
|
|
1009
|
+
* operator-managed servers such as raw vLLM-MLX and Ollama, and every
|
|
1010
|
+
* remote entry — there is nothing to
|
|
965
1011
|
* install, so `weights_ready` is meaningless and the CLI renders
|
|
966
|
-
* `INSTALLED` as `-`. Do not substitute `is_local`:
|
|
967
|
-
*
|
|
1012
|
+
* `INSTALLED` as `-`. Do not substitute `is_local`: OS-provided models are
|
|
1013
|
+
* local but download nothing. A raw external vLLM-MLX row instead
|
|
1014
|
+
* sets `operator_managed_external_runtime=true` and is not local, even for
|
|
1015
|
+
* a loopback endpoint; only CAR-owned managed vLLM-MLX is charged and
|
|
1016
|
+
* supervised as local. Older daemons omit
|
|
968
1017
|
* `downloads_weights`; it defaults to `false` rather than failing.
|
|
969
1018
|
* `max_output_tokens` is the registry-declared
|
|
970
1019
|
* per-model output ceiling (`null` when the entry omits it; callers
|
|
@@ -1006,6 +1055,37 @@ export class CarRuntime {
|
|
|
1006
1055
|
*/
|
|
1007
1056
|
registerModel(schemaJson: string): Promise<string>;
|
|
1008
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
|
+
|
|
1009
1089
|
/**
|
|
1010
1090
|
* `messaging.config.get` — read the multi-channel approval-transport config
|
|
1011
1091
|
* for one channel (enabled flag, allowlisted handles, whether a pairing is
|
|
@@ -1490,6 +1570,21 @@ export class CarRuntime {
|
|
|
1490
1570
|
/** Close any persistent browser session attached to this runtime. */
|
|
1491
1571
|
browserClose(): Promise<void>;
|
|
1492
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
|
+
|
|
1493
1588
|
/**
|
|
1494
1589
|
* Register a tool with a full JSON-serialized `ToolSchema`.
|
|
1495
1590
|
* `verifyProposal` validates `Action.parameters` against the schema's
|
|
@@ -2619,6 +2714,18 @@ export function equivalent(proposal1Json: string, proposal2Json: string): boolea
|
|
|
2619
2714
|
*/
|
|
2620
2715
|
export function protocolVersion(): number;
|
|
2621
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
|
+
|
|
2622
2729
|
/**
|
|
2623
2730
|
* Check a proposal for transactional conflicts against the current shared
|
|
2624
2731
|
* state (survey "Code as Agent Harness" §4.3/§5.2.4 — the shared
|