@effect-agent/testing 0.0.1-beta.6 → 0.1.0-beta.8

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.d.mts CHANGED
@@ -141,7 +141,7 @@ declare const ChaosPlan_base: Schema.Class<ChaosPlan, Schema.Struct<{
141
141
  readonly lanes: Schema.Int;
142
142
  readonly submissions: Schema.NonEmptyArray<typeof ChaosSubmissionSpec>;
143
143
  /** Coordinator failpoint arms, consumed one per round (each fails every hit that round). */
144
- readonly failpointArms: Schema.$Array<Schema.Literals<readonly ["submit:after-admit", "submit:after-materialize", "claim:after-claim", "input:after-canonical-append", "turn:after-canonical-append", "turn:after-response-append", "turn:after-results-append", "tools:after-prepared-append", "step:after-step-append", "approval:after-request-append", "approval:after-suspend", "join:after-claim", "join:after-canonical-append", "resolve:after-intent", "terminalize:after-reserve", "terminalize:after-canonical-append", "abort:after-intent", "subagent:after-reserve", "subagent:after-request-append", "subagent:after-admit", "subagent:after-child-ready", "subagent:after-start-append", "subagent:after-sibling-settle", "subagent:after-suspend", "subagent:after-child-abort-intent", "subagent:after-join-append", "subagent:after-release-pending", "subagent:after-release"]>>;
144
+ readonly failpointArms: Schema.$Array<Schema.Literals<readonly ["submit:after-admit", "submit:after-materialize", "claim:after-claim", "input:after-canonical-append", "turn:after-canonical-append", "turn:after-response-append", "turn:after-results-append", "compaction:after-canonical-append", "tools:after-prepared-append", "step:after-step-append", "approval:after-request-append", "approval:after-suspend", "join:after-claim", "join:after-canonical-append", "resolve:after-intent", "terminalize:after-reserve", "terminalize:after-canonical-append", "abort:after-intent", "subagent:after-reserve", "subagent:after-request-append", "subagent:after-admit", "subagent:after-child-ready", "subagent:after-start-append", "subagent:after-sibling-settle", "subagent:after-suspend", "subagent:after-child-abort-intent", "subagent:after-join-append", "subagent:after-release-pending", "subagent:after-release"]>>;
145
145
  /** Adapter-owned failpoint arms (e.g. SQLite `ledger:*`/`append:*` locations). */
146
146
  readonly adapterArms: Schema.$Array<Schema.String>;
147
147
  /** Flattened submission indices to abort mid-plan (modulo the submission count). */
@@ -365,7 +365,7 @@ declare const delegateDocumentSummary: import("@effect-agent/capabilities").Suba
365
365
  readonly failure: typeof DocumentUnavailable;
366
366
  readonly failureMode: "error";
367
367
  }, DocumentLibrary>;
368
- }, typeof SummaryRequest, typeof SummaryFinding, typeof DocumentSummaryFailed, never, never>;
368
+ }, typeof SummaryRequest, typeof SummaryFinding, typeof DocumentSummaryFailed, never, never, "error">;
369
369
  /** Total mapping from every expected child Run failure to the declared Tool failure (SUB-028). */
370
370
  declare const mapSummaryChildFailure: (failure: {
371
371
  readonly _tag: string;
@@ -401,10 +401,20 @@ declare class ResearchDigest extends ResearchDigest_base {}
401
401
  declare const docsCoordinatorConfidentialMarker = "docs-coordinator-vault-19x";
402
402
  declare const docsMissionConfidentialMarker = "docs-mission-dossier-42f";
403
403
  declare const DocsResearcherToolkit: Toolkit.Toolkit<{
404
- readonly delegate_document_summary: import("@effect-agent/capabilities").SubagentTool<"delegate_document_summary", typeof SummaryRequest, typeof SummaryFinding, typeof DocumentSummaryFailed>;
404
+ readonly delegate_document_summary: Tool.Tool<"delegate_document_summary", {
405
+ readonly parameters: typeof SummaryRequest;
406
+ readonly success: typeof SummaryFinding;
407
+ readonly failure: import("@effect-agent/capabilities").SubagentToolFailure<typeof DocumentSummaryFailed>;
408
+ readonly failureMode: "error";
409
+ }, import("@effect-agent/engine").AgentSpawner | import("@effect-agent/core").IdGenerator | import("@effect-agent/engine").RunEventSink | import("@effect-agent/engine").SubagentDurability>;
405
410
  }>;
406
411
  declare const DocsResearcher: import("@effect-agent/core").Definition<typeof ResearchRequest, typeof ResearchDigest, string, Toolkit.Toolkit<{
407
- readonly delegate_document_summary: import("@effect-agent/capabilities").SubagentTool<"delegate_document_summary", typeof SummaryRequest, typeof SummaryFinding, typeof DocumentSummaryFailed>;
412
+ readonly delegate_document_summary: Tool.Tool<"delegate_document_summary", {
413
+ readonly parameters: typeof SummaryRequest;
414
+ readonly success: typeof SummaryFinding;
415
+ readonly failure: import("@effect-agent/capabilities").SubagentToolFailure<typeof DocumentSummaryFailed>;
416
+ readonly failureMode: "error";
417
+ }, import("@effect-agent/engine").AgentSpawner | import("@effect-agent/core").IdGenerator | import("@effect-agent/engine").RunEventSink | import("@effect-agent/engine").SubagentDurability>;
408
418
  }>>;
409
419
  /** The default two-document research mission. */
410
420
  declare const researchMissionRequest: ResearchRequest;
@@ -983,6 +993,42 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
983
993
  readonly createdAt: string;
984
994
  readonly deploymentId: string;
985
995
  readonly payload: {
996
+ readonly _tag: "AbortRequested";
997
+ readonly submissionId: string;
998
+ readonly author: string;
999
+ readonly reason: string;
1000
+ } | {
1001
+ readonly _tag: "ToolCallResolved";
1002
+ readonly runId: string;
1003
+ readonly toolCallId: string;
1004
+ readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
1005
+ readonly author: string;
1006
+ readonly reason: string;
1007
+ } | {
1008
+ readonly _tag: "ToolCallPrepared";
1009
+ readonly runId: string;
1010
+ readonly turnId: string;
1011
+ readonly turn: number;
1012
+ readonly toolCallId: string;
1013
+ readonly toolName: string;
1014
+ readonly parameters: Schema.Json;
1015
+ readonly parametersDigest: string;
1016
+ } | {
1017
+ readonly _tag: "ToolCallUnknown";
1018
+ readonly runId: string;
1019
+ readonly turn: number;
1020
+ readonly toolCallId: string;
1021
+ readonly toolName: string;
1022
+ readonly reason: string;
1023
+ } | {
1024
+ readonly _tag: "ToolApprovalDecided";
1025
+ readonly runId: string;
1026
+ readonly turn: number;
1027
+ readonly toolCallId: string;
1028
+ readonly decision: "approved" | "denied";
1029
+ readonly resolver: string;
1030
+ readonly reason: string;
1031
+ } | {
986
1032
  readonly _tag: "ConversationCreated";
987
1033
  readonly agentId: string;
988
1034
  readonly definitions: {
@@ -1007,15 +1053,8 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1007
1053
  readonly turn: number;
1008
1054
  readonly messages: Schema.Json;
1009
1055
  readonly messagesDigest: string;
1010
- } | {
1011
- readonly _tag: "ToolCallPrepared";
1012
- readonly runId: string;
1013
- readonly turnId: string;
1014
- readonly turn: number;
1015
- readonly toolCallId: string;
1016
- readonly toolName: string;
1017
- readonly parameters: Schema.Json;
1018
- readonly parametersDigest: string;
1056
+ readonly inputTokens?: number | undefined;
1057
+ readonly outputTokens?: number | undefined;
1019
1058
  } | {
1020
1059
  readonly _tag: "ToolCallSettled";
1021
1060
  readonly runId: string;
@@ -1023,20 +1062,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1023
1062
  readonly toolName: string;
1024
1063
  readonly result: Schema.Json;
1025
1064
  readonly isFailure: boolean;
1026
- } | {
1027
- readonly _tag: "ToolCallUnknown";
1028
- readonly runId: string;
1029
- readonly turn: number;
1030
- readonly toolCallId: string;
1031
- readonly toolName: string;
1032
- readonly reason: string;
1033
- } | {
1034
- readonly _tag: "ToolCallResolved";
1035
- readonly runId: string;
1036
- readonly toolCallId: string;
1037
- readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
1038
- readonly author: string;
1039
- readonly reason: string;
1040
1065
  } | {
1041
1066
  readonly _tag: "ToolStepSettled";
1042
1067
  readonly runId: string;
@@ -1052,14 +1077,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1052
1077
  readonly toolCallId: string;
1053
1078
  readonly toolName: string;
1054
1079
  readonly parametersDigest: string;
1055
- } | {
1056
- readonly _tag: "ToolApprovalDecided";
1057
- readonly runId: string;
1058
- readonly turn: number;
1059
- readonly toolCallId: string;
1060
- readonly decision: "approved" | "denied";
1061
- readonly resolver: string;
1062
- readonly reason: string;
1063
1080
  } | {
1064
1081
  readonly _tag: "ModelResponseInterrupted";
1065
1082
  readonly runId: string;
@@ -1069,8 +1086,10 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1069
1086
  } | {
1070
1087
  readonly _tag: "CompactionCreated";
1071
1088
  readonly runId: string;
1072
- readonly sourceDigest: string;
1073
- readonly summary: string;
1089
+ readonly turn: number;
1090
+ readonly kind: "clear-tool-results" | "summarize";
1091
+ readonly coversThrough: number;
1092
+ readonly summary?: string | undefined;
1074
1093
  } | {
1075
1094
  readonly _tag: "RunFailed";
1076
1095
  readonly runId: string;
@@ -1079,11 +1098,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1079
1098
  readonly _tag: "RunCompleted";
1080
1099
  readonly runId: string;
1081
1100
  readonly output: Schema.Json;
1082
- } | {
1083
- readonly _tag: "AbortRequested";
1084
- readonly submissionId: string;
1085
- readonly author: string;
1086
- readonly reason: string;
1087
1101
  } | {
1088
1102
  readonly _tag: "SubmissionSettled";
1089
1103
  readonly submissionId: string;
@@ -1092,6 +1106,7 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1092
1106
  readonly outcome: "aborted" | "completed" | "failed";
1093
1107
  readonly runId?: string | undefined;
1094
1108
  readonly result?: Schema.Json | undefined;
1109
+ readonly finishReason?: "budget-exhausted" | undefined;
1095
1110
  } | {
1096
1111
  readonly _tag: "SubagentRequested";
1097
1112
  readonly runId: string;
@@ -1163,6 +1178,42 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1163
1178
  readonly createdAt: string;
1164
1179
  readonly deploymentId: string;
1165
1180
  readonly payload: {
1181
+ readonly _tag: "AbortRequested";
1182
+ readonly submissionId: string;
1183
+ readonly author: string;
1184
+ readonly reason: string;
1185
+ } | {
1186
+ readonly _tag: "ToolCallResolved";
1187
+ readonly runId: string;
1188
+ readonly toolCallId: string;
1189
+ readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
1190
+ readonly author: string;
1191
+ readonly reason: string;
1192
+ } | {
1193
+ readonly _tag: "ToolCallPrepared";
1194
+ readonly runId: string;
1195
+ readonly turnId: string;
1196
+ readonly turn: number;
1197
+ readonly toolCallId: string;
1198
+ readonly toolName: string;
1199
+ readonly parameters: Schema.Json;
1200
+ readonly parametersDigest: string;
1201
+ } | {
1202
+ readonly _tag: "ToolCallUnknown";
1203
+ readonly runId: string;
1204
+ readonly turn: number;
1205
+ readonly toolCallId: string;
1206
+ readonly toolName: string;
1207
+ readonly reason: string;
1208
+ } | {
1209
+ readonly _tag: "ToolApprovalDecided";
1210
+ readonly runId: string;
1211
+ readonly turn: number;
1212
+ readonly toolCallId: string;
1213
+ readonly decision: "approved" | "denied";
1214
+ readonly resolver: string;
1215
+ readonly reason: string;
1216
+ } | {
1166
1217
  readonly _tag: "ConversationCreated";
1167
1218
  readonly agentId: string;
1168
1219
  readonly definitions: {
@@ -1187,15 +1238,8 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1187
1238
  readonly turn: number;
1188
1239
  readonly messages: Schema.Json;
1189
1240
  readonly messagesDigest: string;
1190
- } | {
1191
- readonly _tag: "ToolCallPrepared";
1192
- readonly runId: string;
1193
- readonly turnId: string;
1194
- readonly turn: number;
1195
- readonly toolCallId: string;
1196
- readonly toolName: string;
1197
- readonly parameters: Schema.Json;
1198
- readonly parametersDigest: string;
1241
+ readonly inputTokens?: number | undefined;
1242
+ readonly outputTokens?: number | undefined;
1199
1243
  } | {
1200
1244
  readonly _tag: "ToolCallSettled";
1201
1245
  readonly runId: string;
@@ -1203,20 +1247,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1203
1247
  readonly toolName: string;
1204
1248
  readonly result: Schema.Json;
1205
1249
  readonly isFailure: boolean;
1206
- } | {
1207
- readonly _tag: "ToolCallUnknown";
1208
- readonly runId: string;
1209
- readonly turn: number;
1210
- readonly toolCallId: string;
1211
- readonly toolName: string;
1212
- readonly reason: string;
1213
- } | {
1214
- readonly _tag: "ToolCallResolved";
1215
- readonly runId: string;
1216
- readonly toolCallId: string;
1217
- readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
1218
- readonly author: string;
1219
- readonly reason: string;
1220
1250
  } | {
1221
1251
  readonly _tag: "ToolStepSettled";
1222
1252
  readonly runId: string;
@@ -1232,14 +1262,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1232
1262
  readonly toolCallId: string;
1233
1263
  readonly toolName: string;
1234
1264
  readonly parametersDigest: string;
1235
- } | {
1236
- readonly _tag: "ToolApprovalDecided";
1237
- readonly runId: string;
1238
- readonly turn: number;
1239
- readonly toolCallId: string;
1240
- readonly decision: "approved" | "denied";
1241
- readonly resolver: string;
1242
- readonly reason: string;
1243
1265
  } | {
1244
1266
  readonly _tag: "ModelResponseInterrupted";
1245
1267
  readonly runId: string;
@@ -1249,8 +1271,10 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1249
1271
  } | {
1250
1272
  readonly _tag: "CompactionCreated";
1251
1273
  readonly runId: string;
1252
- readonly sourceDigest: string;
1253
- readonly summary: string;
1274
+ readonly turn: number;
1275
+ readonly kind: "clear-tool-results" | "summarize";
1276
+ readonly coversThrough: number;
1277
+ readonly summary?: string | undefined;
1254
1278
  } | {
1255
1279
  readonly _tag: "RunFailed";
1256
1280
  readonly runId: string;
@@ -1259,11 +1283,6 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1259
1283
  readonly _tag: "RunCompleted";
1260
1284
  readonly runId: string;
1261
1285
  readonly output: Schema.Json;
1262
- } | {
1263
- readonly _tag: "AbortRequested";
1264
- readonly submissionId: string;
1265
- readonly author: string;
1266
- readonly reason: string;
1267
1286
  } | {
1268
1287
  readonly _tag: "SubmissionSettled";
1269
1288
  readonly submissionId: string;
@@ -1272,6 +1291,7 @@ declare const phase3TravelPlannerEncodedFixture: readonly {
1272
1291
  readonly outcome: "aborted" | "completed" | "failed";
1273
1292
  readonly runId?: string | undefined;
1274
1293
  readonly result?: Schema.Json | undefined;
1294
+ readonly finishReason?: "budget-exhausted" | undefined;
1275
1295
  } | {
1276
1296
  readonly _tag: "SubagentRequested";
1277
1297
  readonly runId: string;
@@ -2772,7 +2792,7 @@ declare const destinationResearchDelegation: import("@effect-agent/capabilities"
2772
2792
  readonly failure: typeof DestinationGuideUnavailable;
2773
2793
  readonly failureMode: "error";
2774
2794
  }, DestinationGuide>;
2775
- }, typeof DestinationResearchRequest, typeof DestinationResearchFindings, typeof DestinationResearchFailed, ResearchDispatchGate, never>;
2795
+ }, typeof DestinationResearchRequest, typeof DestinationResearchFindings, typeof DestinationResearchFailed, ResearchDispatchGate, never, "error">;
2776
2796
  /** Total mapping from every expected child Run failure to the declared Tool failure (SUB-028). */
2777
2797
  declare const mapResearchChildFailure: (failure: {
2778
2798
  readonly _tag: string;
@@ -2807,10 +2827,20 @@ declare class DestinationShortlist extends DestinationShortlist_base {}
2807
2827
  declare const coordinatorConfidentialMarker = "coordinator-vault-7q42";
2808
2828
  declare const missionConfidentialMarker = "traveler-dossier-19f";
2809
2829
  declare const TravelCoordinatorToolkit: Toolkit.Toolkit<{
2810
- readonly delegate_destination_research: import("@effect-agent/capabilities").SubagentTool<"delegate_destination_research", typeof DestinationResearchRequest, typeof DestinationResearchFindings, typeof DestinationResearchFailed>;
2830
+ readonly delegate_destination_research: Tool.Tool<"delegate_destination_research", {
2831
+ readonly parameters: typeof DestinationResearchRequest;
2832
+ readonly success: typeof DestinationResearchFindings;
2833
+ readonly failure: import("@effect-agent/capabilities").SubagentToolFailure<typeof DestinationResearchFailed>;
2834
+ readonly failureMode: "error";
2835
+ }, import("@effect-agent/engine").AgentSpawner | import("@effect-agent/core").IdGenerator | import("@effect-agent/engine").RunEventSink | import("@effect-agent/engine").SubagentDurability>;
2811
2836
  }>;
2812
2837
  declare const TravelCoordinator: import("@effect-agent/core").Definition<typeof ResearchMission, typeof DestinationShortlist, string, Toolkit.Toolkit<{
2813
- readonly delegate_destination_research: import("@effect-agent/capabilities").SubagentTool<"delegate_destination_research", typeof DestinationResearchRequest, typeof DestinationResearchFindings, typeof DestinationResearchFailed>;
2838
+ readonly delegate_destination_research: Tool.Tool<"delegate_destination_research", {
2839
+ readonly parameters: typeof DestinationResearchRequest;
2840
+ readonly success: typeof DestinationResearchFindings;
2841
+ readonly failure: import("@effect-agent/capabilities").SubagentToolFailure<typeof DestinationResearchFailed>;
2842
+ readonly failureMode: "error";
2843
+ }, import("@effect-agent/engine").AgentSpawner | import("@effect-agent/core").IdGenerator | import("@effect-agent/engine").RunEventSink | import("@effect-agent/engine").SubagentDurability>;
2814
2844
  }>>;
2815
2845
  declare const researchMission: ResearchMission;
2816
2846
  declare const expectedDestinationShortlist: DestinationShortlist;
package/dist/index.mjs CHANGED
@@ -29,6 +29,7 @@ const CERTIFICATION_SCENARIOS = [
29
29
  */
30
30
  const TIER2_UNREACHED_LOCATIONS = [
31
31
  "abort:after-intent",
32
+ "compaction:after-canonical-append",
32
33
  "resolve:after-intent",
33
34
  "subagent:after-child-abort-intent"
34
35
  ];
@@ -4519,6 +4520,8 @@ const phase6TravelPlannerGoldenEvidence = [
4519
4520
  runId: "run:{submissionId}",
4520
4521
  turnId: "turn:run:{submissionId}:1",
4521
4522
  turn: 1,
4523
+ inputTokens: 128,
4524
+ outputTokens: 96,
4522
4525
  messages: { content: [
4523
4526
  {
4524
4527
  options: {},
@@ -4660,6 +4663,8 @@ const phase6TravelPlannerGoldenEvidence = [
4660
4663
  runId: "run:{submissionId}",
4661
4664
  turnId: "turn:run:{submissionId}:2",
4662
4665
  turn: 2,
4666
+ inputTokens: 128,
4667
+ outputTokens: 96,
4663
4668
  messages: { content: [{
4664
4669
  options: {},
4665
4670
  role: "assistant",