@jeger-ai/opengantry 2.1.0 → 2.2.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/README.md +24 -7
- package/dist/cli/commands/audit-rigor.d.ts +8 -0
- package/dist/cli/commands/audit-rigor.d.ts.map +1 -0
- package/dist/cli/commands/audit-rigor.js +24 -0
- package/dist/cli/commands/audit-rigor.js.map +1 -0
- package/dist/cli/commands/context-feed.d.ts +6 -0
- package/dist/cli/commands/context-feed.d.ts.map +1 -0
- package/dist/cli/commands/context-feed.js +48 -0
- package/dist/cli/commands/context-feed.js.map +1 -0
- package/dist/cli/commands/mission.js +1 -1
- package/dist/cli/commands/mission.js.map +1 -1
- package/dist/cli/commands/onboarding.d.ts.map +1 -1
- package/dist/cli/commands/onboarding.js +9 -4
- package/dist/cli/commands/onboarding.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +2 -1
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/lib/architecture-pointer.d.ts +1 -1
- package/dist/cli/lib/architecture-pointer.d.ts.map +1 -1
- package/dist/cli/lib/audit-rigor.d.ts +18 -0
- package/dist/cli/lib/audit-rigor.d.ts.map +1 -0
- package/dist/cli/lib/audit-rigor.js +189 -0
- package/dist/cli/lib/audit-rigor.js.map +1 -0
- package/dist/cli/lib/constants.d.ts +4 -0
- package/dist/cli/lib/constants.d.ts.map +1 -1
- package/dist/cli/lib/constants.js +4 -0
- package/dist/cli/lib/constants.js.map +1 -1
- package/dist/cli/lib/context-feed-remediation.d.ts +12 -0
- package/dist/cli/lib/context-feed-remediation.d.ts.map +1 -0
- package/dist/cli/lib/context-feed-remediation.js +88 -0
- package/dist/cli/lib/context-feed-remediation.js.map +1 -0
- package/dist/cli/lib/context-feed-store.d.ts +33 -0
- package/dist/cli/lib/context-feed-store.d.ts.map +1 -0
- package/dist/cli/lib/context-feed-store.js +110 -0
- package/dist/cli/lib/context-feed-store.js.map +1 -0
- package/dist/cli/lib/doctor-core.d.ts +5 -0
- package/dist/cli/lib/doctor-core.d.ts.map +1 -0
- package/dist/cli/lib/doctor-core.js +163 -0
- package/dist/cli/lib/doctor-core.js.map +1 -0
- package/dist/cli/lib/doctor-integration.d.ts +13 -0
- package/dist/cli/lib/doctor-integration.d.ts.map +1 -0
- package/dist/cli/lib/doctor-integration.js +120 -0
- package/dist/cli/lib/doctor-integration.js.map +1 -0
- package/dist/cli/lib/doctor-substrate.d.ts +3 -0
- package/dist/cli/lib/doctor-substrate.d.ts.map +1 -0
- package/dist/cli/lib/doctor-substrate.js +35 -0
- package/dist/cli/lib/doctor-substrate.js.map +1 -0
- package/dist/cli/lib/doctor-types.d.ts +24 -0
- package/dist/cli/lib/doctor-types.d.ts.map +1 -0
- package/dist/cli/lib/doctor-types.js +7 -0
- package/dist/cli/lib/doctor-types.js.map +1 -0
- package/dist/cli/lib/doctor.d.ts +4 -30
- package/dist/cli/lib/doctor.d.ts.map +1 -1
- package/dist/cli/lib/doctor.js +4 -281
- package/dist/cli/lib/doctor.js.map +1 -1
- package/dist/cli/lib/integration-compat.d.ts +7 -0
- package/dist/cli/lib/integration-compat.d.ts.map +1 -1
- package/dist/cli/lib/integration-compat.js +14 -0
- package/dist/cli/lib/integration-compat.js.map +1 -1
- package/dist/cli/lib/kpi-engine.d.ts +0 -2
- package/dist/cli/lib/kpi-engine.d.ts.map +1 -1
- package/dist/cli/lib/kpi-engine.js +11 -13
- package/dist/cli/lib/kpi-engine.js.map +1 -1
- package/dist/cli/lib/mcp-tools-register.js +1 -1
- package/dist/cli/lib/mcp-tools-register.js.map +1 -1
- package/dist/cli/lib/mcp-upgrade.d.ts +2 -2
- package/dist/cli/lib/mcp-upgrade.d.ts.map +1 -1
- package/dist/cli/lib/mcp-upgrade.js +5 -1
- package/dist/cli/lib/mcp-upgrade.js.map +1 -1
- package/dist/cli/lib/missions/formatter.d.ts.map +1 -1
- package/dist/cli/lib/missions/formatter.js +1 -0
- package/dist/cli/lib/missions/formatter.js.map +1 -1
- package/dist/cli/lib/missions/parser.d.ts.map +1 -1
- package/dist/cli/lib/missions/parser.js +1 -0
- package/dist/cli/lib/missions/parser.js.map +1 -1
- package/dist/cli/lib/start-orchestration.d.ts +1 -11
- package/dist/cli/lib/start-orchestration.d.ts.map +1 -1
- package/dist/cli/lib/start-orchestration.js +1 -85
- package/dist/cli/lib/start-orchestration.js.map +1 -1
- package/dist/cli/lib/start-snapshot.d.ts +12 -0
- package/dist/cli/lib/start-snapshot.d.ts.map +1 -0
- package/dist/cli/lib/start-snapshot.js +81 -0
- package/dist/cli/lib/start-snapshot.js.map +1 -0
- package/dist/cli/lib/trace.d.ts.map +1 -1
- package/dist/cli/lib/trace.js +1 -6
- package/dist/cli/lib/trace.js.map +1 -1
- package/dist/cli/lib/types.d.ts +3 -0
- package/dist/cli/lib/types.d.ts.map +1 -1
- package/dist/cli/lib/upgrade-plan-payload.d.ts +31 -0
- package/dist/cli/lib/upgrade-plan-payload.d.ts.map +1 -0
- package/dist/cli/lib/upgrade-plan-payload.js +109 -0
- package/dist/cli/lib/upgrade-plan-payload.js.map +1 -0
- package/dist/cli/lib/verify-engine.d.ts.map +1 -1
- package/dist/cli/lib/verify-engine.js +39 -13
- package/dist/cli/lib/verify-engine.js.map +1 -1
- package/dist/cli/lib/verify-failure-format.d.ts +29 -0
- package/dist/cli/lib/verify-failure-format.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-format.js +68 -0
- package/dist/cli/lib/verify-failure-format.js.map +1 -0
- package/dist/cli/lib/verify-hints.d.ts +32 -0
- package/dist/cli/lib/verify-hints.d.ts.map +1 -0
- package/dist/cli/lib/verify-hints.js +161 -0
- package/dist/cli/lib/verify-hints.js.map +1 -0
- package/dist/cli/lib/verify-payload.d.ts +0 -1
- package/dist/cli/lib/verify-payload.d.ts.map +1 -1
- package/dist/cli/lib/verify-payload.js +6 -19
- package/dist/cli/lib/verify-payload.js.map +1 -1
- package/dist/cli/lib/verify-present.d.ts +6 -23
- package/dist/cli/lib/verify-present.d.ts.map +1 -1
- package/dist/cli/lib/verify-present.js +3 -215
- package/dist/cli/lib/verify-present.js.map +1 -1
- package/dist/cli/lib/verify-presentation.d.ts +2 -1
- package/dist/cli/lib/verify-presentation.d.ts.map +1 -1
- package/dist/cli/lib/verify-presentation.js +2 -1
- package/dist/cli/lib/verify-presentation.js.map +1 -1
- package/dist/cli/lib/verify-presenters.d.ts +19 -0
- package/dist/cli/lib/verify-presenters.d.ts.map +1 -0
- package/dist/cli/lib/verify-presenters.js +173 -0
- package/dist/cli/lib/verify-presenters.js.map +1 -0
- package/dist/cli/lib/verify-remediation.d.ts +4 -56
- package/dist/cli/lib/verify-remediation.d.ts.map +1 -1
- package/dist/cli/lib/verify-remediation.js +2 -226
- package/dist/cli/lib/verify-remediation.js.map +1 -1
- package/dist/cli/lib/verify-run.d.ts +12 -0
- package/dist/cli/lib/verify-run.d.ts.map +1 -0
- package/dist/cli/lib/verify-run.js +70 -0
- package/dist/cli/lib/verify-run.js.map +1 -0
- package/dist/cli/lib/verify-sinks.d.ts +4 -0
- package/dist/cli/lib/verify-sinks.d.ts.map +1 -0
- package/dist/cli/lib/verify-sinks.js +12 -0
- package/dist/cli/lib/verify-sinks.js.map +1 -0
- package/dist/cli/lib/version.gen.d.ts +1 -1
- package/dist/cli/lib/version.gen.js +1 -1
- package/dist/cli/lib/virtual-scratch-store.d.ts +37 -0
- package/dist/cli/lib/virtual-scratch-store.d.ts.map +1 -0
- package/dist/cli/lib/virtual-scratch-store.js +132 -0
- package/dist/cli/lib/virtual-scratch-store.js.map +1 -0
- package/dist/cli/program-core.d.ts.map +1 -1
- package/dist/cli/program-core.js +43 -3
- package/dist/cli/program-core.js.map +1 -1
- package/package.json +1 -1
- package/templates/.gitagent/teacher/MISSION.schema.yaml +6 -0
- package/templates/.gitignore.gxt +2 -0
- package/templates/integrations/asset-catalog.json +1 -0
- package/templates/integrations/compatibility.json +10 -1
- package/templates/integrations/recipes/claude-code.md +6 -4
- package/templates/integrations/recipes/codex-cli.md +6 -4
- package/templates/integrations/recipes/opencode.md +8 -2
- package/templates/scripts/gxt-shell-agent.sh +62 -0
- package/dist/cli/lib/kpi-report-stale.d.ts +0 -18
- package/dist/cli/lib/kpi-report-stale.d.ts.map +0 -1
- package/dist/cli/lib/kpi-report-stale.js +0 -91
- package/dist/cli/lib/kpi-report-stale.js.map +0 -1
- package/dist/cli/lib/trace-evidence.d.ts +0 -23
- package/dist/cli/lib/trace-evidence.d.ts.map +0 -1
- package/dist/cli/lib/trace-evidence.js +0 -118
- package/dist/cli/lib/trace-evidence.js.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { runBreakGlassAuditFlow } from "./break-glass.js";
|
|
2
2
|
import { errorMessage, toPosixRel } from "./cli-io.js";
|
|
3
3
|
import { GXT_ERROR, gxtCodeFromGapmanUserError } from "./gxt-error-codes.js";
|
|
4
|
-
import {
|
|
5
|
-
import { GapmanUserError, isGapmanUserError } from "./errors.js";
|
|
6
|
-
import { loadWorkspace } from "./workspace.js";
|
|
4
|
+
import { isGapmanUserError } from "./errors.js";
|
|
7
5
|
import { evaluateVerifyPhases, } from "./verify-engine.js";
|
|
8
|
-
import { verifyFailurePresentation } from "./verify-
|
|
6
|
+
import { verifyFailurePresentation } from "./verify-failure-format.js";
|
|
7
|
+
import { persistRemediationFromFailedPayload } from "./context-feed-remediation.js";
|
|
9
8
|
function missionRelPath(root, mission) {
|
|
10
9
|
return toPosixRel(root, mission.rawPath);
|
|
11
10
|
}
|
|
@@ -125,24 +124,12 @@ export function buildVerifyResultPayloadFromPhaseResult(root, mission, missionAr
|
|
|
125
124
|
if (result.ok) {
|
|
126
125
|
return successPayload(root, mission, result);
|
|
127
126
|
}
|
|
128
|
-
|
|
127
|
+
const payload = failureFromPhase(result, missionRel, options, root, msnId);
|
|
128
|
+
persistRemediationFromFailedPayload(root, mission, missionArg, payload);
|
|
129
|
+
return payload;
|
|
129
130
|
}
|
|
130
131
|
export function buildVerifyResultPayload(root, manifest, mission, missionArg, options) {
|
|
131
132
|
const result = evaluateVerifyPhases(root, mission, options, manifest);
|
|
132
133
|
return buildVerifyResultPayloadFromPhaseResult(root, mission, missionArg, options, manifest, result);
|
|
133
134
|
}
|
|
134
|
-
export function buildVerifyResultPayloadFromOptions(options) {
|
|
135
|
-
try {
|
|
136
|
-
if (!options.mission) {
|
|
137
|
-
throw new GapmanUserError("INVALID_ARGUMENT", "gapman verify: --mission is required", undefined, 2);
|
|
138
|
-
}
|
|
139
|
-
const { root, manifest } = loadWorkspace();
|
|
140
|
-
const mission = parseMissionFile(root, options.mission);
|
|
141
|
-
assertMissionGatePresent(mission);
|
|
142
|
-
return buildVerifyResultPayload(root, manifest, mission, options.mission, options);
|
|
143
|
-
}
|
|
144
|
-
catch (e) {
|
|
145
|
-
return initFailurePayload(e);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
135
|
//# sourceMappingURL=verify-payload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-payload.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"verify-payload.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAG7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OA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BAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtE,OAAO,uCAAuC,CAC5C,IAAI,EACJ,OAAO,EACP,UAAU,EACV,OAAO,EACP,QAAQ,EACR,MAAM,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export interface VerifyPresentResult {
|
|
9
|
-
ok: boolean;
|
|
10
|
-
exitCode: number;
|
|
11
|
-
}
|
|
12
|
-
export type VerifySink = "break_glass_json" | "break_glass_human" | "json" | "fix_interactive" | "fix_noninteractive" | "human";
|
|
13
|
-
export declare function resolveVerifySink(options: VerifyOptions): VerifySink;
|
|
14
|
-
export declare function presentBreakGlassJson(root: string, mission: ParsedMission, options: VerifyOptions): VerifyPresentResult;
|
|
15
|
-
export declare function presentBreakGlassHuman(root: string, mission: ParsedMission, options: VerifyOptions): VerifyPresentResult;
|
|
16
|
-
export declare function presentJsonFromResult(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, manifest: Manifest, result: VerifyPhaseResult): VerifyPresentResult;
|
|
17
|
-
export declare function presentJsonInitFailure(options: VerifyOptions, error: unknown): VerifyPresentResult;
|
|
18
|
-
export declare function presentHumanInitFailure(options: VerifyOptions, error: unknown): VerifyPresentResult;
|
|
19
|
-
export declare function presentHuman(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, result: VerifyPhaseResult): VerifyPresentResult;
|
|
20
|
-
export declare function presentFix(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, result: VerifyPhaseResult, nonInteractive: boolean, manifest: Manifest): Promise<VerifyPresentResult>;
|
|
21
|
-
export declare function emitVerifyJson(payload: VerifyResultPayload, options: VerifyOptions): void;
|
|
22
|
-
/** Unified verify orchestration: load workspace once, evaluate once, present by sink. */
|
|
23
|
-
export declare function runVerifyCore(options: VerifyOptions): Promise<VerifyRunResult>;
|
|
1
|
+
export type { VerifyPresentResult } from "./verify-presenters.js";
|
|
2
|
+
export type { VerifyRunResult } from "./verify-run.js";
|
|
3
|
+
export type { VerifySink } from "./verify-sinks.js";
|
|
4
|
+
export { emitVerifyJson, presentBreakGlassHuman, presentBreakGlassJson, presentFix, presentHuman, presentHumanInitFailure, presentJsonFromResult, presentJsonInitFailure, } from "./verify-presenters.js";
|
|
5
|
+
export { resolveVerifySink } from "./verify-sinks.js";
|
|
6
|
+
export { runVerifyCore } from "./verify-run.js";
|
|
24
7
|
//# sourceMappingURL=verify-present.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-present.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-present.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-present.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-present.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,216 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { CommandReporter } from "./command-reporter.js";
|
|
5
|
-
import { logFixHint } from "./fix-hints.js";
|
|
6
|
-
import { assertMissionGatePresent, parseMissionFile } from "./missions/parser.js";
|
|
7
|
-
import { loadPrompts } from "./prompts-loader.js";
|
|
8
|
-
import { isGapmanUserError } from "./errors.js";
|
|
9
|
-
import { appendSurgeonMutationLog } from "./surgeon.js";
|
|
10
|
-
import { loadWorkspace } from "./workspace.js";
|
|
11
|
-
import { evaluateVerifyPhases, } from "./verify-engine.js";
|
|
12
|
-
import { buildBreakGlassPayload, buildVerifyResultPayloadFromPhaseResult, initFailurePayload, } from "./verify-payload.js";
|
|
13
|
-
import { buildVerifyHintContext, hintsForVerifyPhase, verifyFailurePresentation, } from "./verify-remediation.js";
|
|
14
|
-
import { getSurgeonForErrorCode, resolveSurgeonErrorCode, } from "./surgeons/registry.js";
|
|
15
|
-
async function trySurgeonAndRerunVerify(input) {
|
|
16
|
-
if (input.options.fix !== true)
|
|
17
|
-
return null;
|
|
18
|
-
const errorCode = resolveSurgeonErrorCode(input.failure);
|
|
19
|
-
if (!errorCode)
|
|
20
|
-
return null;
|
|
21
|
-
const surgeon = getSurgeonForErrorCode(errorCode);
|
|
22
|
-
if (!surgeon)
|
|
23
|
-
return null;
|
|
24
|
-
const workerLogPath = input.failure.workerLogPath;
|
|
25
|
-
const context = {
|
|
26
|
-
root: input.root,
|
|
27
|
-
failure: input.failure,
|
|
28
|
-
manifest: input.manifest,
|
|
29
|
-
workerLogPath,
|
|
30
|
-
errorCode,
|
|
31
|
-
};
|
|
32
|
-
logWarn(`[Surgeon] Autonomous mutation triggered for error ${errorCode}`);
|
|
33
|
-
const mutation = await surgeon.applyMutation(context);
|
|
34
|
-
if (!mutation.mutated) {
|
|
35
|
-
logInfo(`${CLI_NAME} verify: [Surgeon] no mutation applied (${mutation.summary})`);
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
appendSurgeonMutationLog(workerLogPath, mutation.summary);
|
|
39
|
-
logInfo(`${CLI_NAME} verify: [Surgeon] mutation logged; rerunning full verify (fix disabled)`);
|
|
40
|
-
return runVerifyCore({
|
|
41
|
-
...input.options,
|
|
42
|
-
fix: false,
|
|
43
|
-
fixNonInteractive: false,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export function resolveVerifySink(options) {
|
|
47
|
-
if (options.breakGlass === true) {
|
|
48
|
-
return options.json ? "break_glass_json" : "break_glass_human";
|
|
49
|
-
}
|
|
50
|
-
if (options.json)
|
|
51
|
-
return "json";
|
|
52
|
-
if (options.fix === true) {
|
|
53
|
-
return options.fixNonInteractive ? "fix_noninteractive" : "fix_interactive";
|
|
54
|
-
}
|
|
55
|
-
return "human";
|
|
56
|
-
}
|
|
57
|
-
function reporterFor(options) {
|
|
58
|
-
return CommandReporter.forVerify(options);
|
|
59
|
-
}
|
|
60
|
-
export function presentBreakGlassJson(root, mission, options) {
|
|
61
|
-
const payload = buildBreakGlassPayload(root, mission, options);
|
|
62
|
-
reporterFor(options).emitJsonPayload(payload);
|
|
63
|
-
return { ok: payload.exit_code === 0, exitCode: payload.exit_code };
|
|
64
|
-
}
|
|
65
|
-
export function presentBreakGlassHuman(root, mission, options) {
|
|
66
|
-
const reporter = reporterFor(options);
|
|
67
|
-
const outcome = runBreakGlassAuditFlow(root, mission, options);
|
|
68
|
-
if (outcome.kind === "fail") {
|
|
69
|
-
reporter.emitError(errorMessage(outcome.error));
|
|
70
|
-
return { ok: false, exitCode: 2 };
|
|
71
|
-
}
|
|
72
|
-
reporter.emitInfo(`${CLI_NAME} verify: BREAK-GLASS — all gates skipped (audited on ${outcome.commitSha})`);
|
|
73
|
-
reporter.emitInfo(` reason: ${outcome.reason}`);
|
|
74
|
-
if (outcome.msnId)
|
|
75
|
-
reporter.emitInfo(` msn_id: ${outcome.msnId}`);
|
|
76
|
-
if (outcome.auditCommit) {
|
|
77
|
-
logFixHint("git push origin HEAD # audit empty commit (no gxt-bypass note)");
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
logFixHint("git push origin refs/notes/gxt-bypass");
|
|
81
|
-
}
|
|
82
|
-
return { ok: true, exitCode: 0 };
|
|
83
|
-
}
|
|
84
|
-
export function presentJsonFromResult(root, mission, missionArg, options, manifest, result) {
|
|
85
|
-
const payload = buildVerifyResultPayloadFromPhaseResult(root, mission, missionArg, options, manifest, result);
|
|
86
|
-
reporterFor(options).emitJsonPayload(payload);
|
|
87
|
-
return { ok: payload.exit_code === 0, exitCode: payload.exit_code };
|
|
88
|
-
}
|
|
89
|
-
export function presentJsonInitFailure(options, error) {
|
|
90
|
-
const payload = initFailurePayload(error);
|
|
91
|
-
reporterFor(options).emitJsonPayload(payload);
|
|
92
|
-
return { ok: false, exitCode: payload.exit_code };
|
|
93
|
-
}
|
|
94
|
-
export function presentHumanInitFailure(options, error) {
|
|
95
|
-
const reporter = reporterFor(options);
|
|
96
|
-
if (isGapmanUserError(error)) {
|
|
97
|
-
reporter.emitError(`[${error.gxtCode}] ${error.message}`);
|
|
98
|
-
if (error.hint)
|
|
99
|
-
reporter.emitFixHint(error.hint);
|
|
100
|
-
return { ok: false, exitCode: error.exitCode };
|
|
101
|
-
}
|
|
102
|
-
reporter.emitError(errorMessage(error));
|
|
103
|
-
return { ok: false, exitCode: 1 };
|
|
104
|
-
}
|
|
105
|
-
export function presentHuman(root, mission, missionArg, options, result) {
|
|
106
|
-
const reporter = reporterFor(options);
|
|
107
|
-
if (result.ok) {
|
|
108
|
-
reporter.emitVerifySuccess(result, missionArg);
|
|
109
|
-
return { ok: true, exitCode: 0 };
|
|
110
|
-
}
|
|
111
|
-
const presentation = verifyFailurePresentation({
|
|
112
|
-
failure: result,
|
|
113
|
-
missionArg,
|
|
114
|
-
options,
|
|
115
|
-
root,
|
|
116
|
-
msnId: mission.msnId ?? undefined,
|
|
117
|
-
});
|
|
118
|
-
reporter.emitFailurePresentation(presentation);
|
|
119
|
-
return { ok: false, exitCode: presentation.exit_code };
|
|
120
|
-
}
|
|
121
|
-
export async function presentFix(root, mission, missionArg, options, result, nonInteractive, manifest) {
|
|
122
|
-
if (result.ok) {
|
|
123
|
-
return presentHuman(root, mission, missionArg, options, result);
|
|
124
|
-
}
|
|
125
|
-
const failure = result;
|
|
126
|
-
const surgeonRerun = await trySurgeonAndRerunVerify({
|
|
127
|
-
root,
|
|
128
|
-
mission,
|
|
129
|
-
missionArg,
|
|
130
|
-
options,
|
|
131
|
-
manifest,
|
|
132
|
-
failure,
|
|
133
|
-
});
|
|
134
|
-
if (surgeonRerun) {
|
|
135
|
-
return surgeonRerun;
|
|
136
|
-
}
|
|
137
|
-
if (nonInteractive) {
|
|
138
|
-
return presentHuman(root, mission, missionArg, options, result);
|
|
139
|
-
}
|
|
140
|
-
const reporter = reporterFor(options);
|
|
141
|
-
const remediation = hintsForVerifyPhase(failure.phase, buildVerifyHintContext(failure, missionArg, options, root, mission.msnId ?? undefined));
|
|
142
|
-
reporter.emitError(`[${remediation.error_code}] verify failed at phase: ${failure.phase}`);
|
|
143
|
-
const p = await loadPrompts();
|
|
144
|
-
const choices = remediation.fix_hints.map((hint, i) => ({
|
|
145
|
-
value: String(i),
|
|
146
|
-
label: hint.length > 100 ? `${hint.slice(0, 97)}…` : hint,
|
|
147
|
-
hint,
|
|
148
|
-
}));
|
|
149
|
-
choices.push({ value: "quit", label: "Exit (fix manually)", hint: "" });
|
|
150
|
-
const selected = await p.select({
|
|
151
|
-
message: "Choose a remediation step",
|
|
152
|
-
options: choices,
|
|
153
|
-
});
|
|
154
|
-
if (p.isCancel(selected) || selected === "quit") {
|
|
155
|
-
reporter.emitNextSteps(remediation.next_actions, remediation.tagged_steps);
|
|
156
|
-
return { ok: false, exitCode: failure.exitCode };
|
|
157
|
-
}
|
|
158
|
-
const idx = Number.parseInt(String(selected), 10);
|
|
159
|
-
const hint = remediation.fix_hints[idx];
|
|
160
|
-
if (hint)
|
|
161
|
-
reporter.emitFixHint(hint);
|
|
162
|
-
reporter.emitNextSteps(remediation.next_actions, remediation.tagged_steps);
|
|
163
|
-
return { ok: false, exitCode: failure.exitCode };
|
|
164
|
-
}
|
|
165
|
-
export function emitVerifyJson(payload, options) {
|
|
166
|
-
reporterFor(options).emitJsonPayload(payload);
|
|
167
|
-
}
|
|
168
|
-
/** Unified verify orchestration: load workspace once, evaluate once, present by sink. */
|
|
169
|
-
export async function runVerifyCore(options) {
|
|
170
|
-
const { root, manifest } = loadWorkspace();
|
|
171
|
-
if (!options.mission) {
|
|
172
|
-
throw new Error("gapman verify: --mission is required");
|
|
173
|
-
}
|
|
174
|
-
const mission = parseMissionFile(root, options.mission);
|
|
175
|
-
const missionArg = options.mission;
|
|
176
|
-
const sink = resolveVerifySink(options);
|
|
177
|
-
switch (sink) {
|
|
178
|
-
case "break_glass_json":
|
|
179
|
-
return presentBreakGlassJson(root, mission, options);
|
|
180
|
-
case "break_glass_human":
|
|
181
|
-
return presentBreakGlassHuman(root, mission, options);
|
|
182
|
-
case "json": {
|
|
183
|
-
try {
|
|
184
|
-
assertMissionGatePresent(mission);
|
|
185
|
-
const result = evaluateVerifyPhases(root, mission, options, manifest);
|
|
186
|
-
return presentJsonFromResult(root, mission, missionArg, options, manifest, result);
|
|
187
|
-
}
|
|
188
|
-
catch (e) {
|
|
189
|
-
return presentJsonInitFailure(options, e);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
case "fix_interactive":
|
|
193
|
-
case "fix_noninteractive":
|
|
194
|
-
case "human": {
|
|
195
|
-
try {
|
|
196
|
-
assertMissionGatePresent(mission);
|
|
197
|
-
}
|
|
198
|
-
catch (e) {
|
|
199
|
-
return presentHumanInitFailure(options, e);
|
|
200
|
-
}
|
|
201
|
-
const result = evaluateVerifyPhases(root, mission, options, manifest);
|
|
202
|
-
if (sink === "fix_interactive") {
|
|
203
|
-
return presentFix(root, mission, missionArg, options, result, false, manifest);
|
|
204
|
-
}
|
|
205
|
-
if (sink === "fix_noninteractive") {
|
|
206
|
-
return presentFix(root, mission, missionArg, options, result, true, manifest);
|
|
207
|
-
}
|
|
208
|
-
return presentHuman(root, mission, missionArg, options, result);
|
|
209
|
-
}
|
|
210
|
-
default: {
|
|
211
|
-
const _exhaustive = sink;
|
|
212
|
-
return _exhaustive;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
1
|
+
export { emitVerifyJson, presentBreakGlassHuman, presentBreakGlassJson, presentFix, presentHuman, presentHumanInitFailure, presentJsonFromResult, presentJsonInitFailure, } from "./verify-presenters.js";
|
|
2
|
+
export { resolveVerifySink } from "./verify-sinks.js";
|
|
3
|
+
export { runVerifyCore } from "./verify-run.js";
|
|
216
4
|
//# sourceMappingURL=verify-present.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-present.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-present.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-present.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-present.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export type { AudienceTaggedStep, VerifyFailurePresentation, VerifyFailurePresentationInput, VerifyHintContext, VerifyRemediation, } from "./verify-remediation.js";
|
|
2
2
|
export { buildVerifyHintContext, hintsForVerifyPhase, verifyFailurePresentation, } from "./verify-remediation.js";
|
|
3
3
|
export type { VerifyFailedPayload, VerifyPassedPayload, VerifyResultPayload, VerifyTraceWarningJson, } from "./verify-payload.js";
|
|
4
|
-
export { buildBreakGlassPayload, buildVerifyResultPayload,
|
|
4
|
+
export { buildBreakGlassPayload, buildVerifyResultPayload, buildVerifyResultPayloadFromPhaseResult, initFailurePayload, } from "./verify-payload.js";
|
|
5
5
|
export type { VerifyPresentResult, VerifyRunResult, VerifySink } from "./verify-present.js";
|
|
6
6
|
export { emitVerifyJson, presentBreakGlassHuman, presentBreakGlassJson, presentFix, presentHuman, presentHumanInitFailure, presentJsonFromResult, presentJsonInitFailure, resolveVerifySink, runVerifyCore, } from "./verify-present.js";
|
|
7
|
+
export { buildVerifyResultPayloadFromOptions } from "./verify-run.js";
|
|
7
8
|
//# sourceMappingURL=verify-presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-presentation.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-presentation.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAC9B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"verify-presentation.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/verify-presentation.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,8BAA8B,EAC9B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAEjC,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,uCAAuC,EACvC,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { buildVerifyHintContext, hintsForVerifyPhase, verifyFailurePresentation, } from "./verify-remediation.js";
|
|
2
|
-
export { buildBreakGlassPayload, buildVerifyResultPayload,
|
|
2
|
+
export { buildBreakGlassPayload, buildVerifyResultPayload, buildVerifyResultPayloadFromPhaseResult, initFailurePayload, } from "./verify-payload.js";
|
|
3
3
|
export { emitVerifyJson, presentBreakGlassHuman, presentBreakGlassJson, presentFix, presentHuman, presentHumanInitFailure, presentJsonFromResult, presentJsonInitFailure, resolveVerifySink, runVerifyCore, } from "./verify-present.js";
|
|
4
|
+
export { buildVerifyResultPayloadFromOptions } from "./verify-run.js";
|
|
4
5
|
//# sourceMappingURL=verify-presentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-presentation.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-presentation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"verify-presentation.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-presentation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,uCAAuC,EACvC,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,qBAAqB,EACrB,UAAU,EACV,YAAY,EACZ,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Manifest, ParsedMission } from "./types.js";
|
|
2
|
+
import type { VerifyOptions, VerifyPhaseResult } from "./verify-engine.js";
|
|
3
|
+
import { type VerifyResultPayload } from "./verify-payload.js";
|
|
4
|
+
export interface VerifyPresentResult {
|
|
5
|
+
ok: boolean;
|
|
6
|
+
exitCode: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function presentBreakGlassJson(root: string, mission: ParsedMission, options: VerifyOptions): VerifyPresentResult;
|
|
9
|
+
export declare function presentBreakGlassHuman(root: string, mission: ParsedMission, options: VerifyOptions): VerifyPresentResult;
|
|
10
|
+
export declare function presentJsonFromResult(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, manifest: Manifest, result: VerifyPhaseResult): VerifyPresentResult;
|
|
11
|
+
export declare function presentJsonInitFailure(options: VerifyOptions, error: unknown): VerifyPresentResult;
|
|
12
|
+
export declare function presentHumanInitFailure(options: VerifyOptions, error: unknown): VerifyPresentResult;
|
|
13
|
+
export declare function presentHuman(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, result: VerifyPhaseResult): VerifyPresentResult;
|
|
14
|
+
export declare function presentFix(root: string, mission: ParsedMission, missionArg: string, options: VerifyOptions, result: VerifyPhaseResult, nonInteractive: boolean, manifest: Manifest, rerunVerify: (options: VerifyOptions) => Promise<{
|
|
15
|
+
ok: boolean;
|
|
16
|
+
exitCode: number;
|
|
17
|
+
}>): Promise<VerifyPresentResult>;
|
|
18
|
+
export declare function emitVerifyJson(payload: VerifyResultPayload, options: VerifyOptions): void;
|
|
19
|
+
//# sourceMappingURL=verify-presenters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-presenters.d.ts","sourceRoot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Aa,EACtB,MAAM,EAAE,iBAAiB,EACzB,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,GAClF,OAAO,CAAC,mBAAmB,CAAC,CAwD9B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAEzF"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { CLI_NAME } from "./constants.js";
|
|
2
|
+
import { runBreakGlassAuditFlow } from "./break-glass.js";
|
|
3
|
+
import { errorMessage, logInfo, logWarn } from "./cli-io.js";
|
|
4
|
+
import { CommandReporter } from "./command-reporter.js";
|
|
5
|
+
import { logFixHint } from "./fix-hints.js";
|
|
6
|
+
import { loadPrompts } from "./prompts-loader.js";
|
|
7
|
+
import { isGapmanUserError } from "./errors.js";
|
|
8
|
+
import { appendSurgeonMutationLog } from "./surgeon.js";
|
|
9
|
+
import { loadWorkspace } from "./workspace.js";
|
|
10
|
+
import { buildBreakGlassPayload, buildVerifyResultPayloadFromPhaseResult, initFailurePayload, } from "./verify-payload.js";
|
|
11
|
+
import { buildVerifyHintContext, hintsForVerifyPhase, } from "./verify-hints.js";
|
|
12
|
+
import { verifyFailurePresentation } from "./verify-failure-format.js";
|
|
13
|
+
import { getSurgeonForErrorCode, resolveSurgeonErrorCode, } from "./surgeons/registry.js";
|
|
14
|
+
import { persistRemediationFromFailedPayload, persistRemediationFromPhaseFailure, } from "./context-feed-remediation.js";
|
|
15
|
+
function reporterFor(options) {
|
|
16
|
+
return CommandReporter.forVerify(options);
|
|
17
|
+
}
|
|
18
|
+
export function presentBreakGlassJson(root, mission, options) {
|
|
19
|
+
const payload = buildBreakGlassPayload(root, mission, options);
|
|
20
|
+
reporterFor(options).emitJsonPayload(payload);
|
|
21
|
+
return { ok: payload.exit_code === 0, exitCode: payload.exit_code };
|
|
22
|
+
}
|
|
23
|
+
export function presentBreakGlassHuman(root, mission, options) {
|
|
24
|
+
const reporter = reporterFor(options);
|
|
25
|
+
const outcome = runBreakGlassAuditFlow(root, mission, options);
|
|
26
|
+
if (outcome.kind === "fail") {
|
|
27
|
+
reporter.emitError(errorMessage(outcome.error));
|
|
28
|
+
return { ok: false, exitCode: 2 };
|
|
29
|
+
}
|
|
30
|
+
reporter.emitInfo(`${CLI_NAME} verify: BREAK-GLASS — all gates skipped (audited on ${outcome.commitSha})`);
|
|
31
|
+
reporter.emitInfo(` reason: ${outcome.reason}`);
|
|
32
|
+
if (outcome.msnId)
|
|
33
|
+
reporter.emitInfo(` msn_id: ${outcome.msnId}`);
|
|
34
|
+
if (outcome.auditCommit) {
|
|
35
|
+
logFixHint("git push origin HEAD # audit empty commit (no gxt-bypass note)");
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
logFixHint("git push origin refs/notes/gxt-bypass");
|
|
39
|
+
}
|
|
40
|
+
return { ok: true, exitCode: 0 };
|
|
41
|
+
}
|
|
42
|
+
export function presentJsonFromResult(root, mission, missionArg, options, manifest, result) {
|
|
43
|
+
const payload = buildVerifyResultPayloadFromPhaseResult(root, mission, missionArg, options, manifest, result);
|
|
44
|
+
reporterFor(options).emitJsonPayload(payload);
|
|
45
|
+
return { ok: payload.exit_code === 0, exitCode: payload.exit_code };
|
|
46
|
+
}
|
|
47
|
+
export function presentJsonInitFailure(options, error) {
|
|
48
|
+
const payload = initFailurePayload(error);
|
|
49
|
+
try {
|
|
50
|
+
const { root } = loadWorkspace();
|
|
51
|
+
persistRemediationFromFailedPayload(root, null, options.mission, payload);
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
// best-effort remediation feed
|
|
55
|
+
}
|
|
56
|
+
reporterFor(options).emitJsonPayload(payload);
|
|
57
|
+
return { ok: false, exitCode: payload.exit_code };
|
|
58
|
+
}
|
|
59
|
+
export function presentHumanInitFailure(options, error) {
|
|
60
|
+
const reporter = reporterFor(options);
|
|
61
|
+
const payload = initFailurePayload(error);
|
|
62
|
+
try {
|
|
63
|
+
const { root } = loadWorkspace();
|
|
64
|
+
persistRemediationFromFailedPayload(root, null, options.mission, payload);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// best-effort remediation feed
|
|
68
|
+
}
|
|
69
|
+
if (isGapmanUserError(error)) {
|
|
70
|
+
reporter.emitError(`[${error.gxtCode}] ${error.message}`);
|
|
71
|
+
if (error.hint)
|
|
72
|
+
reporter.emitFixHint(error.hint);
|
|
73
|
+
return { ok: false, exitCode: error.exitCode };
|
|
74
|
+
}
|
|
75
|
+
reporter.emitError(errorMessage(error));
|
|
76
|
+
return { ok: false, exitCode: payload.exit_code };
|
|
77
|
+
}
|
|
78
|
+
export function presentHuman(root, mission, missionArg, options, result) {
|
|
79
|
+
const reporter = reporterFor(options);
|
|
80
|
+
if (result.ok) {
|
|
81
|
+
reporter.emitVerifySuccess(result, missionArg);
|
|
82
|
+
return { ok: true, exitCode: 0 };
|
|
83
|
+
}
|
|
84
|
+
const presentation = verifyFailurePresentation({
|
|
85
|
+
failure: result,
|
|
86
|
+
missionArg,
|
|
87
|
+
options,
|
|
88
|
+
root,
|
|
89
|
+
msnId: mission.msnId ?? undefined,
|
|
90
|
+
});
|
|
91
|
+
persistRemediationFromPhaseFailure(root, mission, missionArg, options, result);
|
|
92
|
+
reporter.emitFailurePresentation(presentation);
|
|
93
|
+
return { ok: false, exitCode: presentation.exit_code };
|
|
94
|
+
}
|
|
95
|
+
export async function presentFix(root, mission, missionArg, options, result, nonInteractive, manifest, rerunVerify) {
|
|
96
|
+
if (result.ok) {
|
|
97
|
+
return presentHuman(root, mission, missionArg, options, result);
|
|
98
|
+
}
|
|
99
|
+
const failure = result;
|
|
100
|
+
const surgeonRerun = await trySurgeonAndRerunVerify({
|
|
101
|
+
root,
|
|
102
|
+
mission,
|
|
103
|
+
missionArg,
|
|
104
|
+
options,
|
|
105
|
+
manifest,
|
|
106
|
+
failure,
|
|
107
|
+
}, rerunVerify);
|
|
108
|
+
if (surgeonRerun) {
|
|
109
|
+
return surgeonRerun;
|
|
110
|
+
}
|
|
111
|
+
if (nonInteractive) {
|
|
112
|
+
return presentHuman(root, mission, missionArg, options, result);
|
|
113
|
+
}
|
|
114
|
+
const reporter = reporterFor(options);
|
|
115
|
+
const remediation = hintsForVerifyPhase(failure.phase, buildVerifyHintContext(failure, missionArg, options, root, mission.msnId ?? undefined));
|
|
116
|
+
reporter.emitError(`[${remediation.error_code}] verify failed at phase: ${failure.phase}`);
|
|
117
|
+
const p = await loadPrompts();
|
|
118
|
+
const choices = remediation.fix_hints.map((hint, i) => ({
|
|
119
|
+
value: String(i),
|
|
120
|
+
label: hint.length > 100 ? `${hint.slice(0, 97)}…` : hint,
|
|
121
|
+
hint,
|
|
122
|
+
}));
|
|
123
|
+
choices.push({ value: "quit", label: "Exit (fix manually)", hint: "" });
|
|
124
|
+
const selected = await p.select({
|
|
125
|
+
message: "Choose a remediation step",
|
|
126
|
+
options: choices,
|
|
127
|
+
});
|
|
128
|
+
if (p.isCancel(selected) || selected === "quit") {
|
|
129
|
+
reporter.emitNextSteps(remediation.next_actions, remediation.tagged_steps);
|
|
130
|
+
return { ok: false, exitCode: failure.exitCode };
|
|
131
|
+
}
|
|
132
|
+
const idx = Number.parseInt(String(selected), 10);
|
|
133
|
+
const hint = remediation.fix_hints[idx];
|
|
134
|
+
if (hint)
|
|
135
|
+
reporter.emitFixHint(hint);
|
|
136
|
+
reporter.emitNextSteps(remediation.next_actions, remediation.tagged_steps);
|
|
137
|
+
return { ok: false, exitCode: failure.exitCode };
|
|
138
|
+
}
|
|
139
|
+
export function emitVerifyJson(payload, options) {
|
|
140
|
+
reporterFor(options).emitJsonPayload(payload);
|
|
141
|
+
}
|
|
142
|
+
async function trySurgeonAndRerunVerify(input, rerunVerify) {
|
|
143
|
+
if (input.options.fix !== true)
|
|
144
|
+
return null;
|
|
145
|
+
const errorCode = resolveSurgeonErrorCode(input.failure);
|
|
146
|
+
if (!errorCode)
|
|
147
|
+
return null;
|
|
148
|
+
const surgeon = getSurgeonForErrorCode(errorCode);
|
|
149
|
+
if (!surgeon)
|
|
150
|
+
return null;
|
|
151
|
+
const workerLogPath = input.failure.workerLogPath;
|
|
152
|
+
const context = {
|
|
153
|
+
root: input.root,
|
|
154
|
+
failure: input.failure,
|
|
155
|
+
manifest: input.manifest,
|
|
156
|
+
workerLogPath,
|
|
157
|
+
errorCode,
|
|
158
|
+
};
|
|
159
|
+
logWarn(`[Surgeon] Autonomous mutation triggered for error ${errorCode}`);
|
|
160
|
+
const mutation = await surgeon.applyMutation(context);
|
|
161
|
+
if (!mutation.mutated) {
|
|
162
|
+
logInfo(`${CLI_NAME} verify: [Surgeon] no mutation applied (${mutation.summary})`);
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
appendSurgeonMutationLog(workerLogPath, mutation.summary);
|
|
166
|
+
logInfo(`${CLI_NAME} verify: [Surgeon] mutation logged; rerunning full verify (fix disabled)`);
|
|
167
|
+
return rerunVerify({
|
|
168
|
+
...input.options,
|
|
169
|
+
fix: false,
|
|
170
|
+
fixNonInteractive: false,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
//# sourceMappingURL=verify-presenters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-presenters.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-presenters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gBA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