@praxisui/ai 8.0.0-beta.102 → 8.0.0-beta.104
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 +2 -0
- package/fesm2022/praxisui-ai.mjs +304 -62
- package/package.json +2 -2
- package/types/praxisui-ai.d.ts +41 -8
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.104",
|
|
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.104",
|
|
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
|
@@ -2,6 +2,7 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, OnDestroy, ElementRef, OnChanges, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
|
+
import { PraxisRuntimeComponentObservationEnvelope, PraxisRuntimeComponentObservationRegistryService } from '@praxisui/core';
|
|
5
6
|
import { Schema } from '@google/generative-ai';
|
|
6
7
|
import { ConnectedPosition, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
7
8
|
import * as _praxisui_ai from '@praxisui/ai';
|
|
@@ -18,7 +19,7 @@ declare class PraxisAi {
|
|
|
18
19
|
* Do not edit manually. Run praxis-config-starter/tools/contracts/generate-ai-contract-bindings.js.
|
|
19
20
|
*/
|
|
20
21
|
declare const AI_CONTRACT_VERSION: "v1.1";
|
|
21
|
-
declare const AI_CONTRACT_SCHEMA_HASH: "
|
|
22
|
+
declare const AI_CONTRACT_SCHEMA_HASH: "daab9623a5c4d660105dfe1c85a6bd1ee1ef1b54ef5981e26d27c44aa82ddb4f";
|
|
22
23
|
declare const AI_STREAM_EVENT_SCHEMA_VERSION: "v1";
|
|
23
24
|
declare const AI_DOMAIN_CATALOG_CONTEXT_HINT_SCHEMA_VERSION: "praxis.ai.context-hints.domain-catalog/v0.2";
|
|
24
25
|
declare const AI_STREAM_EVENT_TYPES: readonly ["status", "thought.step", "heartbeat", "result", "error", "cancelled"];
|
|
@@ -281,7 +282,9 @@ interface AgenticAuthoringQuickReplyContract {
|
|
|
281
282
|
icon?: string | null;
|
|
282
283
|
tone?: string | null;
|
|
283
284
|
contextHints?: AiContextHintsContract | null;
|
|
284
|
-
|
|
285
|
+
semanticDecision?: AgenticAuthoringSemanticDecisionContract | null;
|
|
286
|
+
value?: AiJsonObject | AiJsonValue | null;
|
|
287
|
+
[key: string]: AiJsonValue | AiContextHintsContract | AgenticAuthoringSemanticDecisionContract | null | undefined;
|
|
285
288
|
}
|
|
286
289
|
interface AgenticAuthoringSemanticSelectedResourceContract {
|
|
287
290
|
resourcePath?: string | null;
|
|
@@ -442,7 +445,10 @@ interface AgenticAuthoringTurnStreamRequestContract extends AgenticAuthoringConv
|
|
|
442
445
|
contextHints?: AiContextHintsContract | null;
|
|
443
446
|
componentCapabilities?: AgenticAuthoringComponentCapabilitiesResultContract | null;
|
|
444
447
|
activeSemanticDecision?: AgenticAuthoringSemanticDecisionContract | null;
|
|
445
|
-
|
|
448
|
+
diagnostics?: AiJsonObject | null;
|
|
449
|
+
runtimeComponentObservations?: unknown[] | null;
|
|
450
|
+
runtimeComponentObservationTrustBoundary?: 'untrusted_frontend_observation' | null;
|
|
451
|
+
[key: string]: AiJsonValue | AiContextHintsContract | AgenticAuthoringComponentCapabilitiesResultContract | AgenticAuthoringSemanticDecisionContract | AgenticAuthoringConversationMessageContract[] | AgenticAuthoringPendingClarificationContract | AgenticAuthoringAttachmentSummaryContract[] | unknown[] | undefined;
|
|
446
452
|
}
|
|
447
453
|
interface AgenticAuthoringPreviewResultContract {
|
|
448
454
|
valid?: boolean;
|
|
@@ -1103,6 +1109,7 @@ interface PraxisAssistantClarificationOption {
|
|
|
1103
1109
|
id: string;
|
|
1104
1110
|
label: string;
|
|
1105
1111
|
value: string;
|
|
1112
|
+
rawValue?: unknown;
|
|
1106
1113
|
description?: string;
|
|
1107
1114
|
displayPrompt?: string;
|
|
1108
1115
|
example?: string;
|
|
@@ -1125,6 +1132,7 @@ interface PraxisAssistantTurnAction {
|
|
|
1125
1132
|
value?: unknown;
|
|
1126
1133
|
displayPrompt?: string;
|
|
1127
1134
|
contextHints?: Record<string, unknown>;
|
|
1135
|
+
activeSemanticDecision?: Record<string, unknown>;
|
|
1128
1136
|
}
|
|
1129
1137
|
interface PraxisAssistantPendingClarification {
|
|
1130
1138
|
sourcePrompt: string;
|
|
@@ -1158,11 +1166,13 @@ interface PraxisAssistantTurnRequest {
|
|
|
1158
1166
|
schemaFields?: unknown;
|
|
1159
1167
|
dataProfile?: unknown;
|
|
1160
1168
|
contextHints?: Record<string, unknown>;
|
|
1169
|
+
activeSemanticDecision?: Record<string, unknown>;
|
|
1161
1170
|
preview?: unknown;
|
|
1162
1171
|
pendingPatch?: unknown;
|
|
1163
1172
|
pendingClarification?: PraxisAssistantPendingClarification;
|
|
1164
1173
|
diagnostics?: Record<string, unknown>;
|
|
1165
1174
|
observationId?: string | null;
|
|
1175
|
+
runtimeComponentObservations?: readonly PraxisRuntimeComponentObservationEnvelope[];
|
|
1166
1176
|
}
|
|
1167
1177
|
interface PraxisAssistantTurnResult {
|
|
1168
1178
|
state: PraxisAssistantShellState;
|
|
@@ -1455,7 +1465,7 @@ declare class PraxisAiService {
|
|
|
1455
1465
|
}
|
|
1456
1466
|
|
|
1457
1467
|
declare const AI_INTENT_CONTRACT_VERSION: "v1.1";
|
|
1458
|
-
declare const AI_INTENT_CONTRACT_SCHEMA_HASH: "
|
|
1468
|
+
declare const AI_INTENT_CONTRACT_SCHEMA_HASH: "daab9623a5c4d660105dfe1c85a6bd1ee1ef1b54ef5981e26d27c44aa82ddb4f";
|
|
1459
1469
|
type AiSchemaContext = AiSchemaContextContract;
|
|
1460
1470
|
interface AiSuggestionsRequest {
|
|
1461
1471
|
componentId: string;
|
|
@@ -1493,7 +1503,13 @@ type AgenticAuthoringResolveTargetRequest = AgenticAuthoringResolveTargetRequest
|
|
|
1493
1503
|
type AgenticAuthoringResolvedTarget = AgenticAuthoringResolvedTargetContract;
|
|
1494
1504
|
type AgenticAuthoringManifestValidationResult = AgenticAuthoringManifestValidationResultContract;
|
|
1495
1505
|
type AgenticAuthoringManifestCompileResult = AgenticAuthoringManifestCompileResultContract;
|
|
1496
|
-
type
|
|
1506
|
+
type WithoutStringIndex<T> = {
|
|
1507
|
+
[K in keyof T as string extends K ? never : K]: T[K];
|
|
1508
|
+
};
|
|
1509
|
+
type AgenticAuthoringTurnStreamRequest = WithoutStringIndex<AgenticAuthoringTurnStreamRequestContract> & Record<string, unknown> & {
|
|
1510
|
+
runtimeComponentObservations?: readonly PraxisRuntimeComponentObservationEnvelope[] | readonly unknown[] | null;
|
|
1511
|
+
runtimeComponentObservationTrustBoundary?: 'untrusted_frontend_observation' | null;
|
|
1512
|
+
};
|
|
1497
1513
|
type AgenticAuthoringTurnStreamStartResponse = AgenticAuthoringTurnStreamStartResponseContract;
|
|
1498
1514
|
type AgenticAuthoringTurnStreamEnvelope<TPayload extends AiJsonObject = AiJsonObject> = AgenticAuthoringTurnStreamEnvelopeContract<TPayload>;
|
|
1499
1515
|
interface AiPatchStreamConnection {
|
|
@@ -1717,15 +1733,23 @@ interface AgenticAuthoringTurnLifecycleEvent {
|
|
|
1717
1733
|
type AgenticAuthoringTurnClientEvent = AgenticAuthoringTurnStreamStartedEvent | AgenticAuthoringTurnLifecycleEvent | AgenticAuthoringTurnStreamEnvelopeEvent;
|
|
1718
1734
|
declare class AgenticAuthoringTurnClientService {
|
|
1719
1735
|
private readonly aiApi;
|
|
1720
|
-
|
|
1721
|
-
|
|
1736
|
+
private readonly runtimeObservationRegistry;
|
|
1737
|
+
streamEvents(request: AgenticAuthoringTurnStreamRequest, options?: AgenticAuthoringTurnClientOptions): Observable<AgenticAuthoringTurnClientEvent>;
|
|
1738
|
+
streamTurn(request: AgenticAuthoringTurnStreamRequest, options?: AgenticAuthoringTurnClientOptions): Observable<PraxisAssistantTurnResult>;
|
|
1722
1739
|
toTurnResult(event: AgenticAuthoringTurnStreamEnvelopeContract): PraxisAssistantTurnResult;
|
|
1740
|
+
private withRuntimeObservationTrustBoundary;
|
|
1741
|
+
private collectRuntimeComponentObservations;
|
|
1742
|
+
private isRuntimeComponentObservationEnvelopeLike;
|
|
1743
|
+
private startAuthoringTurnStream;
|
|
1744
|
+
private isPromiseLike;
|
|
1723
1745
|
private toResultTurn;
|
|
1724
1746
|
private toShellQuickReplies;
|
|
1725
1747
|
private toPendingClarification;
|
|
1726
1748
|
private phaseForPayload;
|
|
1727
1749
|
private statusForPayload;
|
|
1728
1750
|
private resultDiagnostics;
|
|
1751
|
+
private runtimeRelatedSurfaceDisambiguationContext;
|
|
1752
|
+
private runtimeRelatedSurfaceDisambiguationPageId;
|
|
1729
1753
|
private toLifecycleEvent;
|
|
1730
1754
|
private silenceStatusEvent;
|
|
1731
1755
|
private resultTimeoutEvent;
|
|
@@ -1781,6 +1805,7 @@ interface PraxisAssistantTurnControllerOptions {
|
|
|
1781
1805
|
contextHints?: Record<string, unknown>;
|
|
1782
1806
|
}
|
|
1783
1807
|
declare class PraxisAssistantTurnOrchestratorService {
|
|
1808
|
+
private readonly runtimeObservationRegistry;
|
|
1784
1809
|
createController(flow: PraxisAssistantTurnFlow, options?: PraxisAssistantTurnControllerOptions): PraxisAssistantTurnController;
|
|
1785
1810
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisAssistantTurnOrchestratorService, never>;
|
|
1786
1811
|
static ɵprov: i0.ɵɵInjectableDeclaration<PraxisAssistantTurnOrchestratorService>;
|
|
@@ -1788,10 +1813,11 @@ declare class PraxisAssistantTurnOrchestratorService {
|
|
|
1788
1813
|
declare class PraxisAssistantTurnController {
|
|
1789
1814
|
private readonly flow;
|
|
1790
1815
|
private readonly options;
|
|
1816
|
+
private readonly runtimeObservationRegistry;
|
|
1791
1817
|
private readonly stateSubject;
|
|
1792
1818
|
readonly state$: Observable<PraxisAssistantTurnViewState>;
|
|
1793
1819
|
private activeFlowClientTurnId;
|
|
1794
|
-
constructor(flow: PraxisAssistantTurnFlow, options: PraxisAssistantTurnControllerOptions);
|
|
1820
|
+
constructor(flow: PraxisAssistantTurnFlow, options: PraxisAssistantTurnControllerOptions, runtimeObservationRegistry: PraxisRuntimeComponentObservationRegistryService | null);
|
|
1795
1821
|
snapshot(): PraxisAssistantTurnViewState;
|
|
1796
1822
|
setContextHints(hints: Record<string, unknown> | undefined): void;
|
|
1797
1823
|
setContextItems(items: readonly PraxisAssistantShellContextItem[]): void;
|
|
@@ -1809,7 +1835,10 @@ declare class PraxisAssistantTurnController {
|
|
|
1809
1835
|
retry(): Observable<PraxisAssistantTurnViewState>;
|
|
1810
1836
|
cancel(): Observable<PraxisAssistantTurnViewState>;
|
|
1811
1837
|
private runFlow;
|
|
1838
|
+
private invokeFlow;
|
|
1812
1839
|
private buildRequest;
|
|
1840
|
+
private collectRuntimeComponentObservations;
|
|
1841
|
+
private isPromiseLike;
|
|
1813
1842
|
private submitExistingUserMessage;
|
|
1814
1843
|
private findUserMessageIndex;
|
|
1815
1844
|
private resetReplayState;
|
|
@@ -2476,6 +2505,7 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2476
2505
|
protected getRecommendedIntentTone(intent: PraxisAssistantRecommendedIntent): string;
|
|
2477
2506
|
protected getRecommendedIntentGroupLabel(intent: PraxisAssistantRecommendedIntent): string;
|
|
2478
2507
|
protected getQuickReplyAriaLabel(reply: PraxisAssistantShellQuickReply): string;
|
|
2508
|
+
protected getQuickReplyLabel(reply: PraxisAssistantShellQuickReply): string;
|
|
2479
2509
|
protected getQuickReplyTechnicalDetails(reply: PraxisAssistantShellQuickReply): string;
|
|
2480
2510
|
protected isRichQuickReply(reply: PraxisAssistantShellQuickReply): boolean;
|
|
2481
2511
|
protected shouldUseInlineQuickReplies(): boolean;
|
|
@@ -2494,6 +2524,7 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2494
2524
|
private hasQuickReplyResourceContext;
|
|
2495
2525
|
private isFieldDiscoveryQuickReply;
|
|
2496
2526
|
protected isContextualPreviewActionQuickReply(reply: PraxisAssistantShellQuickReply): boolean;
|
|
2527
|
+
protected isSourceReviewQuickReply(reply: PraxisAssistantShellQuickReply): boolean;
|
|
2497
2528
|
protected isGuidedActionQuickReply(reply: PraxisAssistantShellQuickReply): boolean;
|
|
2498
2529
|
private quickReplyPresentation;
|
|
2499
2530
|
private quickReplyPresentationKind;
|
|
@@ -2503,7 +2534,9 @@ declare class PraxisAiAssistantShellComponent implements OnChanges, OnDestroy {
|
|
|
2503
2534
|
private trimSentencePunctuation;
|
|
2504
2535
|
private shortPathLabel;
|
|
2505
2536
|
private shortTechnicalLabel;
|
|
2537
|
+
private friendlyTechnicalLabel;
|
|
2506
2538
|
protected getCloseIcon(): string;
|
|
2539
|
+
protected getContextItemValue(item: PraxisAssistantShellContextItem): string;
|
|
2507
2540
|
private normalizeShellAction;
|
|
2508
2541
|
protected onRemoveAttachment(attachment: PraxisAssistantShellAttachment): void;
|
|
2509
2542
|
protected onMessageAction(message: PraxisAssistantShellMessage, action: PraxisAssistantShellMessageAction): void;
|