car-runtime 0.8.0 → 0.8.1
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 +19 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1514,6 +1514,11 @@ export function agentsInvokeExternal(
|
|
|
1514
1514
|
): Promise<string>;
|
|
1515
1515
|
|
|
1516
1516
|
// --- A2UI surface store (car-a2ui) ---
|
|
1517
|
+
//
|
|
1518
|
+
// NOTE: NAPI-rs converts `a2ui_*` snake-case Rust names to `a2Ui*`
|
|
1519
|
+
// camelCase at the JS boundary because the digit→letter transition
|
|
1520
|
+
// after `a2` is treated as a word boundary by heck's casing rules.
|
|
1521
|
+
// Names below match the actual runtime exports.
|
|
1517
1522
|
|
|
1518
1523
|
/**
|
|
1519
1524
|
* Process-singleton in-process A2UI v0.9 surface store. Wire shapes
|
|
@@ -1527,7 +1532,7 @@ export function agentsInvokeExternal(
|
|
|
1527
1532
|
* Returns JSON `A2uiCapabilities` (version, mimeType, catalogs,
|
|
1528
1533
|
* components, limits).
|
|
1529
1534
|
*/
|
|
1530
|
-
export function
|
|
1535
|
+
export function a2UiCapabilities(): string;
|
|
1531
1536
|
|
|
1532
1537
|
/**
|
|
1533
1538
|
* Apply a single A2UI envelope (`createSurface` | `updateComponents`
|
|
@@ -1535,7 +1540,7 @@ export function a2uiCapabilities(): string;
|
|
|
1535
1540
|
* direct envelope shape (one message field set). Returns JSON
|
|
1536
1541
|
* `A2uiApplyResult` `{surfaceId, deleted, surface?}`.
|
|
1537
1542
|
*/
|
|
1538
|
-
export function
|
|
1543
|
+
export function a2UiApply(envelopeJson: string): Promise<string>;
|
|
1539
1544
|
|
|
1540
1545
|
/**
|
|
1541
1546
|
* Extract A2UI envelopes from a carrier payload (`{a2ui: {...}}`,
|
|
@@ -1543,29 +1548,36 @@ export function a2uiApply(envelopeJson: string): Promise<string>;
|
|
|
1543
1548
|
* Owner is auto-extracted from A2A `taskId`/`contextId` shapes.
|
|
1544
1549
|
* Returns JSON `{applied: [A2uiApplyResult]}`.
|
|
1545
1550
|
*/
|
|
1546
|
-
export function
|
|
1551
|
+
export function a2UiIngest(payloadJson: string): Promise<string>;
|
|
1547
1552
|
|
|
1548
1553
|
/**
|
|
1549
1554
|
* List all live A2UI surfaces in the in-process store. Returns
|
|
1550
1555
|
* JSON `[A2uiSurface]`.
|
|
1551
1556
|
*/
|
|
1552
|
-
export function
|
|
1557
|
+
export function a2UiSurfaces(): Promise<string>;
|
|
1553
1558
|
|
|
1554
1559
|
/**
|
|
1555
1560
|
* Fetch a surface by id. Returns JSON `A2uiSurface` or `null` if
|
|
1556
1561
|
* the surface doesn't exist.
|
|
1557
1562
|
*/
|
|
1558
|
-
export function
|
|
1563
|
+
export function a2UiGet(surfaceId: string): Promise<string>;
|
|
1559
1564
|
|
|
1560
1565
|
/**
|
|
1561
1566
|
* Reap surfaces older than `limits.maxSurfaceAgeSecs`. Returns JSON
|
|
1562
1567
|
* `{removed: [surfaceId]}` — empty array when nothing was due.
|
|
1563
1568
|
*/
|
|
1564
|
-
export function
|
|
1569
|
+
export function a2UiReap(): Promise<string>;
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Submit an A2UI user action (e.g. button click) back to the action
|
|
1573
|
+
* handler. `actionJson` is the action payload. Returns JSON
|
|
1574
|
+
* `{accepted: boolean, result?: any}`.
|
|
1575
|
+
*/
|
|
1576
|
+
export function a2UiAction(actionJson: string): Promise<string>;
|
|
1565
1577
|
|
|
1566
1578
|
/**
|
|
1567
1579
|
* Validate a JSON payload against the store's size limits. Returns
|
|
1568
1580
|
* JSON `null` on success; rejects with a limit-exceeded error
|
|
1569
1581
|
* message otherwise.
|
|
1570
1582
|
*/
|
|
1571
|
-
export function
|
|
1583
|
+
export function a2UiValidatePayload(valueJson: string): string;
|