@effect-agent/testing 0.0.1-beta.2 → 0.0.1-beta.3

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,8 +1,8 @@
1
1
  {
2
2
  "name": "@effect-agent/testing",
3
- "version": "0.0.1-beta.2",
3
+ "version": "0.0.1-beta.3",
4
4
  "description": "Scripted models, deterministic fixtures, and adapter conformance kits for testing Effect Agent applications.",
5
- "license": "UNLICENSED",
5
+ "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/danieljvdm/effect-agent.git",
@@ -28,19 +28,19 @@
28
28
  "test": "vp test --passWithNoTests"
29
29
  },
30
30
  "dependencies": {
31
- "@effect-agent/capabilities": "0.0.1-beta.2",
32
- "@effect-agent/core": "0.0.1-beta.2",
33
- "@effect-agent/engine": "0.0.1-beta.2",
34
- "@effect-agent/platform-node": "0.0.1-beta.2",
35
- "@effect-agent/session": "0.0.1-beta.2",
36
- "@effect-agent/storage-memory": "0.0.1-beta.2",
37
- "@effect-agent/storage-sqlite": "0.0.1-beta.2",
38
- "effect": "4.0.0-beta.105"
31
+ "@effect-agent/capabilities": "0.0.1-beta.3",
32
+ "@effect-agent/core": "0.0.1-beta.3",
33
+ "@effect-agent/engine": "0.0.1-beta.3",
34
+ "@effect-agent/platform-node": "0.0.1-beta.3",
35
+ "@effect-agent/session": "0.0.1-beta.3",
36
+ "@effect-agent/storage-memory": "0.0.1-beta.3",
37
+ "@effect-agent/storage-sqlite": "0.0.1-beta.3",
38
+ "effect": "4.0.0-beta.102"
39
39
  },
40
40
  "devDependencies": {
41
- "@effect/platform-node": "4.0.0-beta.105",
42
- "@effect/sql-sqlite-node": "4.0.0-beta.105",
43
- "@effect/vitest": "4.0.0-beta.105",
41
+ "@effect/platform-node": "4.0.0-beta.102",
42
+ "@effect/sql-sqlite-node": "4.0.0-beta.102",
43
+ "@effect/vitest": "4.0.0-beta.102",
44
44
  "typescript": "7.0.2",
45
45
  "vite-plus": "0.2.6"
46
46
  }
@@ -334,7 +334,7 @@ const childDefinition = Agent.define("certify-child", {
334
334
  }),
335
335
  });
336
336
 
337
- class CertifyDelegationFailed extends Schema.TaggedError<CertifyDelegationFailed>()(
337
+ class CertifyDelegationFailed extends Schema.TaggedErrorClass<CertifyDelegationFailed>()(
338
338
  "CertifyDelegationFailed",
339
339
  { childErrorTag: Schema.String },
340
340
  ) {}
package/src/chaos.ts CHANGED
@@ -161,7 +161,7 @@ export class ChaosPlanReport extends Schema.Class<ChaosPlanReport>(
161
161
  }) {}
162
162
 
163
163
  /** Typed convergence/verification failure of one chaos plan (never a bare defect). */
164
- export class ChaosConvergenceFailure extends Schema.TaggedError<ChaosConvergenceFailure>()(
164
+ export class ChaosConvergenceFailure extends Schema.TaggedErrorClass<ChaosConvergenceFailure>()(
165
165
  "ChaosConvergenceFailure",
166
166
  {
167
167
  seed: Schema.Int,
@@ -423,7 +423,7 @@ const childDefinition = Agent.define("chaos-child", {
423
423
  }),
424
424
  });
425
425
 
426
- class ChaosDelegationFailed extends Schema.TaggedError<ChaosDelegationFailed>()(
426
+ class ChaosDelegationFailed extends Schema.TaggedErrorClass<ChaosDelegationFailed>()(
427
427
  "ChaosDelegationFailed",
428
428
  { childErrorTag: Schema.String },
429
429
  ) {}
@@ -34,7 +34,7 @@ export class ResearchDocument extends Schema.Class<ResearchDocument>("ResearchDo
34
34
  body: BoundedBody,
35
35
  }) {}
36
36
 
37
- export class DocumentUnavailable extends Schema.TaggedError<DocumentUnavailable>()(
37
+ export class DocumentUnavailable extends Schema.TaggedErrorClass<DocumentUnavailable>()(
38
38
  "DocumentUnavailable",
39
39
  {
40
40
  documentId: ResearchDocumentId,
@@ -212,7 +212,7 @@ export class SummaryFinding extends Schema.Class<SummaryFinding>("SummaryFinding
212
212
  summary: BoundedSummary,
213
213
  }) {}
214
214
 
215
- export class DocumentSummaryFailed extends Schema.TaggedError<DocumentSummaryFailed>()(
215
+ export class DocumentSummaryFailed extends Schema.TaggedErrorClass<DocumentSummaryFailed>()(
216
216
  "DocumentSummaryFailed",
217
217
  {
218
218
  childErrorTag: Schema.NonEmptyString,
@@ -84,19 +84,19 @@ export class TravelPlan extends Schema.Class<TravelPlan>("TravelPlan")({
84
84
  }) {}
85
85
 
86
86
  const unavailableFields = { query: Schema.String, message: Schema.String };
87
- export class FlightUnavailable extends Schema.TaggedError<FlightUnavailable>()(
87
+ export class FlightUnavailable extends Schema.TaggedErrorClass<FlightUnavailable>()(
88
88
  "FlightUnavailable",
89
89
  unavailableFields,
90
90
  ) {}
91
- export class LodgingUnavailable extends Schema.TaggedError<LodgingUnavailable>()(
91
+ export class LodgingUnavailable extends Schema.TaggedErrorClass<LodgingUnavailable>()(
92
92
  "LodgingUnavailable",
93
93
  unavailableFields,
94
94
  ) {}
95
- export class ActivityUnavailable extends Schema.TaggedError<ActivityUnavailable>()(
95
+ export class ActivityUnavailable extends Schema.TaggedErrorClass<ActivityUnavailable>()(
96
96
  "ActivityUnavailable",
97
97
  unavailableFields,
98
98
  ) {}
99
- export class GuidanceFailure extends Schema.TaggedError<GuidanceFailure>()("GuidanceFailure", {
99
+ export class GuidanceFailure extends Schema.TaggedErrorClass<GuidanceFailure>()("GuidanceFailure", {
100
100
  message: Schema.String,
101
101
  }) {}
102
102
 
@@ -196,7 +196,7 @@ export class SupplierBookingRecord extends Schema.Class<SupplierBookingRecord>(
196
196
  status: Schema.Literals(["confirmed", "cancelled"]),
197
197
  }) {}
198
198
 
199
- export class SupplierUnavailable extends Schema.TaggedError<SupplierUnavailable>()(
199
+ export class SupplierUnavailable extends Schema.TaggedErrorClass<SupplierUnavailable>()(
200
200
  "SupplierUnavailable",
201
201
  { message: Schema.String },
202
202
  ) {}
@@ -331,13 +331,7 @@ export class SupplierBookingDesk extends Context.Service<
331
331
  const cancelled =
332
332
  existing.status === "cancelled"
333
333
  ? existing
334
- : SupplierBookingRecord.make({
335
- bookingRef: existing.bookingRef,
336
- idempotencyKey: existing.idempotencyKey,
337
- operation: existing.operation,
338
- detail: existing.detail,
339
- status: "cancelled",
340
- });
334
+ : SupplierBookingRecord.make({ ...existing, status: "cancelled" });
341
335
  const bookings = new Map(current.bookings).set(storeKey, cancelled);
342
336
  const hold = Option.fromNullishOr(current.holds.get(key));
343
337
  const holds = Option.isSome(hold)
@@ -30,7 +30,7 @@ export class ItineraryHold extends Schema.Class<ItineraryHold>(
30
30
  status: Schema.Literal("held"),
31
31
  }) {}
32
32
 
33
- export class ItineraryHoldUnavailable extends Schema.TaggedError<ItineraryHoldUnavailable>()(
33
+ export class ItineraryHoldUnavailable extends Schema.TaggedErrorClass<ItineraryHoldUnavailable>()(
34
34
  "ItineraryHoldUnavailable",
35
35
  {
36
36
  quoteId: QuoteId,
@@ -119,7 +119,7 @@ export const phase3TravelPlannerEncodedFixture = Schema.encodeSync(Schema.Array(
119
119
  phase3TravelPlannerBatches,
120
120
  );
121
121
 
122
- export class TravelPlannerProjectionError extends Schema.TaggedError<TravelPlannerProjectionError>()(
122
+ export class TravelPlannerProjectionError extends Schema.TaggedErrorClass<TravelPlannerProjectionError>()(
123
123
  "TravelPlannerProjectionError",
124
124
  { message: Schema.String },
125
125
  ) {}
@@ -190,7 +190,7 @@ export const phase4TravelPlannerWorkerLayer = Layer.mergeAll(
190
190
  TravelGuidanceLayer,
191
191
  ).pipe(Layer.provide(CatalogLifecycle.layerNoDeps));
192
192
 
193
- export class TravelPlannerDurableEvidenceError extends Schema.TaggedError<TravelPlannerDurableEvidenceError>()(
193
+ export class TravelPlannerDurableEvidenceError extends Schema.TaggedErrorClass<TravelPlannerDurableEvidenceError>()(
194
194
  "TravelPlannerDurableEvidenceError",
195
195
  { message: Schema.String },
196
196
  ) {}
@@ -405,7 +405,7 @@ export const TravelPlannerPhase5 = Agent.define("travel-planner-phase-5", {
405
405
  metadata: { deploymentClass: "DN", phase: "P5" },
406
406
  });
407
407
 
408
- export class TravelPlannerBookingEvidenceError extends Schema.TaggedError<TravelPlannerBookingEvidenceError>()(
408
+ export class TravelPlannerBookingEvidenceError extends Schema.TaggedErrorClass<TravelPlannerBookingEvidenceError>()(
409
409
  "TravelPlannerBookingEvidenceError",
410
410
  { message: Schema.String },
411
411
  ) {}
@@ -25,7 +25,7 @@ export class DestinationFacts extends Schema.Class<DestinationFacts>("Destinatio
25
25
  advisory: Schema.NonEmptyString,
26
26
  }) {}
27
27
 
28
- export class DestinationGuideUnavailable extends Schema.TaggedError<DestinationGuideUnavailable>()(
28
+ export class DestinationGuideUnavailable extends Schema.TaggedErrorClass<DestinationGuideUnavailable>()(
29
29
  "DestinationGuideUnavailable",
30
30
  {
31
31
  destination: AirportCode,
@@ -177,7 +177,7 @@ export class DestinationResearchFindings extends Schema.Class<DestinationResearc
177
177
  summary: Schema.NonEmptyString,
178
178
  }) {}
179
179
 
180
- export class DestinationResearchFailed extends Schema.TaggedError<DestinationResearchFailed>()(
180
+ export class DestinationResearchFailed extends Schema.TaggedErrorClass<DestinationResearchFailed>()(
181
181
  "DestinationResearchFailed",
182
182
  {
183
183
  childErrorTag: Schema.NonEmptyString,