car-runtime 0.8.0 → 0.8.2

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 +21 -7
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1514,6 +1514,13 @@ export function agentsInvokeExternal(
1514
1514
  ): Promise<string>;
1515
1515
 
1516
1516
  // --- A2UI surface store (car-a2ui) ---
1517
+ //
1518
+ // NOTE: Rust source names these `a2_ui_*` (extra underscore before
1519
+ // `ui`) so napi-rs's heck casing converter produces `a2Ui*` *by
1520
+ // construction* — matching the declarations below. Earlier
1521
+ // `a2ui_*` Rust names also happened to camelCase to `a2Ui*` because
1522
+ // heck split at the digit→letter boundary, but that was accidental
1523
+ // drift; Parslee-ai/car#177 made it deliberate.
1517
1524
 
1518
1525
  /**
1519
1526
  * Process-singleton in-process A2UI v0.9 surface store. Wire shapes
@@ -1527,7 +1534,7 @@ export function agentsInvokeExternal(
1527
1534
  * Returns JSON `A2uiCapabilities` (version, mimeType, catalogs,
1528
1535
  * components, limits).
1529
1536
  */
1530
- export function a2uiCapabilities(): string;
1537
+ export function a2UiCapabilities(): string;
1531
1538
 
1532
1539
  /**
1533
1540
  * Apply a single A2UI envelope (`createSurface` | `updateComponents`
@@ -1535,7 +1542,7 @@ export function a2uiCapabilities(): string;
1535
1542
  * direct envelope shape (one message field set). Returns JSON
1536
1543
  * `A2uiApplyResult` `{surfaceId, deleted, surface?}`.
1537
1544
  */
1538
- export function a2uiApply(envelopeJson: string): Promise<string>;
1545
+ export function a2UiApply(envelopeJson: string): Promise<string>;
1539
1546
 
1540
1547
  /**
1541
1548
  * Extract A2UI envelopes from a carrier payload (`{a2ui: {...}}`,
@@ -1543,29 +1550,36 @@ export function a2uiApply(envelopeJson: string): Promise<string>;
1543
1550
  * Owner is auto-extracted from A2A `taskId`/`contextId` shapes.
1544
1551
  * Returns JSON `{applied: [A2uiApplyResult]}`.
1545
1552
  */
1546
- export function a2uiIngest(payloadJson: string): Promise<string>;
1553
+ export function a2UiIngest(payloadJson: string): Promise<string>;
1547
1554
 
1548
1555
  /**
1549
1556
  * List all live A2UI surfaces in the in-process store. Returns
1550
1557
  * JSON `[A2uiSurface]`.
1551
1558
  */
1552
- export function a2uiSurfaces(): Promise<string>;
1559
+ export function a2UiSurfaces(): Promise<string>;
1553
1560
 
1554
1561
  /**
1555
1562
  * Fetch a surface by id. Returns JSON `A2uiSurface` or `null` if
1556
1563
  * the surface doesn't exist.
1557
1564
  */
1558
- export function a2uiGet(surfaceId: string): Promise<string>;
1565
+ export function a2UiGet(surfaceId: string): Promise<string>;
1559
1566
 
1560
1567
  /**
1561
1568
  * Reap surfaces older than `limits.maxSurfaceAgeSecs`. Returns JSON
1562
1569
  * `{removed: [surfaceId]}` — empty array when nothing was due.
1563
1570
  */
1564
- export function a2uiReap(): Promise<string>;
1571
+ export function a2UiReap(): Promise<string>;
1572
+
1573
+ /**
1574
+ * Submit an A2UI user action (e.g. button click) back to the action
1575
+ * handler. `actionJson` is the action payload. Returns JSON
1576
+ * `{accepted: boolean, result?: any}`.
1577
+ */
1578
+ export function a2UiAction(actionJson: string): Promise<string>;
1565
1579
 
1566
1580
  /**
1567
1581
  * Validate a JSON payload against the store's size limits. Returns
1568
1582
  * JSON `null` on success; rejects with a limit-exceeded error
1569
1583
  * message otherwise.
1570
1584
  */
1571
- export function a2uiValidatePayload(valueJson: string): string;
1585
+ export function a2UiValidatePayload(valueJson: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "car-runtime",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "Common Agent Runtime — a deterministic execution layer for AI agents",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",