@oscharko-dev/keiko-evaluations 0.2.8 → 0.2.9
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/.tsbuildinfo +1 -1
- package/dist/discussion/fixtures/correction.d.ts +5 -0
- package/dist/discussion/fixtures/correction.d.ts.map +1 -0
- package/dist/discussion/fixtures/correction.js +53 -0
- package/dist/discussion/fixtures/index.d.ts +5 -0
- package/dist/discussion/fixtures/index.d.ts.map +1 -0
- package/dist/discussion/fixtures/index.js +17 -0
- package/dist/discussion/fixtures/no-voice.d.ts +6 -0
- package/dist/discussion/fixtures/no-voice.d.ts.map +1 -0
- package/dist/discussion/fixtures/no-voice.js +79 -0
- package/dist/discussion/fixtures/voice.d.ts +5 -0
- package/dist/discussion/fixtures/voice.d.ts.map +1 -0
- package/dist/discussion/fixtures/voice.js +57 -0
- package/dist/discussion/index.d.ts +6 -0
- package/dist/discussion/index.d.ts.map +1 -0
- package/dist/discussion/index.js +9 -0
- package/dist/discussion/render.d.ts +3 -0
- package/dist/discussion/render.d.ts.map +1 -0
- package/dist/discussion/render.js +49 -0
- package/dist/discussion/runner.d.ts +13 -0
- package/dist/discussion/runner.d.ts.map +1 -0
- package/dist/discussion/runner.js +80 -0
- package/dist/discussion/scorer.d.ts +8 -0
- package/dist/discussion/scorer.d.ts.map +1 -0
- package/dist/discussion/scorer.js +225 -0
- package/dist/discussion/types.d.ts +71 -0
- package/dist/discussion/types.d.ts.map +1 -0
- package/dist/discussion/types.js +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/voice-action/fixtures/adversarial.d.ts +9 -0
- package/dist/voice-action/fixtures/adversarial.d.ts.map +1 -0
- package/dist/voice-action/fixtures/adversarial.js +163 -0
- package/dist/voice-action/fixtures/index.d.ts +5 -0
- package/dist/voice-action/fixtures/index.d.ts.map +1 -0
- package/dist/voice-action/fixtures/index.js +17 -0
- package/dist/voice-action/fixtures/no-voice.d.ts +5 -0
- package/dist/voice-action/fixtures/no-voice.d.ts.map +1 -0
- package/dist/voice-action/fixtures/no-voice.js +37 -0
- package/dist/voice-action/fixtures/segment.d.ts +11 -0
- package/dist/voice-action/fixtures/segment.d.ts.map +1 -0
- package/dist/voice-action/fixtures/segment.js +25 -0
- package/dist/voice-action/fixtures/voice.d.ts +6 -0
- package/dist/voice-action/fixtures/voice.d.ts.map +1 -0
- package/dist/voice-action/fixtures/voice.js +74 -0
- package/dist/voice-action/index.d.ts +6 -0
- package/dist/voice-action/index.d.ts.map +1 -0
- package/dist/voice-action/index.js +10 -0
- package/dist/voice-action/render.d.ts +3 -0
- package/dist/voice-action/render.d.ts.map +1 -0
- package/dist/voice-action/render.js +49 -0
- package/dist/voice-action/runner.d.ts +14 -0
- package/dist/voice-action/runner.d.ts.map +1 -0
- package/dist/voice-action/runner.js +149 -0
- package/dist/voice-action/scorer.d.ts +8 -0
- package/dist/voice-action/scorer.d.ts.map +1 -0
- package/dist/voice-action/scorer.js +247 -0
- package/dist/voice-action/types.d.ts +82 -0
- package/dist/voice-action/types.d.ts.map +1 -0
- package/dist/voice-action/types.js +30 -0
- package/dist/voice-twin/capability.d.ts +4 -0
- package/dist/voice-twin/capability.d.ts.map +1 -0
- package/dist/voice-twin/capability.js +26 -0
- package/dist/voice-twin/fixtures/full-realtime.d.ts +3 -0
- package/dist/voice-twin/fixtures/full-realtime.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/full-realtime.js +36 -0
- package/dist/voice-twin/fixtures/index.d.ts +5 -0
- package/dist/voice-twin/fixtures/index.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/index.js +21 -0
- package/dist/voice-twin/fixtures/no-voice.d.ts +3 -0
- package/dist/voice-twin/fixtures/no-voice.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/no-voice.js +33 -0
- package/dist/voice-twin/fixtures/privacy.d.ts +3 -0
- package/dist/voice-twin/fixtures/privacy.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/privacy.js +69 -0
- package/dist/voice-twin/fixtures/speech-output.d.ts +3 -0
- package/dist/voice-twin/fixtures/speech-output.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/speech-output.js +32 -0
- package/dist/voice-twin/fixtures/stt-only.d.ts +3 -0
- package/dist/voice-twin/fixtures/stt-only.d.ts.map +1 -0
- package/dist/voice-twin/fixtures/stt-only.js +35 -0
- package/dist/voice-twin/index.d.ts +10 -0
- package/dist/voice-twin/index.d.ts.map +1 -0
- package/dist/voice-twin/index.js +14 -0
- package/dist/voice-twin/metrics.d.ts +10 -0
- package/dist/voice-twin/metrics.d.ts.map +1 -0
- package/dist/voice-twin/metrics.js +142 -0
- package/dist/voice-twin/privacy.d.ts +9 -0
- package/dist/voice-twin/privacy.d.ts.map +1 -0
- package/dist/voice-twin/privacy.js +100 -0
- package/dist/voice-twin/profiles.d.ts +15 -0
- package/dist/voice-twin/profiles.d.ts.map +1 -0
- package/dist/voice-twin/profiles.js +58 -0
- package/dist/voice-twin/render.d.ts +3 -0
- package/dist/voice-twin/render.d.ts.map +1 -0
- package/dist/voice-twin/render.js +53 -0
- package/dist/voice-twin/runner.d.ts +13 -0
- package/dist/voice-twin/runner.d.ts.map +1 -0
- package/dist/voice-twin/runner.js +141 -0
- package/dist/voice-twin/scorer.d.ts +8 -0
- package/dist/voice-twin/scorer.d.ts.map +1 -0
- package/dist/voice-twin/scorer.js +323 -0
- package/dist/voice-twin/types.d.ts +149 -0
- package/dist/voice-twin/types.d.ts.map +1 -0
- package/dist/voice-twin/types.js +45 -0
- package/package.json +9 -9
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { SpokenActionAuditRecord, SpokenActionEffectClass, SpokenActionState, VoiceProfile, VoiceTranscriptSegment, VoiceTranscriptSource } from "@oscharko-dev/keiko-contracts";
|
|
2
|
+
export type VoiceActionDimension = "capability-gating" | "committed-only" | "confirmation-discipline" | "stale-intent-prevention" | "injection-resistance" | "evidence-safety";
|
|
3
|
+
export declare const VOICE_ACTION_DIMENSIONS: readonly VoiceActionDimension[];
|
|
4
|
+
export type VoiceActionFixtureCategory = "no-voice" | "voice" | "adversarial";
|
|
5
|
+
export declare const VOICE_ACTION_FIXTURE_CATEGORIES: readonly VoiceActionFixtureCategory[];
|
|
6
|
+
export interface VoiceActionOracle {
|
|
7
|
+
readonly expectedGatingAllowed: boolean;
|
|
8
|
+
readonly expectsProposal: boolean;
|
|
9
|
+
readonly expectedEffectClass?: SpokenActionEffectClass;
|
|
10
|
+
readonly expectedRequiresConfirmation?: boolean;
|
|
11
|
+
readonly forbidsReadOnly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface VoiceActionEvalFixture {
|
|
14
|
+
readonly name: string;
|
|
15
|
+
readonly category: VoiceActionFixtureCategory;
|
|
16
|
+
readonly description: string;
|
|
17
|
+
readonly profile: VoiceProfile;
|
|
18
|
+
readonly source: VoiceTranscriptSource;
|
|
19
|
+
readonly turnIndex: number;
|
|
20
|
+
readonly segments: readonly VoiceTranscriptSegment[];
|
|
21
|
+
readonly correctedSegments?: readonly VoiceTranscriptSegment[];
|
|
22
|
+
readonly turnAdvance?: boolean;
|
|
23
|
+
readonly dimensions: ReadonlySet<VoiceActionDimension>;
|
|
24
|
+
readonly oracle: VoiceActionOracle;
|
|
25
|
+
}
|
|
26
|
+
export interface VoiceActionStalenessTrajectory {
|
|
27
|
+
readonly seedChanged: boolean;
|
|
28
|
+
readonly bothSeedsPresent: boolean;
|
|
29
|
+
readonly trigger: "correction" | "turn-advance";
|
|
30
|
+
}
|
|
31
|
+
export interface VoiceActionProposalSummary {
|
|
32
|
+
readonly effectClass: SpokenActionEffectClass;
|
|
33
|
+
readonly requiresConfirmation: boolean;
|
|
34
|
+
readonly state: SpokenActionState;
|
|
35
|
+
readonly turnIndex: number;
|
|
36
|
+
readonly committedSegmentCount: number;
|
|
37
|
+
readonly committedChars: number;
|
|
38
|
+
}
|
|
39
|
+
export interface VoiceActionObservation {
|
|
40
|
+
readonly gatingAllowed: boolean;
|
|
41
|
+
readonly committedSegmentCount: number;
|
|
42
|
+
readonly committedChars: number;
|
|
43
|
+
readonly proposal: VoiceActionProposalSummary | undefined;
|
|
44
|
+
readonly audit: SpokenActionAuditRecord;
|
|
45
|
+
readonly staleness?: VoiceActionStalenessTrajectory;
|
|
46
|
+
}
|
|
47
|
+
export type VoiceActionOutcome = "pass" | "fail" | "not-applicable";
|
|
48
|
+
export interface VoiceActionDimensionResult {
|
|
49
|
+
readonly dimension: VoiceActionDimension;
|
|
50
|
+
readonly outcome: VoiceActionOutcome;
|
|
51
|
+
readonly rationale: string;
|
|
52
|
+
}
|
|
53
|
+
export interface VoiceActionFixtureResult {
|
|
54
|
+
readonly fixtureName: string;
|
|
55
|
+
readonly category: VoiceActionFixtureCategory;
|
|
56
|
+
readonly observation: VoiceActionObservation;
|
|
57
|
+
readonly dimensionResults: readonly VoiceActionDimensionResult[];
|
|
58
|
+
readonly fullyPassed: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface VoiceActionScorecardEntry {
|
|
61
|
+
readonly dimension: VoiceActionDimension;
|
|
62
|
+
readonly passCount: number;
|
|
63
|
+
readonly failCount: number;
|
|
64
|
+
readonly notApplicableCount: number;
|
|
65
|
+
readonly passRate: number | null;
|
|
66
|
+
}
|
|
67
|
+
export interface VoiceActionEvalSummary {
|
|
68
|
+
readonly totalFixtures: number;
|
|
69
|
+
readonly fullyPassedFixtures: number;
|
|
70
|
+
readonly coversNoVoiceProfile: boolean;
|
|
71
|
+
readonly coversVoiceProfile: boolean;
|
|
72
|
+
readonly goNoGo: "GO" | "NO-GO";
|
|
73
|
+
}
|
|
74
|
+
export declare const VOICE_ACTION_EVAL_SCHEMA_VERSION: "1";
|
|
75
|
+
export interface VoiceActionScorecard {
|
|
76
|
+
readonly schemaVersion: typeof VOICE_ACTION_EVAL_SCHEMA_VERSION;
|
|
77
|
+
readonly fixtureResults: readonly VoiceActionFixtureResult[];
|
|
78
|
+
readonly dimensions: readonly VoiceActionScorecardEntry[];
|
|
79
|
+
readonly summary: VoiceActionEvalSummary;
|
|
80
|
+
readonly coveredEffectClasses: readonly SpokenActionEffectClass[];
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/voice-action/types.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACtB,MAAM,+BAA+B,CAAC;AAKvC,MAAM,MAAM,oBAAoB,GAC5B,mBAAmB,GACnB,gBAAgB,GAChB,yBAAyB,GACzB,yBAAyB,GACzB,sBAAsB,GACtB,iBAAiB,CAAC;AAEtB,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EAOzD,CAAC;AAMX,MAAM,MAAM,0BAA0B,GAAG,UAAU,GAAG,OAAO,GAAG,aAAa,CAAC;AAE9E,eAAO,MAAM,+BAA+B,EAAE,SAAS,0BAA0B,EAIvE,CAAC;AAOX,MAAM,WAAW,iBAAiB;IAEhC,QAAQ,CAAC,qBAAqB,EAAE,OAAO,CAAC;IAGxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAGlC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAEvD,QAAQ,CAAC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAGhD,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC;AAMD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,qBAA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AAC,OAAO,EAAE,sBAAsB,CAAC;IAEzC,QAAQ,CAAC,oBAAoB,EAAE,SAAS,uBAAuB,EAAE,CAAC;CACnE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Voice Action Governance evaluation types (Epic #491, Issue #503; ADR-0066).
|
|
2
|
+
//
|
|
3
|
+
// This subpackage scores the deterministic spoken-action governance scaffold defined by the
|
|
4
|
+
// keiko-contracts `voice-action-intent` leaf module — the fail-closed effect taxonomy, the capability
|
|
5
|
+
// gating, the committed-only entry gate, the confirmation discipline, and the content-digest binding
|
|
6
|
+
// that prevents stale / misrecognized intent from executing. It is NOT the agent-trajectory harness
|
|
7
|
+
// (`../types.ts`, `../scorer.ts`), which is bounded to workflow runs: the governance scaffold is a
|
|
8
|
+
// distinct security artefact judged on its own closed set of dimensions, so it carries its own
|
|
9
|
+
// deterministic fixture type and scorer, mirroring the Discussion Intelligence subpackage
|
|
10
|
+
// (`../discussion/`) and the Prompt Enhancer subpackage (`../promptEnhancer/`).
|
|
11
|
+
//
|
|
12
|
+
// Determinism: the "pipeline" that produces an observation is pure data derivation over the frozen
|
|
13
|
+
// contract (`selectCommittedVoiceTranscript`, `normalizeSpokenActionProposal`,
|
|
14
|
+
// `classifySpokenActionEffect`, `canonicalizeSpokenActionConfirmation`, `buildSpokenActionAuditRecord`).
|
|
15
|
+
// No model call, clock read, or randomness is involved, so the suite gives reproducible CI coverage.
|
|
16
|
+
// Every observation field is content-free (enums, bools, ints, a content-free digest, fixed labels).
|
|
17
|
+
export const VOICE_ACTION_DIMENSIONS = [
|
|
18
|
+
"capability-gating",
|
|
19
|
+
"committed-only",
|
|
20
|
+
"confirmation-discipline",
|
|
21
|
+
"stale-intent-prevention",
|
|
22
|
+
"injection-resistance",
|
|
23
|
+
"evidence-safety",
|
|
24
|
+
];
|
|
25
|
+
export const VOICE_ACTION_FIXTURE_CATEGORIES = [
|
|
26
|
+
"no-voice",
|
|
27
|
+
"voice",
|
|
28
|
+
"adversarial",
|
|
29
|
+
];
|
|
30
|
+
export const VOICE_ACTION_EVAL_SCHEMA_VERSION = "1";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type VoiceProfile } from "@oscharko-dev/keiko-contracts";
|
|
2
|
+
import type { VoiceTwinCapabilityCell, VoiceEnvironmentProfile } from "./types.js";
|
|
3
|
+
export declare function deriveCapabilityCell(environment: VoiceEnvironmentProfile, advertised: VoiceProfile): VoiceTwinCapabilityCell;
|
|
4
|
+
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../../src/voice-twin/capability.ts"],"names":[],"mappings":"AASA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAEnF,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,uBAAuB,EACpC,UAAU,EAAE,YAAY,GACvB,uBAAuB,CAezB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Voice Digital Twin capability-cell derivation (Epic #491, Issue #505; ADR-0068).
|
|
2
|
+
//
|
|
3
|
+
// `deriveCapabilityCell` resolves one environment × advertised-capability cell to the contract-derived
|
|
4
|
+
// facts the matrix asserts: the effective profile (after environment degradation), the allowed control
|
|
5
|
+
// message kinds, the media transport, the negotiation mode, the always-loopback control plane, the media
|
|
6
|
+
// plane id, and the egress class. Every fact is read directly from a frozen keiko-contracts table for the
|
|
7
|
+
// effective profile, so the scorer can compare the cell against those same tables and catch any drift or
|
|
8
|
+
// wrong derivation. Pure.
|
|
9
|
+
import { VOICE_CONTROL_TRANSPORTS, VOICE_MEDIA_PLANE, VOICE_PROFILE_ALLOWED_MESSAGE_KINDS, VOICE_PROFILE_MEDIA_TRANSPORT, VOICE_PROFILE_NEGOTIATION_MODE, } from "@oscharko-dev/keiko-contracts";
|
|
10
|
+
import { effectiveVoiceProfile, egressDestinationClassFor } from "./profiles.js";
|
|
11
|
+
export function deriveCapabilityCell(environment, advertised) {
|
|
12
|
+
const effectiveProfile = effectiveVoiceProfile(environment, advertised);
|
|
13
|
+
return {
|
|
14
|
+
effectiveProfile,
|
|
15
|
+
allowedKinds: VOICE_PROFILE_ALLOWED_MESSAGE_KINDS[effectiveProfile],
|
|
16
|
+
mediaTransport: VOICE_PROFILE_MEDIA_TRANSPORT[effectiveProfile],
|
|
17
|
+
negotiation: VOICE_PROFILE_NEGOTIATION_MODE[effectiveProfile],
|
|
18
|
+
// The authoritative control / signaling plane is always realized on the host loopback seam; the
|
|
19
|
+
// browser never holds media-negotiation authority directly (AC4). Derived from the contract transport
|
|
20
|
+
// catalog: every control transport in `VOICE_CONTROL_TRANSPORTS` is a loopback transport, so adding a
|
|
21
|
+
// non-loopback control transport to the contract flips this false and fails the AC4 dimension.
|
|
22
|
+
controlPlaneIsLoopback: VOICE_CONTROL_TRANSPORTS.every((t) => t.startsWith("loopback-")),
|
|
23
|
+
mediaPlaneId: VOICE_MEDIA_PLANE.plane,
|
|
24
|
+
egressClass: egressDestinationClassFor(effectiveProfile),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"full-realtime.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/full-realtime.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAoCpD,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EAW7D,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Full-realtime fixtures (Issue #505; AC4). The provider-configured environments crossed with an
|
|
2
|
+
// advertised full-realtime capability. They exercise transport-plane-separation (webrtc media +
|
|
3
|
+
// proxied-sdp negotiation + loopback control + SDP / media-track kinds), interruption,
|
|
4
|
+
// buffer-boundedness, provider-failure-recovery, and capability-matrix-consistency. A full-realtime cell
|
|
5
|
+
// egresses only to the configured model endpoint.
|
|
6
|
+
const CLEAN_MANIFESTS = [{ packageName: "keiko-server", dependencyNames: ["ws"] }];
|
|
7
|
+
const CONFIGURED_LEDGER = [{ class: "configured-model-endpoint" }];
|
|
8
|
+
function fullRealtimeFixture(name, environment, description) {
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
category: "full-realtime",
|
|
12
|
+
description,
|
|
13
|
+
environment,
|
|
14
|
+
advertisedProfile: "full-realtime",
|
|
15
|
+
egressLedger: CONFIGURED_LEDGER,
|
|
16
|
+
manifests: CLEAN_MANIFESTS,
|
|
17
|
+
dimensions: new Set([
|
|
18
|
+
"transport-plane-separation",
|
|
19
|
+
"interruption-metric",
|
|
20
|
+
"buffer-boundedness-metric",
|
|
21
|
+
"provider-failure-recovery-metric",
|
|
22
|
+
"capability-matrix-consistency",
|
|
23
|
+
"external-destination-privacy",
|
|
24
|
+
"latency-class-metric",
|
|
25
|
+
]),
|
|
26
|
+
oracle: {
|
|
27
|
+
expectedEffectiveProfile: "full-realtime",
|
|
28
|
+
expectedEgressApproved: true,
|
|
29
|
+
expectedManifestsClean: true,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export const FULL_REALTIME_FIXTURES = [
|
|
34
|
+
fullRealtimeFixture("azure-foundry-full-realtime", "azure-foundry", "Azure full-duplex realtime: WebRTC media, proxied-SDP, loopback control plane."),
|
|
35
|
+
fullRealtimeFixture("customer-hosted-full-realtime", "customer-hosted", "Customer-hosted full-duplex realtime over the controlled network."),
|
|
36
|
+
];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { VoiceTwinFixture, VoiceTwinFixtureCategory } from "../types.js";
|
|
2
|
+
export declare const ALL_VOICE_TWIN_FIXTURES: readonly VoiceTwinFixture[];
|
|
3
|
+
export declare function voiceTwinFixturesForCategory(category: VoiceTwinFixtureCategory): readonly VoiceTwinFixture[];
|
|
4
|
+
export declare function voiceTwinFixtureByName(name: string): VoiceTwinFixture | undefined;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE9E,eAAO,MAAM,uBAAuB,EAAE,SAAS,gBAAgB,EAM9D,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,wBAAwB,GACjC,SAAS,gBAAgB,EAAE,CAE7B;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS,CAEjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Voice Digital Twin fixture registry (Epic #491, Issue #505). ALL_VOICE_TWIN_FIXTURES is the canonical
|
|
2
|
+
// list the runner and suite tests consume; the selectors resolve a category or a fixture name against it.
|
|
3
|
+
// Mirrors the Voice Action fixtures/index.ts layout.
|
|
4
|
+
import { NO_VOICE_FIXTURES } from "./no-voice.js";
|
|
5
|
+
import { STT_ONLY_FIXTURES } from "./stt-only.js";
|
|
6
|
+
import { SPEECH_OUTPUT_FIXTURES } from "./speech-output.js";
|
|
7
|
+
import { FULL_REALTIME_FIXTURES } from "./full-realtime.js";
|
|
8
|
+
import { PRIVACY_FIXTURES } from "./privacy.js";
|
|
9
|
+
export const ALL_VOICE_TWIN_FIXTURES = [
|
|
10
|
+
...NO_VOICE_FIXTURES,
|
|
11
|
+
...STT_ONLY_FIXTURES,
|
|
12
|
+
...SPEECH_OUTPUT_FIXTURES,
|
|
13
|
+
...FULL_REALTIME_FIXTURES,
|
|
14
|
+
...PRIVACY_FIXTURES,
|
|
15
|
+
];
|
|
16
|
+
export function voiceTwinFixturesForCategory(category) {
|
|
17
|
+
return ALL_VOICE_TWIN_FIXTURES.filter((f) => f.category === category);
|
|
18
|
+
}
|
|
19
|
+
export function voiceTwinFixtureByName(name) {
|
|
20
|
+
return ALL_VOICE_TWIN_FIXTURES.find((f) => f.name === name);
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-voice.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/no-voice.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA4BxE,eAAO,MAAM,iBAAiB,EAAE,SAAS,gBAAgB,EAwCxD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// No-voice fixtures (Issue #505; AC1 / AC2). Every cell here resolves to effective profile `none`: the
|
|
2
|
+
// no-voice environment crossed with each advertised capability (all degrade to none), plus the
|
|
3
|
+
// provider-configured environments crossed with an advertised `none`. They exercise no-voice-dormancy and
|
|
4
|
+
// capability-matrix-consistency. A `none` cell egresses nowhere, so its egress ledger is empty (approved)
|
|
5
|
+
// and its manifests are clean.
|
|
6
|
+
const CLEAN_MANIFESTS = [{ packageName: "keiko-server", dependencyNames: ["ws"] }];
|
|
7
|
+
function noVoiceFixture(name, environment, advertisedProfile, description, extraDimensions = []) {
|
|
8
|
+
return {
|
|
9
|
+
name,
|
|
10
|
+
category: "no-voice",
|
|
11
|
+
description,
|
|
12
|
+
environment,
|
|
13
|
+
advertisedProfile,
|
|
14
|
+
egressLedger: [],
|
|
15
|
+
manifests: CLEAN_MANIFESTS,
|
|
16
|
+
dimensions: new Set(["no-voice-dormancy", "capability-matrix-consistency", ...extraDimensions]),
|
|
17
|
+
oracle: {
|
|
18
|
+
expectedEffectiveProfile: "none",
|
|
19
|
+
expectedEgressApproved: true,
|
|
20
|
+
expectedManifestsClean: true,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export const NO_VOICE_FIXTURES = [
|
|
25
|
+
// The dormant baseline also exercises the latency-class dimension to prove a `none` profile maps to the
|
|
26
|
+
// `none` latency class (no latency surface at all) — the negative end of the latency-posture proof.
|
|
27
|
+
noVoiceFixture("no-voice-env-advertises-none", "no-voice-env", "none", "No provider configured and none advertised: fully dormant baseline.", ["latency-class-metric"]),
|
|
28
|
+
noVoiceFixture("no-voice-env-degrades-stt", "no-voice-env", "speech-to-text", "Advertised STT degrades to none when no provider is configured."),
|
|
29
|
+
noVoiceFixture("no-voice-env-degrades-speech-output", "no-voice-env", "speech-output", "Advertised speech-output degrades to none when no provider is configured."),
|
|
30
|
+
noVoiceFixture("no-voice-env-degrades-full-realtime", "no-voice-env", "full-realtime", "Advertised full-realtime degrades to none when no provider is configured."),
|
|
31
|
+
noVoiceFixture("azure-foundry-none", "azure-foundry", "none", "Azure environment with voice not enabled: dormant, no egress."),
|
|
32
|
+
noVoiceFixture("customer-hosted-none", "customer-hosted", "none", "Customer-hosted environment with voice not enabled: dormant, no egress."),
|
|
33
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/privacy.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpD,eAAO,MAAM,gBAAgB,EAAE,SAAS,gBAAgB,EA+DvD,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Privacy fixtures (Issue #505; AC5). These exercise external-destination-privacy directly. POSITIVE
|
|
2
|
+
// fixtures carry only `none` / `configured-model-endpoint` egress and clean manifests (audit approved).
|
|
3
|
+
// NEGATIVE fixtures carry an `unapproved-external` destination and/or a denied media package — they PASS
|
|
4
|
+
// the dimension by being CAUGHT: the auditor correctly returns approved=false / clean=false, which is what
|
|
5
|
+
// their oracle expects. This proves the AC5 teeth: a voice addition that introduces an unapproved external
|
|
6
|
+
// destination, or a denied runtime media package, does not silently pass.
|
|
7
|
+
const CLEAN_MANIFESTS = [{ packageName: "keiko-server", dependencyNames: ["ws"] }];
|
|
8
|
+
export const PRIVACY_FIXTURES = [
|
|
9
|
+
{
|
|
10
|
+
name: "privacy-positive-configured-endpoint",
|
|
11
|
+
category: "privacy",
|
|
12
|
+
description: "A realtime cell egressing only to the configured model endpoint audits approved.",
|
|
13
|
+
environment: "customer-hosted",
|
|
14
|
+
advertisedProfile: "full-realtime",
|
|
15
|
+
egressLedger: [{ class: "configured-model-endpoint" }],
|
|
16
|
+
manifests: CLEAN_MANIFESTS,
|
|
17
|
+
dimensions: new Set(["external-destination-privacy"]),
|
|
18
|
+
oracle: {
|
|
19
|
+
expectedEffectiveProfile: "full-realtime",
|
|
20
|
+
expectedEgressApproved: true,
|
|
21
|
+
expectedManifestsClean: true,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "privacy-positive-none",
|
|
26
|
+
category: "privacy",
|
|
27
|
+
description: "A dormant cell with no egress audits approved.",
|
|
28
|
+
environment: "no-voice-env",
|
|
29
|
+
advertisedProfile: "full-realtime",
|
|
30
|
+
egressLedger: [],
|
|
31
|
+
manifests: CLEAN_MANIFESTS,
|
|
32
|
+
dimensions: new Set(["external-destination-privacy"]),
|
|
33
|
+
oracle: {
|
|
34
|
+
expectedEffectiveProfile: "none",
|
|
35
|
+
expectedEgressApproved: true,
|
|
36
|
+
expectedManifestsClean: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "privacy-negative-unapproved-external",
|
|
41
|
+
category: "privacy",
|
|
42
|
+
description: "A voice addition routing audio to an unapproved external destination is correctly caught (approved=false).",
|
|
43
|
+
environment: "azure-foundry",
|
|
44
|
+
advertisedProfile: "full-realtime",
|
|
45
|
+
egressLedger: [{ class: "configured-model-endpoint" }, { class: "unapproved-external" }],
|
|
46
|
+
manifests: CLEAN_MANIFESTS,
|
|
47
|
+
dimensions: new Set(["external-destination-privacy"]),
|
|
48
|
+
oracle: {
|
|
49
|
+
expectedEffectiveProfile: "full-realtime",
|
|
50
|
+
expectedEgressApproved: false,
|
|
51
|
+
expectedManifestsClean: true,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "privacy-negative-denied-media-package",
|
|
56
|
+
category: "privacy",
|
|
57
|
+
description: "A voice addition pulling in a denied runtime media package is correctly caught (clean=false).",
|
|
58
|
+
environment: "azure-foundry",
|
|
59
|
+
advertisedProfile: "full-realtime",
|
|
60
|
+
egressLedger: [{ class: "unapproved-external" }],
|
|
61
|
+
manifests: [{ packageName: "keiko-ui", dependencyNames: ["simple-peer", "ws"] }],
|
|
62
|
+
dimensions: new Set(["external-destination-privacy"]),
|
|
63
|
+
oracle: {
|
|
64
|
+
expectedEffectiveProfile: "full-realtime",
|
|
65
|
+
expectedEgressApproved: false,
|
|
66
|
+
expectedManifestsClean: false,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"speech-output.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/speech-output.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAiCpD,eAAO,MAAM,sBAAsB,EAAE,SAAS,gBAAgB,EAW7D,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Speech-output fixtures (Issue #505). The provider-configured environments crossed with an advertised
|
|
2
|
+
// speech-output capability. They exercise the AC6 interruption (barge-in) metric and
|
|
3
|
+
// capability-matrix-consistency. A speech-output cell egresses only to the configured model endpoint and
|
|
4
|
+
// permits playback + interrupt control kinds but no WebRTC media signalling.
|
|
5
|
+
const CLEAN_MANIFESTS = [{ packageName: "keiko-server", dependencyNames: ["ws"] }];
|
|
6
|
+
const CONFIGURED_LEDGER = [{ class: "configured-model-endpoint" }];
|
|
7
|
+
function speechOutputFixture(name, environment, description) {
|
|
8
|
+
return {
|
|
9
|
+
name,
|
|
10
|
+
category: "speech-output",
|
|
11
|
+
description,
|
|
12
|
+
environment,
|
|
13
|
+
advertisedProfile: "speech-output",
|
|
14
|
+
egressLedger: CONFIGURED_LEDGER,
|
|
15
|
+
manifests: CLEAN_MANIFESTS,
|
|
16
|
+
dimensions: new Set([
|
|
17
|
+
"interruption-metric",
|
|
18
|
+
"capability-matrix-consistency",
|
|
19
|
+
"external-destination-privacy",
|
|
20
|
+
"latency-class-metric",
|
|
21
|
+
]),
|
|
22
|
+
oracle: {
|
|
23
|
+
expectedEffectiveProfile: "speech-output",
|
|
24
|
+
expectedEgressApproved: true,
|
|
25
|
+
expectedManifestsClean: true,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export const SPEECH_OUTPUT_FIXTURES = [
|
|
30
|
+
speechOutputFixture("azure-foundry-speech-output", "azure-foundry", "Azure speech-output playback with barge-in interruption permitted."),
|
|
31
|
+
speechOutputFixture("customer-hosted-speech-output", "customer-hosted", "Customer-hosted speech-output playback over the controlled network."),
|
|
32
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stt-only.d.ts","sourceRoot":"","sources":["../../../src/voice-twin/fixtures/stt-only.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAmCpD,eAAO,MAAM,iBAAiB,EAAE,SAAS,gBAAgB,EAWxD,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// STT-only fixtures (Issue #505; AC3). The provider-configured environments crossed with an advertised
|
|
2
|
+
// speech-to-text capability, which stays speech-to-text (no degradation). They exercise
|
|
3
|
+
// stt-affordance-bounding (the SDP / media / playback / interrupt kinds must be excluded),
|
|
4
|
+
// capability-matrix-consistency, and the AC6 end-of-turn + transcript-correction metrics (STT is a
|
|
5
|
+
// transcript-capture profile). A speech-to-text cell egresses only to the configured model endpoint.
|
|
6
|
+
const CLEAN_MANIFESTS = [{ packageName: "keiko-server", dependencyNames: ["ws"] }];
|
|
7
|
+
const CONFIGURED_LEDGER = [{ class: "configured-model-endpoint" }];
|
|
8
|
+
function sttFixture(name, environment, description) {
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
category: "stt-only",
|
|
12
|
+
description,
|
|
13
|
+
environment,
|
|
14
|
+
advertisedProfile: "speech-to-text",
|
|
15
|
+
egressLedger: CONFIGURED_LEDGER,
|
|
16
|
+
manifests: CLEAN_MANIFESTS,
|
|
17
|
+
dimensions: new Set([
|
|
18
|
+
"stt-affordance-bounding",
|
|
19
|
+
"capability-matrix-consistency",
|
|
20
|
+
"external-destination-privacy",
|
|
21
|
+
"end-of-turn-metric",
|
|
22
|
+
"transcript-correction-metric",
|
|
23
|
+
"latency-class-metric",
|
|
24
|
+
]),
|
|
25
|
+
oracle: {
|
|
26
|
+
expectedEffectiveProfile: "speech-to-text",
|
|
27
|
+
expectedEgressApproved: true,
|
|
28
|
+
expectedManifestsClean: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export const STT_ONLY_FIXTURES = [
|
|
33
|
+
sttFixture("azure-foundry-stt", "azure-foundry", "Azure STT-only dictation: transcript kinds only, no WebRTC / media / playback affordances."),
|
|
34
|
+
sttFixture("customer-hosted-stt", "customer-hosted", "Customer-hosted STT-only dictation over the controlled network: configured-endpoint egress only."),
|
|
35
|
+
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { deriveVoiceTwinObservation, runVoiceTwinEvaluation } from "./runner.js";
|
|
2
|
+
export { scoreVoiceTwinQuality, aggregateVoiceTwinQuality } from "./scorer.js";
|
|
3
|
+
export { renderVoiceTwinSummary } from "./render.js";
|
|
4
|
+
export { ALL_VOICE_PROFILES, VOICE_ENVIRONMENT_DESCRIPTORS, effectiveVoiceProfile, egressDestinationClassFor, localProfilesMatchContract, type VoiceEnvironmentDescriptor, type VoiceNetworkPosture, } from "./profiles.js";
|
|
5
|
+
export { deriveCapabilityCell } from "./capability.js";
|
|
6
|
+
export { ALLOWED_MEDIA_RUNTIME, DENIED_MEDIA_PACKAGES, auditVoiceEgress, scanManifestsForDeniedMediaPackages, } from "./privacy.js";
|
|
7
|
+
export { VOICE_TWIN_REPLAY_CAPACITY, deriveBufferBoundednessMetric, deriveEndOfTurnMetric, deriveInterruptionMetric, deriveLatencyClassMetric, deriveProviderFailureRecoveryMetric, deriveTranscriptCorrectionMetric, } from "./metrics.js";
|
|
8
|
+
export { ALL_VOICE_TWIN_FIXTURES, voiceTwinFixturesForCategory, voiceTwinFixtureByName, } from "./fixtures/index.js";
|
|
9
|
+
export { VOICE_TWIN_EVAL_SCHEMA_VERSION, VOICE_TWIN_DIMENSIONS, VOICE_TWIN_FIXTURE_CATEGORIES, VOICE_ENVIRONMENT_PROFILES, type VoiceTwinDimension, type VoiceEnvironmentProfile, type VoiceTwinFixtureCategory, type EgressDestinationClass, type VoiceTwinOracle, type VoiceTwinManifestFixture, type VoiceTwinEgressDestination, type VoiceTwinFixture, type VoiceTwinCapabilityCell, type InterruptionMetricRecord, type EndOfTurnMetricRecord, type TranscriptCorrectionMetricRecord, type ProviderFailureRecoveryMetricRecord, type BufferBoundednessMetricRecord, type LatencyClassMetricRecord, type VoiceTwinMetricBundle, type VoiceTwinEgressAudit, type VoiceTwinDeniedManifestHit, type VoiceTwinManifestScan, type VoiceTwinObservation, type VoiceTwinOutcome, type VoiceTwinDimensionResult, type VoiceTwinFixtureResult, type VoiceTwinScorecardEntry, type VoiceTwinMatrixCell, type VoiceTwinEvalSummary, type VoiceTwinScorecard, } from "./types.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/voice-twin/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAA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AAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Public barrel for the Voice Digital Twin evaluation suite (Epic #491, Issue #505 — the capstone;
|
|
2
|
+
// ADR-0068). Exposes the deterministic observation derivation, the eleven-dimension scorer, the suite
|
|
3
|
+
// runner, the scorecard renderer, the privacy / metric / profile / capability helpers, the fixture
|
|
4
|
+
// registry, and the result / fixture types. Re-exported from the package barrel as the `VoiceTwinEval`
|
|
5
|
+
// namespace, and proven by suite.test.ts.
|
|
6
|
+
export { deriveVoiceTwinObservation, runVoiceTwinEvaluation } from "./runner.js";
|
|
7
|
+
export { scoreVoiceTwinQuality, aggregateVoiceTwinQuality } from "./scorer.js";
|
|
8
|
+
export { renderVoiceTwinSummary } from "./render.js";
|
|
9
|
+
export { ALL_VOICE_PROFILES, VOICE_ENVIRONMENT_DESCRIPTORS, effectiveVoiceProfile, egressDestinationClassFor, localProfilesMatchContract, } from "./profiles.js";
|
|
10
|
+
export { deriveCapabilityCell } from "./capability.js";
|
|
11
|
+
export { ALLOWED_MEDIA_RUNTIME, DENIED_MEDIA_PACKAGES, auditVoiceEgress, scanManifestsForDeniedMediaPackages, } from "./privacy.js";
|
|
12
|
+
export { VOICE_TWIN_REPLAY_CAPACITY, deriveBufferBoundednessMetric, deriveEndOfTurnMetric, deriveInterruptionMetric, deriveLatencyClassMetric, deriveProviderFailureRecoveryMetric, deriveTranscriptCorrectionMetric, } from "./metrics.js";
|
|
13
|
+
export { ALL_VOICE_TWIN_FIXTURES, voiceTwinFixturesForCategory, voiceTwinFixtureByName, } from "./fixtures/index.js";
|
|
14
|
+
export { VOICE_TWIN_EVAL_SCHEMA_VERSION, VOICE_TWIN_DIMENSIONS, VOICE_TWIN_FIXTURE_CATEGORIES, VOICE_ENVIRONMENT_PROFILES, } from "./types.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VoiceControlMessageKind, type VoiceProfile } from "@oscharko-dev/keiko-contracts";
|
|
2
|
+
import type { BufferBoundednessMetricRecord, EndOfTurnMetricRecord, InterruptionMetricRecord, LatencyClassMetricRecord, ProviderFailureRecoveryMetricRecord, TranscriptCorrectionMetricRecord } from "./types.js";
|
|
3
|
+
export declare const VOICE_TWIN_REPLAY_CAPACITY: 200;
|
|
4
|
+
export declare function deriveInterruptionMetric(profile: VoiceProfile): InterruptionMetricRecord;
|
|
5
|
+
export declare function deriveEndOfTurnMetric(profile: VoiceProfile): EndOfTurnMetricRecord;
|
|
6
|
+
export declare function deriveTranscriptCorrectionMetric(): TranscriptCorrectionMetricRecord;
|
|
7
|
+
export declare function deriveProviderFailureRecoveryMetric(): ProviderFailureRecoveryMetricRecord;
|
|
8
|
+
export declare function deriveBufferBoundednessMetric(kinds: readonly VoiceControlMessageKind[], capacity?: number): BufferBoundednessMetricRecord;
|
|
9
|
+
export declare function deriveLatencyClassMetric(profile: VoiceProfile): LatencyClassMetricRecord;
|
|
10
|
+
//# sourceMappingURL=metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/voice-twin/metrics.ts"],"names":[],"mappings":"AAUA,OAAO,EAaL,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EAGlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,wBAAwB,EACxB,mCAAmC,EACnC,gCAAgC,EACjC,MAAM,YAAY,CAAC;AAMpB,eAAO,MAAM,0BAA0B,EAAG,GAAY,CAAC;AA0BvD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,YAAY,GAAG,wBAAwB,CAKxF;AAGD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,CAkBlF;AAGD,wBAAgB,gCAAgC,IAAI,gCAAgC,CAiBnF;AAGD,wBAAgB,mCAAmC,IAAI,mCAAmC,CAYzF;AAOD,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,SAAS,uBAAuB,EAAE,EACzC,QAAQ,GAAE,MAAmC,GAC5C,6BAA6B,CA2B/B;AAkBD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,YAAY,GAAG,wBAAwB,CAQxF"}
|