@absolutejs/voice 0.0.22-beta.202 → 0.0.22-beta.203

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.js CHANGED
@@ -14705,7 +14705,7 @@ var collectSimulationActions = (input) => {
14705
14705
  const firstFailed = input.sessions.sessions.find((session) => session.status === "fail");
14706
14706
  actions.push({
14707
14707
  description: firstFailed ? `Inspect session ${firstFailed.sessionId}; at least one quality metric is outside threshold.` : "Inspect failing session quality reports.",
14708
- href: input.links?.sessions,
14708
+ href: firstFailed?.operationsRecordHref ?? input.links?.sessions,
14709
14709
  label: "Review failing session quality",
14710
14710
  section: "sessions",
14711
14711
  severity: "error"
@@ -14716,9 +14716,10 @@ var collectSimulationActions = (input) => {
14716
14716
  continue;
14717
14717
  }
14718
14718
  const issue = scenario.issues[0] ?? scenario.sessions.find((session) => session.issues.length > 0)?.issues[0] ?? "Scenario did not meet its expected trace conditions.";
14719
+ const failedSession = scenario.sessions.find((session) => session.status === "fail");
14719
14720
  actions.push({
14720
14721
  description: `${scenario.label}: ${issue}`,
14721
- href: input.links?.scenarios,
14722
+ href: failedSession?.operationsRecordHref ?? input.links?.scenarios,
14722
14723
  label: `Fix scenario ${scenario.label}`,
14723
14724
  section: "scenarios",
14724
14725
  severity: "error"
@@ -14729,9 +14730,10 @@ var collectSimulationActions = (input) => {
14729
14730
  continue;
14730
14731
  }
14731
14732
  const failedScenario = fixture.report.scenarios.find((scenario) => scenario.status === "fail");
14733
+ const failedSession = failedScenario?.sessions.find((session) => session.status === "fail");
14732
14734
  actions.push({
14733
14735
  description: failedScenario ? `${fixture.label}: ${failedScenario.label} failed.` : `${fixture.label}: fixture simulation failed.`,
14734
- href: input.links?.fixtures,
14736
+ href: failedSession?.operationsRecordHref ?? input.links?.fixtures,
14735
14737
  label: `Update fixture ${fixture.label}`,
14736
14738
  section: "fixtures",
14737
14739
  severity: "error"
@@ -14774,16 +14776,19 @@ var runVoiceSimulationSuite = async (options) => {
14774
14776
  const [sessions, scenarios, fixtures, tools, outcomes] = await Promise.all([
14775
14777
  shouldRunSessions ? runVoiceSessionEvals({
14776
14778
  limit: options.limit,
14779
+ operationsRecordHref: options.operationsRecordHref,
14777
14780
  store: options.store,
14778
14781
  thresholds: options.thresholds
14779
14782
  }) : undefined,
14780
14783
  shouldRunScenarios ? runVoiceScenarioEvals({
14784
+ operationsRecordHref: options.operationsRecordHref,
14781
14785
  scenarios: options.scenarios,
14782
14786
  store: options.store
14783
14787
  }) : undefined,
14784
14788
  shouldRunFixtures ? runVoiceScenarioFixtureEvals({
14785
14789
  fixtures: options.fixtures,
14786
14790
  fixtureStore: options.fixtureStore,
14791
+ operationsRecordHref: options.operationsRecordHref,
14787
14792
  scenarios: options.scenarios
14788
14793
  }) : undefined,
14789
14794
  shouldRunTools ? runVoiceToolContractSuite({
@@ -57,6 +57,7 @@ export type VoiceSimulationSuiteOptions<TSession extends VoiceSessionRecord = Vo
57
57
  tools?: boolean;
58
58
  };
59
59
  limit?: number;
60
+ operationsRecordHref?: false | string | ((sessionId: string) => string);
60
61
  outcomes?: Omit<VoiceOutcomeContractOptions<TSession>, 'contracts'> & {
61
62
  contracts: VoiceOutcomeContractDefinition[];
62
63
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.202",
3
+ "version": "0.0.22-beta.203",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",