@vitest-agent/sdk 1.3.4 → 2.0.0

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 (58) hide show
  1. package/errors/DataStoreError.js +22 -13
  2. package/index.d.ts +1032 -1101
  3. package/index.js +3 -3
  4. package/layers/ConfigLive.js +8 -9
  5. package/layers/DataReaderLive.js +2 -2
  6. package/layers/DataStoreLive.js +2 -2
  7. package/layers/DiscoveryRegistryLive.js +1 -1
  8. package/layers/LoggerLive.js +24 -24
  9. package/layers/PathResolutionLive.js +18 -17
  10. package/layers/PerClientSessionMapLive.js +1 -1
  11. package/layers/ProjectDiscoveryLive.js +1 -2
  12. package/layers/ProjectIdentityLive.js +16 -12
  13. package/layers/RunContextLive.js +20 -20
  14. package/migrations/0001_initial.js +1 -1
  15. package/migrations/registry_0001_initial.js +1 -1
  16. package/migrations/session_map_0001_initial.js +1 -1
  17. package/package.json +18 -18
  18. package/schemas/AgentReport.js +6 -9
  19. package/schemas/Baselines.js +3 -3
  20. package/schemas/CacheManifest.js +2 -2
  21. package/schemas/ChannelEvent.js +30 -3
  22. package/schemas/Common.js +76 -14
  23. package/schemas/ConsoleLeaks.js +2 -2
  24. package/schemas/Coverage.js +8 -8
  25. package/schemas/CoverageTargets.js +16 -10
  26. package/schemas/History.js +4 -4
  27. package/schemas/Identity.js +19 -7
  28. package/schemas/Options.js +3 -3
  29. package/schemas/RenderState.js +26 -19
  30. package/schemas/RunEvent.js +154 -115
  31. package/schemas/Tdd.js +16 -6
  32. package/schemas/Thresholds.js +6 -6
  33. package/schemas/Transport.js +1 -1
  34. package/schemas/Trends.js +7 -3
  35. package/schemas/turns/FileEditPayload.js +5 -1
  36. package/schemas/turns/HookFirePayload.js +15 -1
  37. package/schemas/turns/index.js +9 -1
  38. package/services/Config.js +3 -3
  39. package/services/DataReader.js +1 -1
  40. package/services/DataStore.js +1 -1
  41. package/services/DetailResolver.js +1 -1
  42. package/services/DiscoveryRegistry.js +1 -1
  43. package/services/EnvironmentDetector.js +1 -1
  44. package/services/ExecutorResolver.js +1 -1
  45. package/services/FormatSelector.js +1 -1
  46. package/services/HistoryTracker.js +1 -1
  47. package/services/OutputRenderer.js +1 -1
  48. package/services/PerClientSessionMap.js +2 -2
  49. package/services/ProjectDiscovery.js +1 -1
  50. package/services/ProjectIdentity.js +1 -1
  51. package/services/RunContext.js +1 -1
  52. package/testing/layers.js +2 -2
  53. package/testing.d.ts +312 -332
  54. package/tsdoc-metadata.json +1 -1
  55. package/utils/build-report.js +16 -1
  56. package/utils/ensure-migrated.js +3 -3
  57. package/utils/resolve-data-path.js +3 -3
  58. package/utils/resolve-workspace-key.js +11 -6
@@ -8,27 +8,41 @@ import { Schema } from "effect";
8
8
  * Coverage metric whose threshold can be violated independently.
9
9
  * @public
10
10
  */
11
- const CoverageMetric = Schema.Literal("lines", "branches", "functions", "statements").annotations({ identifier: "CoverageMetric" });
11
+ const CoverageMetric = Schema.Literals([
12
+ "lines",
13
+ "branches",
14
+ "functions",
15
+ "statements"
16
+ ]).annotate({ identifier: "CoverageMetric" });
12
17
  /**
13
18
  * Severity tier for a suggested action emitted during a run.
14
19
  * @public
15
20
  */
16
- const ActionSeverity = Schema.Literal("info", "warn", "blocker").annotations({ identifier: "ActionSeverity" });
21
+ const ActionSeverity = Schema.Literals([
22
+ "info",
23
+ "warn",
24
+ "blocker"
25
+ ]).annotate({ identifier: "ActionSeverity" });
17
26
  /**
18
27
  * Lifecycle scope of a Vitest setup/teardown hook.
19
28
  * @public
20
29
  */
21
- const HookType = Schema.Literal("beforeAll", "afterAll", "beforeEach", "afterEach").annotations({ identifier: "HookType" });
30
+ const HookType = Schema.Literals([
31
+ "beforeAll",
32
+ "afterAll",
33
+ "beforeEach",
34
+ "afterEach"
35
+ ]).annotate({ identifier: "HookType" });
22
36
  /**
23
37
  * Terminal status of a Vitest hook run.
24
38
  * @public
25
39
  */
26
- const HookStatus = Schema.Literal("passed", "failed").annotations({ identifier: "HookStatus" });
40
+ const HookStatus = Schema.Literals(["passed", "failed"]).annotate({ identifier: "HookStatus" });
27
41
  /**
28
42
  * Output stream a captured user `console.log` was written to.
29
43
  * @public
30
44
  */
31
- const ConsoleLogLevel = Schema.Literal("stdout", "stderr").annotations({ identifier: "ConsoleLogLevel" });
45
+ const ConsoleLogLevel = Schema.Literals(["stdout", "stderr"]).annotate({ identifier: "ConsoleLogLevel" });
32
46
  /**
33
47
  * A coverage gap surfaced to the renderer — a per-file shortfall that
34
48
  * a renderer may want to call out individually.
@@ -38,7 +52,7 @@ const CoverageGap = Schema.Struct({
38
52
  file: Schema.String,
39
53
  missing: CoverageTotals,
40
54
  uncoveredLines: Schema.optional(Schema.String)
41
- }).annotations({ identifier: "CoverageGap" });
55
+ }).annotate({ identifier: "CoverageGap" });
42
56
  /**
43
57
  * The reducer projects this union into `RenderState`. Renderers
44
58
  * never read the raw event stream — they read the projected state.
@@ -49,115 +63,140 @@ const CoverageGap = Schema.Struct({
49
63
  * been updated to consume the new state shape.
50
64
  * @public
51
65
  */
52
- const RunEvent = Schema.Union(Schema.TaggedStruct("RunStarted", {
53
- runId: Schema.String,
54
- startedAt: Schema.String,
55
- configHash: Schema.String
56
- }), Schema.TaggedStruct("ModuleQueued", {
57
- modulePath: Schema.String,
58
- projectName: Schema.optional(Schema.String)
59
- }), Schema.TaggedStruct("ModuleStarted", {
60
- modulePath: Schema.String,
61
- startedAt: Schema.String,
62
- projectName: Schema.optional(Schema.String)
63
- }), Schema.TaggedStruct("TestStarted", {
64
- modulePath: Schema.String,
65
- testName: Schema.String,
66
- suitePath: Schema.Array(Schema.String)
67
- }), Schema.TaggedStruct("TestFinished", {
68
- modulePath: Schema.String,
69
- testName: Schema.String,
70
- suitePath: Schema.Array(Schema.String),
71
- status: TestState,
72
- durationMs: Schema.Number,
73
- error: Schema.optional(ReportError),
74
- timedOut: Schema.optional(Schema.Boolean)
75
- }), Schema.TaggedStruct("ModuleFinished", {
76
- modulePath: Schema.String,
77
- passCount: Schema.Number,
78
- failCount: Schema.Number,
79
- skipCount: Schema.Number,
80
- durationMs: Schema.Number,
81
- projectName: Schema.optional(Schema.String),
82
- timeoutCount: Schema.optional(Schema.Number),
83
- tagCounts: Schema.optional(Schema.Record({
84
- key: Schema.String,
85
- value: Schema.Number
86
- }))
87
- }), Schema.TaggedStruct("ModuleCollected", {
88
- modulePath: Schema.String,
89
- testCount: Schema.Number,
90
- suiteCount: Schema.Number
91
- }), Schema.TaggedStruct("SuiteStarted", {
92
- modulePath: Schema.String,
93
- suitePath: Schema.Array(Schema.String),
94
- suiteName: Schema.String
95
- }), Schema.TaggedStruct("SuiteFinished", {
96
- modulePath: Schema.String,
97
- suitePath: Schema.Array(Schema.String),
98
- suiteName: Schema.String,
99
- passCount: Schema.Number,
100
- failCount: Schema.Number,
101
- skipCount: Schema.Number
102
- }), Schema.TaggedStruct("HookStarted", {
103
- modulePath: Schema.String,
104
- hookType: HookType,
105
- scopeName: Schema.String
106
- }), Schema.TaggedStruct("HookFinished", {
107
- modulePath: Schema.String,
108
- hookType: HookType,
109
- scopeName: Schema.String,
110
- durationMs: Schema.Number,
111
- status: HookStatus,
112
- error: Schema.optional(ReportError)
113
- }), Schema.TaggedStruct("ConsoleLog", {
114
- modulePath: Schema.optional(Schema.String),
115
- testName: Schema.optional(Schema.String),
116
- level: ConsoleLogLevel,
117
- content: Schema.String,
118
- time: Schema.Number
119
- }), Schema.TaggedStruct("RunTimedOut", { message: Schema.String }), Schema.TaggedStruct("TestAnnotated", {
120
- modulePath: Schema.String,
121
- testName: Schema.String,
122
- suitePath: Schema.Array(Schema.String),
123
- annotation: Schema.String
124
- }), Schema.TaggedStruct("TestArtifactRecorded", {
125
- modulePath: Schema.String,
126
- testName: Schema.String,
127
- suitePath: Schema.Array(Schema.String),
128
- artifact: Schema.String
129
- }), Schema.TaggedStruct("WatcherReady", {}), Schema.TaggedStruct("WatcherRerun", {
130
- triggerFiles: Schema.Array(Schema.String),
131
- reason: Schema.optional(Schema.String)
132
- }), Schema.TaggedStruct("TrendComputed", {
133
- direction: Schema.Literal("improving", "regressing", "stable"),
134
- runCount: Schema.Number
135
- }), Schema.TaggedStruct("CoverageReady", {
136
- metrics: CoverageTotals,
137
- thresholds: MetricThresholds,
138
- gaps: Schema.Array(CoverageGap)
139
- }), Schema.TaggedStruct("ThresholdViolation", {
140
- metric: CoverageMetric,
141
- expected: Schema.Number,
142
- actual: Schema.Number
143
- }), Schema.TaggedStruct("FailureClassified", {
144
- modulePath: Schema.String,
145
- testName: Schema.String,
146
- classification: TestClassification
147
- }), Schema.TaggedStruct("SuggestedAction", {
148
- severity: ActionSeverity,
149
- title: Schema.String,
150
- detail: Schema.String,
151
- targetTool: Schema.optional(Schema.String)
152
- }), Schema.TaggedStruct("RunFinished", {
153
- runId: Schema.String,
154
- finishedAt: Schema.String,
155
- passCount: Schema.Number,
156
- failCount: Schema.Number,
157
- skipCount: Schema.Number,
158
- durationMs: Schema.Number,
159
- timeoutCount: Schema.optional(Schema.Number)
160
- })).annotations({ identifier: "RunEvent" });
66
+ const RunEvent = Schema.Union([
67
+ Schema.TaggedStruct("RunStarted", {
68
+ runId: Schema.String,
69
+ startedAt: Schema.String,
70
+ configHash: Schema.String
71
+ }),
72
+ Schema.TaggedStruct("ModuleQueued", {
73
+ modulePath: Schema.String,
74
+ projectName: Schema.optional(Schema.String)
75
+ }),
76
+ Schema.TaggedStruct("ModuleStarted", {
77
+ modulePath: Schema.String,
78
+ startedAt: Schema.String,
79
+ projectName: Schema.optional(Schema.String)
80
+ }),
81
+ Schema.TaggedStruct("TestStarted", {
82
+ modulePath: Schema.String,
83
+ testName: Schema.String,
84
+ suitePath: Schema.Array(Schema.String)
85
+ }),
86
+ Schema.TaggedStruct("TestFinished", {
87
+ modulePath: Schema.String,
88
+ testName: Schema.String,
89
+ suitePath: Schema.Array(Schema.String),
90
+ status: TestState,
91
+ durationMs: Schema.Number,
92
+ error: Schema.optional(ReportError),
93
+ timedOut: Schema.optional(Schema.Boolean)
94
+ }),
95
+ Schema.TaggedStruct("ModuleFinished", {
96
+ modulePath: Schema.String,
97
+ passCount: Schema.Number,
98
+ failCount: Schema.Number,
99
+ skipCount: Schema.Number,
100
+ durationMs: Schema.Number,
101
+ projectName: Schema.optional(Schema.String),
102
+ timeoutCount: Schema.optional(Schema.Number),
103
+ tagCounts: Schema.optional(Schema.Record(Schema.String, Schema.Number))
104
+ }),
105
+ Schema.TaggedStruct("ModuleCollected", {
106
+ modulePath: Schema.String,
107
+ testCount: Schema.Number,
108
+ suiteCount: Schema.Number
109
+ }),
110
+ Schema.TaggedStruct("SuiteStarted", {
111
+ modulePath: Schema.String,
112
+ suitePath: Schema.Array(Schema.String),
113
+ suiteName: Schema.String
114
+ }),
115
+ Schema.TaggedStruct("SuiteFinished", {
116
+ modulePath: Schema.String,
117
+ suitePath: Schema.Array(Schema.String),
118
+ suiteName: Schema.String,
119
+ passCount: Schema.Number,
120
+ failCount: Schema.Number,
121
+ skipCount: Schema.Number
122
+ }),
123
+ Schema.TaggedStruct("HookStarted", {
124
+ modulePath: Schema.String,
125
+ hookType: HookType,
126
+ scopeName: Schema.String
127
+ }),
128
+ Schema.TaggedStruct("HookFinished", {
129
+ modulePath: Schema.String,
130
+ hookType: HookType,
131
+ scopeName: Schema.String,
132
+ durationMs: Schema.Number,
133
+ status: HookStatus,
134
+ error: Schema.optional(ReportError)
135
+ }),
136
+ Schema.TaggedStruct("ConsoleLog", {
137
+ modulePath: Schema.optional(Schema.String),
138
+ testName: Schema.optional(Schema.String),
139
+ level: ConsoleLogLevel,
140
+ content: Schema.String,
141
+ time: Schema.Number
142
+ }),
143
+ Schema.TaggedStruct("RunTimedOut", { message: Schema.String }),
144
+ Schema.TaggedStruct("TestAnnotated", {
145
+ modulePath: Schema.String,
146
+ testName: Schema.String,
147
+ suitePath: Schema.Array(Schema.String),
148
+ annotation: Schema.String
149
+ }),
150
+ Schema.TaggedStruct("TestArtifactRecorded", {
151
+ modulePath: Schema.String,
152
+ testName: Schema.String,
153
+ suitePath: Schema.Array(Schema.String),
154
+ artifact: Schema.String
155
+ }),
156
+ Schema.TaggedStruct("WatcherReady", {}),
157
+ Schema.TaggedStruct("WatcherRerun", {
158
+ triggerFiles: Schema.Array(Schema.String),
159
+ reason: Schema.optional(Schema.String)
160
+ }),
161
+ Schema.TaggedStruct("TrendComputed", {
162
+ direction: Schema.Literals([
163
+ "improving",
164
+ "regressing",
165
+ "stable"
166
+ ]),
167
+ runCount: Schema.Number
168
+ }),
169
+ Schema.TaggedStruct("CoverageReady", {
170
+ metrics: CoverageTotals,
171
+ thresholds: MetricThresholds,
172
+ gaps: Schema.Array(CoverageGap)
173
+ }),
174
+ Schema.TaggedStruct("ThresholdViolation", {
175
+ metric: CoverageMetric,
176
+ expected: Schema.Number,
177
+ actual: Schema.Number
178
+ }),
179
+ Schema.TaggedStruct("FailureClassified", {
180
+ modulePath: Schema.String,
181
+ testName: Schema.String,
182
+ classification: TestClassification
183
+ }),
184
+ Schema.TaggedStruct("SuggestedAction", {
185
+ severity: ActionSeverity,
186
+ title: Schema.String,
187
+ detail: Schema.String,
188
+ targetTool: Schema.optional(Schema.String)
189
+ }),
190
+ Schema.TaggedStruct("RunFinished", {
191
+ runId: Schema.String,
192
+ finishedAt: Schema.String,
193
+ passCount: Schema.Number,
194
+ failCount: Schema.Number,
195
+ skipCount: Schema.Number,
196
+ durationMs: Schema.Number,
197
+ timeoutCount: Schema.optional(Schema.Number)
198
+ })
199
+ ]).annotate({ identifier: "RunEvent" });
161
200
 
162
201
  //#endregion
163
202
  export { ActionSeverity, ConsoleLogLevel, FileCoverageReport as CoverageFile, CoverageGap, CoverageMetric, HookStatus, HookType, RunEvent };
package/schemas/Tdd.js CHANGED
@@ -2,9 +2,19 @@ import { Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/Tdd.ts
4
4
  /** @public */
5
- const GoalStatus = Schema.Literal("pending", "in_progress", "done", "abandoned").annotations({ identifier: "GoalStatus" });
5
+ const GoalStatus = Schema.Literals([
6
+ "pending",
7
+ "in_progress",
8
+ "done",
9
+ "abandoned"
10
+ ]).annotate({ identifier: "GoalStatus" });
6
11
  /** @public */
7
- const BehaviorStatus = Schema.Literal("pending", "in_progress", "done", "abandoned").annotations({ identifier: "BehaviorStatus" });
12
+ const BehaviorStatus = Schema.Literals([
13
+ "pending",
14
+ "in_progress",
15
+ "done",
16
+ "abandoned"
17
+ ]).annotate({ identifier: "BehaviorStatus" });
8
18
  /** @public */
9
19
  const GoalRow = Schema.Struct({
10
20
  id: Schema.Number,
@@ -13,7 +23,7 @@ const GoalRow = Schema.Struct({
13
23
  goal: Schema.String,
14
24
  status: GoalStatus,
15
25
  createdAt: Schema.String
16
- }).annotations({ identifier: "GoalRow" });
26
+ }).annotate({ identifier: "GoalRow" });
17
27
  /** @public */
18
28
  const BehaviorRow = Schema.Struct({
19
29
  id: Schema.Number,
@@ -23,12 +33,12 @@ const BehaviorRow = Schema.Struct({
23
33
  suggestedTestName: Schema.NullOr(Schema.String),
24
34
  status: BehaviorStatus,
25
35
  createdAt: Schema.String
26
- }).annotations({ identifier: "BehaviorRow" });
36
+ }).annotate({ identifier: "BehaviorRow" });
27
37
  /** @public */
28
38
  const GoalDetail = Schema.Struct({
29
39
  ...GoalRow.fields,
30
40
  behaviors: Schema.Array(BehaviorRow)
31
- }).annotations({ identifier: "GoalDetail" });
41
+ }).annotate({ identifier: "GoalDetail" });
32
42
  /** @public */
33
43
  const BehaviorDetail = Schema.Struct({
34
44
  ...BehaviorRow.fields,
@@ -38,7 +48,7 @@ const BehaviorDetail = Schema.Struct({
38
48
  status: GoalStatus
39
49
  }),
40
50
  dependencies: Schema.Array(BehaviorRow)
41
- }).annotations({ identifier: "BehaviorDetail" });
51
+ }).annotate({ identifier: "BehaviorDetail" });
42
52
 
43
53
  //#endregion
44
54
  export { BehaviorDetail, BehaviorRow, BehaviorStatus, GoalDetail, GoalRow, GoalStatus };
@@ -1,4 +1,4 @@
1
- import { Schema } from "effect";
1
+ import { Effect, Schema } from "effect";
2
2
 
3
3
  //#region src/schemas/Thresholds.ts
4
4
  /**
@@ -10,21 +10,21 @@ const MetricThresholds = Schema.Struct({
10
10
  functions: Schema.optional(Schema.Number),
11
11
  branches: Schema.optional(Schema.Number),
12
12
  statements: Schema.optional(Schema.Number)
13
- }).annotations({ identifier: "MetricThresholds" });
13
+ }).annotate({ identifier: "MetricThresholds" });
14
14
  /**
15
15
  * A glob pattern paired with its metric thresholds.
16
16
  * @public
17
17
  */
18
- const PatternThresholds = Schema.Tuple(Schema.String, MetricThresholds).annotations({ identifier: "PatternThresholds" });
18
+ const PatternThresholds = Schema.Tuple([Schema.String, MetricThresholds]).annotate({ identifier: "PatternThresholds" });
19
19
  /**
20
20
  * Fully resolved thresholds ready for evaluation.
21
21
  * @public
22
22
  */
23
23
  const ResolvedThresholds = Schema.Struct({
24
24
  global: MetricThresholds,
25
- perFile: Schema.optionalWith(Schema.Boolean, { default: () => false }),
26
- patterns: Schema.optionalWith(Schema.Array(PatternThresholds), { default: () => [] })
27
- }).annotations({ identifier: "ResolvedThresholds" });
25
+ perFile: Schema.Boolean.pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
26
+ patterns: Schema.Array(PatternThresholds).pipe(Schema.withDecodingDefaultKey(Effect.succeed([])))
27
+ }).annotate({ identifier: "ResolvedThresholds" });
28
28
 
29
29
  //#endregion
30
30
  export { MetricThresholds, PatternThresholds, ResolvedThresholds };
@@ -10,7 +10,7 @@ import { Schema } from "effect";
10
10
  * diff and no breaking API change at the call site.
11
11
  * @public
12
12
  */
13
- const Transport = Schema.Union(Schema.Struct({ kind: Schema.Literal("local") })).annotations({ identifier: "Transport" });
13
+ const Transport = Schema.Union([Schema.Struct({ kind: Schema.Literal("local") })]).annotate({ identifier: "Transport" });
14
14
 
15
15
  //#endregion
16
16
  export { Transport };
package/schemas/Trends.js CHANGED
@@ -10,14 +10,18 @@ const TrendEntry = Schema.Struct({
10
10
  timestamp: Schema.String,
11
11
  coverage: CoverageTotals,
12
12
  delta: CoverageTotals,
13
- direction: Schema.Literal("improving", "regressing", "stable"),
13
+ direction: Schema.Literals([
14
+ "improving",
15
+ "regressing",
16
+ "stable"
17
+ ]),
14
18
  targetsHash: Schema.optional(Schema.String)
15
- }).annotations({ identifier: "TrendEntry" });
19
+ }).annotate({ identifier: "TrendEntry" });
16
20
  /**
17
21
  * Per-project trend record with sliding window of entries.
18
22
  * @public
19
23
  */
20
- const TrendRecord = Schema.Struct({ entries: Schema.Array(TrendEntry) }).annotations({ identifier: "TrendRecord" });
24
+ const TrendRecord = Schema.Struct({ entries: Schema.Array(TrendEntry) }).annotate({ identifier: "TrendRecord" });
21
25
 
22
26
  //#endregion
23
27
  export { TrendEntry, TrendRecord };
@@ -5,7 +5,11 @@ import { Schema } from "effect";
5
5
  const FileEditPayload = Schema.Struct({
6
6
  type: Schema.Literal("file_edit"),
7
7
  file_path: Schema.String,
8
- edit_kind: Schema.Literal("write", "edit", "multi_edit"),
8
+ edit_kind: Schema.Literals([
9
+ "write",
10
+ "edit",
11
+ "multi_edit"
12
+ ]),
9
13
  lines_added: Schema.optional(Schema.Number),
10
14
  lines_removed: Schema.optional(Schema.Number),
11
15
  diff: Schema.optional(Schema.String)
@@ -4,7 +4,21 @@ import { Schema } from "effect";
4
4
  /** @public */
5
5
  const HookFirePayload = Schema.Struct({
6
6
  type: Schema.Literal("hook_fire"),
7
- hook_kind: Schema.Literal("SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PreToolUse", "PostToolUse", "PostToolUseFailure", "UserPromptSubmit", "FileChanged"),
7
+ hook_kind: Schema.Literals([
8
+ "SessionStart",
9
+ "SessionEnd",
10
+ "Stop",
11
+ "StopFailure",
12
+ "SubagentStart",
13
+ "SubagentStop",
14
+ "PreCompact",
15
+ "PostCompact",
16
+ "PreToolUse",
17
+ "PostToolUse",
18
+ "PostToolUseFailure",
19
+ "UserPromptSubmit",
20
+ "FileChanged"
21
+ ]),
8
22
  chat_id: Schema.optional(Schema.String),
9
23
  previous_record_failures: Schema.optional(Schema.Array(Schema.String))
10
24
  });
@@ -9,7 +9,15 @@ import { Schema } from "effect";
9
9
 
10
10
  //#region src/schemas/turns/index.ts
11
11
  /** @public */
12
- const TurnPayload = Schema.Union(UserPromptPayload, ToolCallPayload, ToolResultPayload, FileEditPayload, HookFirePayload, NotePayload, HypothesisPayload);
12
+ const TurnPayload = Schema.Union([
13
+ UserPromptPayload,
14
+ ToolCallPayload,
15
+ ToolResultPayload,
16
+ FileEditPayload,
17
+ HookFirePayload,
18
+ NotePayload,
19
+ HypothesisPayload
20
+ ]);
13
21
 
14
22
  //#endregion
15
23
  export { FileEditPayload, HookFirePayload, HypothesisPayload, NotePayload, ToolCallPayload, ToolResultPayload, TurnPayload, UserPromptPayload };
@@ -1,15 +1,15 @@
1
- import { ConfigFile } from "config-file-effect";
1
+ import { ConfigFile } from "@effected/config-file";
2
2
 
3
3
  //#region src/services/Config.ts
4
4
  /**
5
- * Typed `Context.Tag` for the vitest-agent config file service.
5
+ * Typed service class (Context tag) for the vitest-agent config file service.
6
6
  *
7
7
  * Both runtime packages (reporter, MCP) yield this tag to access the loaded
8
8
  * `VitestAgentConfig`. The live layer is built per `projectDir` via
9
9
  * `ConfigLive(projectDir)`.
10
10
  * @public
11
11
  */
12
- const VitestAgentConfigFile = ConfigFile.Tag("vitest-agent/Config");
12
+ var VitestAgentConfigFile = class extends ConfigFile.Service()("vitest-agent/Config") {};
13
13
 
14
14
  //#endregion
15
15
  export { VitestAgentConfigFile };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/DataReader.ts
4
4
  /** @public */
5
- var DataReader = class extends Context.Tag("vitest-agent/DataReader")() {};
5
+ var DataReader = class extends Context.Service()("vitest-agent/DataReader") {};
6
6
 
7
7
  //#endregion
8
8
  export { DataReader };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/DataStore.ts
4
4
  /** @public */
5
- var DataStore = class extends Context.Tag("vitest-agent/DataStore")() {};
5
+ var DataStore = class extends Context.Service()("vitest-agent/DataStore") {};
6
6
 
7
7
  //#endregion
8
8
  export { DataStore };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/DetailResolver.ts
4
4
  /** @public */
5
- var DetailResolver = class extends Context.Tag("vitest-agent/DetailResolver")() {};
5
+ var DetailResolver = class extends Context.Service()("vitest-agent/DetailResolver") {};
6
6
 
7
7
  //#endregion
8
8
  export { DetailResolver };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/DiscoveryRegistry.ts
4
4
  /** @public */
5
- var DiscoveryRegistry = class extends Context.Tag("vitest-agent/DiscoveryRegistry")() {};
5
+ var DiscoveryRegistry = class extends Context.Service()("vitest-agent/DiscoveryRegistry") {};
6
6
 
7
7
  //#endregion
8
8
  export { DiscoveryRegistry };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/EnvironmentDetector.ts
4
4
  /** @public */
5
- var EnvironmentDetector = class extends Context.Tag("vitest-agent/EnvironmentDetector")() {};
5
+ var EnvironmentDetector = class extends Context.Service()("vitest-agent/EnvironmentDetector") {};
6
6
 
7
7
  //#endregion
8
8
  export { EnvironmentDetector };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/ExecutorResolver.ts
4
4
  /** @public */
5
- var ExecutorResolver = class extends Context.Tag("vitest-agent/ExecutorResolver")() {};
5
+ var ExecutorResolver = class extends Context.Service()("vitest-agent/ExecutorResolver") {};
6
6
 
7
7
  //#endregion
8
8
  export { ExecutorResolver };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/FormatSelector.ts
4
4
  /** @public */
5
- var FormatSelector = class extends Context.Tag("vitest-agent/FormatSelector")() {};
5
+ var FormatSelector = class extends Context.Service()("vitest-agent/FormatSelector") {};
6
6
 
7
7
  //#endregion
8
8
  export { FormatSelector };
@@ -14,7 +14,7 @@ import { Context } from "effect";
14
14
  */
15
15
  const historyKey = (modulePath, fullName) => JSON.stringify([modulePath, fullName]);
16
16
  /** @public */
17
- var HistoryTracker = class extends Context.Tag("vitest-agent/HistoryTracker")() {};
17
+ var HistoryTracker = class extends Context.Service()("vitest-agent/HistoryTracker") {};
18
18
 
19
19
  //#endregion
20
20
  export { HistoryTracker, historyKey };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/OutputRenderer.ts
4
4
  /** @public */
5
- var OutputRenderer = class extends Context.Tag("vitest-agent/OutputRenderer")() {};
5
+ var OutputRenderer = class extends Context.Service()("vitest-agent/OutputRenderer") {};
6
6
 
7
7
  //#endregion
8
8
  export { OutputRenderer };
@@ -9,14 +9,14 @@ import { Context } from "effect";
9
9
  * methods would be a type error.
10
10
  * @public
11
11
  */
12
- var PerClientSessionMapReader = class extends Context.Tag("vitest-agent/PerClientSessionMapReader")() {};
12
+ var PerClientSessionMapReader = class extends Context.Service()("vitest-agent/PerClientSessionMapReader") {};
13
13
  /**
14
14
  * Read-write side of the session map. Sidecar provides this; the
15
15
  * Writer layer also satisfies the Reader tag so consumers of either
16
16
  * one resolve.
17
17
  * @public
18
18
  */
19
- var PerClientSessionMapWriter = class extends Context.Tag("vitest-agent/PerClientSessionMapWriter")() {};
19
+ var PerClientSessionMapWriter = class extends Context.Service()("vitest-agent/PerClientSessionMapWriter") {};
20
20
 
21
21
  //#endregion
22
22
  export { PerClientSessionMapReader, PerClientSessionMapWriter };
@@ -2,7 +2,7 @@ import { Context } from "effect";
2
2
 
3
3
  //#region src/services/ProjectDiscovery.ts
4
4
  /** @public */
5
- var ProjectDiscovery = class extends Context.Tag("vitest-agent/ProjectDiscovery")() {};
5
+ var ProjectDiscovery = class extends Context.Service()("vitest-agent/ProjectDiscovery") {};
6
6
 
7
7
  //#endregion
8
8
  export { ProjectDiscovery };
@@ -57,7 +57,7 @@ const resolveProjectIdentityFromCandidates = (candidates) => {
57
57
  * pre-built `ResolvedIdentity`.
58
58
  * @public
59
59
  */
60
- var ProjectIdentity = class extends Context.Tag("vitest-agent/ProjectIdentity")() {};
60
+ var ProjectIdentity = class extends Context.Service()("vitest-agent/ProjectIdentity") {};
61
61
 
62
62
  //#endregion
63
63
  export { ProjectIdentity, resolveProjectIdentityFromCandidates };
@@ -38,7 +38,7 @@ var AgentContext = class extends Schema.Class("vitest-agent/AgentContext")({
38
38
  * returns whatever the test fixture passes.
39
39
  * @public
40
40
  */
41
- var RunContext$ = class extends Context.Tag("vitest-agent/RunContextService")() {};
41
+ var RunContext$ = class extends Context.Service()("vitest-agent/RunContextService") {};
42
42
  /**
43
43
  * Re-export the service tag under a less-collision-prone name. The
44
44
  * `RunContext` Schema.Class above shares its symbol-name with the