@absolutejs/voice 0.0.22-beta.397 → 0.0.22-beta.398

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
@@ -32,9 +32,9 @@ export type { VoiceCompetitiveCoverageAssertionInput, VoiceCompetitiveCoverageAs
32
32
  export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
33
33
  export { assertVoiceProofTrendEvidence, appendVoiceRealCallProfileRecoveryEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceRealCallProfileTraceCollector, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, runVoiceRealCallProfileRecoveryLoop, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
34
34
  export { createVoiceEvidenceAssertion, createVoiceProofAssertion, summarizeVoiceProofAssertions } from './proofAssertions';
35
- export { buildVoiceSessionSnapshot, buildVoiceSessionSnapshotStatus, parseVoiceSessionSnapshot } from './sessionSnapshot';
35
+ export { buildVoiceSessionSnapshot, buildVoiceSessionSnapshotStatus, createVoiceSessionSnapshotRoutes, parseVoiceSessionSnapshot } from './sessionSnapshot';
36
36
  export type { VoiceEvidenceAssertionInput, VoiceProofAssertionInput, VoiceProofAssertionResult, VoiceProofAssertionSummary } from './proofAssertions';
37
- export type { VoiceSessionSnapshot, VoiceSessionSnapshotInput, VoiceSessionSnapshotQualityEvidence, VoiceSessionSnapshotStatus } from './sessionSnapshot';
37
+ export type { VoiceSessionSnapshot, VoiceSessionSnapshotInput, VoiceSessionSnapshotQualityEvidence, VoiceSessionSnapshotRoutesOptions, VoiceSessionSnapshotRouteSource, VoiceSessionSnapshotRouteSourceInput, VoiceSessionSnapshotStatus } from './sessionSnapshot';
38
38
  export { fetchVoiceProofTarget, getVoiceProofTargetLogicalFailure, mapVoiceProofTargetsWithConcurrency, runVoiceCommandProofTarget, runVoiceCommandProofTargets, runVoiceProofTargets } from './proofRunner';
39
39
  export type { VoiceCommandProofExecutionResult, VoiceCommandProofTarget, VoiceCommandProofTargetResult, VoiceCommandProofTargetRunnerOptions, VoiceCommandProofTargetRunOptions, VoiceProofTarget, VoiceProofTargetMethod, VoiceProofTargetResult, VoiceProofTargetRunnerOptions, VoiceProofTargetRunOptions } from './proofRunner';
40
40
  export { applyVoiceProfileSwitchGuard, buildVoiceProfileSwitchReadinessReport, buildVoiceProfileSwitchLiveDecisionReport, createVoiceProfileSwitchLiveDecisionRoutes, createVoiceProfileSwitchPolicyProofRoutes, createVoiceProfileSwitchReadinessRoutes, recommendVoiceProfileSwitch, renderVoiceProfileSwitchLiveDecisionHTML, renderVoiceProfileSwitchPolicyProofHTML, renderVoiceProfileSwitchReadinessHTML, runVoiceProfileSwitchPolicyProof } from './profileSwitchRecommendation';
package/dist/index.js CHANGED
@@ -18386,6 +18386,7 @@ var summarizeVoiceProofAssertions = (assertions) => {
18386
18386
  };
18387
18387
  };
18388
18388
  // src/sessionSnapshot.ts
18389
+ import { Elysia as Elysia25 } from "elysia";
18389
18390
  var statusRank4 = (status) => {
18390
18391
  if (status === "fail") {
18391
18392
  return 2;
@@ -18452,6 +18453,62 @@ var parseVoiceSessionSnapshot = (snapshot) => {
18452
18453
  }
18453
18454
  return snapshot;
18454
18455
  };
18456
+ var isVoiceSessionSnapshot = (value) => value.schema === "absolute.voice.session.snapshot.v1";
18457
+ var sessionSnapshotJsonResponse = (snapshot, headers = {}, downloadFilename) => new Response(JSON.stringify(snapshot, null, 2), {
18458
+ headers: {
18459
+ ...downloadFilename ? {
18460
+ "content-disposition": `attachment; filename="${downloadFilename.replaceAll('"', "")}"`
18461
+ } : {},
18462
+ "content-type": "application/json; charset=utf-8",
18463
+ ...headers
18464
+ }
18465
+ });
18466
+ var resolveVoiceSessionSnapshot = async (options, input) => {
18467
+ const source = typeof options.source === "function" ? await options.source(input) : options.source ?? {
18468
+ media: options.media,
18469
+ name: options.name,
18470
+ proofAssertions: options.proofAssertions,
18471
+ providerRoutingEvents: options.providerRoutingEvents,
18472
+ quality: options.quality,
18473
+ scenarioId: options.scenarioId,
18474
+ sessionId: options.sessionId ?? input.sessionId,
18475
+ telephonyOutcomes: options.telephonyOutcomes,
18476
+ turnId: options.turnId ?? input.turnId
18477
+ };
18478
+ if (isVoiceSessionSnapshot(source)) {
18479
+ return parseVoiceSessionSnapshot(source);
18480
+ }
18481
+ return buildVoiceSessionSnapshot({
18482
+ ...source,
18483
+ sessionId: source.sessionId ?? input.sessionId,
18484
+ turnId: source.turnId ?? input.turnId
18485
+ });
18486
+ };
18487
+ var readRouteSessionId = (params) => {
18488
+ const sessionId = params.sessionId;
18489
+ return typeof sessionId === "string" ? sessionId : "";
18490
+ };
18491
+ var createVoiceSessionSnapshotRoutes = (options = {}) => {
18492
+ const path = options.path ?? "/api/voice/session-snapshot/:sessionId";
18493
+ const downloadPath = options.downloadPath ?? "/api/voice/session-snapshot/:sessionId/download";
18494
+ const headers = options.headers ?? {};
18495
+ const app = new Elysia25({ name: options.name ?? "voice-session-snapshot" }).get(path, async ({ params, request, query }) => sessionSnapshotJsonResponse(await resolveVoiceSessionSnapshot(options, {
18496
+ request,
18497
+ sessionId: readRouteSessionId(params),
18498
+ turnId: typeof query.turnId === "string" ? query.turnId : undefined
18499
+ }), headers));
18500
+ if (downloadPath !== false) {
18501
+ app.get(downloadPath, async ({ params, request, query }) => {
18502
+ const snapshot = await resolveVoiceSessionSnapshot(options, {
18503
+ request,
18504
+ sessionId: readRouteSessionId(params),
18505
+ turnId: typeof query.turnId === "string" ? query.turnId : undefined
18506
+ });
18507
+ return sessionSnapshotJsonResponse(snapshot, headers, `voice-session-${snapshot.sessionId}.snapshot.json`);
18508
+ });
18509
+ }
18510
+ return app;
18511
+ };
18455
18512
  // src/proofRunner.ts
18456
18513
  var encoder = new TextEncoder;
18457
18514
  var trimBaseUrl = (baseUrl) => baseUrl.replace(/\/$/, "");
@@ -18696,7 +18753,7 @@ var buildVoiceIOProviderRouterTraceEvent = (options) => ({
18696
18753
  });
18697
18754
  var appendVoiceIOProviderRouterTraceEvent = async (options) => options.store.append(buildVoiceIOProviderRouterTraceEvent(options));
18698
18755
  // src/sloCalibration.ts
18699
- import { Elysia as Elysia25 } from "elysia";
18756
+ import { Elysia as Elysia26 } from "elysia";
18700
18757
  var DEFAULT_HEADROOM_MULTIPLIER = 1.5;
18701
18758
  var DEFAULT_WARN_RATIO = 0.8;
18702
18759
  var DEFAULT_MIN_PASSING_RUNS = 3;
@@ -18976,7 +19033,7 @@ var renderVoiceSloReadinessThresholdHTML = (report, options = {}) => {
18976
19033
  var createVoiceSloCalibrationRoutes = (options) => {
18977
19034
  const path = options.path ?? "/api/voice/slo-calibration";
18978
19035
  const markdownPath = options.markdownPath === undefined ? "/voice/slo-calibration.md" : options.markdownPath;
18979
- const routes = new Elysia25({
19036
+ const routes = new Elysia26({
18980
19037
  name: options.name ?? "absolutejs-voice-slo-calibration"
18981
19038
  });
18982
19039
  const loadReport = async () => buildVoiceSloCalibrationReport(typeof options.source === "function" ? await options.source() : options.source, options);
@@ -19000,7 +19057,7 @@ var createVoiceSloReadinessThresholdRoutes = (options) => {
19000
19057
  const path = options.path ?? "/api/voice/slo-readiness-thresholds";
19001
19058
  const htmlPath = options.htmlPath === undefined ? "/voice/slo-readiness-thresholds" : options.htmlPath;
19002
19059
  const markdownPath = options.markdownPath === undefined ? "/voice/slo-readiness-thresholds.md" : options.markdownPath;
19003
- const routes = new Elysia25({
19060
+ const routes = new Elysia26({
19004
19061
  name: options.name ?? "absolutejs-voice-slo-readiness-thresholds"
19005
19062
  });
19006
19063
  const loadReport = async () => buildVoiceSloReadinessThresholdReport(typeof options.source === "function" ? await options.source() : options.source, options);
@@ -19034,7 +19091,7 @@ var createVoiceSloReadinessThresholdRoutes = (options) => {
19034
19091
  return routes;
19035
19092
  };
19036
19093
  // src/liveOps.ts
19037
- import { Elysia as Elysia26 } from "elysia";
19094
+ import { Elysia as Elysia27 } from "elysia";
19038
19095
  var VOICE_LIVE_OPS_ACTIONS = [
19039
19096
  "assign",
19040
19097
  "create-task",
@@ -19344,7 +19401,7 @@ var createVoiceLiveOpsRoutes = (options = {}) => {
19344
19401
  const controller = createVoiceLiveOpsController(options);
19345
19402
  const path = options.path ?? "/api/voice/live-ops/action";
19346
19403
  const controlPath = options.controlPath ?? "/api/voice/live-ops/control/:sessionId";
19347
- return new Elysia26({
19404
+ return new Elysia27({
19348
19405
  name: options.name ?? "absolutejs-voice-live-ops"
19349
19406
  }).post(path, async ({ request, set }) => {
19350
19407
  try {
@@ -19366,7 +19423,7 @@ var createVoiceLiveOpsRoutes = (options = {}) => {
19366
19423
  });
19367
19424
  };
19368
19425
  // src/deliveryRuntime.ts
19369
- import { Elysia as Elysia27 } from "elysia";
19426
+ import { Elysia as Elysia28 } from "elysia";
19370
19427
  import { mkdir } from "fs/promises";
19371
19428
  import { dirname, join } from "path";
19372
19429
  var escapeHtml28 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
@@ -19620,7 +19677,7 @@ var createVoiceDeliveryRuntimeRoutes = (options) => {
19620
19677
  const htmlPath = options.htmlPath === undefined ? "/delivery-runtime" : options.htmlPath;
19621
19678
  const tickPath = options.tickPath === undefined ? "/api/voice-delivery-runtime/tick" : options.tickPath;
19622
19679
  const requeueDeadLettersPath = options.requeueDeadLettersPath === undefined ? "/api/voice-delivery-runtime/requeue-dead-letters" : options.requeueDeadLettersPath;
19623
- const routes = new Elysia27({
19680
+ const routes = new Elysia28({
19624
19681
  name: options.name ?? "absolutejs-voice-delivery-runtime"
19625
19682
  }).get(path, () => buildVoiceDeliveryRuntimeReport(options.runtime));
19626
19683
  if (tickPath !== false) {
@@ -19656,7 +19713,7 @@ var createVoiceDeliveryRuntimeRoutes = (options) => {
19656
19713
  return routes;
19657
19714
  };
19658
19715
  // src/dataControl.ts
19659
- import { Elysia as Elysia28 } from "elysia";
19716
+ import { Elysia as Elysia29 } from "elysia";
19660
19717
  var voiceComplianceRedactionDefaults = {
19661
19718
  keys: [
19662
19719
  "apiKey",
@@ -20195,7 +20252,7 @@ var parseRetentionPolicyBody = (body, options, dryRun) => {
20195
20252
  var createVoiceDataControlRoutes = (options) => {
20196
20253
  const path = options.path ?? "/data-control";
20197
20254
  const title = options.title ?? "AbsoluteJS Voice Data Control";
20198
- const routes = new Elysia28({
20255
+ const routes = new Elysia29({
20199
20256
  name: options.name ?? "absolutejs-voice-data-control"
20200
20257
  });
20201
20258
  routes.get(path, async ({ query }) => {
@@ -20271,15 +20328,15 @@ var createVoiceDataControlRoutes = (options) => {
20271
20328
  return routes;
20272
20329
  };
20273
20330
  // src/evalRoutes.ts
20274
- import { Elysia as Elysia31 } from "elysia";
20331
+ import { Elysia as Elysia32 } from "elysia";
20275
20332
  import { mkdir as mkdir2 } from "fs/promises";
20276
20333
  import { dirname as dirname2 } from "path";
20277
20334
 
20278
20335
  // src/qualityRoutes.ts
20279
- import { Elysia as Elysia30 } from "elysia";
20336
+ import { Elysia as Elysia31 } from "elysia";
20280
20337
 
20281
20338
  // src/handoffHealth.ts
20282
- import { Elysia as Elysia29 } from "elysia";
20339
+ import { Elysia as Elysia30 } from "elysia";
20283
20340
  var escapeHtml30 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
20284
20341
  var getString9 = (value) => typeof value === "string" && value.length > 0 ? value : undefined;
20285
20342
  var isStatus = (value) => value === "delivered" || value === "failed" || value === "skipped";
@@ -20462,7 +20519,7 @@ var createVoiceHandoffHealthHTMLHandler = (options = {}) => async ({ query }) =>
20462
20519
  var createVoiceHandoffHealthRoutes = (options = {}) => {
20463
20520
  const path = options.path ?? "/api/voice-handoffs";
20464
20521
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
20465
- const routes = new Elysia29({
20522
+ const routes = new Elysia30({
20466
20523
  name: options.name ?? "absolutejs-voice-handoff-health"
20467
20524
  }).get(path, createVoiceHandoffHealthJSONHandler(options));
20468
20525
  if (htmlPath) {
@@ -20593,7 +20650,7 @@ var renderVoiceQualityHTML = (report, options = {}) => {
20593
20650
  };
20594
20651
  var createVoiceQualityRoutes = (options) => {
20595
20652
  const path = options.path ?? "/quality";
20596
- const routes = new Elysia30({
20653
+ const routes = new Elysia31({
20597
20654
  name: options.name ?? "absolutejs-voice-quality"
20598
20655
  });
20599
20656
  const getReport = () => evaluateVoiceQuality({
@@ -21006,7 +21063,7 @@ var renderVoiceScenarioFixtureEvalHTML = (report, options = {}) => {
21006
21063
  };
21007
21064
  var createVoiceEvalRoutes = (options) => {
21008
21065
  const path = options.path ?? "/evals";
21009
- const routes = new Elysia31({
21066
+ const routes = new Elysia32({
21010
21067
  name: options.name ?? "absolutejs-voice-evals"
21011
21068
  });
21012
21069
  const getReport = () => runVoiceSessionEvals({
@@ -21143,10 +21200,10 @@ var createVoiceEvalRoutes = (options) => {
21143
21200
  return routes;
21144
21201
  };
21145
21202
  // src/simulationSuite.ts
21146
- import { Elysia as Elysia34 } from "elysia";
21203
+ import { Elysia as Elysia35 } from "elysia";
21147
21204
 
21148
21205
  // src/outcomeContract.ts
21149
- import { Elysia as Elysia32 } from "elysia";
21206
+ import { Elysia as Elysia33 } from "elysia";
21150
21207
  var escapeHtml33 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
21151
21208
  var resolveSessionHref2 = (value, sessionId) => {
21152
21209
  if (value === false) {
@@ -21395,7 +21452,7 @@ var createVoiceOutcomeContractHTMLHandler = (options) => async () => {
21395
21452
  var createVoiceOutcomeContractRoutes = (options) => {
21396
21453
  const path = options.path ?? "/api/outcome-contracts";
21397
21454
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
21398
- const routes = new Elysia32({
21455
+ const routes = new Elysia33({
21399
21456
  name: options.name ?? "absolutejs-voice-outcome-contracts"
21400
21457
  }).get(path, createVoiceOutcomeContractJSONHandler(options));
21401
21458
  if (htmlPath) {
@@ -21405,7 +21462,7 @@ var createVoiceOutcomeContractRoutes = (options) => {
21405
21462
  };
21406
21463
 
21407
21464
  // src/toolContract.ts
21408
- import { Elysia as Elysia33 } from "elysia";
21465
+ import { Elysia as Elysia34 } from "elysia";
21409
21466
 
21410
21467
  // src/toolRuntime.ts
21411
21468
  var toErrorMessage4 = (error) => error instanceof Error ? error.message : String(error);
@@ -21929,7 +21986,7 @@ var createVoiceToolContractHTMLHandler = (options) => async () => {
21929
21986
  var createVoiceToolContractRoutes = (options) => {
21930
21987
  const path = options.path ?? "/api/tool-contracts";
21931
21988
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
21932
- const routes = new Elysia33({
21989
+ const routes = new Elysia34({
21933
21990
  name: options.name ?? "absolutejs-voice-tool-contracts"
21934
21991
  }).get(path, createVoiceToolContractJSONHandler(options));
21935
21992
  if (htmlPath) {
@@ -22181,7 +22238,7 @@ app.use(
22181
22238
  var createVoiceSimulationSuiteRoutes = (options) => {
22182
22239
  const path = options.path ?? "/api/voice/simulations";
22183
22240
  const htmlPath = options.htmlPath === undefined ? "/voice/simulations" : options.htmlPath;
22184
- const app = new Elysia34({
22241
+ const app = new Elysia35({
22185
22242
  name: options.name ?? "absolutejs-voice-simulation-suite"
22186
22243
  }).get(path, () => runVoiceSimulationSuite(options));
22187
22244
  if (htmlPath) {
@@ -22493,7 +22550,7 @@ var createVoiceWorkflowContractHandler = (input) => {
22493
22550
  };
22494
22551
  };
22495
22552
  // src/sessionReplay.ts
22496
- import { Elysia as Elysia35 } from "elysia";
22553
+ import { Elysia as Elysia36 } from "elysia";
22497
22554
  var getString12 = (value) => typeof value === "string" ? value : undefined;
22498
22555
  var escapeHtml36 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
22499
22556
  var increment4 = (record, key) => {
@@ -22733,7 +22790,7 @@ var createVoiceSessionsHTMLHandler = (options = {}) => async ({ query }) => {
22733
22790
  var createVoiceSessionListRoutes = (options = {}) => {
22734
22791
  const path = options.path ?? "/api/voice-sessions";
22735
22792
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
22736
- const routes = new Elysia35({
22793
+ const routes = new Elysia36({
22737
22794
  name: options.name ?? "absolutejs-voice-session-list"
22738
22795
  }).get(path, createVoiceSessionsJSONHandler(options));
22739
22796
  if (htmlPath) {
@@ -22761,7 +22818,7 @@ var createVoiceSessionReplayHTMLHandler = (options) => async ({ params }) => {
22761
22818
  var createVoiceSessionReplayRoutes = (options) => {
22762
22819
  const path = options.path ?? "/api/voice-sessions/:sessionId/replay";
22763
22820
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
22764
- const routes = new Elysia35({
22821
+ const routes = new Elysia36({
22765
22822
  name: options.name ?? "absolutejs-voice-session-replay"
22766
22823
  }).get(path, createVoiceSessionReplayJSONHandler(options));
22767
22824
  if (htmlPath) {
@@ -23075,7 +23132,7 @@ var assertVoiceAgentSquadContractEvidence = (reports, input = {}) => {
23075
23132
  return report;
23076
23133
  };
23077
23134
  // src/turnLatency.ts
23078
- import { Elysia as Elysia36 } from "elysia";
23135
+ import { Elysia as Elysia37 } from "elysia";
23079
23136
  var DEFAULT_WARN_AFTER_MS = 1800;
23080
23137
  var DEFAULT_FAIL_AFTER_MS = 3200;
23081
23138
  var escapeHtml37 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
@@ -23231,7 +23288,7 @@ var createVoiceTurnLatencyHTMLHandler = (options) => async () => {
23231
23288
  var createVoiceTurnLatencyRoutes = (options) => {
23232
23289
  const path = options.path ?? "/api/turn-latency";
23233
23290
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
23234
- const routes = new Elysia36({
23291
+ const routes = new Elysia37({
23235
23292
  name: options.name ?? "absolutejs-voice-turn-latency"
23236
23293
  }).get(path, createVoiceTurnLatencyJSONHandler(options));
23237
23294
  if (htmlPath) {
@@ -23240,7 +23297,7 @@ var createVoiceTurnLatencyRoutes = (options) => {
23240
23297
  return routes;
23241
23298
  };
23242
23299
  // src/liveLatency.ts
23243
- import { Elysia as Elysia37 } from "elysia";
23300
+ import { Elysia as Elysia38 } from "elysia";
23244
23301
  var escapeHtml38 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
23245
23302
  var percentile4 = (values, percentileValue) => {
23246
23303
  if (values.length === 0) {
@@ -23314,7 +23371,7 @@ await traceStore.append({
23314
23371
  var createVoiceLiveLatencyRoutes = (options) => {
23315
23372
  const path = options.path ?? "/api/live-latency";
23316
23373
  const htmlPath = options.htmlPath === undefined ? "/live-latency" : options.htmlPath;
23317
- const routes = new Elysia37({
23374
+ const routes = new Elysia38({
23318
23375
  name: options.name ?? "absolutejs-voice-live-latency"
23319
23376
  }).get(path, () => summarizeVoiceLiveLatency(options));
23320
23377
  if (htmlPath) {
@@ -23633,7 +23690,7 @@ None.
23633
23690
  `}`;
23634
23691
  };
23635
23692
  // src/turnQuality.ts
23636
- import { Elysia as Elysia38 } from "elysia";
23693
+ import { Elysia as Elysia39 } from "elysia";
23637
23694
  var DEFAULT_CONFIDENCE_WARN_THRESHOLD = 0.72;
23638
23695
  var escapeHtml39 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
23639
23696
  var getTurnLatencyMs = (turn) => {
@@ -23740,7 +23797,7 @@ var createVoiceTurnQualityHTMLHandler = (options) => async () => {
23740
23797
  var createVoiceTurnQualityRoutes = (options) => {
23741
23798
  const path = options.path ?? "/api/turn-quality";
23742
23799
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
23743
- const routes = new Elysia38({
23800
+ const routes = new Elysia39({
23744
23801
  name: options.name ?? "absolutejs-voice-turn-quality"
23745
23802
  }).get(path, createVoiceTurnQualityJSONHandler(options));
23746
23803
  if (htmlPath) {
@@ -23749,7 +23806,7 @@ var createVoiceTurnQualityRoutes = (options) => {
23749
23806
  return routes;
23750
23807
  };
23751
23808
  // src/telephonyOutcome.ts
23752
- import { Elysia as Elysia39 } from "elysia";
23809
+ import { Elysia as Elysia40 } from "elysia";
23753
23810
  var DEFAULT_COMPLETED_STATUSES = [
23754
23811
  "answered",
23755
23812
  "completed",
@@ -24510,7 +24567,7 @@ var createVoiceTelephonyWebhookHandler = (options = {}) => async (input) => {
24510
24567
  var createVoiceTelephonyWebhookRoutes = (options = {}) => {
24511
24568
  const path = options.path ?? "/api/voice/telephony/webhook";
24512
24569
  const handler = createVoiceTelephonyWebhookHandler(options);
24513
- return new Elysia39({
24570
+ return new Elysia40({
24514
24571
  name: options.name ?? "absolutejs-voice-telephony-webhooks"
24515
24572
  }).post(path, async ({ query, request }) => {
24516
24573
  try {
@@ -24531,12 +24588,12 @@ var createVoiceTelephonyWebhookRoutes = (options = {}) => {
24531
24588
  });
24532
24589
  };
24533
24590
  // src/phoneAgent.ts
24534
- import { Elysia as Elysia45 } from "elysia";
24591
+ import { Elysia as Elysia46 } from "elysia";
24535
24592
 
24536
24593
  // src/telephony/plivo.ts
24537
24594
  import { Buffer as Buffer5 } from "buffer";
24538
24595
  import { Database } from "bun:sqlite";
24539
- import { Elysia as Elysia41 } from "elysia";
24596
+ import { Elysia as Elysia42 } from "elysia";
24540
24597
 
24541
24598
  // src/telephony/contract.ts
24542
24599
  var DEFAULT_REQUIREMENTS = [
@@ -24620,7 +24677,7 @@ var evaluateVoiceTelephonyContract = (input) => {
24620
24677
 
24621
24678
  // src/telephony/twilio.ts
24622
24679
  import { Buffer as Buffer4 } from "buffer";
24623
- import { Elysia as Elysia40 } from "elysia";
24680
+ import { Elysia as Elysia41 } from "elysia";
24624
24681
  var TWILIO_MULAW_SAMPLE_RATE = 8000;
24625
24682
  var VOICE_PCM_SAMPLE_RATE = 16000;
24626
24683
  var escapeXml2 = (value) => value.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("'", "&apos;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
@@ -25279,7 +25336,7 @@ var createTwilioVoiceRoutes = (options) => {
25279
25336
  const smokePath = options.smoke?.path === false ? false : options.smoke?.path ?? "/api/voice/twilio/smoke";
25280
25337
  const bridges = new WeakMap;
25281
25338
  const webhookPolicy = options.webhook?.policy ?? options.outcomePolicy ?? createVoiceTelephonyOutcomePolicy();
25282
- const app = new Elysia40({
25339
+ const app = new Elysia41({
25283
25340
  name: options.name ?? "absolutejs-voice-twilio"
25284
25341
  }).get(twimlPath, async ({ query, request }) => {
25285
25342
  const streamUrl = await resolveTwilioStreamUrl(options, {
@@ -25951,7 +26008,7 @@ var createPlivoVoiceRoutes = (options = {}) => {
25951
26008
  nonceStore: options.webhook.nonceStore,
25952
26009
  verificationUrl: options.webhook.verificationUrl
25953
26010
  }) : undefined);
25954
- const app = new Elysia41({
26011
+ const app = new Elysia42({
25955
26012
  name: options.name ?? "absolutejs-voice-plivo"
25956
26013
  }).get(answerPath, async ({ query, request }) => {
25957
26014
  const streamUrl = await resolvePlivoStreamUrl(options, {
@@ -26063,7 +26120,7 @@ var createPlivoVoiceRoutes = (options = {}) => {
26063
26120
  // src/telephony/telnyx.ts
26064
26121
  import { Buffer as Buffer6 } from "buffer";
26065
26122
  import { Database as Database2 } from "bun:sqlite";
26066
- import { Elysia as Elysia42 } from "elysia";
26123
+ import { Elysia as Elysia43 } from "elysia";
26067
26124
  var escapeXml4 = (value) => value.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("'", "&apos;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
26068
26125
  var escapeHtml42 = (value) => value.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("'", "&#39;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
26069
26126
  var joinUrlPath4 = (origin, path) => `${origin.replace(/\/$/, "")}${path.startsWith("/") ? path : `/${path}`}`;
@@ -26566,7 +26623,7 @@ var createTelnyxVoiceRoutes = (options = {}) => {
26566
26623
  publicKey: options.webhook.publicKey,
26567
26624
  toleranceSeconds: options.webhook.toleranceSeconds
26568
26625
  }) : undefined);
26569
- const app = new Elysia42({
26626
+ const app = new Elysia43({
26570
26627
  name: options.name ?? "absolutejs-voice-telnyx"
26571
26628
  }).get(texmlPath, async ({ query, request }) => {
26572
26629
  const streamUrl = await resolveTelnyxStreamUrl(options, {
@@ -26676,7 +26733,7 @@ var createTelnyxVoiceRoutes = (options = {}) => {
26676
26733
  };
26677
26734
 
26678
26735
  // src/telephony/matrix.ts
26679
- import { Elysia as Elysia43 } from "elysia";
26736
+ import { Elysia as Elysia44 } from "elysia";
26680
26737
  var escapeHtml43 = (value) => value.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("'", "&#39;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
26681
26738
  var labelForProvider = (provider) => provider.split("-").map((part) => `${part.slice(0, 1).toUpperCase()}${part.slice(1)}`).join(" ");
26682
26739
  var resolveEntryStatus = (contract, setup, smoke) => {
@@ -26760,7 +26817,7 @@ ${entry.issues.length ? `<ul style="margin:12px 0 0; padding-left:18px;">${entry
26760
26817
  </main>`;
26761
26818
  var createVoiceTelephonyCarrierMatrixRoutes = (options) => {
26762
26819
  const path = options.path ?? "/api/voice/telephony/carriers";
26763
- return new Elysia43({
26820
+ return new Elysia44({
26764
26821
  name: options.name ?? "absolutejs-voice-telephony-carrier-matrix"
26765
26822
  }).get(path, async ({ query, request }) => {
26766
26823
  const providers = await options.load({ query, request });
@@ -26782,7 +26839,7 @@ var createVoiceTelephonyCarrierMatrixRoutes = (options) => {
26782
26839
  };
26783
26840
 
26784
26841
  // src/phoneAgentProductionSmoke.ts
26785
- import { Elysia as Elysia44 } from "elysia";
26842
+ import { Elysia as Elysia45 } from "elysia";
26786
26843
  var defaultRequirements = [
26787
26844
  "media-started",
26788
26845
  "transcript",
@@ -26925,7 +26982,7 @@ var createVoicePhoneAgentProductionSmokeHTMLHandler = (options) => async ({
26925
26982
  var createVoicePhoneAgentProductionSmokeRoutes = (options) => {
26926
26983
  const path = options.path ?? "/api/voice/phone/smoke-contract";
26927
26984
  const htmlPath = options.htmlPath === undefined ? "/voice/phone/smoke-contract" : options.htmlPath;
26928
- const routes = new Elysia44({
26985
+ const routes = new Elysia45({
26929
26986
  name: options.name ?? "absolutejs-voice-phone-smoke-contract"
26930
26987
  }).get(path, createVoicePhoneAgentProductionSmokeJSONHandler(options));
26931
26988
  if (htmlPath) {
@@ -27256,7 +27313,7 @@ var createVoicePhoneAgent = (options) => {
27256
27313
  setupPath: resolveSetupPath(carrier),
27257
27314
  smokePath: resolveSmokePath(carrier)
27258
27315
  }));
27259
- const app = new Elysia45({
27316
+ const app = new Elysia46({
27260
27317
  name: options.name ?? "absolutejs-voice-phone-agent"
27261
27318
  });
27262
27319
  for (const carrier of options.carriers) {
@@ -28886,7 +28943,7 @@ var createOpenAIVoiceTTS = (options) => {
28886
28943
  };
28887
28944
  };
28888
28945
  // src/providerCapabilities.ts
28889
- import { Elysia as Elysia46 } from "elysia";
28946
+ import { Elysia as Elysia47 } from "elysia";
28890
28947
  var escapeHtml46 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
28891
28948
  var fromProviderList = (kind, providers, options) => (providers ?? []).map((provider) => ({
28892
28949
  configured: true,
@@ -28987,7 +29044,7 @@ var createVoiceProviderCapabilityHTMLHandler = (options) => async () => {
28987
29044
  var createVoiceProviderCapabilityRoutes = (options) => {
28988
29045
  const path = options.path ?? "/api/provider-capabilities";
28989
29046
  const htmlPath = options.htmlPath === undefined ? `${path}/htmx` : options.htmlPath;
28990
- const routes = new Elysia46({
29047
+ const routes = new Elysia47({
28991
29048
  name: options.name ?? "absolutejs-voice-provider-capabilities"
28992
29049
  }).get(path, createVoiceProviderCapabilityJSONHandler(options));
28993
29050
  if (htmlPath) {
@@ -28996,7 +29053,7 @@ var createVoiceProviderCapabilityRoutes = (options) => {
28996
29053
  return routes;
28997
29054
  };
28998
29055
  // src/providerOrchestration.ts
28999
- import { Elysia as Elysia47 } from "elysia";
29056
+ import { Elysia as Elysia48 } from "elysia";
29000
29057
  var defaultRequirement = {
29001
29058
  minProviders: 1,
29002
29059
  requireBudgetPolicy: false,
@@ -29172,7 +29229,7 @@ var createVoiceProviderOrchestrationRoutes = (options) => {
29172
29229
  const path = options.path ?? "/api/voice/provider-orchestration";
29173
29230
  const htmlPath = options.htmlPath === undefined ? "/voice/provider-orchestration" : options.htmlPath;
29174
29231
  const markdownPath = options.markdownPath === undefined ? "/voice/provider-orchestration.md" : options.markdownPath;
29175
- const routes = new Elysia47({
29232
+ const routes = new Elysia48({
29176
29233
  name: options.name ?? "absolutejs-voice-provider-orchestration"
29177
29234
  }).get(path, () => buildVoiceProviderOrchestrationReport(options));
29178
29235
  if (htmlPath) {
@@ -29343,7 +29400,7 @@ var assertVoiceProviderRoutingContractEvidence = (reports, input = {}) => {
29343
29400
  return report;
29344
29401
  };
29345
29402
  // src/providerSlo.ts
29346
- import { Elysia as Elysia48 } from "elysia";
29403
+ import { Elysia as Elysia49 } from "elysia";
29347
29404
  var defaultThresholds = {
29348
29405
  llm: {
29349
29406
  maxAverageElapsedMs: 2500,
@@ -29697,7 +29754,7 @@ var createVoiceProviderSloRoutes = (options) => {
29697
29754
  ...options.headers ?? {}
29698
29755
  };
29699
29756
  const buildReport = () => buildVoiceProviderSloReport(options);
29700
- const app = new Elysia48({ name: options.name ?? "absolute-voice-provider-slos" });
29757
+ const app = new Elysia49({ name: options.name ?? "absolute-voice-provider-slos" });
29701
29758
  app.get(path, async () => Response.json(await buildReport(), { headers }));
29702
29759
  if (markdownPath !== false) {
29703
29760
  app.get(markdownPath, async () => {
@@ -29727,10 +29784,10 @@ var createVoiceProviderSloRoutes = (options) => {
29727
29784
  return app;
29728
29785
  };
29729
29786
  // src/productionReadiness.ts
29730
- import { Elysia as Elysia54 } from "elysia";
29787
+ import { Elysia as Elysia55 } from "elysia";
29731
29788
 
29732
29789
  // src/telephony/security.ts
29733
- import { Elysia as Elysia49 } from "elysia";
29790
+ import { Elysia as Elysia50 } from "elysia";
29734
29791
 
29735
29792
  // src/postgresStore.ts
29736
29793
  var normalizeIdentifierSegment = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice";
@@ -30468,7 +30525,7 @@ var assertVoiceTelephonyWebhookSecurityEvidence = (report, input = {}) => {
30468
30525
  };
30469
30526
  var createVoiceTelephonyWebhookSecurityRoutes = (options) => {
30470
30527
  const path = options.path ?? "/api/voice/telephony/webhook-security";
30471
- return new Elysia49({
30528
+ return new Elysia50({
30472
30529
  name: options.name ?? "absolutejs-voice-telephony-webhook-security"
30473
30530
  }).get(path, () => buildVoiceTelephonyWebhookSecurityReport(options.options));
30474
30531
  };
@@ -30525,7 +30582,7 @@ var createVoiceTelephonyWebhookSecurityPreset = (options = {}) => {
30525
30582
  };
30526
30583
 
30527
30584
  // src/opsRecovery.ts
30528
- import { Elysia as Elysia50 } from "elysia";
30585
+ import { Elysia as Elysia51 } from "elysia";
30529
30586
  var escapeHtml49 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
30530
30587
  var getString15 = (value) => typeof value === "string" && value.trim() ? value.trim() : undefined;
30531
30588
  var hrefForSession = (value, sessionId) => {
@@ -30752,7 +30809,7 @@ var createVoiceOpsRecoveryRoutes = (options = {}) => {
30752
30809
  const path = options.path ?? "/api/voice/ops-recovery";
30753
30810
  const htmlPath = options.htmlPath === undefined ? "/ops-recovery" : options.htmlPath;
30754
30811
  const markdownPath = options.markdownPath === undefined ? `${path}.md` : options.markdownPath;
30755
- const routes = new Elysia50({
30812
+ const routes = new Elysia51({
30756
30813
  name: options.name ?? "absolutejs-voice-ops-recovery"
30757
30814
  }).get(path, async () => buildVoiceOpsRecoveryReport(options));
30758
30815
  if (htmlPath) {
@@ -30782,17 +30839,17 @@ var createVoiceOpsRecoveryRoutes = (options = {}) => {
30782
30839
  };
30783
30840
 
30784
30841
  // src/observabilityExport.ts
30785
- import { Elysia as Elysia53 } from "elysia";
30842
+ import { Elysia as Elysia54 } from "elysia";
30786
30843
  import { Database as Database4 } from "bun:sqlite";
30787
30844
  import { createHash } from "crypto";
30788
30845
  import { mkdir as mkdir4, readFile as readFile2, stat, unlink } from "fs/promises";
30789
30846
  import { join as join3 } from "path";
30790
30847
 
30791
30848
  // src/operationsRecord.ts
30792
- import { Elysia as Elysia52 } from "elysia";
30849
+ import { Elysia as Elysia53 } from "elysia";
30793
30850
 
30794
30851
  // src/traceTimeline.ts
30795
- import { Elysia as Elysia51 } from "elysia";
30852
+ import { Elysia as Elysia52 } from "elysia";
30796
30853
  var escapeHtml50 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
30797
30854
  var getString16 = (value) => typeof value === "string" && value.trim() ? value : undefined;
30798
30855
  var getNumber9 = (value) => typeof value === "number" && Number.isFinite(value) ? value : undefined;
@@ -31018,7 +31075,7 @@ var createVoiceTraceTimelineRoutes = (options) => {
31018
31075
  const path = options.path ?? "/api/voice-traces";
31019
31076
  const htmlPath = options.htmlPath ?? "/traces";
31020
31077
  const title = options.title ?? "AbsoluteJS Voice Trace Timelines";
31021
- const routes = new Elysia51({
31078
+ const routes = new Elysia52({
31022
31079
  name: options.name ?? "absolutejs-voice-trace-timelines"
31023
31080
  });
31024
31081
  const buildReport = async () => summarizeVoiceTraceTimeline(await options.store.list(), {
@@ -31805,7 +31862,7 @@ var createVoiceOperationsRecordRoutes = (options) => {
31805
31862
  const htmlPath = options.htmlPath === undefined ? "/voice-operations/:sessionId" : options.htmlPath;
31806
31863
  const incidentPath = options.incidentPath === undefined ? `${path}/incident.md` : options.incidentPath;
31807
31864
  const incidentHtmlPath = options.incidentHtmlPath === undefined && htmlPath ? `${htmlPath}/incident.md` : options.incidentHtmlPath;
31808
- const routes = new Elysia52({
31865
+ const routes = new Elysia53({
31809
31866
  name: options.name ?? "absolutejs-voice-operations-record"
31810
31867
  });
31811
31868
  const buildRecord = (sessionId) => buildVoiceOperationsRecord({
@@ -32456,7 +32513,7 @@ var createVoiceObservabilityExportReplayRoutes = (options) => {
32456
32513
  ...options.headers ?? {}
32457
32514
  };
32458
32515
  const buildReport = () => resolveVoiceObservabilityExportReplayReport(options.source);
32459
- const app = new Elysia53({
32516
+ const app = new Elysia54({
32460
32517
  name: options.name ?? "absolute-voice-observability-export-replay"
32461
32518
  });
32462
32519
  app.get(path, async () => Response.json(await buildReport(), { headers }));
@@ -33265,7 +33322,7 @@ var createVoiceObservabilityExportRoutes = (options = {}) => {
33265
33322
  artifactDownload: options.links?.artifactDownload ?? (artifactDownloadPath ? (artifact) => `${artifactDownloadPath}/${encodeURIComponent(artifact.id)}` : undefined)
33266
33323
  }
33267
33324
  });
33268
- const app = new Elysia53({
33325
+ const app = new Elysia54({
33269
33326
  name: options.name ?? "absolute-voice-observability-export"
33270
33327
  });
33271
33328
  app.get(path, async () => Response.json(await buildReport(), { headers }));
@@ -35275,7 +35332,7 @@ var createVoiceProductionReadinessRoutes = (options) => {
35275
35332
  const path = options.path ?? "/api/production-readiness";
35276
35333
  const gatePath = options.gatePath === undefined ? "/api/production-readiness/gate" : options.gatePath;
35277
35334
  const htmlPath = options.htmlPath ?? "/production-readiness";
35278
- const routes = new Elysia54({
35335
+ const routes = new Elysia55({
35279
35336
  name: options.name ?? "absolutejs-voice-production-readiness"
35280
35337
  });
35281
35338
  let cachedReport;
@@ -35346,7 +35403,7 @@ var createVoiceProductionReadinessRoutes = (options) => {
35346
35403
  return routes;
35347
35404
  };
35348
35405
  // src/voiceMonitoring.ts
35349
- import { Elysia as Elysia55 } from "elysia";
35406
+ import { Elysia as Elysia56 } from "elysia";
35350
35407
  var escapeHtml53 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
35351
35408
  var issueIdForRun = (run) => `voice-monitor:${run.id}:${run.impactedSessions?.[0] ?? "global"}`;
35352
35409
  var rollupStatus5 = (runs) => runs.some((run) => run.status === "fail") ? "fail" : runs.some((run) => run.status === "warn") ? "warn" : "pass";
@@ -35631,7 +35688,7 @@ var createVoiceMonitorRoutes = (options) => {
35631
35688
  monitors: options.monitors,
35632
35689
  now: options.now
35633
35690
  });
35634
- const routes = new Elysia55({
35691
+ const routes = new Elysia56({
35635
35692
  name: options.name ?? "absolutejs-voice-monitoring"
35636
35693
  }).get(path, report).get(`${path}.md`, async () => {
35637
35694
  return new Response(renderVoiceMonitorMarkdown(await report()), {
@@ -35678,7 +35735,7 @@ var createVoiceMonitorRoutes = (options) => {
35678
35735
  };
35679
35736
  var createVoiceMonitorRunnerRoutes = (options) => {
35680
35737
  const path = options.path ?? "/api/voice/monitor-runner";
35681
- return new Elysia55({
35738
+ return new Elysia56({
35682
35739
  name: options.name ?? "absolutejs-voice-monitor-runner"
35683
35740
  }).get(path, () => ({
35684
35741
  isRunning: options.runner.isRunning()
@@ -36054,7 +36111,7 @@ var recommendVoiceReadinessProfile = (options) => {
36054
36111
  };
36055
36112
  };
36056
36113
  // src/providerStackRecommendations.ts
36057
- import { Elysia as Elysia56 } from "elysia";
36114
+ import { Elysia as Elysia57 } from "elysia";
36058
36115
  var escapeHtml54 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
36059
36116
  var profileProviderPriorities = {
36060
36117
  "meeting-recorder": {
@@ -36420,7 +36477,7 @@ var createVoiceProviderContractMatrixHTMLHandler = (options) => async () => {
36420
36477
  var createVoiceProviderContractMatrixRoutes = (options) => {
36421
36478
  const path = options.path ?? "/api/provider-contracts";
36422
36479
  const htmlPath = options.htmlPath ?? "/provider-contracts";
36423
- const routes = new Elysia56({
36480
+ const routes = new Elysia57({
36424
36481
  name: options.name ?? "absolutejs-voice-provider-contract-matrix"
36425
36482
  });
36426
36483
  const jsonHandler = createVoiceProviderContractMatrixJSONHandler(options.matrix);
@@ -36538,7 +36595,7 @@ var assertVoiceProviderStackEvidence = (report, input = {}) => {
36538
36595
  return assertion;
36539
36596
  };
36540
36597
  // src/opsConsoleRoutes.ts
36541
- import { Elysia as Elysia57 } from "elysia";
36598
+ import { Elysia as Elysia58 } from "elysia";
36542
36599
  var DEFAULT_LINKS = [
36543
36600
  {
36544
36601
  description: "Quality gates for CI, deploy checks, and production readiness.",
@@ -36655,7 +36712,7 @@ var renderVoiceOpsConsoleHTML = (report, options = {}) => {
36655
36712
  };
36656
36713
  var createVoiceOpsConsoleRoutes = (options) => {
36657
36714
  const path = options.path ?? "/ops-console";
36658
- const routes = new Elysia57({
36715
+ const routes = new Elysia58({
36659
36716
  name: options.name ?? "absolutejs-voice-ops-console"
36660
36717
  });
36661
36718
  const getReport = () => buildVoiceOpsConsoleReport(options);
@@ -36672,7 +36729,7 @@ var createVoiceOpsConsoleRoutes = (options) => {
36672
36729
  return routes;
36673
36730
  };
36674
36731
  // src/incidentBundle.ts
36675
- import { Elysia as Elysia58 } from "elysia";
36732
+ import { Elysia as Elysia59 } from "elysia";
36676
36733
  var filterIncidentBundleArtifacts = (artifacts, filter = {}) => artifacts.filter((artifact) => {
36677
36734
  if (filter.sessionId && artifact.sessionId !== filter.sessionId) {
36678
36735
  return false;
@@ -36873,7 +36930,7 @@ var buildVoiceIncidentBundle = async (options) => {
36873
36930
  var createVoiceIncidentBundleRoutes = (options) => {
36874
36931
  const path = options.path ?? "/api/voice-incidents/:sessionId";
36875
36932
  const markdownPath = options.markdownPath === undefined ? "/voice-incidents/:sessionId/markdown" : options.markdownPath;
36876
- const routes = new Elysia58({
36933
+ const routes = new Elysia59({
36877
36934
  name: options.name ?? "absolutejs-voice-incident-bundle"
36878
36935
  });
36879
36936
  const getSessionId = (params) => params.sessionId ?? "";
@@ -37074,7 +37131,7 @@ var summarizeVoiceOpsStatus = async (options) => {
37074
37131
  };
37075
37132
  };
37076
37133
  // src/opsStatusRoutes.ts
37077
- import { Elysia as Elysia59 } from "elysia";
37134
+ import { Elysia as Elysia60 } from "elysia";
37078
37135
  var escapeHtml56 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
37079
37136
  var renderVoiceOpsStatusHTML = (report, options = {}) => {
37080
37137
  const title = options.title ?? "AbsoluteJS Voice Ops Status";
@@ -37086,7 +37143,7 @@ var renderVoiceOpsStatusHTML = (report, options = {}) => {
37086
37143
  };
37087
37144
  var createVoiceOpsStatusRoutes = (options) => {
37088
37145
  const path = options.path ?? "/api/voice/ops-status";
37089
- const routes = new Elysia59({
37146
+ const routes = new Elysia60({
37090
37147
  name: options.name ?? "absolutejs-voice-ops-status"
37091
37148
  });
37092
37149
  routes.get(path, async () => summarizeVoiceOpsStatus(options));
@@ -37519,7 +37576,7 @@ var createVoiceTTSProviderRouter = (options) => {
37519
37576
  };
37520
37577
  };
37521
37578
  // src/traceDeliveryRoutes.ts
37522
- import { Elysia as Elysia60 } from "elysia";
37579
+ import { Elysia as Elysia61 } from "elysia";
37523
37580
  var escapeHtml57 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
37524
37581
  var getString20 = (value) => typeof value === "string" && value.trim() ? value.trim() : undefined;
37525
37582
  var getNumber12 = (value) => {
@@ -37628,7 +37685,7 @@ var createVoiceTraceDeliveryRoutes = (options) => {
37628
37685
  const path = options.path ?? "/api/voice-trace-deliveries";
37629
37686
  const htmlPath = options.htmlPath === undefined ? "/traces/deliveries" : options.htmlPath;
37630
37687
  const workerPath = options.workerPath === undefined ? `${path}/drain` : options.workerPath;
37631
- const routes = new Elysia60({
37688
+ const routes = new Elysia61({
37632
37689
  name: options.name ?? "absolutejs-voice-trace-deliveries"
37633
37690
  }).get(path, createVoiceTraceDeliveryJSONHandler(options));
37634
37691
  if (htmlPath !== false) {
@@ -37725,7 +37782,7 @@ var createVoiceMemoryStore = () => {
37725
37782
  return { get, getOrCreate, list, remove, set };
37726
37783
  };
37727
37784
  // src/opsWebhook.ts
37728
- import { Elysia as Elysia61 } from "elysia";
37785
+ import { Elysia as Elysia62 } from "elysia";
37729
37786
  var toHex6 = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
37730
37787
  var signVoiceOpsWebhookBody = async (input) => {
37731
37788
  const encoder2 = new TextEncoder;
@@ -37855,7 +37912,7 @@ var verifyVoiceOpsWebhookSignature = async (input) => {
37855
37912
  };
37856
37913
  var createVoiceOpsWebhookReceiverRoutes = (options = {}) => {
37857
37914
  const path = options.path ?? "/api/voice-ops/webhook";
37858
- return new Elysia61().post(path, async ({ body, request, set }) => {
37915
+ return new Elysia62().post(path, async ({ body, request, set }) => {
37859
37916
  const bodyText = typeof body === "string" ? body : JSON.stringify(body);
37860
37917
  if (options.signingSecret) {
37861
37918
  const verification = await verifyVoiceOpsWebhookSignature({
@@ -38310,7 +38367,7 @@ var resolveVoiceOpsPreset = (name, overrides = {}) => {
38310
38367
  };
38311
38368
  };
38312
38369
  // src/postCallAnalysis.ts
38313
- import { Elysia as Elysia62 } from "elysia";
38370
+ import { Elysia as Elysia63 } from "elysia";
38314
38371
  var isStore = (value) => Boolean(value) && typeof value === "object" && value !== null && ("list" in value);
38315
38372
  var asArray = async (value) => Array.isArray(value) ? value : isStore(value) ? await value.list() : [];
38316
38373
  var getPathValue3 = (source, path) => {
@@ -38489,7 +38546,7 @@ var resolvePostCallAnalysisReport = async (options, input) => {
38489
38546
  };
38490
38547
  var createVoicePostCallAnalysisRoutes = (options = {}) => {
38491
38548
  const path = options.path ?? "/api/voice/post-call-analysis";
38492
- const routes = new Elysia62({
38549
+ const routes = new Elysia63({
38493
38550
  name: options.name ?? "absolutejs-voice-post-call-analysis"
38494
38551
  });
38495
38552
  routes.get(path, async ({ query }) => {
@@ -38514,7 +38571,7 @@ var createVoicePostCallAnalysisRoutes = (options = {}) => {
38514
38571
  return routes;
38515
38572
  };
38516
38573
  // src/guardrails.ts
38517
- import { Elysia as Elysia63 } from "elysia";
38574
+ import { Elysia as Elysia64 } from "elysia";
38518
38575
  var stringifyContent = (value) => typeof value === "string" ? value : JSON.stringify(value) ?? "";
38519
38576
  var appliesToStage = (rule, stage) => !rule.stages || rule.stages.length === 0 || rule.stages.includes(stage);
38520
38577
  var matchesRule = async (rule, input) => {
@@ -38816,7 +38873,7 @@ var resolveGuardrailReport = async (options, input) => {
38816
38873
  };
38817
38874
  var createVoiceGuardrailRoutes = (options = {}) => {
38818
38875
  const path = options.path ?? "/api/voice/guardrails";
38819
- const routes = new Elysia63({
38876
+ const routes = new Elysia64({
38820
38877
  name: options.name ?? "absolutejs-voice-guardrails"
38821
38878
  });
38822
38879
  routes.all(path, async ({ request }) => {
@@ -39934,6 +39991,7 @@ export {
39934
39991
  createVoiceSimulationSuiteRoutes,
39935
39992
  createVoiceSessionsJSONHandler,
39936
39993
  createVoiceSessionsHTMLHandler,
39994
+ createVoiceSessionSnapshotRoutes,
39937
39995
  createVoiceSessionReplayRoutes,
39938
39996
  createVoiceSessionReplayJSONHandler,
39939
39997
  createVoiceSessionReplayHTMLHandler,
@@ -1,3 +1,4 @@
1
+ import { Elysia } from 'elysia';
1
2
  import type { MediaProcessorGraphSnapshot } from '@absolutejs/media';
2
3
  import type { VoiceProofAssertionResult, VoiceProofAssertionSummary } from './proofAssertions';
3
4
  import type { VoiceCampaignTelephonyOutcomeSnapshot } from './campaign';
@@ -34,6 +35,19 @@ export type VoiceSessionSnapshotInput = {
34
35
  telephonyOutcomes?: readonly VoiceCampaignTelephonyOutcomeSnapshot[];
35
36
  turnId?: string;
36
37
  };
38
+ export type VoiceSessionSnapshotRouteSourceInput = {
39
+ request: Request;
40
+ sessionId: string;
41
+ turnId?: string;
42
+ };
43
+ export type VoiceSessionSnapshotRouteSource = VoiceSessionSnapshot | VoiceSessionSnapshotInput | ((input: VoiceSessionSnapshotRouteSourceInput) => Promise<VoiceSessionSnapshot | VoiceSessionSnapshotInput> | VoiceSessionSnapshot | VoiceSessionSnapshotInput);
44
+ export type VoiceSessionSnapshotRoutesOptions = Partial<VoiceSessionSnapshotInput> & {
45
+ downloadPath?: false | string;
46
+ headers?: HeadersInit;
47
+ name?: string;
48
+ path?: string;
49
+ source?: VoiceSessionSnapshotRouteSource;
50
+ };
37
51
  export declare const buildVoiceSessionSnapshotStatus: (input: {
38
52
  media?: readonly Pick<MediaProcessorGraphSnapshot, "report">[];
39
53
  proofSummary?: Pick<VoiceProofAssertionSummary, "ok">;
@@ -42,3 +56,43 @@ export declare const buildVoiceSessionSnapshotStatus: (input: {
42
56
  }) => VoiceSessionSnapshotStatus;
43
57
  export declare const buildVoiceSessionSnapshot: (input: VoiceSessionSnapshotInput) => VoiceSessionSnapshot;
44
58
  export declare const parseVoiceSessionSnapshot: (snapshot: VoiceSessionSnapshot) => VoiceSessionSnapshot;
59
+ export declare const createVoiceSessionSnapshotRoutes: (options?: VoiceSessionSnapshotRoutesOptions) => Elysia<"", {
60
+ decorator: {};
61
+ store: {};
62
+ derive: {};
63
+ resolve: {};
64
+ }, {
65
+ typebox: {};
66
+ error: {};
67
+ }, {
68
+ schema: {};
69
+ standaloneSchema: {};
70
+ macro: {};
71
+ macroFn: {};
72
+ parser: {};
73
+ response: {};
74
+ }, {
75
+ [x: string]: {
76
+ get: {
77
+ body: unknown;
78
+ params: {};
79
+ query: unknown;
80
+ headers: unknown;
81
+ response: {
82
+ 200: Response;
83
+ };
84
+ };
85
+ };
86
+ }, {
87
+ derive: {};
88
+ resolve: {};
89
+ schema: {};
90
+ standaloneSchema: {};
91
+ response: {};
92
+ }, {
93
+ derive: {};
94
+ resolve: {};
95
+ schema: {};
96
+ standaloneSchema: {};
97
+ response: {};
98
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.397",
3
+ "version": "0.0.22-beta.398",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",