@open-agent-toolkit/cli 0.1.66 → 0.1.72

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.
Files changed (65) hide show
  1. package/assets/agents/oat-reviewer.md +0 -1
  2. package/assets/docs/cli-utilities/configuration.md +27 -0
  3. package/assets/docs/cli-utilities/index.md +1 -1
  4. package/assets/docs/cli-utilities/workflow-gates.md +147 -5
  5. package/assets/docs/reference/cli-reference.md +5 -1
  6. package/assets/docs/workflows/projects/dispatch-ceiling.md +25 -8
  7. package/assets/docs/workflows/projects/orchestration-model.md +21 -0
  8. package/assets/docs/workflows/projects/pr-flow.md +12 -1
  9. package/assets/docs/workflows/projects/review-flavors.md +9 -0
  10. package/assets/docs/workflows/projects/reviews.md +21 -1
  11. package/assets/public-package-versions.json +4 -4
  12. package/assets/skills/oat-dispatch-subagents/SKILL.md +21 -1
  13. package/assets/skills/oat-dispatch-subagents/references/provider-claude.md +21 -0
  14. package/assets/skills/oat-dispatch-subagents/references/provider-codex.md +16 -0
  15. package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +21 -0
  16. package/assets/skills/oat-project-autonomous/SKILL.md +1 -1
  17. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +5 -2
  18. package/assets/skills/oat-project-complete/SKILL.md +20 -2
  19. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +5 -2
  20. package/assets/skills/oat-project-implement/SKILL.md +1 -1
  21. package/assets/skills/oat-project-implement/references/completion-and-closeout.md +12 -1
  22. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +24 -9
  23. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +5 -2
  24. package/assets/skills/oat-project-implement/references/phase-execution.md +5 -2
  25. package/assets/skills/oat-project-next/SKILL.md +21 -6
  26. package/assets/skills/oat-project-plan/SKILL.md +6 -1
  27. package/assets/skills/oat-project-plan-writing/SKILL.md +41 -34
  28. package/assets/skills/oat-project-pr-final/SKILL.md +20 -5
  29. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +5 -2
  30. package/assets/skills/oat-project-pr-progress/SKILL.md +18 -3
  31. package/assets/skills/oat-project-progress/SKILL.md +4 -1
  32. package/assets/skills/oat-project-quick-start/SKILL.md +6 -1
  33. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +5 -2
  34. package/assets/skills/oat-project-review-provide/SKILL.md +68 -2
  35. package/assets/skills/oat-project-review-receive/SKILL.md +46 -18
  36. package/assets/skills/oat-project-review-receive-remote/SKILL.md +41 -8
  37. package/dist/commands/cleanup/project/project.utils.d.ts.map +1 -1
  38. package/dist/commands/cleanup/project/project.utils.js +19 -1
  39. package/dist/commands/config/index.d.ts.map +1 -1
  40. package/dist/commands/config/index.js +65 -1
  41. package/dist/commands/gate/__fixtures__/fake-runtime.d.mts +3 -0
  42. package/dist/commands/gate/__fixtures__/fake-runtime.d.mts.map +1 -0
  43. package/dist/commands/gate/__fixtures__/fake-runtime.mjs +167 -0
  44. package/dist/commands/gate/activity-probes.d.ts +35 -0
  45. package/dist/commands/gate/activity-probes.d.ts.map +1 -0
  46. package/dist/commands/gate/activity-probes.js +135 -0
  47. package/dist/commands/gate/branch-local-cli.d.ts +31 -0
  48. package/dist/commands/gate/branch-local-cli.d.ts.map +1 -0
  49. package/dist/commands/gate/branch-local-cli.js +116 -0
  50. package/dist/commands/gate/index.d.ts +31 -0
  51. package/dist/commands/gate/index.d.ts.map +1 -1
  52. package/dist/commands/gate/index.js +465 -31
  53. package/dist/commands/gate/route.d.ts +22 -0
  54. package/dist/commands/gate/route.d.ts.map +1 -0
  55. package/dist/commands/gate/route.js +109 -0
  56. package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
  57. package/dist/commands/project/dispatch-ceiling/index.js +100 -16
  58. package/dist/commands/review/latest.d.ts +1 -0
  59. package/dist/commands/review/latest.d.ts.map +1 -1
  60. package/dist/commands/review/latest.js +96 -22
  61. package/dist/config/oat-config.d.ts +9 -0
  62. package/dist/config/oat-config.d.ts.map +1 -1
  63. package/dist/config/oat-config.js +23 -0
  64. package/dist/config/resolve.js +7 -0
  65. package/package.json +2 -2
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from 'node:child_process';
3
+ import { writeSync } from 'node:fs';
4
+ import { appendFile, mkdir, writeFile } from 'node:fs/promises';
5
+ import { join } from 'node:path';
6
+ const prompt = process.argv.at(-1) ?? '';
7
+ const delayMs = Number(process.env.FAKE_GATE_DELAY_MS ?? '0');
8
+ const exitCode = Number(process.env.FAKE_GATE_EXIT_CODE ?? '0');
9
+ const artifactMode = process.env.FAKE_GATE_ARTIFACT ?? 'none';
10
+ const transcriptIntervalMs = Number(process.env.FAKE_GATE_TRANSCRIPT_INTERVAL_MS ?? '0');
11
+ function promptValue(key) {
12
+ return prompt.match(new RegExp(`^${key}: (.+)$`, 'm'))?.[1] ?? 'unknown';
13
+ }
14
+ function projectPath() {
15
+ return (prompt.match(/^Resolved OAT project path: (.+)\. Run the review/m)?.[1] ??
16
+ '.oat/projects/shared/demo');
17
+ }
18
+ async function writeTranscript() {
19
+ const encodedCwd = process.cwd().split(/[/.]/u).filter(Boolean).join('-');
20
+ const transcriptRoot = process.env.FAKE_GATE_TRANSCRIPT_DIR ??
21
+ join(process.env.HOME ?? '', '.cursor', 'projects', encodedCwd, 'agent-transcripts');
22
+ const transcript = join(transcriptRoot, 'fake-session', 'fake-session.jsonl');
23
+ await mkdir(join(transcript, '..'), { recursive: true });
24
+ await appendFile(transcript, `${Date.now()}\n`);
25
+ }
26
+ async function writeArtifact() {
27
+ const runId = artifactMode === 'wrong-run'
28
+ ? 'wrong-run-id'
29
+ : promptValue('oat_gate_run_id');
30
+ const project = projectPath();
31
+ const reviewsDir = join(process.cwd(), project, 'reviews');
32
+ await mkdir(reviewsDir, { recursive: true });
33
+ await writeFile(join(reviewsDir, `fake-review-${Date.now()}.md`), [
34
+ '---',
35
+ 'oat_generated: true',
36
+ `oat_generated_at: ${new Date().toISOString()}`,
37
+ `oat_review_type: ${prompt.match(/^Review type: (.+)\.$/m)?.[1] ?? 'code'}`,
38
+ `oat_review_scope: ${prompt.match(/^Review scope: (.+)\.$/m)?.[1] ?? 'final'}`,
39
+ 'oat_review_invocation: gate',
40
+ `oat_project: ${project}`,
41
+ `oat_gate_run_id: ${runId}`,
42
+ `oat_gate_target: ${promptValue('oat_gate_target')}`,
43
+ `oat_gate_runtime: ${promptValue('oat_gate_runtime')}`,
44
+ `oat_invocation_model: ${promptValue('oat_invocation_model')}`,
45
+ `oat_invocation_reasoning_effort: ${promptValue('oat_invocation_reasoning_effort')}`,
46
+ `oat_invocation_source: ${promptValue('oat_invocation_source')}`,
47
+ 'oat_review_critical_count: 0',
48
+ 'oat_review_important_count: 0',
49
+ 'oat_review_medium_count: 0',
50
+ 'oat_review_minor_count: 0',
51
+ '---',
52
+ '',
53
+ '# Fake runtime review',
54
+ '',
55
+ '## Findings',
56
+ '',
57
+ '### Critical',
58
+ '',
59
+ 'None',
60
+ '',
61
+ '### Important',
62
+ '',
63
+ 'None',
64
+ '',
65
+ '### Medium',
66
+ '',
67
+ 'None',
68
+ '',
69
+ '### Minor',
70
+ '',
71
+ 'None',
72
+ '',
73
+ ].join('\n'));
74
+ }
75
+ if (process.env.FAKE_GATE_REQUIRE_HEADLESS === '1') {
76
+ if (process.env.OAT_GATE_HEADLESS !== '1' ||
77
+ process.env.OAT_NON_INTERACTIVE !== '1' ||
78
+ !process.env.OAT_GATE_RUN_ID) {
79
+ process.stdout.write('OAT_GATE_REFUSAL: fake runtime did not receive headless context\n');
80
+ process.exit(9);
81
+ }
82
+ }
83
+ if (process.env.FAKE_GATE_WRITE_ROUTE_RECEIPT_RUNTIME &&
84
+ !process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME) {
85
+ await writeFile(process.env.OAT_GATE_ROUTE_RECEIPT_PATH, JSON.stringify({
86
+ route: 'inline',
87
+ reason: 'deterministic fake route receipt',
88
+ cliRoot: process.env.OAT_GATE_CLI_ROOT,
89
+ runtime: process.env.FAKE_GATE_WRITE_ROUTE_RECEIPT_RUNTIME,
90
+ }));
91
+ }
92
+ if (process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME) {
93
+ const cliPath = process.env.OAT_GATE_CLI_PATH;
94
+ const cliRoot = process.env.OAT_GATE_CLI_ROOT;
95
+ const configuredRuntime = process.env.FAKE_GATE_REQUIRE_ROUTE_RUNTIME;
96
+ const runtime = process.env.OAT_GATE_RUNTIME;
97
+ const model = process.env.OAT_INVOCATION_MODEL;
98
+ const promptRuntime = promptValue('oat_gate_runtime');
99
+ const promptModel = promptValue('oat_invocation_model');
100
+ if (!runtime ||
101
+ !model ||
102
+ runtime !== configuredRuntime ||
103
+ runtime !== promptRuntime ||
104
+ model !== promptModel) {
105
+ writeSync(1, `FAKE_GATE_ROUTE_INPUT_ERROR:${String(runtime)}:${String(model)}:${configuredRuntime}:${promptRuntime}:${promptModel}\n`);
106
+ process.stdout.write('OAT_GATE_REFUSAL: canonical gate route inputs were absent or inconsistent\n');
107
+ process.exit(10);
108
+ }
109
+ const marker = runtime === 'claude'
110
+ ? { CLAUDECODE: '1' }
111
+ : runtime === 'cursor'
112
+ ? { CURSOR_AGENT: '1' }
113
+ : { CODEX_SESSION_ID: 'fake-session' };
114
+ const result = cliPath
115
+ ? spawnSync(cliPath, [
116
+ 'gate',
117
+ 'route',
118
+ '--json',
119
+ '--expect-runtime',
120
+ runtime,
121
+ '--expect-model',
122
+ model,
123
+ '--can-await',
124
+ 'false',
125
+ ], {
126
+ encoding: 'utf8',
127
+ env: { ...process.env, ...marker },
128
+ })
129
+ : undefined;
130
+ let route;
131
+ try {
132
+ route = result?.status === 0 ? JSON.parse(result.stdout) : undefined;
133
+ }
134
+ catch {
135
+ route = undefined;
136
+ }
137
+ if (route?.route !== 'inline' ||
138
+ route?.cliRoot !== cliRoot ||
139
+ typeof route?.reason !== 'string') {
140
+ writeSync(1, `FAKE_GATE_ROUTE_ERROR:${result?.status ?? 'absent'}:${JSON.stringify(result?.stdout ?? '')}:${JSON.stringify(result?.stderr ?? '')}:${String(route?.cliRoot)}:${String(cliRoot)}\n`);
141
+ process.stdout.write('OAT_GATE_REFUSAL: branch-local gate route was unavailable or invalid\n');
142
+ process.exit(10);
143
+ }
144
+ if (process.env.FAKE_GATE_REPORT_ROUTE === '1') {
145
+ process.stdout.write(`FAKE_GATE_ROUTE:${route.route}:${runtime}:${model}:${route.cliRoot}\n`);
146
+ }
147
+ }
148
+ if (process.env.FAKE_GATE_STDOUT) {
149
+ process.stdout.write(`${process.env.FAKE_GATE_STDOUT}\n`);
150
+ }
151
+ if (process.env.FAKE_GATE_REFUSAL) {
152
+ process.stdout.write(`OAT_GATE_REFUSAL: ${process.env.FAKE_GATE_REFUSAL}\n`);
153
+ }
154
+ let transcriptTimer;
155
+ if (transcriptIntervalMs > 0) {
156
+ await writeTranscript();
157
+ transcriptTimer = setInterval(() => {
158
+ void writeTranscript();
159
+ }, transcriptIntervalMs);
160
+ }
161
+ await new Promise((resolve) => setTimeout(resolve, delayMs));
162
+ if (transcriptTimer)
163
+ clearInterval(transcriptTimer);
164
+ if (artifactMode === 'correlated' || artifactMode === 'wrong-run') {
165
+ await writeArtifact();
166
+ }
167
+ process.exit(exitCode);
@@ -0,0 +1,35 @@
1
+ export interface GateActivityEvidence {
2
+ source: 'transcript-dir';
3
+ runtime: string;
4
+ scope: 'project-dir' | 'ambient-runtime';
5
+ observedPath: string;
6
+ lastChangeAt: number | null;
7
+ totalSizeBytes: number | null;
8
+ changedSinceBaseline: boolean;
9
+ observedAt: number;
10
+ }
11
+ export interface GateActivityProbeStatus {
12
+ status: 'available' | 'path-absent' | 'error';
13
+ runtime: string;
14
+ scope: 'project-dir' | 'ambient-runtime';
15
+ attemptedPath: string;
16
+ observedAt: number;
17
+ evidence?: GateActivityEvidence;
18
+ }
19
+ export interface GateActivityProbe {
20
+ runtime: 'claude' | 'codex' | 'cursor';
21
+ probe(observedAt?: number): Promise<GateActivityEvidence | null>;
22
+ observe(observedAt?: number): Promise<GateActivityProbeStatus>;
23
+ }
24
+ export interface GateActivityProbeContext {
25
+ runtime: string;
26
+ cwd: string;
27
+ home: string;
28
+ spawnedAt: number;
29
+ realCwd?: string;
30
+ }
31
+ export declare function encodeClaudeProjectPath(cwd: string): string;
32
+ export declare function encodeCursorProjectPath(cwd: string): string;
33
+ export declare function resolveGateActivityPaths(context: GateActivityProbeContext, observedAt?: number): string[];
34
+ export declare function createGateActivityProbe(context: GateActivityProbeContext): Promise<GateActivityProbe | null>;
35
+ //# sourceMappingURL=activity-probes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-probes.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/activity-probes.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,GAAG,iBAAiB,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,WAAW,GAAG,aAAa,GAAG,OAAO,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,aAAa,GAAG,iBAAiB,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAOD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACvC,KAAK,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IACjE,OAAO,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D;AAWD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,wBAAwB,EACjC,UAAU,SAAoB,GAC7B,MAAM,EAAE,CA6BV;AA+DD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAyDnC"}
@@ -0,0 +1,135 @@
1
+ import { readdir, realpath, stat } from 'node:fs/promises';
2
+ import { join } from 'node:path';
3
+ const MAX_TRAVERSAL_DEPTH = 2;
4
+ export function encodeClaudeProjectPath(cwd) {
5
+ return cwd.replace(/[/._]/gu, '-');
6
+ }
7
+ export function encodeCursorProjectPath(cwd) {
8
+ return cwd.split(/[/._]/u).filter(Boolean).join('-');
9
+ }
10
+ function utcDatePath(timestamp) {
11
+ const date = new Date(timestamp);
12
+ return [
13
+ String(date.getUTCFullYear()),
14
+ String(date.getUTCMonth() + 1).padStart(2, '0'),
15
+ String(date.getUTCDate()).padStart(2, '0'),
16
+ ];
17
+ }
18
+ export function resolveGateActivityPaths(context, observedAt = context.spawnedAt) {
19
+ const cwdVariants = [...new Set([context.cwd, context.realCwd])].filter((cwd) => Boolean(cwd));
20
+ if (context.runtime === 'claude') {
21
+ return cwdVariants.map((cwd) => join(context.home, '.claude', 'projects', encodeClaudeProjectPath(cwd)));
22
+ }
23
+ if (context.runtime === 'cursor') {
24
+ return cwdVariants.map((cwd) => join(context.home, '.cursor', 'projects', encodeCursorProjectPath(cwd), 'agent-transcripts'));
25
+ }
26
+ if (context.runtime === 'codex') {
27
+ const sessionsRoot = join(context.home, '.codex', 'sessions');
28
+ const paths = [
29
+ join(sessionsRoot, ...utcDatePath(context.spawnedAt)),
30
+ join(sessionsRoot, ...utcDatePath(observedAt)),
31
+ ];
32
+ return [...new Set(paths)];
33
+ }
34
+ return [];
35
+ }
36
+ async function collectMetadata(path, depth) {
37
+ const pathStat = await stat(path);
38
+ let lastChangeAt = pathStat.mtimeMs;
39
+ let totalSizeBytes = pathStat.size;
40
+ if (!pathStat.isDirectory() || depth >= MAX_TRAVERSAL_DEPTH) {
41
+ return { lastChangeAt, totalSizeBytes };
42
+ }
43
+ const entries = await readdir(path, { withFileTypes: true });
44
+ for (const entry of entries) {
45
+ const child = await collectMetadata(join(path, entry.name), depth + 1);
46
+ lastChangeAt = Math.max(lastChangeAt, child.lastChangeAt);
47
+ totalSizeBytes += child.totalSizeBytes;
48
+ }
49
+ return { lastChangeAt, totalSizeBytes };
50
+ }
51
+ async function snapshotPaths(paths) {
52
+ let found = false;
53
+ let lastChangeAt = 0;
54
+ let totalSizeBytes = 0;
55
+ try {
56
+ for (const path of paths) {
57
+ try {
58
+ const snapshot = await collectMetadata(path, 0);
59
+ found = true;
60
+ lastChangeAt = Math.max(lastChangeAt, snapshot.lastChangeAt);
61
+ totalSizeBytes += snapshot.totalSizeBytes;
62
+ }
63
+ catch (error) {
64
+ if (error instanceof Error &&
65
+ 'code' in error &&
66
+ error.code === 'ENOENT') {
67
+ continue;
68
+ }
69
+ return { status: 'error' };
70
+ }
71
+ }
72
+ }
73
+ catch {
74
+ return { status: 'error' };
75
+ }
76
+ return found
77
+ ? {
78
+ status: 'available',
79
+ snapshot: { lastChangeAt, totalSizeBytes },
80
+ }
81
+ : { status: 'path-absent' };
82
+ }
83
+ export async function createGateActivityProbe(context) {
84
+ const resolvedContext = {
85
+ ...context,
86
+ realCwd: await realpath(context.cwd).catch(() => context.cwd),
87
+ };
88
+ const initialPaths = resolveGateActivityPaths(resolvedContext);
89
+ if (initialPaths.length === 0)
90
+ return null;
91
+ const baseline = await snapshotPaths(initialPaths);
92
+ const scope = context.runtime === 'codex' ? 'ambient-runtime' : 'project-dir';
93
+ const observe = async (observedAt = Date.now()) => {
94
+ const paths = resolveGateActivityPaths(resolvedContext, observedAt);
95
+ const current = await snapshotPaths(paths);
96
+ const attemptedPath = paths.join(',');
97
+ if (current.status !== 'available' || !current.snapshot) {
98
+ return {
99
+ status: current.status,
100
+ runtime: context.runtime,
101
+ scope,
102
+ attemptedPath,
103
+ observedAt,
104
+ };
105
+ }
106
+ const evidence = {
107
+ source: 'transcript-dir',
108
+ runtime: context.runtime,
109
+ scope,
110
+ observedPath: attemptedPath,
111
+ lastChangeAt: current.snapshot.lastChangeAt,
112
+ totalSizeBytes: current.snapshot.totalSizeBytes,
113
+ changedSinceBaseline: baseline.status !== 'available' ||
114
+ !baseline.snapshot ||
115
+ current.snapshot.lastChangeAt !== baseline.snapshot.lastChangeAt ||
116
+ current.snapshot.totalSizeBytes !== baseline.snapshot.totalSizeBytes,
117
+ observedAt,
118
+ };
119
+ return {
120
+ status: 'available',
121
+ runtime: context.runtime,
122
+ scope,
123
+ attemptedPath,
124
+ observedAt,
125
+ evidence,
126
+ };
127
+ };
128
+ return {
129
+ runtime: context.runtime,
130
+ observe,
131
+ async probe(observedAt = Date.now()) {
132
+ return (await observe(observedAt)).evidence ?? null;
133
+ },
134
+ };
135
+ }
@@ -0,0 +1,31 @@
1
+ export interface GateCliLaunch {
2
+ command: string;
3
+ args: string[];
4
+ cwd?: string;
5
+ }
6
+ export interface BranchLocalGateCli {
7
+ cliPath: string;
8
+ cliRoot: string;
9
+ routeReceiptPath: string;
10
+ shimRoot: string;
11
+ }
12
+ export interface ValidatedGateRouteEnvelope {
13
+ route: 'inline' | 'delegate-sync' | 'refuse';
14
+ reason: string;
15
+ cliRoot: string;
16
+ }
17
+ export interface GateRouteReceipt extends ValidatedGateRouteEnvelope {
18
+ runtime: string;
19
+ }
20
+ export declare function currentGateCliRoot(): string;
21
+ export declare function currentGateCliLaunch(): GateCliLaunch;
22
+ export declare function createBranchLocalGateCli(input: {
23
+ runId: string;
24
+ launch: GateCliLaunch;
25
+ cliRoot?: string;
26
+ tempRoot?: string;
27
+ }): Promise<BranchLocalGateCli>;
28
+ export declare function removeBranchLocalGateCli(shim: BranchLocalGateCli): Promise<void>;
29
+ export declare function validateGateRouteEnvelope(output: string, expectedCliRoot: string): ValidatedGateRouteEnvelope;
30
+ export declare function readGateRouteReceipt(path: string, expectedCliRoot: string, expectedRuntime: string): Promise<GateRouteReceipt>;
31
+ //# sourceMappingURL=branch-local-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branch-local-cli.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/branch-local-cli.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,QAAQ,GAAG,eAAe,GAAG,QAAQ,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAiB,SAAQ,0BAA0B;IAClE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,wBAAgB,oBAAoB,IAAI,aAAa,CAUpD;AA4CD,wBAAsB,wBAAwB,CAAC,KAAK,EAAE;IACpD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA+B9B;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,GACtB,0BAA0B,CA2B5B;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAU3B"}
@@ -0,0 +1,116 @@
1
+ import { chmod, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
2
+ import { createRequire } from 'node:module';
3
+ import { tmpdir } from 'node:os';
4
+ import { dirname, join, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ export function currentGateCliRoot() {
7
+ return resolve(dirname(fileURLToPath(import.meta.url)), '../../../../..');
8
+ }
9
+ export function currentGateCliLaunch() {
10
+ const entrypoint = process.argv[1];
11
+ if (!entrypoint) {
12
+ throw new Error('Unable to resolve the running OAT CLI entrypoint.');
13
+ }
14
+ return {
15
+ command: process.execPath,
16
+ args: [...resolveCurrentLoaderArgs(process.execArgv), entrypoint],
17
+ cwd: process.cwd(),
18
+ };
19
+ }
20
+ function resolveCurrentLoaderArgs(args) {
21
+ const resolved = [];
22
+ for (let index = 0; index < args.length; index += 1) {
23
+ const argument = args[index];
24
+ if (argument === '--import' || argument === '--require') {
25
+ const specifier = args[index + 1];
26
+ resolved.push(argument);
27
+ if (specifier) {
28
+ resolved.push(resolveLoaderSpecifier(argument, specifier));
29
+ index += 1;
30
+ }
31
+ continue;
32
+ }
33
+ const inline = argument.match(/^(--import|--require)=(.+)$/);
34
+ if (inline) {
35
+ resolved.push(`${inline[1]}=${resolveLoaderSpecifier(inline[1], inline[2])}`);
36
+ continue;
37
+ }
38
+ resolved.push(argument);
39
+ }
40
+ return resolved;
41
+ }
42
+ function resolveLoaderSpecifier(flag, specifier) {
43
+ if (specifier.startsWith('/') ||
44
+ specifier.startsWith('.') ||
45
+ specifier.startsWith('file:')) {
46
+ return specifier;
47
+ }
48
+ try {
49
+ return flag === '--require'
50
+ ? createRequire(import.meta.url).resolve(specifier)
51
+ : import.meta.resolve(specifier);
52
+ }
53
+ catch {
54
+ return specifier;
55
+ }
56
+ }
57
+ export async function createBranchLocalGateCli(input) {
58
+ const cliRoot = input.cliRoot ?? currentGateCliRoot();
59
+ const shimRoot = join(input.tempRoot ?? tmpdir(), 'oat-gate-runs', input.runId);
60
+ const cliPath = join(shimRoot, 'bin', 'oat');
61
+ const routeReceiptPath = join(shimRoot, 'route-receipt.json');
62
+ await mkdir(dirname(cliPath), { recursive: true });
63
+ await writeFile(cliPath, [
64
+ '#!/usr/bin/env node',
65
+ "import { spawnSync } from 'node:child_process';",
66
+ `const command = ${JSON.stringify(input.launch.command)};`,
67
+ `const args = ${JSON.stringify(input.launch.args)};`,
68
+ 'const result = spawnSync(command, [...args, ...process.argv.slice(2)], {',
69
+ " stdio: 'inherit',",
70
+ ' env: process.env,',
71
+ ` cwd: ${JSON.stringify(input.launch.cwd)},`,
72
+ '});',
73
+ 'if (result.error) {',
74
+ ' process.stderr.write(`${result.error.message}\\n`);',
75
+ '}',
76
+ 'process.exit(result.status ?? 1);',
77
+ '',
78
+ ].join('\n'));
79
+ await chmod(cliPath, 0o700);
80
+ return { cliPath, cliRoot, routeReceiptPath, shimRoot };
81
+ }
82
+ export async function removeBranchLocalGateCli(shim) {
83
+ await rm(shim.shimRoot, { recursive: true, force: true });
84
+ }
85
+ export function validateGateRouteEnvelope(output, expectedCliRoot) {
86
+ let parsed;
87
+ try {
88
+ parsed = JSON.parse(output);
89
+ }
90
+ catch (error) {
91
+ throw new Error('Branch-local gate route did not return JSON.', {
92
+ cause: error,
93
+ });
94
+ }
95
+ if (!parsed || typeof parsed !== 'object') {
96
+ throw new Error('Branch-local gate route returned no decision envelope.');
97
+ }
98
+ const envelope = parsed;
99
+ if (!['inline', 'delegate-sync', 'refuse'].includes(String(envelope.route)) ||
100
+ typeof envelope.reason !== 'string') {
101
+ throw new Error('Branch-local gate route returned help or an invalid decision envelope.');
102
+ }
103
+ if (envelope.cliRoot !== expectedCliRoot) {
104
+ throw new Error(`Branch-local gate route resolved outside the expected checkout (${String(envelope.cliRoot)} != ${expectedCliRoot}).`);
105
+ }
106
+ return envelope;
107
+ }
108
+ export async function readGateRouteReceipt(path, expectedCliRoot, expectedRuntime) {
109
+ const output = await readFile(path, 'utf8').catch(() => '');
110
+ const envelope = validateGateRouteEnvelope(output, expectedCliRoot);
111
+ const parsed = JSON.parse(output);
112
+ if (parsed.runtime !== expectedRuntime) {
113
+ throw new Error(`Branch-local gate route receipt runtime did not match (${String(parsed.runtime)} != ${expectedRuntime}).`);
114
+ }
115
+ return { ...envelope, runtime: expectedRuntime };
116
+ }
@@ -4,6 +4,8 @@ import { type ResolvedConfig } from '../../config/resolve.js';
4
4
  import { type ModelFamily } from '../../providers/identity/family.js';
5
5
  import { type IdentityConfidence, type IdentityProvenance } from '../../providers/identity/provenance.js';
6
6
  import { Command } from 'commander';
7
+ import { createGateActivityProbe, type GateActivityEvidence, type GateActivityProbe, type GateActivityProbeStatus } from './activity-probes.js';
8
+ import { createBranchLocalGateCli, currentGateCliLaunch, readGateRouteReceipt, removeBranchLocalGateCli } from './branch-local-cli.js';
7
9
  import { parseReviewGateVerdict } from './review-verdict.js';
8
10
  interface GateCommandDependencies {
9
11
  buildCommandContext: (options: GlobalOptions) => CommandContext;
@@ -15,12 +17,20 @@ interface GateCommandDependencies {
15
17
  readUserConfig: (userConfigDir: string) => Promise<UserConfig>;
16
18
  writeUserConfig: (userConfigDir: string, config: UserConfig) => Promise<void>;
17
19
  resolveEffectiveConfig: (repoRoot: string, userConfigDir: string, env: NodeJS.ProcessEnv) => Promise<ResolvedConfig>;
20
+ createGateActivityProbe: typeof createGateActivityProbe;
21
+ createBranchLocalGateCli: typeof createBranchLocalGateCli;
22
+ currentGateCliLaunch: typeof currentGateCliLaunch;
23
+ removeBranchLocalGateCli: typeof removeBranchLocalGateCli;
24
+ readGateRouteReceipt: typeof readGateRouteReceipt;
18
25
  runProcess: (command: string, args: string[], options: ProcessRunOptions) => Promise<ProcessRunResult>;
19
26
  parseReviewGateVerdict: typeof parseReviewGateVerdict;
20
27
  processEnv: NodeJS.ProcessEnv;
28
+ writeGateRunMarker: (path: string, marker: GateRunMarker, warn: (message: string) => void) => Promise<boolean>;
29
+ removeGateRunMarker: (path: string, warn: (message: string) => void) => Promise<void>;
21
30
  writeDiagnostic: (message: string) => void;
22
31
  }
23
32
  interface ProcessRunOptions {
33
+ activityProbe?: GateActivityProbe;
24
34
  cwd: string;
25
35
  env: NodeJS.ProcessEnv;
26
36
  livenessIntervalMs?: number;
@@ -31,13 +41,34 @@ interface ProcessRunOptions {
31
41
  timeoutMs: number;
32
42
  }
33
43
  interface ProcessRunResult {
44
+ activityEvidence?: GateActivityEvidence;
45
+ activityProbeStatus?: GateActivityProbeStatus;
46
+ capturedOutput?: string;
34
47
  exitCode: number;
48
+ refusal?: string;
49
+ stderrBytes: number;
50
+ stdoutBytes: number;
35
51
  timedOut?: boolean;
36
52
  }
37
53
  interface GateLivenessSnapshot {
38
54
  elapsedMs: number;
39
55
  hardBudgetMs: number;
40
56
  idleMs: number;
57
+ processAlive: boolean;
58
+ activityProbeStatus?: GateActivityProbeStatus;
59
+ lastActivityEvidence?: GateActivityEvidence;
60
+ }
61
+ type GateTimeoutSource = 'cli' | 'target' | 'config' | 'env' | 'scope-default' | 'default';
62
+ interface GateRunMarker {
63
+ runId: string;
64
+ targetId: string;
65
+ runtime: string;
66
+ reviewType: string | null;
67
+ reviewScope: string | null;
68
+ project: string;
69
+ startedAt: string;
70
+ budgetMs: number;
71
+ budgetSource: GateTimeoutSource;
41
72
  }
42
73
  type CrossProviderAvoid = 'same-family' | 'same-runtime' | 'none';
43
74
  type GateDiversityAchieved = 'different-family' | 'degraded-to-different-slug' | 'same-family - no diverse target available' | 'unknown-producer';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/gate/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAQL,KAAK,UAAU,EAIf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAEhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAWzB,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAExB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,sBAAsB,EAIvB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,uBAAuB;IAC/B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvE,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,MAAM,E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