audit-tools 0.30.3 → 0.30.5
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/audit/cli/auditStep.d.ts.map +1 -1
- package/dist/audit/cli/auditStep.js +24 -13
- package/dist/audit/cli/auditStep.js.map +1 -1
- package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
- package/dist/audit/cli/nextStepHelpers.js +11 -6
- package/dist/audit/cli/nextStepHelpers.js.map +1 -1
- package/dist/audit/cli/reviewRun.d.ts.map +1 -1
- package/dist/audit/cli/reviewRun.js +9 -4
- package/dist/audit/cli/reviewRun.js.map +1 -1
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts +75 -0
- package/dist/audit/contracts/schemaEnforcedEmit.d.ts.map +1 -0
- package/dist/audit/contracts/schemaEnforcedEmit.js +131 -0
- package/dist/audit/contracts/schemaEnforcedEmit.js.map +1 -0
- package/dist/audit/contracts/workerSchemas.d.ts +22 -4
- package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
- package/dist/audit/contracts/wrapperResponse.d.ts +18 -18
- package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts +140 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.d.ts.map +1 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.js +262 -0
- package/dist/audit/extractors/analyzers/acquisitionEngine.js.map +1 -0
- package/dist/audit/extractors/analyzers/registry.d.ts +2 -0
- package/dist/audit/extractors/analyzers/registry.d.ts.map +1 -1
- package/dist/audit/extractors/analyzers/registry.js +5 -0
- package/dist/audit/extractors/analyzers/registry.js.map +1 -1
- package/dist/audit/extractors/gitHistory.d.ts +46 -0
- package/dist/audit/extractors/gitHistory.d.ts.map +1 -0
- package/dist/audit/extractors/gitHistory.js +97 -0
- package/dist/audit/extractors/gitHistory.js.map +1 -0
- package/dist/audit/extractors/graph.d.ts +19 -1
- package/dist/audit/extractors/graph.d.ts.map +1 -1
- package/dist/audit/extractors/graph.js +31 -0
- package/dist/audit/extractors/graph.js.map +1 -1
- package/dist/audit/extractors/risk.d.ts +16 -0
- package/dist/audit/extractors/risk.d.ts.map +1 -1
- package/dist/audit/extractors/risk.js +28 -0
- package/dist/audit/extractors/risk.js.map +1 -1
- package/dist/audit/io/artifacts.d.ts +3 -1
- package/dist/audit/io/artifacts.d.ts.map +1 -1
- package/dist/audit/io/artifacts.js +1 -0
- package/dist/audit/io/artifacts.js.map +1 -1
- package/dist/audit/orchestrator/artifactFreshness.d.ts +2 -1
- package/dist/audit/orchestrator/artifactFreshness.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactFreshness.js +5 -15
- package/dist/audit/orchestrator/artifactFreshness.js.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/orchestrator/artifactMetadata.js +24 -3
- package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.d.ts +7 -0
- package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
- package/dist/audit/orchestrator/dependencyMap.js +5 -1
- package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
- package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
- package/dist/audit/orchestrator/executorRunners.js +10 -9
- package/dist/audit/orchestrator/executorRunners.js.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.d.ts.map +1 -1
- package/dist/audit/orchestrator/ingestionExecutors.js +5 -1
- package/dist/audit/orchestrator/ingestionExecutors.js.map +1 -1
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts +129 -0
- package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -0
- package/dist/audit/orchestrator/intentCheckpointGate.js +193 -0
- package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -0
- package/dist/audit/orchestrator/ledger.d.ts +30 -0
- package/dist/audit/orchestrator/ledger.d.ts.map +1 -0
- package/dist/audit/orchestrator/ledger.js +126 -0
- package/dist/audit/orchestrator/ledger.js.map +1 -0
- package/dist/audit/orchestrator/nextStep.d.ts +11 -29
- package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
- package/dist/audit/orchestrator/nextStep.js +11 -29
- package/dist/audit/orchestrator/nextStep.js.map +1 -1
- package/dist/audit/orchestrator/resultBaseline.d.ts +136 -0
- package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -0
- package/dist/audit/orchestrator/resultBaseline.js +138 -0
- package/dist/audit/orchestrator/resultBaseline.js.map +1 -0
- package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
- package/dist/audit/orchestrator/staleness.js +25 -1
- package/dist/audit/orchestrator/staleness.js.map +1 -1
- package/dist/audit/quota/index.d.ts +32 -32
- package/dist/audit/types/artifactMetadata.d.ts +34 -0
- package/dist/audit/types/artifactMetadata.d.ts.map +1 -1
- package/dist/audit/types/artifactMetadata.js +10 -1
- package/dist/audit/types/artifactMetadata.js.map +1 -1
- package/dist/audit/types.d.ts +13 -4
- package/dist/audit/types.d.ts.map +1 -1
- package/dist/audit/types.js +8 -0
- package/dist/audit/types.js.map +1 -1
- package/dist/remediate/steps/nextStep.d.ts +11 -23
- package/dist/remediate/steps/nextStep.d.ts.map +1 -1
- package/dist/remediate/steps/nextStep.js +45 -43
- package/dist/remediate/steps/nextStep.js.map +1 -1
- package/dist/shared/contentKey.d.ts +83 -0
- package/dist/shared/contentKey.d.ts.map +1 -0
- package/dist/shared/contentKey.js +163 -0
- package/dist/shared/contentKey.js.map +1 -0
- package/dist/shared/friction/captureFrictionEvent.d.ts +50 -0
- package/dist/shared/friction/captureFrictionEvent.d.ts.map +1 -0
- package/dist/shared/friction/captureFrictionEvent.js +34 -0
- package/dist/shared/friction/captureFrictionEvent.js.map +1 -0
- package/dist/shared/friction/triage.d.ts +126 -0
- package/dist/shared/friction/triage.d.ts.map +1 -0
- package/dist/shared/friction/triage.js +149 -0
- package/dist/shared/friction/triage.js.map +1 -0
- package/dist/shared/git.d.ts +41 -0
- package/dist/shared/git.d.ts.map +1 -1
- package/dist/shared/git.js +119 -0
- package/dist/shared/git.js.map +1 -1
- package/dist/shared/index.d.ts +17 -5
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +11 -4
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/io/auditToolsPaths.d.ts +9 -0
- package/dist/shared/io/auditToolsPaths.d.ts.map +1 -1
- package/dist/shared/io/auditToolsPaths.js +11 -0
- package/dist/shared/io/auditToolsPaths.js.map +1 -1
- package/dist/shared/io/frictionCapture.d.ts +2 -0
- package/dist/shared/io/frictionCapture.d.ts.map +1 -1
- package/dist/shared/io/frictionCapture.js +1 -1
- package/dist/shared/io/frictionCapture.js.map +1 -1
- package/dist/shared/providers/providerFactory.d.ts +16 -1
- package/dist/shared/providers/providerFactory.d.ts.map +1 -1
- package/dist/shared/providers/providerFactory.js +43 -0
- package/dist/shared/providers/providerFactory.js.map +1 -1
- package/dist/shared/providers/types.d.ts +40 -0
- package/dist/shared/providers/types.d.ts.map +1 -1
- package/dist/shared/quota/capacity.d.ts +12 -12
- package/dist/shared/quota/quotaSource.d.ts +2 -2
- package/dist/shared/quota/types.d.ts +4 -4
- package/dist/shared/repair/brokeredDispatch.d.ts +147 -0
- package/dist/shared/repair/brokeredDispatch.d.ts.map +1 -0
- package/dist/shared/repair/brokeredDispatch.js +220 -0
- package/dist/shared/repair/brokeredDispatch.js.map +1 -0
- package/dist/shared/repair/emitValidateRepair.d.ts +124 -0
- package/dist/shared/repair/emitValidateRepair.d.ts.map +1 -0
- package/dist/shared/repair/emitValidateRepair.js +179 -0
- package/dist/shared/repair/emitValidateRepair.js.map +1 -0
- package/dist/shared/repair/index.d.ts +10 -0
- package/dist/shared/repair/index.d.ts.map +1 -0
- package/dist/shared/repair/index.js +3 -0
- package/dist/shared/repair/index.js.map +1 -0
- package/dist/shared/stableStringify.d.ts +14 -0
- package/dist/shared/stableStringify.d.ts.map +1 -0
- package/dist/shared/stableStringify.js +28 -0
- package/dist/shared/stableStringify.js.map +1 -0
- package/package.json +1 -1
- package/schemas/audit_result.schema.json +9 -0
- package/schemas/audit_results.schema.json +9 -0
|
@@ -327,6 +327,9 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
327
327
|
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
328
328
|
requires_followup: z.ZodOptional<z.ZodBoolean>;
|
|
329
329
|
run_id: z.ZodOptional<z.ZodString>;
|
|
330
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
331
|
+
identity_key: z.ZodOptional<z.ZodString>;
|
|
332
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
330
333
|
} & {
|
|
331
334
|
lens: z.ZodEnum<["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]>;
|
|
332
335
|
file_coverage: z.ZodArray<z.ZodObject<{
|
|
@@ -748,6 +751,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
748
751
|
total_lines: number;
|
|
749
752
|
}[];
|
|
750
753
|
notes?: string[] | undefined;
|
|
754
|
+
run_id?: string | undefined;
|
|
751
755
|
verification?: {
|
|
752
756
|
verified: boolean;
|
|
753
757
|
needs_followup: boolean;
|
|
@@ -777,11 +781,13 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
777
781
|
completion_reason?: string | undefined;
|
|
778
782
|
}[] | undefined;
|
|
779
783
|
} | undefined;
|
|
780
|
-
run_id?: string | undefined;
|
|
781
784
|
followup_tasks?: string[] | undefined;
|
|
782
785
|
agent_role?: string | undefined;
|
|
783
786
|
requires_followup?: boolean | undefined;
|
|
784
787
|
submitted_at?: string | undefined;
|
|
788
|
+
instance_id?: string | undefined;
|
|
789
|
+
identity_key?: string | undefined;
|
|
790
|
+
idempotency_key?: string | undefined;
|
|
785
791
|
}, {
|
|
786
792
|
unit_id: string;
|
|
787
793
|
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
@@ -840,6 +846,7 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
840
846
|
total_lines: number;
|
|
841
847
|
}[];
|
|
842
848
|
notes?: string[] | undefined;
|
|
849
|
+
run_id?: string | undefined;
|
|
843
850
|
verification?: {
|
|
844
851
|
verified: boolean;
|
|
845
852
|
needs_followup: boolean;
|
|
@@ -869,11 +876,13 @@ export declare const WorkerAuditResultSchema: z.ZodObject<{
|
|
|
869
876
|
completion_reason?: string | undefined;
|
|
870
877
|
}[] | undefined;
|
|
871
878
|
} | undefined;
|
|
872
|
-
run_id?: string | undefined;
|
|
873
879
|
followup_tasks?: string[] | undefined;
|
|
874
880
|
agent_role?: string | undefined;
|
|
875
881
|
requires_followup?: boolean | undefined;
|
|
876
882
|
submitted_at?: string | undefined;
|
|
883
|
+
instance_id?: string | undefined;
|
|
884
|
+
identity_key?: string | undefined;
|
|
885
|
+
idempotency_key?: string | undefined;
|
|
877
886
|
}>;
|
|
878
887
|
/** The full worker submission: a non-empty array of AuditResults. */
|
|
879
888
|
export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
@@ -884,6 +893,9 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
884
893
|
notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
885
894
|
requires_followup: z.ZodOptional<z.ZodBoolean>;
|
|
886
895
|
run_id: z.ZodOptional<z.ZodString>;
|
|
896
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
897
|
+
identity_key: z.ZodOptional<z.ZodString>;
|
|
898
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
887
899
|
} & {
|
|
888
900
|
lens: z.ZodEnum<["correctness", "architecture", "maintainability", "security", "reliability", "performance", "data_integrity", "tests", "operability", "config_deployment", "observability"]>;
|
|
889
901
|
file_coverage: z.ZodArray<z.ZodObject<{
|
|
@@ -1305,6 +1317,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1305
1317
|
total_lines: number;
|
|
1306
1318
|
}[];
|
|
1307
1319
|
notes?: string[] | undefined;
|
|
1320
|
+
run_id?: string | undefined;
|
|
1308
1321
|
verification?: {
|
|
1309
1322
|
verified: boolean;
|
|
1310
1323
|
needs_followup: boolean;
|
|
@@ -1334,11 +1347,13 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1334
1347
|
completion_reason?: string | undefined;
|
|
1335
1348
|
}[] | undefined;
|
|
1336
1349
|
} | undefined;
|
|
1337
|
-
run_id?: string | undefined;
|
|
1338
1350
|
followup_tasks?: string[] | undefined;
|
|
1339
1351
|
agent_role?: string | undefined;
|
|
1340
1352
|
requires_followup?: boolean | undefined;
|
|
1341
1353
|
submitted_at?: string | undefined;
|
|
1354
|
+
instance_id?: string | undefined;
|
|
1355
|
+
identity_key?: string | undefined;
|
|
1356
|
+
idempotency_key?: string | undefined;
|
|
1342
1357
|
}, {
|
|
1343
1358
|
unit_id: string;
|
|
1344
1359
|
lens: "correctness" | "architecture" | "maintainability" | "security" | "reliability" | "performance" | "data_integrity" | "tests" | "operability" | "config_deployment" | "observability";
|
|
@@ -1397,6 +1412,7 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1397
1412
|
total_lines: number;
|
|
1398
1413
|
}[];
|
|
1399
1414
|
notes?: string[] | undefined;
|
|
1415
|
+
run_id?: string | undefined;
|
|
1400
1416
|
verification?: {
|
|
1401
1417
|
verified: boolean;
|
|
1402
1418
|
needs_followup: boolean;
|
|
@@ -1426,11 +1442,13 @@ export declare const WorkerAuditResultsSchema: z.ZodArray<z.ZodObject<{
|
|
|
1426
1442
|
completion_reason?: string | undefined;
|
|
1427
1443
|
}[] | undefined;
|
|
1428
1444
|
} | undefined;
|
|
1429
|
-
run_id?: string | undefined;
|
|
1430
1445
|
followup_tasks?: string[] | undefined;
|
|
1431
1446
|
agent_role?: string | undefined;
|
|
1432
1447
|
requires_followup?: boolean | undefined;
|
|
1433
1448
|
submitted_at?: string | undefined;
|
|
1449
|
+
instance_id?: string | undefined;
|
|
1450
|
+
identity_key?: string | undefined;
|
|
1451
|
+
idempotency_key?: string | undefined;
|
|
1434
1452
|
}>, "many">;
|
|
1435
1453
|
/**
|
|
1436
1454
|
* Registry of the worker-facing JSON schema files and the zod source each is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workerSchemas.d.ts","sourceRoot":"","sources":["../../../src/audit/contracts/workerSchemas.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,kFAAkF;AAClF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEZ;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAC;AAEZ,wFAAwF;AACxF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBvB,CAAC;AAMZ;;;;GAIG;AACH,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"workerSchemas.d.ts","sourceRoot":"","sources":["../../../src/audit/contracts/workerSchemas.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,kFAAkF;AAClF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAG7B,CAAC;AAEZ;;;;GAIG;AACH,eAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAA0C,CAAC;AAEhF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,MAAM,EACN;IAAE,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAaxC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAkBhF"}
|
|
@@ -58,12 +58,12 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
58
58
|
suggested_path: z.ZodString;
|
|
59
59
|
description: z.ZodString;
|
|
60
60
|
}, "strict", z.ZodTypeAny, {
|
|
61
|
-
description: string;
|
|
62
61
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
62
|
+
description: string;
|
|
63
63
|
suggested_path: string;
|
|
64
64
|
}, {
|
|
65
|
-
description: string;
|
|
66
65
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
66
|
+
description: string;
|
|
67
67
|
suggested_path: string;
|
|
68
68
|
}>, "many">;
|
|
69
69
|
suggested_commands: z.ZodArray<z.ZodString, "many">;
|
|
@@ -76,15 +76,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
76
76
|
audit_results_path: z.ZodString;
|
|
77
77
|
worker_command: z.ZodArray<z.ZodString, "many">;
|
|
78
78
|
}, "strict", z.ZodTypeAny, {
|
|
79
|
-
worker_command: string[];
|
|
80
79
|
run_id: string;
|
|
80
|
+
worker_command: string[];
|
|
81
81
|
audit_results_path: string;
|
|
82
82
|
task_path: string;
|
|
83
83
|
prompt_path: string;
|
|
84
84
|
pending_audit_tasks_path?: string | undefined;
|
|
85
85
|
}, {
|
|
86
|
-
worker_command: string[];
|
|
87
86
|
run_id: string;
|
|
87
|
+
worker_command: string[];
|
|
88
88
|
audit_results_path: string;
|
|
89
89
|
task_path: string;
|
|
90
90
|
prompt_path: string;
|
|
@@ -103,8 +103,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
103
103
|
runtime_validation_tasks: z.ZodNullable<z.ZodString>;
|
|
104
104
|
friction_record: z.ZodString;
|
|
105
105
|
}, "strict", z.ZodTypeAny, {
|
|
106
|
-
current_prompt: string | null;
|
|
107
106
|
session_config: string;
|
|
107
|
+
current_prompt: string | null;
|
|
108
108
|
runtime_validation_tasks: string | null;
|
|
109
109
|
audit_tasks: string | null;
|
|
110
110
|
incoming_dir: string;
|
|
@@ -115,8 +115,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
115
115
|
current_tasks: string | null;
|
|
116
116
|
friction_record: string;
|
|
117
117
|
}, {
|
|
118
|
-
current_prompt: string | null;
|
|
119
118
|
session_config: string;
|
|
119
|
+
current_prompt: string | null;
|
|
120
120
|
runtime_validation_tasks: string | null;
|
|
121
121
|
audit_tasks: string | null;
|
|
122
122
|
incoming_dir: string;
|
|
@@ -136,8 +136,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
136
136
|
repo_root: string;
|
|
137
137
|
artifacts_dir: string;
|
|
138
138
|
artifact_paths: {
|
|
139
|
-
current_prompt: string | null;
|
|
140
139
|
session_config: string;
|
|
140
|
+
current_prompt: string | null;
|
|
141
141
|
runtime_validation_tasks: string | null;
|
|
142
142
|
audit_tasks: string | null;
|
|
143
143
|
incoming_dir: string;
|
|
@@ -150,15 +150,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
150
150
|
};
|
|
151
151
|
pending_obligations: string[];
|
|
152
152
|
suggested_inputs: {
|
|
153
|
-
description: string;
|
|
154
153
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
154
|
+
description: string;
|
|
155
155
|
suggested_path: string;
|
|
156
156
|
}[];
|
|
157
157
|
suggested_commands: string[];
|
|
158
158
|
interactive_provider_hint: string | null;
|
|
159
159
|
active_review_run?: {
|
|
160
|
-
worker_command: string[];
|
|
161
160
|
run_id: string;
|
|
161
|
+
worker_command: string[];
|
|
162
162
|
audit_results_path: string;
|
|
163
163
|
task_path: string;
|
|
164
164
|
prompt_path: string;
|
|
@@ -173,8 +173,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
173
173
|
repo_root: string;
|
|
174
174
|
artifacts_dir: string;
|
|
175
175
|
artifact_paths: {
|
|
176
|
-
current_prompt: string | null;
|
|
177
176
|
session_config: string;
|
|
177
|
+
current_prompt: string | null;
|
|
178
178
|
runtime_validation_tasks: string | null;
|
|
179
179
|
audit_tasks: string | null;
|
|
180
180
|
incoming_dir: string;
|
|
@@ -187,15 +187,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
187
187
|
};
|
|
188
188
|
pending_obligations: string[];
|
|
189
189
|
suggested_inputs: {
|
|
190
|
-
description: string;
|
|
191
190
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
191
|
+
description: string;
|
|
192
192
|
suggested_path: string;
|
|
193
193
|
}[];
|
|
194
194
|
suggested_commands: string[];
|
|
195
195
|
interactive_provider_hint: string | null;
|
|
196
196
|
active_review_run?: {
|
|
197
|
-
worker_command: string[];
|
|
198
197
|
run_id: string;
|
|
198
|
+
worker_command: string[];
|
|
199
199
|
audit_results_path: string;
|
|
200
200
|
task_path: string;
|
|
201
201
|
prompt_path: string;
|
|
@@ -230,8 +230,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
230
230
|
repo_root: string;
|
|
231
231
|
artifacts_dir: string;
|
|
232
232
|
artifact_paths: {
|
|
233
|
-
current_prompt: string | null;
|
|
234
233
|
session_config: string;
|
|
234
|
+
current_prompt: string | null;
|
|
235
235
|
runtime_validation_tasks: string | null;
|
|
236
236
|
audit_tasks: string | null;
|
|
237
237
|
incoming_dir: string;
|
|
@@ -244,15 +244,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
244
244
|
};
|
|
245
245
|
pending_obligations: string[];
|
|
246
246
|
suggested_inputs: {
|
|
247
|
-
description: string;
|
|
248
247
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
248
|
+
description: string;
|
|
249
249
|
suggested_path: string;
|
|
250
250
|
}[];
|
|
251
251
|
suggested_commands: string[];
|
|
252
252
|
interactive_provider_hint: string | null;
|
|
253
253
|
active_review_run?: {
|
|
254
|
-
worker_command: string[];
|
|
255
254
|
run_id: string;
|
|
255
|
+
worker_command: string[];
|
|
256
256
|
audit_results_path: string;
|
|
257
257
|
task_path: string;
|
|
258
258
|
prompt_path: string;
|
|
@@ -287,8 +287,8 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
287
287
|
repo_root: string;
|
|
288
288
|
artifacts_dir: string;
|
|
289
289
|
artifact_paths: {
|
|
290
|
-
current_prompt: string | null;
|
|
291
290
|
session_config: string;
|
|
291
|
+
current_prompt: string | null;
|
|
292
292
|
runtime_validation_tasks: string | null;
|
|
293
293
|
audit_tasks: string | null;
|
|
294
294
|
incoming_dir: string;
|
|
@@ -301,15 +301,15 @@ export declare const AuditCodeResponseSchema: z.ZodObject<{
|
|
|
301
301
|
};
|
|
302
302
|
pending_obligations: string[];
|
|
303
303
|
suggested_inputs: {
|
|
304
|
-
description: string;
|
|
305
304
|
flag: "--batch-results" | "--results" | "--updates" | "--external-analyzer-results";
|
|
305
|
+
description: string;
|
|
306
306
|
suggested_path: string;
|
|
307
307
|
}[];
|
|
308
308
|
suggested_commands: string[];
|
|
309
309
|
interactive_provider_hint: string | null;
|
|
310
310
|
active_review_run?: {
|
|
311
|
-
worker_command: string[];
|
|
312
311
|
run_id: string;
|
|
312
|
+
worker_command: string[];
|
|
313
313
|
audit_results_path: string;
|
|
314
314
|
task_path: string;
|
|
315
315
|
prompt_path: string;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { type AnalyzerSetting, type RunTrackedResult } from "audit-tools/shared";
|
|
2
|
+
import type { ExternalAnalyzerResults, ExternalAnalyzerToolStatus } from "../../types/externalAnalyzer.js";
|
|
3
|
+
/**
|
|
4
|
+
* F5 — external analyzer acquisition engine.
|
|
5
|
+
*
|
|
6
|
+
* On-demand acquisition + ephemeral execution of mature, ecosystem-native
|
|
7
|
+
* analyzers (eslint, ruff, cargo-clippy, …). Distinct from the in-tree
|
|
8
|
+
* `LanguageAnalyzer` registry (which enriches the regex floor from a resolved
|
|
9
|
+
* npm package directory): F5 *runs an external tool as a subprocess* and
|
|
10
|
+
* normalizes its native output through the EXISTING adapter seam
|
|
11
|
+
* (`normalizeExternal.ts`) into {@link ExternalAnalyzerResults}, which then
|
|
12
|
+
* re-enters the graph/risk artifacts through the shared
|
|
13
|
+
* CCU-analyzer-merge-helper-seam pair.
|
|
14
|
+
*
|
|
15
|
+
* Design invariants (all enforced here, never by host discretion):
|
|
16
|
+
* - **No baked-in language→tool / OS→runner table.** Ecosystem is detected
|
|
17
|
+
* deterministically from repo marker files; the runner (npx/pipx/cargo/bundle)
|
|
18
|
+
* is capability-probed at RUNTIME (`--version`) before any tool spawn.
|
|
19
|
+
* - **Single subprocess-SPAWN admission chokepoint** (`admitSpawn`): EVERY
|
|
20
|
+
* non-DEFAULT candidate is gated on the per-run consent token regardless of
|
|
21
|
+
* its `AnalyzerSetting` (auto|ephemeral|permanent) — even a `permanent`,
|
|
22
|
+
* pre-installed tool cannot spawn without consent (CE-005). The small
|
|
23
|
+
* value-curated DEFAULT set runs without prompting.
|
|
24
|
+
* - **Own-vs-acquire boundary.** git-history / secret-scan are OWNED by F6 and
|
|
25
|
+
* are rejected at registration — never acquired here.
|
|
26
|
+
* - **Run-safety gate written once** (`runSafetyGate`): capability-probe, pin
|
|
27
|
+
* version, read-only/sandboxed argv, degrade-to-empty.
|
|
28
|
+
* - **Degrade-to-empty + report-skipped-never-silently.** Every candidate
|
|
29
|
+
* yields exactly one {@link ExternalAnalyzerToolStatus}; a failure never
|
|
30
|
+
* throws and never silently drops the candidate.
|
|
31
|
+
*/
|
|
32
|
+
/** Tool ids OWNED by F6 (git-history mining / secret scanning). Never acquired. */
|
|
33
|
+
export declare const OWNED_TOOL_IDS: Set<string>;
|
|
34
|
+
/** Ecosystem runners F5 knows how to drive. */
|
|
35
|
+
export type EcosystemRunner = "npx" | "pipx" | "cargo" | "bundle";
|
|
36
|
+
/**
|
|
37
|
+
* One acquirable external analyzer. `defaultRun: true` marks a member of the
|
|
38
|
+
* small value-curated set that may run without a consent token; everything else
|
|
39
|
+
* is gated on the per-run consent token at the spawn chokepoint.
|
|
40
|
+
*/
|
|
41
|
+
export interface ExternalAnalyzerCandidate {
|
|
42
|
+
/** Stable id; also the `analyzers.<id>` session-config key. */
|
|
43
|
+
id: string;
|
|
44
|
+
/** Runner that acquires + executes the tool ephemerally. */
|
|
45
|
+
runner: EcosystemRunner;
|
|
46
|
+
/** Pinned tool spec, e.g. "eslint@9" / "ruff==0.5.0" (pinned for reproducibility). */
|
|
47
|
+
spec: string;
|
|
48
|
+
/**
|
|
49
|
+
* Build the read-only argv for the tool given the resolved runner argv prefix
|
|
50
|
+
* and repo root. MUST NOT request fixes/writes — F5 is observe-only.
|
|
51
|
+
*/
|
|
52
|
+
buildArgv(runnerPrefix: string[], root: string): string[];
|
|
53
|
+
/**
|
|
54
|
+
* Parse the tool's stdout into the generic item shape consumed by
|
|
55
|
+
* `normalizeGenericExternalResults`. Degrades to `[]` on any parse failure.
|
|
56
|
+
*/
|
|
57
|
+
parse(stdout: string): Array<{
|
|
58
|
+
id?: string;
|
|
59
|
+
category?: string;
|
|
60
|
+
severity?: string;
|
|
61
|
+
path?: string;
|
|
62
|
+
line_start?: number;
|
|
63
|
+
line_end?: number;
|
|
64
|
+
summary?: string;
|
|
65
|
+
rule?: string;
|
|
66
|
+
raw?: unknown;
|
|
67
|
+
from?: unknown;
|
|
68
|
+
to?: unknown;
|
|
69
|
+
}>;
|
|
70
|
+
/** Whether this ecosystem is present (marker file detection). */
|
|
71
|
+
detect(root: string): boolean;
|
|
72
|
+
/** Member of the value-curated DEFAULT set (runs without prompting). */
|
|
73
|
+
defaultRun: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare function detectNodeEcosystem(root: string): boolean;
|
|
76
|
+
export declare function detectPythonEcosystem(root: string): boolean;
|
|
77
|
+
export declare function detectRustEcosystem(root: string): boolean;
|
|
78
|
+
export declare function detectRubyEcosystem(root: string): boolean;
|
|
79
|
+
export interface AcquisitionRunner {
|
|
80
|
+
(argv: string[], cwd: string): RunTrackedResult;
|
|
81
|
+
}
|
|
82
|
+
export interface AcquisitionEngineOptions {
|
|
83
|
+
/**
|
|
84
|
+
* Per-run consent token. REQUIRED to spawn any non-DEFAULT candidate (and any
|
|
85
|
+
* candidate whose setting is ephemeral/permanent). Absent ⇒ only the DEFAULT
|
|
86
|
+
* set runs; everything else is reported `skipped` with a consent note.
|
|
87
|
+
*/
|
|
88
|
+
consentToken?: string;
|
|
89
|
+
/** Per-analyzer settings (auto|ephemeral|permanent|skip|repo). */
|
|
90
|
+
analyzers?: Record<string, AnalyzerSetting>;
|
|
91
|
+
/** Injectable command runner; defaults to the shared runTracked. */
|
|
92
|
+
run?: AcquisitionRunner;
|
|
93
|
+
/** Injectable logger; defaults to a no-op (degrade quietly to status records). */
|
|
94
|
+
log?: (...args: unknown[]) => void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Single subprocess-SPAWN admission chokepoint. Returns the reason a spawn is
|
|
98
|
+
* NOT admitted, or `undefined` when admitted. The DEFAULT set is admitted
|
|
99
|
+
* without a token; EVERY other candidate — including `permanent`/`ephemeral`
|
|
100
|
+
* pre-installed tools — requires the per-run consent token (CE-005).
|
|
101
|
+
*/
|
|
102
|
+
export declare function admitSpawn(candidate: ExternalAnalyzerCandidate, setting: AnalyzerSetting, consentToken: string | undefined): string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* The run-safety gate, written once: capability-probe the runner, then (if the
|
|
105
|
+
* probe passes) the caller may spawn the pinned, read-only argv. Returns the
|
|
106
|
+
* probe outcome so a missing runner degrades to an empty result + a status.
|
|
107
|
+
*/
|
|
108
|
+
export declare function runSafetyGate(candidate: ExternalAnalyzerCandidate, run: AcquisitionRunner, root: string): {
|
|
109
|
+
ok: true;
|
|
110
|
+
} | {
|
|
111
|
+
ok: false;
|
|
112
|
+
reason: string;
|
|
113
|
+
};
|
|
114
|
+
export interface AcquisitionOutcome {
|
|
115
|
+
results: ExternalAnalyzerResults;
|
|
116
|
+
status: ExternalAnalyzerToolStatus;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Acquire + run ONE external analyzer candidate ephemerally, normalizing its
|
|
120
|
+
* output through the adapter seam. Never throws; always returns exactly one
|
|
121
|
+
* {@link ExternalAnalyzerToolStatus} alongside the (possibly empty) results.
|
|
122
|
+
*/
|
|
123
|
+
export declare function runExternalAnalyzer(candidate: ExternalAnalyzerCandidate, root: string, options?: AcquisitionEngineOptions): AcquisitionOutcome;
|
|
124
|
+
/**
|
|
125
|
+
* Register external analyzer candidates, rejecting any whose id is OWNED by F6
|
|
126
|
+
* (git-history/secret-scan). Returns the accepted candidates; the own-vs-acquire
|
|
127
|
+
* boundary is enforced HERE so an owned tool can never enter the engine.
|
|
128
|
+
*/
|
|
129
|
+
export declare function registerExternalAnalyzers(candidates: ExternalAnalyzerCandidate[]): ExternalAnalyzerCandidate[];
|
|
130
|
+
export interface RunAllOutcome {
|
|
131
|
+
results: ExternalAnalyzerResults[];
|
|
132
|
+
statuses: ExternalAnalyzerToolStatus[];
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Drive the whole registered candidate set through the engine for one repo,
|
|
136
|
+
* collecting one status per candidate. Owned tools are rejected at registration;
|
|
137
|
+
* each survivor passes through the spawn-admission chokepoint and run-safety gate.
|
|
138
|
+
*/
|
|
139
|
+
export declare function runAcquisitionEngine(candidates: ExternalAnalyzerCandidate[], root: string, options?: AcquisitionEngineOptions): RunAllOutcome;
|
|
140
|
+
//# sourceMappingURL=acquisitionEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquisitionEngine.d.ts","sourceRoot":"","sources":["../../../../src/audit/extractors/analyzers/acquisitionEngine.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,mFAAmF;AACnF,eAAO,MAAM,cAAc,aAMzB,CAAC;AAEH,+CAA+C;AAC/C,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,4DAA4D;IAC5D,MAAM,E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