@effect-agent/testing 0.1.0-beta.84 → 0.1.0-beta.86

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.
Files changed (42) hide show
  1. package/dist/Certification.d.mts +15 -14
  2. package/dist/Certification.mjs +85 -44
  3. package/dist/Certification.mjs.map +1 -1
  4. package/dist/Chaos.d.mts +6 -6
  5. package/dist/Chaos.mjs +20 -20
  6. package/dist/Chaos.mjs.map +1 -1
  7. package/dist/CodeExecutorConformance.d.mts +2 -2
  8. package/dist/CodeExecutorConformance.mjs +2 -2
  9. package/dist/CodeExecutorConformance.mjs.map +1 -1
  10. package/dist/CodeExecutorSubstitute.d.mts +2 -2
  11. package/dist/CodeExecutorSubstitute.mjs +2 -2
  12. package/dist/CodeExecutorSubstitute.mjs.map +1 -1
  13. package/dist/DocsResearcher.d.mts +25 -19
  14. package/dist/DocsResearcher.mjs +15 -15
  15. package/dist/DocsResearcher.mjs.map +1 -1
  16. package/dist/ScriptedModel.mjs +1 -1
  17. package/dist/ScriptedModel.mjs.map +1 -1
  18. package/dist/TravelPlanner.d.mts +47 -32
  19. package/dist/TravelPlanner.mjs +21 -21
  20. package/dist/TravelPlanner.mjs.map +1 -1
  21. package/dist/{deterministic-layers-Eka0fMZq.mjs → deterministic-layers-D5owIoke.mjs} +8 -8
  22. package/dist/deterministic-layers-D5owIoke.mjs.map +1 -0
  23. package/package.json +1 -1
  24. package/src/Certification.ts +160 -99
  25. package/src/Chaos.ts +21 -31
  26. package/src/CodeExecutorConformance.ts +3 -3
  27. package/src/CodeExecutorSubstitute.ts +3 -3
  28. package/src/ScriptedModel.ts +3 -4
  29. package/src/fixtures/docs-researcher/definition.ts +6 -6
  30. package/src/fixtures/docs-researcher/harness.ts +9 -13
  31. package/src/fixtures/docs-researcher/mcp.ts +3 -3
  32. package/src/fixtures/travel-planner/definition.ts +2 -2
  33. package/src/fixtures/travel-planner/deterministic-layers.ts +5 -5
  34. package/src/fixtures/travel-planner/phase2.ts +2 -2
  35. package/src/fixtures/travel-planner/phase3.ts +5 -5
  36. package/src/fixtures/travel-planner/phase4.ts +8 -8
  37. package/src/fixtures/travel-planner/phase5.ts +9 -13
  38. package/src/fixtures/travel-planner/phase6.ts +10 -10
  39. package/src/fixtures/travel-planner/subagents-durable.ts +11 -13
  40. package/src/fixtures/travel-planner/subagents.ts +6 -6
  41. package/src/internal/certification-report.ts +25 -0
  42. package/dist/deterministic-layers-Eka0fMZq.mjs.map +0 -1
@@ -1,21 +1,20 @@
1
1
  import { f as ScriptedTurnInput, r as ScriptedModel } from "./ScriptedModel-DAvxIiud.mjs";
2
2
  import { Context, Effect, Layer, Option, Schema } from "effect";
3
3
  import { LanguageModel, Model, Response, Tool, Toolkit } from "effect/unstable/ai";
4
- import * as Subagent from "@effect-agent/capabilities/Subagent";
5
- import { SubagentPolicy } from "@effect-agent/capabilities/Subagent";
6
- import * as Agent from "@effect-agent/core/Agent";
7
- import { ThreadId } from "@effect-agent/core/Identifiers";
8
- import { IdGenerator } from "@effect-agent/core/IdGenerator";
9
- import { DurableStep, DurableStepError } from "@effect-agent/engine/DurableStep";
10
- import { ResolvedBinding } from "@effect-agent/thread/AgentRegistration";
11
- import { DurableSubmitOptions, Receipt } from "@effect-agent/thread/DurableAgentRuntime";
12
- import { CanonicalBatch, CanonicalRecordEnvelope, DefinitionDigests, ProducerId } from "@effect-agent/thread/Records";
13
- import { IdempotencyKey } from "@effect-agent/thread/SubmissionLedger";
14
- import { ThreadCheckpoint } from "@effect-agent/thread/ThreadStore";
15
- import { ToolReconciler } from "@effect-agent/thread/ToolReconciler";
16
- import { RuntimeBinding } from "@effect-agent/engine/AgentRuntime";
17
- import { ThreadHistory } from "@effect-agent/engine/ThreadHistory";
18
- import { ThreadProjection } from "@effect-agent/thread/ThreadProjection";
4
+ import * as Agent from "effect-agent/agent";
5
+ import { ResolvedBinding } from "effect-agent/agent-registration";
6
+ import { DurableSubmitOptions, Receipt } from "effect-agent/durable-agent-runtime";
7
+ import { DurableStep, DurableStepError } from "effect-agent/durable-step";
8
+ import { ThreadId } from "effect-agent/identifiers";
9
+ import { CanonicalBatch, CanonicalRecordEnvelope, DefinitionDigests, ProducerId } from "effect-agent/records";
10
+ import * as Subagent from "effect-agent/subagent";
11
+ import { SubagentPolicy } from "effect-agent/subagent";
12
+ import { IdempotencyKey } from "effect-agent/submission-ledger";
13
+ import { ThreadCheckpoint } from "effect-agent/thread-store";
14
+ import { ToolReconciler } from "effect-agent/tool-reconciler";
15
+ import { RuntimeBinding } from "effect-agent/agent-runtime";
16
+ import { ThreadHistory } from "effect-agent/thread-history";
17
+ import { ThreadProjection } from "effect-agent/thread-projection";
19
18
  //#region src/fixtures/travel-planner/definition.d.ts
20
19
  declare const AirportCode: Schema.brand<Schema.NonEmptyString, "@effect-agent/testing/travel-planner/AirportCode">;
21
20
  type AirportCode = typeof AirportCode.Type;
@@ -202,7 +201,9 @@ declare const TravelPlanner: Agent.Definition<typeof TripRequest, typeof TravelP
202
201
  readonly failure: typeof LodgingUnavailable;
203
202
  readonly failureMode: "error";
204
203
  }, LodgingCatalog>;
205
- }>, undefined, undefined>;
204
+ }>, undefined, undefined, undefined> & {
205
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-planner";
206
+ };
206
207
  //#endregion
207
208
  //#region src/fixtures/travel-planner/deterministic-layers.d.ts
208
209
  declare const CatalogLifecycleCounts_base: Schema.Class<CatalogLifecycleCounts, Schema.Struct<{
@@ -330,8 +331,8 @@ declare class SupplierBookingDesk extends SupplierBookingDesk_base {
330
331
  static readonly layer: Layer.Layer<SupplierBookingDesk>;
331
332
  }
332
333
  declare const TravelGuidanceLayer: Layer.Layer<TravelGuidance, never, never>;
333
- declare const DeterministicIdGeneratorLayer: Layer.Layer<IdGenerator, never, never>;
334
- declare const TravelPlannerRuntimeLayer: Layer.Layer<ActivityCatalog | FlightCatalog | IdGenerator | LodgingCatalog | import("@effect-agent/engine/RunOptions").RunContextPreparation | ThreadHistory | TravelGuidance | import("effect/unstable/ai/Tool").HandlersFor<{
334
+ declare const DeterministicIdGeneratorLayer: Layer.Layer<never, never, never>;
335
+ declare const TravelPlannerRuntimeLayer: Layer.Layer<ActivityCatalog | FlightCatalog | LodgingCatalog | import("effect-agent/run-options").RunContextPreparation | import("effect-agent/thread").Store | ThreadHistory | TravelGuidance | import("effect/unstable/ai/Tool").HandlersFor<{
335
336
  readonly search_activities: import("effect/unstable/ai/Tool").Tool<"search_activities", {
336
337
  readonly parameters: typeof ActivityQuery;
337
338
  readonly success: typeof ActivitySearchResult;
@@ -460,7 +461,9 @@ declare const TravelPlannerPhase2: Agent.Definition<typeof TripRequest, typeof T
460
461
  readonly failure: typeof LodgingUnavailable;
461
462
  readonly failureMode: "error";
462
463
  }, LodgingCatalog>;
463
- }>, undefined, undefined>;
464
+ }>, undefined, undefined, undefined> & {
465
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-planner-phase-2";
466
+ };
464
467
  //#endregion
465
468
  //#region src/fixtures/travel-planner/phase3.d.ts
466
469
  declare const phase3TravelPlannerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
@@ -648,7 +651,9 @@ declare const TravelPlannerPhase4: Agent.Definition<typeof TripRequest, typeof T
648
651
  readonly failure: typeof LodgingUnavailable;
649
652
  readonly failureMode: "error";
650
653
  }, LodgingCatalog>;
651
- }>, undefined, undefined>;
654
+ }>, undefined, undefined, undefined> & {
655
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-planner-phase-4";
656
+ };
652
657
  /**
653
658
  * The P4 Agent Binding: the durable Travel Planner definition bound to a finite scripted model.
654
659
  * The scripted Layer is rebuilt per Run, so every Run of one Binding replays the same
@@ -688,7 +693,9 @@ declare const makePhase4TravelPlannerAgent: (turns?: ReadonlyArray<ScriptedTurnI
688
693
  readonly failure: typeof LodgingUnavailable;
689
694
  readonly failureMode: "error";
690
695
  }, LodgingCatalog>;
691
- }>, undefined, undefined>, Model.Model<"scripted", import("effect/unstable/ai/LanguageModel").LanguageModel | ScriptedModel, never>>;
696
+ }>, undefined, undefined, undefined> & {
697
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-planner-phase-4";
698
+ }, Model.Model<"scripted", import("effect/unstable/ai/LanguageModel").LanguageModel | ScriptedModel, never>>;
692
699
  /**
693
700
  * Everything a durable worker needs beyond the runtime stack, reusing the deterministic P1
694
701
  * travel-service Layers. The durable coordinator supplies its own deterministic `IdGenerator`,
@@ -1030,7 +1037,9 @@ declare const TravelPlannerPhase5: Agent.Definition<typeof TripRequest, typeof T
1030
1037
  readonly failure: typeof LodgingUnavailable;
1031
1038
  readonly failureMode: "error";
1032
1039
  }, LodgingCatalog>;
1033
- }>, undefined, undefined>;
1040
+ }>, undefined, undefined, undefined> & {
1041
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-planner-phase-5";
1042
+ };
1034
1043
  declare const TravelPlannerBookingEvidenceError_base: Schema.Class<TravelPlannerBookingEvidenceError, Schema.TaggedStruct<"TravelPlannerBookingEvidenceError", {
1035
1044
  readonly message: Schema.String;
1036
1045
  }>, import("effect/Cause").YieldableError>;
@@ -1155,7 +1164,9 @@ declare const DestinationResearcher: Agent.Definition<typeof DestinationBrief, t
1155
1164
  readonly failure: typeof DestinationGuideUnavailable;
1156
1165
  readonly failureMode: "error";
1157
1166
  }, DestinationGuide>;
1158
- }>, undefined, undefined>;
1167
+ }>, undefined, undefined, undefined> & {
1168
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "destination-researcher";
1169
+ };
1159
1170
  /** Deterministic guide lookup shared by the default and test-local guide Layers. */
1160
1171
  declare const destinationLookup: (query: DestinationQuery) => Effect.Effect<DestinationFacts, DestinationGuideUnavailable>;
1161
1172
  /** The report the scripted researcher writes after consulting the guide. */
@@ -1212,7 +1223,9 @@ declare const destinationResearchDelegation: Subagent.SubagentDelegation<"delega
1212
1223
  readonly failure: typeof DestinationGuideUnavailable;
1213
1224
  readonly failureMode: "error";
1214
1225
  }, DestinationGuide>;
1215
- }>, undefined, undefined>;
1226
+ }>, undefined, undefined, undefined> & {
1227
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "destination-researcher";
1228
+ };
1216
1229
  };
1217
1230
  /** Total mapping from every expected child Run failure to the declared Tool failure (SUB-028). */
1218
1231
  declare const mapResearchChildFailure: (failure: {
@@ -1228,7 +1241,7 @@ declare const destinationResearchHandlersLayer: <Provider, ModelProvides, ModelR
1228
1241
  }, DestinationGuide>;
1229
1242
  }, Provider, ModelProvides, ModelRequires, ResearchDispatchGate, never, never, {
1230
1243
  readonly _tag: string;
1231
- }, never, undefined>>;
1244
+ }, never, undefined, undefined, undefined>>;
1232
1245
  declare const ResearchMission_base: Schema.Class<ResearchMission, Schema.Struct<{
1233
1246
  readonly request: Schema.NonEmptyString;
1234
1247
  readonly candidates: Schema.$Array<Schema.brand<Schema.NonEmptyString, "@effect-agent/testing/travel-planner/AirportCode">>;
@@ -1253,7 +1266,7 @@ declare const TravelCoordinatorToolkit: Toolkit.Toolkit<{
1253
1266
  readonly success: typeof DestinationResearchFindings;
1254
1267
  readonly failure: Subagent.SubagentToolFailure<typeof DestinationResearchFailed>;
1255
1268
  readonly failureMode: "error";
1256
- }, import("@effect-agent/engine/AgentRuntime").AgentSpawner | import("@effect-agent/core/IdGenerator").IdGenerator | import("@effect-agent/engine/RunEventSink").RunEventSink | import("@effect-agent/engine/AgentRuntime").SubagentDurability>;
1269
+ }, import("effect-agent/agent-runtime").AgentSpawner | import("effect-agent/run-event-sink").RunEventSink | import("effect-agent/agent-runtime").SubagentDurability>;
1257
1270
  }>;
1258
1271
  declare const TravelCoordinator: Agent.Definition<typeof ResearchMission, typeof DestinationShortlist, string, Toolkit.Toolkit<{
1259
1272
  readonly delegate_destination_research: Tool.Tool<"delegate_destination_research", {
@@ -1261,8 +1274,10 @@ declare const TravelCoordinator: Agent.Definition<typeof ResearchMission, typeof
1261
1274
  readonly success: typeof DestinationResearchFindings;
1262
1275
  readonly failure: Subagent.SubagentToolFailure<typeof DestinationResearchFailed>;
1263
1276
  readonly failureMode: "error";
1264
- }, import("@effect-agent/engine/AgentRuntime").AgentSpawner | import("@effect-agent/core/IdGenerator").IdGenerator | import("@effect-agent/engine/RunEventSink").RunEventSink | import("@effect-agent/engine/AgentRuntime").SubagentDurability>;
1265
- }>, undefined, undefined>;
1277
+ }, import("effect-agent/agent-runtime").AgentSpawner | import("effect-agent/run-event-sink").RunEventSink | import("effect-agent/agent-runtime").SubagentDurability>;
1278
+ }>, undefined, undefined, undefined> & {
1279
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-coordinator";
1280
+ };
1266
1281
  declare const researchMission: ResearchMission;
1267
1282
  declare const expectedDestinationShortlist: DestinationShortlist;
1268
1283
  interface DestinationResearchCall {
@@ -1575,7 +1590,7 @@ declare const s2TravelPlannerSubmitOptions: (threadId: ThreadId, idempotencyKey:
1575
1590
  /** The structural submit slice of the coordinator Binding (`DurableAgentRuntime.submit`). */
1576
1591
  declare const s2CoordinatorSubmitAgent: {
1577
1592
  readonly definition: {
1578
- readonly id: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
1593
+ readonly id: import("effect/Brand").Brand<"@effect-agent/core/AgentId"> & "travel-coordinator";
1579
1594
  readonly input: typeof ResearchMission;
1580
1595
  };
1581
1596
  };
@@ -1585,7 +1600,7 @@ declare const s2CoordinatorSubmitAgent: {
1585
1600
  * evidence in the S2 tests checks the ledger reservation rows and the
1586
1601
  * canonical `SubagentJoined.finalAccounting` against exactly this value.
1587
1602
  */
1588
- declare const durableResearchAllocation: import("@effect-agent/core/SubagentContract").SubagentReservationAmounts;
1603
+ declare const durableResearchAllocation: import("effect-agent/subagent-contract").SubagentReservationAmounts;
1589
1604
  /** The one scripted delegation Tool Call id of the durable coordinator Run. */
1590
1605
  declare const durableResearchCallId = "research-lhr-1";
1591
1606
  /** The child's own scripted guide-lookup Tool Call id. */
@@ -1611,7 +1626,7 @@ declare const makeInvocationCountingModel: (name: string, script: (call: number)
1611
1626
  prompts: Effect.Effect<readonly string[], never, never>;
1612
1627
  }, never, never>;
1613
1628
  /** Runtime wiring for the durable slice: the S1 delegation plus the S2 digest declaration. */
1614
- declare const durableDestinationResearchHandlersLayer: <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof DestinationBrief, typeof DestinationReport, string, Toolkit.Tools<typeof DestinationResearcherToolkit>, Provider, ModelProvides, ModelRequires>) => Layer.Layer<import("effect/unstable/ai/Tool").Handler<"delegate_destination_research">, never, import("@effect-agent/capabilities/Subagent").SubagentLayerRequirements<typeof DestinationBrief, typeof DestinationReport, string, {
1629
+ declare const durableDestinationResearchHandlersLayer: <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof DestinationBrief, typeof DestinationReport, string, Toolkit.Tools<typeof DestinationResearcherToolkit>, Provider, ModelProvides, ModelRequires>) => Layer.Layer<import("effect/unstable/ai/Tool").Handler<"delegate_destination_research">, never, Subagent.SubagentLayerRequirements<typeof DestinationBrief, typeof DestinationReport, string, {
1615
1630
  readonly lookup_destination: import("effect/unstable/ai/Tool").Tool<"lookup_destination", {
1616
1631
  readonly parameters: typeof DestinationQuery;
1617
1632
  readonly success: typeof DestinationFacts;
@@ -1620,7 +1635,7 @@ declare const durableDestinationResearchHandlersLayer: <Provider, ModelProvides,
1620
1635
  }, DestinationGuide>;
1621
1636
  }, Provider, ModelProvides, ModelRequires, ResearchDispatchGate, never, never, {
1622
1637
  readonly _tag: string;
1623
- }, never, undefined>>;
1638
+ }, never, undefined, undefined, undefined>>;
1624
1639
  /** Optional overrides for one durable research harness. */
1625
1640
  interface DurableResearchHarnessOptions {
1626
1641
  /** Researched destination; defaults to "LHR". */
@@ -1,22 +1,22 @@
1
1
  import { ScriptedModel } from "./ScriptedModel.mjs";
2
- import { A as LodgingQuery, B as TravelPlannerToolkitLayer, C as FlightOption, D as Itinerary, E as GuidanceFailure, F as SearchLodging, I as TravelGuidance, L as TravelPlan, M as QuoteId, N as SearchActivities, O as LodgingCatalog, P as SearchFlights, R as TravelPlanner, S as FlightCatalog, T as FlightUnavailable, V as TripRequest, _ as ActivityCatalog, a as DeterministicIdGeneratorLayer, b as ActivityUnavailable, c as ReverseCompletionToolkitLayer, d as SupplierOperation, f as SupplierUnavailable, g as supplierBookingRefFor, h as cancelBookingIdempotencyKey, i as CatalogLifecycleCounts, j as LodgingUnavailable, k as LodgingOption, l as SupplierBookingDesk, m as TravelPlannerRuntimeLayer, n as BookingRef, o as FlightCatalogLayer, p as TravelGuidanceLayer, r as CatalogLifecycle, s as LodgingCatalogLayer, t as ActivityCatalogLayer, u as SupplierBookingRecord, v as ActivityQuery, w as FlightQuery, x as AirportCode, y as ActivitySearchResult, z as TravelPlannerToolkit } from "./deterministic-layers-Eka0fMZq.mjs";
2
+ import { A as LodgingQuery, B as TravelPlannerToolkitLayer, C as FlightOption, D as Itinerary, E as GuidanceFailure, F as SearchLodging, I as TravelGuidance, L as TravelPlan, M as QuoteId, N as SearchActivities, O as LodgingCatalog, P as SearchFlights, R as TravelPlanner, S as FlightCatalog, T as FlightUnavailable, V as TripRequest, _ as ActivityCatalog, a as DeterministicIdGeneratorLayer, b as ActivityUnavailable, c as ReverseCompletionToolkitLayer, d as SupplierOperation, f as SupplierUnavailable, g as supplierBookingRefFor, h as cancelBookingIdempotencyKey, i as CatalogLifecycleCounts, j as LodgingUnavailable, k as LodgingOption, l as SupplierBookingDesk, m as TravelPlannerRuntimeLayer, n as BookingRef, o as FlightCatalogLayer, p as TravelGuidanceLayer, r as CatalogLifecycle, s as LodgingCatalogLayer, t as ActivityCatalogLayer, u as SupplierBookingRecord, v as ActivityQuery, w as FlightQuery, x as AirportCode, y as ActivitySearchResult, z as TravelPlannerToolkit } from "./deterministic-layers-D5owIoke.mjs";
3
3
  import { Context, Deferred, Duration, Effect, Layer, Option, Ref, Schema, Stream } from "effect";
4
4
  import { LanguageModel, Model, Tool, Toolkit } from "effect/unstable/ai";
5
- import * as Subagent from "@effect-agent/capabilities/Subagent";
6
- import { SubagentPolicy, SubagentRuntime, delegationAllocationFromPolicy } from "@effect-agent/capabilities/Subagent";
7
- import { SubagentReservationsMemoryLive } from "@effect-agent/capabilities/SubagentReservations";
8
- import * as Agent from "@effect-agent/core/Agent";
9
- import { AgentPolicy } from "@effect-agent/core/AgentPolicy";
10
- import { AgentId, RunId, SubmissionId, ThreadId } from "@effect-agent/core/Identifiers";
11
- import { DurableStep, DurableStepError, ToolExecutionClass } from "@effect-agent/engine/DurableStep";
12
- import { DurableWorkerBinding } from "@effect-agent/thread/AgentRegistration";
13
- import "@effect-agent/thread/DurableAgentRuntime";
14
- import { BatchId, CanonicalBatch, CanonicalRecordEnvelope, DefinitionDigests, DeploymentId, Digest, PersistedJson, ProducerId, RecordEnvelope, RecordId } from "@effect-agent/thread/Records";
15
- import { Principal } from "@effect-agent/thread/SubmissionLedger";
16
- import { ThreadCheckpoint } from "@effect-agent/thread/ThreadStore";
17
- import { ReconciliationCompleted, ReconciliationSafeToRetry, ReconciliationUncertain, ToolReconciler, ToolReconcilerError } from "@effect-agent/thread/ToolReconciler";
18
- import "@effect-agent/engine/AgentRuntime";
19
- import { ThreadProjection } from "@effect-agent/thread/ThreadProjection";
5
+ import * as Agent from "effect-agent/agent";
6
+ import { AgentPolicy } from "effect-agent/agent-policy";
7
+ import { DurableWorkerBinding } from "effect-agent/agent-registration";
8
+ import "effect-agent/durable-agent-runtime";
9
+ import { DurableStep, DurableStepError, ToolExecutionClass } from "effect-agent/durable-step";
10
+ import { AgentId, RunId, SubmissionId, ThreadId } from "effect-agent/identifiers";
11
+ import { BatchId, CanonicalBatch, CanonicalRecordEnvelope, DefinitionDigests, DeploymentId, Digest, PersistedJson, ProducerId, RecordEnvelope, RecordId } from "effect-agent/records";
12
+ import * as Subagent from "effect-agent/subagent";
13
+ import { SubagentPolicy, delegationAllocationFromPolicy } from "effect-agent/subagent";
14
+ import { SubagentReservationsMemoryLive } from "effect-agent/subagent-reservations";
15
+ import { Principal } from "effect-agent/submission-ledger";
16
+ import { ThreadCheckpoint } from "effect-agent/thread-store";
17
+ import { ReconciliationCompleted, ReconciliationSafeToRetry, ReconciliationUncertain, ToolReconciler, ToolReconcilerError } from "effect-agent/tool-reconciler";
18
+ import "effect-agent/agent-runtime";
19
+ import { ThreadProjection } from "effect-agent/thread-projection";
20
20
  //#region src/fixtures/travel-planner/phase2.ts
21
21
  var ItineraryHoldRequest = class extends Schema.Class("@effect-agent/testing/travel-planner/ItineraryHoldRequest")({
22
22
  quoteId: QuoteId,
@@ -769,7 +769,7 @@ const destinationResearchDelegation = Subagent.define("delegate_destination_rese
769
769
  /** Total mapping from every expected child Run failure to the declared Tool failure (SUB-028). */
770
770
  const mapResearchChildFailure = (failure) => DestinationResearchFailed.make({ childErrorTag: failure._tag });
771
771
  /** Runtime wiring: pair the immutable delegation with one explicit child Binding. */
772
- const destinationResearchHandlersLayer = (childBinding) => SubagentRuntime.layer(destinationResearchDelegation, childBinding, { mapChildFailure: mapResearchChildFailure });
772
+ const destinationResearchHandlersLayer = (childBinding) => Subagent.layer(destinationResearchDelegation, childBinding, { mapChildFailure: mapResearchChildFailure });
773
773
  var ResearchMission = class extends Schema.Class("ResearchMission")({
774
774
  request: Schema.NonEmptyString,
775
775
  candidates: Schema.Array(AirportCode).check(Schema.isMinLength(1))
@@ -1151,7 +1151,7 @@ const researcherReportParts$1 = (destination) => [
1151
1151
  }
1152
1152
  ];
1153
1153
  /** Runtime wiring for the durable slice: the S1 delegation plus the S2 digest declaration. */
1154
- const durableDestinationResearchHandlersLayer = (childBinding) => SubagentRuntime.layer(destinationResearchDelegation, childBinding, {
1154
+ const durableDestinationResearchHandlersLayer = (childBinding) => Subagent.layer(destinationResearchDelegation, childBinding, {
1155
1155
  mapChildFailure: mapResearchChildFailure,
1156
1156
  durable: { targetDigests: s2ResearcherDigestStrings }
1157
1157
  });
@@ -1344,7 +1344,7 @@ const awaitPlannerGate = (marker) => Effect.gen(function* () {
1344
1344
  });
1345
1345
  const gateMarkerFromPrompt = (promptJson) => /\[gate:([^\]]+)\]/.exec(promptJson)?.[1] ?? "unknown-gate";
1346
1346
  /** A trip whose request text carries the gate marker the gated model waits on. */
1347
- const phase6GatedTrip = (marker) => Schema.decodeUnknownSync(TripRequest)({
1347
+ const phase6GatedTrip = (marker) => Schema.decodeSync(TripRequest)({
1348
1348
  request: `Plan a review-only London trip, but wait for the concierge. [gate:${marker}]`,
1349
1349
  origin: "SFO",
1350
1350
  destination: "LHR",
@@ -1384,7 +1384,7 @@ const phase6BookingToolCallId = (marker) => `book-${marker}`;
1384
1384
  /** The bookingRef the supplier desk mints for one marker's approved booking. */
1385
1385
  const phase6BookingRef = (marker) => supplierBookingRefFor(bookFlightIdempotencyKey(phase6BookingToolCallId(marker)));
1386
1386
  /** A trip whose request text carries the per-lane booking case marker. */
1387
- const phase6BookingTrip = (marker) => Schema.decodeUnknownSync(TripRequest)({
1387
+ const phase6BookingTrip = (marker) => Schema.decodeSync(TripRequest)({
1388
1388
  request: `Book the approved London flight for the traveler. [case:${marker}]`,
1389
1389
  origin: "SFO",
1390
1390
  destination: "LHR",
@@ -1450,7 +1450,7 @@ const countingGuideLayer = Layer.succeed(DestinationGuide, DestinationGuide.of({
1450
1450
  return destinationLookup(query);
1451
1451
  }) }));
1452
1452
  /** The one-candidate research mission of the DC delegation slice. */
1453
- const phase6ResearchMission = Schema.decodeUnknownSync(ResearchMission)({
1453
+ const phase6ResearchMission = Schema.decodeSync(ResearchMission)({
1454
1454
  request: "Shortlist one September culture city for the DC delegation slice.",
1455
1455
  candidates: ["LHR"]
1456
1456
  });