@absolutejs/voice 0.0.22-beta.512 → 0.0.22-beta.514
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/agentPerformanceReport.d.ts +40 -0
- package/dist/aiScorecard.d.ts +32 -0
- package/dist/callScorecard.d.ts +53 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +1291 -0
- package/dist/pathway.d.ts +94 -0
- package/dist/pathwayCompiler.d.ts +31 -0
- package/dist/pathwayRuntime.d.ts +57 -0
- package/dist/pathwaySlotCollector.d.ts +29 -0
- package/dist/pathwayVisualizer.d.ts +8 -0
- package/dist/qualityDriftDetector.d.ts +44 -0
- package/dist/scorecardCalibration.d.ts +31 -0
- package/dist/vue/VoiceCostDashboard.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { VoiceScorecard } from "./callScorecard";
|
|
2
|
+
export type VoiceAgentPerformanceBucket = "day" | "week" | "month";
|
|
3
|
+
export type VoiceAgentPerformanceCriterionSummary = {
|
|
4
|
+
criterionId: string;
|
|
5
|
+
averageScore: number;
|
|
6
|
+
passRate: number;
|
|
7
|
+
trend: "up" | "down" | "flat";
|
|
8
|
+
delta: number;
|
|
9
|
+
};
|
|
10
|
+
export type VoiceAgentPerformanceBucketSummary = {
|
|
11
|
+
bucketKey: string;
|
|
12
|
+
callsScored: number;
|
|
13
|
+
averageWeightedScore: number;
|
|
14
|
+
passRate: number;
|
|
15
|
+
needsReviewRate: number;
|
|
16
|
+
failRate: number;
|
|
17
|
+
};
|
|
18
|
+
export type VoiceAgentPerformanceReport = {
|
|
19
|
+
agentId: string;
|
|
20
|
+
rubricId: string;
|
|
21
|
+
fromMs: number;
|
|
22
|
+
toMs: number;
|
|
23
|
+
bucket: VoiceAgentPerformanceBucket;
|
|
24
|
+
totalCalls: number;
|
|
25
|
+
buckets: VoiceAgentPerformanceBucketSummary[];
|
|
26
|
+
criteria: VoiceAgentPerformanceCriterionSummary[];
|
|
27
|
+
overallPassRate: number;
|
|
28
|
+
overallAverageScore: number;
|
|
29
|
+
worstCriterion: string | null;
|
|
30
|
+
bestCriterion: string | null;
|
|
31
|
+
};
|
|
32
|
+
export type BuildVoiceAgentPerformanceReportInput = {
|
|
33
|
+
agentId: string;
|
|
34
|
+
rubricId: string;
|
|
35
|
+
scorecards: VoiceScorecard[];
|
|
36
|
+
fromMs?: number;
|
|
37
|
+
toMs?: number;
|
|
38
|
+
bucket?: VoiceAgentPerformanceBucket;
|
|
39
|
+
};
|
|
40
|
+
export declare const buildVoiceAgentPerformanceReport: (input: BuildVoiceAgentPerformanceReportInput) => VoiceAgentPerformanceReport;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type VoiceScorecard, type VoiceScorecardRubric } from "./callScorecard";
|
|
2
|
+
export type VoiceAIScorecardCompletion = (input: {
|
|
3
|
+
prompt: string;
|
|
4
|
+
systemPrompt?: string;
|
|
5
|
+
}) => Promise<string>;
|
|
6
|
+
export type VoiceAIScorecardScoringResult = {
|
|
7
|
+
criterionId: string;
|
|
8
|
+
score: number;
|
|
9
|
+
rationale?: string;
|
|
10
|
+
};
|
|
11
|
+
export type VoiceAIScorecardParsedResponse = {
|
|
12
|
+
scores: VoiceAIScorecardScoringResult[];
|
|
13
|
+
comments?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ScoreVoiceCallWithAIInput = {
|
|
16
|
+
rubric: VoiceScorecardRubric;
|
|
17
|
+
sessionId: string;
|
|
18
|
+
transcript: string;
|
|
19
|
+
agentId?: string;
|
|
20
|
+
reviewerId?: string;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
now?: () => number;
|
|
23
|
+
};
|
|
24
|
+
export type CreateVoiceAIScorecardOptions = {
|
|
25
|
+
completion: VoiceAIScorecardCompletion;
|
|
26
|
+
systemPrompt?: string;
|
|
27
|
+
};
|
|
28
|
+
export declare const parseVoiceAIScorecardResponse: (raw: string, rubric: VoiceScorecardRubric) => VoiceAIScorecardParsedResponse;
|
|
29
|
+
export declare const createVoiceAIScorecard: (options: CreateVoiceAIScorecardOptions) => {
|
|
30
|
+
scoreCall(input: ScoreVoiceCallWithAIInput): Promise<VoiceScorecard>;
|
|
31
|
+
};
|
|
32
|
+
export type VoiceAIScorecard = ReturnType<typeof createVoiceAIScorecard>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type VoiceScorecardCriterion = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
weight: number;
|
|
5
|
+
section?: string;
|
|
6
|
+
passingScore?: number;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type VoiceScorecardRubric = {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
scaleMax?: number;
|
|
13
|
+
passingGrade?: number;
|
|
14
|
+
criteria: VoiceScorecardCriterion[];
|
|
15
|
+
};
|
|
16
|
+
export type VoiceScorecardCriterionResult = {
|
|
17
|
+
criterionId: string;
|
|
18
|
+
score: number;
|
|
19
|
+
weight: number;
|
|
20
|
+
rationale?: string;
|
|
21
|
+
passed: boolean;
|
|
22
|
+
};
|
|
23
|
+
export type VoiceScorecard = {
|
|
24
|
+
rubricId: string;
|
|
25
|
+
sessionId: string;
|
|
26
|
+
agentId?: string;
|
|
27
|
+
reviewer: "human" | "llm" | "hybrid";
|
|
28
|
+
reviewerId?: string;
|
|
29
|
+
createdAt: number;
|
|
30
|
+
scaleMax: number;
|
|
31
|
+
passingGrade: number;
|
|
32
|
+
results: VoiceScorecardCriterionResult[];
|
|
33
|
+
weightedScore: number;
|
|
34
|
+
grade: "pass" | "fail" | "needs-review";
|
|
35
|
+
sectionScores: Record<string, number>;
|
|
36
|
+
failedRequiredCriteria: string[];
|
|
37
|
+
comments?: string;
|
|
38
|
+
};
|
|
39
|
+
export type BuildVoiceCallScorecardInput = {
|
|
40
|
+
rubric: VoiceScorecardRubric;
|
|
41
|
+
sessionId: string;
|
|
42
|
+
agentId?: string;
|
|
43
|
+
reviewer: VoiceScorecard["reviewer"];
|
|
44
|
+
reviewerId?: string;
|
|
45
|
+
scores: Record<string, {
|
|
46
|
+
score: number;
|
|
47
|
+
rationale?: string;
|
|
48
|
+
}>;
|
|
49
|
+
comments?: string;
|
|
50
|
+
now?: () => number;
|
|
51
|
+
};
|
|
52
|
+
export declare const buildVoiceCallScorecard: (input: BuildVoiceCallScorecardInput) => VoiceScorecard;
|
|
53
|
+
export declare const DEFAULT_VOICE_SALES_RUBRIC: VoiceScorecardRubric;
|
package/dist/index.d.ts
CHANGED
|
@@ -331,4 +331,24 @@ export { scoreVoiceNoShowRisk, summarizeVoiceNoShowVerdict, } from "./noShowPred
|
|
|
331
331
|
export type { VoiceNoShowHistoricalRecord, VoiceNoShowScoreInput, VoiceNoShowSignal, VoiceNoShowVerdict, } from "./noShowPredictor";
|
|
332
332
|
export { createVoiceReminderScheduler, DEFAULT_VOICE_REMINDER_TRIGGERS, } from "./reminderScheduler";
|
|
333
333
|
export type { CreateVoiceReminderSchedulerOptions, ScheduleVoiceRemindersInput, VoiceReminderChannel, VoiceReminderJob, VoiceReminderScheduler, VoiceReminderTrigger, } from "./reminderScheduler";
|
|
334
|
+
export { buildVoiceCallScorecard, DEFAULT_VOICE_SALES_RUBRIC, } from "./callScorecard";
|
|
335
|
+
export type { BuildVoiceCallScorecardInput, VoiceScorecard, VoiceScorecardCriterion, VoiceScorecardCriterionResult, VoiceScorecardRubric, } from "./callScorecard";
|
|
336
|
+
export { createVoiceAIScorecard, parseVoiceAIScorecardResponse, } from "./aiScorecard";
|
|
337
|
+
export type { CreateVoiceAIScorecardOptions, ScoreVoiceCallWithAIInput, VoiceAIScorecard, VoiceAIScorecardCompletion, VoiceAIScorecardParsedResponse, VoiceAIScorecardScoringResult, } from "./aiScorecard";
|
|
338
|
+
export { buildVoiceAgentPerformanceReport } from "./agentPerformanceReport";
|
|
339
|
+
export type { BuildVoiceAgentPerformanceReportInput, VoiceAgentPerformanceBucket, VoiceAgentPerformanceBucketSummary, VoiceAgentPerformanceCriterionSummary, VoiceAgentPerformanceReport, } from "./agentPerformanceReport";
|
|
340
|
+
export { computeVoiceScorecardCalibration } from "./scorecardCalibration";
|
|
341
|
+
export type { VoiceScorecardCalibrationDivergence, VoiceScorecardCalibrationPair, VoiceScorecardCalibrationReport, } from "./scorecardCalibration";
|
|
342
|
+
export { detectVoiceQualityDrift } from "./qualityDriftDetector";
|
|
343
|
+
export type { DetectVoiceQualityDriftInput, VoiceQualityDriftCriterionAlert, VoiceQualityDriftReport, VoiceQualityDriftSeverity, } from "./qualityDriftDetector";
|
|
344
|
+
export { findVoicePathwaySlot, findVoicePathwayState, validateVoicePathway, } from "./pathway";
|
|
345
|
+
export type { VoicePathway, VoicePathwayAction, VoicePathwayCondition, VoicePathwaySlot, VoicePathwaySlotType, VoicePathwayState, VoicePathwayTransition, VoicePathwayValidationIssue, VoicePathwayValidationReport, } from "./pathway";
|
|
346
|
+
export { createVoicePathwayRuntime } from "./pathwayRuntime";
|
|
347
|
+
export type { CreateVoicePathwayRuntimeOptions, VoicePathwayRuntime, VoicePathwayRuntimeEvent, VoicePathwayRuntimeState, VoicePathwayRuntimeStatus, VoicePathwaySlotValue, VoicePathwayToolCall, } from "./pathwayRuntime";
|
|
348
|
+
export { createVoicePathwaySlotCollector, DEFAULT_VOICE_PATHWAY_SLOT_PARSERS, } from "./pathwaySlotCollector";
|
|
349
|
+
export type { CreateVoicePathwaySlotCollectorOptions, VoicePathwaySlotCollector, VoicePathwaySlotCollectorAttempt, VoicePathwaySlotParser, VoicePathwaySlotParseResult, } from "./pathwaySlotCollector";
|
|
350
|
+
export { compileVoicePathwayToAssistant } from "./pathwayCompiler";
|
|
351
|
+
export type { CompileVoicePathwayOptions, VoicePathwayCompiledAssistant, VoicePathwayCompilerToolDefinition, } from "./pathwayCompiler";
|
|
352
|
+
export { renderVoicePathwayMermaid, renderVoicePathwayText, visualizeVoicePathway, } from "./pathwayVisualizer";
|
|
353
|
+
export type { VoicePathwayVisualization } from "./pathwayVisualizer";
|
|
334
354
|
export * from "./types";
|