@absolutejs/voice 0.0.22-beta.255 → 0.0.22-beta.256

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/index.d.ts CHANGED
@@ -34,12 +34,12 @@ export { createVoiceSessionListRoutes, createVoiceSessionReplayHTMLHandler, crea
34
34
  export { createVoiceAgent, createVoiceAgentSquad, createVoiceAgentTool } from './agent';
35
35
  export { assertVoiceAgentSquadContractEvidence, assertVoiceAgentSquadContract, evaluateVoiceAgentSquadContractEvidence, runVoiceAgentSquadContract } from './agentSquadContract';
36
36
  export { createVoiceToolIdempotencyKey, createVoiceToolRuntime } from './toolRuntime';
37
- export { createVoiceToolContract, createVoiceToolContractHTMLHandler, createVoiceToolContractJSONHandler, createVoiceToolContractRoutes, createVoiceToolRuntimeContractDefaults, renderVoiceToolContractHTML, runVoiceToolContractSuite, runVoiceToolContract } from './toolContract';
37
+ export { assertVoiceToolContractEvidence, createVoiceToolContract, createVoiceToolContractHTMLHandler, createVoiceToolContractJSONHandler, createVoiceToolContractRoutes, createVoiceToolRuntimeContractDefaults, evaluateVoiceToolContractEvidence, renderVoiceToolContractHTML, runVoiceToolContractSuite, runVoiceToolContract } from './toolContract';
38
38
  export { createVoiceTurnLatencyHTMLHandler, createVoiceTurnLatencyJSONHandler, createVoiceTurnLatencyRoutes, renderVoiceTurnLatencyHTML, summarizeVoiceTurnLatency } from './turnLatency';
39
39
  export { createVoiceLiveLatencyRoutes, renderVoiceLiveLatencyHTML, summarizeVoiceLiveLatency } from './liveLatency';
40
40
  export { assertVoiceLatencySLOGate, buildVoiceLatencySLOGate, renderVoiceLatencySLOMarkdown } from './latencySlo';
41
41
  export { createVoiceTurnQualityHTMLHandler, createVoiceTurnQualityJSONHandler, createVoiceTurnQualityRoutes, renderVoiceTurnQualityHTML, summarizeVoiceTurnQuality } from './turnQuality';
42
- export { createVoiceOutcomeContractHTMLHandler, createVoiceOutcomeContractJSONHandler, createVoiceOutcomeContractRoutes, renderVoiceOutcomeContractHTML, runVoiceOutcomeContractSuite } from './outcomeContract';
42
+ export { assertVoiceOutcomeContractEvidence, createVoiceOutcomeContractHTMLHandler, createVoiceOutcomeContractJSONHandler, createVoiceOutcomeContractRoutes, evaluateVoiceOutcomeContractEvidence, renderVoiceOutcomeContractHTML, runVoiceOutcomeContractSuite } from './outcomeContract';
43
43
  export { applyVoiceTelephonyOutcome, createMemoryVoiceTelephonyWebhookIdempotencyStore, createVoiceTelephonyOutcomePolicy, createVoiceTelephonyWebhookHandler, createVoiceTelephonyWebhookRoutes, parseVoiceTelephonyWebhookEvent, resolveVoiceTelephonyOutcome, signVoiceTwilioWebhook, verifyVoiceTwilioWebhookSignature, voiceTelephonyOutcomeToRouteResult } from './telephonyOutcome';
44
44
  export { createVoicePhoneAgent } from './phoneAgent';
45
45
  export { createStoredVoiceCallReviewArtifact, createStoredVoiceExternalObjectMap, createStoredVoiceIntegrationEvent, createStoredVoiceOpsTask, createVoiceFileIncidentBundleStore, createVoiceFileExternalObjectMapStore, createVoiceFileAssistantMemoryStore, createVoiceFileAuditEventStore, createVoiceFileAuditSinkDeliveryStore, createVoiceFileCampaignStore, createVoiceFileIntegrationEventStore, createVoiceFileReviewStore, createVoiceFileRuntimeStorage, createVoiceFileSessionStore, createVoiceFileTaskStore, createVoiceFileTraceSinkDeliveryStore, createVoiceFileTraceEventStore } from './fileStore';
@@ -114,7 +114,7 @@ export type { VoiceTurnLatencyHTMLHandlerOptions, VoiceTurnLatencyItem, VoiceTur
114
114
  export type { VoiceLiveLatencyOptions, VoiceLiveLatencyReport, VoiceLiveLatencyRoutesOptions, VoiceLiveLatencySample, VoiceLiveLatencyStatus } from './liveLatency';
115
115
  export type { VoiceLatencySLOBudget, VoiceLatencySLOGateError, VoiceLatencySLOGateOptions, VoiceLatencySLOGateReport, VoiceLatencySLOMeasurement, VoiceLatencySLOStage, VoiceLatencySLOStageSummary, VoiceLatencySLOStatus } from './latencySlo';
116
116
  export type { VoiceTurnQualityHTMLHandlerOptions, VoiceTurnQualityItem, VoiceTurnQualityOptions, VoiceTurnQualityReport, VoiceTurnQualityRoutesOptions, VoiceTurnQualityStatus } from './turnQuality';
117
- export type { VoiceOutcomeContractDefinition, VoiceOutcomeContractHTMLHandlerOptions, VoiceOutcomeContractIssue, VoiceOutcomeContractOptions, VoiceOutcomeContractReport, VoiceOutcomeContractRoutesOptions, VoiceOutcomeContractStatus, VoiceOutcomeContractSuiteReport } from './outcomeContract';
117
+ export type { VoiceOutcomeContractAssertionInput, VoiceOutcomeContractAssertionReport, VoiceOutcomeContractDefinition, VoiceOutcomeContractHTMLHandlerOptions, VoiceOutcomeContractIssue, VoiceOutcomeContractOptions, VoiceOutcomeContractReport, VoiceOutcomeContractRoutesOptions, VoiceOutcomeContractStatus, VoiceOutcomeContractSuiteReport } from './outcomeContract';
118
118
  export type { VoiceTelephonyOutcomeAction, VoiceTelephonyOutcomeDecision, VoiceTelephonyOutcomePolicy, VoiceTelephonyOutcomeProviderEvent, VoiceTelephonyOutcomeRouteResult, VoiceTelephonyOutcomeStatusDecision, VoiceTelephonyWebhookDecision, VoiceTelephonyWebhookHandlerOptions, VoiceTelephonyWebhookIdempotencyStore, VoiceTelephonyWebhookParseInput, VoiceTelephonyWebhookProvider, VoiceTelephonyWebhookRoutesOptions, VoiceTelephonyWebhookVerificationResult, StoredVoiceTelephonyWebhookDecision } from './telephonyOutcome';
119
119
  export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneAgentLifecycleStage, VoicePhoneAgentPlivoCarrier, VoicePhoneAgentRoutes, VoicePhoneAgentRoutesOptions, VoicePhoneAgentSetupReport, VoicePhoneAgentTelnyxCarrier, VoicePhoneAgentTwilioCarrier } from './phoneAgent';
120
120
  export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
@@ -133,7 +133,7 @@ export type { VoiceIOProviderRouterEvent, VoiceIOProviderRouterOptions, VoiceIOP
133
133
  export type { VoiceAgent, VoiceAgentMessage, VoiceAgentMessageRole, VoiceAgentModel, VoiceAgentModelInput, VoiceAgentModelOutput, VoiceAgentOptions, VoiceAgentRunResult, VoiceAgentSquadContextPolicyResult, VoiceAgentSquadHandoffPolicyResult, VoiceAgentSquadHandoffStatus, VoiceAgentSquadOptions, VoiceAgentSquadState, VoiceAgentSquadStateHandoff, VoiceAgentTool, VoiceAgentToolCall, VoiceAgentToolResult } from './agent';
134
134
  export type { VoiceAgentSquadContractAssertionInput, VoiceAgentSquadContractAssertionReport, VoiceAgentSquadContractDefinition, VoiceAgentSquadContractIssue, VoiceAgentSquadContractOutcome, VoiceAgentSquadContractReport, VoiceAgentSquadContractRunOptions, VoiceAgentSquadContractTurn, VoiceAgentSquadContractTurnReport, VoiceAgentSquadHandoffExpectation, VoiceAgentSquadTurnExpectation } from './agentSquadContract';
135
135
  export type { VoiceToolRetryDelay, VoiceToolRuntime, VoiceToolRuntimeExecuteInput, VoiceToolRuntimeOptions, VoiceToolRuntimeResult } from './toolRuntime';
136
- export type { VoiceToolContractCase, VoiceToolContractCaseReport, VoiceToolContractDefinition, VoiceToolContractExpectation, VoiceToolContractHandlerOptions, VoiceToolContractHTMLHandlerOptions, VoiceToolContractIssue, VoiceToolContractReport, VoiceToolContractRoutesOptions, VoiceToolContractSuiteReport } from './toolContract';
136
+ export type { VoiceToolContractAssertionInput, VoiceToolContractAssertionReport, VoiceToolContractCase, VoiceToolContractCaseReport, VoiceToolContractDefinition, VoiceToolContractExpectation, VoiceToolContractHandlerOptions, VoiceToolContractHTMLHandlerOptions, VoiceToolContractIssue, VoiceToolContractReport, VoiceToolContractRoutesOptions, VoiceToolContractSuiteReport } from './toolContract';
137
137
  export type { VoiceOpsRuntime, VoiceOpsRuntimeConfig, VoiceOpsRuntimeSummary, VoiceOpsRuntimeSinkWorkerConfig, VoiceOpsRuntimeTaskWorkerConfig, VoiceOpsRuntimeTickResult, VoiceOpsRuntimeWebhookWorkerConfig } from './opsRuntime';
138
138
  export type { VoiceOpsPresetName, VoiceOpsPresetOverrides, VoiceResolvedOpsPreset } from './opsPresets';
139
139
  export type { VoiceOutcomeRecipe, VoiceOutcomeRecipeName, VoiceOutcomeRecipeOptions } from './outcomeRecipes';
package/dist/index.js CHANGED
@@ -14476,6 +14476,89 @@ var runVoiceOutcomeContractSuite = async (options) => {
14476
14476
  total: contracts.length
14477
14477
  };
14478
14478
  };
14479
+ var evaluateVoiceOutcomeContractEvidence = (report, input = {}) => {
14480
+ const issues = [];
14481
+ const maxFailed = input.maxFailed ?? 0;
14482
+ const maxIssues = input.maxIssues ?? 0;
14483
+ const contractIds = [
14484
+ ...new Set(report.contracts.map((contract) => contract.contractId))
14485
+ ].sort();
14486
+ const issueCount = report.contracts.reduce((total, contract) => total + contract.issues.length, 0);
14487
+ const totals = report.contracts.reduce((result, contract) => ({
14488
+ handoffs: result.handoffs + contract.matched.handoffs,
14489
+ integrationEvents: result.integrationEvents + contract.matched.integrationEvents,
14490
+ operationsRecordHrefs: result.operationsRecordHrefs + contract.operationsRecordHrefs.length,
14491
+ reviews: result.reviews + contract.matched.reviews,
14492
+ sessions: result.sessions + contract.matched.sessions,
14493
+ tasks: result.tasks + contract.matched.tasks
14494
+ }), {
14495
+ handoffs: 0,
14496
+ integrationEvents: 0,
14497
+ operationsRecordHrefs: 0,
14498
+ reviews: 0,
14499
+ sessions: 0,
14500
+ tasks: 0
14501
+ });
14502
+ const contractsMissingOperationRecordHrefs = report.contracts.filter((contract) => contract.operationsRecordHrefs.length === 0).length;
14503
+ if (input.minContracts !== undefined && report.total < input.minContracts) {
14504
+ issues.push(`Expected at least ${String(input.minContracts)} outcome contract(s), found ${String(report.total)}.`);
14505
+ }
14506
+ if (report.failed > maxFailed) {
14507
+ issues.push(`Expected at most ${String(maxFailed)} failing outcome contract(s), found ${String(report.failed)}.`);
14508
+ }
14509
+ if (issueCount > maxIssues) {
14510
+ issues.push(`Expected at most ${String(maxIssues)} outcome contract issue(s), found ${String(issueCount)}.`);
14511
+ }
14512
+ if (input.minSessions !== undefined && totals.sessions < input.minSessions) {
14513
+ issues.push(`Expected at least ${String(input.minSessions)} matched outcome session(s), found ${String(totals.sessions)}.`);
14514
+ }
14515
+ if (input.minReviews !== undefined && totals.reviews < input.minReviews) {
14516
+ issues.push(`Expected at least ${String(input.minReviews)} matched outcome review(s), found ${String(totals.reviews)}.`);
14517
+ }
14518
+ if (input.minTasks !== undefined && totals.tasks < input.minTasks) {
14519
+ issues.push(`Expected at least ${String(input.minTasks)} matched outcome task(s), found ${String(totals.tasks)}.`);
14520
+ }
14521
+ if (input.minHandoffs !== undefined && totals.handoffs < input.minHandoffs) {
14522
+ issues.push(`Expected at least ${String(input.minHandoffs)} matched outcome handoff(s), found ${String(totals.handoffs)}.`);
14523
+ }
14524
+ if (input.minIntegrationEvents !== undefined && totals.integrationEvents < input.minIntegrationEvents) {
14525
+ issues.push(`Expected at least ${String(input.minIntegrationEvents)} matched outcome integration event(s), found ${String(totals.integrationEvents)}.`);
14526
+ }
14527
+ if (input.minOperationsRecordHrefs !== undefined && totals.operationsRecordHrefs < input.minOperationsRecordHrefs) {
14528
+ issues.push(`Expected at least ${String(input.minOperationsRecordHrefs)} outcome operations record href(s), found ${String(totals.operationsRecordHrefs)}.`);
14529
+ }
14530
+ if ((input.requireOperationRecordHrefs ?? false) && contractsMissingOperationRecordHrefs > 0) {
14531
+ issues.push(`Expected every outcome contract to include operations record hrefs; ${String(contractsMissingOperationRecordHrefs)} contract(s) missing.`);
14532
+ }
14533
+ for (const contractId of input.requiredContractIds ?? []) {
14534
+ if (!contractIds.includes(contractId)) {
14535
+ issues.push(`Missing outcome contract: ${contractId}.`);
14536
+ }
14537
+ }
14538
+ return {
14539
+ contractIds,
14540
+ failed: report.failed,
14541
+ handoffs: totals.handoffs,
14542
+ integrationEvents: totals.integrationEvents,
14543
+ issues,
14544
+ issueCount,
14545
+ ok: issues.length === 0,
14546
+ operationsRecordHrefs: totals.operationsRecordHrefs,
14547
+ passed: report.passed,
14548
+ reviews: totals.reviews,
14549
+ sessions: totals.sessions,
14550
+ status: report.status,
14551
+ tasks: totals.tasks,
14552
+ total: report.total
14553
+ };
14554
+ };
14555
+ var assertVoiceOutcomeContractEvidence = (report, input = {}) => {
14556
+ const assertion = evaluateVoiceOutcomeContractEvidence(report, input);
14557
+ if (!assertion.ok) {
14558
+ throw new Error(`Voice outcome contract evidence assertion failed: ${assertion.issues.join(" ")}`);
14559
+ }
14560
+ return assertion;
14561
+ };
14479
14562
  var renderVoiceOutcomeContractHTML = (report, options = {}) => {
14480
14563
  const title = options.title ?? "Voice Outcome Contracts";
14481
14564
  const contracts = report.contracts.map((contract) => {
@@ -14910,6 +14993,78 @@ var runVoiceToolContractSuite = async (options) => {
14910
14993
  total: contracts.length
14911
14994
  };
14912
14995
  };
14996
+ var evaluateVoiceToolContractEvidence = (report, input = {}) => {
14997
+ const issues = [];
14998
+ const maxFailed = input.maxFailed ?? 0;
14999
+ const maxIssues = input.maxIssues ?? 0;
15000
+ const maxTimedOut = input.maxTimedOut ?? Infinity;
15001
+ const cases = report.contracts.flatMap((contract) => contract.cases);
15002
+ const contractIds = [
15003
+ ...new Set(report.contracts.map((contract) => contract.contractId))
15004
+ ].sort();
15005
+ const toolNames = [
15006
+ ...new Set(report.contracts.map((contract) => contract.toolName))
15007
+ ].sort();
15008
+ const caseStatuses = [...new Set(cases.map((testCase) => testCase.status))].sort();
15009
+ const issueCount = report.contracts.reduce((total, contract) => total + contract.issues.length, 0);
15010
+ const timedOut = cases.filter((testCase) => testCase.timedOut).length;
15011
+ const missingOperationsRecordHrefs = cases.filter((testCase) => !testCase.operationsRecordHref).length;
15012
+ if (input.minContracts !== undefined && report.total < input.minContracts) {
15013
+ issues.push(`Expected at least ${String(input.minContracts)} tool contract(s), found ${String(report.total)}.`);
15014
+ }
15015
+ if (input.minCases !== undefined && cases.length < input.minCases) {
15016
+ issues.push(`Expected at least ${String(input.minCases)} tool contract case(s), found ${String(cases.length)}.`);
15017
+ }
15018
+ if (report.failed > maxFailed) {
15019
+ issues.push(`Expected at most ${String(maxFailed)} failing tool contract(s), found ${String(report.failed)}.`);
15020
+ }
15021
+ if (issueCount > maxIssues) {
15022
+ issues.push(`Expected at most ${String(maxIssues)} tool contract issue(s), found ${String(issueCount)}.`);
15023
+ }
15024
+ if (timedOut > maxTimedOut) {
15025
+ issues.push(`Expected at most ${String(maxTimedOut)} timed out tool contract case(s), found ${String(timedOut)}.`);
15026
+ }
15027
+ if ((input.requireOperationRecordHrefs ?? false) && missingOperationsRecordHrefs > 0) {
15028
+ issues.push(`Expected every tool contract case to include an operations record href; ${String(missingOperationsRecordHrefs)} missing.`);
15029
+ }
15030
+ for (const contractId of input.requiredContractIds ?? []) {
15031
+ if (!contractIds.includes(contractId)) {
15032
+ issues.push(`Missing tool contract: ${contractId}.`);
15033
+ }
15034
+ }
15035
+ for (const toolName of input.requiredToolNames ?? []) {
15036
+ if (!toolNames.includes(toolName)) {
15037
+ issues.push(`Missing tool contract tool: ${toolName}.`);
15038
+ }
15039
+ }
15040
+ for (const status of input.requiredCaseStatuses ?? []) {
15041
+ if (!caseStatuses.includes(status)) {
15042
+ issues.push(`Missing tool contract case status: ${status}.`);
15043
+ }
15044
+ }
15045
+ return {
15046
+ caseStatuses,
15047
+ cases: cases.length,
15048
+ contractIds,
15049
+ failed: report.failed,
15050
+ issues,
15051
+ issueCount,
15052
+ missingOperationsRecordHrefs,
15053
+ ok: issues.length === 0,
15054
+ passed: report.passed,
15055
+ status: report.status,
15056
+ timedOut,
15057
+ toolNames,
15058
+ total: report.total
15059
+ };
15060
+ };
15061
+ var assertVoiceToolContractEvidence = (report, input = {}) => {
15062
+ const assertion = evaluateVoiceToolContractEvidence(report, input);
15063
+ if (!assertion.ok) {
15064
+ throw new Error(`Voice tool contract evidence assertion failed: ${assertion.issues.join(" ")}`);
15065
+ }
15066
+ return assertion;
15067
+ };
14913
15068
  var renderVoiceToolContractHTML = (report, options = {}) => {
14914
15069
  const title = options.title ?? "Voice Tool Contracts";
14915
15070
  const snippet = escapeHtml22(`app.use(
@@ -30695,6 +30850,7 @@ export {
30695
30850
  exportVoiceTrace,
30696
30851
  exportVoiceAuditTrail,
30697
30852
  evaluateVoiceTrace,
30853
+ evaluateVoiceToolContractEvidence,
30698
30854
  evaluateVoiceTelephonyContract,
30699
30855
  evaluateVoiceQuality,
30700
30856
  evaluateVoiceProviderStackGaps,
@@ -30705,6 +30861,7 @@ export {
30705
30861
  evaluateVoiceProofTrendEvidence,
30706
30862
  evaluateVoiceProductionReadinessEvidence,
30707
30863
  evaluateVoicePlatformCoverage,
30864
+ evaluateVoiceOutcomeContractEvidence,
30708
30865
  evaluateVoiceOperationsRecordGuardrails,
30709
30866
  evaluateVoiceObservabilityExportReplayEvidence,
30710
30867
  evaluateVoiceObservabilityExportDeliveryEvidence,
@@ -31021,6 +31178,7 @@ export {
31021
31178
  buildVoiceAuditDeliveryReport,
31022
31179
  buildEmptyVoiceProofTrendReport,
31023
31180
  assignVoiceOpsTask,
31181
+ assertVoiceToolContractEvidence,
31024
31182
  assertVoiceProviderStackEvidence,
31025
31183
  assertVoiceProviderSloEvidence,
31026
31184
  assertVoiceProviderRoutingContractEvidence,
@@ -31029,6 +31187,7 @@ export {
31029
31187
  assertVoiceProofTrendEvidence,
31030
31188
  assertVoiceProductionReadinessEvidence,
31031
31189
  assertVoicePlatformCoverage,
31190
+ assertVoiceOutcomeContractEvidence,
31032
31191
  assertVoiceOperationsRecordGuardrails,
31033
31192
  assertVoiceObservabilityExportSchema,
31034
31193
  assertVoiceObservabilityExportReplayEvidence,
@@ -44,6 +44,35 @@ export type VoiceOutcomeContractSuiteReport = {
44
44
  status: VoiceOutcomeContractStatus;
45
45
  total: number;
46
46
  };
47
+ export type VoiceOutcomeContractAssertionInput = {
48
+ maxFailed?: number;
49
+ maxIssues?: number;
50
+ minContracts?: number;
51
+ minHandoffs?: number;
52
+ minIntegrationEvents?: number;
53
+ minOperationsRecordHrefs?: number;
54
+ minReviews?: number;
55
+ minSessions?: number;
56
+ minTasks?: number;
57
+ requiredContractIds?: string[];
58
+ requireOperationRecordHrefs?: boolean;
59
+ };
60
+ export type VoiceOutcomeContractAssertionReport = {
61
+ contractIds: string[];
62
+ failed: number;
63
+ handoffs: number;
64
+ integrationEvents: number;
65
+ issues: string[];
66
+ issueCount: number;
67
+ ok: boolean;
68
+ operationsRecordHrefs: number;
69
+ passed: number;
70
+ reviews: number;
71
+ sessions: number;
72
+ status: VoiceOutcomeContractStatus;
73
+ tasks: number;
74
+ total: number;
75
+ };
47
76
  type ListStore<T> = {
48
77
  list: () => Promise<T[]> | T[];
49
78
  };
@@ -67,6 +96,8 @@ export type VoiceOutcomeContractRoutesOptions<TSession extends VoiceSessionRecor
67
96
  path?: string;
68
97
  };
69
98
  export declare const runVoiceOutcomeContractSuite: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceOutcomeContractOptions<TSession>) => Promise<VoiceOutcomeContractSuiteReport>;
99
+ export declare const evaluateVoiceOutcomeContractEvidence: (report: VoiceOutcomeContractSuiteReport, input?: VoiceOutcomeContractAssertionInput) => VoiceOutcomeContractAssertionReport;
100
+ export declare const assertVoiceOutcomeContractEvidence: (report: VoiceOutcomeContractSuiteReport, input?: VoiceOutcomeContractAssertionInput) => VoiceOutcomeContractAssertionReport;
70
101
  export declare const renderVoiceOutcomeContractHTML: (report: VoiceOutcomeContractSuiteReport, options?: {
71
102
  title?: string;
72
103
  }) => string;
@@ -64,6 +64,32 @@ export type VoiceToolContractSuiteReport = {
64
64
  status: 'fail' | 'pass';
65
65
  total: number;
66
66
  };
67
+ export type VoiceToolContractAssertionInput = {
68
+ maxFailed?: number;
69
+ maxIssues?: number;
70
+ maxTimedOut?: number;
71
+ minCases?: number;
72
+ minContracts?: number;
73
+ requireOperationRecordHrefs?: boolean;
74
+ requiredCaseStatuses?: Array<'error' | 'ok'>;
75
+ requiredContractIds?: string[];
76
+ requiredToolNames?: string[];
77
+ };
78
+ export type VoiceToolContractAssertionReport = {
79
+ caseStatuses: Array<'error' | 'ok'>;
80
+ cases: number;
81
+ contractIds: string[];
82
+ failed: number;
83
+ issues: string[];
84
+ issueCount: number;
85
+ missingOperationsRecordHrefs: number;
86
+ ok: boolean;
87
+ passed: number;
88
+ status: VoiceToolContractSuiteReport['status'];
89
+ timedOut: number;
90
+ toolNames: string[];
91
+ total: number;
92
+ };
67
93
  export type VoiceToolContractHandlerOptions = {
68
94
  contracts: VoiceToolContractDefinition[];
69
95
  operationsRecordHref?: false | string | ((sessionId: string) => string);
@@ -86,6 +112,8 @@ export declare const createVoiceToolContract: <TContext = unknown, TSession exte
86
112
  };
87
113
  export declare const createVoiceToolRuntimeContractDefaults: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TRouteResult = unknown>() => VoiceToolRuntimeOptions<TContext, TSession, TRouteResult>;
88
114
  export declare const runVoiceToolContractSuite: (options: VoiceToolContractHandlerOptions) => Promise<VoiceToolContractSuiteReport>;
115
+ export declare const evaluateVoiceToolContractEvidence: (report: VoiceToolContractSuiteReport, input?: VoiceToolContractAssertionInput) => VoiceToolContractAssertionReport;
116
+ export declare const assertVoiceToolContractEvidence: (report: VoiceToolContractSuiteReport, input?: VoiceToolContractAssertionInput) => VoiceToolContractAssertionReport;
89
117
  export declare const renderVoiceToolContractHTML: (report: VoiceToolContractSuiteReport, options?: {
90
118
  title?: string;
91
119
  }) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.255",
3
+ "version": "0.0.22-beta.256",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",