car-runtime 0.27.0 → 0.29.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 +78 -8
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -394,6 +394,24 @@ export class CarRuntime {
394
394
  */
395
395
  inferTrackedWithRequest(requestJson: string): Promise<string>;
396
396
 
397
+ /**
398
+ * Generate an image from a text prompt via the daemon's installed Flux/MLX
399
+ * models. `requestJson` is a JSON-stringified `GenerateImageRequest`
400
+ * (`{ prompt, model?, width?, height?, steps?, guidance?, seed?,
401
+ * output_path?, ... }`). Returns `GenerateImageResult` JSON
402
+ * (`{ image_path, model_used, latency_ms, ... }`). The FFI analogue of the
403
+ * `image.generate` WS method (car-releases#70).
404
+ */
405
+ generateImage(requestJson: string): Promise<string>;
406
+
407
+ /**
408
+ * Generate a video from a text/image prompt via the daemon's installed
409
+ * LTX/MLX models. `requestJson` is a JSON-stringified `GenerateVideoRequest`;
410
+ * returns `GenerateVideoResult` JSON. FFI analogue of the `video.generate` WS
411
+ * method (car-releases#70).
412
+ */
413
+ generateVideo(requestJson: string): Promise<string>;
414
+
397
415
  /**
398
416
  * Build a runnable workflow from a natural-language goal via the daemon's
399
417
  * builder. `requestJson` is `{ goal, existing?, max_attempts? }`; on the
@@ -644,7 +662,15 @@ export class CarRuntime {
644
662
  * invoked }` JSON. `maxSubtasks` caps the split (clamped to [1, 10]; null =
645
663
  * default 5). With `invoke: true`, each subtask's chosen agent runs.
646
664
  */
647
- declagentRouteSplit(need: string, invoke: boolean, maxSubtasks?: number | undefined | null): Promise<string>;
665
+ declagentRouteSplit(
666
+ need: string,
667
+ invoke: boolean,
668
+ maxSubtasks?: number | undefined | null,
669
+ decompositionMode?: "vanilla" | "sad" | string | undefined | null,
670
+ sadHints?: number | undefined | null,
671
+ sadIterations?: number | undefined | null,
672
+ sadConvergenceJaccard?: number | undefined | null
673
+ ): Promise<string>;
648
674
  /**
649
675
  * Read-only view of the learned routing topology: per-agent success stats
650
676
  * and directed agent→agent edge weights. Returns `{ agents, edges }` JSON.
@@ -653,11 +679,28 @@ export class CarRuntime {
653
679
  /**
654
680
  * AgentDNS-style discovery: resolve a natural-language need into ranked
655
681
  * CAR-local services, each named under `agentdns://org/category/name`.
656
- * Returns `{ services: [{ identifier, name, kind, protocol, score,
657
- * similarity }], count }` JSON. `limit` caps results (clamped to [1, 50];
658
- * null = default 5).
682
+ * Providers: declarative agents, observe-only registry services
683
+ * (`~/.car/registry/`, kind `registry`), MCP connector tools, external
684
+ * CLIs, A2A peers, and an opt-in remote root. Returns `{ services: [{
685
+ * identifier, name, kind, protocol, score, similarity }], count }` JSON.
686
+ * `limit` caps results (clamped to [1, 50]; null = default 5).
659
687
  */
660
688
  discoveryResolve(need: string, limit?: number | undefined | null): Promise<string>;
689
+ /**
690
+ * Compose a decompose/retrieve/plan route over all discoverable services.
691
+ * Returns `{ plan, decomposition, candidates, metadata }` JSON. Planning only;
692
+ * callers invoke returned targets through existing governed surfaces.
693
+ */
694
+ discoveryRouteCompose(
695
+ need: string,
696
+ maxSubtasks?: number | undefined | null,
697
+ decompositionMode?: "vanilla" | "sad" | string | undefined | null,
698
+ sadHints?: number | undefined | null,
699
+ sadIterations?: number | undefined | null,
700
+ sadConvergenceJaccard?: number | undefined | null,
701
+ candidatesPerStep?: number | undefined | null,
702
+ rerank?: boolean
703
+ ): Promise<string>;
661
704
 
662
705
  /**
663
706
  * Build a concrete onboarding plan (machine summary, top pick, alternatives,
@@ -832,6 +875,14 @@ export class CarRuntime {
832
875
  /** Returns JSON `{exists: boolean, key, service}` without exposing the value. */
833
876
  secretStatus(key: string, service?: string | null): string;
834
877
 
878
+ /**
879
+ * List the NAMES of secrets stored through this surface. Returns JSON
880
+ * `{secrets: [{service, key, exists}]}` — never the values. Backed by the
881
+ * `~/.car/secret_index.json` name index, joined with a live existence check
882
+ * (`exists` is `null` if the backend couldn't be probed).
883
+ */
884
+ secretList(): string;
885
+
835
886
  // -------------------------------------------------------------------------
836
887
  // OS permission preflight
837
888
  // -------------------------------------------------------------------------
@@ -839,7 +890,13 @@ export class CarRuntime {
839
890
  /** Returns JSON `{domains: [...]}` listing every permission domain CAR knows. */
840
891
  permissionDomains(): string;
841
892
 
842
- /** Returns JSON `{status: "granted"|"denied"|"prompt"|"unsupported", ...}`. */
893
+ /**
894
+ * Returns JSON `{ domain, status, target_bundle_id }`. `status` is one of
895
+ * `granted` | `denied` | `not_determined` | `restricted` | `not_applicable` |
896
+ * `restart_required` | `signature_changed` | `unknown`. The `calendar` domain
897
+ * additionally reports a real, non-prompting EventKit query and can return
898
+ * `write_only` (macOS-14 write-only calendar grant).
899
+ */
843
900
  permissionStatus(domain: string, targetBundleId?: string | null): string;
844
901
 
845
902
  /** Triggers the OS permission prompt; returns the resulting status. */
@@ -866,8 +923,15 @@ export class CarRuntime {
866
923
  calendarList(): string;
867
924
 
868
925
  /**
869
- * Returns JSON array of events in the [start, end] window. Times are
870
- * RFC3339; `calendarIdsCsv` is an optional comma-separated filter.
926
+ * Returns JSON for events in the [start, end] window. Times are RFC3339;
927
+ * `calendarIdsCsv` is an optional comma-separated filter.
928
+ *
929
+ * Each event carries `status` (`confirmed`|`tentative`|`canceled`|`none`,
930
+ * from `EKEvent.status`) and `attendees` as objects (not bare names):
931
+ * `{ name?, email?, status?, role?, is_current_user }` where `status` is
932
+ * `accepted`|`declined`|`tentative`|`pending`|… (`EKParticipant.participantStatus`)
933
+ * and `role` is `required`|`optional`|`chair`|`non_participant`|`unknown` — so a
934
+ * consumer can tell a firm commitment from a tentative RSVP.
871
935
  */
872
936
  calendarEvents(
873
937
  startRfc3339: string,
@@ -878,7 +942,9 @@ export class CarRuntime {
878
942
  /**
879
943
  * Create a calendar event. `inputJson` is JSON-encoded
880
944
  * `{ calendar_id, title, start, end, all_day?, notes?, location?, url? }`
881
- * with RFC3339 timestamps. Returns JSON-encoded EventMutationResult.
945
+ * with RFC3339 timestamps. Returns JSON-encoded EventMutationResult; its
946
+ * embedded `event` carries the same enriched shape as `calendarEvents`
947
+ * (attendee objects with RSVP status + event `status`).
882
948
  */
883
949
  calendarCreateEvent(inputJson: string): string;
884
950
 
@@ -1513,11 +1579,15 @@ export function getMeeting(
1513
1579
  * "dashboard_url": "http://127.0.0.1:8731",
1514
1580
  * "status": "running",
1515
1581
  * "display_name": "Trader (paper)",
1582
+ * "capability": "places stock trades through Alpaca",
1516
1583
  * "port": 8731,
1517
1584
  * "pid": 12345
1518
1585
  * }
1519
1586
  * ```
1520
1587
  * `name` and `dashboard_url` are required; the rest are optional.
1588
+ * `capability` is a natural-language description that lets
1589
+ * `discoveryResolve` rank this service against a need — without it the
1590
+ * service still resolves but ranks on its label alone.
1521
1591
  * Returns `"null"` on success.
1522
1592
  */
1523
1593
  export function registerAgent(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.27.0",
3
+ "version": "0.29.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",