@adia-ai/a2ui-compose 0.5.15 → 0.5.17
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 +9 -0
- package/core/generator.js +3 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,15 @@ generator graph.
|
|
|
11
11
|
|
|
12
12
|
_No pending changes._
|
|
13
13
|
|
|
14
|
+
## [0.5.17] - 2026-05-16
|
|
15
|
+
|
|
16
|
+
_Lockstep ride-along (no source change in this package; companion to web-components v0.5.17 — see root CHANGELOG)._
|
|
17
|
+
|
|
18
|
+
## [0.5.16] - 2026-05-16
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- §335 `core/generator.js` — removed dead `currentCanvas.html` references. The `hasClientCanvas` truth-check at line 71 ORed in `currentCanvas.html`, and a `// TODO(tier-2)` comment at line 134 referenced a never-implemented `htmlToComponents()` helper. Verified across `packages/` + `apps/` + `playgrounds/`: zero consumers pass `{ html: "..." }` to `generateUI()`. Also trimmed the speculative "Future:" block from the `currentCanvas` JSDoc (the `{ a2ui, originalIntent, meta }` shape was equally orphan). The shape union is now strictly `{ components } | { messages }`. Closes gemini-review refactor-backlog P2-2.
|
|
22
|
+
|
|
14
23
|
## [0.5.15] - 2026-05-16
|
|
15
24
|
|
|
16
25
|
_Lockstep ride-along (no source change in this package; companion to web-components v0.5.15 — see root CHANGELOG)._
|
package/core/generator.js
CHANGED
|
@@ -51,12 +51,9 @@ import { generateThinking } from '../strategies/monolithic/generate-thinking.js'
|
|
|
51
51
|
* @param {'instant'|'pro'|'thinking'|'stream'} [opts.mode='instant'] — Generation mode
|
|
52
52
|
* @param {string} [opts.executionId] — Existing execution ID (for multi-turn iteration)
|
|
53
53
|
* @param {object} [opts.currentCanvas] — Client-owned canvas state, enables
|
|
54
|
-
* stateless iteration. Shape is a discriminated union
|
|
54
|
+
* stateless iteration. Shape is a discriminated union:
|
|
55
55
|
* { components: A2UIComponent[] } — flat component array
|
|
56
56
|
* { messages: A2UIMessage[] } — full message sequence
|
|
57
|
-
* Future:
|
|
58
|
-
* { html: string } — raw HTML (parsed server-side)
|
|
59
|
-
* { a2ui: A2UIMessage[], originalIntent?: string, meta?: {} }
|
|
60
57
|
* When provided, the pipeline uses this as the iteration baseline instead
|
|
61
58
|
* of looking up prior turns in the ArtifactStore. This makes generation
|
|
62
59
|
* stateless — the client can iterate across server restarts, multiple tabs,
|
|
@@ -68,7 +65,7 @@ import { generateThinking } from '../strategies/monolithic/generate-thinking.js'
|
|
|
68
65
|
export async function generateUI({ intent, engine: engineName = 'monolithic', mode = 'instant', executionId, currentCanvas, llmAdapter, model, sessionId }) {
|
|
69
66
|
// Iteration signal: either an executionId (server-stateful path) OR a
|
|
70
67
|
// currentCanvas (client-stateless path). Both mean "refine existing UI".
|
|
71
|
-
const hasClientCanvas = !!(currentCanvas && (currentCanvas.components?.length || currentCanvas.messages?.length
|
|
68
|
+
const hasClientCanvas = !!(currentCanvas && (currentCanvas.components?.length || currentCanvas.messages?.length));
|
|
72
69
|
const isIteration = !!executionId || hasClientCanvas;
|
|
73
70
|
|
|
74
71
|
// ── Intent gate: reject non-UI prompts before entering the pipeline ──
|
|
@@ -121,9 +118,7 @@ export async function generateUI({ intent, engine: engineName = 'monolithic', mo
|
|
|
121
118
|
|
|
122
119
|
// ── Normalize currentCanvas into a uniform priorComponents array ──
|
|
123
120
|
// Engines consume a single array; the shape union is collapsed here so
|
|
124
|
-
// engine code doesn't branch on input form.
|
|
125
|
-
// is a future tier-2 feature (see docstring) — for now HTML input falls
|
|
126
|
-
// through unchanged and the engine will treat it as "no prior canvas".
|
|
121
|
+
// engine code doesn't branch on input form.
|
|
127
122
|
let priorComponentsFromPayload = null;
|
|
128
123
|
if (hasClientCanvas) {
|
|
129
124
|
if (Array.isArray(currentCanvas.components)) {
|
|
@@ -131,7 +126,6 @@ export async function generateUI({ intent, engine: engineName = 'monolithic', mo
|
|
|
131
126
|
} else if (Array.isArray(currentCanvas.messages)) {
|
|
132
127
|
priorComponentsFromPayload = currentCanvas.messages.flatMap(m => m?.components || []);
|
|
133
128
|
}
|
|
134
|
-
// TODO(tier-2): if (currentCanvas.html) priorComponentsFromPayload = htmlToComponents(currentCanvas.html);
|
|
135
129
|
}
|
|
136
130
|
|
|
137
131
|
const fn = pickEngine({ engine: engineName, mode: effectiveMode });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adia-ai/a2ui-compose",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.17",
|
|
4
4
|
"description": "AdiaUI A2UI compose engine — framework-agnostic. Takes natural-language intents + a catalog and produces A2UI protocol messages. Pairs with `@adia-ai/a2ui-retrieval` (intent classification, catalog lookup) and `@adia-ai/a2ui-validator` (schema + semantic checks).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|