@effect-agent/testing 0.1.0-beta.96 → 0.1.0-beta.98

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/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@effect-agent/testing","version":"0.1.0-beta.96","dependencies":{"effect-agent":"0.1.0-beta.96"},"devDependencies":{"@effect-agent/platform-node":"0.1.0-beta.96","@effect-agent/storage-memory":"0.1.0-beta.96","@effect-agent/storage-sqlite":"0.1.0-beta.96","@effect/platform-node":"4.0.0-rc.115","@effect/sql-sqlite-node":"4.0.0-rc.115","@effect/vitest":"4.0.0-rc.115","effect":"4.0.0-rc.115","typescript":"7.0.2","vite-plus":"0.3.0"},"peerDependencies":{"effect":"^4.0.0-rc.115"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./certification":{"types":"./dist/Certification.d.mts","default":"./dist/Certification.mjs"},"./chaos":{"types":"./dist/Chaos.d.mts","default":"./dist/Chaos.mjs"},"./code-executor-conformance":{"types":"./dist/CodeExecutorConformance.d.mts","default":"./dist/CodeExecutorConformance.mjs"},"./code-executor-substitute":{"types":"./dist/CodeExecutorSubstitute.d.mts","default":"./dist/CodeExecutorSubstitute.mjs"},"./docs-researcher":{"types":"./dist/DocsResearcher.d.mts","default":"./dist/DocsResearcher.mjs"},"./scripted-model":{"types":"./dist/ScriptedModel.d.mts","default":"./dist/ScriptedModel.mjs"},"./travel-planner":{"types":"./dist/TravelPlanner.d.mts","default":"./dist/TravelPlanner.mjs"}},"description":"Scripted models, deterministic fixtures, and adapter conformance kits for testing Effect Agent applications.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/testing"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json","test":"vp test --passWithNoTests"}}
1
+ {"name":"@effect-agent/testing","version":"0.1.0-beta.98","dependencies":{"effect-agent":"0.1.0-beta.98"},"devDependencies":{"@effect-agent/platform-node":"0.1.0-beta.98","@effect-agent/storage-memory":"0.1.0-beta.98","@effect-agent/storage-sqlite":"0.1.0-beta.98","@effect/platform-node":"4.0.0-rc.115","@effect/sql-sqlite-node":"4.0.0-rc.115","@effect/vitest":"4.0.0-rc.115","effect":"4.0.0-rc.115","typescript":"7.0.2","vite-plus":"0.3.0"},"peerDependencies":{"effect":"^4.0.0-rc.115"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./certification":{"types":"./dist/Certification.d.mts","default":"./dist/Certification.mjs"},"./chaos":{"types":"./dist/Chaos.d.mts","default":"./dist/Chaos.mjs"},"./code-executor-conformance":{"types":"./dist/CodeExecutorConformance.d.mts","default":"./dist/CodeExecutorConformance.mjs"},"./code-executor-substitute":{"types":"./dist/CodeExecutorSubstitute.d.mts","default":"./dist/CodeExecutorSubstitute.mjs"},"./docs-researcher":{"types":"./dist/DocsResearcher.d.mts","default":"./dist/DocsResearcher.mjs"},"./scripted-model":{"types":"./dist/ScriptedModel.d.mts","default":"./dist/ScriptedModel.mjs"},"./travel-planner":{"types":"./dist/TravelPlanner.d.mts","default":"./dist/TravelPlanner.mjs"}},"description":"Scripted models, deterministic fixtures, and adapter conformance kits for testing Effect Agent applications.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/testing"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json","test":"vp test --passWithNoTests"}}
@@ -187,6 +187,12 @@ export const TIER2_UNREACHED_LOCATIONS: ReadonlyArray<DurableRuntimeFailpointLoc
187
187
  "policy:before-reservation-append",
188
188
  "policy:after-reservation-append",
189
189
  "resolve:after-intent",
190
+ // All six shapes retain their original Tool contracts, so none retires an unavailable
191
+ // operation. The deployment continuity matrix in durable-runtime.test.ts exercises the
192
+ // actual before/after-unavailable append boundaries, asserting absent/present canonical
193
+ // ToolUnavailable results at the crash and one original-call settlement after re-drive.
194
+ "tools:before-unavailable-append",
195
+ "tools:after-unavailable-append",
190
196
  "subagent:after-child-abort-intent",
191
197
  // Background workers use retained delivery, source capacity, and child-origin paths absent
192
198
  // from these six attached/ordinary scenarios. The before/after creation and completion
@@ -250,7 +250,13 @@ const plannerDecide = (promptJson: string): Stream.Stream<Response.StreamPartEnc
250
250
  * batch is committed history, every later request gets the plan — identical parts, so the DC
251
251
  * canonical evidence is byte-equivalent to the DN ScriptedModel run after normalization.
252
252
  */
253
- export const phase6PlannerModel = promptAwareModel("travel-planner-phase-4", plannerDecide);
253
+ export const phase6PlannerModel = promptAwareModel("travel-planner-phase-4", (promptJson) =>
254
+ promptJson.includes("[gate:") && !promptJson.includes(phase6FlightCallId)
255
+ ? Stream.fromEffectDrain(awaitPlannerGate(gateMarkerFromPrompt(promptJson))).pipe(
256
+ Stream.concat(plannerDecide(promptJson)),
257
+ )
258
+ : plannerDecide(promptJson),
259
+ );
254
260
 
255
261
  // ---------------------------------------------------------------------------
256
262
  // Deterministic test gate for the admission-limits rows. Module state is
@@ -548,7 +554,7 @@ export const phase6ResearcherModel = promptAwareModel("destination-researcher-p6
548
554
 
549
555
  /**
550
556
  * Every phase-6 Travel Planner worker Binding, captured with its requirement Contexts:
551
- * the P4 planner and its gated twin, the P5 booking agent over the
557
+ * one P4 planner whose prompt selects the optional test gate, the P5 booking agent over the
552
558
  * shared supplier desk, and the S2 coordinator/researcher pair wired through the durable
553
559
  * delegation Layer. A Thread Object registers these via its `bindings` option; the
554
560
  * capture runs once per incarnation, and everything stateful the assertions rely on (desk,
@@ -561,11 +567,6 @@ export const makePhase6TravelPlannerBindings: Effect.Effect<ReadonlyArray<Resolv
561
567
  phase4TravelPlannerDefinitionDigests,
562
568
  ).pipe(Effect.provide(phase4TravelPlannerWorkerLayer));
563
569
 
564
- const gatedPlanner: ResolvedBinding = yield* DurableWorkerBinding.make(
565
- Agent.withModel(TravelPlannerPhase4, phase6GatedPlannerModel),
566
- phase6GatedPlannerDefinitionDigests,
567
- ).pipe(Effect.provide(phase4TravelPlannerWorkerLayer));
568
-
569
570
  const booking: ResolvedBinding = yield* DurableWorkerBinding.make(
570
571
  Agent.withModel(TravelPlannerPhase5, phase6BookingModel),
571
572
  phase5TravelPlannerDefinitionDigests,
@@ -604,7 +605,7 @@ export const makePhase6TravelPlannerBindings: Effect.Effect<ReadonlyArray<Resolv
604
605
  s2ResearcherDigests,
605
606
  ).pipe(Effect.provide(childToolkitLayer));
606
607
 
607
- return [planner, gatedPlanner, booking, coordinator, researcher];
608
+ return [planner, booking, coordinator, researcher];
608
609
  });
609
610
 
610
611
  // ---------------------------------------------------------------------------
@@ -619,7 +620,7 @@ export const makePhase6TravelPlannerBindings: Effect.Effect<ReadonlyArray<Resolv
619
620
  * value, so the two platforms' canonical outcomes are byte-equivalent transitively — the P6
620
621
  * exit gate "Travel Planner produces equivalent canonical outcomes under DN and DC".
621
622
  *
622
- * Regenerate ONLY when the Travel Planner scenario itself changes, by printing either suite's
623
+ * Regenerate ONLY when the Travel Planner scenario or canonical protocol changes, by printing either suite's
623
624
  * normalized value; both suites must then agree on the new golden.
624
625
  */
625
626
  export const phase6TravelPlannerGoldenEvidence: Schema.Json = [
@@ -699,6 +700,29 @@ export const phase6TravelPlannerGoldenEvidence: Schema.Json = [
699
700
  deploymentId: "{deploymentId}",
700
701
  payload: {
701
702
  _tag: "ModelResponseRecorded",
703
+ toolOperations: [
704
+ {
705
+ toolCallId: "flight-call-1",
706
+ toolName: "search_flights",
707
+ executionClass: "readonly",
708
+ executionKind: "ordinary",
709
+ replay: "{digest}",
710
+ },
711
+ {
712
+ toolCallId: "lodging-call-1",
713
+ toolName: "search_lodging",
714
+ executionClass: "readonly",
715
+ executionKind: "ordinary",
716
+ replay: "{digest}",
717
+ },
718
+ {
719
+ toolCallId: "activity-call-1",
720
+ toolName: "search_activities",
721
+ executionClass: "readonly",
722
+ executionKind: "ordinary",
723
+ replay: "{digest}",
724
+ },
725
+ ],
702
726
  runId: "run:{submissionId}",
703
727
  turnId: "turn:run:{submissionId}:1",
704
728
  turn: 1,
@@ -921,6 +945,7 @@ export const phase6TravelPlannerGoldenEvidence: Schema.Json = [
921
945
  deploymentId: "{deploymentId}",
922
946
  payload: {
923
947
  _tag: "RunCompleted",
948
+ resultDigest: "{digest}",
924
949
  runId: "run:{submissionId}",
925
950
  output: {
926
951
  itineraries: [