@jini-ai/agentic 0.3.6 → 0.4.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/CHANGELOG.md +94 -0
- package/README.md +33 -6
- package/dist/core/a2ui/agent-to-renderer.d.ts +3 -1
- package/dist/core/a2ui/agent-to-renderer.js +1 -1
- package/dist/core/a2ui/catalog.d.ts +14 -5
- package/dist/core/a2ui/catalog.js +5 -5
- package/dist/core/a2ui/common-types.d.ts +11 -3
- package/dist/core/a2ui/common-types.js +5 -3
- package/dist/core/a2ui/index.d.ts +1 -1
- package/dist/core/a2ui/index.js +1 -1
- package/dist/core/a2ui/interpreter.d.ts +45 -10
- package/dist/core/a2ui/interpreter.js +38 -43
- package/dist/core/a2ui/json-pointer.d.ts +16 -4
- package/dist/core/a2ui/json-pointer.js +7 -7
- package/dist/core/a2ui/renderer-to-agent.d.ts +22 -8
- package/dist/core/a2ui/renderer-to-agent.js +5 -5
- package/dist/core/a2ui/resolve.d.ts +7 -2
- package/dist/core/a2ui/resolve.js +10 -9
- package/dist/core/a2ui/tree.d.ts +8 -2
- package/dist/core/a2ui/tree.js +2 -2
- package/dist/core/ag-ui.d.ts +17 -9
- package/dist/core/ag-ui.js +4 -4
- package/dist/core/capability.d.ts +12 -3
- package/dist/core/capability.js +3 -3
- package/dist/core/dom/dom-page-driver.d.ts +8 -4
- package/dist/core/dom/dom-page-driver.js +47 -26
- package/dist/core/dom/index.d.ts +3 -3
- package/dist/core/dom/index.js +1 -1
- package/dist/core/dom/model-context.d.ts +18 -8
- package/dist/core/dom/model-context.js +12 -15
- package/dist/core/dom/native-model-context.d.ts +6 -0
- package/dist/core/dom/native-model-context.js +19 -0
- package/dist/core/element-handles.d.ts +12 -2
- package/dist/core/element-handles.js +9 -3
- package/dist/core/gen-ui/encoder.d.ts +21 -11
- package/dist/core/gen-ui/encoder.js +8 -7
- package/dist/core/gen-ui/events.d.ts +6 -5
- package/dist/core/gen-ui/events.js +6 -5
- package/dist/core/gen-ui/index.d.ts +1 -1
- package/dist/core/gen-ui/index.js +1 -1
- package/dist/core/guards.d.ts +17 -5
- package/dist/core/guards.js +6 -6
- package/dist/core/handle.d.ts +12 -5
- package/dist/core/handle.js +9 -8
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.js +3 -2
- package/dist/core/list-handles.d.ts +4 -1
- package/dist/core/list-handles.js +1 -1
- package/dist/core/mcp-ui-apps.d.ts +39 -9
- package/dist/core/mcp-ui-apps.js +10 -8
- package/dist/core/messages.d.ts +6 -0
- package/dist/core/messages.js +6 -0
- package/dist/core/page-capabilities.d.ts +0 -11
- package/dist/core/page-capabilities.js +13 -1
- package/dist/core/page-driver.d.ts +32 -11
- package/dist/core/page-executor.d.ts +8 -2
- package/dist/core/page-executor.js +31 -31
- package/dist/core/webmcp.d.ts +27 -8
- package/dist/core/webmcp.js +14 -14
- package/dist/index.d.ts +30 -0
- package/dist/index.js +30 -0
- package/dist/skills/install/archive.d.ts +8 -0
- package/dist/skills/install/archive.js +47 -0
- package/dist/skills/install/fetch-adapter.d.ts +6 -0
- package/dist/skills/install/fetch-adapter.js +6 -0
- package/dist/skills/install/github.d.ts +21 -0
- package/dist/skills/install/github.js +92 -0
- package/dist/skills/install/index.d.ts +11 -0
- package/dist/skills/install/index.js +11 -0
- package/dist/skills/install/install-service.d.ts +44 -0
- package/dist/skills/install/install-service.js +121 -0
- package/dist/skills/install/layout.d.ts +13 -0
- package/dist/skills/install/layout.js +22 -0
- package/dist/skills/install/live-registration.d.ts +61 -0
- package/dist/skills/install/live-registration.js +64 -0
- package/dist/skills/install/node-filesystem.d.ts +4 -0
- package/dist/skills/install/node-filesystem.js +41 -0
- package/dist/skills/install/ports.d.ts +101 -0
- package/dist/skills/install/ports.js +2 -0
- package/dist/skills/install/state.d.ts +13 -0
- package/dist/skills/install/state.js +23 -0
- package/dist/skills/install/validation.d.ts +45 -0
- package/dist/skills/install/validation.js +104 -0
- package/package.json +19 -3
- package/dist/a2ui/agent-to-renderer.d.ts.map +0 -1
- package/dist/a2ui/agent-to-renderer.js.map +0 -1
- package/dist/a2ui/catalog.d.ts.map +0 -1
- package/dist/a2ui/catalog.js.map +0 -1
- package/dist/a2ui/common-types.d.ts.map +0 -1
- package/dist/a2ui/common-types.js.map +0 -1
- package/dist/a2ui/index.d.ts.map +0 -1
- package/dist/a2ui/index.js.map +0 -1
- package/dist/a2ui/interpreter.d.ts.map +0 -1
- package/dist/a2ui/interpreter.js.map +0 -1
- package/dist/a2ui/json-pointer.d.ts.map +0 -1
- package/dist/a2ui/json-pointer.js.map +0 -1
- package/dist/a2ui/renderer-to-agent.d.ts.map +0 -1
- package/dist/a2ui/renderer-to-agent.js.map +0 -1
- package/dist/a2ui/resolve.d.ts.map +0 -1
- package/dist/a2ui/resolve.js.map +0 -1
- package/dist/a2ui/tree.d.ts.map +0 -1
- package/dist/a2ui/tree.js.map +0 -1
- package/dist/ag-ui.d.ts.map +0 -1
- package/dist/ag-ui.js.map +0 -1
- package/dist/agui/encoder.d.ts.map +0 -1
- package/dist/agui/encoder.js.map +0 -1
- package/dist/agui/events.d.ts.map +0 -1
- package/dist/agui/events.js.map +0 -1
- package/dist/capability.d.ts.map +0 -1
- package/dist/capability.js.map +0 -1
- package/dist/core/a2ui/agent-to-renderer.d.ts.map +0 -1
- package/dist/core/a2ui/agent-to-renderer.js.map +0 -1
- package/dist/core/a2ui/catalog.d.ts.map +0 -1
- package/dist/core/a2ui/catalog.js.map +0 -1
- package/dist/core/a2ui/common-types.d.ts.map +0 -1
- package/dist/core/a2ui/common-types.js.map +0 -1
- package/dist/core/a2ui/index.d.ts.map +0 -1
- package/dist/core/a2ui/index.js.map +0 -1
- package/dist/core/a2ui/interpreter.d.ts.map +0 -1
- package/dist/core/a2ui/interpreter.js.map +0 -1
- package/dist/core/a2ui/json-pointer.d.ts.map +0 -1
- package/dist/core/a2ui/json-pointer.js.map +0 -1
- package/dist/core/a2ui/renderer-to-agent.d.ts.map +0 -1
- package/dist/core/a2ui/renderer-to-agent.js.map +0 -1
- package/dist/core/a2ui/resolve.d.ts.map +0 -1
- package/dist/core/a2ui/resolve.js.map +0 -1
- package/dist/core/a2ui/tree.d.ts.map +0 -1
- package/dist/core/a2ui/tree.js.map +0 -1
- package/dist/core/ag-ui.d.ts.map +0 -1
- package/dist/core/ag-ui.js.map +0 -1
- package/dist/core/capability.d.ts.map +0 -1
- package/dist/core/capability.js.map +0 -1
- package/dist/core/dom/dom-page-driver.d.ts.map +0 -1
- package/dist/core/dom/dom-page-driver.js.map +0 -1
- package/dist/core/dom/index.d.ts.map +0 -1
- package/dist/core/dom/index.js.map +0 -1
- package/dist/core/dom/model-context.d.ts.map +0 -1
- package/dist/core/dom/model-context.js.map +0 -1
- package/dist/core/element-handles.d.ts.map +0 -1
- package/dist/core/element-handles.js.map +0 -1
- package/dist/core/gen-ui/encoder.d.ts.map +0 -1
- package/dist/core/gen-ui/encoder.js.map +0 -1
- package/dist/core/gen-ui/events.d.ts.map +0 -1
- package/dist/core/gen-ui/events.js.map +0 -1
- package/dist/core/gen-ui/index.d.ts.map +0 -1
- package/dist/core/gen-ui/index.js.map +0 -1
- package/dist/core/guards.d.ts.map +0 -1
- package/dist/core/guards.js.map +0 -1
- package/dist/core/handle.d.ts.map +0 -1
- package/dist/core/handle.js.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/list-handles.d.ts.map +0 -1
- package/dist/core/list-handles.js.map +0 -1
- package/dist/core/mcp-ui-apps.d.ts.map +0 -1
- package/dist/core/mcp-ui-apps.js.map +0 -1
- package/dist/core/page-capabilities.d.ts.map +0 -1
- package/dist/core/page-capabilities.js.map +0 -1
- package/dist/core/page-driver.d.ts.map +0 -1
- package/dist/core/page-driver.js.map +0 -1
- package/dist/core/page-executor.d.ts.map +0 -1
- package/dist/core/page-executor.js.map +0 -1
- package/dist/core/webmcp.d.ts.map +0 -1
- package/dist/core/webmcp.js.map +0 -1
- package/dist/dom/dom-page-driver.d.ts.map +0 -1
- package/dist/dom/dom-page-driver.js.map +0 -1
- package/dist/dom/index.d.ts.map +0 -1
- package/dist/dom/index.js.map +0 -1
- package/dist/dom/model-context.d.ts.map +0 -1
- package/dist/dom/model-context.js.map +0 -1
- package/dist/element-handles.d.ts.map +0 -1
- package/dist/element-handles.js.map +0 -1
- package/dist/gen-ui/encoder.d.ts.map +0 -1
- package/dist/gen-ui/encoder.js.map +0 -1
- package/dist/gen-ui/events.d.ts.map +0 -1
- package/dist/gen-ui/events.js.map +0 -1
- package/dist/gen-ui/index.d.ts.map +0 -1
- package/dist/gen-ui/index.js.map +0 -1
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js.map +0 -1
- package/dist/handle.d.ts.map +0 -1
- package/dist/handle.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp-ui-apps.d.ts.map +0 -1
- package/dist/mcp-ui-apps.js.map +0 -1
- package/dist/mcp-ui.d.ts.map +0 -1
- package/dist/mcp-ui.js.map +0 -1
- package/dist/page-capabilities.d.ts.map +0 -1
- package/dist/page-capabilities.js.map +0 -1
- package/dist/page-driver.d.ts.map +0 -1
- package/dist/page-driver.js.map +0 -1
- package/dist/page-executor.d.ts.map +0 -1
- package/dist/page-executor.js.map +0 -1
- package/dist/webmcp.d.ts.map +0 -1
- package/dist/webmcp.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# @jini-ai/agentic
|
|
2
|
+
|
|
3
|
+
## 0.4.0 — 2026-10-02
|
|
4
|
+
|
|
5
|
+
### BREAKING
|
|
6
|
+
|
|
7
|
+
- Primitive ports converge into core; installation modules use concept paths and page-capability descriptions use host-neutral messages.
|
|
8
|
+
- Distribution includes runtime output, release documentation and required assets only. Process records and per-job neutrality checks are no longer part of the package surface.
|
|
9
|
+
|
|
10
|
+
## Unreleased — shared clocks and neutral navigation
|
|
11
|
+
|
|
12
|
+
### BREAKING
|
|
13
|
+
|
|
14
|
+
- Remove GenUiClockPort and A2uiClockPort; gen-ui/A2UI factories accept core Clock.nowMs(). A2UI sequence IDs and explicit per-event now callbacks retain their contracts.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Export defaultAgenticMessages with a neutral navigation description; hosts replace existing capability descriptor copy before projection.
|
|
19
|
+
- Skill validation/live-registration/layout tests now live under the behavior-named install test directory. The process supplement lives outside the published package; layout rationale remains in its JSDoc.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Unreleased
|
|
23
|
+
|
|
24
|
+
### Integration of extracted APIs
|
|
25
|
+
|
|
26
|
+
- Complete `./skills/install` and `./skills/install/node` exports and Node runtime metadata. Reconcile shared layout/filesystem/archive/YAML contracts, expose layout and live-registration helpers, and provide `createSkillFetchAdapter` for explicitly supplied native fetch. This completes the previously pending subpath export work described below.
|
|
27
|
+
- Include supplemental validation, explicit layout, live-registration and package-neutrality contracts from the extraction jobs, plus package-surface and native-fetch adapter integration tests. The filesystem factory is available from both Node skill entries; universal root/core exports stay independent of Node modules.
|
|
28
|
+
- **BREAKING:** Public agent-control, DOM, MCP-UI, GenUI and A2UI functions, constructors and ports take required and optional argument objects. Encoder/interpreter factories require clock/ID ports; model-context detection requires a host-candidate port. Skill HTTP calls now use `fetch({ url }, requestOptions)`, and `SkillInputError` takes `{ message }` with optional `{ cause }`. Export names and wire formats remain intact. See `API.md` for migration examples; consumer rewiring and verification remain pending.
|
|
29
|
+
|
|
30
|
+
- Add bounded skill installation/state, GitHub import, streaming archive ports and live registration under `skills/install`, with required host layout and dependencies. Add a separate Node filesystem adapter. Subpath exports pending coordinator edit; verification not run (owner directive).
|
|
31
|
+
|
|
32
|
+
## 0.1.2
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Add top-level `main`/`types` fields alongside the existing `exports` map. A consumer on
|
|
37
|
+
TypeScript's classic `moduleResolution: "node"` (node10) — which ignores `package.json#exports`
|
|
38
|
+
entirely — could not resolve this package's types at all (`TS2307: Cannot find module`) even
|
|
39
|
+
after the previous exports-map fix restored `require()` at runtime; type resolution and runtime
|
|
40
|
+
resolution are separate algorithms. Verified against a real external consumer (whose
|
|
41
|
+
tsconfig uses this legacy resolution mode): adding these two fields, with its tsconfig completely
|
|
42
|
+
unchanged, made the error disappear. Also fixes absolute-path `require()` (distinct from a bare
|
|
43
|
+
specifier, which already worked) for the same reason — `main` was previously absent.
|
|
44
|
+
|
|
45
|
+
Purely additive: every modern resolver (Node's own runtime `exports` resolution, TypeScript's
|
|
46
|
+
`bundler`/`node16`/`nodenext`) prefers `exports` over `main`/`types` when both are present, so
|
|
47
|
+
this changes nothing for a consumer already on a modern resolver.
|
|
48
|
+
|
|
49
|
+
- Updated dependencies
|
|
50
|
+
- @jini-ai/protocol@0.1.2
|
|
51
|
+
|
|
52
|
+
## 0.1.1
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Add a `"default"` export condition to every published package's `exports` map — every one of
|
|
57
|
+
them lacked it, which meant `require()` failed with `ERR_PACKAGE_PATH_NOT_EXPORTED` for any
|
|
58
|
+
CommonJS consumer (found via a real external integration attempt; Node needs `require(esm)`
|
|
59
|
+
support, i.e. Node >=22.12, for this to resolve).
|
|
60
|
+
|
|
61
|
+
`@jini-ai/agent-runtime`:
|
|
62
|
+
|
|
63
|
+
- **New**: `RuntimeBuildOptions.permissionMode` (`'bypass' | 'restricted'`) lets a caller opt a
|
|
64
|
+
run OUT of the auto-approve-every-permission-prompt flag every def with one
|
|
65
|
+
(`bypassPermissions` / `--yolo` / `--dangerously-skip-permissions`) previously pushed
|
|
66
|
+
unconditionally, with no way to turn it off. Omitting it keeps today's default (bypass)
|
|
67
|
+
behavior unchanged.
|
|
68
|
+
- **New**: `ClaudeStreamEvent`, `CopilotStreamEvent`, and `QoderEvent` are now real exported
|
|
69
|
+
discriminated unions instead of `Record<string, unknown>` — a real external consumer guessed a
|
|
70
|
+
nonexistent field name (`event.text` instead of the actual `event.delta`) against the old
|
|
71
|
+
untyped sink and silently lost every streamed token with no compile or runtime error.
|
|
72
|
+
- Fixed a doc/implementation mismatch in `claude-stream.ts`: the module doc claimed `tool_result`
|
|
73
|
+
events carry `{ tool_use_id, content, is_error }`; the actual emitted shape is
|
|
74
|
+
`{ toolUseId, content, isError }`.
|
|
75
|
+
|
|
76
|
+
`@jini-ai/daemon`: `AgentExecutorRunInput.permissionMode` forwards the new
|
|
77
|
+
`RuntimeBuildOptions.permissionMode` through to `buildArgs`, so a host can actually reach the new
|
|
78
|
+
opt-out from the daemon's real run-input surface, not just from `@jini-ai/agent-runtime` in
|
|
79
|
+
isolation.
|
|
80
|
+
|
|
81
|
+
`@jini-ai/agentic`: `setAtPointer` no longer throws on a malformed (e.g. missing leading `/`)
|
|
82
|
+
`updateDataModel` path — degrades to a no-op like its sibling `getAtPointer`, matching this
|
|
83
|
+
package's own "a bad binding must not crash the renderer" contract. That path is agent-authored
|
|
84
|
+
wire data with no error boundary above it in any host, so the uncaught throw could unmount an
|
|
85
|
+
entire chat UI from ~40 bytes of malformed input.
|
|
86
|
+
|
|
87
|
+
`@jini-ai/chat-react`: a local (client-resolved) A2UI button action is no longer a silent no-op —
|
|
88
|
+
`A2uiSurfaceCard` now surfaces the resolved value. New `ExtEventErrorBoundary` confines a
|
|
89
|
+
`kind: 'ext'` event group's renderer to its own card instead of letting a render/effect-phase
|
|
90
|
+
throw from agent-controlled content unmount the whole chat root (there was no error boundary
|
|
91
|
+
anywhere in this package or its hosts before this).
|
|
92
|
+
|
|
93
|
+
- Updated dependencies
|
|
94
|
+
- @jini-ai/protocol@0.1.1
|
package/README.md
CHANGED
|
@@ -28,8 +28,8 @@ point additionally needs a real DOM (browser or jsdom) at runtime — see Entry
|
|
|
28
28
|
- **The generic page-capability manifest** — `PAGE_CAPABILITIES` (`page.find_elements`,
|
|
29
29
|
`page.click`, and friends — every verb addresses a published `data-agent-element` handle, never
|
|
30
30
|
a caller-supplied selector or script), `PageDriver`/`FindElementsFilter`, and
|
|
31
|
-
`executePageCapability(driver, capabilityId, input)` to run one.
|
|
32
|
-
- **The `data-agent-*` markup convention** — `agentHandle('save', { role, label, page })` returns
|
|
31
|
+
`executePageCapability({ driver, capabilityId, input })` to run one.
|
|
32
|
+
- **The `data-agent-*` markup convention** — `agentHandle({ handle: 'save' }, { role, label, page })` returns
|
|
33
33
|
spreadable attribute props (pure data, works with React/Vue/Svelte/anything); plus the
|
|
34
34
|
attribute-name constants, `AGENT_ELEMENT_ROLES`, `isValidElementHandle`, and
|
|
35
35
|
`resolveHandleSelector` for a driver to resolve a handle back to a DOM node.
|
|
@@ -40,7 +40,7 @@ point additionally needs a real DOM (browser or jsdom) at runtime — see Entry
|
|
|
40
40
|
- **Genuine AG-UI projection** — `toAgUiTool`/`toAgUiTools`, `createAgUiToolResult`,
|
|
41
41
|
`AG_UI_TOOL_CALL_EVENTS`. Real conformance: emits AG-UI's own `parameters` field name and its
|
|
42
42
|
canonical `TOOL_CALL_START`/`TOOL_CALL_ARGS`/`TOOL_CALL_END` event names.
|
|
43
|
-
- **GenUI run-stream protocol** (
|
|
43
|
+
- **GenUI run-stream protocol** (re-exported at root and `./core`) — `createGenUiEncoder` and the
|
|
44
44
|
six dotted-lowercase event kinds (`GenUiEvent`: `agent.message`, `tool_call`, `state_update`,
|
|
45
45
|
`ui.surface_requested`, `ui.surface_responded`, `run.lifecycle`). **Not AG-UI** — it shares zero
|
|
46
46
|
event names with the real protocol above; it's a de-branded port of one product's own run-event
|
|
@@ -55,21 +55,37 @@ point additionally needs a real DOM (browser or jsdom) at runtime — see Entry
|
|
|
55
55
|
import { PAGE_CAPABILITIES, executePageCapability, agentHandle, type PageDriver } from '@jini-ai/agentic';
|
|
56
56
|
|
|
57
57
|
// A component publishes itself once, in whatever framework renders it:
|
|
58
|
-
// <button {...agentHandle('save', { role: 'button', label: 'Save changes' })}>Save</button>
|
|
58
|
+
// <button {...agentHandle({ handle: 'save' }, { role: 'button', label: 'Save changes' })}>Save</button>
|
|
59
59
|
|
|
60
60
|
declare const driver: PageDriver; // e.g. createDomPageDriver(...) from '@jini-ai/agentic/dom'
|
|
61
61
|
|
|
62
|
-
const elements = await executePageCapability(driver, 'page.find_elements', { role: 'button' });
|
|
62
|
+
const elements = await executePageCapability({ driver, capabilityId: 'page.find_elements', input: { role: 'button' } });
|
|
63
63
|
console.log(PAGE_CAPABILITIES.map((c) => c.id)); // every verb an outside caller may invoke
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
All public functions and ports take a required argument object, followed by an optional settings
|
|
67
|
+
object. For example, `driver.fill({ handle, text })` and
|
|
68
|
+
`driver.selectOption({ handle, option }, { selected: false })`. A method with no required values
|
|
69
|
+
receives `{}`, such as `driver.findElements({}, { role: 'button' })`.
|
|
70
|
+
|
|
71
|
+
`createGenUiEncoder({ clock })` requires a `clock.nowMs()` port; encode with
|
|
72
|
+
`encoder.encode({ event, runId }, { seq })`. `createA2uiInterpreter({ catalog, clock, ids })`
|
|
73
|
+
requires `clock.nowMs()` and `ids.next({})` ports. WebMCP projection receives an execution port as
|
|
74
|
+
`toWebMcpTool({ capability, execute }, options)`, calling `execute({ id, args })`.
|
|
75
|
+
`getAgentModelContext({ host })` reads `host.candidates({})` in host-defined priority order and
|
|
76
|
+
returns an argument-object adapter to the first installed native WebMCP surface. A browser host
|
|
77
|
+
can return `[document.modelContext, navigator.modelContext]` from that port.
|
|
78
|
+
|
|
66
79
|
## Entry points
|
|
67
80
|
|
|
68
81
|
| subpath | what's behind it | extra dep it pulls in |
|
|
69
82
|
|---|---|---|
|
|
70
83
|
| `.` | Capability vocabulary, `PAGE_CAPABILITIES`, `data-agent-*` markup helpers, WebMCP/AG-UI projections, GenUI protocol, MCP-UI wire helpers. Zero DOM, zero transport. | none beyond `@jini-ai/protocol`, `zod` |
|
|
84
|
+
| `./core` | The same framework-free agent-control surface as the root. | none |
|
|
71
85
|
| `./dom` | `createDomPageDriver`/`currentAgentPage` — the one `PageDriver` that reads and writes a real DOM subtree, compiled under its own DOM-lib `tsconfig`. Also WebMCP feature detection (`getAgentModelContext`). `@jini-ai/chat-react` is its one in-repo consumer. | a real DOM (browser or jsdom) |
|
|
72
86
|
| `./a2ui` | The real A2UI v1.0 wire types and a minimal client-side interpreter (`common-types`, `agent-to-renderer`, `renderer-to-agent`, `catalog`, `json-pointer`, `resolve`, `tree`, `interpreter`) — zero DOM dependency. | none |
|
|
87
|
+
| `./skills/install` | Bounded bundle validation, archive/GitHub import, installation/state, explicit layout and live-registration factories. | Node runtime; injected filesystem, YAML, archive, HTTP, IDs and tool-source ports |
|
|
88
|
+
| `./skills/install/node` | `createNodeSkillFilesystem({})`, a bounded no-follow filesystem adapter. | Node runtime |
|
|
73
89
|
|
|
74
90
|
## What's swappable
|
|
75
91
|
|
|
@@ -86,7 +102,18 @@ attribute names, and the wire shapes of both the GenUI and A2UI protocols.
|
|
|
86
102
|
DOM at runtime — see Entry points above).
|
|
87
103
|
ESM only — ships `"type": "module"` with no CommonJS `require` build.
|
|
88
104
|
|
|
105
|
+
The two skill entries are `node` runtime entries. They use Node paths and byte buffers and are
|
|
106
|
+
kept out of the universal root/core barrels. Every storage root, workspace-directory segment,
|
|
107
|
+
state filename and tool-ID mapping is supplied by the host. The installer never executes scripts.
|
|
108
|
+
Wrap an explicitly supplied native fetch with `createSkillFetchAdapter({ fetch })`, or implement
|
|
109
|
+
`SkillFetchPort` as `fetch({ url }, requestOptions)`. YAML and ZIP parsing remain injected ports;
|
|
110
|
+
this package adds no parser dependency. See [API.md](https://github.com/AINSEP/Jini/blob/main/packages/agentic/API.md) for construction and migration.
|
|
111
|
+
|
|
89
112
|
## Provenance
|
|
90
113
|
|
|
91
|
-
See
|
|
114
|
+
See the archived provenance ledger for per-file provenance, the AG-UI/GenUI naming history, and
|
|
92
115
|
the A2UI spec-parity gap list. Apache-2.0, inherited from Open Design — see the repo `NOTICE`.
|
|
116
|
+
|
|
117
|
+
`defaultAgenticMessages` (root / `./core`) supplies the neutral navigation description. Hosts
|
|
118
|
+
replace copy through the existing `CapabilityDef.description` before projecting model tools;
|
|
119
|
+
IDs, schemas and capability policy remain intact. Both UI interpreters accept core `Clock`.
|
|
@@ -608,6 +608,8 @@ export interface ParseSuccess {
|
|
|
608
608
|
* `ParseFailure` instead, mirroring how a real renderer must degrade on the wire: reject the one
|
|
609
609
|
* bad message with a specific reason, not crash the whole connection.
|
|
610
610
|
*/
|
|
611
|
-
export declare function parseAgentToRendererMessage(raw
|
|
611
|
+
export declare function parseAgentToRendererMessage({ raw }: {
|
|
612
|
+
raw: unknown;
|
|
613
|
+
}, _optional?: Record<string, never>): ParseSuccess | ParseFailure;
|
|
612
614
|
export {};
|
|
613
615
|
//# sourceMappingURL=agent-to-renderer.d.ts.map
|
|
@@ -144,7 +144,7 @@ const MESSAGE_KEYS = AGENT_TO_RENDERER_MESSAGE_KEYS;
|
|
|
144
144
|
* `ParseFailure` instead, mirroring how a real renderer must degrade on the wire: reject the one
|
|
145
145
|
* bad message with a specific reason, not crash the whole connection.
|
|
146
146
|
*/
|
|
147
|
-
export function parseAgentToRendererMessage(raw) {
|
|
147
|
+
export function parseAgentToRendererMessage({ raw }, _optional = {}) {
|
|
148
148
|
if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {
|
|
149
149
|
return { ok: false, code: 'VALIDATION_FAILED', message: 'envelope must be a JSON object' };
|
|
150
150
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* unambiguous, fully-specified semantics reachable from the fetched schema text alone — the
|
|
18
18
|
* others, e.g. `formatString`/`formatDate`, depend on locale/formatting semantics not pinned down
|
|
19
19
|
* by the schema text, and are deliberately not guessed at). The remaining 11 functions are **not
|
|
20
|
-
* implemented** — see `../
|
|
20
|
+
* implemented** — see `../archived provenance ledger` for the full gap list. `createLabCatalog()` also adds
|
|
21
21
|
* three lab-only demo functions (`greetUser`/`logServerEvent`/`adminReset`, clearly not part of
|
|
22
22
|
* the real basic catalog) purely to exercise all three `callableFrom` values end-to-end — the real
|
|
23
23
|
* basic catalog's own 14 functions are all `rendererOnly`, which alone can't test the `agentOnly` /
|
|
@@ -60,14 +60,23 @@ export interface Catalog {
|
|
|
60
60
|
readonly components: ReadonlyMap<string, ComponentSpec>;
|
|
61
61
|
readonly functions: ReadonlyMap<string, FunctionSpec>;
|
|
62
62
|
}
|
|
63
|
-
export declare function isComponentAllowed(catalog
|
|
63
|
+
export declare function isComponentAllowed({ catalog, componentType }: {
|
|
64
|
+
catalog: Catalog;
|
|
65
|
+
componentType: string;
|
|
66
|
+
}, _optional?: Record<string, never>): boolean;
|
|
64
67
|
/** Mirrors the spec's own default: absent registration behaves exactly like an explicit `rendererOnly` entry. */
|
|
65
|
-
export declare function callableFromOf(catalog
|
|
66
|
-
|
|
68
|
+
export declare function callableFromOf({ catalog, functionName }: {
|
|
69
|
+
catalog: Catalog;
|
|
70
|
+
functionName: string;
|
|
71
|
+
}, _optional?: Record<string, never>): CallableFrom;
|
|
72
|
+
export declare function isFunctionRegistered({ catalog, functionName }: {
|
|
73
|
+
catalog: Catalog;
|
|
74
|
+
functionName: string;
|
|
75
|
+
}, _optional?: Record<string, never>): boolean;
|
|
67
76
|
/**
|
|
68
77
|
* Builds the demo catalog this port's interpreter/fixture is validated against. A fresh object
|
|
69
78
|
* each call (not a shared singleton) so tests can register their own `impl`s / mutate a copy
|
|
70
79
|
* without cross-test leakage.
|
|
71
80
|
*/
|
|
72
|
-
export declare function createLabCatalog(): Catalog;
|
|
81
|
+
export declare function createLabCatalog(_required: Record<string, never>, _optional?: Record<string, never>): Catalog;
|
|
73
82
|
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* unambiguous, fully-specified semantics reachable from the fetched schema text alone — the
|
|
18
18
|
* others, e.g. `formatString`/`formatDate`, depend on locale/formatting semantics not pinned down
|
|
19
19
|
* by the schema text, and are deliberately not guessed at). The remaining 11 functions are **not
|
|
20
|
-
* implemented** — see `../
|
|
20
|
+
* implemented** — see `../archived provenance ledger` for the full gap list. `createLabCatalog()` also adds
|
|
21
21
|
* three lab-only demo functions (`greetUser`/`logServerEvent`/`adminReset`, clearly not part of
|
|
22
22
|
* the real basic catalog) purely to exercise all three `callableFrom` values end-to-end — the real
|
|
23
23
|
* basic catalog's own 14 functions are all `rendererOnly`, which alone can't test the `agentOnly` /
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
*/
|
|
30
30
|
import { z } from 'zod';
|
|
31
31
|
import { AccessibilityAttributesSchema, ActionSchema, CheckRuleSchema, ChildListSchema, ChildSchema, DataBindingSchema, DynamicBooleanSchema, DynamicNumberSchema, DynamicStringListSchema, DynamicStringSchema, } from './common-types.js';
|
|
32
|
-
export function isComponentAllowed(catalog, componentType) {
|
|
32
|
+
export function isComponentAllowed({ catalog, componentType }, _optional = {}) {
|
|
33
33
|
return catalog.components.has(componentType);
|
|
34
34
|
}
|
|
35
35
|
/** Mirrors the spec's own default: absent registration behaves exactly like an explicit `rendererOnly` entry. */
|
|
36
|
-
export function callableFromOf(catalog, functionName) {
|
|
36
|
+
export function callableFromOf({ catalog, functionName }, _optional = {}) {
|
|
37
37
|
return catalog.functions.get(functionName)?.callableFrom ?? 'rendererOnly';
|
|
38
38
|
}
|
|
39
|
-
export function isFunctionRegistered(catalog, functionName) {
|
|
39
|
+
export function isFunctionRegistered({ catalog, functionName }, _optional = {}) {
|
|
40
40
|
return catalog.functions.has(functionName);
|
|
41
41
|
}
|
|
42
42
|
// ---------------------------------------------------------------------------------------------
|
|
@@ -260,7 +260,7 @@ function not(args) {
|
|
|
260
260
|
* each call (not a shared singleton) so tests can register their own `impl`s / mutate a copy
|
|
261
261
|
* without cross-test leakage.
|
|
262
262
|
*/
|
|
263
|
-
export function createLabCatalog() {
|
|
263
|
+
export function createLabCatalog(_required, _optional = {}) {
|
|
264
264
|
// All 18 components of the real basic catalog, in that catalog's own declaration order.
|
|
265
265
|
const components = new Map([
|
|
266
266
|
['Text', { kind: 'text', propsSchema: TextPropsSchema }],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* was copied from the real JSON Schema `$defs`, not guessed). A2UI is a real, versioned,
|
|
8
8
|
* actively-maintained spec (v1.0 is a release candidate at the time this was written) for agents
|
|
9
9
|
* to stream a declarative, catalog-whitelisted component tree + JSON-Pointer-bound data model to a
|
|
10
|
-
* renderer. See `../
|
|
10
|
+
* renderer. See `../archived provenance ledger` for provenance, what was verified against the primary source,
|
|
11
11
|
* and — importantly — why this was hand-rolled from the JSON Schemas rather than built on the
|
|
12
12
|
* official `@a2ui/web_core` npm package (materially version-drifted: see that doc).
|
|
13
13
|
*
|
|
@@ -396,6 +396,14 @@ export type AgentEventAction = Extract<Action, {
|
|
|
396
396
|
export type LocalFunctionAction = Extract<Action, {
|
|
397
397
|
functionCall: FunctionCall;
|
|
398
398
|
}>;
|
|
399
|
-
export declare function isAgentEventAction(
|
|
400
|
-
|
|
399
|
+
export declare function isAgentEventAction(required: {
|
|
400
|
+
action: Action;
|
|
401
|
+
}, _optional?: Record<string, never>): required is {
|
|
402
|
+
action: AgentEventAction;
|
|
403
|
+
};
|
|
404
|
+
export declare function isLocalFunctionAction(required: {
|
|
405
|
+
action: Action;
|
|
406
|
+
}, _optional?: Record<string, never>): required is {
|
|
407
|
+
action: LocalFunctionAction;
|
|
408
|
+
};
|
|
401
409
|
//# sourceMappingURL=common-types.d.ts.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* was copied from the real JSON Schema `$defs`, not guessed). A2UI is a real, versioned,
|
|
8
8
|
* actively-maintained spec (v1.0 is a release candidate at the time this was written) for agents
|
|
9
9
|
* to stream a declarative, catalog-whitelisted component tree + JSON-Pointer-bound data model to a
|
|
10
|
-
* renderer. See `../
|
|
10
|
+
* renderer. See `../archived provenance ledger` for provenance, what was verified against the primary source,
|
|
11
11
|
* and — importantly — why this was hand-rolled from the JSON Schemas rather than built on the
|
|
12
12
|
* official `@a2ui/web_core` npm package (materially version-drifted: see that doc).
|
|
13
13
|
*
|
|
@@ -121,10 +121,12 @@ export const ActionSchema = z.union([
|
|
|
121
121
|
z.object({ event: AgentActionEventSchema }).strict(),
|
|
122
122
|
z.object({ functionCall: FunctionCallSchema }).strict(),
|
|
123
123
|
]);
|
|
124
|
-
export function isAgentEventAction(
|
|
124
|
+
export function isAgentEventAction(required, _optional = {}) {
|
|
125
|
+
const { action } = required;
|
|
125
126
|
return 'event' in action;
|
|
126
127
|
}
|
|
127
|
-
export function isLocalFunctionAction(
|
|
128
|
+
export function isLocalFunctionAction(required, _optional = {}) {
|
|
129
|
+
const { action } = required;
|
|
128
130
|
return 'functionCall' in action;
|
|
129
131
|
}
|
|
130
132
|
//# sourceMappingURL=common-types.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module @jini-ai/a2ui
|
|
3
3
|
*
|
|
4
4
|
* A2UI ("Agent-to-UI") v1.0 wire types + a minimal client-side interpreter — see each module's
|
|
5
|
-
* own doc for detail, and `
|
|
5
|
+
* own doc for detail, and `archived provenance ledger` for provenance, verified-against-primary-source notes,
|
|
6
6
|
* and the honest gap list against full v1.0 spec parity.
|
|
7
7
|
*/
|
|
8
8
|
export * from './common-types.js';
|
package/dist/core/a2ui/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module @jini-ai/a2ui
|
|
3
3
|
*
|
|
4
4
|
* A2UI ("Agent-to-UI") v1.0 wire types + a minimal client-side interpreter — see each module's
|
|
5
|
-
* own doc for detail, and `
|
|
5
|
+
* own doc for detail, and `archived provenance ledger` for provenance, verified-against-primary-source notes,
|
|
6
6
|
* and the honest gap list against full v1.0 spec parity.
|
|
7
7
|
*/
|
|
8
8
|
export * from './common-types.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Clock } from "@jini-ai/core/primitives";
|
|
1
2
|
import type { ParseFailure } from './agent-to-renderer.js';
|
|
2
3
|
import { WireComponentSchema } from './agent-to-renderer.js';
|
|
3
4
|
import type { RendererToAgentMessage } from './renderer-to-agent.js';
|
|
@@ -33,6 +34,10 @@ export type BuildActionResult = {
|
|
|
33
34
|
readonly ok: false;
|
|
34
35
|
readonly reason: string;
|
|
35
36
|
};
|
|
37
|
+
/** Host ports keep action IDs and timestamps deterministic and product-independent. */
|
|
38
|
+
export interface A2uiIdsPort {
|
|
39
|
+
next(required: Record<string, never>): string;
|
|
40
|
+
}
|
|
36
41
|
/**
|
|
37
42
|
* Turns a `ParseFailure` (from `parseAgentToRendererMessage`) into what `applyAgentMessage`
|
|
38
43
|
* returns for it. See this module's doc, decision 4: an envelope malformed enough to carry no
|
|
@@ -44,7 +49,10 @@ export type BuildActionResult = {
|
|
|
44
49
|
* Exported and pure — it only reads `parsed`/`raw`, so the surfaceId-attribution rule can be
|
|
45
50
|
* tested directly, without a live interpreter instance.
|
|
46
51
|
*/
|
|
47
|
-
export declare function buildParseFailureResult(parsed
|
|
52
|
+
export declare function buildParseFailureResult({ parsed, raw }: {
|
|
53
|
+
parsed: ParseFailure;
|
|
54
|
+
raw: unknown;
|
|
55
|
+
}, _optional?: Record<string, never>): ApplyMessageResult;
|
|
48
56
|
/**
|
|
49
57
|
* Runs a component's local `functionCall` action synchronously against `dataModel` — no network
|
|
50
58
|
* round trip, no pending-action bookkeeping (that only applies to the agent-event branch; see
|
|
@@ -54,18 +62,45 @@ export declare function buildParseFailureResult(parsed: ParseFailure, raw: unkno
|
|
|
54
62
|
* data model, and a resolution failure becomes a typed refusal rather than a thrown error" can be
|
|
55
63
|
* tested without a live interpreter instance.
|
|
56
64
|
*/
|
|
57
|
-
export declare function runLocalFunctionAction(dataModel
|
|
65
|
+
export declare function runLocalFunctionAction({ dataModel, catalog, action }: {
|
|
66
|
+
dataModel: unknown;
|
|
67
|
+
catalog: Catalog;
|
|
68
|
+
action: LocalFunctionAction;
|
|
69
|
+
}, _optional?: Record<string, never>): BuildActionResult;
|
|
58
70
|
export interface A2uiInterpreter {
|
|
59
|
-
applyAgentMessage(
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
applyAgentMessage(required: {
|
|
72
|
+
raw: unknown;
|
|
73
|
+
}, _optional?: Record<string, never>): ApplyMessageResult;
|
|
74
|
+
getSurface(required: {
|
|
75
|
+
surfaceId: string;
|
|
76
|
+
}, _optional?: Record<string, never>): SurfaceSnapshot | undefined;
|
|
77
|
+
listSurfaceIds(_required: Record<string, never>, _optional?: Record<string, never>): string[];
|
|
62
78
|
/** `undefined` if the surface doesn't exist, or exists but has no component with id `'root'` yet (a legal, "still streaming in" state per the spec's own forward-reference tolerance). */
|
|
63
|
-
getRoot(
|
|
79
|
+
getRoot(required: {
|
|
80
|
+
surfaceId: string;
|
|
81
|
+
}, _optional?: Record<string, never>): ComponentInstance | undefined;
|
|
64
82
|
/** Resolves a component's `action` prop (if any) for dispatch — builds the `action` envelope for an agent-event action, or synchronously runs a local `functionCall` action. Called by a host renderer on a real user interaction (e.g. a Button click). */
|
|
65
|
-
buildAction(
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
buildAction(required: {
|
|
84
|
+
surfaceId: string;
|
|
85
|
+
componentId: string;
|
|
86
|
+
}, optional?: {
|
|
87
|
+
now?: ((required: Record<string, never>) => number) | undefined;
|
|
88
|
+
}): BuildActionResult;
|
|
89
|
+
resolve(required: {
|
|
90
|
+
surfaceId: string;
|
|
91
|
+
value: DynamicValue;
|
|
92
|
+
}, optional?: {
|
|
93
|
+
itemBasePath?: string | undefined;
|
|
94
|
+
itemIndex?: number | undefined;
|
|
95
|
+
}): ReturnType<typeof resolveDynamicValue>;
|
|
96
|
+
subscribe(required: {
|
|
97
|
+
listener: (required: Record<string, never>) => void;
|
|
98
|
+
}, _optional?: Record<string, never>): (required: Record<string, never>) => void;
|
|
68
99
|
}
|
|
69
|
-
export declare function createA2uiInterpreter(catalog
|
|
100
|
+
export declare function createA2uiInterpreter({ catalog, clock, ids }: {
|
|
101
|
+
catalog: Catalog;
|
|
102
|
+
clock: Clock;
|
|
103
|
+
ids: A2uiIdsPort;
|
|
104
|
+
}, _optional?: Record<string, never>): A2uiInterpreter;
|
|
70
105
|
export { WireComponentSchema };
|
|
71
106
|
//# sourceMappingURL=interpreter.d.ts.map
|