tend-cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +595 -90
- package/dist/config-DPlVYfKX.js +3665 -0
- package/dist/index.d.ts +121 -39
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/config-tbp_HMuZ.js +0 -184970
package/dist/index.d.ts
CHANGED
|
@@ -76,9 +76,9 @@ declare const FindingSchema: z.ZodObject<{
|
|
|
76
76
|
track: z.ZodEnum<["ai-fix", "deterministic", "report-only"]>;
|
|
77
77
|
status: z.ZodEnum<["pending", "fixing", "fixed", "reverted", "unfixable", "skipped"]>;
|
|
78
78
|
attempts: z.ZodNumber;
|
|
79
|
-
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update"]>>;
|
|
79
|
+
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed"]>>;
|
|
80
80
|
revertDetail: z.ZodOptional<z.ZodString>;
|
|
81
|
-
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
81
|
+
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
82
82
|
firstSeenLoop: z.ZodNumber;
|
|
83
83
|
lastSeenLoop: z.ZodNumber;
|
|
84
84
|
inScope: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -122,9 +122,9 @@ declare const FindingSchema: z.ZodObject<{
|
|
|
122
122
|
autofixable?: boolean | undefined;
|
|
123
123
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
124
124
|
repairStrategyReason?: string | undefined;
|
|
125
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
125
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
126
126
|
revertDetail?: string | undefined;
|
|
127
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
127
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
128
128
|
inScope?: boolean | undefined;
|
|
129
129
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
130
130
|
}, {
|
|
@@ -162,9 +162,9 @@ declare const FindingSchema: z.ZodObject<{
|
|
|
162
162
|
autofixable?: boolean | undefined;
|
|
163
163
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
164
164
|
repairStrategyReason?: string | undefined;
|
|
165
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
165
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
166
166
|
revertDetail?: string | undefined;
|
|
167
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
167
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
168
168
|
inScope?: boolean | undefined;
|
|
169
169
|
inReportScope?: boolean | undefined;
|
|
170
170
|
inFixScope?: boolean | undefined;
|
|
@@ -237,7 +237,7 @@ type SessionRequest = {
|
|
|
237
237
|
/** The fully-rendered prompt for the AI. */
|
|
238
238
|
prompt: string;
|
|
239
239
|
};
|
|
240
|
-
type FailureClass = "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update";
|
|
240
|
+
type FailureClass = "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update";
|
|
241
241
|
/**
|
|
242
242
|
* Estimated AI cost/usage for a unit of work. `total_cost_usd` from Claude's
|
|
243
243
|
* stream-json `result` message is a **client-side estimate**, never authoritative
|
|
@@ -490,6 +490,11 @@ declare function dispatch<T>(units: WorkUnit[], runUnit: (unit: WorkUnit) => Pro
|
|
|
490
490
|
concurrency: number;
|
|
491
491
|
}): Promise<T[]>;
|
|
492
492
|
|
|
493
|
+
//#endregion
|
|
494
|
+
//#region src/fixing/progress.d.ts
|
|
495
|
+
declare const FIX_STAGES: readonly ["ai-edit", "ai-no-edit-retry", "anti-suppression", "typecheck", "build", "related-tests", "test-repair", "rescan", "regression-check", "regression-repair", "patch-apply", "patch-conflict", "sandbox-setup", "final-integration"];
|
|
496
|
+
type FixStage = (typeof FIX_STAGES)[number];
|
|
497
|
+
|
|
493
498
|
//#endregion
|
|
494
499
|
//#region src/output/events.d.ts
|
|
495
500
|
/** What happened to a file in the current dispatched batch. "left" = not attempted. */
|
|
@@ -504,6 +509,17 @@ type TendEvent = {
|
|
|
504
509
|
} | {
|
|
505
510
|
type: "scan-start";
|
|
506
511
|
loop: number;
|
|
512
|
+
} | {
|
|
513
|
+
type: "scanner-start";
|
|
514
|
+
loop: number;
|
|
515
|
+
tool: Tool;
|
|
516
|
+
} | {
|
|
517
|
+
type: "scanner-result";
|
|
518
|
+
loop: number;
|
|
519
|
+
tool: Tool;
|
|
520
|
+
status: ScannerStatusKind;
|
|
521
|
+
findings: number;
|
|
522
|
+
reason?: string;
|
|
507
523
|
} | {
|
|
508
524
|
type: "audit";
|
|
509
525
|
loop: number;
|
|
@@ -520,6 +536,12 @@ type TendEvent = {
|
|
|
520
536
|
loop: number;
|
|
521
537
|
file: string;
|
|
522
538
|
rule?: string;
|
|
539
|
+
} | {
|
|
540
|
+
type: "file-stage";
|
|
541
|
+
loop: number;
|
|
542
|
+
file: string;
|
|
543
|
+
stage: FixStage;
|
|
544
|
+
detail?: string;
|
|
523
545
|
} | {
|
|
524
546
|
type: "file-result";
|
|
525
547
|
loop: number;
|
|
@@ -626,6 +648,19 @@ declare const FixPolicySchema: z.ZodDefault<z.ZodObject<{
|
|
|
626
648
|
includeGenerated?: boolean | undefined;
|
|
627
649
|
includeFixtures?: boolean | undefined;
|
|
628
650
|
}>>;
|
|
651
|
+
declare const FinalIntegrationSchema: z.ZodObject<{
|
|
652
|
+
ok: z.ZodBoolean;
|
|
653
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
654
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
655
|
+
}, "strip", z.ZodTypeAny, {
|
|
656
|
+
ok: boolean;
|
|
657
|
+
files: string[];
|
|
658
|
+
detail?: string | undefined;
|
|
659
|
+
}, {
|
|
660
|
+
ok: boolean;
|
|
661
|
+
files?: string[] | undefined;
|
|
662
|
+
detail?: string | undefined;
|
|
663
|
+
}>;
|
|
629
664
|
declare const ReportSchema: z.ZodObject<{
|
|
630
665
|
findings: z.ZodArray<z.ZodObject<{
|
|
631
666
|
id: z.ZodString;
|
|
@@ -698,9 +733,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
698
733
|
track: z.ZodEnum<["ai-fix", "deterministic", "report-only"]>;
|
|
699
734
|
status: z.ZodEnum<["pending", "fixing", "fixed", "reverted", "unfixable", "skipped"]>;
|
|
700
735
|
attempts: z.ZodNumber;
|
|
701
|
-
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update"]>>;
|
|
736
|
+
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed"]>>;
|
|
702
737
|
revertDetail: z.ZodOptional<z.ZodString>;
|
|
703
|
-
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
738
|
+
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
704
739
|
firstSeenLoop: z.ZodNumber;
|
|
705
740
|
lastSeenLoop: z.ZodNumber;
|
|
706
741
|
inScope: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -744,9 +779,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
744
779
|
autofixable?: boolean | undefined;
|
|
745
780
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
746
781
|
repairStrategyReason?: string | undefined;
|
|
747
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
782
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
748
783
|
revertDetail?: string | undefined;
|
|
749
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
784
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
750
785
|
inScope?: boolean | undefined;
|
|
751
786
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
752
787
|
}, {
|
|
@@ -784,9 +819,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
784
819
|
autofixable?: boolean | undefined;
|
|
785
820
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
786
821
|
repairStrategyReason?: string | undefined;
|
|
787
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
822
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
788
823
|
revertDetail?: string | undefined;
|
|
789
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
824
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
790
825
|
inScope?: boolean | undefined;
|
|
791
826
|
inReportScope?: boolean | undefined;
|
|
792
827
|
inFixScope?: boolean | undefined;
|
|
@@ -863,9 +898,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
863
898
|
track: z.ZodEnum<["ai-fix", "deterministic", "report-only"]>;
|
|
864
899
|
status: z.ZodEnum<["pending", "fixing", "fixed", "reverted", "unfixable", "skipped"]>;
|
|
865
900
|
attempts: z.ZodNumber;
|
|
866
|
-
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update"]>>;
|
|
901
|
+
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed"]>>;
|
|
867
902
|
revertDetail: z.ZodOptional<z.ZodString>;
|
|
868
|
-
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
903
|
+
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
869
904
|
firstSeenLoop: z.ZodNumber;
|
|
870
905
|
lastSeenLoop: z.ZodNumber;
|
|
871
906
|
inScope: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -909,9 +944,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
909
944
|
autofixable?: boolean | undefined;
|
|
910
945
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
911
946
|
repairStrategyReason?: string | undefined;
|
|
912
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
947
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
913
948
|
revertDetail?: string | undefined;
|
|
914
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
949
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
915
950
|
inScope?: boolean | undefined;
|
|
916
951
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
917
952
|
}, {
|
|
@@ -949,9 +984,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
949
984
|
autofixable?: boolean | undefined;
|
|
950
985
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
951
986
|
repairStrategyReason?: string | undefined;
|
|
952
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
987
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
953
988
|
revertDetail?: string | undefined;
|
|
954
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
989
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
955
990
|
inScope?: boolean | undefined;
|
|
956
991
|
inReportScope?: boolean | undefined;
|
|
957
992
|
inFixScope?: boolean | undefined;
|
|
@@ -1028,9 +1063,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1028
1063
|
track: z.ZodEnum<["ai-fix", "deterministic", "report-only"]>;
|
|
1029
1064
|
status: z.ZodEnum<["pending", "fixing", "fixed", "reverted", "unfixable", "skipped"]>;
|
|
1030
1065
|
attempts: z.ZodNumber;
|
|
1031
|
-
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update"]>>;
|
|
1066
|
+
revertReason: z.ZodOptional<z.ZodEnum<["broke-test", "suppression", "regression", "typecheck", "session-error", "needs-lockfile-update", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed"]>>;
|
|
1032
1067
|
revertDetail: z.ZodOptional<z.ZodString>;
|
|
1033
|
-
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
1068
|
+
finalFailureClass: z.ZodOptional<z.ZodEnum<["tool-timeout", "rate-limit", "model-tool-failure", "sandbox-setup-failed", "patch-conflict", "unowned-patch", "final-integration-failed", "no-edit", "no-op", "regression", "typecheck", "broke-test", "suppression", "needs-lockfile-update"]>>;
|
|
1034
1069
|
firstSeenLoop: z.ZodNumber;
|
|
1035
1070
|
lastSeenLoop: z.ZodNumber;
|
|
1036
1071
|
inScope: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1074,9 +1109,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1074
1109
|
autofixable?: boolean | undefined;
|
|
1075
1110
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1076
1111
|
repairStrategyReason?: string | undefined;
|
|
1077
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1112
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1078
1113
|
revertDetail?: string | undefined;
|
|
1079
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1114
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1080
1115
|
inScope?: boolean | undefined;
|
|
1081
1116
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
1082
1117
|
}, {
|
|
@@ -1114,9 +1149,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1114
1149
|
autofixable?: boolean | undefined;
|
|
1115
1150
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1116
1151
|
repairStrategyReason?: string | undefined;
|
|
1117
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1152
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1118
1153
|
revertDetail?: string | undefined;
|
|
1119
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1154
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1120
1155
|
inScope?: boolean | undefined;
|
|
1121
1156
|
inReportScope?: boolean | undefined;
|
|
1122
1157
|
inFixScope?: boolean | undefined;
|
|
@@ -1218,6 +1253,10 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1218
1253
|
regressions: z.ZodNumber;
|
|
1219
1254
|
typecheckFailures: z.ZodNumber;
|
|
1220
1255
|
testFailures: z.ZodNumber;
|
|
1256
|
+
sandboxSetupFailures: z.ZodDefault<z.ZodNumber>;
|
|
1257
|
+
patchConflicts: z.ZodDefault<z.ZodNumber>;
|
|
1258
|
+
unownedPatches: z.ZodDefault<z.ZodNumber>;
|
|
1259
|
+
finalIntegrationFailures: z.ZodDefault<z.ZodNumber>;
|
|
1221
1260
|
}, "strip", z.ZodTypeAny, {
|
|
1222
1261
|
blockingSecrets: number;
|
|
1223
1262
|
unresolvedEligible: number;
|
|
@@ -1227,6 +1266,10 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1227
1266
|
regressions: number;
|
|
1228
1267
|
typecheckFailures: number;
|
|
1229
1268
|
testFailures: number;
|
|
1269
|
+
sandboxSetupFailures: number;
|
|
1270
|
+
patchConflicts: number;
|
|
1271
|
+
unownedPatches: number;
|
|
1272
|
+
finalIntegrationFailures: number;
|
|
1230
1273
|
}, {
|
|
1231
1274
|
blockingSecrets: number;
|
|
1232
1275
|
unresolvedEligible: number;
|
|
@@ -1236,6 +1279,23 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1236
1279
|
regressions: number;
|
|
1237
1280
|
typecheckFailures: number;
|
|
1238
1281
|
testFailures: number;
|
|
1282
|
+
sandboxSetupFailures?: number | undefined;
|
|
1283
|
+
patchConflicts?: number | undefined;
|
|
1284
|
+
unownedPatches?: number | undefined;
|
|
1285
|
+
finalIntegrationFailures?: number | undefined;
|
|
1286
|
+
}>>;
|
|
1287
|
+
finalIntegration: z.ZodOptional<z.ZodObject<{
|
|
1288
|
+
ok: z.ZodBoolean;
|
|
1289
|
+
files: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1290
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1291
|
+
}, "strip", z.ZodTypeAny, {
|
|
1292
|
+
ok: boolean;
|
|
1293
|
+
files: string[];
|
|
1294
|
+
detail?: string | undefined;
|
|
1295
|
+
}, {
|
|
1296
|
+
ok: boolean;
|
|
1297
|
+
files?: string[] | undefined;
|
|
1298
|
+
detail?: string | undefined;
|
|
1239
1299
|
}>>;
|
|
1240
1300
|
unresolvedEligibleCount: z.ZodDefault<z.ZodNumber>;
|
|
1241
1301
|
loops: z.ZodNumber;
|
|
@@ -1279,9 +1339,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1279
1339
|
autofixable?: boolean | undefined;
|
|
1280
1340
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1281
1341
|
repairStrategyReason?: string | undefined;
|
|
1282
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1342
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1283
1343
|
revertDetail?: string | undefined;
|
|
1284
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1344
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1285
1345
|
inScope?: boolean | undefined;
|
|
1286
1346
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
1287
1347
|
}[];
|
|
@@ -1322,9 +1382,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1322
1382
|
autofixable?: boolean | undefined;
|
|
1323
1383
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1324
1384
|
repairStrategyReason?: string | undefined;
|
|
1325
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1385
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1326
1386
|
revertDetail?: string | undefined;
|
|
1327
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1387
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1328
1388
|
inScope?: boolean | undefined;
|
|
1329
1389
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
1330
1390
|
}[];
|
|
@@ -1365,9 +1425,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1365
1425
|
autofixable?: boolean | undefined;
|
|
1366
1426
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1367
1427
|
repairStrategyReason?: string | undefined;
|
|
1368
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1428
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1369
1429
|
revertDetail?: string | undefined;
|
|
1370
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1430
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1371
1431
|
inScope?: boolean | undefined;
|
|
1372
1432
|
scopeExclusionReason?: "generated" | "fixtures" | "tests" | "out-of-scope" | undefined;
|
|
1373
1433
|
}[];
|
|
@@ -1413,11 +1473,20 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1413
1473
|
regressions: number;
|
|
1414
1474
|
typecheckFailures: number;
|
|
1415
1475
|
testFailures: number;
|
|
1476
|
+
sandboxSetupFailures: number;
|
|
1477
|
+
patchConflicts: number;
|
|
1478
|
+
unownedPatches: number;
|
|
1479
|
+
finalIntegrationFailures: number;
|
|
1416
1480
|
};
|
|
1417
1481
|
unresolvedEligibleCount: number;
|
|
1418
1482
|
loops: number;
|
|
1419
1483
|
durationMs: number;
|
|
1420
1484
|
exitStatus: number;
|
|
1485
|
+
finalIntegration?: {
|
|
1486
|
+
ok: boolean;
|
|
1487
|
+
files: string[];
|
|
1488
|
+
detail?: string | undefined;
|
|
1489
|
+
} | undefined;
|
|
1421
1490
|
}, {
|
|
1422
1491
|
findings: {
|
|
1423
1492
|
id: string;
|
|
@@ -1454,9 +1523,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1454
1523
|
autofixable?: boolean | undefined;
|
|
1455
1524
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1456
1525
|
repairStrategyReason?: string | undefined;
|
|
1457
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1526
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1458
1527
|
revertDetail?: string | undefined;
|
|
1459
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1528
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1460
1529
|
inScope?: boolean | undefined;
|
|
1461
1530
|
inReportScope?: boolean | undefined;
|
|
1462
1531
|
inFixScope?: boolean | undefined;
|
|
@@ -1497,9 +1566,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1497
1566
|
autofixable?: boolean | undefined;
|
|
1498
1567
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1499
1568
|
repairStrategyReason?: string | undefined;
|
|
1500
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1569
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1501
1570
|
revertDetail?: string | undefined;
|
|
1502
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1571
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1503
1572
|
inScope?: boolean | undefined;
|
|
1504
1573
|
inReportScope?: boolean | undefined;
|
|
1505
1574
|
inFixScope?: boolean | undefined;
|
|
@@ -1552,9 +1621,9 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1552
1621
|
autofixable?: boolean | undefined;
|
|
1553
1622
|
repairStrategy?: "deterministic-eslint-fix" | "deterministic-ts-organize-imports" | "deterministic-package-json-cleanup" | "single-file-ai-edit" | "multi-file-duplicate-refactor" | "generated-source-repair" | "test-file-repair" | "dead-code-cleanup" | "unsupported" | undefined;
|
|
1554
1623
|
repairStrategyReason?: string | undefined;
|
|
1555
|
-
revertReason?: "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1624
|
+
revertReason?: "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | "session-error" | undefined;
|
|
1556
1625
|
revertDetail?: string | undefined;
|
|
1557
|
-
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1626
|
+
finalFailureClass?: "tool-timeout" | "rate-limit" | "model-tool-failure" | "sandbox-setup-failed" | "patch-conflict" | "unowned-patch" | "final-integration-failed" | "no-edit" | "no-op" | "regression" | "typecheck" | "broke-test" | "suppression" | "needs-lockfile-update" | undefined;
|
|
1558
1627
|
inScope?: boolean | undefined;
|
|
1559
1628
|
inReportScope?: boolean | undefined;
|
|
1560
1629
|
inFixScope?: boolean | undefined;
|
|
@@ -1593,6 +1662,15 @@ declare const ReportSchema: z.ZodObject<{
|
|
|
1593
1662
|
regressions: number;
|
|
1594
1663
|
typecheckFailures: number;
|
|
1595
1664
|
testFailures: number;
|
|
1665
|
+
sandboxSetupFailures?: number | undefined;
|
|
1666
|
+
patchConflicts?: number | undefined;
|
|
1667
|
+
unownedPatches?: number | undefined;
|
|
1668
|
+
finalIntegrationFailures?: number | undefined;
|
|
1669
|
+
} | undefined;
|
|
1670
|
+
finalIntegration?: {
|
|
1671
|
+
ok: boolean;
|
|
1672
|
+
files?: string[] | undefined;
|
|
1673
|
+
detail?: string | undefined;
|
|
1596
1674
|
} | undefined;
|
|
1597
1675
|
unresolvedEligibleCount?: number | undefined;
|
|
1598
1676
|
}>;
|
|
@@ -1601,7 +1679,8 @@ type BehaviorChange = z.infer<typeof BehaviorChangeSchema>;
|
|
|
1601
1679
|
type ScannerStatus = z.infer<typeof ScannerStatusSchema>;
|
|
1602
1680
|
type AiUsage$1 = z.infer<typeof AiUsageSchema>;
|
|
1603
1681
|
type RunScope = z.infer<typeof RunScopeSchema>;
|
|
1604
|
-
type FixPolicy = z.infer<typeof FixPolicySchema>;
|
|
1682
|
+
type FixPolicy = z.infer<typeof FixPolicySchema>;
|
|
1683
|
+
type FinalIntegration = z.infer<typeof FinalIntegrationSchema>; //#endregion
|
|
1605
1684
|
//#region src/orchestrator.d.ts
|
|
1606
1685
|
type AuditResult = {
|
|
1607
1686
|
findings: Finding[];
|
|
@@ -1680,7 +1759,7 @@ type UnitGateDeps = {
|
|
|
1680
1759
|
}>;
|
|
1681
1760
|
hasTestRunner: boolean;
|
|
1682
1761
|
runRelated: (files: string[]) => Promise<TestOutcome[]>;
|
|
1683
|
-
scanFindings: (files: string[]) => Promise<Finding[]>;
|
|
1762
|
+
scanFindings: (files: string[], tools?: Tool[]) => Promise<Finding[]>;
|
|
1684
1763
|
baseline: Set<string>;
|
|
1685
1764
|
};
|
|
1686
1765
|
|
|
@@ -1729,6 +1808,8 @@ declare class Snapshot {
|
|
|
1729
1808
|
root: string;
|
|
1730
1809
|
sha: string;
|
|
1731
1810
|
};
|
|
1811
|
+
commitSha(): string;
|
|
1812
|
+
repoRoot(): string;
|
|
1732
1813
|
static fromJSON(data: {
|
|
1733
1814
|
cwd: string;
|
|
1734
1815
|
root: string;
|
|
@@ -1888,6 +1969,7 @@ declare class ReportBuilder {
|
|
|
1888
1969
|
aiUsage?: AiUsage$1;
|
|
1889
1970
|
runScope?: RunScope;
|
|
1890
1971
|
fixPolicy?: FixPolicy;
|
|
1972
|
+
finalIntegration?: FinalIntegration;
|
|
1891
1973
|
}): Report;
|
|
1892
1974
|
}
|
|
1893
1975
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClaudeSession, ConfigSchema, EventBus, FindingSchema, FindingStore, REPAIR_STRATEGIES, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, applyRepairPlanToFinding, assertGitRepo, buildProgram, changedFiles, changedVsHead, detectPackageManager, dispatch, filterToChanged, fingerprint, groupRemaining, isAiDispatchStrategy, isAvailable, loadConfig, makeDeterministicFixUnit, makeDeterministicFixer, normalize, orchestrate, planRepair, planWork, planWorkFromRepairs, renderSummary, retryCommand, revertFile, route, runScanner, scopeFindings, showCommand, trackForTool, zeroUsage } from "./config-
|
|
1
|
+
import { ClaudeSession, ConfigSchema, EventBus, FindingSchema, FindingStore, REPAIR_STRATEGIES, ReportBuilder, ReportSchema, Snapshot, addUsage, applyCliOverrides, applyRepairPlanToFinding, assertGitRepo, buildProgram, changedFiles, changedVsHead, detectPackageManager, dispatch, filterToChanged, fingerprint, groupRemaining, isAiDispatchStrategy, isAvailable, loadConfig, makeDeterministicFixUnit, makeDeterministicFixer, normalize, orchestrate, planRepair, planWork, planWorkFromRepairs, renderSummary, retryCommand, revertFile, route, runScanner, scopeFindings, showCommand, trackForTool, zeroUsage } from "./config-DPlVYfKX.js";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname } from "node:path";
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tend-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Audit a JS/TS repo with established scanners, then fix the findings with parallel AI sessions in a safe scan-fix-rescan loop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"nanoid": "^5.1.6",
|
|
64
64
|
"p-queue": "^8.1.0",
|
|
65
65
|
"simple-git": "^3.27.0",
|
|
66
|
+
"typescript": "^5.7.3",
|
|
66
67
|
"typescript-eslint": "^8.20.0",
|
|
67
68
|
"zod": "^3.24.1"
|
|
68
69
|
},
|
|
@@ -70,7 +71,6 @@
|
|
|
70
71
|
"@types/node": "^22.10.5",
|
|
71
72
|
"@vitest/coverage-v8": "^4.1.5",
|
|
72
73
|
"tsdown": "^0.9.6",
|
|
73
|
-
"typescript": "^5.7.3",
|
|
74
74
|
"vitest": "^4.0.14"
|
|
75
75
|
}
|
|
76
76
|
}
|