car-runtime 0.28.0 → 0.30.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 +94 -7
- 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
|
|
@@ -536,6 +554,54 @@ export class CarRuntime {
|
|
|
536
554
|
*/
|
|
537
555
|
registerModel(schemaJson: string): Promise<string>;
|
|
538
556
|
|
|
557
|
+
/**
|
|
558
|
+
* `messaging.config.get` — read the multi-channel approval-transport config
|
|
559
|
+
* for one channel (enabled flag, allowlisted handles, whether a pairing is
|
|
560
|
+
* in flight). Host/local-auth gated on the daemon.
|
|
561
|
+
*
|
|
562
|
+
* `requestJson` is an optional `{ channel? }` selector — `channel` is
|
|
563
|
+
* `"imessage"` | `"slack"`, default `"imessage"`. Pass `"{}"` or omit it for
|
|
564
|
+
* the iMessage (back-compat) channel.
|
|
565
|
+
*
|
|
566
|
+
* Returns `MessagingConfigView` JSON. The view always carries a `channel`
|
|
567
|
+
* key naming which channel it describes (`"imessage"` | `"slack"`).
|
|
568
|
+
*/
|
|
569
|
+
messagingConfigGet(requestJson?: string): Promise<string>;
|
|
570
|
+
|
|
571
|
+
/**
|
|
572
|
+
* `messaging.config.set` — mutate one channel's approval-transport config.
|
|
573
|
+
* The ONLY allowlist/config-mutation path; host/local-auth gated.
|
|
574
|
+
* `requestJson` is a `MessagingConfigSetRequest`
|
|
575
|
+
* (`{ channel?, enabled?, allowlisted_handles?, add_handles?, remove_handles?,
|
|
576
|
+
* bot_token?, app_token? }`).
|
|
577
|
+
* `channel` is `"imessage"` | `"slack"`, default `"imessage"` when absent
|
|
578
|
+
* (back-compat). For `channel: "slack"`, supplying BOTH `bot_token` (`xoxb-`)
|
|
579
|
+
* and `app_token` (`xapp-`) provisions them into the OS keychain (MC-9) and
|
|
580
|
+
* persists only a keychain reference into the config — the bearer values are
|
|
581
|
+
* never stored on disk nor echoed back.
|
|
582
|
+
* Returns the updated `MessagingConfigView` JSON (with its `channel` key).
|
|
583
|
+
*/
|
|
584
|
+
messagingConfigSet(requestJson: string): Promise<string>;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* `messaging.pairing.start` — mint a fresh high-entropy pairing code for one
|
|
588
|
+
* channel to display ONLY in the local UI; the paired device sends it back
|
|
589
|
+
* to bind its handle. Host/local-auth gated.
|
|
590
|
+
*
|
|
591
|
+
* `requestJson` is an optional `{ channel? }` selector (`"imessage"` |
|
|
592
|
+
* `"slack"`, default `"imessage"`). Returns `MessagingPairingStartResponse`
|
|
593
|
+
* JSON (`{ pairing_code, config }`).
|
|
594
|
+
*/
|
|
595
|
+
messagingPairingStart(requestJson?: string): Promise<string>;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* `messaging.pairing.status` — whether a pairing is in flight on one channel
|
|
599
|
+
* and (host gated) the active code. `requestJson` is an optional
|
|
600
|
+
* `{ channel? }` selector (`"imessage"` | `"slack"`, default `"imessage"`).
|
|
601
|
+
* Returns `MessagingPairingStatusResponse` JSON.
|
|
602
|
+
*/
|
|
603
|
+
messagingPairingStatus(requestJson?: string): Promise<string>;
|
|
604
|
+
|
|
539
605
|
/**
|
|
540
606
|
* Recommend models for this machine + intent. `useCase`/`tier` are
|
|
541
607
|
* snake_case enum values (e.g. "coding", "most_capable"); `cloudOk` lets
|
|
@@ -661,9 +727,11 @@ export class CarRuntime {
|
|
|
661
727
|
/**
|
|
662
728
|
* AgentDNS-style discovery: resolve a natural-language need into ranked
|
|
663
729
|
* CAR-local services, each named under `agentdns://org/category/name`.
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
730
|
+
* Providers: declarative agents, observe-only registry services
|
|
731
|
+
* (`~/.car/registry/`, kind `registry`), MCP connector tools, external
|
|
732
|
+
* CLIs, A2A peers, and an opt-in remote root. Returns `{ services: [{
|
|
733
|
+
* identifier, name, kind, protocol, score, similarity }], count }` JSON.
|
|
734
|
+
* `limit` caps results (clamped to [1, 50]; null = default 5).
|
|
667
735
|
*/
|
|
668
736
|
discoveryResolve(need: string, limit?: number | undefined | null): Promise<string>;
|
|
669
737
|
/**
|
|
@@ -870,7 +938,13 @@ export class CarRuntime {
|
|
|
870
938
|
/** Returns JSON `{domains: [...]}` listing every permission domain CAR knows. */
|
|
871
939
|
permissionDomains(): string;
|
|
872
940
|
|
|
873
|
-
/**
|
|
941
|
+
/**
|
|
942
|
+
* Returns JSON `{ domain, status, target_bundle_id }`. `status` is one of
|
|
943
|
+
* `granted` | `denied` | `not_determined` | `restricted` | `not_applicable` |
|
|
944
|
+
* `restart_required` | `signature_changed` | `unknown`. The `calendar` domain
|
|
945
|
+
* additionally reports a real, non-prompting EventKit query and can return
|
|
946
|
+
* `write_only` (macOS-14 write-only calendar grant).
|
|
947
|
+
*/
|
|
874
948
|
permissionStatus(domain: string, targetBundleId?: string | null): string;
|
|
875
949
|
|
|
876
950
|
/** Triggers the OS permission prompt; returns the resulting status. */
|
|
@@ -897,8 +971,15 @@ export class CarRuntime {
|
|
|
897
971
|
calendarList(): string;
|
|
898
972
|
|
|
899
973
|
/**
|
|
900
|
-
* Returns JSON
|
|
901
|
-
*
|
|
974
|
+
* Returns JSON for events in the [start, end] window. Times are RFC3339;
|
|
975
|
+
* `calendarIdsCsv` is an optional comma-separated filter.
|
|
976
|
+
*
|
|
977
|
+
* Each event carries `status` (`confirmed`|`tentative`|`canceled`|`none`,
|
|
978
|
+
* from `EKEvent.status`) and `attendees` as objects (not bare names):
|
|
979
|
+
* `{ name?, email?, status?, role?, is_current_user }` where `status` is
|
|
980
|
+
* `accepted`|`declined`|`tentative`|`pending`|… (`EKParticipant.participantStatus`)
|
|
981
|
+
* and `role` is `required`|`optional`|`chair`|`non_participant`|`unknown` — so a
|
|
982
|
+
* consumer can tell a firm commitment from a tentative RSVP.
|
|
902
983
|
*/
|
|
903
984
|
calendarEvents(
|
|
904
985
|
startRfc3339: string,
|
|
@@ -909,7 +990,9 @@ export class CarRuntime {
|
|
|
909
990
|
/**
|
|
910
991
|
* Create a calendar event. `inputJson` is JSON-encoded
|
|
911
992
|
* `{ calendar_id, title, start, end, all_day?, notes?, location?, url? }`
|
|
912
|
-
* with RFC3339 timestamps. Returns JSON-encoded EventMutationResult
|
|
993
|
+
* with RFC3339 timestamps. Returns JSON-encoded EventMutationResult; its
|
|
994
|
+
* embedded `event` carries the same enriched shape as `calendarEvents`
|
|
995
|
+
* (attendee objects with RSVP status + event `status`).
|
|
913
996
|
*/
|
|
914
997
|
calendarCreateEvent(inputJson: string): string;
|
|
915
998
|
|
|
@@ -1544,11 +1627,15 @@ export function getMeeting(
|
|
|
1544
1627
|
* "dashboard_url": "http://127.0.0.1:8731",
|
|
1545
1628
|
* "status": "running",
|
|
1546
1629
|
* "display_name": "Trader (paper)",
|
|
1630
|
+
* "capability": "places stock trades through Alpaca",
|
|
1547
1631
|
* "port": 8731,
|
|
1548
1632
|
* "pid": 12345
|
|
1549
1633
|
* }
|
|
1550
1634
|
* ```
|
|
1551
1635
|
* `name` and `dashboard_url` are required; the rest are optional.
|
|
1636
|
+
* `capability` is a natural-language description that lets
|
|
1637
|
+
* `discoveryResolve` rank this service against a need — without it the
|
|
1638
|
+
* service still resolves but ranks on its label alone.
|
|
1552
1639
|
* Returns `"null"` on success.
|
|
1553
1640
|
*/
|
|
1554
1641
|
export function registerAgent(
|