@absolutejs/voice 0.0.22-beta.3 → 0.0.22-beta.300
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 +3232 -82
- package/dist/agent.d.ts +62 -0
- package/dist/agentSquadContract.d.ts +98 -0
- package/dist/angular/index.d.ts +17 -0
- package/dist/angular/index.js +3598 -1058
- package/dist/angular/voice-agent-squad-status.service.d.ts +12 -0
- package/dist/angular/voice-campaign-dialer-proof.service.d.ts +14 -0
- package/dist/angular/voice-controller.service.d.ts +1 -0
- package/dist/angular/voice-delivery-runtime.component.d.ts +17 -0
- package/dist/angular/voice-delivery-runtime.service.d.ts +16 -0
- package/dist/angular/voice-live-ops.service.d.ts +11 -0
- package/dist/angular/voice-ops-action-center.service.d.ts +13 -0
- package/dist/angular/voice-ops-status.component.d.ts +15 -0
- package/dist/angular/voice-ops-status.service.d.ts +12 -0
- package/dist/angular/voice-platform-coverage.service.d.ts +12 -0
- package/dist/angular/voice-proof-trends.service.d.ts +12 -0
- package/dist/angular/voice-provider-capabilities.service.d.ts +12 -0
- package/dist/angular/voice-provider-contracts.service.d.ts +12 -0
- package/dist/angular/voice-provider-status.service.d.ts +12 -0
- package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
- package/dist/angular/voice-routing-status.service.d.ts +11 -0
- package/dist/angular/voice-stream.service.d.ts +3 -0
- package/dist/angular/voice-trace-timeline.service.d.ts +12 -0
- package/dist/angular/voice-turn-latency.service.d.ts +13 -0
- package/dist/angular/voice-turn-quality.service.d.ts +12 -0
- package/dist/angular/voice-workflow-status.service.d.ts +12 -0
- package/dist/assistant.d.ts +20 -0
- package/dist/assistantHealth.d.ts +81 -0
- package/dist/assistantMemory.d.ts +63 -0
- package/dist/audit.d.ts +128 -0
- package/dist/auditDeliveryRoutes.d.ts +85 -0
- package/dist/auditExport.d.ts +34 -0
- package/dist/auditRoutes.d.ts +66 -0
- package/dist/auditSinks.d.ts +151 -0
- package/dist/bargeInRoutes.d.ts +56 -0
- package/dist/campaign.d.ts +768 -0
- package/dist/campaignDialers.d.ts +111 -0
- package/dist/client/actions.d.ts +105 -0
- package/dist/client/agentSquadStatus.d.ts +37 -0
- package/dist/client/agentSquadStatusWidget.d.ts +24 -0
- package/dist/client/bargeInMonitor.d.ts +7 -0
- package/dist/client/campaignDialerProof.d.ts +23 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/deliveryRuntime.d.ts +34 -0
- package/dist/client/deliveryRuntimeWidget.d.ts +37 -0
- package/dist/client/duplex.d.ts +1 -1
- package/dist/client/htmxBootstrap.js +747 -15
- package/dist/client/index.d.ts +72 -0
- package/dist/client/index.js +5371 -10
- package/dist/client/liveOps.d.ts +22 -0
- package/dist/client/liveOpsWidget.d.ts +23 -0
- package/dist/client/liveTurnLatency.d.ts +41 -0
- package/dist/client/opsActionCenter.d.ts +54 -0
- package/dist/client/opsActionCenterWidget.d.ts +29 -0
- package/dist/client/opsActionHistory.d.ts +19 -0
- package/dist/client/opsActionHistoryWidget.d.ts +11 -0
- package/dist/client/opsStatus.d.ts +19 -0
- package/dist/client/opsStatusWidget.d.ts +40 -0
- package/dist/client/platformCoverage.d.ts +19 -0
- package/dist/client/platformCoverageWidget.d.ts +37 -0
- package/dist/client/proofTrends.d.ts +19 -0
- package/dist/client/proofTrendsWidget.d.ts +37 -0
- package/dist/client/providerCapabilities.d.ts +19 -0
- package/dist/client/providerCapabilitiesWidget.d.ts +32 -0
- package/dist/client/providerContracts.d.ts +19 -0
- package/dist/client/providerContractsWidget.d.ts +37 -0
- package/dist/client/providerSimulationControls.d.ts +33 -0
- package/dist/client/providerSimulationControlsWidget.d.ts +20 -0
- package/dist/client/providerStatus.d.ts +19 -0
- package/dist/client/providerStatusWidget.d.ts +32 -0
- package/dist/client/readinessFailures.d.ts +19 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/client/routingStatus.d.ts +19 -0
- package/dist/client/routingStatusWidget.d.ts +28 -0
- package/dist/client/traceTimeline.d.ts +19 -0
- package/dist/client/traceTimelineWidget.d.ts +36 -0
- package/dist/client/turnLatency.d.ts +22 -0
- package/dist/client/turnLatencyWidget.d.ts +33 -0
- package/dist/client/turnQuality.d.ts +19 -0
- package/dist/client/turnQualityWidget.d.ts +32 -0
- package/dist/client/workflowStatus.d.ts +19 -0
- package/dist/dataControl.d.ts +180 -0
- package/dist/deliveryRuntime.d.ts +158 -0
- package/dist/deliverySinkRoutes.d.ts +117 -0
- package/dist/demoReadyRoutes.d.ts +98 -0
- package/dist/diagnosticsRoutes.d.ts +44 -0
- package/dist/evalRoutes.d.ts +219 -0
- package/dist/fileStore.d.ts +17 -2
- package/dist/guardrails.d.ts +128 -0
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/incidentBundle.d.ts +116 -0
- package/dist/index.d.ts +151 -10
- package/dist/index.js +28252 -3426
- package/dist/latencySlo.d.ts +56 -0
- package/dist/liveLatency.d.ts +78 -0
- package/dist/liveOps.d.ts +190 -0
- package/dist/modelAdapters.d.ts +151 -0
- package/dist/observabilityExport.d.ts +481 -0
- package/dist/openaiRealtime.d.ts +27 -0
- package/dist/openaiTTS.d.ts +18 -0
- package/dist/operationsRecord.d.ts +254 -0
- package/dist/opsActionAuditRoutes.d.ts +99 -0
- package/dist/opsConsoleRoutes.d.ts +80 -0
- package/dist/opsRecovery.d.ts +137 -0
- package/dist/opsStatus.d.ts +76 -0
- package/dist/opsStatusRoutes.d.ts +33 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/outcomeContract.d.ts +146 -0
- package/dist/phoneAgent.d.ts +139 -0
- package/dist/phoneAgentProductionSmoke.d.ts +115 -0
- package/dist/platformCoverage.d.ts +91 -0
- package/dist/postCallAnalysis.d.ts +98 -0
- package/dist/postgresStore.d.ts +13 -2
- package/dist/productionReadiness.d.ts +559 -0
- package/dist/proofTrends.d.ts +133 -0
- package/dist/providerAdapters.d.ts +48 -0
- package/dist/providerCapabilities.d.ts +92 -0
- package/dist/providerDecisionTraces.d.ts +130 -0
- package/dist/providerHealth.d.ts +79 -0
- package/dist/providerOrchestration.d.ts +109 -0
- package/dist/providerRoutingContract.d.ts +71 -0
- package/dist/providerSlo.d.ts +142 -0
- package/dist/providerStackRecommendations.d.ts +187 -0
- package/dist/qualityRoutes.d.ts +76 -0
- package/dist/queue.d.ts +61 -0
- package/dist/react/VoiceAgentSquadStatus.d.ts +5 -0
- package/dist/react/VoiceDeliveryRuntime.d.ts +7 -0
- package/dist/react/VoiceOpsActionCenter.d.ts +5 -0
- package/dist/react/VoiceOpsStatus.d.ts +6 -0
- package/dist/react/VoicePlatformCoverage.d.ts +6 -0
- package/dist/react/VoiceProofTrends.d.ts +6 -0
- package/dist/react/VoiceProviderCapabilities.d.ts +6 -0
- package/dist/react/VoiceProviderContracts.d.ts +6 -0
- package/dist/react/VoiceProviderSimulationControls.d.ts +5 -0
- package/dist/react/VoiceProviderStatus.d.ts +6 -0
- package/dist/react/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/VoiceRoutingStatus.d.ts +6 -0
- package/dist/react/VoiceTraceTimeline.d.ts +6 -0
- package/dist/react/VoiceTurnLatency.d.ts +6 -0
- package/dist/react/VoiceTurnQuality.d.ts +6 -0
- package/dist/react/index.d.ts +33 -0
- package/dist/react/index.js +5188 -14
- package/dist/react/useVoiceAgentSquadStatus.d.ts +8 -0
- package/dist/react/useVoiceCampaignDialerProof.d.ts +10 -0
- package/dist/react/useVoiceController.d.ts +3 -0
- package/dist/react/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/react/useVoiceLiveOps.d.ts +9 -0
- package/dist/react/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/react/useVoiceOpsStatus.d.ts +8 -0
- package/dist/react/useVoicePlatformCoverage.d.ts +8 -0
- package/dist/react/useVoiceProofTrends.d.ts +8 -0
- package/dist/react/useVoiceProviderCapabilities.d.ts +8 -0
- package/dist/react/useVoiceProviderContracts.d.ts +8 -0
- package/dist/react/useVoiceProviderSimulationControls.d.ts +10 -0
- package/dist/react/useVoiceProviderStatus.d.ts +8 -0
- package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/react/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +3 -0
- package/dist/react/useVoiceTraceTimeline.d.ts +8 -0
- package/dist/react/useVoiceTurnLatency.d.ts +9 -0
- package/dist/react/useVoiceTurnQuality.d.ts +8 -0
- package/dist/react/useVoiceWorkflowStatus.d.ts +8 -0
- package/dist/readinessProfiles.d.ts +38 -0
- package/dist/reconnectContract.d.ts +88 -0
- package/dist/resilienceRoutes.d.ts +143 -0
- package/dist/sessionReplay.d.ts +187 -0
- package/dist/simulationSuite.d.ts +143 -0
- package/dist/sloCalibration.d.ts +185 -0
- package/dist/sqliteStore.d.ts +13 -2
- package/dist/svelte/createVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/svelte/createVoiceCampaignDialerProof.d.ts +9 -0
- package/dist/svelte/createVoiceDeliveryRuntime.d.ts +11 -0
- package/dist/svelte/createVoiceLiveOps.d.ts +13 -0
- package/dist/svelte/createVoiceOpsActionCenter.d.ts +10 -0
- package/dist/svelte/createVoiceOpsStatus.d.ts +9 -0
- package/dist/svelte/createVoicePlatformCoverage.d.ts +7 -0
- package/dist/svelte/createVoiceProofTrends.d.ts +7 -0
- package/dist/svelte/createVoiceProviderCapabilities.d.ts +10 -0
- package/dist/svelte/createVoiceProviderContracts.d.ts +10 -0
- package/dist/svelte/createVoiceProviderSimulationControls.d.ts +11 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +10 -0
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/createVoiceRoutingStatus.d.ts +10 -0
- package/dist/svelte/createVoiceTraceTimeline.d.ts +10 -0
- package/dist/svelte/createVoiceTurnLatency.d.ts +11 -0
- package/dist/svelte/createVoiceTurnQuality.d.ts +10 -0
- package/dist/svelte/createVoiceWorkflowStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +18 -0
- package/dist/svelte/index.js +5036 -407
- package/dist/telephony/contract.d.ts +61 -0
- package/dist/telephony/matrix.d.ts +97 -0
- package/dist/telephony/plivo.d.ts +303 -0
- package/dist/telephony/security.d.ts +182 -0
- package/dist/telephony/telnyx.d.ts +291 -0
- package/dist/telephony/twilio.d.ts +135 -2
- package/dist/telephonyOutcome.d.ts +273 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.js +3206 -180
- package/dist/testing/ioProviderSimulator.d.ts +41 -0
- package/dist/testing/providerSimulator.d.ts +44 -0
- package/dist/toolContract.d.ts +161 -0
- package/dist/toolRuntime.d.ts +50 -0
- package/dist/trace.d.ts +19 -1
- package/dist/traceDeliveryRoutes.d.ts +86 -0
- package/dist/traceTimeline.d.ts +97 -0
- package/dist/turnLatency.d.ts +95 -0
- package/dist/turnQuality.d.ts +94 -0
- package/dist/types.d.ts +180 -4
- package/dist/voiceMonitoring.d.ts +444 -0
- package/dist/vue/VoiceDeliveryRuntime.d.ts +30 -0
- package/dist/vue/VoiceOpsActionCenter.d.ts +13 -0
- package/dist/vue/VoiceOpsStatus.d.ts +30 -0
- package/dist/vue/VoicePlatformCoverage.d.ts +23 -0
- package/dist/vue/VoiceProofTrends.d.ts +21 -0
- package/dist/vue/VoiceProviderCapabilities.d.ts +51 -0
- package/dist/vue/VoiceProviderContracts.d.ts +21 -0
- package/dist/vue/VoiceProviderSimulationControls.d.ts +88 -0
- package/dist/vue/VoiceProviderStatus.d.ts +51 -0
- package/dist/vue/VoiceReadinessFailures.d.ts +21 -0
- package/dist/vue/VoiceRoutingStatus.d.ts +51 -0
- package/dist/vue/VoiceTurnLatency.d.ts +69 -0
- package/dist/vue/VoiceTurnQuality.d.ts +51 -0
- package/dist/vue/index.d.ts +31 -0
- package/dist/vue/index.js +4962 -31
- package/dist/vue/useVoiceAgentSquadStatus.d.ts +9 -0
- package/dist/vue/useVoiceCampaignDialerProof.d.ts +11 -0
- package/dist/vue/useVoiceController.d.ts +2 -1
- package/dist/vue/useVoiceDeliveryRuntime.d.ts +13 -0
- package/dist/vue/useVoiceLiveOps.d.ts +9 -0
- package/dist/vue/useVoiceOpsActionCenter.d.ts +11 -0
- package/dist/vue/useVoiceOpsStatus.d.ts +9 -0
- package/dist/vue/useVoicePlatformCoverage.d.ts +9 -0
- package/dist/vue/useVoiceProofTrends.d.ts +9 -0
- package/dist/vue/useVoiceProviderCapabilities.d.ts +9 -0
- package/dist/vue/useVoiceProviderContracts.d.ts +9 -0
- package/dist/vue/useVoiceProviderSimulationControls.d.ts +24 -0
- package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
- package/dist/vue/useVoiceReadinessFailures.d.ts +775 -0
- package/dist/vue/useVoiceRoutingStatus.d.ts +8 -0
- package/dist/vue/useVoiceStream.d.ts +4 -1
- package/dist/vue/useVoiceTraceTimeline.d.ts +9 -0
- package/dist/vue/useVoiceTurnLatency.d.ts +10 -0
- package/dist/vue/useVoiceTurnQuality.d.ts +9 -0
- package/dist/vue/useVoiceWorkflowStatus.d.ts +9 -0
- package/dist/workflowContract.d.ts +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceAgentSquadStatusClientOptions, type VoiceAgentSquadStatusReport } from '../client/agentSquadStatus';
|
|
2
|
+
export declare class VoiceAgentSquadStatusService {
|
|
3
|
+
connect(path?: string, options?: VoiceAgentSquadStatusClientOptions): {
|
|
4
|
+
close: () => void;
|
|
5
|
+
current: import("@angular/core").Signal<import("../client").VoiceAgentSquadSpecialist | undefined>;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<import("..").VoiceTraceTimelineReport | null>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceAgentSquadStatusReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type VoiceCampaignDialerProofClientOptions } from '../client/campaignDialerProof';
|
|
2
|
+
import type { VoiceCampaignDialerProofReport, VoiceCampaignDialerProofStatus } from '../campaignDialers';
|
|
3
|
+
export declare class VoiceCampaignDialerProofService {
|
|
4
|
+
connect(path?: string, options?: VoiceCampaignDialerProofClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceCampaignDialerProofStatus | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceCampaignDialerProofReport | undefined>;
|
|
10
|
+
runProof: () => Promise<VoiceCampaignDialerProofReport>;
|
|
11
|
+
status: import("@angular/core").Signal<VoiceCampaignDialerProofStatus | undefined>;
|
|
12
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -15,6 +15,7 @@ export declare class VoiceControllerService {
|
|
|
15
15
|
isConnected: import("@angular/core").Signal<boolean>;
|
|
16
16
|
isRecording: import("@angular/core").Signal<boolean>;
|
|
17
17
|
partial: import("@angular/core").Signal<string>;
|
|
18
|
+
reconnect: import("@angular/core").Signal<import("..").VoiceReconnectClientState>;
|
|
18
19
|
recordingError: import("@angular/core").Signal<string | null>;
|
|
19
20
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
20
21
|
sessionId: import("@angular/core").Signal<string | null>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type VoiceDeliveryRuntimeViewModel } from '../client/deliveryRuntimeWidget';
|
|
3
|
+
export declare class VoiceDeliveryRuntimeComponent implements OnDestroy, OnInit {
|
|
4
|
+
description?: string;
|
|
5
|
+
intervalMs?: number;
|
|
6
|
+
path: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
private cleanup;
|
|
9
|
+
private store?;
|
|
10
|
+
model: import("@angular/core").WritableSignal<VoiceDeliveryRuntimeViewModel>;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
deadLettered(): number;
|
|
14
|
+
tick(): void;
|
|
15
|
+
requeueDeadLetters(): void;
|
|
16
|
+
private options;
|
|
17
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type VoiceDeliveryRuntimeClientOptions } from '../client/deliveryRuntime';
|
|
2
|
+
import type { VoiceDeliveryRuntimeReport } from '../deliveryRuntime';
|
|
3
|
+
export declare class VoiceDeliveryRuntimeService {
|
|
4
|
+
connect(path?: string, options?: VoiceDeliveryRuntimeClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
actionError: import("@angular/core").Signal<string | null>;
|
|
8
|
+
actionStatus: import("@angular/core").Signal<"completed" | "failed" | "idle" | "running">;
|
|
9
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
10
|
+
requeueDeadLetters: () => Promise<import("../client").VoiceDeliveryRuntimeActionResult | undefined>;
|
|
11
|
+
refresh: () => Promise<VoiceDeliveryRuntimeReport | undefined>;
|
|
12
|
+
report: import("@angular/core").Signal<VoiceDeliveryRuntimeReport | undefined>;
|
|
13
|
+
tick: () => Promise<import("../client").VoiceDeliveryRuntimeActionResult | undefined>;
|
|
14
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VoiceLiveOpsActionResult, type VoiceLiveOpsClientOptions } from '../client/liveOps';
|
|
2
|
+
export declare class VoiceLiveOpsService {
|
|
3
|
+
connect(options?: VoiceLiveOpsClientOptions): {
|
|
4
|
+
close: () => void;
|
|
5
|
+
error: import("@angular/core").Signal<string | null>;
|
|
6
|
+
isRunning: import("@angular/core").Signal<boolean>;
|
|
7
|
+
lastResult: import("@angular/core").Signal<VoiceLiveOpsActionResult | undefined>;
|
|
8
|
+
run: (input: import("..").VoiceLiveOpsActionInput) => Promise<VoiceLiveOpsActionResult | undefined>;
|
|
9
|
+
runningAction: import("@angular/core").Signal<"escalate" | "operator-takeover" | "assign" | "create-task" | "force-handoff" | "inject-instruction" | "pause-assistant" | "resume-assistant" | "tag" | undefined>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VoiceOpsActionCenterClientOptions, type VoiceOpsActionDescriptor, type VoiceOpsActionRunResult } from '../client/opsActionCenter';
|
|
2
|
+
export declare class VoiceOpsActionCenterService {
|
|
3
|
+
connect(options?: VoiceOpsActionCenterClientOptions): {
|
|
4
|
+
actions: import("@angular/core").Signal<VoiceOpsActionDescriptor[]>;
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isRunning: import("@angular/core").Signal<boolean>;
|
|
8
|
+
lastResult: import("@angular/core").Signal<VoiceOpsActionRunResult | undefined>;
|
|
9
|
+
run: (actionId: string) => Promise<VoiceOpsActionRunResult | undefined>;
|
|
10
|
+
runningActionId: import("@angular/core").Signal<string | undefined>;
|
|
11
|
+
setActions: (actions: VoiceOpsActionDescriptor[]) => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type VoiceOpsStatusViewModel } from '../client/opsStatusWidget';
|
|
3
|
+
export declare class VoiceOpsStatusComponent implements OnDestroy, OnInit {
|
|
4
|
+
description?: string;
|
|
5
|
+
includeLinks: boolean;
|
|
6
|
+
intervalMs?: number;
|
|
7
|
+
path: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
private cleanup;
|
|
10
|
+
private store?;
|
|
11
|
+
model: import("@angular/core").WritableSignal<VoiceOpsStatusViewModel>;
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
ngOnDestroy(): void;
|
|
14
|
+
private options;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceOpsStatusClientOptions } from '../client/opsStatus';
|
|
2
|
+
import type { VoiceOpsStatusReport } from '../opsStatus';
|
|
3
|
+
export declare class VoiceOpsStatusService {
|
|
4
|
+
connect(path?: string, options?: VoiceOpsStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceOpsStatusReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceOpsStatusReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoicePlatformCoverageClientOptions } from '../client/platformCoverage';
|
|
2
|
+
import type { VoicePlatformCoverageSummary } from '../platformCoverage';
|
|
3
|
+
export declare class VoicePlatformCoverageService {
|
|
4
|
+
connect(path?: string, options?: VoicePlatformCoverageClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoicePlatformCoverageSummary | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoicePlatformCoverageSummary | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProofTrendsClientOptions } from '../client/proofTrends';
|
|
2
|
+
import type { VoiceProofTrendReport } from '../proofTrends';
|
|
3
|
+
export declare class VoiceProofTrendsService {
|
|
4
|
+
connect(path?: string, options?: VoiceProofTrendsClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceProofTrendReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceProofTrendReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProviderCapabilitiesClientOptions } from '../client/providerCapabilities';
|
|
2
|
+
import type { VoiceProviderCapabilityReport } from '../providerCapabilities';
|
|
3
|
+
export declare class VoiceProviderCapabilitiesService {
|
|
4
|
+
connect<TProvider extends string = string>(path?: string, options?: VoiceProviderCapabilitiesClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceProviderCapabilityReport<TProvider> | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceProviderCapabilityReport<TProvider> | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProviderContractsClientOptions } from '../client/providerContracts';
|
|
2
|
+
import type { VoiceProviderContractMatrixReport } from '../providerStackRecommendations';
|
|
3
|
+
export declare class VoiceProviderContractsService {
|
|
4
|
+
connect<TProvider extends string = string>(path?: string, options?: VoiceProviderContractsClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceProviderContractMatrixReport<TProvider> | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceProviderContractMatrixReport<TProvider> | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceProviderStatusClientOptions } from '../client/providerStatus';
|
|
2
|
+
import type { VoiceProviderHealthSummary } from '../providerHealth';
|
|
3
|
+
export declare class VoiceProviderStatusService {
|
|
4
|
+
connect<TProvider extends string = string>(path?: string, options?: VoiceProviderStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
providers: import("@angular/core").Signal<VoiceProviderHealthSummary<TProvider>[]>;
|
|
9
|
+
refresh: () => Promise<VoiceProviderHealthSummary<TProvider>[]>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VoiceReadinessFailuresClientOptions } from '../client/readinessFailures';
|
|
2
|
+
import type { VoiceProductionReadinessReport } from '../productionReadiness';
|
|
3
|
+
export declare class VoiceReadinessFailuresService {
|
|
4
|
+
connect(path?: string, options?: VoiceReadinessFailuresClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
explanations: import("@angular/core").Signal<import("..").VoiceProductionReadinessCheck[]>;
|
|
8
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
9
|
+
refresh: () => Promise<VoiceProductionReadinessReport | undefined>;
|
|
10
|
+
report: import("@angular/core").Signal<VoiceProductionReadinessReport | undefined>;
|
|
11
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VoiceRoutingStatusClientOptions } from '../client/routingStatus';
|
|
2
|
+
export declare class VoiceRoutingStatusService {
|
|
3
|
+
connect(path?: string, options?: VoiceRoutingStatusClientOptions): {
|
|
4
|
+
close: () => void;
|
|
5
|
+
decision: import("@angular/core").Signal<import("..").VoiceRoutingEvent | null>;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<import("..").VoiceRoutingEvent | null>;
|
|
9
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -8,11 +8,14 @@ export declare class VoiceStreamService {
|
|
|
8
8
|
turnId?: string;
|
|
9
9
|
}[]>;
|
|
10
10
|
assistantTexts: import("@angular/core").Signal<string[]>;
|
|
11
|
+
call: import("@angular/core").Signal<import("..").VoiceCallLifecycleState | null>;
|
|
12
|
+
callControl: (message: Parameters<(message: Omit<import("..").VoiceClientCallControlMessage, "type">) => void>[0]) => void;
|
|
11
13
|
close: () => void;
|
|
12
14
|
endTurn: () => void;
|
|
13
15
|
error: import("@angular/core").Signal<string | null>;
|
|
14
16
|
isConnected: import("@angular/core").Signal<boolean>;
|
|
15
17
|
partial: import("@angular/core").Signal<string>;
|
|
18
|
+
reconnect: import("@angular/core").Signal<import("..").VoiceReconnectClientState>;
|
|
16
19
|
sendAudio: (audio: Uint8Array | ArrayBuffer) => void;
|
|
17
20
|
sessionId: import("@angular/core").Signal<string | null>;
|
|
18
21
|
status: import("@angular/core").Signal<import("..").VoiceSessionStatus | "idle">;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceTraceTimelineClientOptions } from '../client/traceTimeline';
|
|
2
|
+
import type { VoiceTraceTimelineReport } from '../traceTimeline';
|
|
3
|
+
export declare class VoiceTraceTimelineService {
|
|
4
|
+
connect(path?: string, options?: VoiceTraceTimelineClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTraceTimelineReport | null>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTraceTimelineReport | null>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type VoiceTurnLatencyClientOptions } from '../client/turnLatency';
|
|
2
|
+
import type { VoiceTurnLatencyReport } from '../turnLatency';
|
|
3
|
+
export declare class VoiceTurnLatencyService {
|
|
4
|
+
connect(path?: string, options?: VoiceTurnLatencyClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTurnLatencyReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTurnLatencyReport | undefined>;
|
|
10
|
+
runProof: () => Promise<VoiceTurnLatencyReport | undefined>;
|
|
11
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceTurnQualityClientOptions } from '../client/turnQuality';
|
|
2
|
+
import type { VoiceTurnQualityReport } from '../turnQuality';
|
|
3
|
+
export declare class VoiceTurnQualityService {
|
|
4
|
+
connect(path?: string, options?: VoiceTurnQualityClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceTurnQualityReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceTurnQualityReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VoiceWorkflowStatusClientOptions } from '../client/workflowStatus';
|
|
2
|
+
import type { VoiceScenarioEvalReport } from '../evalRoutes';
|
|
3
|
+
export declare class VoiceWorkflowStatusService {
|
|
4
|
+
connect(path?: string, options?: VoiceWorkflowStatusClientOptions): {
|
|
5
|
+
close: () => void;
|
|
6
|
+
error: import("@angular/core").Signal<string | null>;
|
|
7
|
+
isLoading: import("@angular/core").Signal<boolean>;
|
|
8
|
+
refresh: () => Promise<VoiceScenarioEvalReport | undefined>;
|
|
9
|
+
report: import("@angular/core").Signal<VoiceScenarioEvalReport | undefined>;
|
|
10
|
+
updatedAt: import("@angular/core").Signal<number | undefined>;
|
|
11
|
+
};
|
|
12
|
+
}
|
package/dist/assistant.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type VoiceAgent, type VoiceAgentModel, type VoiceAgentOptions, type VoiceAgentSquadOptions, type VoiceAgentTool } from './agent';
|
|
2
2
|
import { type VoiceOutcomeRecipeName, type VoiceOutcomeRecipeOptions } from './outcomeRecipes';
|
|
3
|
+
import { type VoiceAssistantMemoryHandle, type VoiceAssistantMemoryOptions } from './assistantMemory';
|
|
3
4
|
import type { VoiceNormalizedRouteConfig, VoiceOnTurnObjectHandler, VoiceRouteConfig, VoiceRouteResult, VoiceRuntimeOpsConfig, VoiceSessionRecord } from './types';
|
|
4
5
|
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
5
6
|
export type VoiceAssistantPreset = VoiceOutcomeRecipeName;
|
|
@@ -12,6 +13,7 @@ export type VoiceAssistantArtifactPlan<TContext = unknown, TSession extends Voic
|
|
|
12
13
|
};
|
|
13
14
|
export type VoiceAssistantGuardrailInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Parameters<VoiceOnTurnObjectHandler<TContext, TSession, TResult>>[0] & {
|
|
14
15
|
assistantId: string;
|
|
16
|
+
memory?: VoiceAssistantMemoryHandle;
|
|
15
17
|
};
|
|
16
18
|
export type VoiceAssistantOutputGuardrailInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = VoiceAssistantGuardrailInput<TContext, TSession, TResult> & {
|
|
17
19
|
result: VoiceRouteResult<TResult>;
|
|
@@ -29,6 +31,16 @@ export type VoiceAssistantVariant<TContext = unknown, TSession extends VoiceSess
|
|
|
29
31
|
tools?: Array<VoiceAgentTool<TContext, TSession, Record<string, unknown>, unknown, TResult>>;
|
|
30
32
|
weight?: number;
|
|
31
33
|
};
|
|
34
|
+
export type VoiceAssistantMemoryLifecycleInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Parameters<VoiceOnTurnObjectHandler<TContext, TSession, TResult>>[0] & {
|
|
35
|
+
assistantId: string;
|
|
36
|
+
memory: VoiceAssistantMemoryHandle;
|
|
37
|
+
};
|
|
38
|
+
export type VoiceAssistantMemoryLifecycle<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
39
|
+
afterTurn?: (input: VoiceAssistantMemoryLifecycleInput<TContext, TSession, TResult> & {
|
|
40
|
+
result: VoiceRouteResult<TResult>;
|
|
41
|
+
}) => Promise<void> | void;
|
|
42
|
+
beforeTurn?: (input: VoiceAssistantMemoryLifecycleInput<TContext, TSession, TResult>) => Promise<void> | void;
|
|
43
|
+
};
|
|
32
44
|
export type VoiceAssistantExperimentResolverInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
|
|
33
45
|
assistantId: string;
|
|
34
46
|
context: TContext;
|
|
@@ -83,6 +95,8 @@ export type VoiceAssistantOptions<TContext = unknown, TSession extends VoiceSess
|
|
|
83
95
|
experiment?: VoiceAssistantExperiment<TContext, TSession, TResult>;
|
|
84
96
|
guardrails?: VoiceAssistantGuardrails<TContext, TSession, TResult>;
|
|
85
97
|
id: string;
|
|
98
|
+
memory?: VoiceAssistantMemoryOptions<TContext, TSession>;
|
|
99
|
+
memoryLifecycle?: VoiceAssistantMemoryLifecycle<TContext, TSession, TResult>;
|
|
86
100
|
ops?: VoiceRuntimeOpsConfig<TContext, TSession, TResult>;
|
|
87
101
|
trace?: VoiceAgentOptions<TContext, TSession, TResult>['trace'];
|
|
88
102
|
};
|
|
@@ -109,6 +123,12 @@ export type VoiceAssistantRunSummary = {
|
|
|
109
123
|
toolCalls: Record<string, number>;
|
|
110
124
|
transferCount: number;
|
|
111
125
|
variants: Record<string, number>;
|
|
126
|
+
memory: {
|
|
127
|
+
deletes: number;
|
|
128
|
+
gets: number;
|
|
129
|
+
lists: number;
|
|
130
|
+
sets: number;
|
|
131
|
+
};
|
|
112
132
|
};
|
|
113
133
|
export type VoiceAssistantRunsSummary = {
|
|
114
134
|
assistants: VoiceAssistantRunSummary[];
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceAssistantRunsSummary } from './assistant';
|
|
3
|
+
import { type VoiceProviderHealthSummary } from './providerHealth';
|
|
4
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
5
|
+
export type VoiceAssistantHealthFailure = {
|
|
6
|
+
at: number;
|
|
7
|
+
assistantId?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
provider?: string;
|
|
10
|
+
rateLimited?: boolean;
|
|
11
|
+
replayHref?: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
status?: string;
|
|
14
|
+
turnId?: string;
|
|
15
|
+
type: StoredVoiceTraceEvent['type'];
|
|
16
|
+
};
|
|
17
|
+
export type VoiceAssistantHealthSummary<TProvider extends string = string> = {
|
|
18
|
+
assistantRuns: VoiceAssistantRunsSummary;
|
|
19
|
+
providerHealth: VoiceProviderHealthSummary<TProvider>[];
|
|
20
|
+
recentFailures: VoiceAssistantHealthFailure[];
|
|
21
|
+
};
|
|
22
|
+
export type VoiceAssistantHealthSummaryOptions<TProvider extends string = string> = {
|
|
23
|
+
events?: StoredVoiceTraceEvent[];
|
|
24
|
+
maxFailures?: number;
|
|
25
|
+
providers?: readonly TProvider[];
|
|
26
|
+
replayHref?: false | string | ((failure: Omit<VoiceAssistantHealthFailure, 'replayHref'>) => string);
|
|
27
|
+
store?: VoiceTraceEventStore;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceAssistantHealthHTMLHandlerOptions<TProvider extends string = string> = VoiceAssistantHealthSummaryOptions<TProvider> & {
|
|
30
|
+
headers?: HeadersInit;
|
|
31
|
+
render?: (summary: VoiceAssistantHealthSummary<TProvider>) => string | Promise<string>;
|
|
32
|
+
};
|
|
33
|
+
export type VoiceAssistantHealthRoutesOptions<TProvider extends string = string> = VoiceAssistantHealthHTMLHandlerOptions<TProvider> & {
|
|
34
|
+
htmlPath?: false | string;
|
|
35
|
+
name?: string;
|
|
36
|
+
path?: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const summarizeVoiceAssistantHealth: <TProvider extends string = string>(options: VoiceAssistantHealthSummaryOptions<TProvider>) => Promise<VoiceAssistantHealthSummary<TProvider>>;
|
|
39
|
+
export declare const renderVoiceAssistantHealthHTML: <TProvider extends string = string>(summary: VoiceAssistantHealthSummary<TProvider>) => string;
|
|
40
|
+
export declare const createVoiceAssistantHealthJSONHandler: <TProvider extends string = string>(options: VoiceAssistantHealthSummaryOptions<TProvider>) => () => Promise<VoiceAssistantHealthSummary<TProvider>>;
|
|
41
|
+
export declare const createVoiceAssistantHealthHTMLHandler: <TProvider extends string = string>(options: VoiceAssistantHealthHTMLHandlerOptions<TProvider>) => () => Promise<Response>;
|
|
42
|
+
export declare const createVoiceAssistantHealthRoutes: <TProvider extends string = string>(options: VoiceAssistantHealthRoutesOptions<TProvider>) => Elysia<"", {
|
|
43
|
+
decorator: {};
|
|
44
|
+
store: {};
|
|
45
|
+
derive: {};
|
|
46
|
+
resolve: {};
|
|
47
|
+
}, {
|
|
48
|
+
typebox: {};
|
|
49
|
+
error: {};
|
|
50
|
+
}, {
|
|
51
|
+
schema: {};
|
|
52
|
+
standaloneSchema: {};
|
|
53
|
+
macro: {};
|
|
54
|
+
macroFn: {};
|
|
55
|
+
parser: {};
|
|
56
|
+
response: {};
|
|
57
|
+
}, {
|
|
58
|
+
[x: string]: {
|
|
59
|
+
get: {
|
|
60
|
+
body: unknown;
|
|
61
|
+
params: {};
|
|
62
|
+
query: unknown;
|
|
63
|
+
headers: unknown;
|
|
64
|
+
response: {
|
|
65
|
+
200: VoiceAssistantHealthSummary<TProvider>;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
derive: {};
|
|
71
|
+
resolve: {};
|
|
72
|
+
schema: {};
|
|
73
|
+
standaloneSchema: {};
|
|
74
|
+
response: {};
|
|
75
|
+
}, {
|
|
76
|
+
derive: {};
|
|
77
|
+
resolve: {};
|
|
78
|
+
schema: {};
|
|
79
|
+
standaloneSchema: {};
|
|
80
|
+
response: {};
|
|
81
|
+
}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { VoiceSessionRecord } from './types';
|
|
2
|
+
import type { VoiceTraceEventStore } from './trace';
|
|
3
|
+
export type VoiceAssistantMemoryRecord<TValue = unknown, TMetadata extends Record<string, unknown> = Record<string, unknown>> = {
|
|
4
|
+
assistantId: string;
|
|
5
|
+
createdAt: number;
|
|
6
|
+
key: string;
|
|
7
|
+
metadata?: TMetadata;
|
|
8
|
+
namespace: string;
|
|
9
|
+
updatedAt: number;
|
|
10
|
+
value: TValue;
|
|
11
|
+
};
|
|
12
|
+
export type VoiceAssistantMemoryStore<TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord> = {
|
|
13
|
+
delete: (input: {
|
|
14
|
+
assistantId: string;
|
|
15
|
+
key: string;
|
|
16
|
+
namespace: string;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
get: (input: {
|
|
19
|
+
assistantId: string;
|
|
20
|
+
key: string;
|
|
21
|
+
namespace: string;
|
|
22
|
+
}) => Promise<TRecord | undefined>;
|
|
23
|
+
list: (input: {
|
|
24
|
+
assistantId: string;
|
|
25
|
+
namespace?: string;
|
|
26
|
+
}) => Promise<TRecord[]>;
|
|
27
|
+
set: (input: Omit<TRecord, 'createdAt' | 'updatedAt'> & {
|
|
28
|
+
createdAt?: number;
|
|
29
|
+
updatedAt?: number;
|
|
30
|
+
}) => Promise<TRecord>;
|
|
31
|
+
};
|
|
32
|
+
export type VoiceAssistantMemoryNamespaceInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
|
|
33
|
+
assistantId: string;
|
|
34
|
+
context: TContext;
|
|
35
|
+
session: TSession;
|
|
36
|
+
};
|
|
37
|
+
export type VoiceAssistantMemoryOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord> = {
|
|
38
|
+
namespace: string | ((input: VoiceAssistantMemoryNamespaceInput<TContext, TSession>) => Promise<string> | string);
|
|
39
|
+
store: VoiceAssistantMemoryStore<TRecord>;
|
|
40
|
+
};
|
|
41
|
+
export type VoiceAssistantMemoryBinding<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord> = VoiceAssistantMemoryOptions<TContext, TSession, TRecord>;
|
|
42
|
+
export type VoiceAssistantMemoryHandle<TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord> = {
|
|
43
|
+
delete: (key: string) => Promise<void>;
|
|
44
|
+
get: <TValue = unknown>(key: string) => Promise<TValue | undefined>;
|
|
45
|
+
list: () => Promise<TRecord[]>;
|
|
46
|
+
namespace: string;
|
|
47
|
+
set: <TValue = unknown>(key: string, value: TValue, metadata?: Record<string, unknown>) => Promise<TRecord>;
|
|
48
|
+
};
|
|
49
|
+
export declare const createVoiceAssistantMemoryRecord: <TValue = unknown, TMetadata extends Record<string, unknown> = Record<string, unknown>>(input: Omit<VoiceAssistantMemoryRecord<TValue, TMetadata>, "createdAt" | "updatedAt"> & {
|
|
50
|
+
createdAt?: number;
|
|
51
|
+
updatedAt?: number;
|
|
52
|
+
}) => VoiceAssistantMemoryRecord<TValue, TMetadata>;
|
|
53
|
+
export declare const createVoiceMemoryAssistantMemoryStore: <TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord>() => VoiceAssistantMemoryStore<TRecord>;
|
|
54
|
+
export declare const resolveVoiceAssistantMemoryNamespace: <TContext, TSession extends VoiceSessionRecord>(input: VoiceAssistantMemoryNamespaceInput<TContext, TSession> & {
|
|
55
|
+
memory: VoiceAssistantMemoryOptions<TContext, TSession>;
|
|
56
|
+
}) => Promise<string>;
|
|
57
|
+
export declare const createVoiceAssistantMemoryHandle: <TContext, TSession extends VoiceSessionRecord, TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord>(input: {
|
|
58
|
+
assistantId: string;
|
|
59
|
+
context: TContext;
|
|
60
|
+
memory: VoiceAssistantMemoryOptions<TContext, TSession, TRecord>;
|
|
61
|
+
session: TSession;
|
|
62
|
+
trace?: VoiceTraceEventStore;
|
|
63
|
+
}) => Promise<VoiceAssistantMemoryHandle<TRecord>>;
|
package/dist/audit.d.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
export type VoiceAuditEventType = 'handoff' | 'operator.action' | 'provider.call' | 'retention.policy' | 'tool.call';
|
|
2
|
+
export type VoiceAuditActor = {
|
|
3
|
+
id: string;
|
|
4
|
+
kind: 'agent' | 'operator' | 'system' | 'worker';
|
|
5
|
+
name?: string;
|
|
6
|
+
};
|
|
7
|
+
export type VoiceAuditResource = {
|
|
8
|
+
id?: string;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceAuditOutcome = 'error' | 'skipped' | 'success';
|
|
12
|
+
export type VoiceAuditEvent<TPayload extends Record<string, unknown> = Record<string, unknown>> = {
|
|
13
|
+
action: string;
|
|
14
|
+
actor?: VoiceAuditActor;
|
|
15
|
+
at?: number;
|
|
16
|
+
id?: string;
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
outcome?: VoiceAuditOutcome;
|
|
19
|
+
payload?: TPayload;
|
|
20
|
+
resource?: VoiceAuditResource;
|
|
21
|
+
sessionId?: string;
|
|
22
|
+
traceId?: string;
|
|
23
|
+
type: VoiceAuditEventType;
|
|
24
|
+
};
|
|
25
|
+
export type StoredVoiceAuditEvent<TPayload extends Record<string, unknown> = Record<string, unknown>> = Omit<VoiceAuditEvent<TPayload>, 'at' | 'id'> & {
|
|
26
|
+
at: number;
|
|
27
|
+
id: string;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceAuditEventFilter = {
|
|
30
|
+
actorId?: string;
|
|
31
|
+
after?: number;
|
|
32
|
+
afterOrAt?: number;
|
|
33
|
+
before?: number;
|
|
34
|
+
beforeOrAt?: number;
|
|
35
|
+
limit?: number;
|
|
36
|
+
outcome?: VoiceAuditOutcome | VoiceAuditOutcome[];
|
|
37
|
+
resourceId?: string;
|
|
38
|
+
resourceType?: string;
|
|
39
|
+
sessionId?: string;
|
|
40
|
+
traceId?: string;
|
|
41
|
+
type?: VoiceAuditEventType | VoiceAuditEventType[];
|
|
42
|
+
};
|
|
43
|
+
export type VoiceAuditEventStore<TEvent extends StoredVoiceAuditEvent = StoredVoiceAuditEvent> = {
|
|
44
|
+
append: (event: VoiceAuditEvent | TEvent) => Promise<TEvent> | TEvent;
|
|
45
|
+
get: (id: string) => Promise<TEvent | undefined> | TEvent | undefined;
|
|
46
|
+
list: (filter?: VoiceAuditEventFilter) => Promise<TEvent[]> | TEvent[];
|
|
47
|
+
};
|
|
48
|
+
export type VoiceAuditLogger = {
|
|
49
|
+
handoff: (input: Omit<VoiceHandoffAuditEventInput, 'store'>) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
50
|
+
operatorAction: (input: Omit<VoiceOperatorAuditEventInput, 'store'>) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
51
|
+
providerCall: (input: Omit<VoiceProviderAuditEventInput, 'store'>) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
52
|
+
record: (event: VoiceAuditEvent) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
53
|
+
retention: (input: Omit<VoiceRetentionAuditEventInput, 'store'>) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
54
|
+
toolCall: (input: Omit<VoiceToolAuditEventInput, 'store'>) => Promise<StoredVoiceAuditEvent> | StoredVoiceAuditEvent;
|
|
55
|
+
};
|
|
56
|
+
export type VoiceProviderAuditEventInput = {
|
|
57
|
+
actor?: VoiceAuditActor;
|
|
58
|
+
cost?: Record<string, unknown>;
|
|
59
|
+
elapsedMs?: number;
|
|
60
|
+
error?: string;
|
|
61
|
+
kind: 'llm' | 'stt' | 'tts' | string;
|
|
62
|
+
metadata?: Record<string, unknown>;
|
|
63
|
+
model?: string;
|
|
64
|
+
outcome: VoiceAuditOutcome;
|
|
65
|
+
provider: string;
|
|
66
|
+
sessionId?: string;
|
|
67
|
+
store: VoiceAuditEventStore;
|
|
68
|
+
traceId?: string;
|
|
69
|
+
};
|
|
70
|
+
export type VoiceToolAuditEventInput = {
|
|
71
|
+
actor?: VoiceAuditActor;
|
|
72
|
+
elapsedMs?: number;
|
|
73
|
+
error?: string;
|
|
74
|
+
metadata?: Record<string, unknown>;
|
|
75
|
+
outcome: VoiceAuditOutcome;
|
|
76
|
+
sessionId?: string;
|
|
77
|
+
store: VoiceAuditEventStore;
|
|
78
|
+
toolCallId?: string;
|
|
79
|
+
toolName: string;
|
|
80
|
+
traceId?: string;
|
|
81
|
+
};
|
|
82
|
+
export type VoiceHandoffAuditEventInput = {
|
|
83
|
+
actor?: VoiceAuditActor;
|
|
84
|
+
fromAgentId?: string;
|
|
85
|
+
metadata?: Record<string, unknown>;
|
|
86
|
+
outcome: VoiceAuditOutcome;
|
|
87
|
+
reason?: string;
|
|
88
|
+
sessionId?: string;
|
|
89
|
+
store: VoiceAuditEventStore;
|
|
90
|
+
target?: string;
|
|
91
|
+
toAgentId?: string;
|
|
92
|
+
traceId?: string;
|
|
93
|
+
};
|
|
94
|
+
export type VoiceRetentionAuditEventInput = {
|
|
95
|
+
actor?: VoiceAuditActor;
|
|
96
|
+
dryRun: boolean;
|
|
97
|
+
metadata?: Record<string, unknown>;
|
|
98
|
+
report: {
|
|
99
|
+
deletedCount: number;
|
|
100
|
+
scopes: Array<{
|
|
101
|
+
deletedCount: number;
|
|
102
|
+
scope: string;
|
|
103
|
+
skippedReason?: string;
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
store: VoiceAuditEventStore;
|
|
107
|
+
};
|
|
108
|
+
export type VoiceOperatorAuditEventInput = {
|
|
109
|
+
action: string;
|
|
110
|
+
actor: VoiceAuditActor;
|
|
111
|
+
metadata?: Record<string, unknown>;
|
|
112
|
+
outcome?: VoiceAuditOutcome;
|
|
113
|
+
payload?: Record<string, unknown>;
|
|
114
|
+
resource?: VoiceAuditResource;
|
|
115
|
+
sessionId?: string;
|
|
116
|
+
store: VoiceAuditEventStore;
|
|
117
|
+
traceId?: string;
|
|
118
|
+
};
|
|
119
|
+
export declare const createVoiceAuditEvent: <TPayload extends Record<string, unknown> = Record<string, unknown>>(event: VoiceAuditEvent<TPayload>) => StoredVoiceAuditEvent<TPayload>;
|
|
120
|
+
export declare const filterVoiceAuditEvents: <TEvent extends StoredVoiceAuditEvent = StoredVoiceAuditEvent>(events: TEvent[], filter?: VoiceAuditEventFilter) => TEvent[];
|
|
121
|
+
export declare const createVoiceMemoryAuditEventStore: <TEvent extends StoredVoiceAuditEvent = StoredVoiceAuditEvent>() => VoiceAuditEventStore<TEvent>;
|
|
122
|
+
export declare const recordVoiceAuditEvent: (store: VoiceAuditEventStore, event: VoiceAuditEvent) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
123
|
+
export declare const recordVoiceProviderAuditEvent: (input: VoiceProviderAuditEventInput) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
124
|
+
export declare const recordVoiceToolAuditEvent: (input: VoiceToolAuditEventInput) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
125
|
+
export declare const recordVoiceHandoffAuditEvent: (input: VoiceHandoffAuditEventInput) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
126
|
+
export declare const recordVoiceRetentionAuditEvent: (input: VoiceRetentionAuditEventInput) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
127
|
+
export declare const recordVoiceOperatorAuditEvent: (input: VoiceOperatorAuditEventInput) => StoredVoiceAuditEvent<Record<string, unknown>> | Promise<StoredVoiceAuditEvent<Record<string, unknown>>>;
|
|
128
|
+
export declare const createVoiceAuditLogger: (store: VoiceAuditEventStore) => VoiceAuditLogger;
|