@vitest-agent/sdk 2.4.13 → 2.5.1
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/dispatch.d.ts +4 -4
- package/index.d.ts +676 -458
- package/index.js +5 -3
- package/layers/DataReaderLive.js +101 -23
- package/layers/DataStoreLive.js +54 -6
- package/migrations/0001_initial.js +6 -2
- package/package.json +11 -11
- package/schemas/ConsoleLeaks.js +20 -3
- package/schemas/Coverage.js +1 -0
- package/schemas/RenderState.js +14 -3
- package/schemas/RunEvent.js +12 -2
- package/testing.d.ts +169 -52
- package/utils/console-leaks.js +42 -15
- package/utils/detect-non-default-discover-strategy.js +38 -0
- package/utils/format-console.js +5 -0
- package/utils/format-scoped-coverage-note.js +25 -0
- package/utils/format-terminal.js +15 -2
- package/utils/validate-phase-transition.js +20 -6
package/index.d.ts
CHANGED
|
@@ -9,19 +9,19 @@ import { ChildProcessSpawner } from "effect/unstable/process";
|
|
|
9
9
|
* Aggregate coverage percentages across four istanbul metrics.
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
declare const CoverageTotals: Schema.Struct<{
|
|
12
|
+
export declare const CoverageTotals: Schema.Struct<{
|
|
13
13
|
readonly statements: Schema.Number;
|
|
14
14
|
readonly branches: Schema.Number;
|
|
15
15
|
readonly functions: Schema.Number;
|
|
16
16
|
readonly lines: Schema.Number;
|
|
17
17
|
}>;
|
|
18
18
|
/** @public */
|
|
19
|
-
type CoverageTotals = typeof CoverageTotals.Type;
|
|
19
|
+
export type CoverageTotals = typeof CoverageTotals.Type;
|
|
20
20
|
/**
|
|
21
21
|
* Per-file coverage data including uncovered line ranges.
|
|
22
22
|
* @public
|
|
23
23
|
*/
|
|
24
|
-
declare const FileCoverageReport: Schema.Struct<{
|
|
24
|
+
export declare const FileCoverageReport: Schema.Struct<{
|
|
25
25
|
readonly file: Schema.String;
|
|
26
26
|
readonly summary: Schema.Struct<{
|
|
27
27
|
readonly statements: Schema.Number;
|
|
@@ -32,12 +32,12 @@ declare const FileCoverageReport: Schema.Struct<{
|
|
|
32
32
|
readonly uncoveredLines: Schema.String;
|
|
33
33
|
}>;
|
|
34
34
|
/** @public */
|
|
35
|
-
type FileCoverageReport = typeof FileCoverageReport.Type;
|
|
35
|
+
export type FileCoverageReport = typeof FileCoverageReport.Type;
|
|
36
36
|
/**
|
|
37
37
|
* Complete coverage report attached to an AgentReport.
|
|
38
38
|
* @public
|
|
39
39
|
*/
|
|
40
|
-
declare const CoverageReport: Schema.Struct<{
|
|
40
|
+
export declare const CoverageReport: Schema.Struct<{
|
|
41
41
|
readonly totals: Schema.Struct<{
|
|
42
42
|
readonly statements: Schema.Number;
|
|
43
43
|
readonly branches: Schema.Number;
|
|
@@ -88,6 +88,7 @@ declare const CoverageReport: Schema.Struct<{
|
|
|
88
88
|
}>>;
|
|
89
89
|
readonly scoped: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
90
90
|
readonly scopedFiles: Schema.optional<Schema.$Array<Schema.String>>;
|
|
91
|
+
readonly totalFiles: Schema.optional<Schema.Number>;
|
|
91
92
|
readonly lowCoverage: Schema.$Array<Schema.Struct<{
|
|
92
93
|
readonly file: Schema.String;
|
|
93
94
|
readonly summary: Schema.Struct<{
|
|
@@ -112,14 +113,14 @@ declare const CoverageReport: Schema.Struct<{
|
|
|
112
113
|
readonly belowTargetFiles: Schema.optional<Schema.$Array<Schema.String>>;
|
|
113
114
|
}>;
|
|
114
115
|
/** @public */
|
|
115
|
-
type CoverageReport = typeof CoverageReport.Type;
|
|
116
|
+
export type CoverageReport = typeof CoverageReport.Type;
|
|
116
117
|
//#endregion
|
|
117
118
|
//#region src/schemas/RenderState.d.ts
|
|
118
119
|
/**
|
|
119
120
|
* Per-test record accumulated as `TestStarted` / `TestFinished` events arrive.
|
|
120
121
|
* @public
|
|
121
122
|
*/
|
|
122
|
-
declare const TestRecord: Schema.Struct<{
|
|
123
|
+
export declare const TestRecord: Schema.Struct<{
|
|
123
124
|
readonly testName: Schema.String;
|
|
124
125
|
readonly suitePath: Schema.$Array<Schema.String>;
|
|
125
126
|
readonly status: Schema.Union<readonly [Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>, Schema.Literals<readonly ["running", "timed-out"]>]>;
|
|
@@ -133,13 +134,13 @@ declare const TestRecord: Schema.Struct<{
|
|
|
133
134
|
}>>;
|
|
134
135
|
}>;
|
|
135
136
|
/** @public */
|
|
136
|
-
type TestRecord = typeof TestRecord.Type;
|
|
137
|
+
export type TestRecord = typeof TestRecord.Type;
|
|
137
138
|
/**
|
|
138
139
|
* Per-module aggregation. The reducer keeps modules keyed on
|
|
139
140
|
* `modulePath` so out-of-order events can update the right slot.
|
|
140
141
|
* @public
|
|
141
142
|
*/
|
|
142
|
-
declare const ModuleRecord: Schema.Struct<{
|
|
143
|
+
export declare const ModuleRecord: Schema.Struct<{
|
|
143
144
|
readonly modulePath: Schema.String;
|
|
144
145
|
readonly status: Schema.Literals<readonly ["queued", "running", "finished"]>;
|
|
145
146
|
readonly passCount: Schema.Number;
|
|
@@ -176,14 +177,14 @@ declare const ModuleRecord: Schema.Struct<{
|
|
|
176
177
|
readonly tagCounts: Schema.optional<Schema.$Record<Schema.String, Schema.Number>>;
|
|
177
178
|
}>;
|
|
178
179
|
/** @public */
|
|
179
|
-
type ModuleRecord = typeof ModuleRecord.Type;
|
|
180
|
+
export type ModuleRecord = typeof ModuleRecord.Type;
|
|
180
181
|
/**
|
|
181
182
|
* One row in the failure list. A failure can exist before its
|
|
182
183
|
* classification arrives (`FailureClassified` is emitted from a
|
|
183
184
|
* separate pipeline), so `classification` is nullable.
|
|
184
185
|
* @public
|
|
185
186
|
*/
|
|
186
|
-
declare const FailureRecord: Schema.Struct<{
|
|
187
|
+
export declare const FailureRecord: Schema.Struct<{
|
|
187
188
|
readonly modulePath: Schema.String;
|
|
188
189
|
readonly testName: Schema.String;
|
|
189
190
|
readonly suitePath: Schema.$Array<Schema.String>;
|
|
@@ -198,13 +199,13 @@ declare const FailureRecord: Schema.Struct<{
|
|
|
198
199
|
readonly classification: Schema.NullOr<Schema.Literals<readonly ["stable", "new-failure", "persistent", "flaky", "recovered"]>>;
|
|
199
200
|
}>;
|
|
200
201
|
/** @public */
|
|
201
|
-
type FailureRecord = typeof FailureRecord.Type;
|
|
202
|
+
export type FailureRecord = typeof FailureRecord.Type;
|
|
202
203
|
/**
|
|
203
204
|
* Coverage block, populated only after `CoverageReady`. Threshold
|
|
204
205
|
* violations are accumulated separately as they arrive.
|
|
205
206
|
* @public
|
|
206
207
|
*/
|
|
207
|
-
declare const CoverageRenderState: Schema.Struct<{
|
|
208
|
+
export declare const CoverageRenderState: Schema.Struct<{
|
|
208
209
|
readonly metrics: Schema.Struct<{
|
|
209
210
|
readonly statements: Schema.Number;
|
|
210
211
|
readonly branches: Schema.Number;
|
|
@@ -232,27 +233,30 @@ declare const CoverageRenderState: Schema.Struct<{
|
|
|
232
233
|
readonly expected: Schema.Number;
|
|
233
234
|
readonly actual: Schema.Number;
|
|
234
235
|
}>>;
|
|
236
|
+
readonly scoped: Schema.optional<Schema.Boolean>;
|
|
237
|
+
readonly scopedFiles: Schema.optional<Schema.Number>;
|
|
238
|
+
readonly totalFiles: Schema.optional<Schema.Number>;
|
|
235
239
|
}>;
|
|
236
240
|
/** @public */
|
|
237
|
-
type CoverageRenderState = typeof CoverageRenderState.Type;
|
|
241
|
+
export type CoverageRenderState = typeof CoverageRenderState.Type;
|
|
238
242
|
/**
|
|
239
243
|
* A `SuggestedAction` event, denormalized into the queue the renderer reads.
|
|
240
244
|
* @public
|
|
241
245
|
*/
|
|
242
|
-
declare const SuggestedActionRecord: Schema.Struct<{
|
|
246
|
+
export declare const SuggestedActionRecord: Schema.Struct<{
|
|
243
247
|
readonly severity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
|
|
244
248
|
readonly title: Schema.String;
|
|
245
249
|
readonly detail: Schema.String;
|
|
246
250
|
readonly targetTool: Schema.optional<Schema.String>;
|
|
247
251
|
}>;
|
|
248
252
|
/** @public */
|
|
249
|
-
type SuggestedActionRecord = typeof SuggestedActionRecord.Type;
|
|
253
|
+
export type SuggestedActionRecord = typeof SuggestedActionRecord.Type;
|
|
250
254
|
/**
|
|
251
255
|
* Per-run totals, recomputed on every `ModuleFinished` and reconciled
|
|
252
256
|
* against `RunFinished` (which carries the runner's own count).
|
|
253
257
|
* @public
|
|
254
258
|
*/
|
|
255
|
-
declare const RenderTotals: Schema.Struct<{
|
|
259
|
+
export declare const RenderTotals: Schema.Struct<{
|
|
256
260
|
readonly passCount: Schema.Number;
|
|
257
261
|
readonly failCount: Schema.Number;
|
|
258
262
|
readonly skipCount: Schema.Number;
|
|
@@ -260,7 +264,7 @@ declare const RenderTotals: Schema.Struct<{
|
|
|
260
264
|
readonly durationMs: Schema.Number;
|
|
261
265
|
}>;
|
|
262
266
|
/** @public */
|
|
263
|
-
type RenderTotals = typeof RenderTotals.Type;
|
|
267
|
+
export type RenderTotals = typeof RenderTotals.Type;
|
|
264
268
|
/**
|
|
265
269
|
* The renderer state. Both the human (Ink) and agent (string)
|
|
266
270
|
* renderers read this shape; the reducer is the only producer.
|
|
@@ -272,7 +276,7 @@ type RenderTotals = typeof RenderTotals.Type;
|
|
|
272
276
|
* rather than the suite completing.
|
|
273
277
|
* @public
|
|
274
278
|
*/
|
|
275
|
-
declare const RenderState: Schema.Struct<{
|
|
279
|
+
export declare const RenderState: Schema.Struct<{
|
|
276
280
|
readonly phase: Schema.Literals<readonly ["idle", "running", "finished", "timed-out"]>;
|
|
277
281
|
readonly runId: Schema.NullOr<Schema.String>;
|
|
278
282
|
readonly configHash: Schema.NullOr<Schema.String>;
|
|
@@ -350,6 +354,9 @@ declare const RenderState: Schema.Struct<{
|
|
|
350
354
|
readonly expected: Schema.Number;
|
|
351
355
|
readonly actual: Schema.Number;
|
|
352
356
|
}>>;
|
|
357
|
+
readonly scoped: Schema.optional<Schema.Boolean>;
|
|
358
|
+
readonly scopedFiles: Schema.optional<Schema.Number>;
|
|
359
|
+
readonly totalFiles: Schema.optional<Schema.Number>;
|
|
353
360
|
}>>;
|
|
354
361
|
readonly trend: Schema.NullOr<Schema.Struct<{
|
|
355
362
|
readonly direction: Schema.Literals<readonly ["improving", "regressing", "stable"]>;
|
|
@@ -385,16 +392,29 @@ declare const RenderState: Schema.Struct<{
|
|
|
385
392
|
* fixtures) falls back to `moduleOrder.length`.
|
|
386
393
|
*/
|
|
387
394
|
readonly collectedModules: Schema.optional<Schema.Number>;
|
|
395
|
+
/**
|
|
396
|
+
* Process-level errors with no owning module, folded from
|
|
397
|
+
* `RunFinished.unhandledErrors`. A run that never carried the field
|
|
398
|
+
* (older replay data, hand-built fixtures) defaults to `[]`. See
|
|
399
|
+
* issue #240.
|
|
400
|
+
*/
|
|
401
|
+
readonly unhandledErrors: Schema.$Array<Schema.Struct<{
|
|
402
|
+
readonly message: Schema.String;
|
|
403
|
+
readonly stack: Schema.optional<Schema.String>;
|
|
404
|
+
readonly diff: Schema.optional<Schema.String>;
|
|
405
|
+
readonly expected: Schema.optional<Schema.String>;
|
|
406
|
+
readonly received: Schema.optional<Schema.String>;
|
|
407
|
+
}>>;
|
|
388
408
|
}>;
|
|
389
409
|
/** @public */
|
|
390
|
-
type RenderState = typeof RenderState.Type;
|
|
410
|
+
export type RenderState = typeof RenderState.Type;
|
|
391
411
|
/**
|
|
392
412
|
* Initial state — what the reducer returns when no events have been
|
|
393
413
|
* applied yet. Exported so tests and the renderers' bootstrapping
|
|
394
414
|
* code share one definition.
|
|
395
415
|
* @public
|
|
396
416
|
*/
|
|
397
|
-
declare const initialRenderState: RenderState;
|
|
417
|
+
export declare const initialRenderState: RenderState;
|
|
398
418
|
//#endregion
|
|
399
419
|
//#region src/contracts/dispatcher.d.ts
|
|
400
420
|
/**
|
|
@@ -410,7 +430,7 @@ declare const initialRenderState: RenderState;
|
|
|
410
430
|
* - `workspace` — more than one project.
|
|
411
431
|
* @public
|
|
412
432
|
*/
|
|
413
|
-
type RunShape = "single-test" | "single-file" | "single-project" | "workspace";
|
|
433
|
+
export type RunShape = "single-test" | "single-file" | "single-project" | "workspace";
|
|
414
434
|
/**
|
|
415
435
|
* The three outcome classes the dispatcher distinguishes.
|
|
416
436
|
*
|
|
@@ -419,7 +439,7 @@ type RunShape = "single-test" | "single-file" | "single-project" | "workspace";
|
|
|
419
439
|
* - `threshold-violation` — `totals.failed === 0` and at least one coverage violation.
|
|
420
440
|
* @public
|
|
421
441
|
*/
|
|
422
|
-
type RunOutcome = "all-pass" | "some-fail" | "threshold-violation";
|
|
442
|
+
export type RunOutcome = "all-pass" | "some-fail" | "threshold-violation";
|
|
423
443
|
/**
|
|
424
444
|
* Compact per-project aggregate carried into workspace cells.
|
|
425
445
|
*
|
|
@@ -428,12 +448,13 @@ type RunOutcome = "all-pass" | "some-fail" | "threshold-violation";
|
|
|
428
448
|
* optional — workspace cells render the columns only when present.
|
|
429
449
|
* @public
|
|
430
450
|
*/
|
|
431
|
-
interface ProjectSummary {
|
|
451
|
+
export interface ProjectSummary {
|
|
432
452
|
readonly name: string;
|
|
433
453
|
readonly passCount: number;
|
|
434
454
|
readonly failCount: number;
|
|
435
455
|
readonly skipCount: number;
|
|
436
456
|
readonly durationMs: number;
|
|
457
|
+
readonly timeoutCount?: number;
|
|
437
458
|
readonly tagCounts?: Record<string, number>;
|
|
438
459
|
readonly belowTarget?: number;
|
|
439
460
|
readonly violations?: number;
|
|
@@ -447,7 +468,7 @@ interface ProjectSummary {
|
|
|
447
468
|
* `ReporterRenderInput.trendSummary` before invoking `dispatch`.
|
|
448
469
|
* @public
|
|
449
470
|
*/
|
|
450
|
-
interface TrendSummary {
|
|
471
|
+
export interface TrendSummary {
|
|
451
472
|
readonly direction: "improving" | "regressing" | "stable";
|
|
452
473
|
readonly runCount: number;
|
|
453
474
|
readonly firstMetric?: {
|
|
@@ -466,7 +487,7 @@ interface TrendSummary {
|
|
|
466
487
|
* helpers the plugin computes once before dispatch so cells stay pure.
|
|
467
488
|
* @public
|
|
468
489
|
*/
|
|
469
|
-
interface DispatchInputs {
|
|
490
|
+
export interface DispatchInputs {
|
|
470
491
|
readonly state: RenderState;
|
|
471
492
|
readonly shape: RunShape;
|
|
472
493
|
readonly outcome: RunOutcome;
|
|
@@ -504,7 +525,7 @@ interface DispatchInputs {
|
|
|
504
525
|
* `dispatch(inputs, opts)`. Cells destructure only what they consume.
|
|
505
526
|
* @public
|
|
506
527
|
*/
|
|
507
|
-
interface CellOptions {
|
|
528
|
+
export interface CellOptions {
|
|
508
529
|
/**
|
|
509
530
|
* Resolved value of the `NO_COLOR` env var. Cells gate ANSI escape
|
|
510
531
|
* sequences and OSC-8 hyperlinks on this.
|
|
@@ -523,7 +544,7 @@ interface CellOptions {
|
|
|
523
544
|
* Aggregate test run statistics.
|
|
524
545
|
* @public
|
|
525
546
|
*/
|
|
526
|
-
declare const ReportSummary: Schema.Struct<{
|
|
547
|
+
export declare const ReportSummary: Schema.Struct<{
|
|
527
548
|
readonly total: Schema.Number;
|
|
528
549
|
readonly passed: Schema.Number;
|
|
529
550
|
readonly failed: Schema.Number;
|
|
@@ -539,12 +560,12 @@ declare const ReportSummary: Schema.Struct<{
|
|
|
539
560
|
readonly modules: Schema.optional<Schema.Number>;
|
|
540
561
|
}>;
|
|
541
562
|
/** @public */
|
|
542
|
-
type ReportSummary = typeof ReportSummary.Type;
|
|
563
|
+
export type ReportSummary = typeof ReportSummary.Type;
|
|
543
564
|
/**
|
|
544
565
|
* An individual test case result.
|
|
545
566
|
* @public
|
|
546
567
|
*/
|
|
547
|
-
declare const TestReport: Schema.Struct<{
|
|
568
|
+
export declare const TestReport: Schema.Struct<{
|
|
548
569
|
readonly name: Schema.String;
|
|
549
570
|
readonly fullName: Schema.String;
|
|
550
571
|
readonly state: Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>;
|
|
@@ -561,12 +582,12 @@ declare const TestReport: Schema.Struct<{
|
|
|
561
582
|
readonly classification: Schema.optional<Schema.Literals<readonly ["stable", "new-failure", "persistent", "flaky", "recovered"]>>;
|
|
562
583
|
}>;
|
|
563
584
|
/** @public */
|
|
564
|
-
type TestReport = typeof TestReport.Type;
|
|
585
|
+
export type TestReport = typeof TestReport.Type;
|
|
565
586
|
/**
|
|
566
587
|
* A test module (file) and its contained test cases.
|
|
567
588
|
* @public
|
|
568
589
|
*/
|
|
569
|
-
declare const ModuleReport: Schema.Struct<{
|
|
590
|
+
export declare const ModuleReport: Schema.Struct<{
|
|
570
591
|
readonly file: Schema.String;
|
|
571
592
|
readonly state: Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>;
|
|
572
593
|
readonly duration: Schema.optional<Schema.Number>;
|
|
@@ -595,23 +616,23 @@ declare const ModuleReport: Schema.Struct<{
|
|
|
595
616
|
}>>;
|
|
596
617
|
}>;
|
|
597
618
|
/** @public */
|
|
598
|
-
type ModuleReport = typeof ModuleReport.Type;
|
|
619
|
+
export type ModuleReport = typeof ModuleReport.Type;
|
|
599
620
|
/**
|
|
600
621
|
* Per-tag pass/fail/skip aggregates for a single project run.
|
|
601
622
|
* @public
|
|
602
623
|
*/
|
|
603
|
-
declare const TagCountEntry: Schema.Struct<{
|
|
624
|
+
export declare const TagCountEntry: Schema.Struct<{
|
|
604
625
|
readonly passed: Schema.optional<Schema.Number>;
|
|
605
626
|
readonly failed: Schema.optional<Schema.Number>;
|
|
606
627
|
readonly skipped: Schema.optional<Schema.Number>;
|
|
607
628
|
}>;
|
|
608
629
|
/** @public */
|
|
609
|
-
type TagCountEntry = typeof TagCountEntry.Type;
|
|
630
|
+
export type TagCountEntry = typeof TagCountEntry.Type;
|
|
610
631
|
/**
|
|
611
632
|
* Complete per-project test report written to disk as JSON.
|
|
612
633
|
* @public
|
|
613
634
|
*/
|
|
614
|
-
declare const AgentReport: Schema.Struct<{
|
|
635
|
+
export declare const AgentReport: Schema.Struct<{
|
|
615
636
|
readonly timestamp: Schema.String;
|
|
616
637
|
readonly project: Schema.optional<Schema.String>;
|
|
617
638
|
readonly reason: Schema.Literals<readonly ["passed", "failed", "interrupted"]>;
|
|
@@ -717,6 +738,7 @@ declare const AgentReport: Schema.Struct<{
|
|
|
717
738
|
}>>;
|
|
718
739
|
readonly scoped: Schema.withDecodingDefaultKey<Schema.Boolean, never>;
|
|
719
740
|
readonly scopedFiles: Schema.optional<Schema.$Array<Schema.String>>;
|
|
741
|
+
readonly totalFiles: Schema.optional<Schema.Number>;
|
|
720
742
|
readonly lowCoverage: Schema.$Array<Schema.Struct<{
|
|
721
743
|
readonly file: Schema.String;
|
|
722
744
|
readonly summary: Schema.Struct<{
|
|
@@ -755,40 +777,44 @@ declare const AgentReport: Schema.Struct<{
|
|
|
755
777
|
readonly sample: Schema.optional<Schema.String>;
|
|
756
778
|
}>>;
|
|
757
779
|
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
780
|
+
readonly fromFailingTests: Schema.optional<Schema.Struct<{
|
|
781
|
+
readonly total: Schema.Number;
|
|
782
|
+
readonly files: Schema.Number;
|
|
783
|
+
}>>;
|
|
758
784
|
}>>;
|
|
759
785
|
}>;
|
|
760
786
|
/** @public */
|
|
761
|
-
type AgentReport = typeof AgentReport.Type;
|
|
787
|
+
export type AgentReport = typeof AgentReport.Type;
|
|
762
788
|
//#endregion
|
|
763
789
|
//#region src/schemas/Common.d.ts
|
|
764
790
|
/**
|
|
765
791
|
* Possible states for an individual test case.
|
|
766
792
|
* @public
|
|
767
793
|
*/
|
|
768
|
-
declare const TestState: Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>;
|
|
794
|
+
export declare const TestState: Schema.Literals<readonly ["passed", "failed", "skipped", "pending"]>;
|
|
769
795
|
/** @public */
|
|
770
|
-
type TestState = typeof TestState.Type;
|
|
796
|
+
export type TestState = typeof TestState.Type;
|
|
771
797
|
/**
|
|
772
798
|
* Overall outcome of a test run.
|
|
773
799
|
* @public
|
|
774
800
|
*/
|
|
775
|
-
declare const TestRunReason: Schema.Literals<readonly ["passed", "failed", "interrupted"]>;
|
|
801
|
+
export declare const TestRunReason: Schema.Literals<readonly ["passed", "failed", "interrupted"]>;
|
|
776
802
|
/** @public */
|
|
777
|
-
type TestRunReason = typeof TestRunReason.Type;
|
|
803
|
+
export type TestRunReason = typeof TestRunReason.Type;
|
|
778
804
|
/**
|
|
779
805
|
* Classification of a test's failure history across runs.
|
|
780
806
|
* @public
|
|
781
807
|
*/
|
|
782
|
-
declare const TestClassification: Schema.Literals<readonly ["stable", "new-failure", "persistent", "flaky", "recovered"]>;
|
|
808
|
+
export declare const TestClassification: Schema.Literals<readonly ["stable", "new-failure", "persistent", "flaky", "recovered"]>;
|
|
783
809
|
/** @public */
|
|
784
|
-
type TestClassification = typeof TestClassification.Type;
|
|
810
|
+
export type TestClassification = typeof TestClassification.Type;
|
|
785
811
|
/**
|
|
786
812
|
* Console output verbosity mode for AgentReporter.
|
|
787
813
|
* @public
|
|
788
814
|
*/
|
|
789
|
-
declare const ConsoleOutputMode: Schema.Literals<readonly ["failures", "full", "silent"]>;
|
|
815
|
+
export declare const ConsoleOutputMode: Schema.Literals<readonly ["failures", "full", "silent"]>;
|
|
790
816
|
/** @public */
|
|
791
|
-
type ConsoleOutputMode = typeof ConsoleOutputMode.Type;
|
|
817
|
+
export type ConsoleOutputMode = typeof ConsoleOutputMode.Type;
|
|
792
818
|
/**
|
|
793
819
|
* Console output choices per executor type.
|
|
794
820
|
*
|
|
@@ -807,60 +833,60 @@ type ConsoleOutputMode = typeof ConsoleOutputMode.Type;
|
|
|
807
833
|
* so the default for `ci` is `passthrough` until it lands.
|
|
808
834
|
* @public
|
|
809
835
|
*/
|
|
810
|
-
declare const HumanConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>;
|
|
836
|
+
export declare const HumanConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>;
|
|
811
837
|
/** @public */
|
|
812
|
-
type HumanConsoleMode = typeof HumanConsoleMode.Type;
|
|
838
|
+
export type HumanConsoleMode = typeof HumanConsoleMode.Type;
|
|
813
839
|
/** @public */
|
|
814
|
-
declare const AgentConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "agent"]>;
|
|
840
|
+
export declare const AgentConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "agent"]>;
|
|
815
841
|
/** @public */
|
|
816
|
-
type AgentConsoleMode = typeof AgentConsoleMode.Type;
|
|
842
|
+
export type AgentConsoleMode = typeof AgentConsoleMode.Type;
|
|
817
843
|
/** @public */
|
|
818
|
-
declare const CiConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "ci-annotations"]>;
|
|
844
|
+
export declare const CiConsoleMode: Schema.Literals<readonly ["passthrough", "silent", "ci-annotations"]>;
|
|
819
845
|
/** @public */
|
|
820
|
-
type CiConsoleMode = typeof CiConsoleMode.Type;
|
|
846
|
+
export type CiConsoleMode = typeof CiConsoleMode.Type;
|
|
821
847
|
/**
|
|
822
848
|
* Union of every legal console-output value across the three executor slots.
|
|
823
849
|
* Useful for type-narrowing in renderers that take the resolved value.
|
|
824
850
|
* @public
|
|
825
851
|
*/
|
|
826
|
-
declare const ConsoleMode: Schema.Union<readonly [Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>, Schema.Literals<readonly ["passthrough", "silent", "agent"]>, Schema.Literals<readonly ["passthrough", "silent", "ci-annotations"]>]>;
|
|
852
|
+
export declare const ConsoleMode: Schema.Union<readonly [Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>, Schema.Literals<readonly ["passthrough", "silent", "agent"]>, Schema.Literals<readonly ["passthrough", "silent", "ci-annotations"]>]>;
|
|
827
853
|
/** @public */
|
|
828
|
-
type ConsoleMode = typeof ConsoleMode.Type;
|
|
854
|
+
export type ConsoleMode = typeof ConsoleMode.Type;
|
|
829
855
|
/**
|
|
830
856
|
* Supported package managers for run command generation.
|
|
831
857
|
* @public
|
|
832
858
|
*/
|
|
833
|
-
declare const PackageManager: Schema.Literals<readonly ["pnpm", "npm", "yarn", "bun"]>;
|
|
859
|
+
export declare const PackageManager: Schema.Literals<readonly ["pnpm", "npm", "yarn", "bun"]>;
|
|
834
860
|
/** @public */
|
|
835
|
-
type PackageManager = typeof PackageManager.Type;
|
|
861
|
+
export type PackageManager = typeof PackageManager.Type;
|
|
836
862
|
/**
|
|
837
863
|
* Runtime environment where tests are being executed.
|
|
838
864
|
* @public
|
|
839
865
|
*/
|
|
840
|
-
declare const Environment: Schema.Literals<readonly ["agent-shell", "terminal", "ci-github", "ci-generic"]>;
|
|
866
|
+
export declare const Environment: Schema.Literals<readonly ["agent-shell", "terminal", "ci-github", "ci-generic"]>;
|
|
841
867
|
/** @public */
|
|
842
|
-
type Environment = typeof Environment.Type;
|
|
868
|
+
export type Environment = typeof Environment.Type;
|
|
843
869
|
/**
|
|
844
870
|
* Who or what is executing the test run.
|
|
845
871
|
* @public
|
|
846
872
|
*/
|
|
847
|
-
declare const Executor: Schema.Literals<readonly ["human", "agent", "ci"]>;
|
|
873
|
+
export declare const Executor: Schema.Literals<readonly ["human", "agent", "ci"]>;
|
|
848
874
|
/** @public */
|
|
849
|
-
type Executor = typeof Executor.Type;
|
|
875
|
+
export type Executor = typeof Executor.Type;
|
|
850
876
|
/**
|
|
851
877
|
* Output format for the reporter pipeline.
|
|
852
878
|
* @public
|
|
853
879
|
*/
|
|
854
|
-
declare const OutputFormat: Schema.Literals<readonly ["terminal", "markdown", "json", "vitest-bypass", "silent", "ci-annotations"]>;
|
|
880
|
+
export declare const OutputFormat: Schema.Literals<readonly ["terminal", "markdown", "json", "vitest-bypass", "silent", "ci-annotations"]>;
|
|
855
881
|
/** @public */
|
|
856
|
-
type OutputFormat = typeof OutputFormat.Type;
|
|
882
|
+
export type OutputFormat = typeof OutputFormat.Type;
|
|
857
883
|
/**
|
|
858
884
|
* Level of detail in reporter output.
|
|
859
885
|
* @public
|
|
860
886
|
*/
|
|
861
|
-
declare const DetailLevel: Schema.Literals<readonly ["minimal", "neutral", "standard", "verbose"]>;
|
|
887
|
+
export declare const DetailLevel: Schema.Literals<readonly ["minimal", "neutral", "standard", "verbose"]>;
|
|
862
888
|
/** @public */
|
|
863
|
-
type DetailLevel = typeof DetailLevel.Type;
|
|
889
|
+
export type DetailLevel = typeof DetailLevel.Type;
|
|
864
890
|
/**
|
|
865
891
|
* A single test or module error with optional stack trace, diff, and
|
|
866
892
|
* structured assertion values.
|
|
@@ -873,7 +899,7 @@ type DetailLevel = typeof DetailLevel.Type;
|
|
|
873
899
|
* the schema boundary.
|
|
874
900
|
* @public
|
|
875
901
|
*/
|
|
876
|
-
declare const ReportError: Schema.Struct<{
|
|
902
|
+
export declare const ReportError: Schema.Struct<{
|
|
877
903
|
readonly message: Schema.String;
|
|
878
904
|
readonly stack: Schema.optional<Schema.String>;
|
|
879
905
|
readonly diff: Schema.optional<Schema.String>;
|
|
@@ -881,17 +907,17 @@ declare const ReportError: Schema.Struct<{
|
|
|
881
907
|
readonly received: Schema.optional<Schema.String>;
|
|
882
908
|
}>;
|
|
883
909
|
/** @public */
|
|
884
|
-
type ReportError = typeof ReportError.Type;
|
|
910
|
+
export type ReportError = typeof ReportError.Type;
|
|
885
911
|
//#endregion
|
|
886
912
|
//#region src/formatters/types.d.ts
|
|
887
913
|
/** @public */
|
|
888
|
-
interface RenderedOutput {
|
|
914
|
+
export interface RenderedOutput {
|
|
889
915
|
readonly target: "stdout" | "file" | "github-summary";
|
|
890
916
|
readonly content: string;
|
|
891
917
|
readonly contentType: string;
|
|
892
918
|
}
|
|
893
919
|
/** @public */
|
|
894
|
-
interface FormatterContext {
|
|
920
|
+
export interface FormatterContext {
|
|
895
921
|
readonly detail: DetailLevel;
|
|
896
922
|
readonly noColor: boolean;
|
|
897
923
|
readonly coverageConsoleLimit: number;
|
|
@@ -910,7 +936,7 @@ interface FormatterContext {
|
|
|
910
936
|
readonly mcp?: boolean;
|
|
911
937
|
}
|
|
912
938
|
/** @public */
|
|
913
|
-
interface Formatter {
|
|
939
|
+
export interface Formatter {
|
|
914
940
|
readonly format: string;
|
|
915
941
|
readonly render: (reports: ReadonlyArray<AgentReport>, context: FormatterContext) => ReadonlyArray<RenderedOutput>;
|
|
916
942
|
}
|
|
@@ -920,43 +946,43 @@ interface Formatter {
|
|
|
920
946
|
* Coverage metric whose threshold can be violated independently.
|
|
921
947
|
* @public
|
|
922
948
|
*/
|
|
923
|
-
declare const CoverageMetric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
|
|
949
|
+
export declare const CoverageMetric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
|
|
924
950
|
/** @public */
|
|
925
|
-
type CoverageMetric = typeof CoverageMetric.Type;
|
|
951
|
+
export type CoverageMetric = typeof CoverageMetric.Type;
|
|
926
952
|
/**
|
|
927
953
|
* Severity tier for a suggested action emitted during a run.
|
|
928
954
|
* @public
|
|
929
955
|
*/
|
|
930
|
-
declare const ActionSeverity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
|
|
956
|
+
export declare const ActionSeverity: Schema.Literals<readonly ["info", "warn", "blocker"]>;
|
|
931
957
|
/** @public */
|
|
932
|
-
type ActionSeverity = typeof ActionSeverity.Type;
|
|
958
|
+
export type ActionSeverity = typeof ActionSeverity.Type;
|
|
933
959
|
/**
|
|
934
960
|
* Lifecycle scope of a Vitest setup/teardown hook.
|
|
935
961
|
* @public
|
|
936
962
|
*/
|
|
937
|
-
declare const HookType: Schema.Literals<readonly ["beforeAll", "afterAll", "beforeEach", "afterEach"]>;
|
|
963
|
+
export declare const HookType: Schema.Literals<readonly ["beforeAll", "afterAll", "beforeEach", "afterEach"]>;
|
|
938
964
|
/** @public */
|
|
939
|
-
type HookType = typeof HookType.Type;
|
|
965
|
+
export type HookType = typeof HookType.Type;
|
|
940
966
|
/**
|
|
941
967
|
* Terminal status of a Vitest hook run.
|
|
942
968
|
* @public
|
|
943
969
|
*/
|
|
944
|
-
declare const HookStatus: Schema.Literals<readonly ["passed", "failed"]>;
|
|
970
|
+
export declare const HookStatus: Schema.Literals<readonly ["passed", "failed"]>;
|
|
945
971
|
/** @public */
|
|
946
|
-
type HookStatus = typeof HookStatus.Type;
|
|
972
|
+
export type HookStatus = typeof HookStatus.Type;
|
|
947
973
|
/**
|
|
948
974
|
* Output stream a captured user `console.log` was written to.
|
|
949
975
|
* @public
|
|
950
976
|
*/
|
|
951
|
-
declare const ConsoleLogLevel: Schema.Literals<readonly ["stdout", "stderr"]>;
|
|
977
|
+
export declare const ConsoleLogLevel: Schema.Literals<readonly ["stdout", "stderr"]>;
|
|
952
978
|
/** @public */
|
|
953
|
-
type ConsoleLogLevel = typeof ConsoleLogLevel.Type;
|
|
979
|
+
export type ConsoleLogLevel = typeof ConsoleLogLevel.Type;
|
|
954
980
|
/**
|
|
955
981
|
* A coverage gap surfaced to the renderer — a per-file shortfall that
|
|
956
982
|
* a renderer may want to call out individually.
|
|
957
983
|
* @public
|
|
958
984
|
*/
|
|
959
|
-
declare const CoverageGap: Schema.Struct<{
|
|
985
|
+
export declare const CoverageGap: Schema.Struct<{
|
|
960
986
|
readonly file: Schema.String;
|
|
961
987
|
readonly missing: Schema.Struct<{
|
|
962
988
|
readonly statements: Schema.Number;
|
|
@@ -967,7 +993,7 @@ declare const CoverageGap: Schema.Struct<{
|
|
|
967
993
|
readonly uncoveredLines: Schema.optional<Schema.String>;
|
|
968
994
|
}>;
|
|
969
995
|
/** @public */
|
|
970
|
-
type CoverageGap = typeof CoverageGap.Type;
|
|
996
|
+
export type CoverageGap = typeof CoverageGap.Type;
|
|
971
997
|
/**
|
|
972
998
|
* The reducer projects this union into `RenderState`. Renderers
|
|
973
999
|
* never read the raw event stream — they read the projected state.
|
|
@@ -978,7 +1004,7 @@ type CoverageGap = typeof CoverageGap.Type;
|
|
|
978
1004
|
* been updated to consume the new state shape.
|
|
979
1005
|
* @public
|
|
980
1006
|
*/
|
|
981
|
-
declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted", {
|
|
1007
|
+
export declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted", {
|
|
982
1008
|
readonly runId: Schema.String;
|
|
983
1009
|
readonly startedAt: Schema.String;
|
|
984
1010
|
readonly configHash: Schema.String;
|
|
@@ -1095,6 +1121,9 @@ declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted",
|
|
|
1095
1121
|
}>;
|
|
1096
1122
|
readonly uncoveredLines: Schema.optional<Schema.String>;
|
|
1097
1123
|
}>>;
|
|
1124
|
+
readonly scoped: Schema.optional<Schema.Boolean>;
|
|
1125
|
+
readonly scopedFiles: Schema.optional<Schema.Number>;
|
|
1126
|
+
readonly totalFiles: Schema.optional<Schema.Number>;
|
|
1098
1127
|
}>, Schema.TaggedStruct<"ThresholdViolation", {
|
|
1099
1128
|
readonly metric: Schema.Literals<readonly ["lines", "branches", "functions", "statements"]>;
|
|
1100
1129
|
readonly expected: Schema.Number;
|
|
@@ -1124,9 +1153,22 @@ declare const RunEvent: Schema.Union<readonly [Schema.TaggedStruct<"RunStarted",
|
|
|
1124
1153
|
* tracks failing modules (report replay). See issue #204.
|
|
1125
1154
|
*/
|
|
1126
1155
|
readonly collectedModules: Schema.optional<Schema.Number>;
|
|
1156
|
+
/**
|
|
1157
|
+
* Process-level errors with no owning module (an unhandled
|
|
1158
|
+
* rejection, a worker crash) — Vitest's `unhandledErrors`
|
|
1159
|
+
* argument to `onTestRunEnd`. Optional so hand-built fixtures
|
|
1160
|
+
* and older replay data keep decoding. See issue #240.
|
|
1161
|
+
*/
|
|
1162
|
+
readonly unhandledErrors: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
1163
|
+
readonly message: Schema.String;
|
|
1164
|
+
readonly stack: Schema.optional<Schema.String>;
|
|
1165
|
+
readonly diff: Schema.optional<Schema.String>;
|
|
1166
|
+
readonly expected: Schema.optional<Schema.String>;
|
|
1167
|
+
readonly received: Schema.optional<Schema.String>;
|
|
1168
|
+
}>>>;
|
|
1127
1169
|
}>]>;
|
|
1128
1170
|
/** @public */
|
|
1129
|
-
type RunEvent = typeof RunEvent.Type;
|
|
1171
|
+
export type RunEvent = typeof RunEvent.Type;
|
|
1130
1172
|
/**
|
|
1131
1173
|
* Convenience: discriminator-keyed map of the individual variants.
|
|
1132
1174
|
*
|
|
@@ -1134,38 +1176,38 @@ type RunEvent = typeof RunEvent.Type;
|
|
|
1134
1176
|
* pulling the whole union shape into scope.
|
|
1135
1177
|
* @public
|
|
1136
1178
|
*/
|
|
1137
|
-
type RunEventByTag = { [E in RunEvent as E["_tag"]]: E; };
|
|
1179
|
+
export type RunEventByTag = { [E in RunEvent as E["_tag"]]: E; };
|
|
1138
1180
|
//#endregion
|
|
1139
1181
|
//#region src/schemas/Thresholds.d.ts
|
|
1140
1182
|
/**
|
|
1141
1183
|
* Per-metric threshold values. All optional -- only set metrics are enforced.
|
|
1142
1184
|
* @public
|
|
1143
1185
|
*/
|
|
1144
|
-
declare const MetricThresholds: Schema.Struct<{
|
|
1186
|
+
export declare const MetricThresholds: Schema.Struct<{
|
|
1145
1187
|
readonly lines: Schema.optional<Schema.Number>;
|
|
1146
1188
|
readonly functions: Schema.optional<Schema.Number>;
|
|
1147
1189
|
readonly branches: Schema.optional<Schema.Number>;
|
|
1148
1190
|
readonly statements: Schema.optional<Schema.Number>;
|
|
1149
1191
|
}>;
|
|
1150
1192
|
/** @public */
|
|
1151
|
-
type MetricThresholds = typeof MetricThresholds.Type;
|
|
1193
|
+
export type MetricThresholds = typeof MetricThresholds.Type;
|
|
1152
1194
|
/**
|
|
1153
1195
|
* A glob pattern paired with its metric thresholds.
|
|
1154
1196
|
* @public
|
|
1155
1197
|
*/
|
|
1156
|
-
declare const PatternThresholds: Schema.Tuple<readonly [Schema.String, Schema.Struct<{
|
|
1198
|
+
export declare const PatternThresholds: Schema.Tuple<readonly [Schema.String, Schema.Struct<{
|
|
1157
1199
|
readonly lines: Schema.optional<Schema.Number>;
|
|
1158
1200
|
readonly functions: Schema.optional<Schema.Number>;
|
|
1159
1201
|
readonly branches: Schema.optional<Schema.Number>;
|
|
1160
1202
|
readonly statements: Schema.optional<Schema.Number>;
|
|
1161
1203
|
}>]>;
|
|
1162
1204
|
/** @public */
|
|
1163
|
-
type PatternThresholds = typeof PatternThresholds.Type;
|
|
1205
|
+
export type PatternThresholds = typeof PatternThresholds.Type;
|
|
1164
1206
|
/**
|
|
1165
1207
|
* Fully resolved thresholds ready for evaluation.
|
|
1166
1208
|
* @public
|
|
1167
1209
|
*/
|
|
1168
|
-
declare const ResolvedThresholds: Schema.Struct<{
|
|
1210
|
+
export declare const ResolvedThresholds: Schema.Struct<{
|
|
1169
1211
|
readonly global: Schema.Struct<{
|
|
1170
1212
|
readonly lines: Schema.optional<Schema.Number>;
|
|
1171
1213
|
readonly functions: Schema.optional<Schema.Number>;
|
|
@@ -1181,7 +1223,7 @@ declare const ResolvedThresholds: Schema.Struct<{
|
|
|
1181
1223
|
}>]>>, never>;
|
|
1182
1224
|
}>;
|
|
1183
1225
|
/** @public */
|
|
1184
|
-
type ResolvedThresholds = typeof ResolvedThresholds.Type;
|
|
1226
|
+
export type ResolvedThresholds = typeof ResolvedThresholds.Type;
|
|
1185
1227
|
//#endregion
|
|
1186
1228
|
//#region src/schemas/Transport.d.ts
|
|
1187
1229
|
/**
|
|
@@ -1193,11 +1235,11 @@ type ResolvedThresholds = typeof ResolvedThresholds.Type;
|
|
|
1193
1235
|
* diff and no breaking API change at the call site.
|
|
1194
1236
|
* @public
|
|
1195
1237
|
*/
|
|
1196
|
-
declare const Transport: Schema.Union<readonly [Schema.Struct<{
|
|
1238
|
+
export declare const Transport: Schema.Union<readonly [Schema.Struct<{
|
|
1197
1239
|
readonly kind: Schema.Literal<"local">;
|
|
1198
1240
|
}>]>;
|
|
1199
1241
|
/** @public */
|
|
1200
|
-
type Transport = typeof Transport.Type;
|
|
1242
|
+
export type Transport = typeof Transport.Type;
|
|
1201
1243
|
//#endregion
|
|
1202
1244
|
//#region src/contracts/reporter.d.ts
|
|
1203
1245
|
/**
|
|
@@ -1215,7 +1257,7 @@ type Transport = typeof Transport.Type;
|
|
|
1215
1257
|
* var; reporters use it to gate ANSI escapes and OSC-8 hyperlinks.
|
|
1216
1258
|
* @public
|
|
1217
1259
|
*/
|
|
1218
|
-
interface ResolvedReporterConfig {
|
|
1260
|
+
export interface ResolvedReporterConfig {
|
|
1219
1261
|
readonly dbPath?: string;
|
|
1220
1262
|
readonly projectFilter?: string;
|
|
1221
1263
|
/**
|
|
@@ -1291,7 +1333,7 @@ interface ResolvedReporterConfig {
|
|
|
1291
1333
|
* named-field object. Reporters destructure only what they consume.
|
|
1292
1334
|
* @public
|
|
1293
1335
|
*/
|
|
1294
|
-
interface ReporterKit {
|
|
1336
|
+
export interface ReporterKit {
|
|
1295
1337
|
readonly config: ResolvedReporterConfig;
|
|
1296
1338
|
readonly stdEnv: Environment;
|
|
1297
1339
|
/**
|
|
@@ -1327,7 +1369,7 @@ interface ReporterKit {
|
|
|
1327
1369
|
* where coverage trends were computed.
|
|
1328
1370
|
* @public
|
|
1329
1371
|
*/
|
|
1330
|
-
interface ReporterRenderInput {
|
|
1372
|
+
export interface ReporterRenderInput {
|
|
1331
1373
|
readonly reports: ReadonlyArray<AgentReport>;
|
|
1332
1374
|
readonly classifications: ReadonlyMap<string, TestClassification>;
|
|
1333
1375
|
readonly trendSummary?: {
|
|
@@ -1361,7 +1403,7 @@ interface ReporterRenderInput {
|
|
|
1361
1403
|
* no console output at all.
|
|
1362
1404
|
* @public
|
|
1363
1405
|
*/
|
|
1364
|
-
interface VitestAgentReporter {
|
|
1406
|
+
export interface VitestAgentReporter {
|
|
1365
1407
|
readonly render: (input: ReporterRenderInput, kit: ReporterKit) => ReadonlyArray<RenderedOutput>;
|
|
1366
1408
|
}
|
|
1367
1409
|
/**
|
|
@@ -1383,7 +1425,7 @@ interface VitestAgentReporter {
|
|
|
1383
1425
|
* the plugin own the kit assembly.
|
|
1384
1426
|
* @public
|
|
1385
1427
|
*/
|
|
1386
|
-
type VitestAgentReporterFactory = (kit: ReporterKit) => VitestAgentReporter | ReadonlyArray<VitestAgentReporter>;
|
|
1428
|
+
export type VitestAgentReporterFactory = (kit: ReporterKit) => VitestAgentReporter | ReadonlyArray<VitestAgentReporter>;
|
|
1387
1429
|
//#endregion
|
|
1388
1430
|
//#region src/schemas/Identity.d.ts
|
|
1389
1431
|
/**
|
|
@@ -1392,18 +1434,18 @@ type VitestAgentReporterFactory = (kit: ReporterKit) => VitestAgentReporter | Re
|
|
|
1392
1434
|
* agent's lifetime.
|
|
1393
1435
|
* @public
|
|
1394
1436
|
*/
|
|
1395
|
-
declare const AgentId: Schema.brand<Schema.String, "AgentId">;
|
|
1437
|
+
export declare const AgentId: Schema.brand<Schema.String, "AgentId">;
|
|
1396
1438
|
/** @public */
|
|
1397
|
-
type AgentId = Schema.Schema.Type<typeof AgentId>;
|
|
1439
|
+
export type AgentId = Schema.Schema.Type<typeof AgentId>;
|
|
1398
1440
|
/**
|
|
1399
1441
|
* The unit "all work on this feature" rolls up to. Survives
|
|
1400
1442
|
* `claude --resume` and parallel windows; lives in the host's
|
|
1401
1443
|
* transcript filename for Claude Code.
|
|
1402
1444
|
* @public
|
|
1403
1445
|
*/
|
|
1404
|
-
declare const ConversationId: Schema.brand<Schema.String, "ConversationId">;
|
|
1446
|
+
export declare const ConversationId: Schema.brand<Schema.String, "ConversationId">;
|
|
1405
1447
|
/** @public */
|
|
1406
|
-
type ConversationId = Schema.Schema.Type<typeof ConversationId>;
|
|
1448
|
+
export type ConversationId = Schema.Schema.Type<typeof ConversationId>;
|
|
1407
1449
|
/**
|
|
1408
1450
|
* The agent host process's chat id (Claude Code's per-process chat
|
|
1409
1451
|
* UUID, etc.). Shorter-lived than a conversation; one conversation can
|
|
@@ -1411,17 +1453,17 @@ type ConversationId = Schema.Schema.Type<typeof ConversationId>;
|
|
|
1411
1453
|
* `sessions.id` (the SQLite agent-run PK).
|
|
1412
1454
|
* @public
|
|
1413
1455
|
*/
|
|
1414
|
-
declare const ChatId: Schema.brand<Schema.String, "ChatId">;
|
|
1456
|
+
export declare const ChatId: Schema.brand<Schema.String, "ChatId">;
|
|
1415
1457
|
/** @public */
|
|
1416
|
-
type ChatId = Schema.Schema.Type<typeof ChatId>;
|
|
1458
|
+
export type ChatId = Schema.Schema.Type<typeof ChatId>;
|
|
1417
1459
|
/**
|
|
1418
1460
|
* One TDD orchestration task. Replaces the legacy `tdd_session_id`
|
|
1419
1461
|
* vocabulary so "session" is unambiguous in the codebase.
|
|
1420
1462
|
* @public
|
|
1421
1463
|
*/
|
|
1422
|
-
declare const TddTaskId: Schema.brand<Schema.String, "TddTaskId">;
|
|
1464
|
+
export declare const TddTaskId: Schema.brand<Schema.String, "TddTaskId">;
|
|
1423
1465
|
/** @public */
|
|
1424
|
-
type TddTaskId = Schema.Schema.Type<typeof TddTaskId>;
|
|
1466
|
+
export type TddTaskId = Schema.Schema.Type<typeof TddTaskId>;
|
|
1425
1467
|
/**
|
|
1426
1468
|
* Filesystem-safe key for the per-project data store directory under
|
|
1427
1469
|
* `$XDG_DATA_HOME/vitest-agent/<projectKey>/`. Resolved by the
|
|
@@ -1430,9 +1472,9 @@ type TddTaskId = Schema.Schema.Type<typeof TddTaskId>;
|
|
|
1430
1472
|
* value is `ProjectIdentityNotResolvableError`, not an empty string).
|
|
1431
1473
|
* @public
|
|
1432
1474
|
*/
|
|
1433
|
-
declare const ProjectKey: Schema.brand<Schema.String, "ProjectKey">;
|
|
1475
|
+
export declare const ProjectKey: Schema.brand<Schema.String, "ProjectKey">;
|
|
1434
1476
|
/** @public */
|
|
1435
|
-
type ProjectKey = Schema.Schema.Type<typeof ProjectKey>;
|
|
1477
|
+
export type ProjectKey = Schema.Schema.Type<typeof ProjectKey>;
|
|
1436
1478
|
/**
|
|
1437
1479
|
* Who initiated the action (test run, hypothesis, note, TDD phase, …).
|
|
1438
1480
|
* Recorded on every action row alongside `agent_id`.
|
|
@@ -1442,9 +1484,9 @@ type ProjectKey = Schema.Schema.Type<typeof ProjectKey>;
|
|
|
1442
1484
|
* - `system` — a CI run, scheduler, or other non-human/non-agent actor
|
|
1443
1485
|
* @public
|
|
1444
1486
|
*/
|
|
1445
|
-
declare const ActorType: Schema.Literals<readonly ["agent", "user", "system"]>;
|
|
1487
|
+
export declare const ActorType: Schema.Literals<readonly ["agent", "user", "system"]>;
|
|
1446
1488
|
/** @public */
|
|
1447
|
-
type ActorType = typeof ActorType.Type;
|
|
1489
|
+
export type ActorType = typeof ActorType.Type;
|
|
1448
1490
|
/**
|
|
1449
1491
|
* Recommended canonical host identifiers. Open enum at the SDK level so
|
|
1450
1492
|
* a new client doesn't require an SDK release; the MCP server defaults
|
|
@@ -1455,9 +1497,9 @@ type ActorType = typeof ActorType.Type;
|
|
|
1455
1497
|
* match a known pattern — preferred over guessing.
|
|
1456
1498
|
* @public
|
|
1457
1499
|
*/
|
|
1458
|
-
declare const HostKind: Schema.Literals<readonly ["claude-code", "claude-desktop", "cursor", "goose", "chatgpt", "mcp-inspector", "unknown"]>;
|
|
1500
|
+
export declare const HostKind: Schema.Literals<readonly ["claude-code", "claude-desktop", "cursor", "goose", "chatgpt", "mcp-inspector", "unknown"]>;
|
|
1459
1501
|
/** @public */
|
|
1460
|
-
type HostKind = typeof HostKind.Type;
|
|
1502
|
+
export type HostKind = typeof HostKind.Type;
|
|
1461
1503
|
//#endregion
|
|
1462
1504
|
//#region src/errors/AgentErrors.d.ts
|
|
1463
1505
|
declare const AgentNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -1469,7 +1511,7 @@ declare const AgentNotFoundError_base: new <A extends Record<string, any> = {}>(
|
|
|
1469
1511
|
* this agent first.
|
|
1470
1512
|
* @public
|
|
1471
1513
|
*/
|
|
1472
|
-
declare class AgentNotFoundError extends AgentNotFoundError_base<{
|
|
1514
|
+
export declare class AgentNotFoundError extends AgentNotFoundError_base<{
|
|
1473
1515
|
readonly agentId: AgentId;
|
|
1474
1516
|
readonly chatId?: ChatId;
|
|
1475
1517
|
}> {}
|
|
@@ -1481,7 +1523,7 @@ declare const SessionNotFoundError_base: new <A extends Record<string, any> = {}
|
|
|
1481
1523
|
* probably hasn't fired the SessionStart equivalent for this chat yet.
|
|
1482
1524
|
* @public
|
|
1483
1525
|
*/
|
|
1484
|
-
declare class SessionNotFoundError extends SessionNotFoundError_base<{
|
|
1526
|
+
export declare class SessionNotFoundError extends SessionNotFoundError_base<{
|
|
1485
1527
|
readonly chatId: ChatId;
|
|
1486
1528
|
}> {}
|
|
1487
1529
|
declare const ConversationNotFoundError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -1492,7 +1534,7 @@ declare const ConversationNotFoundError_base: new <A extends Record<string, any>
|
|
|
1492
1534
|
* require a conversation row.
|
|
1493
1535
|
* @public
|
|
1494
1536
|
*/
|
|
1495
|
-
declare class ConversationNotFoundError extends ConversationNotFoundError_base<{
|
|
1537
|
+
export declare class ConversationNotFoundError extends ConversationNotFoundError_base<{
|
|
1496
1538
|
readonly conversationId: ConversationId;
|
|
1497
1539
|
}> {}
|
|
1498
1540
|
declare const RegistrationConflictError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -1504,7 +1546,7 @@ declare const RegistrationConflictError_base: new <A extends Record<string, any>
|
|
|
1504
1546
|
* caller named. Distinct from `IdempotencyHit`, which is a success.
|
|
1505
1547
|
* @public
|
|
1506
1548
|
*/
|
|
1507
|
-
declare class RegistrationConflictError extends RegistrationConflictError_base<{
|
|
1549
|
+
export declare class RegistrationConflictError extends RegistrationConflictError_base<{
|
|
1508
1550
|
readonly reason: string;
|
|
1509
1551
|
}> {
|
|
1510
1552
|
constructor(args: {
|
|
@@ -1520,7 +1562,7 @@ declare const HostMetadataParseError_base: new <A extends Record<string, any> =
|
|
|
1520
1562
|
* paths that explicitly carry through `Schema.parseJson` errors.
|
|
1521
1563
|
* @public
|
|
1522
1564
|
*/
|
|
1523
|
-
declare class HostMetadataParseError extends HostMetadataParseError_base<{
|
|
1565
|
+
export declare class HostMetadataParseError extends HostMetadataParseError_base<{
|
|
1524
1566
|
readonly raw: string;
|
|
1525
1567
|
readonly reason: string;
|
|
1526
1568
|
}> {}
|
|
@@ -1532,7 +1574,7 @@ declare const SidecarTimeoutError_base: new <A extends Record<string, any> = {}>
|
|
|
1532
1574
|
* `Effect.timeout`; the top-level wrapper maps it to exit code 2.
|
|
1533
1575
|
* @public
|
|
1534
1576
|
*/
|
|
1535
|
-
declare class SidecarTimeoutError extends SidecarTimeoutError_base<{
|
|
1577
|
+
export declare class SidecarTimeoutError extends SidecarTimeoutError_base<{
|
|
1536
1578
|
readonly operation: string;
|
|
1537
1579
|
readonly timeoutMs: number;
|
|
1538
1580
|
}> {
|
|
@@ -1550,7 +1592,7 @@ declare const DataStoreError_base: new <A extends Record<string, any> = {}>(args
|
|
|
1550
1592
|
* Error raised when a SQLite operation fails at read, write, or migration time.
|
|
1551
1593
|
* @public
|
|
1552
1594
|
*/
|
|
1553
|
-
declare class DataStoreError extends DataStoreError_base<{
|
|
1595
|
+
export declare class DataStoreError extends DataStoreError_base<{
|
|
1554
1596
|
readonly operation: "read" | "write" | "migrate";
|
|
1555
1597
|
readonly table: string;
|
|
1556
1598
|
readonly reason: string;
|
|
@@ -1573,7 +1615,7 @@ declare class DataStoreError extends DataStoreError_base<{
|
|
|
1573
1615
|
* circular `cause` references.
|
|
1574
1616
|
* @public
|
|
1575
1617
|
*/
|
|
1576
|
-
declare const extractSqlReason: (e: unknown) => string;
|
|
1618
|
+
export declare const extractSqlReason: (e: unknown) => string;
|
|
1577
1619
|
//#endregion
|
|
1578
1620
|
//#region src/errors/DiscoveryError.d.ts
|
|
1579
1621
|
declare const DiscoveryError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
@@ -1583,7 +1625,7 @@ declare const DiscoveryError_base: new <A extends Record<string, any> = {}>(args
|
|
|
1583
1625
|
* Error raised when project discovery (glob, file read, or stat) fails.
|
|
1584
1626
|
* @public
|
|
1585
1627
|
*/
|
|
1586
|
-
declare class DiscoveryError extends DiscoveryError_base<{
|
|
1628
|
+
export declare class DiscoveryError extends DiscoveryError_base<{
|
|
1587
1629
|
readonly operation: "glob" | "read" | "stat";
|
|
1588
1630
|
readonly path: string;
|
|
1589
1631
|
readonly reason: string;
|
|
@@ -1609,7 +1651,7 @@ declare const PathResolutionError_base: new <A extends Record<string, any> = {}>
|
|
|
1609
1651
|
* write to.
|
|
1610
1652
|
* @public
|
|
1611
1653
|
*/
|
|
1612
|
-
declare class PathResolutionError extends PathResolutionError_base<{
|
|
1654
|
+
export declare class PathResolutionError extends PathResolutionError_base<{
|
|
1613
1655
|
readonly reason: string;
|
|
1614
1656
|
}> {
|
|
1615
1657
|
constructor(args: {
|
|
@@ -1628,7 +1670,7 @@ declare class PathResolutionError extends PathResolutionError_base<{
|
|
|
1628
1670
|
* "URL canonicalization rejected the value").
|
|
1629
1671
|
* @public
|
|
1630
1672
|
*/
|
|
1631
|
-
interface ProjectIdentityCandidate {
|
|
1673
|
+
export interface ProjectIdentityCandidate {
|
|
1632
1674
|
readonly source: string;
|
|
1633
1675
|
readonly reason: string;
|
|
1634
1676
|
}
|
|
@@ -1646,7 +1688,7 @@ declare const ProjectIdentityNotResolvableError_base: new <A extends Record<stri
|
|
|
1646
1688
|
* went through the new resolver.
|
|
1647
1689
|
* @public
|
|
1648
1690
|
*/
|
|
1649
|
-
declare class ProjectIdentityNotResolvableError extends ProjectIdentityNotResolvableError_base<{
|
|
1691
|
+
export declare class ProjectIdentityNotResolvableError extends ProjectIdentityNotResolvableError_base<{
|
|
1650
1692
|
readonly tried: ReadonlyArray<ProjectIdentityCandidate>;
|
|
1651
1693
|
}> {
|
|
1652
1694
|
constructor(args: {
|
|
@@ -1667,7 +1709,7 @@ declare const GitCommandError_base: new <A extends Record<string, any> = {}>(arg
|
|
|
1667
1709
|
* meaningfully recover from.
|
|
1668
1710
|
* @public
|
|
1669
1711
|
*/
|
|
1670
|
-
declare class GitCommandError extends GitCommandError_base<{
|
|
1712
|
+
export declare class GitCommandError extends GitCommandError_base<{
|
|
1671
1713
|
readonly command: string;
|
|
1672
1714
|
readonly reason: string;
|
|
1673
1715
|
}> {
|
|
@@ -1687,7 +1729,7 @@ declare const ProbeMissError_base: new <A extends Record<string, any> = {}>(args
|
|
|
1687
1729
|
* probes).
|
|
1688
1730
|
* @internal
|
|
1689
1731
|
*/
|
|
1690
|
-
declare class ProbeMissError extends ProbeMissError_base<{
|
|
1732
|
+
export declare class ProbeMissError extends ProbeMissError_base<{
|
|
1691
1733
|
readonly probe: string;
|
|
1692
1734
|
}> {}
|
|
1693
1735
|
//#endregion
|
|
@@ -1696,7 +1738,7 @@ declare const GoalNotFoundError_base: new <A extends Record<string, any> = {}>(a
|
|
|
1696
1738
|
readonly _tag: "GoalNotFoundError";
|
|
1697
1739
|
} & Readonly<A>;
|
|
1698
1740
|
/** @public */
|
|
1699
|
-
declare class GoalNotFoundError extends GoalNotFoundError_base<{
|
|
1741
|
+
export declare class GoalNotFoundError extends GoalNotFoundError_base<{
|
|
1700
1742
|
readonly id: number;
|
|
1701
1743
|
readonly reason: string;
|
|
1702
1744
|
}> {
|
|
@@ -1709,7 +1751,7 @@ declare const BehaviorNotFoundError_base: new <A extends Record<string, any> = {
|
|
|
1709
1751
|
readonly _tag: "BehaviorNotFoundError";
|
|
1710
1752
|
} & Readonly<A>;
|
|
1711
1753
|
/** @public */
|
|
1712
|
-
declare class BehaviorNotFoundError extends BehaviorNotFoundError_base<{
|
|
1754
|
+
export declare class BehaviorNotFoundError extends BehaviorNotFoundError_base<{
|
|
1713
1755
|
readonly id: number;
|
|
1714
1756
|
readonly reason: string;
|
|
1715
1757
|
}> {
|
|
@@ -1722,7 +1764,7 @@ declare const TddTaskNotFoundError_base: new <A extends Record<string, any> = {}
|
|
|
1722
1764
|
readonly _tag: "TddTaskNotFoundError";
|
|
1723
1765
|
} & Readonly<A>;
|
|
1724
1766
|
/** @public */
|
|
1725
|
-
declare class TddTaskNotFoundError extends TddTaskNotFoundError_base<{
|
|
1767
|
+
export declare class TddTaskNotFoundError extends TddTaskNotFoundError_base<{
|
|
1726
1768
|
readonly id: number;
|
|
1727
1769
|
readonly reason: string;
|
|
1728
1770
|
}> {
|
|
@@ -1732,12 +1774,12 @@ declare class TddTaskNotFoundError extends TddTaskNotFoundError_base<{
|
|
|
1732
1774
|
});
|
|
1733
1775
|
}
|
|
1734
1776
|
/** @public */
|
|
1735
|
-
type TddTaskEndOutcome = "succeeded" | "blocked" | "abandoned";
|
|
1777
|
+
export type TddTaskEndOutcome = "succeeded" | "blocked" | "abandoned";
|
|
1736
1778
|
declare const TddTaskAlreadyEndedError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1737
1779
|
readonly _tag: "TddTaskAlreadyEndedError";
|
|
1738
1780
|
} & Readonly<A>;
|
|
1739
1781
|
/** @public */
|
|
1740
|
-
declare class TddTaskAlreadyEndedError extends TddTaskAlreadyEndedError_base<{
|
|
1782
|
+
export declare class TddTaskAlreadyEndedError extends TddTaskAlreadyEndedError_base<{
|
|
1741
1783
|
readonly id: number;
|
|
1742
1784
|
readonly endedAt: string;
|
|
1743
1785
|
readonly outcome: TddTaskEndOutcome;
|
|
@@ -1749,12 +1791,12 @@ declare class TddTaskAlreadyEndedError extends TddTaskAlreadyEndedError_base<{
|
|
|
1749
1791
|
});
|
|
1750
1792
|
}
|
|
1751
1793
|
/** @public */
|
|
1752
|
-
type IllegalStatusTransitionEntity = "goal" | "behavior" | "task";
|
|
1794
|
+
export type IllegalStatusTransitionEntity = "goal" | "behavior" | "task";
|
|
1753
1795
|
declare const IllegalStatusTransitionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1754
1796
|
readonly _tag: "IllegalStatusTransitionError";
|
|
1755
1797
|
} & Readonly<A>;
|
|
1756
1798
|
/** @public */
|
|
1757
|
-
declare class IllegalStatusTransitionError extends IllegalStatusTransitionError_base<{
|
|
1799
|
+
export declare class IllegalStatusTransitionError extends IllegalStatusTransitionError_base<{
|
|
1758
1800
|
readonly entity: IllegalStatusTransitionEntity;
|
|
1759
1801
|
readonly id: number;
|
|
1760
1802
|
readonly from: string;
|
|
@@ -1772,15 +1814,15 @@ declare class IllegalStatusTransitionError extends IllegalStatusTransitionError_
|
|
|
1772
1814
|
//#endregion
|
|
1773
1815
|
//#region src/formatters/ci-annotations.d.ts
|
|
1774
1816
|
/** @public */
|
|
1775
|
-
declare const ciAnnotationsFormatter: Formatter;
|
|
1817
|
+
export declare const ciAnnotationsFormatter: Formatter;
|
|
1776
1818
|
//#endregion
|
|
1777
1819
|
//#region src/formatters/gfm.d.ts
|
|
1778
1820
|
/** @public */
|
|
1779
|
-
declare const GfmFormatter: Formatter;
|
|
1821
|
+
export declare const GfmFormatter: Formatter;
|
|
1780
1822
|
//#endregion
|
|
1781
1823
|
//#region src/formatters/json.d.ts
|
|
1782
1824
|
/** @public */
|
|
1783
|
-
declare const JsonFormatter: Formatter;
|
|
1825
|
+
export declare const JsonFormatter: Formatter;
|
|
1784
1826
|
//#endregion
|
|
1785
1827
|
//#region src/formatters/markdown.d.ts
|
|
1786
1828
|
/**
|
|
@@ -1794,15 +1836,15 @@ declare const JsonFormatter: Formatter;
|
|
|
1794
1836
|
* Markdown-aware sink.
|
|
1795
1837
|
* @public
|
|
1796
1838
|
*/
|
|
1797
|
-
declare const MarkdownFormatter: Formatter;
|
|
1839
|
+
export declare const MarkdownFormatter: Formatter;
|
|
1798
1840
|
//#endregion
|
|
1799
1841
|
//#region src/formatters/silent.d.ts
|
|
1800
1842
|
/** @public */
|
|
1801
|
-
declare const SilentFormatter: Formatter;
|
|
1843
|
+
export declare const SilentFormatter: Formatter;
|
|
1802
1844
|
//#endregion
|
|
1803
1845
|
//#region src/formatters/terminal.d.ts
|
|
1804
1846
|
/** @public */
|
|
1805
|
-
declare const TerminalFormatter: Formatter;
|
|
1847
|
+
export declare const TerminalFormatter: Formatter;
|
|
1806
1848
|
//#endregion
|
|
1807
1849
|
//#region src/schemas/Config.d.ts
|
|
1808
1850
|
declare const VitestAgentConfig_base: Schema.Class<VitestAgentConfig, Schema.Struct<{
|
|
@@ -1827,7 +1869,7 @@ declare const VitestAgentConfig_base: Schema.Class<VitestAgentConfig, Schema.Str
|
|
|
1827
1869
|
* keying), or when you want a stable key independent of `name` changes.
|
|
1828
1870
|
* @public
|
|
1829
1871
|
*/
|
|
1830
|
-
declare class VitestAgentConfig extends VitestAgentConfig_base {}
|
|
1872
|
+
export declare class VitestAgentConfig extends VitestAgentConfig_base {}
|
|
1831
1873
|
//#endregion
|
|
1832
1874
|
//#region src/services/Config.d.ts
|
|
1833
1875
|
/**
|
|
@@ -1836,7 +1878,7 @@ declare class VitestAgentConfig extends VitestAgentConfig_base {}
|
|
|
1836
1878
|
* type without referencing the `ConfigFileShape<A>` generic directly.
|
|
1837
1879
|
* @public
|
|
1838
1880
|
*/
|
|
1839
|
-
type VitestAgentConfigFileService = ConfigFileShape<VitestAgentConfig>;
|
|
1881
|
+
export type VitestAgentConfigFileService = ConfigFileShape<VitestAgentConfig>;
|
|
1840
1882
|
declare const VitestAgentConfigFile_base: import("effect/Context").ServiceClass<VitestAgentConfigFile, "vitest-agent/Config", ConfigFileShape<VitestAgentConfig>>;
|
|
1841
1883
|
/**
|
|
1842
1884
|
* Typed service class (Context tag) for the vitest-agent config file service.
|
|
@@ -1846,7 +1888,7 @@ declare const VitestAgentConfigFile_base: import("effect/Context").ServiceClass<
|
|
|
1846
1888
|
* `ConfigLive(projectDir)`.
|
|
1847
1889
|
* @public
|
|
1848
1890
|
*/
|
|
1849
|
-
declare class VitestAgentConfigFile extends VitestAgentConfigFile_base {}
|
|
1891
|
+
export declare class VitestAgentConfigFile extends VitestAgentConfigFile_base {}
|
|
1850
1892
|
//#endregion
|
|
1851
1893
|
//#region src/layers/ConfigLive.d.ts
|
|
1852
1894
|
/**
|
|
@@ -1867,14 +1909,14 @@ declare class VitestAgentConfigFile extends VitestAgentConfigFile_base {}
|
|
|
1867
1909
|
* sees the right config even when invoked from elsewhere.
|
|
1868
1910
|
* @public
|
|
1869
1911
|
*/
|
|
1870
|
-
declare const ConfigLive: (projectDir: string) => Layer.Layer<VitestAgentConfigFile, never, FileSystem.FileSystem | Path.Path>;
|
|
1912
|
+
export declare const ConfigLive: (projectDir: string) => Layer.Layer<VitestAgentConfigFile, never, FileSystem.FileSystem | Path.Path>;
|
|
1871
1913
|
//#endregion
|
|
1872
1914
|
//#region src/schemas/Baselines.d.ts
|
|
1873
1915
|
/**
|
|
1874
1916
|
* Coverage baselines -- the auto-ratcheting high-water mark.
|
|
1875
1917
|
* @public
|
|
1876
1918
|
*/
|
|
1877
|
-
declare const CoverageBaselines: Schema.Struct<{
|
|
1919
|
+
export declare const CoverageBaselines: Schema.Struct<{
|
|
1878
1920
|
readonly updatedAt: Schema.String;
|
|
1879
1921
|
readonly global: Schema.Struct<{
|
|
1880
1922
|
readonly lines: Schema.optional<Schema.Number>;
|
|
@@ -1890,14 +1932,14 @@ declare const CoverageBaselines: Schema.Struct<{
|
|
|
1890
1932
|
}>]>>, never>;
|
|
1891
1933
|
}>;
|
|
1892
1934
|
/** @public */
|
|
1893
|
-
type CoverageBaselines = typeof CoverageBaselines.Type;
|
|
1935
|
+
export type CoverageBaselines = typeof CoverageBaselines.Type;
|
|
1894
1936
|
//#endregion
|
|
1895
1937
|
//#region src/schemas/CacheManifest.d.ts
|
|
1896
1938
|
/**
|
|
1897
1939
|
* A single project entry in the cache manifest.
|
|
1898
1940
|
* @public
|
|
1899
1941
|
*/
|
|
1900
|
-
declare const CacheManifestEntry: Schema.Struct<{
|
|
1942
|
+
export declare const CacheManifestEntry: Schema.Struct<{
|
|
1901
1943
|
readonly project: Schema.String;
|
|
1902
1944
|
readonly reportFile: Schema.String;
|
|
1903
1945
|
readonly historyFile: Schema.optional<Schema.String>;
|
|
@@ -1905,12 +1947,12 @@ declare const CacheManifestEntry: Schema.Struct<{
|
|
|
1905
1947
|
readonly lastResult: Schema.NullOr<Schema.Literals<readonly ["passed", "failed", "interrupted"]>>;
|
|
1906
1948
|
}>;
|
|
1907
1949
|
/** @public */
|
|
1908
|
-
type CacheManifestEntry = typeof CacheManifestEntry.Type;
|
|
1950
|
+
export type CacheManifestEntry = typeof CacheManifestEntry.Type;
|
|
1909
1951
|
/**
|
|
1910
1952
|
* Root manifest file that indexes all project reports.
|
|
1911
1953
|
* @public
|
|
1912
1954
|
*/
|
|
1913
|
-
declare const CacheManifest: Schema.Struct<{
|
|
1955
|
+
export declare const CacheManifest: Schema.Struct<{
|
|
1914
1956
|
readonly updatedAt: Schema.String;
|
|
1915
1957
|
readonly cacheDir: Schema.String;
|
|
1916
1958
|
readonly projects: Schema.$Array<Schema.Struct<{
|
|
@@ -1922,24 +1964,24 @@ declare const CacheManifest: Schema.Struct<{
|
|
|
1922
1964
|
}>>;
|
|
1923
1965
|
}>;
|
|
1924
1966
|
/** @public */
|
|
1925
|
-
type CacheManifest = typeof CacheManifest.Type;
|
|
1967
|
+
export type CacheManifest = typeof CacheManifest.Type;
|
|
1926
1968
|
//#endregion
|
|
1927
1969
|
//#region src/schemas/History.d.ts
|
|
1928
1970
|
/**
|
|
1929
1971
|
* A single test run outcome (pass or fail only).
|
|
1930
1972
|
* @public
|
|
1931
1973
|
*/
|
|
1932
|
-
declare const TestRun: Schema.Struct<{
|
|
1974
|
+
export declare const TestRun: Schema.Struct<{
|
|
1933
1975
|
readonly timestamp: Schema.String;
|
|
1934
1976
|
readonly state: Schema.Literals<readonly ["passed", "failed"]>;
|
|
1935
1977
|
}>;
|
|
1936
1978
|
/** @public */
|
|
1937
|
-
type TestRun = typeof TestRun.Type;
|
|
1979
|
+
export type TestRun = typeof TestRun.Type;
|
|
1938
1980
|
/**
|
|
1939
1981
|
* History for a single test across multiple runs.
|
|
1940
1982
|
* @public
|
|
1941
1983
|
*/
|
|
1942
|
-
declare const TestHistory: Schema.Struct<{
|
|
1984
|
+
export declare const TestHistory: Schema.Struct<{
|
|
1943
1985
|
readonly modulePath: Schema.String;
|
|
1944
1986
|
readonly fullName: Schema.String;
|
|
1945
1987
|
readonly runs: Schema.$Array<Schema.Struct<{
|
|
@@ -1948,12 +1990,12 @@ declare const TestHistory: Schema.Struct<{
|
|
|
1948
1990
|
}>>;
|
|
1949
1991
|
}>;
|
|
1950
1992
|
/** @public */
|
|
1951
|
-
type TestHistory = typeof TestHistory.Type;
|
|
1993
|
+
export type TestHistory = typeof TestHistory.Type;
|
|
1952
1994
|
/**
|
|
1953
1995
|
* Per-project history record containing all tracked tests.
|
|
1954
1996
|
* @public
|
|
1955
1997
|
*/
|
|
1956
|
-
declare const HistoryRecord: Schema.Struct<{
|
|
1998
|
+
export declare const HistoryRecord: Schema.Struct<{
|
|
1957
1999
|
readonly project: Schema.String;
|
|
1958
2000
|
readonly updatedAt: Schema.String;
|
|
1959
2001
|
readonly tests: Schema.$Array<Schema.Struct<{
|
|
@@ -1966,19 +2008,19 @@ declare const HistoryRecord: Schema.Struct<{
|
|
|
1966
2008
|
}>>;
|
|
1967
2009
|
}>;
|
|
1968
2010
|
/** @public */
|
|
1969
|
-
type HistoryRecord = typeof HistoryRecord.Type;
|
|
2011
|
+
export type HistoryRecord = typeof HistoryRecord.Type;
|
|
1970
2012
|
//#endregion
|
|
1971
2013
|
//#region src/schemas/Tdd.d.ts
|
|
1972
2014
|
/** @public */
|
|
1973
|
-
declare const GoalStatus: Schema.Literals<readonly ["pending", "in_progress", "done", "abandoned"]>;
|
|
2015
|
+
export declare const GoalStatus: Schema.Literals<readonly ["pending", "in_progress", "done", "abandoned"]>;
|
|
1974
2016
|
/** @public */
|
|
1975
|
-
type GoalStatus = typeof GoalStatus.Type;
|
|
2017
|
+
export type GoalStatus = typeof GoalStatus.Type;
|
|
1976
2018
|
/** @public */
|
|
1977
|
-
declare const BehaviorStatus: Schema.Literals<readonly ["pending", "in_progress", "done", "abandoned"]>;
|
|
2019
|
+
export declare const BehaviorStatus: Schema.Literals<readonly ["pending", "in_progress", "done", "abandoned"]>;
|
|
1978
2020
|
/** @public */
|
|
1979
|
-
type BehaviorStatus = typeof BehaviorStatus.Type;
|
|
2021
|
+
export type BehaviorStatus = typeof BehaviorStatus.Type;
|
|
1980
2022
|
/** @public */
|
|
1981
|
-
declare const GoalRow: Schema.Struct<{
|
|
2023
|
+
export declare const GoalRow: Schema.Struct<{
|
|
1982
2024
|
readonly id: Schema.Number;
|
|
1983
2025
|
readonly sessionId: Schema.Number;
|
|
1984
2026
|
readonly ordinal: Schema.Number;
|
|
@@ -1987,9 +2029,9 @@ declare const GoalRow: Schema.Struct<{
|
|
|
1987
2029
|
readonly createdAt: Schema.String;
|
|
1988
2030
|
}>;
|
|
1989
2031
|
/** @public */
|
|
1990
|
-
type GoalRow = typeof GoalRow.Type;
|
|
2032
|
+
export type GoalRow = typeof GoalRow.Type;
|
|
1991
2033
|
/** @public */
|
|
1992
|
-
declare const BehaviorRow: Schema.Struct<{
|
|
2034
|
+
export declare const BehaviorRow: Schema.Struct<{
|
|
1993
2035
|
readonly id: Schema.Number;
|
|
1994
2036
|
readonly goalId: Schema.Number;
|
|
1995
2037
|
readonly ordinal: Schema.Number;
|
|
@@ -1999,9 +2041,9 @@ declare const BehaviorRow: Schema.Struct<{
|
|
|
1999
2041
|
readonly createdAt: Schema.String;
|
|
2000
2042
|
}>;
|
|
2001
2043
|
/** @public */
|
|
2002
|
-
type BehaviorRow = typeof BehaviorRow.Type;
|
|
2044
|
+
export type BehaviorRow = typeof BehaviorRow.Type;
|
|
2003
2045
|
/** @public */
|
|
2004
|
-
declare const GoalDetail: Schema.Struct<{
|
|
2046
|
+
export declare const GoalDetail: Schema.Struct<{
|
|
2005
2047
|
readonly id: Schema.Number;
|
|
2006
2048
|
readonly sessionId: Schema.Number;
|
|
2007
2049
|
readonly ordinal: Schema.Number;
|
|
@@ -2019,9 +2061,9 @@ declare const GoalDetail: Schema.Struct<{
|
|
|
2019
2061
|
}>>;
|
|
2020
2062
|
}>;
|
|
2021
2063
|
/** @public */
|
|
2022
|
-
type GoalDetail = typeof GoalDetail.Type;
|
|
2064
|
+
export type GoalDetail = typeof GoalDetail.Type;
|
|
2023
2065
|
/** @public */
|
|
2024
|
-
declare const BehaviorDetail: Schema.Struct<{
|
|
2066
|
+
export declare const BehaviorDetail: Schema.Struct<{
|
|
2025
2067
|
readonly id: Schema.Number;
|
|
2026
2068
|
readonly goalId: Schema.Number;
|
|
2027
2069
|
readonly ordinal: Schema.Number;
|
|
@@ -2045,14 +2087,14 @@ declare const BehaviorDetail: Schema.Struct<{
|
|
|
2045
2087
|
}>>;
|
|
2046
2088
|
}>;
|
|
2047
2089
|
/** @public */
|
|
2048
|
-
type BehaviorDetail = typeof BehaviorDetail.Type;
|
|
2090
|
+
export type BehaviorDetail = typeof BehaviorDetail.Type;
|
|
2049
2091
|
//#endregion
|
|
2050
2092
|
//#region src/schemas/Trends.d.ts
|
|
2051
2093
|
/**
|
|
2052
2094
|
* A single coverage trend data point recorded on a full test run.
|
|
2053
2095
|
* @public
|
|
2054
2096
|
*/
|
|
2055
|
-
declare const TrendEntry: Schema.Struct<{
|
|
2097
|
+
export declare const TrendEntry: Schema.Struct<{
|
|
2056
2098
|
readonly timestamp: Schema.String;
|
|
2057
2099
|
readonly coverage: Schema.Struct<{
|
|
2058
2100
|
readonly statements: Schema.Number;
|
|
@@ -2070,12 +2112,12 @@ declare const TrendEntry: Schema.Struct<{
|
|
|
2070
2112
|
readonly targetsHash: Schema.optional<Schema.String>;
|
|
2071
2113
|
}>;
|
|
2072
2114
|
/** @public */
|
|
2073
|
-
type TrendEntry = typeof TrendEntry.Type;
|
|
2115
|
+
export type TrendEntry = typeof TrendEntry.Type;
|
|
2074
2116
|
/**
|
|
2075
2117
|
* Per-project trend record with sliding window of entries.
|
|
2076
2118
|
* @public
|
|
2077
2119
|
*/
|
|
2078
|
-
declare const TrendRecord: Schema.Struct<{
|
|
2120
|
+
export declare const TrendRecord: Schema.Struct<{
|
|
2079
2121
|
readonly entries: Schema.$Array<Schema.Struct<{
|
|
2080
2122
|
readonly timestamp: Schema.String;
|
|
2081
2123
|
readonly coverage: Schema.Struct<{
|
|
@@ -2095,16 +2137,35 @@ declare const TrendRecord: Schema.Struct<{
|
|
|
2095
2137
|
}>>;
|
|
2096
2138
|
}>;
|
|
2097
2139
|
/** @public */
|
|
2098
|
-
type TrendRecord = typeof TrendRecord.Type;
|
|
2140
|
+
export type TrendRecord = typeof TrendRecord.Type;
|
|
2099
2141
|
//#endregion
|
|
2100
2142
|
//#region src/utils/validate-phase-transition.d.ts
|
|
2101
2143
|
/** @public */
|
|
2102
|
-
type Phase = "spike" | "red" | "red.triangulate" | "green" | "green.fake-it" | "refactor" | "extended-red" | "green-without-red";
|
|
2144
|
+
export type Phase = "spike" | "red" | "red.triangulate" | "green" | "green.fake-it" | "refactor" | "extended-red" | "green-without-red";
|
|
2103
2145
|
/** @public */
|
|
2104
|
-
type ArtifactKind = "test_written" | "test_failed_run" | "code_written" | "test_passed_run" | "refactor" | "test_weakened";
|
|
2146
|
+
export type ArtifactKind = "test_written" | "test_failed_run" | "code_written" | "test_passed_run" | "refactor" | "test_weakened";
|
|
2147
|
+
/**
|
|
2148
|
+
* Explicit test-runner marker on a `tdd_artifacts` row (issue #363). `vitest`
|
|
2149
|
+
* artifacts always carry a `test_case_id` when they anchor a specific test;
|
|
2150
|
+
* `bats` artifacts never do (there is no `test_cases` row for a bats test),
|
|
2151
|
+
* so the D2 binding-rule validator branches on this to accept a bats
|
|
2152
|
+
* run-level artifact without weakening the vitest guard.
|
|
2153
|
+
* @public
|
|
2154
|
+
*/
|
|
2155
|
+
export type ArtifactSuite = "vitest" | "bats";
|
|
2105
2156
|
/** @public */
|
|
2106
|
-
interface CitedArtifact {
|
|
2157
|
+
export interface CitedArtifact {
|
|
2107
2158
|
readonly id: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* `tdd_phases.id` of the phase this artifact was actually recorded in — the
|
|
2161
|
+
* artifact's own phase binding. This is the honest anchor for D2 binding
|
|
2162
|
+
* rule 1's window check (issue #245): a test_case's first-ever creation
|
|
2163
|
+
* turn can predate the current phase (e.g. authored during spike, then
|
|
2164
|
+
* re-run inside red) without the evidence itself being stale, so the
|
|
2165
|
+
* window check compares this against `PhaseTransitionContext.current_phase_id`
|
|
2166
|
+
* rather than `test_case_created_turn_at`.
|
|
2167
|
+
*/
|
|
2168
|
+
readonly phase_id: number;
|
|
2108
2169
|
readonly artifact_kind: ArtifactKind;
|
|
2109
2170
|
readonly test_case_id: number | null;
|
|
2110
2171
|
readonly test_case_created_turn_at: string | null;
|
|
@@ -2112,11 +2173,24 @@ interface CitedArtifact {
|
|
|
2112
2173
|
readonly test_run_id: number | null;
|
|
2113
2174
|
readonly test_first_failure_run_id: number | null;
|
|
2114
2175
|
readonly behavior_id: number | null;
|
|
2176
|
+
/**
|
|
2177
|
+
* Issue #363: explicit suite marker distinguishing vitest from bats runs.
|
|
2178
|
+
* Optional on the pure type so hand-built contexts default to `vitest`;
|
|
2179
|
+
* the DB row always carries the persisted value.
|
|
2180
|
+
*/
|
|
2181
|
+
readonly suite?: ArtifactSuite;
|
|
2115
2182
|
}
|
|
2116
2183
|
/** @public */
|
|
2117
|
-
interface PhaseTransitionContext {
|
|
2184
|
+
export interface PhaseTransitionContext {
|
|
2118
2185
|
readonly tdd_task_id: number;
|
|
2119
2186
|
readonly current_phase: Phase;
|
|
2187
|
+
/**
|
|
2188
|
+
* `tdd_phases.id` of the currently open phase row, or `null` when no phase
|
|
2189
|
+
* has been opened yet (the implicit "spike" default before the first
|
|
2190
|
+
* `tdd_phases` row exists). Compared against `cited_artifact.phase_id` for
|
|
2191
|
+
* D2 binding rule 1 (issue #245).
|
|
2192
|
+
*/
|
|
2193
|
+
readonly current_phase_id: number | null;
|
|
2120
2194
|
readonly phase_started_at: string;
|
|
2121
2195
|
readonly now: string;
|
|
2122
2196
|
readonly requested_phase: Phase;
|
|
@@ -2124,15 +2198,15 @@ interface PhaseTransitionContext {
|
|
|
2124
2198
|
readonly requested_behavior_id: number | null;
|
|
2125
2199
|
}
|
|
2126
2200
|
/** @public */
|
|
2127
|
-
type DenialReason = "missing_artifact_evidence" | "wrong_artifact_kind" | "wrong_source_phase" | "unknown_tdd_task" | "tdd_task_already_ended" | "goal_not_started" | "goal_not_found" | "goal_not_in_progress" | "goal_not_in_tdd_task" | "behavior_not_found" | "behavior_not_in_goal" | "refactor_without_passing_run" | "evidence_not_in_phase_window" | "evidence_not_for_behavior" | "evidence_test_was_already_failing";
|
|
2201
|
+
export type DenialReason = "missing_artifact_evidence" | "wrong_artifact_kind" | "wrong_source_phase" | "unknown_tdd_task" | "tdd_task_already_ended" | "goal_not_started" | "goal_not_found" | "goal_not_in_progress" | "goal_not_in_tdd_task" | "behavior_not_found" | "behavior_not_in_goal" | "refactor_without_passing_run" | "evidence_not_in_phase_window" | "evidence_not_for_behavior" | "evidence_test_was_already_failing";
|
|
2128
2202
|
/** @public */
|
|
2129
|
-
interface Remediation {
|
|
2203
|
+
export interface Remediation {
|
|
2130
2204
|
readonly suggestedTool: string;
|
|
2131
2205
|
readonly suggestedArgs: Record<string, unknown>;
|
|
2132
2206
|
readonly humanHint: string;
|
|
2133
2207
|
}
|
|
2134
2208
|
/** @public */
|
|
2135
|
-
type PhaseTransitionResult = {
|
|
2209
|
+
export type PhaseTransitionResult = {
|
|
2136
2210
|
readonly accepted: true;
|
|
2137
2211
|
readonly phase: Phase;
|
|
2138
2212
|
} | {
|
|
@@ -2151,7 +2225,7 @@ type PhaseTransitionResult = {
|
|
|
2151
2225
|
* required artifact (`spike→red`, `*→red`, etc.) return `null`.
|
|
2152
2226
|
* @public
|
|
2153
2227
|
*/
|
|
2154
|
-
declare const requiredArtifactForTransition: (from: Phase, to: Phase) => {
|
|
2228
|
+
export declare const requiredArtifactForTransition: (from: Phase, to: Phase) => {
|
|
2155
2229
|
kind: ArtifactKind;
|
|
2156
2230
|
humanHint: string;
|
|
2157
2231
|
} | null;
|
|
@@ -2169,9 +2243,9 @@ declare const requiredArtifactForTransition: (from: Phase, to: Phase) => {
|
|
|
2169
2243
|
* keeping the two in lockstep (issue #115).
|
|
2170
2244
|
* @public
|
|
2171
2245
|
*/
|
|
2172
|
-
declare const transitionEnforcesBehaviorMatch: (from: Phase, to: Phase) => boolean;
|
|
2246
|
+
export declare const transitionEnforcesBehaviorMatch: (from: Phase, to: Phase) => boolean;
|
|
2173
2247
|
/** @public */
|
|
2174
|
-
declare const validatePhaseTransition: (ctx: PhaseTransitionContext) => PhaseTransitionResult;
|
|
2248
|
+
export declare const validatePhaseTransition: (ctx: PhaseTransitionContext) => PhaseTransitionResult;
|
|
2175
2249
|
//#endregion
|
|
2176
2250
|
//#region src/schemas/Agent.d.ts
|
|
2177
2251
|
declare const Agent_base: Schema.Class<Agent, Schema.TaggedStruct<"Agent", {
|
|
@@ -2197,7 +2271,7 @@ declare const Agent_base: Schema.Class<Agent, Schema.TaggedStruct<"Agent", {
|
|
|
2197
2271
|
* two reveals a mid-session branch switch, which is itself signal.
|
|
2198
2272
|
* @public
|
|
2199
2273
|
*/
|
|
2200
|
-
declare class Agent extends Agent_base {}
|
|
2274
|
+
export declare class Agent extends Agent_base {}
|
|
2201
2275
|
declare const IdempotencyHit_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => Readonly<A> & {
|
|
2202
2276
|
readonly _tag: "IdempotencyHit";
|
|
2203
2277
|
} & import("effect/Pipeable").Pipeable;
|
|
@@ -2212,46 +2286,46 @@ declare const IdempotencyHit_base: new <A extends Record<string, any> = {}>(args
|
|
|
2212
2286
|
* downstream code uses `Match.tag` to branch.
|
|
2213
2287
|
* @public
|
|
2214
2288
|
*/
|
|
2215
|
-
declare class IdempotencyHit extends IdempotencyHit_base<{
|
|
2289
|
+
export declare class IdempotencyHit extends IdempotencyHit_base<{
|
|
2216
2290
|
readonly existingAgentId: typeof AgentId.Type;
|
|
2217
2291
|
}> {}
|
|
2218
2292
|
/**
|
|
2219
2293
|
* Sum type of the two possible outcomes of `registerAgent`.
|
|
2220
2294
|
* @public
|
|
2221
2295
|
*/
|
|
2222
|
-
type RegisterAgentResult = Agent | IdempotencyHit;
|
|
2296
|
+
export type RegisterAgentResult = Agent | IdempotencyHit;
|
|
2223
2297
|
/**
|
|
2224
2298
|
* Agent tree — root agent with all descendants nested under
|
|
2225
2299
|
* `children`. Returned by `DataStore.getAgentTree` for forensics and
|
|
2226
2300
|
* the `vitest-agent agent list` CLI subcommand.
|
|
2227
2301
|
* @public
|
|
2228
2302
|
*/
|
|
2229
|
-
interface AgentTreeNode {
|
|
2303
|
+
export interface AgentTreeNode {
|
|
2230
2304
|
readonly agent: Agent;
|
|
2231
2305
|
readonly children: ReadonlyArray<AgentTreeNode>;
|
|
2232
2306
|
}
|
|
2233
2307
|
//#endregion
|
|
2234
2308
|
//#region src/services/DataStore.d.ts
|
|
2235
2309
|
/** @public */
|
|
2236
|
-
interface CreateGoalInput {
|
|
2310
|
+
export interface CreateGoalInput {
|
|
2237
2311
|
readonly tddTaskId: number;
|
|
2238
2312
|
readonly goal: string;
|
|
2239
2313
|
}
|
|
2240
2314
|
/** @public */
|
|
2241
|
-
interface UpdateGoalInput {
|
|
2315
|
+
export interface UpdateGoalInput {
|
|
2242
2316
|
readonly id: number;
|
|
2243
2317
|
readonly goal?: string;
|
|
2244
2318
|
readonly status?: GoalStatus;
|
|
2245
2319
|
}
|
|
2246
2320
|
/** @public */
|
|
2247
|
-
interface CreateBehaviorInput {
|
|
2321
|
+
export interface CreateBehaviorInput {
|
|
2248
2322
|
readonly goalId: number;
|
|
2249
2323
|
readonly behavior: string;
|
|
2250
2324
|
readonly suggestedTestName?: string;
|
|
2251
2325
|
readonly dependsOnBehaviorIds?: ReadonlyArray<number>;
|
|
2252
2326
|
}
|
|
2253
2327
|
/** @public */
|
|
2254
|
-
interface UpdateBehaviorInput {
|
|
2328
|
+
export interface UpdateBehaviorInput {
|
|
2255
2329
|
readonly id: number;
|
|
2256
2330
|
readonly behavior?: string;
|
|
2257
2331
|
readonly suggestedTestName?: string | null;
|
|
@@ -2259,7 +2333,7 @@ interface UpdateBehaviorInput {
|
|
|
2259
2333
|
readonly dependsOnBehaviorIds?: ReadonlyArray<number>;
|
|
2260
2334
|
}
|
|
2261
2335
|
/** @public */
|
|
2262
|
-
interface SettingsInput {
|
|
2336
|
+
export interface SettingsInput {
|
|
2263
2337
|
readonly vitestVersion: string;
|
|
2264
2338
|
readonly pool?: string;
|
|
2265
2339
|
readonly environment?: string;
|
|
@@ -2276,7 +2350,7 @@ interface SettingsInput {
|
|
|
2276
2350
|
readonly coverageProvider?: string;
|
|
2277
2351
|
}
|
|
2278
2352
|
/** @public */
|
|
2279
|
-
interface TestRunInput {
|
|
2353
|
+
export interface TestRunInput {
|
|
2280
2354
|
readonly invocationId: string;
|
|
2281
2355
|
readonly project: string;
|
|
2282
2356
|
readonly settingsHash: string;
|
|
@@ -2328,7 +2402,7 @@ interface TestRunInput {
|
|
|
2328
2402
|
readonly hostMetadata?: Record<string, unknown> | null;
|
|
2329
2403
|
}
|
|
2330
2404
|
/** @public */
|
|
2331
|
-
interface ModuleInput {
|
|
2405
|
+
export interface ModuleInput {
|
|
2332
2406
|
readonly fileId: number;
|
|
2333
2407
|
readonly relativeModuleId: string;
|
|
2334
2408
|
readonly state: string;
|
|
@@ -2340,7 +2414,7 @@ interface ModuleInput {
|
|
|
2340
2414
|
readonly heap?: number;
|
|
2341
2415
|
}
|
|
2342
2416
|
/** @public */
|
|
2343
|
-
interface TestCaseInput {
|
|
2417
|
+
export interface TestCaseInput {
|
|
2344
2418
|
readonly suiteId?: number;
|
|
2345
2419
|
readonly vitestId?: string;
|
|
2346
2420
|
readonly name: string;
|
|
@@ -2372,7 +2446,7 @@ interface TestCaseInput {
|
|
|
2372
2446
|
readonly createdTurnId?: number;
|
|
2373
2447
|
}
|
|
2374
2448
|
/** @public */
|
|
2375
|
-
interface StackFrameInput {
|
|
2449
|
+
export interface StackFrameInput {
|
|
2376
2450
|
readonly ordinal: number;
|
|
2377
2451
|
readonly method: string | null;
|
|
2378
2452
|
readonly filePath: string;
|
|
@@ -2382,7 +2456,7 @@ interface StackFrameInput {
|
|
|
2382
2456
|
readonly functionBoundaryLine?: number;
|
|
2383
2457
|
}
|
|
2384
2458
|
/** @public */
|
|
2385
|
-
interface TestErrorInput {
|
|
2459
|
+
export interface TestErrorInput {
|
|
2386
2460
|
readonly testCaseId?: number;
|
|
2387
2461
|
readonly testSuiteId?: number;
|
|
2388
2462
|
readonly moduleId?: number;
|
|
@@ -2399,7 +2473,7 @@ interface TestErrorInput {
|
|
|
2399
2473
|
readonly ordinal?: number;
|
|
2400
2474
|
}
|
|
2401
2475
|
/** @public */
|
|
2402
|
-
interface FileCoverageInput {
|
|
2476
|
+
export interface FileCoverageInput {
|
|
2403
2477
|
readonly fileId: number;
|
|
2404
2478
|
readonly statements: number;
|
|
2405
2479
|
readonly branches: number;
|
|
@@ -2419,7 +2493,7 @@ interface FileCoverageInput {
|
|
|
2419
2493
|
readonly tier?: "below_threshold" | "below_target";
|
|
2420
2494
|
}
|
|
2421
2495
|
/** @public */
|
|
2422
|
-
interface SuiteInput {
|
|
2496
|
+
export interface SuiteInput {
|
|
2423
2497
|
readonly parentSuiteId?: number;
|
|
2424
2498
|
readonly name: string;
|
|
2425
2499
|
readonly fullName: string;
|
|
@@ -2433,7 +2507,7 @@ interface SuiteInput {
|
|
|
2433
2507
|
readonly locationColumn?: number;
|
|
2434
2508
|
}
|
|
2435
2509
|
/** @public */
|
|
2436
|
-
interface NoteInput {
|
|
2510
|
+
export interface NoteInput {
|
|
2437
2511
|
readonly title: string;
|
|
2438
2512
|
readonly content: string;
|
|
2439
2513
|
readonly scope: "global" | "project" | "module" | "suite" | "test" | "note";
|
|
@@ -2446,7 +2520,7 @@ interface NoteInput {
|
|
|
2446
2520
|
readonly pinned?: boolean;
|
|
2447
2521
|
}
|
|
2448
2522
|
/** @public */
|
|
2449
|
-
interface SessionInput {
|
|
2523
|
+
export interface SessionInput {
|
|
2450
2524
|
readonly chatId: string;
|
|
2451
2525
|
readonly project: string;
|
|
2452
2526
|
readonly cwd: string;
|
|
@@ -2455,9 +2529,16 @@ interface SessionInput {
|
|
|
2455
2529
|
readonly parentSessionId?: number;
|
|
2456
2530
|
readonly triageWasNonEmpty?: boolean;
|
|
2457
2531
|
readonly startedAt: string;
|
|
2532
|
+
/**
|
|
2533
|
+
* Canonical conversation UUID this session belongs to (issue #144).
|
|
2534
|
+
* Set once at INSERT time — `sessions.conversation_id` is immutable
|
|
2535
|
+
* thereafter (see the `trg_sessions_conv_id_immutable` trigger), so
|
|
2536
|
+
* omit it here rather than trying to backfill via an update.
|
|
2537
|
+
*/
|
|
2538
|
+
readonly conversationId?: string;
|
|
2458
2539
|
}
|
|
2459
2540
|
/** @public */
|
|
2460
|
-
interface TurnInput {
|
|
2541
|
+
export interface TurnInput {
|
|
2461
2542
|
readonly sessionId: number;
|
|
2462
2543
|
/** When omitted, writeTurn computes MAX(turnNo) + 1 for the session. */
|
|
2463
2544
|
readonly turnNo?: number;
|
|
@@ -2466,13 +2547,13 @@ interface TurnInput {
|
|
|
2466
2547
|
readonly occurredAt: string;
|
|
2467
2548
|
}
|
|
2468
2549
|
/** @public */
|
|
2469
|
-
interface FailureSignatureWriteInput {
|
|
2550
|
+
export interface FailureSignatureWriteInput {
|
|
2470
2551
|
readonly signatureHash: string;
|
|
2471
2552
|
readonly runId: number;
|
|
2472
2553
|
readonly seenAt: string;
|
|
2473
2554
|
}
|
|
2474
2555
|
/** @public */
|
|
2475
|
-
interface HypothesisInput {
|
|
2556
|
+
export interface HypothesisInput {
|
|
2476
2557
|
readonly sessionId: number;
|
|
2477
2558
|
readonly content: string;
|
|
2478
2559
|
readonly createdTurnId?: number;
|
|
@@ -2480,21 +2561,21 @@ interface HypothesisInput {
|
|
|
2480
2561
|
readonly citedStackFrameId?: number;
|
|
2481
2562
|
}
|
|
2482
2563
|
/** @public */
|
|
2483
|
-
interface ValidateHypothesisInput {
|
|
2564
|
+
export interface ValidateHypothesisInput {
|
|
2484
2565
|
readonly id: number;
|
|
2485
2566
|
readonly outcome: "confirmed" | "refuted" | "abandoned";
|
|
2486
2567
|
readonly validatedTurnId?: number;
|
|
2487
2568
|
readonly validatedAt: string;
|
|
2488
2569
|
}
|
|
2489
2570
|
/** @public */
|
|
2490
|
-
interface IdempotentResponseInput {
|
|
2571
|
+
export interface IdempotentResponseInput {
|
|
2491
2572
|
readonly procedurePath: string;
|
|
2492
2573
|
readonly key: string;
|
|
2493
2574
|
readonly resultJson: string;
|
|
2494
2575
|
readonly createdAt: string;
|
|
2495
2576
|
}
|
|
2496
2577
|
/** @public */
|
|
2497
|
-
interface TddTaskInput {
|
|
2578
|
+
export interface TddTaskInput {
|
|
2498
2579
|
readonly sessionId: number;
|
|
2499
2580
|
readonly goal: string;
|
|
2500
2581
|
readonly startedAt: string;
|
|
@@ -2502,14 +2583,14 @@ interface TddTaskInput {
|
|
|
2502
2583
|
readonly runId?: string;
|
|
2503
2584
|
}
|
|
2504
2585
|
/** @public */
|
|
2505
|
-
interface EndTddTaskInput {
|
|
2586
|
+
export interface EndTddTaskInput {
|
|
2506
2587
|
readonly id: number;
|
|
2507
2588
|
readonly endedAt: string;
|
|
2508
2589
|
readonly outcome: "succeeded" | "blocked" | "abandoned";
|
|
2509
2590
|
readonly summaryNoteId?: number;
|
|
2510
2591
|
}
|
|
2511
2592
|
/** @public */
|
|
2512
|
-
interface WriteTddPhaseInput {
|
|
2593
|
+
export interface WriteTddPhaseInput {
|
|
2513
2594
|
readonly tddTaskId: number;
|
|
2514
2595
|
readonly behaviorId?: number;
|
|
2515
2596
|
readonly phase: Phase;
|
|
@@ -2518,12 +2599,12 @@ interface WriteTddPhaseInput {
|
|
|
2518
2599
|
readonly parentPhaseId?: number;
|
|
2519
2600
|
}
|
|
2520
2601
|
/** @public */
|
|
2521
|
-
interface WriteTddPhaseOutput {
|
|
2602
|
+
export interface WriteTddPhaseOutput {
|
|
2522
2603
|
readonly id: number;
|
|
2523
2604
|
readonly previousPhaseId: number | null;
|
|
2524
2605
|
}
|
|
2525
2606
|
/** @public */
|
|
2526
|
-
interface WriteTddArtifactInput {
|
|
2607
|
+
export interface WriteTddArtifactInput {
|
|
2527
2608
|
readonly phaseId: number;
|
|
2528
2609
|
readonly artifactKind: ArtifactKind;
|
|
2529
2610
|
readonly fileId?: number;
|
|
@@ -2532,9 +2613,11 @@ interface WriteTddArtifactInput {
|
|
|
2532
2613
|
readonly testFirstFailureRunId?: number;
|
|
2533
2614
|
readonly diffExcerpt?: string;
|
|
2534
2615
|
readonly recordedAt: string;
|
|
2616
|
+
/** Issue #363: explicit suite marker. Defaults to `"vitest"` when omitted. */
|
|
2617
|
+
readonly suite?: ArtifactSuite;
|
|
2535
2618
|
}
|
|
2536
2619
|
/** @public */
|
|
2537
|
-
interface WriteCommitInput {
|
|
2620
|
+
export interface WriteCommitInput {
|
|
2538
2621
|
readonly sha: string;
|
|
2539
2622
|
readonly parentSha?: string;
|
|
2540
2623
|
readonly message?: string;
|
|
@@ -2543,20 +2626,20 @@ interface WriteCommitInput {
|
|
|
2543
2626
|
readonly branch?: string;
|
|
2544
2627
|
}
|
|
2545
2628
|
/** @public */
|
|
2546
|
-
type ChangeKind = "added" | "modified" | "deleted" | "renamed" | "untracked-modified";
|
|
2629
|
+
export type ChangeKind = "added" | "modified" | "deleted" | "renamed" | "untracked-modified";
|
|
2547
2630
|
/** @public */
|
|
2548
|
-
interface RunChangedFile {
|
|
2631
|
+
export interface RunChangedFile {
|
|
2549
2632
|
readonly filePath: string;
|
|
2550
2633
|
readonly changeKind: ChangeKind;
|
|
2551
2634
|
readonly commitSha?: string;
|
|
2552
2635
|
}
|
|
2553
2636
|
/** @public */
|
|
2554
|
-
interface WriteRunChangedFilesInput {
|
|
2637
|
+
export interface WriteRunChangedFilesInput {
|
|
2555
2638
|
readonly runId: number;
|
|
2556
2639
|
readonly files: ReadonlyArray<RunChangedFile>;
|
|
2557
2640
|
}
|
|
2558
2641
|
/** @public */
|
|
2559
|
-
type RunInvocationMethod = "bash" | "mcp" | "cli";
|
|
2642
|
+
export type RunInvocationMethod = "bash" | "mcp" | "cli";
|
|
2560
2643
|
/**
|
|
2561
2644
|
* Input to `DataStore.registerAgent`.
|
|
2562
2645
|
*
|
|
@@ -2570,7 +2653,7 @@ type RunInvocationMethod = "bash" | "mcp" | "cli";
|
|
|
2570
2653
|
* same row.
|
|
2571
2654
|
* @public
|
|
2572
2655
|
*/
|
|
2573
|
-
interface RegisterAgentInput {
|
|
2656
|
+
export interface RegisterAgentInput {
|
|
2574
2657
|
readonly sessionId: number;
|
|
2575
2658
|
readonly agentType: string;
|
|
2576
2659
|
readonly parentAgentId: string | null;
|
|
@@ -2592,7 +2675,7 @@ interface RegisterAgentInput {
|
|
|
2592
2675
|
readonly agentId?: string;
|
|
2593
2676
|
}
|
|
2594
2677
|
/** @public */
|
|
2595
|
-
interface AssociateRunSessionInput {
|
|
2678
|
+
export interface AssociateRunSessionInput {
|
|
2596
2679
|
readonly chatId: string;
|
|
2597
2680
|
readonly invocationMethod: RunInvocationMethod;
|
|
2598
2681
|
}
|
|
@@ -2606,6 +2689,18 @@ declare const DataStore_base: Context.ServiceClass<DataStore, "vitest-agent/Data
|
|
|
2606
2689
|
readonly writeCoverage: (runId: number, coverage: ReadonlyArray<FileCoverageInput>) => Effect.Effect<void, DataStoreError>;
|
|
2607
2690
|
readonly writeHistory: (project: string, fullName: string, modulePath: string, runId: number, timestamp: string, state: string, duration: number | null, flaky: boolean, retryCount: number, errorMessage: string | null) => Effect.Effect<void, DataStoreError>;
|
|
2608
2691
|
readonly writeBaselines: (baselines: CoverageBaselines) => Effect.Effect<void, DataStoreError>;
|
|
2692
|
+
/**
|
|
2693
|
+
* Persist the resolved (enforced) Vitest `coverage.thresholds` for the
|
|
2694
|
+
* current run, distinct from the ratcheted `coverage_baselines` rows.
|
|
2695
|
+
* Stored under `kind='threshold'`. See issue #237.
|
|
2696
|
+
*/
|
|
2697
|
+
readonly writeThresholds: (thresholds: ResolvedThresholds) => Effect.Effect<void, DataStoreError>;
|
|
2698
|
+
/**
|
|
2699
|
+
* Persist the resolved aspirational `coverageTargets` for the current
|
|
2700
|
+
* run, distinct from the ratcheted `coverage_baselines` rows. Stored
|
|
2701
|
+
* under `kind='target'`. See issue #237.
|
|
2702
|
+
*/
|
|
2703
|
+
readonly writeTargets: (targets: ResolvedThresholds) => Effect.Effect<void, DataStoreError>;
|
|
2609
2704
|
readonly writeTrends: (project: string, runId: number, entry: TrendEntry) => Effect.Effect<void, DataStoreError>;
|
|
2610
2705
|
readonly writeSourceMap: (sourceFilePath: string, testModuleId: number, mappingType: string) => Effect.Effect<void, DataStoreError>;
|
|
2611
2706
|
readonly ensureFile: (filePath: string) => Effect.Effect<number, DataStoreError>;
|
|
@@ -2624,6 +2719,20 @@ declare const DataStore_base: Context.ServiceClass<DataStore, "vitest-agent/Data
|
|
|
2624
2719
|
* `INSERT ... ON CONFLICT DO NOTHING`.
|
|
2625
2720
|
*/
|
|
2626
2721
|
readonly upsertSession: (input: SessionInput) => Effect.Effect<number, DataStoreError>;
|
|
2722
|
+
/**
|
|
2723
|
+
* Backfill `sessions.conversation_id` for a row that was inserted
|
|
2724
|
+
* before the canonical conversation id was known (issue #144) —
|
|
2725
|
+
* `record session-start` always precedes `register-agent`, so the
|
|
2726
|
+
* session row exists first. Race-safe and idempotent: the UPDATE's
|
|
2727
|
+
* `WHERE conversation_id IS NULL` guard means a session that
|
|
2728
|
+
* already carries a value is left untouched (zero rows affected),
|
|
2729
|
+
* matching the trigger's null→value-only relaxation rather than
|
|
2730
|
+
* risking an immutability-violation error on a redundant call.
|
|
2731
|
+
*/
|
|
2732
|
+
readonly setSessionConversationIdIfNull: (input: {
|
|
2733
|
+
readonly sessionId: number;
|
|
2734
|
+
readonly conversationId: string;
|
|
2735
|
+
}) => Effect.Effect<void, DataStoreError>;
|
|
2627
2736
|
readonly writeTurn: (input: TurnInput) => Effect.Effect<number, DataStoreError>;
|
|
2628
2737
|
readonly writeFailureSignature: (input: FailureSignatureWriteInput) => Effect.Effect<void, DataStoreError>;
|
|
2629
2738
|
readonly endSession: (chatId: string, endedAt: string, endReason: string | null) => Effect.Effect<void, DataStoreError>;
|
|
@@ -2674,11 +2783,11 @@ declare const DataStore_base: Context.ServiceClass<DataStore, "vitest-agent/Data
|
|
|
2674
2783
|
readonly endAgent: (agentId: string, endedAt: number) => Effect.Effect<void, AgentNotFoundError | DataStoreError>;
|
|
2675
2784
|
}>;
|
|
2676
2785
|
/** @public */
|
|
2677
|
-
declare class DataStore extends DataStore_base {}
|
|
2786
|
+
export declare class DataStore extends DataStore_base {}
|
|
2678
2787
|
//#endregion
|
|
2679
2788
|
//#region src/services/DataReader.d.ts
|
|
2680
2789
|
/** @public */
|
|
2681
|
-
interface ProjectRunSummary {
|
|
2790
|
+
export interface ProjectRunSummary {
|
|
2682
2791
|
readonly project: string;
|
|
2683
2792
|
readonly lastRun: string | null;
|
|
2684
2793
|
readonly lastResult: "passed" | "failed" | "interrupted" | null;
|
|
@@ -2688,7 +2797,7 @@ interface ProjectRunSummary {
|
|
|
2688
2797
|
readonly skipped: number;
|
|
2689
2798
|
}
|
|
2690
2799
|
/** @public */
|
|
2691
|
-
interface FlakyTest {
|
|
2800
|
+
export interface FlakyTest {
|
|
2692
2801
|
readonly fullName: string;
|
|
2693
2802
|
readonly modulePath: string;
|
|
2694
2803
|
readonly project: string;
|
|
@@ -2698,7 +2807,7 @@ interface FlakyTest {
|
|
|
2698
2807
|
readonly lastTimestamp: string;
|
|
2699
2808
|
}
|
|
2700
2809
|
/** @public */
|
|
2701
|
-
interface PersistentFailure {
|
|
2810
|
+
export interface PersistentFailure {
|
|
2702
2811
|
readonly fullName: string;
|
|
2703
2812
|
readonly modulePath: string;
|
|
2704
2813
|
readonly project: string;
|
|
@@ -2708,7 +2817,7 @@ interface PersistentFailure {
|
|
|
2708
2817
|
readonly lastErrorMessage: string | null;
|
|
2709
2818
|
}
|
|
2710
2819
|
/** @public */
|
|
2711
|
-
interface TestError {
|
|
2820
|
+
export interface TestError {
|
|
2712
2821
|
/** `test_errors.id` — required by `hypothesis (action: record).citedTestErrorId`. */
|
|
2713
2822
|
readonly id: number;
|
|
2714
2823
|
/**
|
|
@@ -2728,7 +2837,7 @@ interface TestError {
|
|
|
2728
2837
|
readonly moduleFile: string | null;
|
|
2729
2838
|
}
|
|
2730
2839
|
/** @public */
|
|
2731
|
-
interface NoteRow {
|
|
2840
|
+
export interface NoteRow {
|
|
2732
2841
|
readonly id: number;
|
|
2733
2842
|
readonly title: string;
|
|
2734
2843
|
readonly content: string;
|
|
@@ -2744,7 +2853,7 @@ interface NoteRow {
|
|
|
2744
2853
|
readonly updatedAt: string;
|
|
2745
2854
|
}
|
|
2746
2855
|
/** @public */
|
|
2747
|
-
interface SettingsRow {
|
|
2856
|
+
export interface SettingsRow {
|
|
2748
2857
|
readonly hash: string;
|
|
2749
2858
|
readonly reporters: string | null;
|
|
2750
2859
|
readonly coverageEnabled: boolean;
|
|
@@ -2759,7 +2868,7 @@ interface SettingsRow {
|
|
|
2759
2868
|
readonly capturedAt: string;
|
|
2760
2869
|
}
|
|
2761
2870
|
/** @public */
|
|
2762
|
-
interface TestListEntry {
|
|
2871
|
+
export interface TestListEntry {
|
|
2763
2872
|
readonly id: number;
|
|
2764
2873
|
readonly fullName: string;
|
|
2765
2874
|
readonly state: string;
|
|
@@ -2768,7 +2877,7 @@ interface TestListEntry {
|
|
|
2768
2877
|
readonly classification: string | null;
|
|
2769
2878
|
}
|
|
2770
2879
|
/** @public */
|
|
2771
|
-
interface ModuleListEntry {
|
|
2880
|
+
export interface ModuleListEntry {
|
|
2772
2881
|
readonly id: number;
|
|
2773
2882
|
readonly file: string;
|
|
2774
2883
|
readonly state: string;
|
|
@@ -2776,7 +2885,7 @@ interface ModuleListEntry {
|
|
|
2776
2885
|
readonly duration: number | null;
|
|
2777
2886
|
}
|
|
2778
2887
|
/** @public */
|
|
2779
|
-
interface SuiteListEntry {
|
|
2888
|
+
export interface SuiteListEntry {
|
|
2780
2889
|
readonly id: number;
|
|
2781
2890
|
readonly name: string;
|
|
2782
2891
|
readonly module: string;
|
|
@@ -2784,12 +2893,12 @@ interface SuiteListEntry {
|
|
|
2784
2893
|
readonly testCount: number;
|
|
2785
2894
|
}
|
|
2786
2895
|
/** @public */
|
|
2787
|
-
interface SettingsListEntry {
|
|
2896
|
+
export interface SettingsListEntry {
|
|
2788
2897
|
readonly hash: string;
|
|
2789
2898
|
readonly capturedAt: string;
|
|
2790
2899
|
}
|
|
2791
2900
|
/** @public */
|
|
2792
|
-
interface SessionDetail {
|
|
2901
|
+
export interface SessionDetail {
|
|
2793
2902
|
readonly id: number;
|
|
2794
2903
|
readonly chatId: string;
|
|
2795
2904
|
readonly project: string;
|
|
@@ -2801,9 +2910,11 @@ interface SessionDetail {
|
|
|
2801
2910
|
readonly startedAt: string;
|
|
2802
2911
|
readonly endedAt: string | null;
|
|
2803
2912
|
readonly endReason: string | null;
|
|
2913
|
+
/** Canonical conversation UUID this session belongs to (issue #144), null when unset. */
|
|
2914
|
+
readonly conversationId: string | null;
|
|
2804
2915
|
}
|
|
2805
2916
|
/** @public */
|
|
2806
|
-
interface TurnSummary {
|
|
2917
|
+
export interface TurnSummary {
|
|
2807
2918
|
readonly id: number;
|
|
2808
2919
|
readonly sessionId: number;
|
|
2809
2920
|
readonly turnNo: number;
|
|
@@ -2812,7 +2923,7 @@ interface TurnSummary {
|
|
|
2812
2923
|
readonly occurredAt: string;
|
|
2813
2924
|
}
|
|
2814
2925
|
/** @public */
|
|
2815
|
-
interface HistoryQueryOptions {
|
|
2926
|
+
export interface HistoryQueryOptions {
|
|
2816
2927
|
/** Exact `full_name` match — narrows to a single test's history. */
|
|
2817
2928
|
readonly testName?: string;
|
|
2818
2929
|
/** Exact `module_path` match — narrows to tests in one file. */
|
|
@@ -2830,7 +2941,7 @@ interface HistoryQueryOptions {
|
|
|
2830
2941
|
*
|
|
2831
2942
|
* @public
|
|
2832
2943
|
*/
|
|
2833
|
-
interface ClassificationQueryOptions {
|
|
2944
|
+
export interface ClassificationQueryOptions {
|
|
2834
2945
|
/** Exact `full_name` match — narrows to a single test's classification. */
|
|
2835
2946
|
readonly testName?: string;
|
|
2836
2947
|
/** Exact `module_path` match — narrows to tests in one file. */
|
|
@@ -2843,19 +2954,19 @@ interface ClassificationQueryOptions {
|
|
|
2843
2954
|
*
|
|
2844
2955
|
* @public
|
|
2845
2956
|
*/
|
|
2846
|
-
interface TestLookupOptions {
|
|
2957
|
+
export interface TestLookupOptions {
|
|
2847
2958
|
/** Exact `module_path` match — picks one variant of an ambiguous `full_name`. */
|
|
2848
2959
|
readonly modulePath?: string;
|
|
2849
2960
|
}
|
|
2850
2961
|
/** @public */
|
|
2851
|
-
interface TurnSearchOptions {
|
|
2962
|
+
export interface TurnSearchOptions {
|
|
2852
2963
|
readonly sessionId?: number;
|
|
2853
2964
|
readonly type?: string;
|
|
2854
2965
|
readonly since?: string;
|
|
2855
2966
|
readonly limit?: number;
|
|
2856
2967
|
}
|
|
2857
2968
|
/** @public */
|
|
2858
|
-
interface AcceptanceMetrics {
|
|
2969
|
+
export interface AcceptanceMetrics {
|
|
2859
2970
|
readonly phaseEvidenceIntegrity: {
|
|
2860
2971
|
total: number;
|
|
2861
2972
|
compliant: number;
|
|
@@ -2878,7 +2989,7 @@ interface AcceptanceMetrics {
|
|
|
2878
2989
|
};
|
|
2879
2990
|
}
|
|
2880
2991
|
/** @public */
|
|
2881
|
-
interface FailureSignatureDetail {
|
|
2992
|
+
export interface FailureSignatureDetail {
|
|
2882
2993
|
readonly signatureHash: string;
|
|
2883
2994
|
readonly firstSeenRunId: number | null;
|
|
2884
2995
|
readonly firstSeenAt: string;
|
|
@@ -2891,7 +3002,7 @@ interface FailureSignatureDetail {
|
|
|
2891
3002
|
}>;
|
|
2892
3003
|
}
|
|
2893
3004
|
/** @public */
|
|
2894
|
-
interface TddPhaseDetail {
|
|
3005
|
+
export interface TddPhaseDetail {
|
|
2895
3006
|
readonly id: number;
|
|
2896
3007
|
readonly behaviorId: number | null;
|
|
2897
3008
|
readonly phase: string;
|
|
@@ -2900,7 +3011,7 @@ interface TddPhaseDetail {
|
|
|
2900
3011
|
readonly transitionReason: string | null;
|
|
2901
3012
|
}
|
|
2902
3013
|
/** @public */
|
|
2903
|
-
interface TddArtifactDetail {
|
|
3014
|
+
export interface TddArtifactDetail {
|
|
2904
3015
|
readonly id: number;
|
|
2905
3016
|
readonly phaseId: number;
|
|
2906
3017
|
readonly artifactKind: string;
|
|
@@ -2909,7 +3020,7 @@ interface TddArtifactDetail {
|
|
|
2909
3020
|
readonly recordedAt: string;
|
|
2910
3021
|
}
|
|
2911
3022
|
/** @public */
|
|
2912
|
-
interface TddTaskDetail {
|
|
3023
|
+
export interface TddTaskDetail {
|
|
2913
3024
|
readonly id: number;
|
|
2914
3025
|
readonly sessionId: number;
|
|
2915
3026
|
readonly goal: string;
|
|
@@ -2922,18 +3033,18 @@ interface TddTaskDetail {
|
|
|
2922
3033
|
readonly artifacts: ReadonlyArray<TddArtifactDetail>;
|
|
2923
3034
|
}
|
|
2924
3035
|
/** @public */
|
|
2925
|
-
interface CurrentTddPhase {
|
|
3036
|
+
export interface CurrentTddPhase {
|
|
2926
3037
|
readonly id: number;
|
|
2927
3038
|
readonly phase: Phase;
|
|
2928
3039
|
readonly startedAt: string;
|
|
2929
3040
|
readonly behaviorId: number | null;
|
|
2930
3041
|
}
|
|
2931
3042
|
/** @public */
|
|
2932
|
-
interface CitedArtifactRow extends CitedArtifact {
|
|
3043
|
+
export interface CitedArtifactRow extends CitedArtifact {
|
|
2933
3044
|
readonly phase_id: number;
|
|
2934
3045
|
}
|
|
2935
3046
|
/** @public */
|
|
2936
|
-
interface CommitChangesEntry {
|
|
3047
|
+
export interface CommitChangesEntry {
|
|
2937
3048
|
readonly sha: string;
|
|
2938
3049
|
readonly parentSha: string | null;
|
|
2939
3050
|
readonly message: string | null;
|
|
@@ -2946,7 +3057,7 @@ interface CommitChangesEntry {
|
|
|
2946
3057
|
}>;
|
|
2947
3058
|
}
|
|
2948
3059
|
/** @public */
|
|
2949
|
-
interface HypothesisDetail {
|
|
3060
|
+
export interface HypothesisDetail {
|
|
2950
3061
|
readonly id: number;
|
|
2951
3062
|
readonly sessionId: number;
|
|
2952
3063
|
readonly content: string;
|
|
@@ -2956,7 +3067,7 @@ interface HypothesisDetail {
|
|
|
2956
3067
|
readonly validatedAt: string | null;
|
|
2957
3068
|
}
|
|
2958
3069
|
/** @public */
|
|
2959
|
-
interface TddTaskSummary {
|
|
3070
|
+
export interface TddTaskSummary {
|
|
2960
3071
|
readonly id: number;
|
|
2961
3072
|
readonly sessionId: number;
|
|
2962
3073
|
readonly goal: string;
|
|
@@ -2971,7 +3082,7 @@ interface TddTaskSummary {
|
|
|
2971
3082
|
*
|
|
2972
3083
|
* @public
|
|
2973
3084
|
*/
|
|
2974
|
-
interface TddArtifactRow {
|
|
3085
|
+
export interface TddArtifactRow {
|
|
2975
3086
|
readonly id: number;
|
|
2976
3087
|
readonly tddTaskId: number;
|
|
2977
3088
|
readonly phaseId: number;
|
|
@@ -2982,9 +3093,10 @@ interface TddArtifactRow {
|
|
|
2982
3093
|
readonly testRunId: number | null;
|
|
2983
3094
|
readonly testFirstFailureRunId: number | null;
|
|
2984
3095
|
readonly recordedAt: string;
|
|
3096
|
+
readonly suite: ArtifactSuite;
|
|
2985
3097
|
}
|
|
2986
3098
|
/** @public */
|
|
2987
|
-
interface TagInventoryRow {
|
|
3099
|
+
export interface TagInventoryRow {
|
|
2988
3100
|
/** The tag name (e.g. `"int"`, `"e2e"`, `"unit"`). */
|
|
2989
3101
|
readonly tag: string;
|
|
2990
3102
|
/** The Vitest project this tag was observed in. */
|
|
@@ -3095,7 +3207,32 @@ declare const DataReader_base: Context.ServiceClass<DataReader, "vitest-agent/Da
|
|
|
3095
3207
|
* preserves the prior single-session contract.
|
|
3096
3208
|
*/
|
|
3097
3209
|
readonly walkParents?: boolean;
|
|
3210
|
+
/**
|
|
3211
|
+
* When true AND `sessionId`'s session has a non-null
|
|
3212
|
+
* `conversation_id`, also return tdd_tasks belonging to
|
|
3213
|
+
* any OTHER session sharing that `conversation_id` — the
|
|
3214
|
+
* detached-session fallback (issue #144). A session with
|
|
3215
|
+
* a null `conversation_id` never triggers this fallback.
|
|
3216
|
+
* Rows are ordered so a task owned by an `agent_kind =
|
|
3217
|
+
* 'main'` session sorts first, then by `started_at DESC`.
|
|
3218
|
+
* Default `false` preserves the prior contract.
|
|
3219
|
+
*/
|
|
3220
|
+
readonly walkConversation?: boolean;
|
|
3098
3221
|
}) => Effect.Effect<ReadonlyArray<TddTaskSummary>, DataStoreError>;
|
|
3222
|
+
/**
|
|
3223
|
+
* Diagnostic for the `missing_artifact_evidence` phase-transition
|
|
3224
|
+
* denial (issue #144): counts `tdd_artifacts` rows recorded at or
|
|
3225
|
+
* after `sinceIso` under sessions OTHER than the one that opened
|
|
3226
|
+
* `tddTaskId`, but sharing that session's `conversation_id`. Used
|
|
3227
|
+
* to tell an agent "your hooks may be attributing to a detached
|
|
3228
|
+
* session" rather than a bare "no artifact found". Returns 0 when
|
|
3229
|
+
* `tddTaskId` is unknown or its session's `conversation_id` is
|
|
3230
|
+
* null — the diagnostic never fabricates a signal it cannot back.
|
|
3231
|
+
*/
|
|
3232
|
+
readonly countRecentArtifactsInOtherSessionsOfConversation: (input: {
|
|
3233
|
+
readonly tddTaskId: number;
|
|
3234
|
+
readonly sinceIso: string;
|
|
3235
|
+
}) => Effect.Effect<number, DataStoreError>;
|
|
3099
3236
|
/**
|
|
3100
3237
|
* List artifacts recorded for a TDD task, optionally filtered
|
|
3101
3238
|
* by `artifactKind`, `phaseId`, or `behaviorId`. Returns rows in
|
|
@@ -3134,19 +3271,19 @@ declare const DataReader_base: Context.ServiceClass<DataReader, "vitest-agent/Da
|
|
|
3134
3271
|
}) => Effect.Effect<ReadonlyArray<TestListEntry>, DataStoreError>;
|
|
3135
3272
|
}>;
|
|
3136
3273
|
/** @public */
|
|
3137
|
-
declare class DataReader extends DataReader_base {}
|
|
3274
|
+
export declare class DataReader extends DataReader_base {}
|
|
3138
3275
|
//#endregion
|
|
3139
3276
|
//#region src/layers/DataReaderLive.d.ts
|
|
3140
3277
|
/** @public */
|
|
3141
|
-
declare const DataReaderLive: Layer.Layer<DataReader, never, SqlClient>;
|
|
3278
|
+
export declare const DataReaderLive: Layer.Layer<DataReader, never, SqlClient>;
|
|
3142
3279
|
//#endregion
|
|
3143
3280
|
//#region src/layers/DataStoreLive.d.ts
|
|
3144
3281
|
/** @public */
|
|
3145
|
-
declare const DataStoreLive: Layer.Layer<DataStore, never, SqlClient>;
|
|
3282
|
+
export declare const DataStoreLive: Layer.Layer<DataStore, never, SqlClient>;
|
|
3146
3283
|
//#endregion
|
|
3147
3284
|
//#region src/services/DetailResolver.d.ts
|
|
3148
3285
|
/** @public */
|
|
3149
|
-
interface RunHealth {
|
|
3286
|
+
export interface RunHealth {
|
|
3150
3287
|
readonly hasFailures: boolean;
|
|
3151
3288
|
readonly belowTargets: boolean;
|
|
3152
3289
|
readonly hasTargets?: boolean;
|
|
@@ -3155,11 +3292,11 @@ declare const DetailResolver_base: Context.ServiceClass<DetailResolver, "vitest-
|
|
|
3155
3292
|
readonly resolve: (executor: Executor, health: RunHealth, explicit?: DetailLevel) => Effect.Effect<DetailLevel>;
|
|
3156
3293
|
}>;
|
|
3157
3294
|
/** @public */
|
|
3158
|
-
declare class DetailResolver extends DetailResolver_base {}
|
|
3295
|
+
export declare class DetailResolver extends DetailResolver_base {}
|
|
3159
3296
|
//#endregion
|
|
3160
3297
|
//#region src/layers/DetailResolverLive.d.ts
|
|
3161
3298
|
/** @public */
|
|
3162
|
-
declare const DetailResolverLive: Layer.Layer<DetailResolver, never, never>;
|
|
3299
|
+
export declare const DetailResolverLive: Layer.Layer<DetailResolver, never, never>;
|
|
3163
3300
|
//#endregion
|
|
3164
3301
|
//#region src/services/DiscoveryRegistry.d.ts
|
|
3165
3302
|
/**
|
|
@@ -3167,7 +3304,7 @@ declare const DetailResolverLive: Layer.Layer<DetailResolver, never, never>;
|
|
|
3167
3304
|
*
|
|
3168
3305
|
* @public
|
|
3169
3306
|
*/
|
|
3170
|
-
interface KnownProjectInput {
|
|
3307
|
+
export interface KnownProjectInput {
|
|
3171
3308
|
readonly projectKey: string;
|
|
3172
3309
|
readonly canonicalForm: string;
|
|
3173
3310
|
readonly dataDbPath: string;
|
|
@@ -3179,7 +3316,7 @@ interface KnownProjectInput {
|
|
|
3179
3316
|
*
|
|
3180
3317
|
* @public
|
|
3181
3318
|
*/
|
|
3182
|
-
interface KnownProject {
|
|
3319
|
+
export interface KnownProject {
|
|
3183
3320
|
readonly projectKey: string;
|
|
3184
3321
|
readonly canonicalForm: string;
|
|
3185
3322
|
readonly dataDbPath: string;
|
|
@@ -3208,11 +3345,11 @@ declare const DiscoveryRegistry_base: Context.ServiceClass<DiscoveryRegistry, "v
|
|
|
3208
3345
|
readonly prune: (maxAgeDays: number) => Effect.Effect<number, DataStoreError>;
|
|
3209
3346
|
}>;
|
|
3210
3347
|
/** @public */
|
|
3211
|
-
declare class DiscoveryRegistry extends DiscoveryRegistry_base {}
|
|
3348
|
+
export declare class DiscoveryRegistry extends DiscoveryRegistry_base {}
|
|
3212
3349
|
//#endregion
|
|
3213
3350
|
//#region src/layers/DiscoveryRegistryLive.d.ts
|
|
3214
3351
|
/** @public */
|
|
3215
|
-
declare const DiscoveryRegistryLive: Layer.Layer<DiscoveryRegistry, never, SqlClient>;
|
|
3352
|
+
export declare const DiscoveryRegistryLive: Layer.Layer<DiscoveryRegistry, never, SqlClient>;
|
|
3216
3353
|
//#endregion
|
|
3217
3354
|
//#region src/services/EnvironmentDetector.d.ts
|
|
3218
3355
|
declare const EnvironmentDetector_base: Context.ServiceClass<EnvironmentDetector, "vitest-agent/EnvironmentDetector", {
|
|
@@ -3221,15 +3358,15 @@ declare const EnvironmentDetector_base: Context.ServiceClass<EnvironmentDetector
|
|
|
3221
3358
|
readonly agentName: Effect.Effect<string | undefined>;
|
|
3222
3359
|
}>;
|
|
3223
3360
|
/** @public */
|
|
3224
|
-
declare class EnvironmentDetector extends EnvironmentDetector_base {}
|
|
3361
|
+
export declare class EnvironmentDetector extends EnvironmentDetector_base {}
|
|
3225
3362
|
//#endregion
|
|
3226
3363
|
//#region src/layers/EnvironmentDetectorLive.d.ts
|
|
3227
3364
|
/** @public */
|
|
3228
|
-
declare const EnvironmentDetectorLive: Layer.Layer<EnvironmentDetector>;
|
|
3365
|
+
export declare const EnvironmentDetectorLive: Layer.Layer<EnvironmentDetector>;
|
|
3229
3366
|
//#endregion
|
|
3230
3367
|
//#region src/layers/EnvironmentDetectorTest.d.ts
|
|
3231
3368
|
/** @public */
|
|
3232
|
-
declare const EnvironmentDetectorTest: {
|
|
3369
|
+
export declare const EnvironmentDetectorTest: {
|
|
3233
3370
|
layer: (env?: Environment) => Layer.Layer<EnvironmentDetector, never, never>;
|
|
3234
3371
|
};
|
|
3235
3372
|
//#endregion
|
|
@@ -3238,18 +3375,18 @@ declare const ExecutorResolver_base: Context.ServiceClass<ExecutorResolver, "vit
|
|
|
3238
3375
|
readonly resolve: (env: Environment) => Effect.Effect<Executor>;
|
|
3239
3376
|
}>;
|
|
3240
3377
|
/** @public */
|
|
3241
|
-
declare class ExecutorResolver extends ExecutorResolver_base {}
|
|
3378
|
+
export declare class ExecutorResolver extends ExecutorResolver_base {}
|
|
3242
3379
|
//#endregion
|
|
3243
3380
|
//#region src/layers/ExecutorResolverLive.d.ts
|
|
3244
3381
|
/** @public */
|
|
3245
|
-
declare const ExecutorResolverLive: Layer.Layer<ExecutorResolver, never, never>;
|
|
3382
|
+
export declare const ExecutorResolverLive: Layer.Layer<ExecutorResolver, never, never>;
|
|
3246
3383
|
//#endregion
|
|
3247
3384
|
//#region src/services/FormatSelector.d.ts
|
|
3248
3385
|
declare const FormatSelector_base: Context.ServiceClass<FormatSelector, "vitest-agent/FormatSelector", {
|
|
3249
3386
|
readonly select: (executor: Executor, explicitFormat?: OutputFormat, environment?: Environment) => Effect.Effect<OutputFormat>;
|
|
3250
3387
|
}>;
|
|
3251
3388
|
/** @public */
|
|
3252
|
-
declare class FormatSelector extends FormatSelector_base {}
|
|
3389
|
+
export declare class FormatSelector extends FormatSelector_base {}
|
|
3253
3390
|
//#endregion
|
|
3254
3391
|
//#region src/layers/FormatSelectorLive.d.ts
|
|
3255
3392
|
/**
|
|
@@ -3264,14 +3401,14 @@ declare class FormatSelector extends FormatSelector_base {}
|
|
|
3264
3401
|
* for surfaces that *do* render it (MCP tools, GitHub step summary).
|
|
3265
3402
|
* @public
|
|
3266
3403
|
*/
|
|
3267
|
-
declare const FormatSelectorLive: Layer.Layer<FormatSelector, never, never>;
|
|
3404
|
+
export declare const FormatSelectorLive: Layer.Layer<FormatSelector, never, never>;
|
|
3268
3405
|
//#endregion
|
|
3269
3406
|
//#region src/services/HistoryTracker.d.ts
|
|
3270
3407
|
/**
|
|
3271
3408
|
* Lightweight test outcome for history classification.
|
|
3272
3409
|
* @public
|
|
3273
3410
|
*/
|
|
3274
|
-
interface TestOutcome {
|
|
3411
|
+
export interface TestOutcome {
|
|
3275
3412
|
readonly modulePath: string;
|
|
3276
3413
|
readonly fullName: string;
|
|
3277
3414
|
readonly state: "passed" | "failed";
|
|
@@ -3287,7 +3424,7 @@ interface TestOutcome {
|
|
|
3287
3424
|
* key exists to prevent.
|
|
3288
3425
|
* @public
|
|
3289
3426
|
*/
|
|
3290
|
-
declare const historyKey: (modulePath: string, fullName: string) => string;
|
|
3427
|
+
export declare const historyKey: (modulePath: string, fullName: string) => string;
|
|
3291
3428
|
declare const HistoryTracker_base: Context.ServiceClass<HistoryTracker, "vitest-agent/HistoryTracker", {
|
|
3292
3429
|
readonly classify: (project: string, testOutcomes: ReadonlyArray<TestOutcome>, timestamp: string) => Effect.Effect<{
|
|
3293
3430
|
history: HistoryRecord;
|
|
@@ -3295,22 +3432,22 @@ declare const HistoryTracker_base: Context.ServiceClass<HistoryTracker, "vitest-
|
|
|
3295
3432
|
}, DataStoreError>;
|
|
3296
3433
|
}>;
|
|
3297
3434
|
/** @public */
|
|
3298
|
-
declare class HistoryTracker extends HistoryTracker_base {}
|
|
3435
|
+
export declare class HistoryTracker extends HistoryTracker_base {}
|
|
3299
3436
|
//#endregion
|
|
3300
3437
|
//#region src/layers/HistoryTrackerLive.d.ts
|
|
3301
3438
|
/** @public */
|
|
3302
|
-
declare const HistoryTrackerLive: Layer.Layer<HistoryTracker, never, DataReader>;
|
|
3439
|
+
export declare const HistoryTrackerLive: Layer.Layer<HistoryTracker, never, DataReader>;
|
|
3303
3440
|
//#endregion
|
|
3304
3441
|
//#region src/layers/HistoryTrackerTest.d.ts
|
|
3305
3442
|
/** @public */
|
|
3306
|
-
interface HistoryTrackerTestState {
|
|
3443
|
+
export interface HistoryTrackerTestState {
|
|
3307
3444
|
readonly classifyCalls: Array<{
|
|
3308
3445
|
project: string;
|
|
3309
3446
|
timestamp: string;
|
|
3310
3447
|
}>;
|
|
3311
3448
|
}
|
|
3312
3449
|
/** @public */
|
|
3313
|
-
declare const HistoryTrackerTest: {
|
|
3450
|
+
export declare const HistoryTrackerTest: {
|
|
3314
3451
|
readonly empty: () => HistoryTrackerTestState;
|
|
3315
3452
|
readonly layer: (state: HistoryTrackerTestState, cannedResult?: {
|
|
3316
3453
|
history: HistoryRecord;
|
|
@@ -3328,29 +3465,29 @@ declare const HistoryTrackerTest: {
|
|
|
3328
3465
|
* output.
|
|
3329
3466
|
* @public
|
|
3330
3467
|
*/
|
|
3331
|
-
declare const LoggerLive: (level?: LogLevel.LogLevel, logFile?: string) => Layer.Layer<never>;
|
|
3468
|
+
export declare const LoggerLive: (level?: LogLevel.LogLevel, logFile?: string) => Layer.Layer<never>;
|
|
3332
3469
|
/** @public */
|
|
3333
|
-
declare function resolveLogLevel(option?: string): LogLevel.LogLevel | undefined;
|
|
3470
|
+
export declare function resolveLogLevel(option?: string): LogLevel.LogLevel | undefined;
|
|
3334
3471
|
/**
|
|
3335
3472
|
* Resolve log file from option or environment variable.
|
|
3336
3473
|
* @public
|
|
3337
3474
|
*/
|
|
3338
|
-
declare function resolveLogFile(option?: string): string | undefined;
|
|
3475
|
+
export declare function resolveLogFile(option?: string): string | undefined;
|
|
3339
3476
|
//#endregion
|
|
3340
3477
|
//#region src/layers/OutputPipelineLive.d.ts
|
|
3341
3478
|
/** @public */
|
|
3342
|
-
declare const OutputPipelineLive: Layer.Layer<DetailResolver | EnvironmentDetector | ExecutorResolver | FormatSelector | OutputRenderer, never, never>;
|
|
3479
|
+
export declare const OutputPipelineLive: Layer.Layer<DetailResolver | EnvironmentDetector | ExecutorResolver | FormatSelector | OutputRenderer, never, never>;
|
|
3343
3480
|
//#endregion
|
|
3344
3481
|
//#region src/services/OutputRenderer.d.ts
|
|
3345
3482
|
declare const OutputRenderer_base: Context.ServiceClass<OutputRenderer, "vitest-agent/OutputRenderer", {
|
|
3346
3483
|
readonly render: (reports: ReadonlyArray<AgentReport>, format: OutputFormat, context: FormatterContext) => Effect.Effect<ReadonlyArray<RenderedOutput>>;
|
|
3347
3484
|
}>;
|
|
3348
3485
|
/** @public */
|
|
3349
|
-
declare class OutputRenderer extends OutputRenderer_base {}
|
|
3486
|
+
export declare class OutputRenderer extends OutputRenderer_base {}
|
|
3350
3487
|
//#endregion
|
|
3351
3488
|
//#region src/layers/OutputRendererLive.d.ts
|
|
3352
3489
|
/** @public */
|
|
3353
|
-
declare const OutputRendererLive: Layer.Layer<OutputRenderer, never, never>;
|
|
3490
|
+
export declare const OutputRendererLive: Layer.Layer<OutputRenderer, never, never>;
|
|
3354
3491
|
//#endregion
|
|
3355
3492
|
//#region src/layers/PathResolutionLive.d.ts
|
|
3356
3493
|
/**
|
|
@@ -3373,23 +3510,23 @@ declare const OutputRendererLive: Layer.Layer<OutputRenderer, never, never>;
|
|
|
3373
3510
|
* anchor the config file resolvers and workspace discovery.
|
|
3374
3511
|
* @public
|
|
3375
3512
|
*/
|
|
3376
|
-
declare const PathResolutionLive: (projectDir: string) => Layer.Layer<AppDirs | VitestAgentConfigFile | WorkspaceDiscovery, import("@effected/xdg").XdgEnvError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
3513
|
+
export declare const PathResolutionLive: (projectDir: string) => Layer.Layer<AppDirs | VitestAgentConfigFile | WorkspaceDiscovery, import("@effected/xdg").XdgEnvError, import("effect/FileSystem").FileSystem | import("effect/Path").Path>;
|
|
3377
3514
|
//#endregion
|
|
3378
3515
|
//#region src/services/PerClientSessionMap.d.ts
|
|
3379
3516
|
/** @public */
|
|
3380
|
-
interface MapSessionInput {
|
|
3517
|
+
export interface MapSessionInput {
|
|
3381
3518
|
readonly hostSessionId: string;
|
|
3382
3519
|
readonly conversationId: string;
|
|
3383
3520
|
readonly projectKey: string;
|
|
3384
3521
|
readonly projectDir: string;
|
|
3385
3522
|
}
|
|
3386
3523
|
/** @public */
|
|
3387
|
-
interface MapSessionOutput {
|
|
3524
|
+
export interface MapSessionOutput {
|
|
3388
3525
|
readonly mainAgentId: string;
|
|
3389
3526
|
readonly conversationId: string;
|
|
3390
3527
|
}
|
|
3391
3528
|
/** @public */
|
|
3392
|
-
interface SessionContextRow {
|
|
3529
|
+
export interface SessionContextRow {
|
|
3393
3530
|
readonly hostSessionId: string;
|
|
3394
3531
|
readonly conversationId: string;
|
|
3395
3532
|
readonly projectKey: string;
|
|
@@ -3421,7 +3558,7 @@ declare const PerClientSessionMapReader_base: Context.ServiceClass<PerClientSess
|
|
|
3421
3558
|
* methods would be a type error.
|
|
3422
3559
|
* @public
|
|
3423
3560
|
*/
|
|
3424
|
-
declare class PerClientSessionMapReader extends PerClientSessionMapReader_base {}
|
|
3561
|
+
export declare class PerClientSessionMapReader extends PerClientSessionMapReader_base {}
|
|
3425
3562
|
declare const PerClientSessionMapWriter_base: Context.ServiceClass<PerClientSessionMapWriter, "vitest-agent/PerClientSessionMapWriter", {
|
|
3426
3563
|
/**
|
|
3427
3564
|
* Upsert a conversation row. Returns the canonical conversation_id
|
|
@@ -3458,7 +3595,7 @@ declare const PerClientSessionMapWriter_base: Context.ServiceClass<PerClientSess
|
|
|
3458
3595
|
* one resolve.
|
|
3459
3596
|
* @public
|
|
3460
3597
|
*/
|
|
3461
|
-
declare class PerClientSessionMapWriter extends PerClientSessionMapWriter_base {}
|
|
3598
|
+
export declare class PerClientSessionMapWriter extends PerClientSessionMapWriter_base {}
|
|
3462
3599
|
//#endregion
|
|
3463
3600
|
//#region src/layers/PerClientSessionMapLive.d.ts
|
|
3464
3601
|
/**
|
|
@@ -3467,18 +3604,18 @@ declare class PerClientSessionMapWriter extends PerClientSessionMapWriter_base {
|
|
|
3467
3604
|
* methods and never declares write methods.
|
|
3468
3605
|
* @public
|
|
3469
3606
|
*/
|
|
3470
|
-
declare const PerClientSessionMapReaderLive: Layer.Layer<PerClientSessionMapReader, never, SqlClient>;
|
|
3607
|
+
export declare const PerClientSessionMapReaderLive: Layer.Layer<PerClientSessionMapReader, never, SqlClient>;
|
|
3471
3608
|
/**
|
|
3472
3609
|
* Read-write layer. Provides both write methods and the Reader's read
|
|
3473
3610
|
* methods so the same layer instance satisfies callers of either
|
|
3474
3611
|
* tag.
|
|
3475
3612
|
* @public
|
|
3476
3613
|
*/
|
|
3477
|
-
declare const PerClientSessionMapWriterLive: Layer.Layer<PerClientSessionMapWriter | PerClientSessionMapReader, never, SqlClient>;
|
|
3614
|
+
export declare const PerClientSessionMapWriterLive: Layer.Layer<PerClientSessionMapWriter | PerClientSessionMapReader, never, SqlClient>;
|
|
3478
3615
|
//#endregion
|
|
3479
3616
|
//#region src/services/ProjectDiscovery.d.ts
|
|
3480
3617
|
/** @public */
|
|
3481
|
-
interface TestFileEntry {
|
|
3618
|
+
export interface TestFileEntry {
|
|
3482
3619
|
readonly testFile: string;
|
|
3483
3620
|
readonly sourceFiles: ReadonlyArray<string>;
|
|
3484
3621
|
}
|
|
@@ -3487,15 +3624,15 @@ declare const ProjectDiscovery_base: Context.ServiceClass<ProjectDiscovery, "vit
|
|
|
3487
3624
|
readonly mapTestToSource: (testFile: string) => Effect.Effect<ReadonlyArray<string>, DiscoveryError>;
|
|
3488
3625
|
}>;
|
|
3489
3626
|
/** @public */
|
|
3490
|
-
declare class ProjectDiscovery extends ProjectDiscovery_base {}
|
|
3627
|
+
export declare class ProjectDiscovery extends ProjectDiscovery_base {}
|
|
3491
3628
|
//#endregion
|
|
3492
3629
|
//#region src/layers/ProjectDiscoveryLive.d.ts
|
|
3493
3630
|
/** @public */
|
|
3494
|
-
declare const ProjectDiscoveryLive: Layer.Layer<ProjectDiscovery, never, FileSystem.FileSystem>;
|
|
3631
|
+
export declare const ProjectDiscoveryLive: Layer.Layer<ProjectDiscovery, never, FileSystem.FileSystem>;
|
|
3495
3632
|
//#endregion
|
|
3496
3633
|
//#region src/layers/ProjectDiscoveryTest.d.ts
|
|
3497
3634
|
/** @public */
|
|
3498
|
-
declare const ProjectDiscoveryTest: {
|
|
3635
|
+
export declare const ProjectDiscoveryTest: {
|
|
3499
3636
|
readonly layer: (entries: ReadonlyArray<TestFileEntry>) => Layer.Layer<ProjectDiscovery>;
|
|
3500
3637
|
};
|
|
3501
3638
|
//#endregion
|
|
@@ -3512,13 +3649,13 @@ declare const ProjectDiscoveryTest: {
|
|
|
3512
3649
|
* `vitest-agent doctor`-style commands.
|
|
3513
3650
|
* @public
|
|
3514
3651
|
*/
|
|
3515
|
-
interface ResolvedIdentity {
|
|
3652
|
+
export interface ResolvedIdentity {
|
|
3516
3653
|
readonly projectKey: string;
|
|
3517
3654
|
readonly canonicalForm: string;
|
|
3518
3655
|
readonly source: ProjectIdentitySource;
|
|
3519
3656
|
}
|
|
3520
3657
|
/** @public */
|
|
3521
|
-
type ProjectIdentitySource = "explicit" | "toml" | "git-remote" | "package-repository" | "package-name";
|
|
3658
|
+
export type ProjectIdentitySource = "explicit" | "toml" | "git-remote" | "package-repository" | "package-name";
|
|
3522
3659
|
/**
|
|
3523
3660
|
* Per-source candidate values. Each is optional — an absent or empty
|
|
3524
3661
|
* value causes the resolver to fall through to the next source.
|
|
@@ -3527,7 +3664,7 @@ type ProjectIdentitySource = "explicit" | "toml" | "git-remote" | "package-repos
|
|
|
3527
3664
|
* subprocess, `package.json` read). Tests pass a literal object.
|
|
3528
3665
|
* @public
|
|
3529
3666
|
*/
|
|
3530
|
-
interface ProjectIdentityCandidates {
|
|
3667
|
+
export interface ProjectIdentityCandidates {
|
|
3531
3668
|
readonly explicit?: string;
|
|
3532
3669
|
readonly toml?: string;
|
|
3533
3670
|
readonly gitRemote?: string;
|
|
@@ -3541,7 +3678,7 @@ interface ProjectIdentityCandidates {
|
|
|
3541
3678
|
* configured `AgentPlugin({ projectId: "..." })` in `vitest.config.ts`.
|
|
3542
3679
|
* @public
|
|
3543
3680
|
*/
|
|
3544
|
-
interface ResolveProjectIdentityOptions {
|
|
3681
|
+
export interface ResolveProjectIdentityOptions {
|
|
3545
3682
|
readonly projectId?: string;
|
|
3546
3683
|
}
|
|
3547
3684
|
/**
|
|
@@ -3555,7 +3692,7 @@ interface ResolveProjectIdentityOptions {
|
|
|
3555
3692
|
* shape from `canonicalizeGitUrl`.
|
|
3556
3693
|
* @public
|
|
3557
3694
|
*/
|
|
3558
|
-
declare const resolveProjectIdentityFromCandidates: (candidates: ProjectIdentityCandidates) => ResolvedIdentity | null;
|
|
3695
|
+
export declare const resolveProjectIdentityFromCandidates: (candidates: ProjectIdentityCandidates) => ResolvedIdentity | null;
|
|
3559
3696
|
declare const ProjectIdentity_base: Context.ServiceClass<ProjectIdentity, "vitest-agent/ProjectIdentity", {
|
|
3560
3697
|
readonly resolve: (workspaceRoot: string, options?: ResolveProjectIdentityOptions) => Effect.Effect<ResolvedIdentity, ProjectIdentityNotResolvableError>;
|
|
3561
3698
|
}>;
|
|
@@ -3565,7 +3702,7 @@ declare const ProjectIdentity_base: Context.ServiceClass<ProjectIdentity, "vites
|
|
|
3565
3702
|
* pre-built `ResolvedIdentity`.
|
|
3566
3703
|
* @public
|
|
3567
3704
|
*/
|
|
3568
|
-
declare class ProjectIdentity extends ProjectIdentity_base {}
|
|
3705
|
+
export declare class ProjectIdentity extends ProjectIdentity_base {}
|
|
3569
3706
|
//#endregion
|
|
3570
3707
|
//#region src/layers/ProjectIdentityLive.d.ts
|
|
3571
3708
|
/**
|
|
@@ -3578,7 +3715,7 @@ declare class ProjectIdentity extends ProjectIdentity_base {}
|
|
|
3578
3715
|
*
|
|
3579
3716
|
* @public
|
|
3580
3717
|
*/
|
|
3581
|
-
type CandidateContext = FileSystem.FileSystem | WorkspaceDiscovery | VitestAgentConfigFile | ChildProcessSpawner.ChildProcessSpawner;
|
|
3718
|
+
export type CandidateContext = FileSystem.FileSystem | WorkspaceDiscovery | VitestAgentConfigFile | ChildProcessSpawner.ChildProcessSpawner;
|
|
3582
3719
|
/**
|
|
3583
3720
|
* Live layer that wires the resolver into real I/O. Requires
|
|
3584
3721
|
* `FileSystem`, `CommandExecutor`, `WorkspaceDiscovery`, and
|
|
@@ -3586,7 +3723,7 @@ type CandidateContext = FileSystem.FileSystem | WorkspaceDiscovery | VitestAgent
|
|
|
3586
3723
|
* `NodeServices.layer` at the entry point.
|
|
3587
3724
|
* @public
|
|
3588
3725
|
*/
|
|
3589
|
-
declare const ProjectIdentityLive: Layer.Layer<ProjectIdentity, never, CandidateContext>;
|
|
3726
|
+
export declare const ProjectIdentityLive: Layer.Layer<ProjectIdentity, never, CandidateContext>;
|
|
3590
3727
|
/**
|
|
3591
3728
|
* Build a Test layer that returns a fixed `ResolvedIdentity` (or
|
|
3592
3729
|
* fails with `ProjectIdentityNotResolvableError`). Use in unit tests
|
|
@@ -3594,7 +3731,7 @@ declare const ProjectIdentityLive: Layer.Layer<ProjectIdentity, never, Candidate
|
|
|
3594
3731
|
* services.
|
|
3595
3732
|
* @public
|
|
3596
3733
|
*/
|
|
3597
|
-
declare const ProjectIdentityTest: (result: ResolvedIdentity | ProjectIdentityNotResolvableError) => Layer.Layer<ProjectIdentity, never, never>;
|
|
3734
|
+
export declare const ProjectIdentityTest: (result: ResolvedIdentity | ProjectIdentityNotResolvableError) => Layer.Layer<ProjectIdentity, never, never>;
|
|
3598
3735
|
//#endregion
|
|
3599
3736
|
//#region src/services/RunContext.d.ts
|
|
3600
3737
|
declare const RunContext_base: Schema.Class<RunContext, Schema.Struct<{
|
|
@@ -3618,7 +3755,7 @@ declare const RunContext_base: Schema.Class<RunContext, Schema.Struct<{
|
|
|
3618
3755
|
* and `Schema.encode(...)` for the SQLite row mapping.
|
|
3619
3756
|
* @public
|
|
3620
3757
|
*/
|
|
3621
|
-
declare class RunContext extends RunContext_base {}
|
|
3758
|
+
export declare class RunContext extends RunContext_base {}
|
|
3622
3759
|
declare const AgentContext_base: Schema.Class<AgentContext, Schema.Struct<{
|
|
3623
3760
|
readonly startGitBranch: Schema.NullOr<Schema.String>;
|
|
3624
3761
|
readonly startGitCommitSha: Schema.NullOr<Schema.String>;
|
|
@@ -3630,7 +3767,7 @@ declare const AgentContext_base: Schema.Class<AgentContext, Schema.Struct<{
|
|
|
3630
3767
|
* dirty-tree state and upstream tracking are per-run concerns.
|
|
3631
3768
|
* @public
|
|
3632
3769
|
*/
|
|
3633
|
-
declare class AgentContext extends AgentContext_base {}
|
|
3770
|
+
export declare class AgentContext extends AgentContext_base {}
|
|
3634
3771
|
declare const RunContext$_base: Context.ServiceClass<RunContext$, "vitest-agent/RunContextService", {
|
|
3635
3772
|
readonly captureRunContext: (cwd: string) => Effect.Effect<RunContext>;
|
|
3636
3773
|
readonly captureAgentContext: (cwd: string) => Effect.Effect<AgentContext>;
|
|
@@ -3640,7 +3777,7 @@ declare const RunContext$_base: Context.ServiceClass<RunContext$, "vitest-agent/
|
|
|
3640
3777
|
* returns whatever the test fixture passes.
|
|
3641
3778
|
* @public
|
|
3642
3779
|
*/
|
|
3643
|
-
declare class RunContext$ extends RunContext$_base {}
|
|
3780
|
+
export declare class RunContext$ extends RunContext$_base {}
|
|
3644
3781
|
/**
|
|
3645
3782
|
* Re-export the service tag under a less-collision-prone name. The
|
|
3646
3783
|
* `RunContext` Schema.Class above shares its symbol-name with the
|
|
@@ -3649,9 +3786,9 @@ declare class RunContext$ extends RunContext$_base {}
|
|
|
3649
3786
|
*
|
|
3650
3787
|
* @public
|
|
3651
3788
|
*/
|
|
3652
|
-
declare const RunContextService: typeof RunContext$;
|
|
3789
|
+
export declare const RunContextService: typeof RunContext$;
|
|
3653
3790
|
/** @public */
|
|
3654
|
-
type RunContextService = RunContext$;
|
|
3791
|
+
export type RunContextService = RunContext$;
|
|
3655
3792
|
//#endregion
|
|
3656
3793
|
//#region src/layers/RunContextLive.d.ts
|
|
3657
3794
|
/**
|
|
@@ -3662,13 +3799,13 @@ type RunContextService = RunContext$;
|
|
|
3662
3799
|
* constructs.
|
|
3663
3800
|
* @public
|
|
3664
3801
|
*/
|
|
3665
|
-
declare const RunContextLive: Layer.Layer<RunContextService, never, ChildProcessSpawner.ChildProcessSpawner>;
|
|
3802
|
+
export declare const RunContextLive: Layer.Layer<RunContextService, never, ChildProcessSpawner.ChildProcessSpawner>;
|
|
3666
3803
|
/**
|
|
3667
3804
|
* Build a Test layer that returns fixed `RunContext` and
|
|
3668
3805
|
* `AgentContext` values regardless of `cwd`.
|
|
3669
3806
|
* @public
|
|
3670
3807
|
*/
|
|
3671
|
-
declare const RunContextTest: (fixture: {
|
|
3808
|
+
export declare const RunContextTest: (fixture: {
|
|
3672
3809
|
readonly runContext: RunContext;
|
|
3673
3810
|
readonly agentContext: AgentContext;
|
|
3674
3811
|
}) => Layer.Layer<RunContextService, never, never>;
|
|
@@ -3688,7 +3825,7 @@ interface FormatTriageOptions {
|
|
|
3688
3825
|
* replaced with empty defaults so the caller is guaranteed a string.
|
|
3689
3826
|
* @public
|
|
3690
3827
|
*/
|
|
3691
|
-
declare const formatTriageEffect: (options?: FormatTriageOptions) => Effect.Effect<string, never, DataReader>;
|
|
3828
|
+
export declare const formatTriageEffect: (options?: FormatTriageOptions) => Effect.Effect<string, never, DataReader>;
|
|
3692
3829
|
//#endregion
|
|
3693
3830
|
//#region src/lib/format-wrapup.d.ts
|
|
3694
3831
|
/** @public */
|
|
@@ -3701,7 +3838,7 @@ interface FormatWrapupOptions {
|
|
|
3701
3838
|
readonly userPromptHint?: string;
|
|
3702
3839
|
}
|
|
3703
3840
|
/** @public */
|
|
3704
|
-
declare const formatWrapupEffect: (options: FormatWrapupOptions) => Effect.Effect<string, never, DataReader>;
|
|
3841
|
+
export declare const formatWrapupEffect: (options: FormatWrapupOptions) => Effect.Effect<string, never, DataReader>;
|
|
3705
3842
|
//#endregion
|
|
3706
3843
|
//#region src/migrations/0001_initial.d.ts
|
|
3707
3844
|
/** @internal */
|
|
@@ -3730,11 +3867,11 @@ declare const migration$2: Effect.Effect<void, import("effect/unstable/sql/SqlEr
|
|
|
3730
3867
|
//#endregion
|
|
3731
3868
|
//#region src/schemas/ChannelEvent.d.ts
|
|
3732
3869
|
/** @public */
|
|
3733
|
-
declare const SessionOutcome: Schema.Literals<readonly ["succeeded", "blocked", "abandoned"]>;
|
|
3870
|
+
export declare const SessionOutcome: Schema.Literals<readonly ["succeeded", "blocked", "abandoned"]>;
|
|
3734
3871
|
/** @public */
|
|
3735
|
-
type SessionOutcome = typeof SessionOutcome.Type;
|
|
3872
|
+
export type SessionOutcome = typeof SessionOutcome.Type;
|
|
3736
3873
|
/** @public */
|
|
3737
|
-
declare const GoalsReadyEvent: Schema.Struct<{
|
|
3874
|
+
export declare const GoalsReadyEvent: Schema.Struct<{
|
|
3738
3875
|
readonly type: Schema.Literal<"goals_ready">;
|
|
3739
3876
|
readonly sessionId: Schema.Number;
|
|
3740
3877
|
readonly goals: Schema.$Array<Schema.Struct<{
|
|
@@ -3744,9 +3881,9 @@ declare const GoalsReadyEvent: Schema.Struct<{
|
|
|
3744
3881
|
}>>;
|
|
3745
3882
|
}>;
|
|
3746
3883
|
/** @public */
|
|
3747
|
-
type GoalsReadyEvent = typeof GoalsReadyEvent.Type;
|
|
3884
|
+
export type GoalsReadyEvent = typeof GoalsReadyEvent.Type;
|
|
3748
3885
|
/** @public */
|
|
3749
|
-
declare const GoalAddedEvent: Schema.Struct<{
|
|
3886
|
+
export declare const GoalAddedEvent: Schema.Struct<{
|
|
3750
3887
|
readonly type: Schema.Literal<"goal_added">;
|
|
3751
3888
|
readonly sessionId: Schema.Number;
|
|
3752
3889
|
readonly goal: Schema.Struct<{
|
|
@@ -3756,35 +3893,35 @@ declare const GoalAddedEvent: Schema.Struct<{
|
|
|
3756
3893
|
}>;
|
|
3757
3894
|
}>;
|
|
3758
3895
|
/** @public */
|
|
3759
|
-
type GoalAddedEvent = typeof GoalAddedEvent.Type;
|
|
3896
|
+
export type GoalAddedEvent = typeof GoalAddedEvent.Type;
|
|
3760
3897
|
/** @public */
|
|
3761
|
-
declare const GoalStartedEvent: Schema.Struct<{
|
|
3898
|
+
export declare const GoalStartedEvent: Schema.Struct<{
|
|
3762
3899
|
readonly type: Schema.Literal<"goal_started">;
|
|
3763
3900
|
readonly sessionId: Schema.Number;
|
|
3764
3901
|
readonly goalId: Schema.Number;
|
|
3765
3902
|
}>;
|
|
3766
3903
|
/** @public */
|
|
3767
|
-
type GoalStartedEvent = typeof GoalStartedEvent.Type;
|
|
3904
|
+
export type GoalStartedEvent = typeof GoalStartedEvent.Type;
|
|
3768
3905
|
/** @public */
|
|
3769
|
-
declare const GoalCompletedEvent: Schema.Struct<{
|
|
3906
|
+
export declare const GoalCompletedEvent: Schema.Struct<{
|
|
3770
3907
|
readonly type: Schema.Literal<"goal_completed">;
|
|
3771
3908
|
readonly sessionId: Schema.Number;
|
|
3772
3909
|
readonly goalId: Schema.Number;
|
|
3773
3910
|
readonly behaviorIds: Schema.$Array<Schema.Number>;
|
|
3774
3911
|
}>;
|
|
3775
3912
|
/** @public */
|
|
3776
|
-
type GoalCompletedEvent = typeof GoalCompletedEvent.Type;
|
|
3913
|
+
export type GoalCompletedEvent = typeof GoalCompletedEvent.Type;
|
|
3777
3914
|
/** @public */
|
|
3778
|
-
declare const GoalAbandonedEvent: Schema.Struct<{
|
|
3915
|
+
export declare const GoalAbandonedEvent: Schema.Struct<{
|
|
3779
3916
|
readonly type: Schema.Literal<"goal_abandoned">;
|
|
3780
3917
|
readonly sessionId: Schema.Number;
|
|
3781
3918
|
readonly goalId: Schema.Number;
|
|
3782
3919
|
readonly reason: Schema.String;
|
|
3783
3920
|
}>;
|
|
3784
3921
|
/** @public */
|
|
3785
|
-
type GoalAbandonedEvent = typeof GoalAbandonedEvent.Type;
|
|
3922
|
+
export type GoalAbandonedEvent = typeof GoalAbandonedEvent.Type;
|
|
3786
3923
|
/** @public */
|
|
3787
|
-
declare const BehaviorsReadyEvent: Schema.Struct<{
|
|
3924
|
+
export declare const BehaviorsReadyEvent: Schema.Struct<{
|
|
3788
3925
|
readonly type: Schema.Literal<"behaviors_ready">;
|
|
3789
3926
|
readonly sessionId: Schema.Number;
|
|
3790
3927
|
readonly goalId: Schema.Number;
|
|
@@ -3795,9 +3932,9 @@ declare const BehaviorsReadyEvent: Schema.Struct<{
|
|
|
3795
3932
|
}>>;
|
|
3796
3933
|
}>;
|
|
3797
3934
|
/** @public */
|
|
3798
|
-
type BehaviorsReadyEvent = typeof BehaviorsReadyEvent.Type;
|
|
3935
|
+
export type BehaviorsReadyEvent = typeof BehaviorsReadyEvent.Type;
|
|
3799
3936
|
/** @public */
|
|
3800
|
-
declare const BehaviorAddedEvent: Schema.Struct<{
|
|
3937
|
+
export declare const BehaviorAddedEvent: Schema.Struct<{
|
|
3801
3938
|
readonly type: Schema.Literal<"behavior_added">;
|
|
3802
3939
|
readonly sessionId: Schema.Number;
|
|
3803
3940
|
readonly goalId: Schema.Number;
|
|
@@ -3808,18 +3945,18 @@ declare const BehaviorAddedEvent: Schema.Struct<{
|
|
|
3808
3945
|
}>;
|
|
3809
3946
|
}>;
|
|
3810
3947
|
/** @public */
|
|
3811
|
-
type BehaviorAddedEvent = typeof BehaviorAddedEvent.Type;
|
|
3948
|
+
export type BehaviorAddedEvent = typeof BehaviorAddedEvent.Type;
|
|
3812
3949
|
/** @public */
|
|
3813
|
-
declare const BehaviorStartedEvent: Schema.Struct<{
|
|
3950
|
+
export declare const BehaviorStartedEvent: Schema.Struct<{
|
|
3814
3951
|
readonly type: Schema.Literal<"behavior_started">;
|
|
3815
3952
|
readonly sessionId: Schema.Number;
|
|
3816
3953
|
readonly goalId: Schema.Number;
|
|
3817
3954
|
readonly behaviorId: Schema.Number;
|
|
3818
3955
|
}>;
|
|
3819
3956
|
/** @public */
|
|
3820
|
-
type BehaviorStartedEvent = typeof BehaviorStartedEvent.Type;
|
|
3957
|
+
export type BehaviorStartedEvent = typeof BehaviorStartedEvent.Type;
|
|
3821
3958
|
/** @public */
|
|
3822
|
-
declare const PhaseTransitionEvent: Schema.Struct<{
|
|
3959
|
+
export declare const PhaseTransitionEvent: Schema.Struct<{
|
|
3823
3960
|
readonly type: Schema.Literal<"phase_transition">;
|
|
3824
3961
|
readonly sessionId: Schema.Number;
|
|
3825
3962
|
readonly goalId: Schema.Number;
|
|
@@ -3828,18 +3965,18 @@ declare const PhaseTransitionEvent: Schema.Struct<{
|
|
|
3828
3965
|
readonly to: Schema.Literals<readonly ["spike", "red", "red.triangulate", "green", "green.fake-it", "refactor", "extended-red", "green-without-red"]>;
|
|
3829
3966
|
}>;
|
|
3830
3967
|
/** @public */
|
|
3831
|
-
type PhaseTransitionEvent = typeof PhaseTransitionEvent.Type;
|
|
3968
|
+
export type PhaseTransitionEvent = typeof PhaseTransitionEvent.Type;
|
|
3832
3969
|
/** @public */
|
|
3833
|
-
declare const BehaviorCompletedEvent: Schema.Struct<{
|
|
3970
|
+
export declare const BehaviorCompletedEvent: Schema.Struct<{
|
|
3834
3971
|
readonly type: Schema.Literal<"behavior_completed">;
|
|
3835
3972
|
readonly sessionId: Schema.Number;
|
|
3836
3973
|
readonly goalId: Schema.Number;
|
|
3837
3974
|
readonly behaviorId: Schema.Number;
|
|
3838
3975
|
}>;
|
|
3839
3976
|
/** @public */
|
|
3840
|
-
type BehaviorCompletedEvent = typeof BehaviorCompletedEvent.Type;
|
|
3977
|
+
export type BehaviorCompletedEvent = typeof BehaviorCompletedEvent.Type;
|
|
3841
3978
|
/** @public */
|
|
3842
|
-
declare const BehaviorAbandonedEvent: Schema.Struct<{
|
|
3979
|
+
export declare const BehaviorAbandonedEvent: Schema.Struct<{
|
|
3843
3980
|
readonly type: Schema.Literal<"behavior_abandoned">;
|
|
3844
3981
|
readonly sessionId: Schema.Number;
|
|
3845
3982
|
readonly goalId: Schema.Number;
|
|
@@ -3847,9 +3984,9 @@ declare const BehaviorAbandonedEvent: Schema.Struct<{
|
|
|
3847
3984
|
readonly reason: Schema.String;
|
|
3848
3985
|
}>;
|
|
3849
3986
|
/** @public */
|
|
3850
|
-
type BehaviorAbandonedEvent = typeof BehaviorAbandonedEvent.Type;
|
|
3987
|
+
export type BehaviorAbandonedEvent = typeof BehaviorAbandonedEvent.Type;
|
|
3851
3988
|
/** @public */
|
|
3852
|
-
declare const BlockedEvent: Schema.Struct<{
|
|
3989
|
+
export declare const BlockedEvent: Schema.Struct<{
|
|
3853
3990
|
readonly type: Schema.Literal<"blocked">;
|
|
3854
3991
|
readonly sessionId: Schema.Number;
|
|
3855
3992
|
readonly goalId: Schema.Number;
|
|
@@ -3858,18 +3995,18 @@ declare const BlockedEvent: Schema.Struct<{
|
|
|
3858
3995
|
readonly failureSignatureHash: Schema.optional<Schema.String>;
|
|
3859
3996
|
}>;
|
|
3860
3997
|
/** @public */
|
|
3861
|
-
type BlockedEvent = typeof BlockedEvent.Type;
|
|
3998
|
+
export type BlockedEvent = typeof BlockedEvent.Type;
|
|
3862
3999
|
/** @public */
|
|
3863
|
-
declare const SessionCompleteEvent: Schema.Struct<{
|
|
4000
|
+
export declare const SessionCompleteEvent: Schema.Struct<{
|
|
3864
4001
|
readonly type: Schema.Literal<"session_complete">;
|
|
3865
4002
|
readonly sessionId: Schema.Number;
|
|
3866
4003
|
readonly goalIds: Schema.$Array<Schema.Number>;
|
|
3867
4004
|
readonly outcome: Schema.Literals<readonly ["succeeded", "blocked", "abandoned"]>;
|
|
3868
4005
|
}>;
|
|
3869
4006
|
/** @public */
|
|
3870
|
-
type SessionCompleteEvent = typeof SessionCompleteEvent.Type;
|
|
4007
|
+
export type SessionCompleteEvent = typeof SessionCompleteEvent.Type;
|
|
3871
4008
|
/** @public */
|
|
3872
|
-
declare const ChannelEvent: Schema.Union<readonly [Schema.Struct<{
|
|
4009
|
+
export declare const ChannelEvent: Schema.Union<readonly [Schema.Struct<{
|
|
3873
4010
|
readonly type: Schema.Literal<"goals_ready">;
|
|
3874
4011
|
readonly sessionId: Schema.Number;
|
|
3875
4012
|
readonly goals: Schema.$Array<Schema.Struct<{
|
|
@@ -3954,7 +4091,7 @@ declare const ChannelEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
3954
4091
|
readonly outcome: Schema.Literals<readonly ["succeeded", "blocked", "abandoned"]>;
|
|
3955
4092
|
}>]>;
|
|
3956
4093
|
/** @public */
|
|
3957
|
-
type ChannelEvent = typeof ChannelEvent.Type;
|
|
4094
|
+
export type ChannelEvent = typeof ChannelEvent.Type;
|
|
3958
4095
|
/**
|
|
3959
4096
|
* Event types whose `goalId` and `sessionId` should be resolved
|
|
3960
4097
|
* server-side from `behaviorId` (per spec: "not trusting the
|
|
@@ -3962,9 +4099,9 @@ type ChannelEvent = typeof ChannelEvent.Type;
|
|
|
3962
4099
|
* which subset to enrich vs pass through.
|
|
3963
4100
|
* @public
|
|
3964
4101
|
*/
|
|
3965
|
-
declare const BehaviorScopedEventTypes: readonly ["behavior_started", "phase_transition", "behavior_completed", "behavior_abandoned", "blocked"];
|
|
4102
|
+
export declare const BehaviorScopedEventTypes: readonly ["behavior_started", "phase_transition", "behavior_completed", "behavior_abandoned", "blocked"];
|
|
3966
4103
|
/** @public */
|
|
3967
|
-
type BehaviorScopedEventType = (typeof BehaviorScopedEventTypes)[number];
|
|
4104
|
+
export type BehaviorScopedEventType = (typeof BehaviorScopedEventTypes)[number];
|
|
3968
4105
|
//#endregion
|
|
3969
4106
|
//#region src/schemas/ConsoleLeaks.d.ts
|
|
3970
4107
|
/**
|
|
@@ -3972,7 +4109,7 @@ type BehaviorScopedEventType = (typeof BehaviorScopedEventTypes)[number];
|
|
|
3972
4109
|
* (one `console.*` call), not lines.
|
|
3973
4110
|
* @public
|
|
3974
4111
|
*/
|
|
3975
|
-
declare const ConsoleLeakFile: Schema.Struct<{
|
|
4112
|
+
export declare const ConsoleLeakFile: Schema.Struct<{
|
|
3976
4113
|
readonly file: Schema.String;
|
|
3977
4114
|
readonly stdout: Schema.Number;
|
|
3978
4115
|
readonly stderr: Schema.Number;
|
|
@@ -3980,13 +4117,31 @@ declare const ConsoleLeakFile: Schema.Struct<{
|
|
|
3980
4117
|
readonly sample: Schema.optional<Schema.String>;
|
|
3981
4118
|
}>;
|
|
3982
4119
|
/** @public */
|
|
3983
|
-
type ConsoleLeakFile = typeof ConsoleLeakFile.Type;
|
|
4120
|
+
export type ConsoleLeakFile = typeof ConsoleLeakFile.Type;
|
|
4121
|
+
/**
|
|
4122
|
+
* Summary of console output logged inside tests that did NOT pass. Kept
|
|
4123
|
+
* separate from `total`/`byFile` so it can never be mistaken for a leak in a
|
|
4124
|
+
* passing test — assertion-failure logging that routes through `console.*`
|
|
4125
|
+
* (common with logger-backed assertion libraries) would otherwise camouflage
|
|
4126
|
+
* genuine leaks on every red run.
|
|
4127
|
+
* @public
|
|
4128
|
+
*/
|
|
4129
|
+
export declare const ConsoleLeaksFromFailingTests: Schema.Struct<{
|
|
4130
|
+
readonly total: Schema.Number;
|
|
4131
|
+
readonly files: Schema.Number;
|
|
4132
|
+
}>;
|
|
4133
|
+
/** @public */
|
|
4134
|
+
export type ConsoleLeaksFromFailingTests = typeof ConsoleLeaksFromFailingTests.Type;
|
|
3984
4135
|
/**
|
|
3985
4136
|
* Aggregate stray-console-output signal for a single test run. Omitted from
|
|
3986
|
-
* a report entirely when the run produced no user console output
|
|
4137
|
+
* a report entirely when the run produced no user console output at all
|
|
4138
|
+
* (neither non-failing nor failing-test writes). `total`/`byFile` count only
|
|
4139
|
+
* output from tests that did not fail; `fromFailingTests`, when present,
|
|
4140
|
+
* summarizes the output Vitest captured from failing tests so it stays
|
|
4141
|
+
* visible without polluting the actionable leak signal (issue #263).
|
|
3987
4142
|
* @public
|
|
3988
4143
|
*/
|
|
3989
|
-
declare const ConsoleLeaks: Schema.Struct<{
|
|
4144
|
+
export declare const ConsoleLeaks: Schema.Struct<{
|
|
3990
4145
|
readonly total: Schema.Number;
|
|
3991
4146
|
readonly byFile: Schema.$Array<Schema.Struct<{
|
|
3992
4147
|
readonly file: Schema.String;
|
|
@@ -3996,9 +4151,13 @@ declare const ConsoleLeaks: Schema.Struct<{
|
|
|
3996
4151
|
readonly sample: Schema.optional<Schema.String>;
|
|
3997
4152
|
}>>;
|
|
3998
4153
|
readonly truncated: Schema.optional<Schema.Boolean>;
|
|
4154
|
+
readonly fromFailingTests: Schema.optional<Schema.Struct<{
|
|
4155
|
+
readonly total: Schema.Number;
|
|
4156
|
+
readonly files: Schema.Number;
|
|
4157
|
+
}>>;
|
|
3999
4158
|
}>;
|
|
4000
4159
|
/** @public */
|
|
4001
|
-
type ConsoleLeaks = typeof ConsoleLeaks.Type;
|
|
4160
|
+
export type ConsoleLeaks = typeof ConsoleLeaks.Type;
|
|
4002
4161
|
//#endregion
|
|
4003
4162
|
//#region src/schemas/CoverageLevel.d.ts
|
|
4004
4163
|
declare const CoverageLevel_base: Schema.Class<CoverageLevel, Schema.Struct<{
|
|
@@ -4013,7 +4172,7 @@ declare const CoverageLevel_base: Schema.Class<CoverageLevel, Schema.Struct<{
|
|
|
4013
4172
|
* perFile flag. Extend this class to define custom named presets.
|
|
4014
4173
|
* @public
|
|
4015
4174
|
*/
|
|
4016
|
-
declare class CoverageLevel extends CoverageLevel_base {
|
|
4175
|
+
export declare class CoverageLevel extends CoverageLevel_base {
|
|
4017
4176
|
/** No enforcement — all metrics at 0%. */
|
|
4018
4177
|
static readonly none: CoverageLevel;
|
|
4019
4178
|
/** Minimal coverage bar — all metrics at 50%. */
|
|
@@ -4044,24 +4203,24 @@ declare class CoverageLevel extends CoverageLevel_base {
|
|
|
4044
4203
|
}
|
|
4045
4204
|
/** The named preset identifiers. * @public
|
|
4046
4205
|
*/
|
|
4047
|
-
type CoverageLevelName = "none" | "basic" | "standard" | "strict" | "full";
|
|
4206
|
+
export type CoverageLevelName = "none" | "basic" | "standard" | "strict" | "full";
|
|
4048
4207
|
/** Accepted input forms: a preset name string or a CoverageLevel instance. * @public
|
|
4049
4208
|
*/
|
|
4050
|
-
type CoverageInput = CoverageLevelName | CoverageLevel;
|
|
4209
|
+
export type CoverageInput = CoverageLevelName | CoverageLevel;
|
|
4051
4210
|
/**
|
|
4052
4211
|
* Resolves a CoverageInput (preset name or CoverageLevel instance) to a
|
|
4053
4212
|
* CoverageLevel. When input is undefined, returns the named fallback preset.
|
|
4054
4213
|
* Throws if a string is provided that does not match a known preset name.
|
|
4055
4214
|
* @public
|
|
4056
4215
|
*/
|
|
4057
|
-
declare function resolveCoverageInput(input: CoverageInput | undefined, fallback: CoverageLevelName): CoverageLevel;
|
|
4216
|
+
export declare function resolveCoverageInput(input: CoverageInput | undefined, fallback: CoverageLevelName): CoverageLevel;
|
|
4058
4217
|
/**
|
|
4059
4218
|
* Validates that coverageTargets are not below coverageThresholds for any
|
|
4060
4219
|
* metric, and that both agree on perFile. Throws a descriptive Error on
|
|
4061
4220
|
* any violation.
|
|
4062
4221
|
* @public
|
|
4063
4222
|
*/
|
|
4064
|
-
declare function validateCoverageConfig(thresholds: CoverageLevel, targets: CoverageLevel): void;
|
|
4223
|
+
export declare function validateCoverageConfig(thresholds: CoverageLevel, targets: CoverageLevel): void;
|
|
4065
4224
|
//#endregion
|
|
4066
4225
|
//#region src/schemas/CoverageTargets.d.ts
|
|
4067
4226
|
/**
|
|
@@ -4069,7 +4228,7 @@ declare function validateCoverageConfig(thresholds: CoverageLevel, targets: Cove
|
|
|
4069
4228
|
* numeric targets per metric and the `100: true` shortcut.
|
|
4070
4229
|
* @public
|
|
4071
4230
|
*/
|
|
4072
|
-
declare const CoverageTargetsMetrics: Schema.Struct<{
|
|
4231
|
+
export declare const CoverageTargetsMetrics: Schema.Struct<{
|
|
4073
4232
|
readonly lines: Schema.optional<Schema.Number>;
|
|
4074
4233
|
readonly functions: Schema.optional<Schema.Number>;
|
|
4075
4234
|
readonly branches: Schema.optional<Schema.Number>;
|
|
@@ -4077,7 +4236,7 @@ declare const CoverageTargetsMetrics: Schema.Struct<{
|
|
|
4077
4236
|
readonly 100: Schema.optional<Schema.Literal<true>>;
|
|
4078
4237
|
}>;
|
|
4079
4238
|
/** @public */
|
|
4080
|
-
type CoverageTargetsMetrics = typeof CoverageTargetsMetrics.Type;
|
|
4239
|
+
export type CoverageTargetsMetrics = typeof CoverageTargetsMetrics.Type;
|
|
4081
4240
|
/**
|
|
4082
4241
|
* Typed schema for the coverageTargets option.
|
|
4083
4242
|
*
|
|
@@ -4093,7 +4252,7 @@ type CoverageTargetsMetrics = typeof CoverageTargetsMetrics.Type;
|
|
|
4093
4252
|
* at key `"100"`.
|
|
4094
4253
|
* @public
|
|
4095
4254
|
*/
|
|
4096
|
-
declare const CoverageTargets: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Number, Schema.Literal<true>, Schema.Struct<{
|
|
4255
|
+
export declare const CoverageTargets: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Number, Schema.Literal<true>, Schema.Struct<{
|
|
4097
4256
|
readonly lines: Schema.optional<Schema.Number>;
|
|
4098
4257
|
readonly functions: Schema.optional<Schema.Number>;
|
|
4099
4258
|
readonly branches: Schema.optional<Schema.Number>;
|
|
@@ -4101,7 +4260,7 @@ declare const CoverageTargets: Schema.$Record<Schema.String, Schema.Union<readon
|
|
|
4101
4260
|
readonly 100: Schema.optional<Schema.Literal<true>>;
|
|
4102
4261
|
}>]>>;
|
|
4103
4262
|
/** @public */
|
|
4104
|
-
type CoverageTargets = typeof CoverageTargets.Type;
|
|
4263
|
+
export type CoverageTargets = typeof CoverageTargets.Type;
|
|
4105
4264
|
//#endregion
|
|
4106
4265
|
//#region src/schemas/Options.d.ts
|
|
4107
4266
|
/**
|
|
@@ -4119,13 +4278,13 @@ type CoverageTargets = typeof CoverageTargets.Type;
|
|
|
4119
4278
|
* annotations writer ships.
|
|
4120
4279
|
* @public
|
|
4121
4280
|
*/
|
|
4122
|
-
declare const ConsoleOutputs: Schema.Struct<{
|
|
4281
|
+
export declare const ConsoleOutputs: Schema.Struct<{
|
|
4123
4282
|
readonly human: Schema.optional<Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>>;
|
|
4124
4283
|
readonly agent: Schema.optional<Schema.Literals<readonly ["passthrough", "silent", "agent"]>>;
|
|
4125
4284
|
readonly ci: Schema.optional<Schema.Literals<readonly ["passthrough", "silent", "ci-annotations"]>>;
|
|
4126
4285
|
}>;
|
|
4127
4286
|
/** @public */
|
|
4128
|
-
type ConsoleOutputs = typeof ConsoleOutputs.Type;
|
|
4287
|
+
export type ConsoleOutputs = typeof ConsoleOutputs.Type;
|
|
4129
4288
|
/**
|
|
4130
4289
|
* The 2.0 user-facing options for `AgentPlugin`.
|
|
4131
4290
|
*
|
|
@@ -4135,7 +4294,7 @@ type ConsoleOutputs = typeof ConsoleOutputs.Type;
|
|
|
4135
4294
|
* so the schema-decodable struct carries the three data-shaped fields.
|
|
4136
4295
|
* @public
|
|
4137
4296
|
*/
|
|
4138
|
-
declare const AgentPluginOptions: Schema.Struct<{
|
|
4297
|
+
export declare const AgentPluginOptions: Schema.Struct<{
|
|
4139
4298
|
readonly console: Schema.optional<Schema.Struct<{
|
|
4140
4299
|
readonly human: Schema.optional<Schema.Literals<readonly ["passthrough", "silent", "stream", "agent"]>>;
|
|
4141
4300
|
readonly agent: Schema.optional<Schema.Literals<readonly ["passthrough", "silent", "agent"]>>;
|
|
@@ -4153,7 +4312,7 @@ declare const AgentPluginOptions: Schema.Struct<{
|
|
|
4153
4312
|
}>]>>;
|
|
4154
4313
|
}>;
|
|
4155
4314
|
/** @public */
|
|
4156
|
-
type AgentPluginOptions = typeof AgentPluginOptions.Type;
|
|
4315
|
+
export type AgentPluginOptions = typeof AgentPluginOptions.Type;
|
|
4157
4316
|
/**
|
|
4158
4317
|
* Reporter-implementation options.
|
|
4159
4318
|
*
|
|
@@ -4165,16 +4324,16 @@ type AgentPluginOptions = typeof AgentPluginOptions.Type;
|
|
|
4165
4324
|
* (currently only `projectFilter` for per-project scoping).
|
|
4166
4325
|
* @public
|
|
4167
4326
|
*/
|
|
4168
|
-
declare const AgentReporterOptions: Schema.Struct<{
|
|
4327
|
+
export declare const AgentReporterOptions: Schema.Struct<{
|
|
4169
4328
|
/** Set by the plugin per-project. Filters reports to one project. */
|
|
4170
4329
|
readonly projectFilter: Schema.optional<Schema.String>;
|
|
4171
4330
|
}>;
|
|
4172
4331
|
/** @public */
|
|
4173
|
-
type AgentReporterOptions = typeof AgentReporterOptions.Type;
|
|
4332
|
+
export type AgentReporterOptions = typeof AgentReporterOptions.Type;
|
|
4174
4333
|
//#endregion
|
|
4175
4334
|
//#region src/schemas/turns/FileEditPayload.d.ts
|
|
4176
4335
|
/** @public */
|
|
4177
|
-
declare const FileEditPayload: Schema.Struct<{
|
|
4336
|
+
export declare const FileEditPayload: Schema.Struct<{
|
|
4178
4337
|
readonly type: Schema.Literal<"file_edit">;
|
|
4179
4338
|
readonly file_path: Schema.String;
|
|
4180
4339
|
readonly edit_kind: Schema.Literals<readonly ["write", "edit", "multi_edit"]>;
|
|
@@ -4183,55 +4342,55 @@ declare const FileEditPayload: Schema.Struct<{
|
|
|
4183
4342
|
readonly diff: Schema.optional<Schema.String>;
|
|
4184
4343
|
}>;
|
|
4185
4344
|
/** @public */
|
|
4186
|
-
type FileEditPayload = typeof FileEditPayload.Type;
|
|
4345
|
+
export type FileEditPayload = typeof FileEditPayload.Type;
|
|
4187
4346
|
//#endregion
|
|
4188
4347
|
//#region src/schemas/turns/HookFirePayload.d.ts
|
|
4189
4348
|
/** @public */
|
|
4190
|
-
declare const HookFirePayload: Schema.Struct<{
|
|
4349
|
+
export declare const HookFirePayload: Schema.Struct<{
|
|
4191
4350
|
readonly type: Schema.Literal<"hook_fire">;
|
|
4192
4351
|
readonly hook_kind: Schema.Literals<readonly ["SessionStart", "SessionEnd", "Stop", "StopFailure", "SubagentStart", "SubagentStop", "PreCompact", "PostCompact", "PreToolUse", "PostToolUse", "PostToolUseFailure", "UserPromptSubmit", "FileChanged"]>;
|
|
4193
4352
|
readonly chat_id: Schema.optional<Schema.String>;
|
|
4194
4353
|
readonly previous_record_failures: Schema.optional<Schema.$Array<Schema.String>>;
|
|
4195
4354
|
}>;
|
|
4196
4355
|
/** @public */
|
|
4197
|
-
type HookFirePayload = typeof HookFirePayload.Type;
|
|
4356
|
+
export type HookFirePayload = typeof HookFirePayload.Type;
|
|
4198
4357
|
//#endregion
|
|
4199
4358
|
//#region src/schemas/turns/HypothesisPayload.d.ts
|
|
4200
4359
|
/** @public */
|
|
4201
|
-
declare const HypothesisPayload: Schema.Struct<{
|
|
4360
|
+
export declare const HypothesisPayload: Schema.Struct<{
|
|
4202
4361
|
readonly type: Schema.Literal<"hypothesis">;
|
|
4203
4362
|
readonly content: Schema.String;
|
|
4204
4363
|
readonly cited_test_error_id: Schema.optional<Schema.Number>;
|
|
4205
4364
|
readonly cited_stack_frame_id: Schema.optional<Schema.Number>;
|
|
4206
4365
|
}>;
|
|
4207
4366
|
/** @public */
|
|
4208
|
-
type HypothesisPayload = typeof HypothesisPayload.Type;
|
|
4367
|
+
export type HypothesisPayload = typeof HypothesisPayload.Type;
|
|
4209
4368
|
//#endregion
|
|
4210
4369
|
//#region src/schemas/turns/NotePayload.d.ts
|
|
4211
4370
|
/** @public */
|
|
4212
|
-
declare const NotePayload: Schema.Struct<{
|
|
4371
|
+
export declare const NotePayload: Schema.Struct<{
|
|
4213
4372
|
readonly type: Schema.Literal<"note">;
|
|
4214
4373
|
readonly scope: Schema.String;
|
|
4215
4374
|
readonly title: Schema.optional<Schema.String>;
|
|
4216
4375
|
readonly content: Schema.String;
|
|
4217
4376
|
}>;
|
|
4218
4377
|
/** @public */
|
|
4219
|
-
type NotePayload = typeof NotePayload.Type;
|
|
4378
|
+
export type NotePayload = typeof NotePayload.Type;
|
|
4220
4379
|
//#endregion
|
|
4221
4380
|
//#region src/schemas/turns/ToolCallPayload.d.ts
|
|
4222
4381
|
/** @public */
|
|
4223
|
-
declare const ToolCallPayload: Schema.Struct<{
|
|
4382
|
+
export declare const ToolCallPayload: Schema.Struct<{
|
|
4224
4383
|
readonly type: Schema.Literal<"tool_call">;
|
|
4225
4384
|
readonly tool_name: Schema.String;
|
|
4226
4385
|
readonly tool_input: Schema.Unknown;
|
|
4227
4386
|
readonly tool_use_id: Schema.optional<Schema.String>;
|
|
4228
4387
|
}>;
|
|
4229
4388
|
/** @public */
|
|
4230
|
-
type ToolCallPayload = typeof ToolCallPayload.Type;
|
|
4389
|
+
export type ToolCallPayload = typeof ToolCallPayload.Type;
|
|
4231
4390
|
//#endregion
|
|
4232
4391
|
//#region src/schemas/turns/ToolResultPayload.d.ts
|
|
4233
4392
|
/** @public */
|
|
4234
|
-
declare const ToolResultPayload: Schema.Struct<{
|
|
4393
|
+
export declare const ToolResultPayload: Schema.Struct<{
|
|
4235
4394
|
readonly type: Schema.Literal<"tool_result">;
|
|
4236
4395
|
readonly tool_name: Schema.String;
|
|
4237
4396
|
readonly tool_use_id: Schema.optional<Schema.String>;
|
|
@@ -4240,21 +4399,21 @@ declare const ToolResultPayload: Schema.Struct<{
|
|
|
4240
4399
|
readonly duration_ms: Schema.optional<Schema.Number>;
|
|
4241
4400
|
}>;
|
|
4242
4401
|
/** @public */
|
|
4243
|
-
type ToolResultPayload = typeof ToolResultPayload.Type;
|
|
4402
|
+
export type ToolResultPayload = typeof ToolResultPayload.Type;
|
|
4244
4403
|
//#endregion
|
|
4245
4404
|
//#region src/schemas/turns/UserPromptPayload.d.ts
|
|
4246
4405
|
/** @public */
|
|
4247
|
-
declare const UserPromptPayload: Schema.Struct<{
|
|
4406
|
+
export declare const UserPromptPayload: Schema.Struct<{
|
|
4248
4407
|
readonly type: Schema.Literal<"user_prompt">;
|
|
4249
4408
|
readonly prompt: Schema.String;
|
|
4250
4409
|
readonly cc_message_id: Schema.optional<Schema.String>;
|
|
4251
4410
|
}>;
|
|
4252
4411
|
/** @public */
|
|
4253
|
-
type UserPromptPayload = typeof UserPromptPayload.Type;
|
|
4412
|
+
export type UserPromptPayload = typeof UserPromptPayload.Type;
|
|
4254
4413
|
//#endregion
|
|
4255
4414
|
//#region src/schemas/turns/index.d.ts
|
|
4256
4415
|
/** @public */
|
|
4257
|
-
declare const TurnPayload: Schema.Union<readonly [Schema.Struct<{
|
|
4416
|
+
export declare const TurnPayload: Schema.Union<readonly [Schema.Struct<{
|
|
4258
4417
|
readonly type: Schema.Literal<"user_prompt">;
|
|
4259
4418
|
readonly prompt: Schema.String;
|
|
4260
4419
|
readonly cc_message_id: Schema.optional<Schema.String>;
|
|
@@ -4294,7 +4453,7 @@ declare const TurnPayload: Schema.Union<readonly [Schema.Struct<{
|
|
|
4294
4453
|
readonly cited_stack_frame_id: Schema.optional<Schema.Number>;
|
|
4295
4454
|
}>]>;
|
|
4296
4455
|
/** @public */
|
|
4297
|
-
type TurnPayload = typeof TurnPayload.Type;
|
|
4456
|
+
export type TurnPayload = typeof TurnPayload.Type;
|
|
4298
4457
|
//#endregion
|
|
4299
4458
|
//#region src/services/idempotency.d.ts
|
|
4300
4459
|
/**
|
|
@@ -4303,9 +4462,9 @@ type TurnPayload = typeof TurnPayload.Type;
|
|
|
4303
4462
|
* string, both of which could collide with caller-supplied values.
|
|
4304
4463
|
* @public
|
|
4305
4464
|
*/
|
|
4306
|
-
declare const IDEMPOTENCY_ROOT_SENTINEL = "__ROOT__";
|
|
4465
|
+
export declare const IDEMPOTENCY_ROOT_SENTINEL = "__ROOT__";
|
|
4307
4466
|
/** @public */
|
|
4308
|
-
interface IdempotencyInput {
|
|
4467
|
+
export interface IdempotencyInput {
|
|
4309
4468
|
readonly agentType: string;
|
|
4310
4469
|
readonly parentAgentId: string | null;
|
|
4311
4470
|
readonly clientNonce: string;
|
|
@@ -4324,14 +4483,14 @@ interface IdempotencyInput {
|
|
|
4324
4483
|
* future debugging.
|
|
4325
4484
|
* @public
|
|
4326
4485
|
*/
|
|
4327
|
-
declare const deriveIdempotencyKey: (input: IdempotencyInput) => string;
|
|
4486
|
+
export declare const deriveIdempotencyKey: (input: IdempotencyInput) => string;
|
|
4328
4487
|
//#endregion
|
|
4329
4488
|
//#region src/sql/assemblers.d.ts
|
|
4330
4489
|
/**
|
|
4331
4490
|
* Minimal shape of a test_runs aggregation row used to build the manifest.
|
|
4332
4491
|
* @public
|
|
4333
4492
|
*/
|
|
4334
|
-
interface ManifestRow {
|
|
4493
|
+
export interface ManifestRow {
|
|
4335
4494
|
project: string;
|
|
4336
4495
|
sub_project: string | null;
|
|
4337
4496
|
timestamp: string;
|
|
@@ -4341,7 +4500,7 @@ interface ManifestRow {
|
|
|
4341
4500
|
* Minimal shape of a test_history row used to build a history record.
|
|
4342
4501
|
* @public
|
|
4343
4502
|
*/
|
|
4344
|
-
interface HistoryRow {
|
|
4503
|
+
export interface HistoryRow {
|
|
4345
4504
|
module_path: string;
|
|
4346
4505
|
full_name: string;
|
|
4347
4506
|
timestamp: string;
|
|
@@ -4357,7 +4516,7 @@ interface HistoryRow {
|
|
|
4357
4516
|
* into the `tests` array format.
|
|
4358
4517
|
* @public
|
|
4359
4518
|
*/
|
|
4360
|
-
interface AssembledHistoryRecord {
|
|
4519
|
+
export interface AssembledHistoryRecord {
|
|
4361
4520
|
[compositeKey: string]: {
|
|
4362
4521
|
modulePath: string;
|
|
4363
4522
|
fullName: string;
|
|
@@ -4371,7 +4530,7 @@ interface AssembledHistoryRecord {
|
|
|
4371
4530
|
* The `dbPath` is stored as `cacheDir` so CLI tools can locate the source.
|
|
4372
4531
|
* @public
|
|
4373
4532
|
*/
|
|
4374
|
-
declare function assembleManifest(rows: ManifestRow[], dbPath: string): CacheManifest;
|
|
4533
|
+
export declare function assembleManifest(rows: ManifestRow[], dbPath: string): CacheManifest;
|
|
4375
4534
|
/**
|
|
4376
4535
|
* Groups test_history rows by the composite (module_path, full_name) key
|
|
4377
4536
|
* into a keyed record.
|
|
@@ -4385,7 +4544,7 @@ declare function assembleManifest(rows: ManifestRow[], dbPath: string): CacheMan
|
|
|
4385
4544
|
* (matching the `TestRun` schema constraint).
|
|
4386
4545
|
* @public
|
|
4387
4546
|
*/
|
|
4388
|
-
declare function assembleHistoryRecord(rows: HistoryRow[]): AssembledHistoryRecord;
|
|
4547
|
+
export declare function assembleHistoryRecord(rows: HistoryRow[]): AssembledHistoryRecord;
|
|
4389
4548
|
//#endregion
|
|
4390
4549
|
//#region src/utils/ansi.d.ts
|
|
4391
4550
|
/**
|
|
@@ -4393,7 +4552,7 @@ declare function assembleHistoryRecord(rows: HistoryRow[]): AssembledHistoryReco
|
|
|
4393
4552
|
*
|
|
4394
4553
|
* @internal
|
|
4395
4554
|
*/
|
|
4396
|
-
interface AnsiOptions {
|
|
4555
|
+
export interface AnsiOptions {
|
|
4397
4556
|
noColor?: boolean;
|
|
4398
4557
|
}
|
|
4399
4558
|
/**
|
|
@@ -4415,7 +4574,7 @@ interface AnsiOptions {
|
|
|
4415
4574
|
* @see {@link https://no-color.org/ | NO_COLOR convention}
|
|
4416
4575
|
* @internal
|
|
4417
4576
|
*/
|
|
4418
|
-
declare function ansi(text: string, color: string, options?: AnsiOptions): string;
|
|
4577
|
+
export declare function ansi(text: string, color: string, options?: AnsiOptions): string;
|
|
4419
4578
|
/**
|
|
4420
4579
|
* Strip all ANSI escape codes from a string.
|
|
4421
4580
|
*
|
|
@@ -4424,7 +4583,7 @@ declare function ansi(text: string, color: string, options?: AnsiOptions): strin
|
|
|
4424
4583
|
*
|
|
4425
4584
|
* @internal
|
|
4426
4585
|
*/
|
|
4427
|
-
declare function stripAnsi(text: string): string;
|
|
4586
|
+
export declare function stripAnsi(text: string): string;
|
|
4428
4587
|
//#endregion
|
|
4429
4588
|
//#region src/utils/build-report.d.ts
|
|
4430
4589
|
/**
|
|
@@ -4436,7 +4595,7 @@ declare function stripAnsi(text: string): string;
|
|
|
4436
4595
|
*
|
|
4437
4596
|
* @public
|
|
4438
4597
|
*/
|
|
4439
|
-
interface VitestParsedStack {
|
|
4598
|
+
export interface VitestParsedStack {
|
|
4440
4599
|
method: string;
|
|
4441
4600
|
file: string;
|
|
4442
4601
|
line: number;
|
|
@@ -4450,7 +4609,7 @@ interface VitestParsedStack {
|
|
|
4450
4609
|
*
|
|
4451
4610
|
* @public
|
|
4452
4611
|
*/
|
|
4453
|
-
interface VitestTestError {
|
|
4612
|
+
export interface VitestTestError {
|
|
4454
4613
|
message: string;
|
|
4455
4614
|
diff?: string;
|
|
4456
4615
|
stacks?: Array<string | VitestParsedStack>;
|
|
@@ -4463,7 +4622,7 @@ interface VitestTestError {
|
|
|
4463
4622
|
*
|
|
4464
4623
|
* @public
|
|
4465
4624
|
*/
|
|
4466
|
-
interface VitestTestResult {
|
|
4625
|
+
export interface VitestTestResult {
|
|
4467
4626
|
state: string;
|
|
4468
4627
|
errors?: ReadonlyArray<VitestTestError>;
|
|
4469
4628
|
}
|
|
@@ -4472,7 +4631,7 @@ interface VitestTestResult {
|
|
|
4472
4631
|
*
|
|
4473
4632
|
* @public
|
|
4474
4633
|
*/
|
|
4475
|
-
interface VitestTestDiagnostic {
|
|
4634
|
+
export interface VitestTestDiagnostic {
|
|
4476
4635
|
duration: number;
|
|
4477
4636
|
flaky: boolean;
|
|
4478
4637
|
slow: boolean;
|
|
@@ -4487,7 +4646,7 @@ interface VitestTestDiagnostic {
|
|
|
4487
4646
|
*
|
|
4488
4647
|
* @public
|
|
4489
4648
|
*/
|
|
4490
|
-
interface VitestTestCase {
|
|
4649
|
+
export interface VitestTestCase {
|
|
4491
4650
|
type: "test";
|
|
4492
4651
|
name: string;
|
|
4493
4652
|
fullName: string;
|
|
@@ -4502,7 +4661,7 @@ interface VitestTestCase {
|
|
|
4502
4661
|
*
|
|
4503
4662
|
* @public
|
|
4504
4663
|
*/
|
|
4505
|
-
interface VitestModuleDiagnostic {
|
|
4664
|
+
export interface VitestModuleDiagnostic {
|
|
4506
4665
|
duration: number;
|
|
4507
4666
|
}
|
|
4508
4667
|
/**
|
|
@@ -4510,7 +4669,7 @@ interface VitestModuleDiagnostic {
|
|
|
4510
4669
|
*
|
|
4511
4670
|
* @public
|
|
4512
4671
|
*/
|
|
4513
|
-
interface VitestModuleError {
|
|
4672
|
+
export interface VitestModuleError {
|
|
4514
4673
|
message: string;
|
|
4515
4674
|
stacks?: Array<string | VitestParsedStack>;
|
|
4516
4675
|
}
|
|
@@ -4519,7 +4678,7 @@ interface VitestModuleError {
|
|
|
4519
4678
|
*
|
|
4520
4679
|
* @public
|
|
4521
4680
|
*/
|
|
4522
|
-
interface VitestTestSuite {
|
|
4681
|
+
export interface VitestTestSuite {
|
|
4523
4682
|
type: "suite";
|
|
4524
4683
|
name: string;
|
|
4525
4684
|
fullName: string;
|
|
@@ -4554,7 +4713,7 @@ interface VitestTestSuite {
|
|
|
4554
4713
|
*
|
|
4555
4714
|
* @public
|
|
4556
4715
|
*/
|
|
4557
|
-
interface VitestTestModule {
|
|
4716
|
+
export interface VitestTestModule {
|
|
4558
4717
|
type: "module";
|
|
4559
4718
|
moduleId: string;
|
|
4560
4719
|
relativeModuleId: string;
|
|
@@ -4587,7 +4746,7 @@ interface VitestTestModule {
|
|
|
4587
4746
|
*
|
|
4588
4747
|
* @public
|
|
4589
4748
|
*/
|
|
4590
|
-
declare function buildAgentReport(testModules: ReadonlyArray<VitestTestModule>, unhandledErrors: ReadonlyArray<VitestModuleError>, reason: "passed" | "failed" | "interrupted", options: {
|
|
4749
|
+
export declare function buildAgentReport(testModules: ReadonlyArray<VitestTestModule>, unhandledErrors: ReadonlyArray<VitestModuleError>, reason: "passed" | "failed" | "interrupted", options: {
|
|
4591
4750
|
readonly omitPassingTests?: boolean;
|
|
4592
4751
|
}, projectName?: string): AgentReport;
|
|
4593
4752
|
/**
|
|
@@ -4604,7 +4763,7 @@ declare function buildAgentReport(testModules: ReadonlyArray<VitestTestModule>,
|
|
|
4604
4763
|
* @returns the number of modules in `report.failed` with no failed test case
|
|
4605
4764
|
* @public
|
|
4606
4765
|
*/
|
|
4607
|
-
declare const countSuiteFailures: (report: Pick<AgentReport, "failed">) => number;
|
|
4766
|
+
export declare const countSuiteFailures: (report: Pick<AgentReport, "failed">) => number;
|
|
4608
4767
|
//#endregion
|
|
4609
4768
|
//#region src/utils/canonicalize-git-url.d.ts
|
|
4610
4769
|
/**
|
|
@@ -4627,7 +4786,7 @@ declare const countSuiteFailures: (report: Pick<AgentReport, "failed">) => numbe
|
|
|
4627
4786
|
* host like `github.com` is not a project identity.
|
|
4628
4787
|
* @public
|
|
4629
4788
|
*/
|
|
4630
|
-
declare const canonicalizeGitUrl: (raw: string) => string | null;
|
|
4789
|
+
export declare const canonicalizeGitUrl: (raw: string) => string | null;
|
|
4631
4790
|
/**
|
|
4632
4791
|
* Convert a (possibly raw) git URL to the filesystem-safe `project_key`
|
|
4633
4792
|
* form. The canonical `host/path` is mapped 1:1 to `host__path` so it
|
|
@@ -4635,7 +4794,7 @@ declare const canonicalizeGitUrl: (raw: string) => string | null;
|
|
|
4635
4794
|
* `$XDG_DATA_HOME/vitest-agent/`.
|
|
4636
4795
|
* @public
|
|
4637
4796
|
*/
|
|
4638
|
-
declare const gitUrlToProjectKey: (raw: string) => string | null;
|
|
4797
|
+
export declare const gitUrlToProjectKey: (raw: string) => string | null;
|
|
4639
4798
|
//#endregion
|
|
4640
4799
|
//#region src/utils/classify-test.d.ts
|
|
4641
4800
|
/**
|
|
@@ -4646,7 +4805,7 @@ declare const gitUrlToProjectKey: (raw: string) => string | null;
|
|
|
4646
4805
|
* @returns The test's classification
|
|
4647
4806
|
* @public
|
|
4648
4807
|
*/
|
|
4649
|
-
declare function classifyTest(current: "passed" | "failed", priorRuns: ReadonlyArray<{
|
|
4808
|
+
export declare function classifyTest(current: "passed" | "failed", priorRuns: ReadonlyArray<{
|
|
4650
4809
|
state: string;
|
|
4651
4810
|
}>): TestClassification;
|
|
4652
4811
|
//#endregion
|
|
@@ -4669,7 +4828,7 @@ declare function classifyTest(current: "passed" | "failed", priorRuns: ReadonlyA
|
|
|
4669
4828
|
*
|
|
4670
4829
|
* @public
|
|
4671
4830
|
*/
|
|
4672
|
-
declare const coerceErrorText: (value: unknown) => string | undefined;
|
|
4831
|
+
export declare const coerceErrorText: (value: unknown) => string | undefined;
|
|
4673
4832
|
/**
|
|
4674
4833
|
* Read a named field off an unknown error-like value and coerce it with
|
|
4675
4834
|
* {@link coerceErrorText}, guarding the property access itself. A live getter
|
|
@@ -4684,7 +4843,7 @@ declare const coerceErrorText: (value: unknown) => string | undefined;
|
|
|
4684
4843
|
*
|
|
4685
4844
|
* @public
|
|
4686
4845
|
*/
|
|
4687
|
-
declare const coerceErrorField: (source: unknown, key: string) => string | undefined;
|
|
4846
|
+
export declare const coerceErrorField: (source: unknown, key: string) => string | undefined;
|
|
4688
4847
|
//#endregion
|
|
4689
4848
|
//#region src/utils/compress-lines.d.ts
|
|
4690
4849
|
/**
|
|
@@ -4713,7 +4872,7 @@ declare const coerceErrorField: (source: unknown, key: string) => string | undef
|
|
|
4713
4872
|
*
|
|
4714
4873
|
* @public
|
|
4715
4874
|
*/
|
|
4716
|
-
declare function compressLines(lines: number[]): string;
|
|
4875
|
+
export declare function compressLines(lines: number[]): string;
|
|
4717
4876
|
//#endregion
|
|
4718
4877
|
//#region src/utils/compute-trend.d.ts
|
|
4719
4878
|
/**
|
|
@@ -4724,7 +4883,7 @@ declare function compressLines(lines: number[]): string;
|
|
|
4724
4883
|
* is stable for the same logical configuration.
|
|
4725
4884
|
* @public
|
|
4726
4885
|
*/
|
|
4727
|
-
declare function hashTargets(targets: ResolvedThresholds | undefined): string | undefined;
|
|
4886
|
+
export declare function hashTargets(targets: ResolvedThresholds | undefined): string | undefined;
|
|
4728
4887
|
/**
|
|
4729
4888
|
* Compute a new trend entry and return the updated trend record.
|
|
4730
4889
|
*
|
|
@@ -4732,12 +4891,12 @@ declare function hashTargets(targets: ResolvedThresholds | undefined): string |
|
|
|
4732
4891
|
* cleared and the new entry becomes the first data point.
|
|
4733
4892
|
* @public
|
|
4734
4893
|
*/
|
|
4735
|
-
declare function computeTrend(current: CoverageTotals, existing: TrendRecord | undefined, targets: ResolvedThresholds | undefined): TrendRecord;
|
|
4894
|
+
export declare function computeTrend(current: CoverageTotals, existing: TrendRecord | undefined, targets: ResolvedThresholds | undefined): TrendRecord;
|
|
4736
4895
|
/**
|
|
4737
4896
|
* Get the overall direction from recent entries.
|
|
4738
4897
|
* @public
|
|
4739
4898
|
*/
|
|
4740
|
-
declare function getRecentDirection(record: TrendRecord, count?: number): {
|
|
4899
|
+
export declare function getRecentDirection(record: TrendRecord, count?: number): {
|
|
4741
4900
|
direction: "improving" | "regressing" | "stable";
|
|
4742
4901
|
runCount: number;
|
|
4743
4902
|
};
|
|
@@ -4748,21 +4907,31 @@ declare function getRecentDirection(record: TrendRecord, count?: number): {
|
|
|
4748
4907
|
* when the write happened inside one). Fed to buildConsoleLeaks.
|
|
4749
4908
|
* @public
|
|
4750
4909
|
*/
|
|
4751
|
-
interface ConsoleLeakEntry {
|
|
4910
|
+
export interface ConsoleLeakEntry {
|
|
4752
4911
|
readonly file: string;
|
|
4753
4912
|
readonly test?: string;
|
|
4754
4913
|
readonly type: "stdout" | "stderr";
|
|
4755
4914
|
readonly content: string;
|
|
4915
|
+
/**
|
|
4916
|
+
* True when this write happened inside a test (or a suite/module) that did
|
|
4917
|
+
* not end in a passing state. Assertion-failure logging that routes through
|
|
4918
|
+
* `console.*` (common with logger-backed assertion libraries) sets this so
|
|
4919
|
+
* buildConsoleLeaks can keep it out of the actionable leak signal.
|
|
4920
|
+
*/
|
|
4921
|
+
readonly failed?: boolean;
|
|
4756
4922
|
}
|
|
4757
4923
|
/**
|
|
4758
4924
|
* Aggregate raw console-leak entries into a ConsoleLeaks signal:
|
|
4759
4925
|
* bucket by file, split stdout/stderr, collect attributable test names,
|
|
4760
4926
|
* capture one truncated sample per file, sort by total writes descending,
|
|
4761
|
-
* and cap the file list.
|
|
4762
|
-
*
|
|
4927
|
+
* and cap the file list. Entries logged inside a failing test (with
|
|
4928
|
+
* `failed` set) are excluded from `total`/`byFile` — the actionable leak signal —
|
|
4929
|
+
* and summarized instead in `fromFailingTests` (issue #263: a logger-backed
|
|
4930
|
+
* assertion failure otherwise makes every red run look like a leak). Returns
|
|
4931
|
+
* `undefined` only when there is no output at all, non-failing or failing.
|
|
4763
4932
|
* @public
|
|
4764
4933
|
*/
|
|
4765
|
-
declare function buildConsoleLeaks(entries: ReadonlyArray<ConsoleLeakEntry>): ConsoleLeaks | undefined;
|
|
4934
|
+
export declare function buildConsoleLeaks(entries: ReadonlyArray<ConsoleLeakEntry>): ConsoleLeaks | undefined;
|
|
4766
4935
|
/**
|
|
4767
4936
|
* Structural subset of a Vitest runner task (File / Suite / Test) carrying
|
|
4768
4937
|
* captured console output. Modeled locally so this util needs no `vitest`
|
|
@@ -4771,7 +4940,7 @@ declare function buildConsoleLeaks(entries: ReadonlyArray<ConsoleLeakEntry>): Co
|
|
|
4771
4940
|
* reporter stripping in agent mode.
|
|
4772
4941
|
* @public
|
|
4773
4942
|
*/
|
|
4774
|
-
interface ConsoleLeakTask {
|
|
4943
|
+
export interface ConsoleLeakTask {
|
|
4775
4944
|
readonly type?: string;
|
|
4776
4945
|
readonly name?: string;
|
|
4777
4946
|
readonly fullTestName?: string;
|
|
@@ -4780,14 +4949,42 @@ interface ConsoleLeakTask {
|
|
|
4780
4949
|
readonly content: string;
|
|
4781
4950
|
}>;
|
|
4782
4951
|
readonly tasks?: ReadonlyArray<ConsoleLeakTask>;
|
|
4952
|
+
/**
|
|
4953
|
+
* Vitest's own `TaskResult`, structurally narrowed to the one field this
|
|
4954
|
+
* util reads. `state` is `"pass" | "fail"` once the task has finished
|
|
4955
|
+
* running (still a `RunMode` value like `"run"`/`"skip"` beforehand).
|
|
4956
|
+
*/
|
|
4957
|
+
readonly result?: {
|
|
4958
|
+
readonly state?: string;
|
|
4959
|
+
};
|
|
4783
4960
|
}
|
|
4784
4961
|
/**
|
|
4785
4962
|
* Walk a Vitest `File[]` task tree (from `vitest.state.getFiles()`) into flat
|
|
4786
4963
|
* {@link ConsoleLeakEntry} values. Each task `log` becomes one entry attributed
|
|
4787
4964
|
* to its enclosing file and, when the log sits on a test task, that test's name.
|
|
4965
|
+
* An entry is marked `failed: true` when it was logged inside a test whose own
|
|
4966
|
+
* `result.state` is `"fail"`, or — for output with no owning test — when the
|
|
4967
|
+
* enclosing file itself failed (e.g. a collection/load error).
|
|
4788
4968
|
* @public
|
|
4789
4969
|
*/
|
|
4790
|
-
declare function collectConsoleLeakEntries(files: ReadonlyArray<ConsoleLeakTask>): ConsoleLeakEntry[];
|
|
4970
|
+
export declare function collectConsoleLeakEntries(files: ReadonlyArray<ConsoleLeakTask>): ConsoleLeakEntry[];
|
|
4971
|
+
//#endregion
|
|
4972
|
+
//#region src/utils/detect-non-default-discover-strategy.d.ts
|
|
4973
|
+
/**
|
|
4974
|
+
* Lexically detects whether a Vitest/Vite config source text appears to
|
|
4975
|
+
* configure a non-default `DiscoverStrategy` — a custom `discoverStrategy`
|
|
4976
|
+
* option (including `discoverStrategy: false`), an `AgentPlugin.discover()`
|
|
4977
|
+
* `.addProject(...)` chain, or a class extending `DefaultDiscoverStrategy` /
|
|
4978
|
+
* implementing `DiscoverStrategy`.
|
|
4979
|
+
*
|
|
4980
|
+
* Pure and comment-tolerant (best-effort): a marker mentioned only inside a
|
|
4981
|
+
* comment may still register as a false positive if it isn't caught by the
|
|
4982
|
+
* comment-stripping pass. That is intentional — this function only ever
|
|
4983
|
+
* decides whether to fail open, so a false positive is harmless while a
|
|
4984
|
+
* false negative would produce a confidently wrong deny.
|
|
4985
|
+
* @public
|
|
4986
|
+
*/
|
|
4987
|
+
export declare function detectNonDefaultDiscoverStrategy(source: string): boolean;
|
|
4791
4988
|
//#endregion
|
|
4792
4989
|
//#region src/utils/detect-pm.d.ts
|
|
4793
4990
|
/**
|
|
@@ -4818,7 +5015,7 @@ declare function collectConsoleLeakEntries(files: ReadonlyArray<ConsoleLeakTask>
|
|
|
4818
5015
|
*
|
|
4819
5016
|
* @internal
|
|
4820
5017
|
*/
|
|
4821
|
-
interface FileSystemAdapter {
|
|
5018
|
+
export interface FileSystemAdapter {
|
|
4822
5019
|
readFile(path: string): Promise<string>;
|
|
4823
5020
|
exists(path: string): Promise<boolean>;
|
|
4824
5021
|
}
|
|
@@ -4838,7 +5035,7 @@ interface FileSystemAdapter {
|
|
|
4838
5035
|
*
|
|
4839
5036
|
* @internal
|
|
4840
5037
|
*/
|
|
4841
|
-
declare function detectPackageManager(root: string, fs: FileSystemAdapter): Promise<PackageManager | null>;
|
|
5038
|
+
export declare function detectPackageManager(root: string, fs: FileSystemAdapter): Promise<PackageManager | null>;
|
|
4842
5039
|
/**
|
|
4843
5040
|
* Return the vitest run command for the given package manager.
|
|
4844
5041
|
*
|
|
@@ -4849,7 +5046,7 @@ declare function detectPackageManager(root: string, fs: FileSystemAdapter): Prom
|
|
|
4849
5046
|
*
|
|
4850
5047
|
* @internal
|
|
4851
5048
|
*/
|
|
4852
|
-
declare function getRunCommand(pm: PackageManager | null): string;
|
|
5049
|
+
export declare function getRunCommand(pm: PackageManager | null): string;
|
|
4853
5050
|
//#endregion
|
|
4854
5051
|
//#region src/utils/detect-timeout.d.ts
|
|
4855
5052
|
/**
|
|
@@ -4858,7 +5055,7 @@ declare function getRunCommand(pm: PackageManager | null): string;
|
|
|
4858
5055
|
* "timeout".
|
|
4859
5056
|
* @public
|
|
4860
5057
|
*/
|
|
4861
|
-
declare const isTimeoutError: (error: {
|
|
5058
|
+
export declare const isTimeoutError: (error: {
|
|
4862
5059
|
message?: string;
|
|
4863
5060
|
name?: string;
|
|
4864
5061
|
}) => boolean;
|
|
@@ -4871,17 +5068,17 @@ declare const isTimeoutError: (error: {
|
|
|
4871
5068
|
* no-ops.
|
|
4872
5069
|
* @public
|
|
4873
5070
|
*/
|
|
4874
|
-
declare function ensureMigrated(dbPath: string, logLevel?: LogLevel.LogLevel, logFile?: string): Promise<void>;
|
|
5071
|
+
export declare function ensureMigrated(dbPath: string, logLevel?: LogLevel.LogLevel, logFile?: string): Promise<void>;
|
|
4875
5072
|
/**
|
|
4876
5073
|
* Reset the migration cache. Test-only.
|
|
4877
5074
|
*
|
|
4878
5075
|
* @internal
|
|
4879
5076
|
*/
|
|
4880
|
-
declare function _resetMigrationCacheForTesting(): void;
|
|
5077
|
+
export declare function _resetMigrationCacheForTesting(): void;
|
|
4881
5078
|
//#endregion
|
|
4882
5079
|
//#region src/utils/failure-signature.d.ts
|
|
4883
5080
|
/** @public */
|
|
4884
|
-
interface FailureSignatureInput {
|
|
5081
|
+
export interface FailureSignatureInput {
|
|
4885
5082
|
readonly error_name: string;
|
|
4886
5083
|
readonly assertion_message: string;
|
|
4887
5084
|
readonly top_frame_function_name: string;
|
|
@@ -4889,9 +5086,9 @@ interface FailureSignatureInput {
|
|
|
4889
5086
|
readonly top_frame_raw_line?: number;
|
|
4890
5087
|
}
|
|
4891
5088
|
/** @public */
|
|
4892
|
-
declare const normalizeAssertionShape: (message: string) => string | null;
|
|
5089
|
+
export declare const normalizeAssertionShape: (message: string) => string | null;
|
|
4893
5090
|
/** @public */
|
|
4894
|
-
declare const computeFailureSignature: (input: FailureSignatureInput) => string;
|
|
5091
|
+
export declare const computeFailureSignature: (input: FailureSignatureInput) => string;
|
|
4895
5092
|
//#endregion
|
|
4896
5093
|
//#region src/utils/format-console.d.ts
|
|
4897
5094
|
/**
|
|
@@ -4899,7 +5096,7 @@ declare const computeFailureSignature: (input: FailureSignatureInput) => string;
|
|
|
4899
5096
|
*
|
|
4900
5097
|
* @internal
|
|
4901
5098
|
*/
|
|
4902
|
-
interface ConsoleFormatOptions {
|
|
5099
|
+
export interface ConsoleFormatOptions {
|
|
4903
5100
|
/** Output verbosity: `"failures"` (default), `"full"`, or `"silent"`. */
|
|
4904
5101
|
consoleOutput: "failures" | "full" | "silent";
|
|
4905
5102
|
/** Maximum number of low-coverage files to show in console output. */
|
|
@@ -4935,7 +5132,7 @@ interface ConsoleFormatOptions {
|
|
|
4935
5132
|
*
|
|
4936
5133
|
* @internal
|
|
4937
5134
|
*/
|
|
4938
|
-
declare function getWorstMetric(f: FileCoverageReport): {
|
|
5135
|
+
export declare function getWorstMetric(f: FileCoverageReport): {
|
|
4939
5136
|
label: string;
|
|
4940
5137
|
pct: number;
|
|
4941
5138
|
};
|
|
@@ -4949,7 +5146,7 @@ declare function getWorstMetric(f: FileCoverageReport): {
|
|
|
4949
5146
|
*
|
|
4950
5147
|
* @internal
|
|
4951
5148
|
*/
|
|
4952
|
-
declare function relativePath(filePath: string, cwd?: string): string;
|
|
5149
|
+
export declare function relativePath(filePath: string, cwd?: string): string;
|
|
4953
5150
|
/**
|
|
4954
5151
|
* Determine the output tier based on test results and coverage state.
|
|
4955
5152
|
*
|
|
@@ -4959,7 +5156,7 @@ declare function relativePath(filePath: string, cwd?: string): string;
|
|
|
4959
5156
|
*
|
|
4960
5157
|
* @internal
|
|
4961
5158
|
*/
|
|
4962
|
-
declare function determineTier(report: AgentReport): "green" | "yellow" | "red";
|
|
5159
|
+
export declare function determineTier(report: AgentReport): "green" | "yellow" | "red";
|
|
4963
5160
|
/**
|
|
4964
5161
|
* Format an {@link (AgentReport:variable)} as compact, actionable console markdown.
|
|
4965
5162
|
*
|
|
@@ -4982,7 +5179,7 @@ declare function determineTier(report: AgentReport): "green" | "yellow" | "red";
|
|
|
4982
5179
|
*
|
|
4983
5180
|
* @internal
|
|
4984
5181
|
*/
|
|
4985
|
-
declare function formatConsoleMarkdown(report: AgentReport, options: ConsoleFormatOptions): string;
|
|
5182
|
+
export declare function formatConsoleMarkdown(report: AgentReport, options: ConsoleFormatOptions): string;
|
|
4986
5183
|
//#endregion
|
|
4987
5184
|
//#region src/utils/format-fatal-error.d.ts
|
|
4988
5185
|
/**
|
|
@@ -4996,7 +5193,7 @@ declare function formatConsoleMarkdown(report: AgentReport, options: ConsoleForm
|
|
|
4996
5193
|
*
|
|
4997
5194
|
* @public
|
|
4998
5195
|
*/
|
|
4999
|
-
declare function formatFatalError(err: unknown): string;
|
|
5196
|
+
export declare function formatFatalError(err: unknown): string;
|
|
5000
5197
|
//#endregion
|
|
5001
5198
|
//#region src/utils/format-gfm.d.ts
|
|
5002
5199
|
/**
|
|
@@ -5021,11 +5218,32 @@ declare function formatFatalError(err: unknown): string;
|
|
|
5021
5218
|
*
|
|
5022
5219
|
* @public
|
|
5023
5220
|
*/
|
|
5024
|
-
declare function formatGfm(reports: AgentReport[]): string;
|
|
5221
|
+
export declare function formatGfm(reports: AgentReport[]): string;
|
|
5222
|
+
//#endregion
|
|
5223
|
+
//#region src/utils/format-scoped-coverage-note.d.ts
|
|
5224
|
+
/**
|
|
5225
|
+
* Format the informational note shown when coverage thresholds were
|
|
5226
|
+
* skipped because a run only exercised a subset of the project's test
|
|
5227
|
+
* files (issue #160). Vitest's coverage provider enforces
|
|
5228
|
+
* `coverage.thresholds` against the whole-project denominator
|
|
5229
|
+
* regardless of how many files actually ran, so callers that detect a
|
|
5230
|
+
* scoped/partial run suppress the native threshold check and surface
|
|
5231
|
+
* this note instead so the agent understands why no pass/fail verdict
|
|
5232
|
+
* was rendered for coverage.
|
|
5233
|
+
*
|
|
5234
|
+
* @param testedFileCount - number of test files that actually ran
|
|
5235
|
+
* @param totalFileCount - total number of test files in the project, when
|
|
5236
|
+
* known. Some callers (formatters working from a persisted
|
|
5237
|
+
* `CoverageReport`, which tracks only the tested-file list) cannot supply
|
|
5238
|
+
* this; the note degrades to `"(N test files)"` when omitted.
|
|
5239
|
+
* @returns the note text, e.g. `"Coverage thresholds skipped: partial run (2 of 47 test files)"`
|
|
5240
|
+
* @public
|
|
5241
|
+
*/
|
|
5242
|
+
export declare function formatScopedCoverageNote(testedFileCount: number, totalFileCount?: number): string;
|
|
5025
5243
|
//#endregion
|
|
5026
5244
|
//#region src/utils/function-boundary.d.ts
|
|
5027
5245
|
/** @public */
|
|
5028
|
-
interface FunctionBoundary {
|
|
5246
|
+
export interface FunctionBoundary {
|
|
5029
5247
|
readonly line: number;
|
|
5030
5248
|
readonly name: string;
|
|
5031
5249
|
}
|
|
@@ -5038,15 +5256,15 @@ interface FunctionBoundary {
|
|
|
5038
5256
|
* casts are all accepted.
|
|
5039
5257
|
* @public
|
|
5040
5258
|
*/
|
|
5041
|
-
declare const findFunctionBoundary: (source: string, line: number) => FunctionBoundary | null;
|
|
5259
|
+
export declare const findFunctionBoundary: (source: string, line: number) => FunctionBoundary | null;
|
|
5042
5260
|
//#endregion
|
|
5043
5261
|
//#region src/utils/hyperlink.d.ts
|
|
5044
5262
|
/** @public */
|
|
5045
|
-
interface Osc8Options {
|
|
5263
|
+
export interface Osc8Options {
|
|
5046
5264
|
readonly enabled: boolean;
|
|
5047
5265
|
}
|
|
5048
5266
|
/** @public */
|
|
5049
|
-
declare const osc8: (url: string, label: string, options: Osc8Options) => string;
|
|
5267
|
+
export declare const osc8: (url: string, label: string, options: Osc8Options) => string;
|
|
5050
5268
|
//#endregion
|
|
5051
5269
|
//#region src/utils/match-vitest-command.d.ts
|
|
5052
5270
|
/**
|
|
@@ -5056,7 +5274,7 @@ declare const osc8: (url: string, label: string, options: Osc8Options) => string
|
|
|
5056
5274
|
* (computed once per project and cached by the sidecar).
|
|
5057
5275
|
* @public
|
|
5058
5276
|
*/
|
|
5059
|
-
declare const isVitestInvocation: (command: string, vitestScripts: ReadonlySet<string>) => boolean;
|
|
5277
|
+
export declare const isVitestInvocation: (command: string, vitestScripts: ReadonlySet<string>) => boolean;
|
|
5060
5278
|
/**
|
|
5061
5279
|
* Build the env-var prefix string to prepend to a matched command.
|
|
5062
5280
|
*
|
|
@@ -5068,7 +5286,7 @@ declare const isVitestInvocation: (command: string, vitestScripts: ReadonlySet<s
|
|
|
5068
5286
|
* Bash calls, no risk of cross-contamination.
|
|
5069
5287
|
* @public
|
|
5070
5288
|
*/
|
|
5071
|
-
declare const buildEnvPrefix: (input: {
|
|
5289
|
+
export declare const buildEnvPrefix: (input: {
|
|
5072
5290
|
readonly conversationId: string;
|
|
5073
5291
|
readonly agentId: string;
|
|
5074
5292
|
readonly parentAgentId?: string;
|
|
@@ -5079,7 +5297,7 @@ declare const buildEnvPrefix: (input: {
|
|
|
5079
5297
|
* unchanged. When it matches, prepends the env prefix.
|
|
5080
5298
|
* @public
|
|
5081
5299
|
*/
|
|
5082
|
-
declare const rewriteBashCommand: (input: {
|
|
5300
|
+
export declare const rewriteBashCommand: (input: {
|
|
5083
5301
|
readonly command: string;
|
|
5084
5302
|
readonly vitestScripts: ReadonlySet<string>;
|
|
5085
5303
|
readonly conversationId: string;
|
|
@@ -5094,7 +5312,7 @@ declare const rewriteBashCommand: (input: {
|
|
|
5094
5312
|
* is a documented limitation.
|
|
5095
5313
|
* @public
|
|
5096
5314
|
*/
|
|
5097
|
-
declare const detectVitestScripts: (scripts: Record<string, string>) => Set<string>;
|
|
5315
|
+
export declare const detectVitestScripts: (scripts: Record<string, string>) => Set<string>;
|
|
5098
5316
|
//#endregion
|
|
5099
5317
|
//#region src/utils/normalize-workspace-key.d.ts
|
|
5100
5318
|
/**
|
|
@@ -5124,11 +5342,11 @@ declare const detectVitestScripts: (scripts: Record<string, string>) => Set<stri
|
|
|
5124
5342
|
* @returns A filesystem-safe single path segment.
|
|
5125
5343
|
* @public
|
|
5126
5344
|
*/
|
|
5127
|
-
declare function normalizeWorkspaceKey(name: string): string;
|
|
5345
|
+
export declare function normalizeWorkspaceKey(name: string): string;
|
|
5128
5346
|
//#endregion
|
|
5129
5347
|
//#region src/utils/probe-host-metadata.d.ts
|
|
5130
5348
|
/** @public */
|
|
5131
|
-
interface HostMetadataResult {
|
|
5349
|
+
export interface HostMetadataResult {
|
|
5132
5350
|
readonly source: string | null;
|
|
5133
5351
|
readonly value: string | null;
|
|
5134
5352
|
readonly metadata: Record<string, unknown> | null;
|
|
@@ -5153,19 +5371,19 @@ interface HostMetadataResult {
|
|
|
5153
5371
|
* 9. `process.ppid` walk (handled by the Live layer)
|
|
5154
5372
|
* @public
|
|
5155
5373
|
*/
|
|
5156
|
-
declare const probeHostMetadataFromEnv: (env: Record<string, string | undefined>) => HostMetadataResult;
|
|
5374
|
+
export declare const probeHostMetadataFromEnv: (env: Record<string, string | undefined>) => HostMetadataResult;
|
|
5157
5375
|
//#endregion
|
|
5158
5376
|
//#region src/utils/resolve-data-path.d.ts
|
|
5159
5377
|
/**
|
|
5160
5378
|
* Filename of the SQLite database that stores all reporter data.
|
|
5161
5379
|
* @public
|
|
5162
5380
|
*/
|
|
5163
|
-
declare const DATABASE_FILENAME = "data.db";
|
|
5381
|
+
export declare const DATABASE_FILENAME = "data.db";
|
|
5164
5382
|
/**
|
|
5165
5383
|
* Caller-supplied overrides for `resolveDataPath`.
|
|
5166
5384
|
* @public
|
|
5167
5385
|
*/
|
|
5168
|
-
interface ResolveDataPathOptions {
|
|
5386
|
+
export interface ResolveDataPathOptions {
|
|
5169
5387
|
/**
|
|
5170
5388
|
* Programmatic override for the entire data directory. Highest precedence.
|
|
5171
5389
|
*
|
|
@@ -5205,7 +5423,7 @@ interface ResolveDataPathOptions {
|
|
|
5205
5423
|
* @param options - Optional programmatic overrides.
|
|
5206
5424
|
* @public
|
|
5207
5425
|
*/
|
|
5208
|
-
declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<any, import("@effected/xdg").AppDirsError | import("effect/PlatformError").PlatformError | import("@effected/config-file").ConfigReadError, AppDirs | FileSystem.FileSystem | VitestAgentConfigFile>;
|
|
5426
|
+
export declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOptions) => Effect.Effect<any, import("@effected/xdg").AppDirsError | import("effect/PlatformError").PlatformError | import("@effected/config-file").ConfigReadError, AppDirs | FileSystem.FileSystem | VitestAgentConfigFile>;
|
|
5209
5427
|
//#endregion
|
|
5210
5428
|
//#region src/utils/resolve-project-key-from-cwd.d.ts
|
|
5211
5429
|
/**
|
|
@@ -5218,7 +5436,7 @@ declare const resolveDataPath: (projectDir: string, options?: ResolveDataPathOpt
|
|
|
5218
5436
|
* empty case.
|
|
5219
5437
|
* @public
|
|
5220
5438
|
*/
|
|
5221
|
-
declare const resolveProjectKeyFromCwd: (cwd: string) => string;
|
|
5439
|
+
export declare const resolveProjectKeyFromCwd: (cwd: string) => string;
|
|
5222
5440
|
//#endregion
|
|
5223
5441
|
//#region src/utils/resolve-workspace-key.d.ts
|
|
5224
5442
|
/**
|
|
@@ -5246,7 +5464,7 @@ declare const resolveProjectKeyFromCwd: (cwd: string) => string;
|
|
|
5246
5464
|
* reporter's resolved `projectDir` (CLAUDE_PROJECT_DIR or process.cwd()).
|
|
5247
5465
|
* @public
|
|
5248
5466
|
*/
|
|
5249
|
-
declare const resolveWorkspaceKey: (projectDir: string) => Effect.Effect<string, WorkspaceRootNotFoundError | WorkspaceDiscoveryFailure, WorkspaceDiscovery>;
|
|
5467
|
+
export declare const resolveWorkspaceKey: (projectDir: string) => Effect.Effect<string, WorkspaceRootNotFoundError | WorkspaceDiscoveryFailure, WorkspaceDiscovery>;
|
|
5250
5468
|
//#endregion
|
|
5251
5469
|
//#region src/utils/safe-filename.d.ts
|
|
5252
5470
|
/**
|
|
@@ -5275,17 +5493,17 @@ declare const resolveWorkspaceKey: (projectDir: string) => Effect.Effect<string,
|
|
|
5275
5493
|
*
|
|
5276
5494
|
* @public
|
|
5277
5495
|
*/
|
|
5278
|
-
declare function safeFilename(name: string): string;
|
|
5496
|
+
export declare function safeFilename(name: string): string;
|
|
5279
5497
|
//#endregion
|
|
5280
5498
|
//#region src/utils/test-location.d.ts
|
|
5281
5499
|
/** Directory holding source files whose tests may be co-located. @public */
|
|
5282
|
-
declare const SRC_DIR = "src";
|
|
5500
|
+
export declare const SRC_DIR = "src";
|
|
5283
5501
|
/** Canonical test directory name. @public */
|
|
5284
|
-
declare const TEST_DIR = "__test__";
|
|
5502
|
+
export declare const TEST_DIR = "__test__";
|
|
5285
5503
|
/** Support directories under `__test__/` that are never collected. @public */
|
|
5286
|
-
declare const TEST_HELPER_DIRS: readonly ["fixtures", "snapshots", "utils"];
|
|
5504
|
+
export declare const TEST_HELPER_DIRS: readonly ["fixtures", "snapshots", "utils"];
|
|
5287
5505
|
/** Glob suffix matching every discoverable test file. @public */
|
|
5288
|
-
declare const TEST_FILE_GLOB_SUFFIX = "*.{test,spec}.{ts,tsx,js,jsx}";
|
|
5506
|
+
export declare const TEST_FILE_GLOB_SUFFIX = "*.{test,spec}.{ts,tsx,js,jsx}";
|
|
5289
5507
|
/**
|
|
5290
5508
|
* Directory names discovery never walks into, and therefore never collects
|
|
5291
5509
|
* tests from. Keep in step with {@link TEST_FILE_GLOB_SUFFIX}'s extension set:
|
|
@@ -5298,7 +5516,7 @@ declare const TEST_FILE_GLOB_SUFFIX = "*.{test,spec}.{ts,tsx,js,jsx}";
|
|
|
5298
5516
|
* any path that crosses one.
|
|
5299
5517
|
* @public
|
|
5300
5518
|
*/
|
|
5301
|
-
declare const NON_DISCOVERABLE_DIRS: ReadonlySet<string>;
|
|
5519
|
+
export declare const NON_DISCOVERABLE_DIRS: ReadonlySet<string>;
|
|
5302
5520
|
/**
|
|
5303
5521
|
* True when `filePathOrName` ends in a discoverable test-file suffix — the
|
|
5304
5522
|
* extension half of the layout rule, matching {@link TEST_FILE_GLOB_SUFFIX}.
|
|
@@ -5308,7 +5526,7 @@ declare const NON_DISCOVERABLE_DIRS: ReadonlySet<string>;
|
|
|
5308
5526
|
* when the answer has to account for where the file sits.
|
|
5309
5527
|
* @public
|
|
5310
5528
|
*/
|
|
5311
|
-
declare function isTestFileName(filePathOrName: string): boolean;
|
|
5529
|
+
export declare function isTestFileName(filePathOrName: string): boolean;
|
|
5312
5530
|
/**
|
|
5313
5531
|
* Outcome of classifying a path against the test-layout rule.
|
|
5314
5532
|
*
|
|
@@ -5317,15 +5535,15 @@ declare function isTestFileName(filePathOrName: string): boolean;
|
|
|
5317
5535
|
* - `invalid` — not a legal test location.
|
|
5318
5536
|
* @public
|
|
5319
5537
|
*/
|
|
5320
|
-
type TestPathVerdict = "valid" | "excluded" | "invalid";
|
|
5538
|
+
export type TestPathVerdict = "valid" | "excluded" | "invalid";
|
|
5321
5539
|
/** Result of {@link classifyTestPath}. @public */
|
|
5322
|
-
interface TestPathClassification {
|
|
5540
|
+
export interface TestPathClassification {
|
|
5323
5541
|
readonly verdict: TestPathVerdict;
|
|
5324
5542
|
readonly workspace: string | null;
|
|
5325
5543
|
readonly suggestedPath: string | null;
|
|
5326
5544
|
}
|
|
5327
5545
|
/** Minimal workspace shape {@link classifyTestPath} needs to attribute a path. @public */
|
|
5328
|
-
interface WorkspaceLike {
|
|
5546
|
+
export interface WorkspaceLike {
|
|
5329
5547
|
readonly name: string;
|
|
5330
5548
|
readonly path: string;
|
|
5331
5549
|
}
|
|
@@ -5339,7 +5557,7 @@ interface WorkspaceLike {
|
|
|
5339
5557
|
* agree with {@link classifyTestPath} about which package owns it.
|
|
5340
5558
|
* @public
|
|
5341
5559
|
*/
|
|
5342
|
-
declare function findOwningWorkspace(workspaces: ReadonlyArray<WorkspaceLike>, filePath: string): WorkspaceLike | null;
|
|
5560
|
+
export declare function findOwningWorkspace(workspaces: ReadonlyArray<WorkspaceLike>, filePath: string): WorkspaceLike | null;
|
|
5343
5561
|
/**
|
|
5344
5562
|
* Classifies `filePath` against the test-layout rule: a test file is
|
|
5345
5563
|
* discoverable only at `<workspace>/src/**` or `<workspace>/__test__/**`,
|
|
@@ -5357,28 +5575,28 @@ declare function findOwningWorkspace(workspaces: ReadonlyArray<WorkspaceLike>, f
|
|
|
5357
5575
|
* when it fires — `@vitest-agent/cli`'s `agent check-test-path` does.
|
|
5358
5576
|
* @public
|
|
5359
5577
|
*/
|
|
5360
|
-
declare function classifyTestPath(workspaces: ReadonlyArray<WorkspaceLike>, filePath: string): TestPathClassification | null;
|
|
5578
|
+
export declare function classifyTestPath(workspaces: ReadonlyArray<WorkspaceLike>, filePath: string): TestPathClassification | null;
|
|
5361
5579
|
//#endregion
|
|
5362
5580
|
//#region src/utils/validate-coverage-targets-shape.d.ts
|
|
5363
5581
|
/** @public */
|
|
5364
|
-
interface CoverageTargetsShapeError {
|
|
5582
|
+
export interface CoverageTargetsShapeError {
|
|
5365
5583
|
readonly code: string;
|
|
5366
5584
|
readonly path: string;
|
|
5367
5585
|
readonly message: string;
|
|
5368
5586
|
}
|
|
5369
5587
|
/** @public */
|
|
5370
|
-
interface CoverageTargetsShapeWarning {
|
|
5588
|
+
export interface CoverageTargetsShapeWarning {
|
|
5371
5589
|
readonly code: string;
|
|
5372
5590
|
readonly path: string;
|
|
5373
5591
|
readonly message: string;
|
|
5374
5592
|
}
|
|
5375
5593
|
/** @public */
|
|
5376
|
-
interface CoverageTargetsShapeInfo {
|
|
5594
|
+
export interface CoverageTargetsShapeInfo {
|
|
5377
5595
|
readonly code: string;
|
|
5378
5596
|
readonly message: string;
|
|
5379
5597
|
}
|
|
5380
5598
|
/** @public */
|
|
5381
|
-
interface CoverageTargetsShapeResult {
|
|
5599
|
+
export interface CoverageTargetsShapeResult {
|
|
5382
5600
|
readonly errors: ReadonlyArray<CoverageTargetsShapeError>;
|
|
5383
5601
|
readonly warnings: ReadonlyArray<CoverageTargetsShapeWarning>;
|
|
5384
5602
|
readonly info: ReadonlyArray<CoverageTargetsShapeInfo>;
|
|
@@ -5399,7 +5617,7 @@ interface CoverageTargetsShapeResult {
|
|
|
5399
5617
|
* @returns A result object with errors, warnings, and info arrays.
|
|
5400
5618
|
* @public
|
|
5401
5619
|
*/
|
|
5402
|
-
declare function validateCoverageTargetsShape(input: unknown): CoverageTargetsShapeResult;
|
|
5620
|
+
export declare function validateCoverageTargetsShape(input: unknown): CoverageTargetsShapeResult;
|
|
5403
5621
|
//#endregion
|
|
5404
5622
|
//#region src/index.d.ts
|
|
5405
5623
|
/**
|
|
@@ -5410,7 +5628,7 @@ declare function validateCoverageTargetsShape(input: unknown): CoverageTargetsSh
|
|
|
5410
5628
|
* substituted yet. Exported for version introspection by downstream tooling.
|
|
5411
5629
|
* @public
|
|
5412
5630
|
*/
|
|
5413
|
-
declare const CURRENT_SDK_VERSION: string;
|
|
5631
|
+
export declare const CURRENT_SDK_VERSION: string;
|
|
5414
5632
|
//#endregion
|
|
5415
|
-
export {
|
|
5633
|
+
export { FileCoverageReport as CoverageFile, type FormatTriageOptions, type FormatWrapupOptions, type WrapupKind, migration as migration0001, migration$1 as registryMigration0001, migration$2 as sessionMapMigration0001 };
|
|
5416
5634
|
//# sourceMappingURL=index.d.ts.map
|