@kitman-sh/sdk 0.10.70 → 0.10.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build/index.js +2 -2
- package/dist/{chunk-kjkn6d60.js → chunk-stw541tr.js} +319 -278
- package/dist/{chunk-5qeam2w1.js → chunk-w2f4s9v2.js} +1 -1
- package/dist/loop/index.js +3 -1
- package/dist/program/index.js +2 -2
- package/package.json +1 -1
- package/types/packages/core/src/index.d.ts +1 -0
- package/types/packages/core/src/loop.d.ts +8 -0
- package/types/packages/core/src/test-report.d.ts +38 -0
- package/types/packages/core/src/work-unit.d.ts +72 -0
- package/types/packages/live/src/rpc/runner-client.d.ts +16 -0
- package/types/packages/live/src/rpc/runner-group.d.ts +271 -239
- package/types/packages/sdk/src/loop/evidence.d.ts +17 -1
- package/types/packages/sdk/src/loop/steps.d.ts +4 -0
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
executeLoop2,
|
|
34
34
|
LoopCheckError2,
|
|
35
35
|
checkLoop2
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-stw541tr.js";
|
|
37
37
|
// packages/core/src/agent-environment.ts
|
|
38
38
|
import * as Schema from "effect/Schema";
|
|
39
39
|
var AgentEnvironmentPolicy = Schema.Union([Schema.Literal("recommended"), Schema.Literal("required")]);
|
package/dist/loop/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
VerifyResult2,
|
|
12
12
|
OutcomeTable2,
|
|
13
13
|
failsOn2,
|
|
14
|
+
testsNotRunReasons2,
|
|
14
15
|
evidenceGate2,
|
|
15
16
|
StepFailed2,
|
|
16
17
|
OutputInvalid2,
|
|
@@ -173,7 +174,7 @@ import {
|
|
|
173
174
|
syncBase2,
|
|
174
175
|
Continuing2,
|
|
175
176
|
continuingBrief2
|
|
176
|
-
} from "../chunk-
|
|
177
|
+
} from "../chunk-stw541tr.js";
|
|
177
178
|
export {
|
|
178
179
|
AlertTaskActivity2 as AlertTaskActivity,
|
|
179
180
|
AlertTaskRequest2 as AlertTaskRequest,
|
|
@@ -343,6 +344,7 @@ export {
|
|
|
343
344
|
syncDeferred2 as syncDeferred,
|
|
344
345
|
takeStep2 as takeStep,
|
|
345
346
|
testLoop2 as testLoop,
|
|
347
|
+
testsNotRunReasons2 as testsNotRunReasons,
|
|
346
348
|
transcripts2 as transcripts,
|
|
347
349
|
verify2 as verify,
|
|
348
350
|
verifyDeferred2 as verifyDeferred,
|
package/dist/program/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-
|
|
2
|
+
import"../chunk-stw541tr.js";
|
|
3
3
|
import {
|
|
4
4
|
JournalWriteFailed2,
|
|
5
5
|
refusedStep2,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
networkGuard2,
|
|
18
18
|
carriedKits2,
|
|
19
19
|
runKit2
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-w2f4s9v2.js";
|
|
21
21
|
export {
|
|
22
22
|
Described2 as Described,
|
|
23
23
|
JournalWriteFailed2 as JournalWriteFailed,
|
package/package.json
CHANGED
|
@@ -30,6 +30,7 @@ export * from './runner-eligibility';
|
|
|
30
30
|
export * from './runner-trust';
|
|
31
31
|
export * from './platform-release';
|
|
32
32
|
export * from './work-unit';
|
|
33
|
+
export * from './test-report';
|
|
33
34
|
export * from './external-effect';
|
|
34
35
|
export * from './global-search';
|
|
35
36
|
export * from './change-delivery';
|
|
@@ -1185,6 +1185,10 @@ export declare const RunEvidence: Schema.Struct<{
|
|
|
1185
1185
|
readonly outputTail: Schema.String;
|
|
1186
1186
|
/** The Run Files the check kept in this Run: its log and what it recorded. */
|
|
1187
1187
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1188
|
+
/** The check's tests that ran on the baseline and were skipped on this tree. */
|
|
1189
|
+
readonly skippedSinceBaseline: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1190
|
+
/** The check's tests new on this tree that were skipped, so they never ran. */
|
|
1191
|
+
readonly newNotRun: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1188
1192
|
readonly recordedAt: Schema.String;
|
|
1189
1193
|
}>;
|
|
1190
1194
|
export type RunEvidence = (typeof RunEvidence)['Type'];
|
|
@@ -2771,6 +2775,10 @@ export declare const RunShow: Schema.Struct<{
|
|
|
2771
2775
|
readonly outputTail: Schema.String;
|
|
2772
2776
|
/** The Run Files the check kept in this Run: its log and what it recorded. */
|
|
2773
2777
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
2778
|
+
/** The check's tests that ran on the baseline and were skipped on this tree. */
|
|
2779
|
+
readonly skippedSinceBaseline: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
2780
|
+
/** The check's tests new on this tree that were skipped, so they never ran. */
|
|
2781
|
+
readonly newNotRun: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
2774
2782
|
readonly recordedAt: Schema.String;
|
|
2775
2783
|
}>>;
|
|
2776
2784
|
readonly steers: Schema.$Array<Schema.Struct<{
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/** A check's file in `KITMAN_RUN_FILES_DIR` that Kitman reads as a JUnit XML test report. */
|
|
3
|
+
export declare const isTestReportName: (name: string) => boolean;
|
|
4
|
+
/** What a check's JUnit reports say about its tests at one tree. */
|
|
5
|
+
export declare const CheckTests: Schema.Struct<{
|
|
6
|
+
/** How many reports were read; none means the check left no report, so nothing is known of its tests. */
|
|
7
|
+
readonly reports: Schema.Int;
|
|
8
|
+
readonly passed: Schema.Int;
|
|
9
|
+
readonly failed: Schema.Int;
|
|
10
|
+
readonly skipped: Schema.Int;
|
|
11
|
+
/** The ids of the skipped tests, as `file > suite > name`; the first `maxSkippedTests` when there are more. */
|
|
12
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
13
|
+
/** `testDigest` of each test that ran, so another tree's skips can be told new from dropped. */
|
|
14
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
15
|
+
}>;
|
|
16
|
+
export type CheckTests = typeof CheckTests.Type;
|
|
17
|
+
type TestCase = {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly status: 'passed' | 'failed' | 'skipped';
|
|
20
|
+
};
|
|
21
|
+
/** Each `<testcase>` of a JUnit XML report, as vitest's and `bun test`'s junit reporters write them. */
|
|
22
|
+
export declare const junitTestCases: (xml: string) => readonly TestCase[];
|
|
23
|
+
export declare const testDigest: (id: string) => string;
|
|
24
|
+
/** A check's tests from the JUnit reports it left; a test reported twice counts once, failed over skipped over passed. */
|
|
25
|
+
export declare const checkTests: (reports: readonly string[]) => CheckTests;
|
|
26
|
+
/** The head's tests verify never ran: skipped there, while the baseline ran them or did not have them. */
|
|
27
|
+
export type TestsNotRun = {
|
|
28
|
+
/** Skipped on the head, and ran on the baseline. */
|
|
29
|
+
readonly skippedSinceBaseline: readonly string[];
|
|
30
|
+
/** New on the head, and skipped there, so they never ran. */
|
|
31
|
+
readonly newNotRun: readonly string[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Compares a check's tests at the head with the baseline's. Without a baseline to compare, as when the head's tree is
|
|
35
|
+
* the baseline's, every skip is the baseline's; without a report on either side, nothing is known.
|
|
36
|
+
*/
|
|
37
|
+
export declare const testsNotRun: (head: CheckTests | undefined, baseline: CheckTests | undefined) => TestsNotRun | undefined;
|
|
38
|
+
export {};
|
|
@@ -757,6 +757,15 @@ export declare const CheckEvidence: Schema.Struct<{
|
|
|
757
757
|
readonly outputTail: Schema.String;
|
|
758
758
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
759
759
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
760
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
761
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
762
|
+
readonly reports: Schema.Int;
|
|
763
|
+
readonly passed: Schema.Int;
|
|
764
|
+
readonly failed: Schema.Int;
|
|
765
|
+
readonly skipped: Schema.Int;
|
|
766
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
767
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
768
|
+
}>>;
|
|
760
769
|
}>;
|
|
761
770
|
/** Checks run at one revision; `tree` is the revision's git tree id. Checks the tree already had are left out. */
|
|
762
771
|
export declare const TreeEvidence: Schema.Struct<{
|
|
@@ -772,6 +781,15 @@ export declare const TreeEvidence: Schema.Struct<{
|
|
|
772
781
|
readonly outputTail: Schema.String;
|
|
773
782
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
774
783
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
784
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
785
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
786
|
+
readonly reports: Schema.Int;
|
|
787
|
+
readonly passed: Schema.Int;
|
|
788
|
+
readonly failed: Schema.Int;
|
|
789
|
+
readonly skipped: Schema.Int;
|
|
790
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
791
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
792
|
+
}>>;
|
|
775
793
|
}>>;
|
|
776
794
|
}>;
|
|
777
795
|
export declare const VerificationEvidence: Schema.Struct<{
|
|
@@ -788,6 +806,15 @@ export declare const VerificationEvidence: Schema.Struct<{
|
|
|
788
806
|
readonly outputTail: Schema.String;
|
|
789
807
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
790
808
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
809
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
810
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
811
|
+
readonly reports: Schema.Int;
|
|
812
|
+
readonly passed: Schema.Int;
|
|
813
|
+
readonly failed: Schema.Int;
|
|
814
|
+
readonly skipped: Schema.Int;
|
|
815
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
816
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
817
|
+
}>>;
|
|
791
818
|
}>>;
|
|
792
819
|
}>;
|
|
793
820
|
readonly baseline: Schema.optionalKey<Schema.Struct<{
|
|
@@ -803,6 +830,15 @@ export declare const VerificationEvidence: Schema.Struct<{
|
|
|
803
830
|
readonly outputTail: Schema.String;
|
|
804
831
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
805
832
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
833
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
834
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
835
|
+
readonly reports: Schema.Int;
|
|
836
|
+
readonly passed: Schema.Int;
|
|
837
|
+
readonly failed: Schema.Int;
|
|
838
|
+
readonly skipped: Schema.Int;
|
|
839
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
840
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
841
|
+
}>>;
|
|
806
842
|
}>>;
|
|
807
843
|
}>>;
|
|
808
844
|
readonly measurement: Schema.optionalKey<Schema.Struct<{
|
|
@@ -898,6 +934,15 @@ export declare const WorkUnitOutcome: Schema.Struct<{
|
|
|
898
934
|
readonly outputTail: Schema.String;
|
|
899
935
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
900
936
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
937
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
938
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
939
|
+
readonly reports: Schema.Int;
|
|
940
|
+
readonly passed: Schema.Int;
|
|
941
|
+
readonly failed: Schema.Int;
|
|
942
|
+
readonly skipped: Schema.Int;
|
|
943
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
944
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
945
|
+
}>>;
|
|
901
946
|
}>>;
|
|
902
947
|
}>;
|
|
903
948
|
readonly baseline: Schema.optionalKey<Schema.Struct<{
|
|
@@ -913,6 +958,15 @@ export declare const WorkUnitOutcome: Schema.Struct<{
|
|
|
913
958
|
readonly outputTail: Schema.String;
|
|
914
959
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
915
960
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
961
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
962
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
963
|
+
readonly reports: Schema.Int;
|
|
964
|
+
readonly passed: Schema.Int;
|
|
965
|
+
readonly failed: Schema.Int;
|
|
966
|
+
readonly skipped: Schema.Int;
|
|
967
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
968
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
969
|
+
}>>;
|
|
916
970
|
}>>;
|
|
917
971
|
}>>;
|
|
918
972
|
readonly measurement: Schema.optionalKey<Schema.Struct<{
|
|
@@ -1009,6 +1063,15 @@ export declare const WorkUnitCompletion: Schema.Struct<{
|
|
|
1009
1063
|
readonly outputTail: Schema.String;
|
|
1010
1064
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
1011
1065
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1066
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
1067
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
1068
|
+
readonly reports: Schema.Int;
|
|
1069
|
+
readonly passed: Schema.Int;
|
|
1070
|
+
readonly failed: Schema.Int;
|
|
1071
|
+
readonly skipped: Schema.Int;
|
|
1072
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
1073
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
1074
|
+
}>>;
|
|
1012
1075
|
}>>;
|
|
1013
1076
|
}>;
|
|
1014
1077
|
readonly baseline: Schema.optionalKey<Schema.Struct<{
|
|
@@ -1024,6 +1087,15 @@ export declare const WorkUnitCompletion: Schema.Struct<{
|
|
|
1024
1087
|
readonly outputTail: Schema.String;
|
|
1025
1088
|
/** The Run Files the check kept: its log and what it left in `KITMAN_RUN_FILES_DIR`. */
|
|
1026
1089
|
readonly fileIds: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1090
|
+
/** What the JUnit reports the check left in `KITMAN_RUN_FILES_DIR` say; absent from older Runners. */
|
|
1091
|
+
readonly tests: Schema.optionalKey<Schema.Struct<{
|
|
1092
|
+
readonly reports: Schema.Int;
|
|
1093
|
+
readonly passed: Schema.Int;
|
|
1094
|
+
readonly failed: Schema.Int;
|
|
1095
|
+
readonly skipped: Schema.Int;
|
|
1096
|
+
readonly skippedTests: Schema.$Array<Schema.String>;
|
|
1097
|
+
readonly ranDigests: Schema.$Array<Schema.String>;
|
|
1098
|
+
}>>;
|
|
1027
1099
|
}>>;
|
|
1028
1100
|
}>>;
|
|
1029
1101
|
readonly measurement: Schema.optionalKey<Schema.Struct<{
|
|
@@ -447,6 +447,14 @@ export declare const makeRunnerRpcClient: (options: ConnectionOptions) => Effect
|
|
|
447
447
|
readonly durationMs: number;
|
|
448
448
|
readonly outputTail: string;
|
|
449
449
|
readonly fileIds?: readonly string[];
|
|
450
|
+
readonly tests?: {
|
|
451
|
+
readonly reports: number;
|
|
452
|
+
readonly passed: number;
|
|
453
|
+
readonly failed: number;
|
|
454
|
+
readonly skipped: number;
|
|
455
|
+
readonly skippedTests: readonly string[];
|
|
456
|
+
readonly ranDigests: readonly string[];
|
|
457
|
+
};
|
|
450
458
|
}[];
|
|
451
459
|
};
|
|
452
460
|
readonly baseline?: {
|
|
@@ -460,6 +468,14 @@ export declare const makeRunnerRpcClient: (options: ConnectionOptions) => Effect
|
|
|
460
468
|
readonly durationMs: number;
|
|
461
469
|
readonly outputTail: string;
|
|
462
470
|
readonly fileIds?: readonly string[];
|
|
471
|
+
readonly tests?: {
|
|
472
|
+
readonly reports: number;
|
|
473
|
+
readonly passed: number;
|
|
474
|
+
readonly failed: number;
|
|
475
|
+
readonly skipped: number;
|
|
476
|
+
readonly skippedTests: readonly string[];
|
|
477
|
+
readonly ranDigests: readonly string[];
|
|
478
|
+
};
|
|
463
479
|
}[];
|
|
464
480
|
};
|
|
465
481
|
readonly measurement?: {
|