@jeger-ai/opengantry 2.1.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -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 +41 -0
- package/dist/cli/lib/context-feed-remediation.js.map +1 -0
- package/dist/cli/lib/context-feed-store.d.ts +35 -0
- package/dist/cli/lib/context-feed-store.d.ts.map +1 -0
- package/dist/cli/lib/context-feed-store.js +112 -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 +4 -0
- package/dist/cli/lib/verify-failure-format.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-format.js +6 -0
- package/dist/cli/lib/verify-failure-format.js.map +1 -0
- package/dist/cli/lib/verify-failure-normalize-phases.d.ts +8 -0
- package/dist/cli/lib/verify-failure-normalize-phases.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-normalize-phases.js +70 -0
- package/dist/cli/lib/verify-failure-normalize-phases.js.map +1 -0
- package/dist/cli/lib/verify-failure-normalize-types.d.ts +32 -0
- package/dist/cli/lib/verify-failure-normalize-types.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-normalize-types.js +2 -0
- package/dist/cli/lib/verify-failure-normalize-types.js.map +1 -0
- package/dist/cli/lib/verify-failure-normalize.d.ts +28 -0
- package/dist/cli/lib/verify-failure-normalize.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-normalize.js +146 -0
- package/dist/cli/lib/verify-failure-normalize.js.map +1 -0
- package/dist/cli/lib/verify-failure-presentation-types.d.ts +29 -0
- package/dist/cli/lib/verify-failure-presentation-types.d.ts.map +1 -0
- package/dist/cli/lib/verify-failure-presentation-types.js +2 -0
- package/dist/cli/lib/verify-failure-presentation-types.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-types.d.ts +33 -0
- package/dist/cli/lib/verify-payload-types.d.ts.map +1 -0
- package/dist/cli/lib/verify-payload-types.js +2 -0
- package/dist/cli/lib/verify-payload-types.js.map +1 -0
- package/dist/cli/lib/verify-payload.d.ts +2 -33
- package/dist/cli/lib/verify-payload.d.ts.map +1 -1
- package/dist/cli/lib/verify-payload.js +15 -79
- package/dist/cli/lib/verify-payload.js.map +1 -1
- package/dist/cli/lib/verify-presentation.d.ts +14 -6
- package/dist/cli/lib/verify-presentation.d.ts.map +1 -1
- package/dist/cli/lib/verify-presentation.js +7 -3
- package/dist/cli/lib/verify-presentation.js.map +1 -1
- package/dist/cli/lib/{verify-present.d.ts → verify-presenters.d.ts} +6 -11
- package/dist/cli/lib/verify-presenters.d.ts.map +1 -0
- package/dist/cli/lib/{verify-present.js → verify-presenters.js} +56 -98
- 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
- package/dist/cli/lib/verify-present.d.ts.map +0 -1
- package/dist/cli/lib/verify-present.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function resolveVerifySink(options) {
|
|
2
|
+
if (options.breakGlass === true) {
|
|
3
|
+
return options.json ? "break_glass_json" : "break_glass_human";
|
|
4
|
+
}
|
|
5
|
+
if (options.json)
|
|
6
|
+
return "json";
|
|
7
|
+
if (options.fix === true) {
|
|
8
|
+
return options.fixNonInteractive ? "fix_noninteractive" : "fix_interactive";
|
|
9
|
+
}
|
|
10
|
+
return "human";
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=verify-sinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-sinks.js","sourceRoot":"","sources":["../../../src/cli/lib/verify-sinks.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,iBAAiB,CAAC,OAAsB;IACtD,IAAI,OAAO,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IACjE,CAAC;IACD,IAAI,OAAO,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;IAChC,IAAI,OAAO,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAC9E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const VIRTUAL_GATE_CAPTURE_FILE: "gate-capture.json";
|
|
2
|
+
/** Default max flight directories retained after abnormal termination. */
|
|
3
|
+
export declare const DEFAULT_VIRTUAL_FLIGHT_RETENTION: 32;
|
|
4
|
+
/** Default age (ms) after which abandoned flight dirs are scavenged. */
|
|
5
|
+
export declare const DEFAULT_VIRTUAL_FLIGHT_MAX_AGE_MS: number;
|
|
6
|
+
export interface GateCapturePayload {
|
|
7
|
+
captured_at: string;
|
|
8
|
+
flight_id: string;
|
|
9
|
+
gate_command: string;
|
|
10
|
+
exit_code: number | null;
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function createVirtualFlightId(): string;
|
|
15
|
+
/** True when repo-relative path lives under `.gitagent/virtual/`. */
|
|
16
|
+
export declare function isVirtualScratchPath(repoRelPath: string): boolean;
|
|
17
|
+
export declare function virtualFlightDirAbs(repoRoot: string, flightId: string): string;
|
|
18
|
+
/** Atomic JSON write inside a per-flight directory (gitignored scratch). */
|
|
19
|
+
export declare function writeVirtualJsonAtomic(repoRoot: string, flightId: string, fileName: string, payload: unknown): Promise<string>;
|
|
20
|
+
/** Synchronous variant for verify hot path (post-gate capture + purge). */
|
|
21
|
+
export declare function writeVirtualJsonAtomicSync(repoRoot: string, flightId: string, fileName: string, payload: unknown): string;
|
|
22
|
+
export declare function writeGateCaptureSync(repoRoot: string, flightId: string, capture: Omit<GateCapturePayload, "captured_at" | "flight_id">): string;
|
|
23
|
+
export declare function flightDirExists(repoRoot: string, flightId: string): boolean;
|
|
24
|
+
/** Recursively remove a single flight directory (Invariant A post-success purge). */
|
|
25
|
+
export declare function purgeVirtualFlightDir(repoRoot: string, flightId: string): void;
|
|
26
|
+
export interface ScavengeVirtualFlightsOptions {
|
|
27
|
+
maxRetained?: number;
|
|
28
|
+
maxAgeMs?: number;
|
|
29
|
+
/** Protect this flight from scavenging (active verify session). */
|
|
30
|
+
protectFlightId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Bounded retention for abnormal termination leftovers.
|
|
34
|
+
* Sorts flight dirs by mtime descending; keeps newest `maxRetained` and drops older than maxAgeMs.
|
|
35
|
+
*/
|
|
36
|
+
export declare function scavengeStaleVirtualFlights(repoRoot: string, options?: ScavengeVirtualFlightsOptions): string[];
|
|
37
|
+
//# sourceMappingURL=virtual-scratch-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-scratch-store.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/virtual-scratch-store.ts"],"names":[],"mappings":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AAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAI9E;AAED,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,6BAAkC,GAC1C,MAAM,EAAE,CAyCV"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { promoteFileAtomic } from "./atomic-fs.js";
|
|
5
|
+
import { REL_VIRTUAL_SCRATCH } from "./constants.js";
|
|
6
|
+
export const VIRTUAL_GATE_CAPTURE_FILE = "gate-capture.json";
|
|
7
|
+
/** Default max flight directories retained after abnormal termination. */
|
|
8
|
+
export const DEFAULT_VIRTUAL_FLIGHT_RETENTION = 32;
|
|
9
|
+
/** Default age (ms) after which abandoned flight dirs are scavenged. */
|
|
10
|
+
export const DEFAULT_VIRTUAL_FLIGHT_MAX_AGE_MS = 24 * 60 * 60 * 1000;
|
|
11
|
+
export function createVirtualFlightId() {
|
|
12
|
+
return crypto.randomUUID();
|
|
13
|
+
}
|
|
14
|
+
/** True when repo-relative path lives under `.gitagent/virtual/`. */
|
|
15
|
+
export function isVirtualScratchPath(repoRelPath) {
|
|
16
|
+
const norm = repoRelPath.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
17
|
+
const root = REL_VIRTUAL_SCRATCH.replace(/\\/g, "/").replace(/\/+$/, "");
|
|
18
|
+
return norm === root || norm.startsWith(`${root}/`);
|
|
19
|
+
}
|
|
20
|
+
function virtualRootAbs(repoRoot) {
|
|
21
|
+
return path.join(repoRoot, REL_VIRTUAL_SCRATCH.replace(/\/$/, ""));
|
|
22
|
+
}
|
|
23
|
+
export function virtualFlightDirAbs(repoRoot, flightId) {
|
|
24
|
+
return path.join(virtualRootAbs(repoRoot), flightId);
|
|
25
|
+
}
|
|
26
|
+
function ensureVirtualRoot(repoRoot) {
|
|
27
|
+
fs.mkdirSync(virtualRootAbs(repoRoot), { recursive: true });
|
|
28
|
+
}
|
|
29
|
+
function stagedPathInFlight(flightDir, fileName) {
|
|
30
|
+
return path.join(flightDir, `${fileName}.staging.${process.pid}.${Date.now()}`);
|
|
31
|
+
}
|
|
32
|
+
/** Atomic JSON write inside a per-flight directory (gitignored scratch). */
|
|
33
|
+
export async function writeVirtualJsonAtomic(repoRoot, flightId, fileName, payload) {
|
|
34
|
+
ensureVirtualRoot(repoRoot);
|
|
35
|
+
const flightDir = virtualFlightDirAbs(repoRoot, flightId);
|
|
36
|
+
fs.mkdirSync(flightDir, { recursive: true });
|
|
37
|
+
const target = path.join(flightDir, fileName);
|
|
38
|
+
const staged = stagedPathInFlight(flightDir, fileName);
|
|
39
|
+
const body = `${JSON.stringify(payload, null, 2)}\n`;
|
|
40
|
+
fs.writeFileSync(staged, body, { encoding: "utf8", flag: "wx" });
|
|
41
|
+
await promoteFileAtomic(staged, target);
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
/** Synchronous variant for verify hot path (post-gate capture + purge). */
|
|
45
|
+
export function writeVirtualJsonAtomicSync(repoRoot, flightId, fileName, payload) {
|
|
46
|
+
ensureVirtualRoot(repoRoot);
|
|
47
|
+
const flightDir = virtualFlightDirAbs(repoRoot, flightId);
|
|
48
|
+
fs.mkdirSync(flightDir, { recursive: true });
|
|
49
|
+
const target = path.join(flightDir, fileName);
|
|
50
|
+
const staged = stagedPathInFlight(flightDir, fileName);
|
|
51
|
+
const body = `${JSON.stringify(payload, null, 2)}\n`;
|
|
52
|
+
try {
|
|
53
|
+
fs.writeFileSync(staged, body, { encoding: "utf8", flag: "wx" });
|
|
54
|
+
fs.renameSync(staged, target);
|
|
55
|
+
}
|
|
56
|
+
catch (e) {
|
|
57
|
+
try {
|
|
58
|
+
if (fs.existsSync(staged))
|
|
59
|
+
fs.unlinkSync(staged);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
// ignore cleanup failure
|
|
63
|
+
}
|
|
64
|
+
throw e;
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
export function writeGateCaptureSync(repoRoot, flightId, capture) {
|
|
69
|
+
const payload = {
|
|
70
|
+
captured_at: new Date().toISOString(),
|
|
71
|
+
flight_id: flightId,
|
|
72
|
+
...capture,
|
|
73
|
+
};
|
|
74
|
+
return writeVirtualJsonAtomicSync(repoRoot, flightId, VIRTUAL_GATE_CAPTURE_FILE, payload);
|
|
75
|
+
}
|
|
76
|
+
export function flightDirExists(repoRoot, flightId) {
|
|
77
|
+
return fs.existsSync(virtualFlightDirAbs(repoRoot, flightId));
|
|
78
|
+
}
|
|
79
|
+
/** Recursively remove a single flight directory (Invariant A post-success purge). */
|
|
80
|
+
export function purgeVirtualFlightDir(repoRoot, flightId) {
|
|
81
|
+
const dir = virtualFlightDirAbs(repoRoot, flightId);
|
|
82
|
+
if (!fs.existsSync(dir))
|
|
83
|
+
return;
|
|
84
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Bounded retention for abnormal termination leftovers.
|
|
88
|
+
* Sorts flight dirs by mtime descending; keeps newest `maxRetained` and drops older than maxAgeMs.
|
|
89
|
+
*/
|
|
90
|
+
export function scavengeStaleVirtualFlights(repoRoot, options = {}) {
|
|
91
|
+
const root = virtualRootAbs(repoRoot);
|
|
92
|
+
if (!fs.existsSync(root))
|
|
93
|
+
return [];
|
|
94
|
+
const maxRetained = options.maxRetained ?? DEFAULT_VIRTUAL_FLIGHT_RETENTION;
|
|
95
|
+
const maxAgeMs = options.maxAgeMs ?? DEFAULT_VIRTUAL_FLIGHT_MAX_AGE_MS;
|
|
96
|
+
const protect = options.protectFlightId;
|
|
97
|
+
const now = Date.now();
|
|
98
|
+
const entries = fs
|
|
99
|
+
.readdirSync(root, { withFileTypes: true })
|
|
100
|
+
.filter((e) => e.isDirectory())
|
|
101
|
+
.map((e) => {
|
|
102
|
+
const full = path.join(root, e.name);
|
|
103
|
+
let mtime = 0;
|
|
104
|
+
try {
|
|
105
|
+
mtime = fs.statSync(full).mtimeMs;
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
mtime = 0;
|
|
109
|
+
}
|
|
110
|
+
return { name: e.name, full, mtime };
|
|
111
|
+
})
|
|
112
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
113
|
+
const removed = [];
|
|
114
|
+
for (let i = 0; i < entries.length; i += 1) {
|
|
115
|
+
const entry = entries[i];
|
|
116
|
+
if (protect && entry.name === protect)
|
|
117
|
+
continue;
|
|
118
|
+
const tooOld = now - entry.mtime > maxAgeMs;
|
|
119
|
+
const overCapacity = i >= maxRetained;
|
|
120
|
+
if (!tooOld && !overCapacity)
|
|
121
|
+
continue;
|
|
122
|
+
try {
|
|
123
|
+
fs.rmSync(entry.full, { recursive: true, force: true });
|
|
124
|
+
removed.push(entry.name);
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
// best-effort scavenger — do not fail verify
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return removed;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=virtual-scratch-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-scratch-store.js","sourceRoot":"","sources":["../../../src/cli/lib/virtual-scratch-store.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,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AAC;IACvC,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IAErC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAE,CAAC;QAC1B,IAAI,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;YAAE,SAAS;QAEhD,MAAM,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC;QAC5C,MAAM,YAAY,GAAG,CAAC,IAAI,WAAW,CAAC;QACtC,IAAI,CAAC,MAAM,IAAI,CAAC,YAAY;YAAE,SAAS;QAEvC,IAAI,CAAC;YACH,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACxD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,6CAA6C;QAC/C,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program-core.d.ts","sourceRoot":"","sources":["../../src/cli/program-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"program-core.d.ts","sourceRoot":"","sources":["../../src/cli/program-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBzC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2K3D"}
|
package/dist/cli/program-core.js
CHANGED
|
@@ -4,6 +4,8 @@ import { runUpgrade } from "./commands/upgrade.js";
|
|
|
4
4
|
import { runStatus } from "./commands/status.js";
|
|
5
5
|
import { runDoctor } from "./commands/doctor.js";
|
|
6
6
|
import { runOnboarding } from "./commands/onboarding.js";
|
|
7
|
+
import { runContextFeed } from "./commands/context-feed.js";
|
|
8
|
+
import { runAuditRigorCommand } from "./commands/audit-rigor.js";
|
|
7
9
|
import { runStart } from "./commands/start.js";
|
|
8
10
|
import { runTriage } from "./commands/triage.js";
|
|
9
11
|
import { readStdinIfEmpty } from "./lib/program-stdin.js";
|
|
@@ -56,9 +58,26 @@ export function registerCoreCommands(program) {
|
|
|
56
58
|
.action(async (opts) => {
|
|
57
59
|
await runInit(opts);
|
|
58
60
|
});
|
|
59
|
-
program
|
|
61
|
+
const upgradeCmd = program
|
|
60
62
|
.command("upgrade")
|
|
61
|
-
.description("Plan or apply substrate upgrades from the installed gapman package (Tier-3)")
|
|
63
|
+
.description("Plan or apply substrate upgrades from the installed gapman package (Tier-3)");
|
|
64
|
+
upgradeCmd
|
|
65
|
+
.command("plan")
|
|
66
|
+
.description("Preview upgrade file changes without writing staging dir or mission YAML")
|
|
67
|
+
.option("--json", "Emit stable structured JSON (schema_version 1)")
|
|
68
|
+
.option("--msn <id>", "Mission id for preview labels (default: next MSN in 9000-9099 band)")
|
|
69
|
+
.action((options) => {
|
|
70
|
+
runUpgrade({ ...options, dryRun: true });
|
|
71
|
+
});
|
|
72
|
+
upgradeCmd
|
|
73
|
+
.command("apply")
|
|
74
|
+
.description("Apply a Teacher-signed upgrade mission after hash verification")
|
|
75
|
+
.option("--json", "Emit structured JSON")
|
|
76
|
+
.option("--mission <path>", "Signed upgrade mission YAML (required unless pinned)")
|
|
77
|
+
.action((options) => {
|
|
78
|
+
runUpgrade({ ...options, apply: true });
|
|
79
|
+
});
|
|
80
|
+
upgradeCmd
|
|
62
81
|
.option("--apply", "Apply a Teacher-signed upgrade mission after hash verification")
|
|
63
82
|
.option("--dry-run", "Print upgrade plan without writing staging dir or mission YAML")
|
|
64
83
|
.option("--json", "Emit structured JSON")
|
|
@@ -117,9 +136,30 @@ export function registerCoreCommands(program) {
|
|
|
117
136
|
program
|
|
118
137
|
.command("onboarding")
|
|
119
138
|
.description("Interactive walkthrough of the strict GXT mission loop")
|
|
120
|
-
.option("--force", "Continue despite integration
|
|
139
|
+
.option("--force", "Continue despite integration health blockers on configured (broken) state")
|
|
121
140
|
.action(async (opts) => {
|
|
122
141
|
await runOnboarding({ force: opts.force });
|
|
123
142
|
});
|
|
143
|
+
program
|
|
144
|
+
.command("context-feed")
|
|
145
|
+
.description("Read or clear the latest verify remediation snapshot for IDE/agent loops")
|
|
146
|
+
.option("--json", "Emit structured remediation payload")
|
|
147
|
+
.option("--clear", "Atomically clear remediation feed (tombstone swap)")
|
|
148
|
+
.action((opts) => {
|
|
149
|
+
runContextFeed({ json: opts.json, clear: opts.clear });
|
|
150
|
+
});
|
|
151
|
+
program
|
|
152
|
+
.command("audit-rigor")
|
|
153
|
+
.description("Meta-governance audit: compiler strictness, coverage artifacts, MANIFEST wildcards")
|
|
154
|
+
.option("--json", "Emit structured report")
|
|
155
|
+
.option("--strict", "Treat warnings as failures")
|
|
156
|
+
.option("--workspace <path>", "Workspace root override (tests; default: git repo root)")
|
|
157
|
+
.action((opts) => {
|
|
158
|
+
runAuditRigorCommand({
|
|
159
|
+
json: opts.json,
|
|
160
|
+
strict: opts.strict,
|
|
161
|
+
workspace: opts.workspace,
|
|
162
|
+
});
|
|
163
|
+
});
|
|
124
164
|
}
|
|
125
165
|
//# sourceMappingURL=program-core.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program-core.js","sourceRoot":"","sources":["../../src/cli/program-core.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,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,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -27,6 +27,12 @@ properties:
|
|
|
27
27
|
minLength: 1
|
|
28
28
|
gate_success_substring:
|
|
29
29
|
type: ["string", "null"]
|
|
30
|
+
virtual_capture:
|
|
31
|
+
type: boolean
|
|
32
|
+
default: false
|
|
33
|
+
description: >-
|
|
34
|
+
When true, gapman verify captures gate stdout/stderr under
|
|
35
|
+
.gitagent/virtual/<flight-id>/ (gitignored) and purges on success.
|
|
30
36
|
upgrade_payload:
|
|
31
37
|
type: object
|
|
32
38
|
additionalProperties: false
|
package/templates/.gitignore.gxt
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
{ "targetPath": "scripts/gxt-pin-mission.sh", "mode": "managed_strict", "executable": true, "tags": ["runtime"] },
|
|
37
37
|
{ "targetPath": "scripts/gxt-resolve-mission.sh", "mode": "managed_strict", "executable": true, "tags": ["runtime"] },
|
|
38
38
|
{ "targetPath": "scripts/gxt-runtime-env.sh", "mode": "managed_strict", "executable": true, "tags": ["runtime"] },
|
|
39
|
+
{ "targetPath": "scripts/gxt-shell-agent.sh", "mode": "managed_strict", "executable": true, "tags": ["runtime", "claude-code", "codex-cli", "opencode"] },
|
|
39
40
|
{ "targetPath": "scripts/validate-gxt.sh", "mode": "managed_strict", "executable": true, "tags": ["core"] },
|
|
40
41
|
{ "targetPath": "scripts/verify-pr-missions.sh", "mode": "managed_strict", "executable": true, "tags": ["ci"] },
|
|
41
42
|
{ "targetPath": "skills/gapman.md", "mode": "scaffold_only", "tags": ["skill-specimen"] },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": "1",
|
|
3
|
-
"opengantry_version": "2.1
|
|
3
|
+
"opengantry_version": "2.2.1",
|
|
4
4
|
"asset_catalog": "integrations/asset-catalog.json",
|
|
5
5
|
"integrations": {
|
|
6
6
|
"cursor": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"verified_date": "2026-06-16",
|
|
9
9
|
"docs_url": "https://cursor.com/docs/agent/hooks",
|
|
10
10
|
"recipe_file": "cursor.md",
|
|
11
|
+
"bootstrap_mode": "hook",
|
|
11
12
|
"canonical_paths": [
|
|
12
13
|
".cursor/rules/opengantry-gxt-substrate.mdc",
|
|
13
14
|
".cursor/hooks.json"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"verified_date": "2026-06-16",
|
|
22
23
|
"docs_url": "https://docs.anthropic.com/en/docs/claude-code",
|
|
23
24
|
"recipe_file": "claude-code.md",
|
|
25
|
+
"bootstrap_mode": "shell_wrapper",
|
|
24
26
|
"canonical_paths": ["CLAUDE.md"],
|
|
25
27
|
"deprecated_paths": [],
|
|
26
28
|
"cli_probe": ["claude", "--version"]
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"docs_url": "https://developers.openai.com/codex/config-basic",
|
|
32
34
|
"disambiguation": "OpenAI Codex API (2021-2023) is NOT this product",
|
|
33
35
|
"recipe_file": "codex-cli.md",
|
|
36
|
+
"bootstrap_mode": "shell_wrapper",
|
|
34
37
|
"canonical_paths": ["AGENTS.md", ".codex/config.toml"],
|
|
35
38
|
"deprecated_paths": [],
|
|
36
39
|
"cli_probe": ["codex", "--version"]
|
|
@@ -40,6 +43,7 @@
|
|
|
40
43
|
"verified_date": "2026-06-16",
|
|
41
44
|
"docs_url": "https://opencode.ai/docs",
|
|
42
45
|
"recipe_file": "opencode.md",
|
|
46
|
+
"bootstrap_mode": "shell_wrapper",
|
|
43
47
|
"canonical_paths": ["opencode.json"],
|
|
44
48
|
"deprecated_paths": [],
|
|
45
49
|
"cli_probe": ["opencode", "--version"]
|
|
@@ -49,6 +53,7 @@
|
|
|
49
53
|
"verified_date": "2026-06-16",
|
|
50
54
|
"docs_url": "https://www.jetbrains.com/junie/",
|
|
51
55
|
"recipe_file": "junie.md",
|
|
56
|
+
"bootstrap_mode": "manual_recipe",
|
|
52
57
|
"canonical_paths": [".junie/guidelines.md"],
|
|
53
58
|
"deprecated_paths": [],
|
|
54
59
|
"cli_probe": null
|
|
@@ -58,6 +63,7 @@
|
|
|
58
63
|
"verified_date": "2026-06-16",
|
|
59
64
|
"docs_url": "https://antigravity.google/",
|
|
60
65
|
"recipe_file": "antigravity.md",
|
|
66
|
+
"bootstrap_mode": "manual_recipe",
|
|
61
67
|
"canonical_paths": [".agent/rules/gxt.md"],
|
|
62
68
|
"deprecated_paths": [],
|
|
63
69
|
"cli_probe": null
|
|
@@ -67,6 +73,7 @@
|
|
|
67
73
|
"verified_date": "2026-06-16",
|
|
68
74
|
"docs_url": "https://docs.cline.bot/",
|
|
69
75
|
"recipe_file": "cline.md",
|
|
76
|
+
"bootstrap_mode": "manual_recipe",
|
|
70
77
|
"canonical_paths": [".clinerules/gxt.md"],
|
|
71
78
|
"deprecated_paths": [".cursorrules"],
|
|
72
79
|
"cli_probe": null
|
|
@@ -76,6 +83,7 @@
|
|
|
76
83
|
"verified_date": "2026-06-16",
|
|
77
84
|
"docs_url": "https://aider.chat/docs/",
|
|
78
85
|
"recipe_file": "aider.md",
|
|
86
|
+
"bootstrap_mode": "manual_recipe",
|
|
79
87
|
"canonical_paths": [".aider.conf.yml"],
|
|
80
88
|
"deprecated_paths": [],
|
|
81
89
|
"cli_probe": ["aider", "--version"]
|
|
@@ -85,6 +93,7 @@
|
|
|
85
93
|
"verified_date": "2026-06-16",
|
|
86
94
|
"docs_url": "https://docs.all-hands.dev/",
|
|
87
95
|
"recipe_file": "openhands.md",
|
|
96
|
+
"bootstrap_mode": "manual_recipe",
|
|
88
97
|
"canonical_paths": [".openhands/microagents/gxt.md"],
|
|
89
98
|
"deprecated_paths": [],
|
|
90
99
|
"cli_probe": null
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
### Claude Code
|
|
2
2
|
|
|
3
3
|
- **Context injection:** Minimal `CLAUDE.md` pointing at `AGENTS.md`, `.gitagent/teacher/RULES.md`, `.gitagent/foreman/MANIFEST.json`.
|
|
4
|
-
- **Session bootstrap:**
|
|
4
|
+
- **Session bootstrap (shell wrapper — no project hooks):**
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
|
-
|
|
7
|
+
scripts/gxt-pin-mission.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
8
|
+
scripts/gxt-shell-agent.sh claude .gitagent/missions/MSN-0001.<slug>.yaml
|
|
9
|
+
# or with explicit task:
|
|
8
10
|
gapman runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- claude "<task>"
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
- **Enforcement:** Advisory in interactive session; process-boundary when wrapped with `runtime exec`.
|
|
12
|
-
- **Gotcha:**
|
|
13
|
+
- **Enforcement:** Advisory in interactive session; process-boundary when wrapped with `runtime exec` or `gxt-shell-agent.sh`.
|
|
14
|
+
- **Gotcha:** Claude Code does not execute project hook directories — use the shell wrapper, not phantom hook files.
|
|
13
15
|
|
|
14
16
|
Vendor docs: https://docs.anthropic.com/en/docs/claude-code
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
> **Not** the deprecated OpenAI Codex API (2021–2023). This covers [OpenAI Codex CLI](https://github.com/openai/codex) (2025+ terminal/IDE agent).
|
|
4
4
|
|
|
5
5
|
- **Context injection:** Root `AGENTS.md` (native after `gapman init`); optional `.codex/config.toml` for project defaults.
|
|
6
|
-
- **Session bootstrap:**
|
|
6
|
+
- **Session bootstrap (shell wrapper — no project hooks):**
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
|
-
|
|
9
|
+
scripts/gxt-pin-mission.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
10
|
+
scripts/gxt-shell-agent.sh codex .gitagent/missions/MSN-0001.<slug>.yaml
|
|
11
|
+
# or headless:
|
|
10
12
|
gapman runtime exec --mission .gitagent/missions/MSN-0001.<slug>.yaml -- codex exec "<task>"
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
- **Enforcement:** Advisory in interactive TUI/IDE extension; process-boundary when wrapped with `runtime exec`.
|
|
14
|
-
- **Gotcha:** Codex sandbox settings govern Codex — not GXT forbidden zones.
|
|
15
|
+
- **Enforcement:** Advisory in interactive TUI/IDE extension; process-boundary when wrapped with `runtime exec` or `gxt-shell-agent.sh`.
|
|
16
|
+
- **Gotcha:** Codex CLI does not scan project hook folders — use the shell wrapper. Codex sandbox settings govern Codex — not GXT forbidden zones.
|
|
15
17
|
|
|
16
18
|
Vendor docs: https://developers.openai.com/codex/config-basic
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
### OpenCode
|
|
2
2
|
|
|
3
3
|
- **Context injection:** Repo-root `AGENTS.md` (native); optional `opencode.json` `instructions` array.
|
|
4
|
-
- **Session bootstrap
|
|
4
|
+
- **Session bootstrap (shell wrapper — no project hooks):**
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
scripts/gxt-pin-mission.sh .gitagent/missions/MSN-0001.<slug>.yaml
|
|
8
|
+
scripts/gxt-shell-agent.sh opencode .gitagent/missions/MSN-0001.<slug>.yaml
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
- **Enforcement:** Advisory; OpenCode permissions are separate from GXT TMVC.
|
|
6
|
-
- **Gotcha:** OpenCode prefers `AGENTS.md` over `CLAUDE.md` when both exist.
|
|
12
|
+
- **Gotcha:** OpenCode prefers `AGENTS.md` over `CLAUDE.md` when both exist. OpenCode does not execute project hook directories.
|
|
7
13
|
|
|
8
14
|
Vendor docs: https://opencode.ai/docs
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Shell-wrapper bootstrap for CLI-first agents (Claude Code, Codex CLI, OpenCode).
|
|
3
|
+
# These tools do not execute project hook directories — inject GXT runtime via this wrapper.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
AGENT="${1:-}"
|
|
7
|
+
if [ -z "$AGENT" ]; then
|
|
8
|
+
cat >&2 <<'EOF'
|
|
9
|
+
Usage: scripts/gxt-shell-agent.sh <claude|codex|opencode> [mission.yaml] [--] [agent args...]
|
|
10
|
+
|
|
11
|
+
Loads GXT mission runtime env, then execs the agent CLI. Prefer over phantom hook files.
|
|
12
|
+
EOF
|
|
13
|
+
exit 2
|
|
14
|
+
fi
|
|
15
|
+
shift
|
|
16
|
+
|
|
17
|
+
MISSION_ARG=""
|
|
18
|
+
if [ $# -gt 0 ] && [ "$1" != "--" ]; then
|
|
19
|
+
case "$1" in
|
|
20
|
+
*.yaml|*.yml|*.md)
|
|
21
|
+
MISSION_ARG="$1"
|
|
22
|
+
shift
|
|
23
|
+
;;
|
|
24
|
+
esac
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
if [ "${1:-}" = "--" ]; then
|
|
28
|
+
shift
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"
|
|
32
|
+
if [ -z "$ROOT" ]; then
|
|
33
|
+
echo "gxt-shell-agent: not inside a git repository" >&2
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
cd "$ROOT"
|
|
37
|
+
|
|
38
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
39
|
+
# shellcheck source=scripts/gxt-runtime-env.sh
|
|
40
|
+
source "$SCRIPT_DIR/gxt-runtime-env.sh" ${MISSION_ARG:+"$MISSION_ARG"}
|
|
41
|
+
|
|
42
|
+
case "$AGENT" in
|
|
43
|
+
claude)
|
|
44
|
+
DEFAULT_CMD=(claude)
|
|
45
|
+
;;
|
|
46
|
+
codex)
|
|
47
|
+
DEFAULT_CMD=(codex)
|
|
48
|
+
;;
|
|
49
|
+
opencode)
|
|
50
|
+
DEFAULT_CMD=(opencode)
|
|
51
|
+
;;
|
|
52
|
+
*)
|
|
53
|
+
echo "gxt-shell-agent: unsupported agent '$AGENT' (use claude, codex, or opencode)" >&2
|
|
54
|
+
exit 2
|
|
55
|
+
;;
|
|
56
|
+
esac
|
|
57
|
+
|
|
58
|
+
if [ $# -eq 0 ]; then
|
|
59
|
+
exec "${DEFAULT_CMD[@]}"
|
|
60
|
+
else
|
|
61
|
+
exec "$@"
|
|
62
|
+
fi
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Manifest } from "./types.js";
|
|
2
|
-
export interface KpiReportStaleOptions {
|
|
3
|
-
skipStaleEvidence?: boolean;
|
|
4
|
-
/** When true, uncommitted TMVC drift is a hard failure (pre-push / CI). */
|
|
5
|
-
strictStale?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface KpiReportStaleResult {
|
|
8
|
-
stale: boolean;
|
|
9
|
-
advisoryOnly: boolean;
|
|
10
|
-
stalePaths: string[];
|
|
11
|
-
attestationCommit?: string;
|
|
12
|
-
reason?: string;
|
|
13
|
-
}
|
|
14
|
-
/** Bind KPI report attestation to TMVC drift (mirrors trace-evidence committed/uncommitted split). */
|
|
15
|
-
export declare function verifyKpiReportFreshness(repoRoot: string, manifest: Manifest, skillKey: string | null, reportPath: string, options?: KpiReportStaleOptions): KpiReportStaleResult;
|
|
16
|
-
/** True when report file is tracked in git. */
|
|
17
|
-
export declare function isKpiReportCommitted(repoRoot: string, reportPath: string): boolean;
|
|
18
|
-
//# sourceMappingURL=kpi-report-stale.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kpi-report-stale.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/kpi-report-stale.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,2EAA2E;IAC3E,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AA4BD,sGAAsG;AACtG,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAoEtB;AAED,+CAA+C;AAC/C,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAIlF"}
|