@jini-ai/agentic 0.4.1 → 0.4.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @jini-ai/agentic
|
|
2
2
|
|
|
3
|
+
## 0.4.2 — 2026-10-06
|
|
4
|
+
|
|
5
|
+
- `@jini-ai/agentic/a2ui`: `A2UI_DISPLAY_ONLY_PROPERTY` (`"displayOnly"` on `createSurface.surfaceProperties`) plus `displayOnlySurfaceIdOf` and `a2uiSurfaceIdOf` readers.
|
|
6
|
+
|
|
3
7
|
## 0.4.1 — 2026-10-04
|
|
4
8
|
|
|
5
9
|
- `createAnnotatedActionsScript` registers a published page's annotated actions with WebMCP.
|
package/dist/core/a2ui/index.js
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module surface-properties
|
|
3
|
+
*
|
|
4
|
+
* Reading facts about a surface off the raw wire messages, without an interpreter.
|
|
5
|
+
*
|
|
6
|
+
* Why a display-only marker: a host's chat pane treats a surface that arrives while its tool call is
|
|
7
|
+
* still open as a question the person must answer ("Waiting for your answer above"). That is right
|
|
8
|
+
* for a form or a choice, and wrong for a chart a tool draws and then holds its call open only to
|
|
9
|
+
* hear whether the browser refused it (Tovu demo V3, 2026-10-05). The tool that emits the surface is
|
|
10
|
+
* the only party that knows which it is, so it says so on `createSurface.surfaceProperties`, which
|
|
11
|
+
* the v1.0 schema already accepts as an open record; renderers ignore the key.
|
|
12
|
+
*/
|
|
13
|
+
/** `createSurface.surfaceProperties` key: `true` means the surface shows something and asks nothing. */
|
|
14
|
+
export declare const A2UI_DISPLAY_ONLY_PROPERTY = "displayOnly";
|
|
15
|
+
/**
|
|
16
|
+
* The `surfaceId` a surface-scoped message (create/update components/update data/delete) names, or
|
|
17
|
+
* `undefined` for any other message or a malformed value. Never throws.
|
|
18
|
+
*
|
|
19
|
+
* @complexity O(1).
|
|
20
|
+
*/
|
|
21
|
+
export declare function a2uiSurfaceIdOf({ message }: {
|
|
22
|
+
message: unknown;
|
|
23
|
+
}): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The `surfaceId` of a `createSurface` that declares {@link A2UI_DISPLAY_ONLY_PROPERTY} `true`, else
|
|
26
|
+
* `undefined`. Only `createSurface` carries surface properties, so a caller folding a stream records
|
|
27
|
+
* the id here and matches later messages with {@link a2uiSurfaceIdOf}.
|
|
28
|
+
*
|
|
29
|
+
* @complexity O(1).
|
|
30
|
+
*/
|
|
31
|
+
export declare function displayOnlySurfaceIdOf({ message }: {
|
|
32
|
+
message: unknown;
|
|
33
|
+
}): string | undefined;
|
|
34
|
+
//# sourceMappingURL=surface-properties.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module surface-properties
|
|
3
|
+
*
|
|
4
|
+
* Reading facts about a surface off the raw wire messages, without an interpreter.
|
|
5
|
+
*
|
|
6
|
+
* Why a display-only marker: a host's chat pane treats a surface that arrives while its tool call is
|
|
7
|
+
* still open as a question the person must answer ("Waiting for your answer above"). That is right
|
|
8
|
+
* for a form or a choice, and wrong for a chart a tool draws and then holds its call open only to
|
|
9
|
+
* hear whether the browser refused it (Tovu demo V3, 2026-10-05). The tool that emits the surface is
|
|
10
|
+
* the only party that knows which it is, so it says so on `createSurface.surfaceProperties`, which
|
|
11
|
+
* the v1.0 schema already accepts as an open record; renderers ignore the key.
|
|
12
|
+
*/
|
|
13
|
+
/** `createSurface.surfaceProperties` key: `true` means the surface shows something and asks nothing. */
|
|
14
|
+
export const A2UI_DISPLAY_ONLY_PROPERTY = 'displayOnly';
|
|
15
|
+
const SURFACE_SCOPED_KEYS = ['createSurface', 'updateComponents', 'updateDataModel', 'deleteSurface'];
|
|
16
|
+
function isRecord(value) {
|
|
17
|
+
return typeof value === 'object' && value !== null;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The `surfaceId` a surface-scoped message (create/update components/update data/delete) names, or
|
|
21
|
+
* `undefined` for any other message or a malformed value. Never throws.
|
|
22
|
+
*
|
|
23
|
+
* @complexity O(1).
|
|
24
|
+
*/
|
|
25
|
+
export function a2uiSurfaceIdOf({ message }) {
|
|
26
|
+
if (!isRecord(message))
|
|
27
|
+
return undefined;
|
|
28
|
+
for (const key of SURFACE_SCOPED_KEYS) {
|
|
29
|
+
const body = message[key];
|
|
30
|
+
if (isRecord(body) && typeof body.surfaceId === 'string')
|
|
31
|
+
return body.surfaceId;
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The `surfaceId` of a `createSurface` that declares {@link A2UI_DISPLAY_ONLY_PROPERTY} `true`, else
|
|
37
|
+
* `undefined`. Only `createSurface` carries surface properties, so a caller folding a stream records
|
|
38
|
+
* the id here and matches later messages with {@link a2uiSurfaceIdOf}.
|
|
39
|
+
*
|
|
40
|
+
* @complexity O(1).
|
|
41
|
+
*/
|
|
42
|
+
export function displayOnlySurfaceIdOf({ message }) {
|
|
43
|
+
const body = isRecord(message) ? message.createSurface : undefined;
|
|
44
|
+
if (!isRecord(body) || typeof body.surfaceId !== 'string')
|
|
45
|
+
return undefined;
|
|
46
|
+
const properties = body.surfaceProperties;
|
|
47
|
+
return isRecord(properties) && properties[A2UI_DISPLAY_ONLY_PROPERTY] === true ? body.surfaceId : undefined;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=surface-properties.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/agentic",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Framework-free agent-control layer: page-capability vocabulary and manifests, the data-agent-* markup convention, AG-UI projection, generative-UI streams, and A2UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|