@praxisui/ai 9.0.0-beta.9 → 9.0.0-beta.90

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 CHANGED
@@ -34,7 +34,7 @@ Peer dependencies:
34
34
  - `@angular/forms` `^21.0.0`
35
35
  - `@angular/material` `^21.0.0`
36
36
  - `@google/generative-ai` `^0.24.1`
37
- - `@praxisui/core` `^9.0.0-beta.4`
37
+ - `@praxisui/core` `^9.0.0-beta.12`
38
38
  - `rxjs` `~7.8.0`
39
39
 
40
40
  ## When to use
@@ -138,11 +138,13 @@ When a component exposes factual grounding for consultative answers, include a `
138
138
 
139
139
  Use `createComponentAuthoringContext(...)` from `@praxisui/ai` when returning the adapter context. The helper normalizes the contract into a JSON-safe object, drops `undefined` fields and rejects non-JSON values before they leak into `contextHints`.
140
140
 
141
+ Specialized component-authoring flows should also apply `withAuthoringScopePolicy(...)` or `withAuthoringScopePolicyContextHints(...)` before calling the backend turn resolver. These helpers do not classify prompts locally. They add a shared semantic policy that tells the backend/LLM to return `info` with no patch for loose instructions, greetings, meta-prompts or other turns outside the active component authoring context, while still allowing consultative answers and governed component edits when the semantic intent fits the declared contracts.
142
+
141
143
  The shell ships with centralized PT-BR default labels and accepts the `labels` input for a flow-specific override. The override is partial: omitted labels continue to come from the shared defaults.
142
144
 
143
145
  By default, the prompt composer submits with `Enter` and keeps `Shift+Enter` for multiline prompts. Hosts with custom composer behavior can set `submitOnEnter` to `false`.
144
146
 
145
- The prompt composer can expose browser-native speech recognition as an opt-in input method with `voiceInputMode="browser-speech"`. Hosts can also set the application-wide default through `PRAXIS_ASSISTANT_VOICE_INPUT_MODE`; direct shell input still wins for specialized flows that need a stricter policy. This mode uses the browser `SpeechRecognition`/`webkitSpeechRecognition` surface when available, appends the recognized text to the prompt and never auto-submits the assistant turn. It is intended as an initial low-latency UX path; governed provider-backed transcription should remain a backend-owned Praxis Config capability when promoted to enterprise/default usage. Corporate hosts should keep this mode disabled unless their privacy policy allows browser/vendor speech recognition for the current tenant and environment.
147
+ The prompt composer supports governed provider-backed transcription with `voiceInputMode="governed-transcription"`. It captures a short audio blob with `MediaRecorder`, sends it to `POST /api/praxis/config/ai/transcriptions` using the normal tenant/user/environment scope, appends the returned text to the prompt and never auto-submits the assistant turn. Provider selection, credentials, limits and audit policy remain backend-owned by Praxis Config. The older `browser-speech` mode remains an explicit compatibility option for approved low-risk environments, but it is not the enterprise/default path because `SpeechRecognition` availability varies by browser.
146
148
 
147
149
  When a user pastes an image into the prompt composer, the shell emits `attachmentsPasted` with `PraxisAssistantShellAttachment` items containing the original `File`, image metadata, `source: 'paste'` and a local preview URL.
148
150
 
@@ -283,7 +285,7 @@ Notes:
283
285
 
284
286
  `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.
285
287
 
286
- `AgenticAuthoringTurnClientService` is the shared client for assistant turn flows that consume this canonical stream. It starts the turn, connects SSE and exposes two levels: `streamEvents()` for component flows that already own rich preview/apply semantics, and `streamTurn()` for flows that can consume normalized `PraxisAssistantTurnResult` values directly. The client can emit shared lifecycle status for silent streams, enforce a terminal-result timeout and surface transport lifecycle events such as probe readiness, transport opening and first-event receipt. `AiBackendApiService.connectAgenticAuthoringTurnStream` also falls back to `fetch` SSE parsing when `EventSource` is unavailable. Per-call `baseUrl` and header overrides allow component services with existing endpoint options to migrate without losing host configuration. Component-specific flows should use this shared client when migrating away from `/patch`, then add only component-owned context assembly and apply semantics locally.
288
+ `AgenticAuthoringTurnClientService` is the shared client for assistant turn flows that consume this canonical stream. It starts the turn, connects SSE and exposes two levels: `streamEvents()` for component flows that already own rich preview/apply semantics, and `streamTurn()` for flows that can consume normalized `PraxisAssistantTurnResult` values directly. The client can emit shared lifecycle status for silent streams, enforce terminal-result and whole-turn timeouts, and surface transport lifecycle events such as probe readiness, transport opening and first-event receipt. Governed lifecycle telemetry records start and terminal outcomes (`result`, `error`, `cancelled`, `timeout`, and `transport-error`) with bounded provider/model dimensions, correlation identifiers, and duration, but never prompt text, API keys, headers, or raw payloads. `ObservabilityMetricsSnapshot.agenticTurns` materializes these events as success and timeout rates, average/P50/P95 latency, and provider/model breakdowns for the active dashboard window. When either timeout expires after the stream has started, the client also sends a bounded best-effort cancellation to the canonical backend using the same signed token, `baseUrl`, and headers, while preserving the original timeout as the user-facing failure. The cancellation outcome is emitted through the governed Praxis logger as a redacted structured diagnostic (`cancel-confirmed`, `cancel-timeout`, or `cancel-failed`) correlated by turn and stream identifiers. `AiBackendApiService.connectAgenticAuthoringTurnStream` also falls back to `fetch` SSE parsing when `EventSource` is unavailable. Per-call `baseUrl` and header overrides allow component services with existing endpoint options to migrate without losing host configuration. Component-specific flows should use this shared client when migrating away from `/patch`, then add only component-owned context assembly and apply semantics locally.
287
289
 
288
290
  ## Assistant local history (UI)
289
291
 
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "generatedAt": "2026-07-24T12:32:39.440Z",
4
+ "packageName": "@praxisui/ai",
5
+ "packageVersion": "9.0.0-beta.90",
6
+ "sourceRegistry": "praxis-component-registry-ingestion",
7
+ "sourceRegistryVersion": "1.0.0",
8
+ "componentCount": 0,
9
+ "components": {},
10
+ "note": "Package-scoped Praxis component registry for source-free agent discovery. Use the canonical ingestion registry for cross-package aggregate analysis."
11
+ }