car-runtime 0.49.0 → 0.50.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.
Files changed (2) hide show
  1. package/index.d.ts +34 -11
  2. 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
@@ -445,6 +444,12 @@ export class CarRuntime {
445
444
  syncStatus(requestJson: string): Promise<string>;
446
445
  /** `sync.append` — record an op on any surface: `{ surface, payload, scope? }` (B6). */
447
446
  syncAppend(requestJson: string): Promise<string>;
447
+ /** Store/load exact supervised-assistant checkpoints in the durable oplog. */
448
+ syncAssistantCheckpointPut(requestJson: string): Promise<string>;
449
+ syncAssistantCheckpointGet(requestJson: string): Promise<string>;
450
+ /** Append/load monotone supervised-action lifecycle records. */
451
+ syncAssistantActionPut(requestJson: string): Promise<string>;
452
+ syncAssistantActionGet(requestJson: string): Promise<string>;
448
453
  /** `sync.record_turn` — route a conversation turn through the oplog so `syncResume` is real (B6). */
449
454
  syncRecordTurn(requestJson: string): Promise<string>;
450
455
  /** `sync.record_intent` — write the leased-execution intent ledger; feeds the fence oracle (B6). */
@@ -943,14 +948,28 @@ export class CarRuntime {
943
948
  /** Download a model. Returns its local path. */
944
949
  pullModel(name: string): Promise<string>;
945
950
 
946
- /** Remove a downloaded model. */
947
- removeModel(name: string): void;
951
+ /** Remove only a receipt-backed CAR-managed artifact. Returns result JSON. */
952
+ removeModel(modelId: string): Promise<string>;
953
+
954
+ /** Adopt an already-usable local artifact into CAR ownership. */
955
+ adoptModel(modelId: string): Promise<string>;
956
+
957
+ /** Read the saved local-model resource policy and evaluated budget. */
958
+ modelResourcePolicyGet(): Promise<string>;
959
+
960
+ /** Persist an exact resource-policy JSON object. */
961
+ modelResourcePolicySet(policyJson: string): Promise<string>;
962
+
963
+ /** Evaluate one local model without downloading or loading it. */
964
+ modelPreflight(modelId: string, contextTokens?: number): Promise<string>;
948
965
 
949
966
  /**
950
967
  * Unified registry (local + remote). Returns JSON array of
951
968
  * `{ id, name, provider, capabilities, param_count, size_mb,
952
- * context_length, available, is_local, weights_ready, downloads_weights,
953
- * max_output_tokens, public_benchmarks, cost }`. `available` means CAR
969
+ * context_length, available, is_local, operator_managed_external_runtime,
970
+ * weights_ready, downloads_weights,
971
+ * max_output_tokens, public_benchmarks, cost, car_enabled, can_remove,
972
+ * in_use, management_evidence }`. `available` means CAR
954
973
  * can use the model
955
974
  * here — for a local MLX entry with a declared `hf_repo` it is `true`
956
975
  * before a byte is fetched, because it lazy-downloads on first use —
@@ -958,13 +977,17 @@ export class CarRuntime {
958
977
  * models, having none to install, report `true`). Older daemons omit
959
978
  * `weights_ready`; it defaults to `false` rather than failing.
960
979
  * `downloads_weights` is `true` only for entries whose weights CAR fetches
961
- * before use (GGUF, MLX, whisper.cpp); when it is `false` — OS-provided
962
- * models such as `windows/speech-synthesis:os` and
963
- * `apple/foundation:default`, server-backed local models such as
964
- * `vllm-mlx/*` and Ollama, and every remote entry — there is nothing to
980
+ * before use (GGUF, MLX, whisper.cpp, and CAR-owned managed vLLM-MLX).
981
+ * When it is `false` — OS-provided models such as
982
+ * `windows/speech-synthesis:os` and `apple/foundation:default`,
983
+ * operator-managed servers such as raw vLLM-MLX and Ollama, and every
984
+ * remote entry — there is nothing to
965
985
  * install, so `weights_ready` is meaningless and the CLI renders
966
- * `INSTALLED` as `-`. Do not substitute `is_local`: those first four are
967
- * all local and all download nothing. Older daemons omit
986
+ * `INSTALLED` as `-`. Do not substitute `is_local`: OS-provided models are
987
+ * local but download nothing. A raw external vLLM-MLX row instead
988
+ * sets `operator_managed_external_runtime=true` and is not local, even for
989
+ * a loopback endpoint; only CAR-owned managed vLLM-MLX is charged and
990
+ * supervised as local. Older daemons omit
968
991
  * `downloads_weights`; it defaults to `false` rather than failing.
969
992
  * `max_output_tokens` is the registry-declared
970
993
  * per-model output ceiling (`null` when the entry omits it; callers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.49.0",
3
+ "version": "0.50.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",