@absolutejs/voice 0.0.22-beta.181 → 0.0.22-beta.183
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/dist/agent.d.ts +22 -0
- package/dist/agentSquadContract.d.ts +7 -2
- package/dist/index.d.ts +3 -1
- package/dist/index.js +694 -444
- package/dist/operationsRecord.d.ts +102 -0
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -61,10 +61,30 @@ export type VoiceAgentModelOutput<TResult = unknown> = VoiceRouteResult<TResult>
|
|
|
61
61
|
export type VoiceAgentModel<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
62
62
|
generate: (input: VoiceAgentModelInput<TContext, TSession>) => Promise<VoiceAgentModelOutput<TResult>> | VoiceAgentModelOutput<TResult>;
|
|
63
63
|
};
|
|
64
|
+
export type VoiceAgentSquadHandoffStatus = 'allowed' | 'blocked' | 'max-exceeded' | 'unknown-target';
|
|
65
|
+
export type VoiceAgentSquadStateHandoff = {
|
|
66
|
+
at: number;
|
|
67
|
+
fromAgentId: string;
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
originalTargetAgentId?: string;
|
|
70
|
+
reason?: string;
|
|
71
|
+
status: VoiceAgentSquadHandoffStatus;
|
|
72
|
+
summary?: string;
|
|
73
|
+
targetAgentId: string;
|
|
74
|
+
turnId: string;
|
|
75
|
+
};
|
|
76
|
+
export type VoiceAgentSquadState = {
|
|
77
|
+
agentId: string;
|
|
78
|
+
handoffCount: number;
|
|
79
|
+
handoffs: VoiceAgentSquadStateHandoff[];
|
|
80
|
+
lastHandoff?: VoiceAgentSquadStateHandoff;
|
|
81
|
+
previousAgentId?: string;
|
|
82
|
+
};
|
|
64
83
|
export type VoiceAgentRunResult<TResult = unknown> = VoiceRouteResult<TResult> & {
|
|
65
84
|
agentId: string;
|
|
66
85
|
handoff?: VoiceAgentModelOutput<TResult>['handoff'];
|
|
67
86
|
messages: VoiceAgentMessage[];
|
|
87
|
+
squad?: VoiceAgentSquadState;
|
|
68
88
|
toolResults: VoiceAgentToolResult[];
|
|
69
89
|
};
|
|
70
90
|
export type VoiceAgentSquadHandoffPolicyResult<TResult = unknown> = {
|
|
@@ -120,8 +140,10 @@ export type VoiceAgentSquadOptions<TContext = unknown, TSession extends VoiceSes
|
|
|
120
140
|
onHandoff?: (input: {
|
|
121
141
|
context: TContext;
|
|
122
142
|
fromAgentId: string;
|
|
143
|
+
metadata?: Record<string, unknown>;
|
|
123
144
|
reason?: string;
|
|
124
145
|
session: TSession;
|
|
146
|
+
summary?: string;
|
|
125
147
|
targetAgentId: string;
|
|
126
148
|
turn: VoiceTurnRecord;
|
|
127
149
|
}) => Promise<void> | void;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import type { VoiceAgent, VoiceAgentRunResult } from './agent';
|
|
1
|
+
import type { VoiceAgent, VoiceAgentRunResult, VoiceAgentSquadHandoffStatus } from './agent';
|
|
2
2
|
import type { VoiceTraceEventStore } from './trace';
|
|
3
3
|
import type { VoiceRouteResult, VoiceSessionHandle, VoiceSessionRecord } from './types';
|
|
4
4
|
export type VoiceAgentSquadContractOutcome = 'assistant' | 'complete' | 'escalate' | 'no-answer' | 'transfer' | 'voicemail';
|
|
5
5
|
export type VoiceAgentSquadHandoffExpectation = {
|
|
6
6
|
fromAgentId?: string;
|
|
7
|
-
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
reason?: string;
|
|
9
|
+
reasonIncludes?: string[];
|
|
10
|
+
status?: VoiceAgentSquadHandoffStatus;
|
|
11
|
+
summary?: string;
|
|
12
|
+
summaryIncludes?: string[];
|
|
8
13
|
targetAgentId?: string;
|
|
9
14
|
};
|
|
10
15
|
export type VoiceAgentSquadTurnExpectation<TResult = unknown> = {
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { buildVoiceProductionReadinessGate, buildVoiceProductionReadinessReport,
|
|
|
48
48
|
export { createVoiceReadinessProfile, recommendVoiceReadinessProfile } from './readinessProfiles';
|
|
49
49
|
export { buildVoiceProviderContractMatrix, createVoiceProviderContractMatrixHTMLHandler, createVoiceProviderContractMatrixJSONHandler, createVoiceProviderContractMatrixPreset, createVoiceProviderContractMatrixRoutes, evaluateVoiceProviderStackGaps, renderVoiceProviderContractMatrixHTML, recommendVoiceProviderStack } from './providerStackRecommendations';
|
|
50
50
|
export { buildVoiceOpsConsoleReport, createVoiceOpsConsoleRoutes, renderVoiceOpsConsoleHTML } from './opsConsoleRoutes';
|
|
51
|
+
export { buildVoiceOperationsRecord, createVoiceOperationsRecordRoutes, renderVoiceOperationsRecordHTML } from './operationsRecord';
|
|
51
52
|
export { summarizeVoiceOpsStatus } from './opsStatus';
|
|
52
53
|
export { createVoiceOpsStatusRoutes, renderVoiceOpsStatusHTML } from './opsStatusRoutes';
|
|
53
54
|
export { createVoiceQualityRoutes, evaluateVoiceQuality, renderVoiceQualityHTML } from './qualityRoutes';
|
|
@@ -107,10 +108,11 @@ export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOp
|
|
|
107
108
|
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
108
109
|
export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRecommendation, VoiceReadinessProfileRecommendationScore, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
|
|
109
110
|
export type { VoiceProviderStackChoice, VoiceProviderStackCapabilities, VoiceProviderStackCapabilityGap, VoiceProviderStackCapabilityGapInput, VoiceProviderStackCapabilityGapReport, VoiceProviderContractCheck, VoiceProviderContractCheckStatus, VoiceProviderContractDefinition, VoiceProviderContractMatrixHandlerOptions, VoiceProviderContractMatrixHTMLHandlerOptions, VoiceProviderContractMatrixInput, VoiceProviderContractMatrixPresetOptions, VoiceProviderContractMatrixReport, VoiceProviderContractMatrixRoutesOptions, VoiceProviderContractMatrixRow, VoiceProviderStackInput, VoiceProviderStackKind, VoiceProviderStackRecommendation } from './providerStackRecommendations';
|
|
111
|
+
export type { VoiceOperationsRecord, VoiceOperationsRecordAgentHandoff, VoiceOperationsRecordAuditSummary, VoiceOperationsRecordOptions, VoiceOperationsRecordOutcome, VoiceOperationsRecordRoutesOptions, VoiceOperationsRecordStatus, VoiceOperationsRecordTool } from './operationsRecord';
|
|
110
112
|
export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
|
|
111
113
|
export type { VoiceResilienceIOSimulator, VoiceResilienceLink, VoiceResiliencePageData, VoiceResilienceRoutesOptions, VoiceResilienceSimulationProvider, VoiceRoutingKindSummary, VoiceRoutingDecisionSummary, VoiceRoutingDecisionSummaryOptions, VoiceRoutingEvent, VoiceRoutingEventKind, VoiceRoutingSessionSummary, VoiceRoutingSessionSummaryOptions } from './resilienceRoutes';
|
|
112
114
|
export type { VoiceIOProviderRouterEvent, VoiceIOProviderRouterOptions, VoiceIOProviderRouterPolicy, VoiceIOProviderRouterPolicyConfig, VoiceSTTProviderRouterOptions, VoiceTTSProviderRouterOptions } from './providerAdapters';
|
|
113
|
-
export type { VoiceAgent, VoiceAgentMessage, VoiceAgentMessageRole, VoiceAgentModel, VoiceAgentModelInput, VoiceAgentModelOutput, VoiceAgentOptions, VoiceAgentRunResult, VoiceAgentSquadHandoffPolicyResult, VoiceAgentSquadOptions, VoiceAgentTool, VoiceAgentToolCall, VoiceAgentToolResult } from './agent';
|
|
115
|
+
export type { VoiceAgent, VoiceAgentMessage, VoiceAgentMessageRole, VoiceAgentModel, VoiceAgentModelInput, VoiceAgentModelOutput, VoiceAgentOptions, VoiceAgentRunResult, VoiceAgentSquadHandoffPolicyResult, VoiceAgentSquadHandoffStatus, VoiceAgentSquadOptions, VoiceAgentSquadState, VoiceAgentSquadStateHandoff, VoiceAgentTool, VoiceAgentToolCall, VoiceAgentToolResult } from './agent';
|
|
114
116
|
export type { VoiceAgentSquadContractDefinition, VoiceAgentSquadContractIssue, VoiceAgentSquadContractOutcome, VoiceAgentSquadContractReport, VoiceAgentSquadContractRunOptions, VoiceAgentSquadContractTurn, VoiceAgentSquadContractTurnReport, VoiceAgentSquadHandoffExpectation, VoiceAgentSquadTurnExpectation } from './agentSquadContract';
|
|
115
117
|
export type { VoiceToolRetryDelay, VoiceToolRuntime, VoiceToolRuntimeExecuteInput, VoiceToolRuntimeOptions, VoiceToolRuntimeResult } from './toolRuntime';
|
|
116
118
|
export type { VoiceToolContractCase, VoiceToolContractCaseReport, VoiceToolContractDefinition, VoiceToolContractExpectation, VoiceToolContractHandlerOptions, VoiceToolContractHTMLHandlerOptions, VoiceToolContractIssue, VoiceToolContractReport, VoiceToolContractRoutesOptions, VoiceToolContractSuiteReport } from './toolContract';
|