@absolutejs/voice 0.0.22-beta.373 → 0.0.22-beta.375
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/angular/index.js +1 -0
- package/dist/client/index.js +58 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +59 -0
- package/dist/proofTrends.d.ts +9 -0
- package/dist/react/index.js +58 -0
- package/dist/svelte/index.js +1 -0
- package/dist/testing/index.js +1 -0
- package/dist/vue/index.js +58 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1537,6 +1537,14 @@ app.use(
|
|
|
1537
1537
|
);
|
|
1538
1538
|
```
|
|
1539
1539
|
|
|
1540
|
+
Use the SQLite job store when recovery jobs should survive restarts:
|
|
1541
|
+
|
|
1542
|
+
```ts
|
|
1543
|
+
const recoveryJobs = createVoiceSQLiteRealCallProfileRecoveryJobStore({
|
|
1544
|
+
path: '.voice-runtime/real-call-recovery/jobs.sqlite'
|
|
1545
|
+
});
|
|
1546
|
+
```
|
|
1547
|
+
|
|
1540
1548
|
Use `createVoiceProfileTraceTagger(...)` when the app already has a trace store and needs every appended trace to carry a benchmark profile label. It wraps any `VoiceTraceEventStore`, preserves the underlying store behavior, and adds `profileId`/`benchmarkProfileId` metadata and payload fields that real-call profile history can ingest later.
|
|
1541
1549
|
|
|
1542
1550
|
```ts
|
package/dist/angular/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/angular/voice-ops-status.service.ts
|
|
73
74
|
import { computed, Injectable, signal } from "@angular/core";
|
package/dist/client/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/client/connection.ts
|
|
73
74
|
var WS_OPEN = 1;
|
|
@@ -4663,6 +4664,63 @@ var createVoiceInMemoryRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
|
4663
4664
|
}
|
|
4664
4665
|
};
|
|
4665
4666
|
};
|
|
4667
|
+
var normalizeRealCallRecoveryJobTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_recovery_jobs";
|
|
4668
|
+
var createVoiceSQLiteRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
4669
|
+
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
4670
|
+
const database = options.database ?? new SQLiteDatabase(options.path ?? ":memory:", {
|
|
4671
|
+
create: true
|
|
4672
|
+
});
|
|
4673
|
+
const tableName = normalizeRealCallRecoveryJobTableName(options.tableName ?? "voice_real_call_profile_recovery_jobs");
|
|
4674
|
+
const now = () => (options.now ?? (() => new Date))().toISOString();
|
|
4675
|
+
const createId = () => `${options.idPrefix ?? "voice-recovery-job"}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
4676
|
+
database.exec("PRAGMA journal_mode = WAL;");
|
|
4677
|
+
database.exec("PRAGMA synchronous = NORMAL;");
|
|
4678
|
+
database.exec("PRAGMA busy_timeout = 5000;");
|
|
4679
|
+
database.exec(`CREATE TABLE IF NOT EXISTS "${tableName}" (
|
|
4680
|
+
id TEXT PRIMARY KEY,
|
|
4681
|
+
sort_at INTEGER NOT NULL,
|
|
4682
|
+
payload TEXT NOT NULL
|
|
4683
|
+
)`);
|
|
4684
|
+
const selectStatement = database.query(`SELECT payload FROM "${tableName}" WHERE id = ?1 LIMIT 1`);
|
|
4685
|
+
const upsertStatement = database.query(`INSERT INTO "${tableName}" (id, sort_at, payload)
|
|
4686
|
+
VALUES (?1, ?2, ?3)
|
|
4687
|
+
ON CONFLICT(id) DO UPDATE SET sort_at = excluded.sort_at, payload = excluded.payload`);
|
|
4688
|
+
const writeJob = (job) => {
|
|
4689
|
+
upsertStatement.run(job.id, Date.parse(job.updatedAt) || Date.now(), JSON.stringify(job));
|
|
4690
|
+
return job;
|
|
4691
|
+
};
|
|
4692
|
+
const readJob = (id) => {
|
|
4693
|
+
const row = selectStatement.get(id);
|
|
4694
|
+
return row ? JSON.parse(row.payload) : undefined;
|
|
4695
|
+
};
|
|
4696
|
+
return {
|
|
4697
|
+
create(input) {
|
|
4698
|
+
const createdAt = input.createdAt ?? now();
|
|
4699
|
+
return writeJob({
|
|
4700
|
+
actionId: input.actionId,
|
|
4701
|
+
createdAt,
|
|
4702
|
+
id: input.id ?? createId(),
|
|
4703
|
+
message: input.message,
|
|
4704
|
+
status: input.status ?? "queued",
|
|
4705
|
+
updatedAt: createdAt
|
|
4706
|
+
});
|
|
4707
|
+
},
|
|
4708
|
+
get(id) {
|
|
4709
|
+
return readJob(id);
|
|
4710
|
+
},
|
|
4711
|
+
update(id, update) {
|
|
4712
|
+
const existing = readJob(id);
|
|
4713
|
+
if (!existing) {
|
|
4714
|
+
return;
|
|
4715
|
+
}
|
|
4716
|
+
return writeJob({
|
|
4717
|
+
...existing,
|
|
4718
|
+
...update,
|
|
4719
|
+
updatedAt: update.updatedAt ?? now()
|
|
4720
|
+
});
|
|
4721
|
+
}
|
|
4722
|
+
};
|
|
4723
|
+
};
|
|
4666
4724
|
var buildVoiceRealCallProfileReadinessCheck = (report, options = {}) => {
|
|
4667
4725
|
const { issues, warnings } = buildRealCallProfileReadinessIssues(report, options);
|
|
4668
4726
|
const status = issues.length > 0 ? "fail" : warnings.length > 0 && options.failOnWarnings === true ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
package/dist/index.d.ts
CHANGED
|
@@ -30,12 +30,12 @@ export { assertVoicePlatformCoverage, buildVoicePlatformCoverageSummary, createV
|
|
|
30
30
|
export { assertVoiceCompetitiveCoverage, buildVoiceCompetitiveCoverageReport, createVoiceCompetitiveCoverageRoutes, evaluateVoiceCompetitiveCoverage, renderVoiceCompetitiveCoverageHTML, renderVoiceCompetitiveCoverageMarkdown } from './competitiveCoverage';
|
|
31
31
|
export type { VoiceCompetitiveCoverageAssertionInput, VoiceCompetitiveCoverageAssertionReport, VoiceCompetitiveCoverageIssue, VoiceCompetitiveCoverageLevel, VoiceCompetitiveCoverageReport, VoiceCompetitiveCoverageReportInput, VoiceCompetitiveCoverageRoutesOptions, VoiceCompetitiveCoverageStatus, VoiceCompetitiveCoverageSummary, VoiceCompetitiveDepthLevel, VoiceCompetitiveEvidence, VoiceCompetitiveSurface } from './competitiveCoverage';
|
|
32
32
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
|
|
33
|
-
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, 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, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
|
|
33
|
+
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, 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, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
|
|
34
34
|
export { applyVoiceProfileSwitchGuard, buildVoiceProfileSwitchReadinessReport, buildVoiceProfileSwitchLiveDecisionReport, createVoiceProfileSwitchLiveDecisionRoutes, createVoiceProfileSwitchPolicyProofRoutes, createVoiceProfileSwitchReadinessRoutes, recommendVoiceProfileSwitch, renderVoiceProfileSwitchLiveDecisionHTML, renderVoiceProfileSwitchPolicyProofHTML, renderVoiceProfileSwitchReadinessHTML, runVoiceProfileSwitchPolicyProof } from './profileSwitchRecommendation';
|
|
35
35
|
export type { VoiceProfileSwitchGuardAction, VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchGuardOptions, VoiceProfileSwitchObservedSignals, VoiceProfileSwitchLiveDecisionEvidence, VoiceProfileSwitchLiveDecisionReport, VoiceProfileSwitchLiveDecisionReportOptions, VoiceProfileSwitchLiveDecisionRoutesOptions, VoiceProfileSwitchLiveDecisionSession, VoiceProfileSwitchPolicyProofCase, VoiceProfileSwitchPolicyProofCaseResult, VoiceProfileSwitchPolicyProofOptions, VoiceProfileSwitchPolicyProofReport, VoiceProfileSwitchPolicyProofRoutesOptions, VoiceProfileSwitchReadinessIssue, VoiceProfileSwitchReadinessOptions, VoiceProfileSwitchReadinessReport, VoiceProfileSwitchReadinessRoutesOptions, VoiceProfileSwitchReadinessStatus, VoiceProfileSwitchRecommendation, VoiceProfileSwitchRecommendationOptions } from './profileSwitchRecommendation';
|
|
36
36
|
export { buildVoiceProviderDecisionTraceReport, createVoiceProviderDecisionTraceEvent, createVoiceProviderDecisionTraceRoutes, listVoiceProviderDecisionTraces, renderVoiceProviderDecisionTraceHTML, renderVoiceProviderDecisionTraceMarkdown } from './providerDecisionTraces';
|
|
37
37
|
export type { VoiceProviderDecisionStatus, VoiceProviderDecisionSurfaceReport, VoiceProviderDecisionTrace, VoiceProviderDecisionTraceInput, VoiceProviderDecisionTraceIssue, VoiceProviderDecisionTraceReport, VoiceProviderDecisionTraceReportOptions, VoiceProviderDecisionTraceRoutesOptions } from './providerDecisionTraces';
|
|
38
|
-
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions } from './proofTrends';
|
|
38
|
+
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions } from './proofTrends';
|
|
39
39
|
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, buildVoiceSloReadinessThresholdReport, createVoiceSloReadinessThresholdOptions, createVoiceSloReadinessThresholdRoutes, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown, renderVoiceSloReadinessThresholdHTML, renderVoiceSloReadinessThresholdMarkdown } from './sloCalibration';
|
|
40
40
|
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloReadinessThresholdReport, VoiceSloReadinessThresholdReportOptions, VoiceSloReadinessThresholdOptions, VoiceSloReadinessThresholdRoutesOptions, VoiceSloThresholdProfile } from './sloCalibration';
|
|
41
41
|
export { assertVoiceLiveOpsControlEvidence, assertVoiceLiveOpsEvidence, buildVoiceLiveOpsControlState, createVoiceLiveOpsController, createVoiceLiveOpsRoutes, createVoiceMemoryLiveOpsControlStore, evaluateVoiceLiveOpsControlEvidence, evaluateVoiceLiveOpsEvidence, getVoiceLiveOpsControlStatus, VOICE_LIVE_OPS_ACTIONS } from './liveOps';
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/audioConditioning.ts
|
|
73
74
|
var DEFAULT_TARGET_LEVEL = 0.08;
|
|
@@ -16132,6 +16133,63 @@ var createVoiceInMemoryRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
|
16132
16133
|
}
|
|
16133
16134
|
};
|
|
16134
16135
|
};
|
|
16136
|
+
var normalizeRealCallRecoveryJobTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_recovery_jobs";
|
|
16137
|
+
var createVoiceSQLiteRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
16138
|
+
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
16139
|
+
const database = options.database ?? new SQLiteDatabase(options.path ?? ":memory:", {
|
|
16140
|
+
create: true
|
|
16141
|
+
});
|
|
16142
|
+
const tableName = normalizeRealCallRecoveryJobTableName(options.tableName ?? "voice_real_call_profile_recovery_jobs");
|
|
16143
|
+
const now = () => (options.now ?? (() => new Date))().toISOString();
|
|
16144
|
+
const createId3 = () => `${options.idPrefix ?? "voice-recovery-job"}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
16145
|
+
database.exec("PRAGMA journal_mode = WAL;");
|
|
16146
|
+
database.exec("PRAGMA synchronous = NORMAL;");
|
|
16147
|
+
database.exec("PRAGMA busy_timeout = 5000;");
|
|
16148
|
+
database.exec(`CREATE TABLE IF NOT EXISTS "${tableName}" (
|
|
16149
|
+
id TEXT PRIMARY KEY,
|
|
16150
|
+
sort_at INTEGER NOT NULL,
|
|
16151
|
+
payload TEXT NOT NULL
|
|
16152
|
+
)`);
|
|
16153
|
+
const selectStatement = database.query(`SELECT payload FROM "${tableName}" WHERE id = ?1 LIMIT 1`);
|
|
16154
|
+
const upsertStatement = database.query(`INSERT INTO "${tableName}" (id, sort_at, payload)
|
|
16155
|
+
VALUES (?1, ?2, ?3)
|
|
16156
|
+
ON CONFLICT(id) DO UPDATE SET sort_at = excluded.sort_at, payload = excluded.payload`);
|
|
16157
|
+
const writeJob = (job) => {
|
|
16158
|
+
upsertStatement.run(job.id, Date.parse(job.updatedAt) || Date.now(), JSON.stringify(job));
|
|
16159
|
+
return job;
|
|
16160
|
+
};
|
|
16161
|
+
const readJob = (id) => {
|
|
16162
|
+
const row = selectStatement.get(id);
|
|
16163
|
+
return row ? JSON.parse(row.payload) : undefined;
|
|
16164
|
+
};
|
|
16165
|
+
return {
|
|
16166
|
+
create(input) {
|
|
16167
|
+
const createdAt = input.createdAt ?? now();
|
|
16168
|
+
return writeJob({
|
|
16169
|
+
actionId: input.actionId,
|
|
16170
|
+
createdAt,
|
|
16171
|
+
id: input.id ?? createId3(),
|
|
16172
|
+
message: input.message,
|
|
16173
|
+
status: input.status ?? "queued",
|
|
16174
|
+
updatedAt: createdAt
|
|
16175
|
+
});
|
|
16176
|
+
},
|
|
16177
|
+
get(id) {
|
|
16178
|
+
return readJob(id);
|
|
16179
|
+
},
|
|
16180
|
+
update(id, update) {
|
|
16181
|
+
const existing = readJob(id);
|
|
16182
|
+
if (!existing) {
|
|
16183
|
+
return;
|
|
16184
|
+
}
|
|
16185
|
+
return writeJob({
|
|
16186
|
+
...existing,
|
|
16187
|
+
...update,
|
|
16188
|
+
updatedAt: update.updatedAt ?? now()
|
|
16189
|
+
});
|
|
16190
|
+
}
|
|
16191
|
+
};
|
|
16192
|
+
};
|
|
16135
16193
|
var buildVoiceRealCallProfileReadinessCheck = (report, options = {}) => {
|
|
16136
16194
|
const { issues, warnings } = buildRealCallProfileReadinessIssues(report, options);
|
|
16137
16195
|
const status = issues.length > 0 ? "fail" : warnings.length > 0 && options.failOnWarnings === true ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
|
@@ -38938,6 +38996,7 @@ export {
|
|
|
38938
38996
|
createVoiceSQLiteSessionStore,
|
|
38939
38997
|
createVoiceSQLiteRuntimeStorage,
|
|
38940
38998
|
createVoiceSQLiteReviewStore,
|
|
38999
|
+
createVoiceSQLiteRealCallProfileRecoveryJobStore,
|
|
38941
39000
|
createVoiceSQLitePlivoWebhookNonceStore,
|
|
38942
39001
|
createVoiceSQLiteIntegrationEventStore,
|
|
38943
39002
|
createVoiceSQLiteExternalObjectMapStore,
|
package/dist/proofTrends.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
+
import type { Database } from 'bun:sqlite';
|
|
2
3
|
import type { VoiceProductionReadinessAction, VoiceProductionReadinessCheck } from './productionReadiness';
|
|
3
4
|
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
4
5
|
export type VoiceProofTrendStatus = 'empty' | 'fail' | 'pass' | 'stale';
|
|
@@ -418,6 +419,13 @@ export type VoiceRealCallProfileRecoveryJobStore = {
|
|
|
418
419
|
get(id: string): Promise<VoiceRealCallProfileRecoveryJob | undefined> | VoiceRealCallProfileRecoveryJob | undefined;
|
|
419
420
|
update(id: string, update: VoiceRealCallProfileRecoveryJobUpdate): Promise<VoiceRealCallProfileRecoveryJob | undefined> | VoiceRealCallProfileRecoveryJob | undefined;
|
|
420
421
|
};
|
|
422
|
+
export type VoiceSQLiteRealCallProfileRecoveryJobStoreOptions = {
|
|
423
|
+
database?: Database;
|
|
424
|
+
idPrefix?: string;
|
|
425
|
+
now?: () => Date;
|
|
426
|
+
path?: string;
|
|
427
|
+
tableName?: string;
|
|
428
|
+
};
|
|
421
429
|
export type VoiceRealCallProfileRecoveryActionHandler = (input: VoiceRealCallProfileRecoveryActionHandlerInput) => Promise<Partial<VoiceRealCallProfileRecoveryActionResult> | void> | Partial<VoiceRealCallProfileRecoveryActionResult> | void;
|
|
422
430
|
export type VoiceRealCallProfileRecoveryActionRoutesOptions = VoiceRealCallProfileRecoveryActionOptions & Omit<VoiceRealCallProfileHistoryRoutesOptions, 'htmlPath' | 'markdownPath'> & {
|
|
423
431
|
asyncActionIds?: readonly VoiceRealCallProfileRecoveryActionId[];
|
|
@@ -462,6 +470,7 @@ export declare const createVoiceInMemoryRealCallProfileRecoveryJobStore: (option
|
|
|
462
470
|
idPrefix?: string;
|
|
463
471
|
now?: () => Date;
|
|
464
472
|
}) => VoiceRealCallProfileRecoveryJobStore;
|
|
473
|
+
export declare const createVoiceSQLiteRealCallProfileRecoveryJobStore: (options?: VoiceSQLiteRealCallProfileRecoveryJobStoreOptions) => VoiceRealCallProfileRecoveryJobStore;
|
|
465
474
|
export declare const buildVoiceRealCallProfileReadinessCheck: (report: VoiceRealCallProfileHistoryReport, options?: VoiceRealCallProfileReadinessCheckOptions) => VoiceProductionReadinessCheck;
|
|
466
475
|
export declare const resolveVoiceRealCallProfileProviderRoute: <TProvider extends string = string>(options: VoiceRealCallProfileProviderRouteOptions<TProvider>) => TProvider | undefined;
|
|
467
476
|
export declare const buildVoiceRealCallProfileHistoryReport: (options?: VoiceRealCallProfileHistoryOptions) => VoiceRealCallProfileHistoryReport;
|
package/dist/react/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/react/useVoiceOpsStatus.tsx
|
|
73
74
|
import { useEffect, useRef, useSyncExternalStore } from "react";
|
|
@@ -2250,6 +2251,63 @@ var createVoiceInMemoryRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
|
2250
2251
|
}
|
|
2251
2252
|
};
|
|
2252
2253
|
};
|
|
2254
|
+
var normalizeRealCallRecoveryJobTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_recovery_jobs";
|
|
2255
|
+
var createVoiceSQLiteRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
2256
|
+
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
2257
|
+
const database = options.database ?? new SQLiteDatabase(options.path ?? ":memory:", {
|
|
2258
|
+
create: true
|
|
2259
|
+
});
|
|
2260
|
+
const tableName = normalizeRealCallRecoveryJobTableName(options.tableName ?? "voice_real_call_profile_recovery_jobs");
|
|
2261
|
+
const now = () => (options.now ?? (() => new Date))().toISOString();
|
|
2262
|
+
const createId = () => `${options.idPrefix ?? "voice-recovery-job"}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2263
|
+
database.exec("PRAGMA journal_mode = WAL;");
|
|
2264
|
+
database.exec("PRAGMA synchronous = NORMAL;");
|
|
2265
|
+
database.exec("PRAGMA busy_timeout = 5000;");
|
|
2266
|
+
database.exec(`CREATE TABLE IF NOT EXISTS "${tableName}" (
|
|
2267
|
+
id TEXT PRIMARY KEY,
|
|
2268
|
+
sort_at INTEGER NOT NULL,
|
|
2269
|
+
payload TEXT NOT NULL
|
|
2270
|
+
)`);
|
|
2271
|
+
const selectStatement = database.query(`SELECT payload FROM "${tableName}" WHERE id = ?1 LIMIT 1`);
|
|
2272
|
+
const upsertStatement = database.query(`INSERT INTO "${tableName}" (id, sort_at, payload)
|
|
2273
|
+
VALUES (?1, ?2, ?3)
|
|
2274
|
+
ON CONFLICT(id) DO UPDATE SET sort_at = excluded.sort_at, payload = excluded.payload`);
|
|
2275
|
+
const writeJob = (job) => {
|
|
2276
|
+
upsertStatement.run(job.id, Date.parse(job.updatedAt) || Date.now(), JSON.stringify(job));
|
|
2277
|
+
return job;
|
|
2278
|
+
};
|
|
2279
|
+
const readJob = (id) => {
|
|
2280
|
+
const row = selectStatement.get(id);
|
|
2281
|
+
return row ? JSON.parse(row.payload) : undefined;
|
|
2282
|
+
};
|
|
2283
|
+
return {
|
|
2284
|
+
create(input) {
|
|
2285
|
+
const createdAt = input.createdAt ?? now();
|
|
2286
|
+
return writeJob({
|
|
2287
|
+
actionId: input.actionId,
|
|
2288
|
+
createdAt,
|
|
2289
|
+
id: input.id ?? createId(),
|
|
2290
|
+
message: input.message,
|
|
2291
|
+
status: input.status ?? "queued",
|
|
2292
|
+
updatedAt: createdAt
|
|
2293
|
+
});
|
|
2294
|
+
},
|
|
2295
|
+
get(id) {
|
|
2296
|
+
return readJob(id);
|
|
2297
|
+
},
|
|
2298
|
+
update(id, update) {
|
|
2299
|
+
const existing = readJob(id);
|
|
2300
|
+
if (!existing) {
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
return writeJob({
|
|
2304
|
+
...existing,
|
|
2305
|
+
...update,
|
|
2306
|
+
updatedAt: update.updatedAt ?? now()
|
|
2307
|
+
});
|
|
2308
|
+
}
|
|
2309
|
+
};
|
|
2310
|
+
};
|
|
2253
2311
|
var buildVoiceRealCallProfileReadinessCheck = (report, options = {}) => {
|
|
2254
2312
|
const { issues, warnings } = buildRealCallProfileReadinessIssues(report, options);
|
|
2255
2313
|
const status = issues.length > 0 ? "fail" : warnings.length > 0 && options.failOnWarnings === true ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
package/dist/svelte/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/client/campaignDialerProof.ts
|
|
73
74
|
var fetchVoiceCampaignDialerProofStatus = async (path = "/api/voice/campaigns/dialer-proof", options = {}) => {
|
package/dist/testing/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/turnDetection.ts
|
|
73
74
|
var DEFAULT_SILENCE_MS = 700;
|
package/dist/vue/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var __decorateElement = (array, flags, name, decorators, target, extra) => {
|
|
|
68
68
|
}
|
|
69
69
|
return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
|
|
70
70
|
};
|
|
71
|
+
var __require = import.meta.require;
|
|
71
72
|
|
|
72
73
|
// src/vue/VoiceOpsStatus.ts
|
|
73
74
|
import { defineComponent, h } from "vue";
|
|
@@ -2171,6 +2172,63 @@ var createVoiceInMemoryRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
|
2171
2172
|
}
|
|
2172
2173
|
};
|
|
2173
2174
|
};
|
|
2175
|
+
var normalizeRealCallRecoveryJobTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_recovery_jobs";
|
|
2176
|
+
var createVoiceSQLiteRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
2177
|
+
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
2178
|
+
const database = options.database ?? new SQLiteDatabase(options.path ?? ":memory:", {
|
|
2179
|
+
create: true
|
|
2180
|
+
});
|
|
2181
|
+
const tableName = normalizeRealCallRecoveryJobTableName(options.tableName ?? "voice_real_call_profile_recovery_jobs");
|
|
2182
|
+
const now = () => (options.now ?? (() => new Date))().toISOString();
|
|
2183
|
+
const createId = () => `${options.idPrefix ?? "voice-recovery-job"}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2184
|
+
database.exec("PRAGMA journal_mode = WAL;");
|
|
2185
|
+
database.exec("PRAGMA synchronous = NORMAL;");
|
|
2186
|
+
database.exec("PRAGMA busy_timeout = 5000;");
|
|
2187
|
+
database.exec(`CREATE TABLE IF NOT EXISTS "${tableName}" (
|
|
2188
|
+
id TEXT PRIMARY KEY,
|
|
2189
|
+
sort_at INTEGER NOT NULL,
|
|
2190
|
+
payload TEXT NOT NULL
|
|
2191
|
+
)`);
|
|
2192
|
+
const selectStatement = database.query(`SELECT payload FROM "${tableName}" WHERE id = ?1 LIMIT 1`);
|
|
2193
|
+
const upsertStatement = database.query(`INSERT INTO "${tableName}" (id, sort_at, payload)
|
|
2194
|
+
VALUES (?1, ?2, ?3)
|
|
2195
|
+
ON CONFLICT(id) DO UPDATE SET sort_at = excluded.sort_at, payload = excluded.payload`);
|
|
2196
|
+
const writeJob = (job) => {
|
|
2197
|
+
upsertStatement.run(job.id, Date.parse(job.updatedAt) || Date.now(), JSON.stringify(job));
|
|
2198
|
+
return job;
|
|
2199
|
+
};
|
|
2200
|
+
const readJob = (id) => {
|
|
2201
|
+
const row = selectStatement.get(id);
|
|
2202
|
+
return row ? JSON.parse(row.payload) : undefined;
|
|
2203
|
+
};
|
|
2204
|
+
return {
|
|
2205
|
+
create(input) {
|
|
2206
|
+
const createdAt = input.createdAt ?? now();
|
|
2207
|
+
return writeJob({
|
|
2208
|
+
actionId: input.actionId,
|
|
2209
|
+
createdAt,
|
|
2210
|
+
id: input.id ?? createId(),
|
|
2211
|
+
message: input.message,
|
|
2212
|
+
status: input.status ?? "queued",
|
|
2213
|
+
updatedAt: createdAt
|
|
2214
|
+
});
|
|
2215
|
+
},
|
|
2216
|
+
get(id) {
|
|
2217
|
+
return readJob(id);
|
|
2218
|
+
},
|
|
2219
|
+
update(id, update) {
|
|
2220
|
+
const existing = readJob(id);
|
|
2221
|
+
if (!existing) {
|
|
2222
|
+
return;
|
|
2223
|
+
}
|
|
2224
|
+
return writeJob({
|
|
2225
|
+
...existing,
|
|
2226
|
+
...update,
|
|
2227
|
+
updatedAt: update.updatedAt ?? now()
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
};
|
|
2174
2232
|
var buildVoiceRealCallProfileReadinessCheck = (report, options = {}) => {
|
|
2175
2233
|
const { issues, warnings } = buildRealCallProfileReadinessIssues(report, options);
|
|
2176
2234
|
const status = issues.length > 0 ? "fail" : warnings.length > 0 && options.failOnWarnings === true ? "fail" : warnings.length > 0 ? "warn" : "pass";
|