@praxisui/ai 8.0.0-beta.2 → 8.0.0-beta.20
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/README.md +29 -2
- package/fesm2022/praxisui-ai.mjs +589 -66
- package/index.d.ts +288 -16
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Peer dependencies (Angular v20):
|
|
|
61
61
|
## What this package is responsible for
|
|
62
62
|
|
|
63
63
|
- assistant UX surfaces and interaction flow
|
|
64
|
-
- reusable assistant shell primitives such as conversation messages, quick replies, prompt composer, apply actions
|
|
64
|
+
- reusable assistant shell primitives such as conversation messages, quick replies, prompt composer, apply actions, drag/resize chrome and minimized-session dock
|
|
65
65
|
- backend API orchestration for provider catalog, suggestions, and patch generation
|
|
66
66
|
- local lightweight session history with tenant/env/user scoping
|
|
67
67
|
- confirmation and risk policy integration for sensitive changes
|
|
@@ -76,10 +76,17 @@ The shell owns the shared UX primitives:
|
|
|
76
76
|
- conversation messages and message actions such as edit/resend/custom actions
|
|
77
77
|
- prompt composer, Enter-to-submit behavior, pasted or selected file attachments, submit/apply actions and attach/remove attachment events
|
|
78
78
|
- active context chips for component, schema, selection, route, tenant or custom context
|
|
79
|
+
- rich quick reply chips with optional description, icon, tone and structured context hints
|
|
79
80
|
- attached context metadata for files, images, JSON, schema and text payloads
|
|
80
81
|
- mode and state labels for `config`, `agentic-authoring`, `chat`, `diagnostic`, `review` and `inline-help`
|
|
81
82
|
- draggable/resizable panel layout and accessibility labels
|
|
82
83
|
|
|
84
|
+
`PraxisAiAssistantDockComponent` is the companion minimized-session surface for the same assistant identity. Hosts use it when a specialized assistant session remains active but the full shell is minimized. The dock owns the shared visual language for assistant presence, state badges and reopen affordance; hosts still provide the semantic session summary and decide what reopening means.
|
|
85
|
+
|
|
86
|
+
`PraxisAssistantSessionRegistryService` is the canonical in-memory registry for assistant sessions opened by different Praxis components in the same application shell. Component hosts register their active or minimized sessions with stable `ownerId`/`ownerType` metadata so a future global assistant host can present one shared experience while preserving each component's semantic context.
|
|
87
|
+
|
|
88
|
+
`PraxisAiAssistantSessionHostComponent` is the canonical presence host for minimized assistant sessions in an application or page shell. It reads `PraxisAssistantSessionRegistryService`, renders the shared dock for each minimized session, and emits the opened session snapshot after promoting that session to active in the registry. Specialized components still own the full shell events until their authoring action contracts are promoted to shared platform contracts.
|
|
89
|
+
|
|
83
90
|
The shell intentionally does not own component semantics. Specialized flows still own their adapter/service contract:
|
|
84
91
|
- configuration assistants continue to use `AiConfigAdapter`, capabilities, suggestions and patch review
|
|
85
92
|
- Page Builder agentic authoring continues to use `/api/praxis/config/ai/authoring/**`
|
|
@@ -106,7 +113,7 @@ The orchestrator owns the turn lifecycle:
|
|
|
106
113
|
- stable `sessionId` creation per controller when the host does not provide one
|
|
107
114
|
- fresh `clientTurnId` creation for each executable submit/apply/retry/cancel turn
|
|
108
115
|
- LLM-assisted clarification as a first-class `clarification` state
|
|
109
|
-
- structured clarification questions and quick replies
|
|
116
|
+
- structured clarification questions and quick replies, including rich chip metadata from backend flows
|
|
110
117
|
- edit/resend actions for user messages, including conversation fork semantics
|
|
111
118
|
- attached context add/remove state
|
|
112
119
|
- apply/retry/cancel dispatch when the active flow supports it
|
|
@@ -118,6 +125,8 @@ When a flow asks for clarification, direct user input while the controller is in
|
|
|
118
125
|
|
|
119
126
|
`pendingClarification.diagnostics` is opaque flow state. It is preserved across the next clarification answer so backend-owned semantics can keep metadata-only context, including attachment summaries, without the shell understanding the domain or retaining local file payloads.
|
|
120
127
|
|
|
128
|
+
Backend-owned flows may return quick replies as clickable chips for candidate resources, catalog follow-ups or clarification options. Hosts should keep the full quick reply object: `description`, `icon` and `tone` are presentation hints, while `contextHints` carries structured values such as `resourcePath`, `submitUrl`, `operation` and `schemaUrl` for the next turn. Do not downcast these replies to label/prompt pairs or recompute the options in the UI.
|
|
129
|
+
|
|
121
130
|
When a user edits or resends an earlier user message, the controller forks the conversation from that message before invoking the flow again. Downstream assistant/user messages, quick replies, pending clarification and preview state are cleared so the backend receives the revised conversation branch instead of stale follow-up context. Hosts that expose an edit composer should call `submitEditedMessage(messageId, text)` when the revised prompt is submitted.
|
|
122
131
|
|
|
123
132
|
## What this package does not own
|
|
@@ -193,6 +202,24 @@ Notes:
|
|
|
193
202
|
- `currentState` must be the config root (not wrapped under `config`).
|
|
194
203
|
- Clarifications may return `{ type: "clarification", message, options }`.
|
|
195
204
|
|
|
205
|
+
### Agentic authoring manifest tools
|
|
206
|
+
- `GET /api/praxis/config/ai/authoring/manifests/{componentId}`
|
|
207
|
+
- `GET /api/praxis/config/ai/authoring/manifests/{componentId}/editable-targets`
|
|
208
|
+
- `GET /api/praxis/config/ai/authoring/manifests/{componentId}/operations`
|
|
209
|
+
- `POST /api/praxis/config/ai/authoring/manifests/{componentId}/resolve-target`
|
|
210
|
+
- `POST /api/praxis/config/ai/authoring/manifests/{componentId}/validate-plan`
|
|
211
|
+
- `POST /api/praxis/config/ai/authoring/manifests/{componentId}/compile-patch`
|
|
212
|
+
|
|
213
|
+
`AiBackendApiService` exposes these endpoints through typed methods so hosts can inspect the executable manifest, resolve targets, validate a component edit plan and compile a backend-owned patch without routing by local keywords.
|
|
214
|
+
|
|
215
|
+
### Agentic authoring turn streaming
|
|
216
|
+
- `POST /api/praxis/config/ai/authoring/turn/stream/start`
|
|
217
|
+
- `GET /api/praxis/config/ai/authoring/turn/stream/{streamId}`
|
|
218
|
+
- `GET /api/praxis/config/ai/authoring/turn/stream/{streamId}/probe`
|
|
219
|
+
- `POST /api/praxis/config/ai/authoring/turn/stream/{streamId}/cancel`
|
|
220
|
+
|
|
221
|
+
`AiBackendApiService.startAgenticAuthoringTurnStream`, `connectAgenticAuthoringTurnStream` and `cancelAgenticAuthoringTurnStream` use the same SSE envelope contract as patch streaming. Browser `EventSource` cannot send custom headers, so signed stream tokens returned by the backend should be passed to `connectAgenticAuthoringTurnStream` and `cancelAgenticAuthoringTurnStream` when the backend uses signed-url stream auth.
|
|
222
|
+
|
|
196
223
|
## Assistant local history (UI)
|
|
197
224
|
|
|
198
225
|
The assistant stores a lightweight local history in the browser using `localStorage`. It is scoped by
|