@praxisui/ai 8.0.0-beta.104 → 8.0.0-beta.106
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 +45 -6
- package/fesm2022/praxisui-ai.mjs +192 -20
- package/package.json +2 -2
- package/types/praxisui-ai.d.ts +40 -1
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/ai",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.106",
|
|
4
4
|
"description": "AI building blocks and assistant integration for Praxis UI applications.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
8
|
+
"@praxisui/core": "^8.0.0-beta.106",
|
|
9
9
|
"@angular/cdk": "^21.0.0",
|
|
10
10
|
"@angular/forms": "^21.0.0",
|
|
11
11
|
"@angular/material": "^21.0.0",
|
package/types/praxisui-ai.d.ts
CHANGED
|
@@ -851,6 +851,7 @@ interface PraxisAssistantShellMessage {
|
|
|
851
851
|
id: string;
|
|
852
852
|
role: PraxisAssistantShellMessageRole;
|
|
853
853
|
text: string;
|
|
854
|
+
assistantContent?: Readonly<Record<string, unknown>> | null;
|
|
854
855
|
status?: 'pending' | 'done' | 'error';
|
|
855
856
|
editable?: boolean;
|
|
856
857
|
resendable?: boolean;
|
|
@@ -1178,6 +1179,7 @@ interface PraxisAssistantTurnResult {
|
|
|
1178
1179
|
state: PraxisAssistantShellState;
|
|
1179
1180
|
phase?: PraxisAssistantTurnPhase;
|
|
1180
1181
|
assistantMessage?: string;
|
|
1182
|
+
assistantContent?: Readonly<Record<string, unknown>> | null;
|
|
1181
1183
|
messages?: readonly PraxisAssistantShellMessage[];
|
|
1182
1184
|
quickReplies?: readonly PraxisAssistantShellQuickReply[];
|
|
1183
1185
|
clarificationQuestions?: readonly PraxisAssistantClarificationQuestion[];
|
|
@@ -1530,6 +1532,7 @@ interface AgenticAuthoringTurnStreamLifecycle {
|
|
|
1530
1532
|
}
|
|
1531
1533
|
interface AgenticAuthoringTurnStreamConnectionOptions {
|
|
1532
1534
|
baseUrl?: string;
|
|
1535
|
+
headers?: Record<string, string | undefined>;
|
|
1533
1536
|
onLifecycle?: (event: AgenticAuthoringTurnStreamLifecycle) => void;
|
|
1534
1537
|
}
|
|
1535
1538
|
interface AgenticAuthoringTurnStreamStartOptions {
|
|
@@ -1703,6 +1706,8 @@ declare class AiBackendApiService {
|
|
|
1703
1706
|
private consumeBufferedSseFrames;
|
|
1704
1707
|
private findSseFrameBoundary;
|
|
1705
1708
|
private probePatchStreamEndpoint;
|
|
1709
|
+
private buildFetchHeaders;
|
|
1710
|
+
private hasExplicitHeaders;
|
|
1706
1711
|
static ɵfac: i0.ɵɵFactoryDeclaration<AiBackendApiService, never>;
|
|
1707
1712
|
static ɵprov: i0.ɵɵInjectableDeclaration<AiBackendApiService>;
|
|
1708
1713
|
}
|
|
@@ -1736,13 +1741,14 @@ declare class AgenticAuthoringTurnClientService {
|
|
|
1736
1741
|
private readonly runtimeObservationRegistry;
|
|
1737
1742
|
streamEvents(request: AgenticAuthoringTurnStreamRequest, options?: AgenticAuthoringTurnClientOptions): Observable<AgenticAuthoringTurnClientEvent>;
|
|
1738
1743
|
streamTurn(request: AgenticAuthoringTurnStreamRequest, options?: AgenticAuthoringTurnClientOptions): Observable<PraxisAssistantTurnResult>;
|
|
1739
|
-
toTurnResult(event: AgenticAuthoringTurnStreamEnvelopeContract): PraxisAssistantTurnResult;
|
|
1744
|
+
toTurnResult(event: AgenticAuthoringTurnStreamEnvelopeContract, clientTurnId?: string | null): PraxisAssistantTurnResult;
|
|
1740
1745
|
private withRuntimeObservationTrustBoundary;
|
|
1741
1746
|
private collectRuntimeComponentObservations;
|
|
1742
1747
|
private isRuntimeComponentObservationEnvelopeLike;
|
|
1743
1748
|
private startAuthoringTurnStream;
|
|
1744
1749
|
private isPromiseLike;
|
|
1745
1750
|
private toResultTurn;
|
|
1751
|
+
private isConsultativeCatalogAnswer;
|
|
1746
1752
|
private toShellQuickReplies;
|
|
1747
1753
|
private toPendingClarification;
|
|
1748
1754
|
private phaseForPayload;
|
|
@@ -2374,6 +2380,21 @@ interface QuickReplyContextChip {
|
|
|
2374
2380
|
value: string;
|
|
2375
2381
|
ariaLabel: string;
|
|
2376
2382
|
}
|
|
2383
|
+
type AssistantContentBlock = Readonly<Record<string, unknown>>;
|
|
2384
|
+
interface AssistantContentResourceField {
|
|
2385
|
+
name: string;
|
|
2386
|
+
label: string;
|
|
2387
|
+
description: string;
|
|
2388
|
+
}
|
|
2389
|
+
interface AssistantContentResource {
|
|
2390
|
+
id: string;
|
|
2391
|
+
label: string;
|
|
2392
|
+
description: string;
|
|
2393
|
+
role: string;
|
|
2394
|
+
resourcePath: string;
|
|
2395
|
+
fields: readonly AssistantContentResourceField[];
|
|
2396
|
+
evidence: readonly string[];
|
|
2397
|
+
}
|
|
2377
2398
|
declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
2378
2399
|
labels: Partial<PraxisAssistantShellLabels> | null;
|
|
2379
2400
|
mode: PraxisAssistantShellMode;
|
|
@@ -2475,6 +2496,20 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2475
2496
|
protected onAttachmentFilesSelected(event: Event): void;
|
|
2476
2497
|
protected onApply(): void;
|
|
2477
2498
|
protected renderMessageText(text: string | null | undefined): string;
|
|
2499
|
+
protected hasStructuredAssistantContent(message: PraxisAssistantShellMessage): boolean;
|
|
2500
|
+
protected getAssistantContentBlocks(message: PraxisAssistantShellMessage): readonly AssistantContentBlock[];
|
|
2501
|
+
protected getAssistantContentBlockType(block: AssistantContentBlock): string;
|
|
2502
|
+
protected getAssistantContentBlockTitle(block: AssistantContentBlock, fallback?: string): string;
|
|
2503
|
+
protected getAssistantContentBlockText(block: AssistantContentBlock): string;
|
|
2504
|
+
protected getAssistantContentResources(block: AssistantContentBlock): readonly AssistantContentResource[];
|
|
2505
|
+
protected getAssistantContentResourceFields(resource: Record<string, unknown>): readonly AssistantContentResourceField[];
|
|
2506
|
+
protected getAssistantContentResourceMeta(resource: AssistantContentResource): readonly string[];
|
|
2507
|
+
protected trackAssistantContentBlock(index: number, block: AssistantContentBlock): string;
|
|
2508
|
+
protected trackAssistantContentResource(index: number, resource: AssistantContentResource): string;
|
|
2509
|
+
protected trackAssistantContentField(index: number, field: AssistantContentResourceField): string;
|
|
2510
|
+
protected trackAssistantContentValue(_index: number, value: string): string;
|
|
2511
|
+
private isSupportedAssistantContentBlock;
|
|
2512
|
+
private getStringArray;
|
|
2478
2513
|
private renderInlineMarkdown;
|
|
2479
2514
|
private escapeHtml;
|
|
2480
2515
|
protected shouldShowStatusText(): boolean;
|
|
@@ -2521,6 +2556,8 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2521
2556
|
private asRecord;
|
|
2522
2557
|
private stringHint;
|
|
2523
2558
|
private quickReplyHint;
|
|
2559
|
+
private quickReplyPublicResourceLabel;
|
|
2560
|
+
private isPublicDisplayText;
|
|
2524
2561
|
private hasQuickReplyResourceContext;
|
|
2525
2562
|
private isFieldDiscoveryQuickReply;
|
|
2526
2563
|
protected isContextualPreviewActionQuickReply(reply: PraxisAssistantShellQuickReply): boolean;
|
|
@@ -2533,8 +2570,10 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2533
2570
|
private isGenericContextualActionDescription;
|
|
2534
2571
|
private trimSentencePunctuation;
|
|
2535
2572
|
private shortPathLabel;
|
|
2573
|
+
private knownPublicResourceLabel;
|
|
2536
2574
|
private shortTechnicalLabel;
|
|
2537
2575
|
private friendlyTechnicalLabel;
|
|
2576
|
+
private normalizePortugueseDisplayText;
|
|
2538
2577
|
protected getCloseIcon(): string;
|
|
2539
2578
|
protected getContextItemValue(item: PraxisAssistantShellContextItem): string;
|
|
2540
2579
|
private normalizeShellAction;
|