@open-agent-toolkit/cli 0.1.69 → 0.1.73
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 +1 -0
- package/assets/docs/cli-utilities/configuration.md +34 -0
- package/assets/docs/cli-utilities/index.md +2 -1
- package/assets/docs/cli-utilities/project-log.md +183 -0
- package/assets/docs/cli-utilities/workflow-gates.md +126 -3
- package/assets/docs/reference/cli-reference.md +6 -1
- package/assets/docs/workflows/projects/dispatch-ceiling.md +14 -5
- package/assets/docs/workflows/projects/orchestration-model.md +21 -0
- package/assets/docs/workflows/projects/review-flavors.md +9 -0
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-dispatch-subagents/SKILL.md +21 -1
- package/assets/skills/oat-dispatch-subagents/references/provider-claude.md +21 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-codex.md +16 -0
- package/assets/skills/oat-dispatch-subagents/references/provider-cursor.md +21 -0
- package/assets/skills/oat-project-autonomous/references/gate-inventory.md +6 -2
- package/assets/skills/oat-project-complete/SKILL.md +60 -1
- package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +6 -2
- package/assets/skills/oat-project-implement/SKILL.md +18 -2
- package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +6 -2
- package/assets/skills/oat-project-plan-writing/SKILL.md +23 -33
- package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +6 -2
- package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +6 -2
- package/assets/skills/oat-project-review-provide/SKILL.md +62 -1
- package/assets/skills/oat-project-summary/SKILL.md +122 -18
- package/assets/templates/project-log.md +47 -0
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +106 -1
- package/dist/commands/gate/__fixtures__/fake-runtime.d.mts +3 -0
- package/dist/commands/gate/__fixtures__/fake-runtime.d.mts.map +1 -0
- package/dist/commands/gate/__fixtures__/fake-runtime.mjs +167 -0
- package/dist/commands/gate/activity-probes.d.ts +35 -0
- package/dist/commands/gate/activity-probes.d.ts.map +1 -0
- package/dist/commands/gate/activity-probes.js +135 -0
- package/dist/commands/gate/branch-local-cli.d.ts +31 -0
- package/dist/commands/gate/branch-local-cli.d.ts.map +1 -0
- package/dist/commands/gate/branch-local-cli.js +116 -0
- package/dist/commands/gate/index.d.ts +31 -0
- package/dist/commands/gate/index.d.ts.map +1 -1
- package/dist/commands/gate/index.js +533 -32
- package/dist/commands/gate/route.d.ts +22 -0
- package/dist/commands/gate/route.d.ts.map +1 -0
- package/dist/commands/gate/route.js +109 -0
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +1 -0
- package/dist/commands/project/dispatch-ceiling/index.d.ts.map +1 -1
- package/dist/commands/project/dispatch-ceiling/index.js +100 -16
- package/dist/commands/project/index.d.ts.map +1 -1
- package/dist/commands/project/index.js +2 -0
- package/dist/commands/project/log/append.d.ts +41 -0
- package/dist/commands/project/log/append.d.ts.map +1 -0
- package/dist/commands/project/log/append.js +241 -0
- package/dist/commands/project/log/check.d.ts +66 -0
- package/dist/commands/project/log/check.d.ts.map +1 -0
- package/dist/commands/project/log/check.js +194 -0
- package/dist/commands/project/log/grammar.d.ts +28 -0
- package/dist/commands/project/log/grammar.d.ts.map +1 -0
- package/dist/commands/project/log/grammar.js +31 -0
- package/dist/commands/project/log/index.d.ts +9 -0
- package/dist/commands/project/log/index.d.ts.map +1 -0
- package/dist/commands/project/log/index.js +13 -0
- package/dist/commands/project/log/rollup.d.ts +40 -0
- package/dist/commands/project/log/rollup.d.ts.map +1 -0
- package/dist/commands/project/log/rollup.js +203 -0
- package/dist/commands/project/log/synthesize.d.ts +23 -0
- package/dist/commands/project/log/synthesize.d.ts.map +1 -0
- package/dist/commands/project/log/synthesize.js +112 -0
- package/dist/commands/project/new/index.d.ts +1 -0
- package/dist/commands/project/new/index.d.ts.map +1 -1
- package/dist/commands/project/new/index.js +7 -0
- package/dist/commands/project/new/scaffold.d.ts +1 -0
- package/dist/commands/project/new/scaffold.d.ts.map +1 -1
- package/dist/commands/project/new/scaffold.js +24 -0
- package/dist/config/oat-config.d.ts +12 -0
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +30 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +9 -0
- package/package.json +2 -2
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { homedir } from 'node:os';
|
|
3
|
+
import { dirname, isAbsolute, join, resolve } from 'node:path';
|
|
4
|
+
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
5
|
+
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
6
|
+
import { resolveActiveProject, } from '../../../config/oat-config.js';
|
|
7
|
+
import { resolveEffectiveConfig } from '../../../config/resolve.js';
|
|
8
|
+
import { dirExists, fileExists } from '../../../fs/io.js';
|
|
9
|
+
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
import { parseProjectLogEntries, PROJECT_LOG_FILENAME, } from './check.js';
|
|
12
|
+
const DEFAULT_LEDGER_PATH = '.oat/repo/reference/project-observations.md';
|
|
13
|
+
const WORKFLOW_OBSERVATIONS_HEADING = '## Workflow Observations';
|
|
14
|
+
export const DEFAULT_PROJECT_LOG_ARTIFACT_TARGET = {
|
|
15
|
+
filename: PROJECT_LOG_FILENAME,
|
|
16
|
+
summaryHeading: WORKFLOW_OBSERVATIONS_HEADING,
|
|
17
|
+
};
|
|
18
|
+
const DEFAULT_ROLLUP_DEPENDENCIES = {
|
|
19
|
+
resolveActiveProject,
|
|
20
|
+
resolveEffectiveConfig,
|
|
21
|
+
};
|
|
22
|
+
const DEFAULT_COMMAND_DEPENDENCIES = {
|
|
23
|
+
...DEFAULT_ROLLUP_DEPENDENCIES,
|
|
24
|
+
buildCommandContext,
|
|
25
|
+
resolveProjectRoot,
|
|
26
|
+
};
|
|
27
|
+
async function resolveTargetProject(input, dependencies) {
|
|
28
|
+
if (input.project) {
|
|
29
|
+
const projectPath = isAbsolute(input.project)
|
|
30
|
+
? resolve(input.project)
|
|
31
|
+
: resolve(input.repoRoot, input.project);
|
|
32
|
+
if (!(await dirExists(projectPath)) ||
|
|
33
|
+
!(await fileExists(join(projectPath, 'state.md')))) {
|
|
34
|
+
throw new Error(`Project path is missing or invalid: ${input.project}. Pass --project <path> for a directory containing state.md.`);
|
|
35
|
+
}
|
|
36
|
+
return projectPath;
|
|
37
|
+
}
|
|
38
|
+
const active = await dependencies.resolveActiveProject(input.repoRoot);
|
|
39
|
+
if (active.status !== 'active' || !active.path) {
|
|
40
|
+
throw new Error('No active project resolves. Set activeProject or pass --project <path>.');
|
|
41
|
+
}
|
|
42
|
+
return resolve(input.repoRoot, active.path);
|
|
43
|
+
}
|
|
44
|
+
function renderEntries(entries) {
|
|
45
|
+
return entries
|
|
46
|
+
.map((entry) => entry.body ? `${entry.heading}\n\n${entry.body}` : entry.heading)
|
|
47
|
+
.join('\n\n');
|
|
48
|
+
}
|
|
49
|
+
function writeSummarySection(content, heading, body) {
|
|
50
|
+
const escapedHeading = heading.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
51
|
+
const marker = new RegExp(`^${escapedHeading}\\s*$`, 'm').exec(content);
|
|
52
|
+
const section = `${heading}\n\n${body}\n`;
|
|
53
|
+
if (!marker) {
|
|
54
|
+
return {
|
|
55
|
+
content: `${content.trimEnd()}\n\n${section}`,
|
|
56
|
+
outcome: 'written',
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const remainder = content.slice(marker.index + marker[0].length);
|
|
60
|
+
const nextHeading = /^## .+$/m.exec(remainder);
|
|
61
|
+
const end = nextHeading?.index === undefined
|
|
62
|
+
? content.length
|
|
63
|
+
: marker.index + marker[0].length + nextHeading.index;
|
|
64
|
+
return {
|
|
65
|
+
content: `${content.slice(0, marker.index)}${section}${end < content.length ? `\n${content.slice(end).trimStart()}` : ''}`,
|
|
66
|
+
outcome: 'updated',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export async function resolveProjectLogLedgerTarget(repoRoot, home, dependencies = DEFAULT_ROLLUP_DEPENDENCIES) {
|
|
70
|
+
const effective = await dependencies.resolveEffectiveConfig(repoRoot, join(home, '.oat'));
|
|
71
|
+
const entry = effective.resolved['workflow.projectLogLedgerPath'];
|
|
72
|
+
const configuredPath = typeof entry?.value === 'string' && entry.value.trim()
|
|
73
|
+
? entry.value.trim()
|
|
74
|
+
: DEFAULT_LEDGER_PATH;
|
|
75
|
+
return {
|
|
76
|
+
path: isAbsolute(configuredPath)
|
|
77
|
+
? resolve(configuredPath)
|
|
78
|
+
: resolve(repoRoot, configuredPath),
|
|
79
|
+
explicitlyConfigured: entry?.source !== 'default',
|
|
80
|
+
defaultReferenceLayer: resolve(repoRoot, dirname(DEFAULT_LEDGER_PATH)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function ledgerKey(entry) {
|
|
84
|
+
return `${entry.date}\u0000${entry.area.toLowerCase()}`;
|
|
85
|
+
}
|
|
86
|
+
function existingLedgerKeys(content) {
|
|
87
|
+
const keys = new Set();
|
|
88
|
+
const headingPattern = /^### (\d{4}-\d{2}-\d{2}) · (?:project|general) · (?:bug|friction|worked-well|feedback) · ([^·\r\n]+)$/gm;
|
|
89
|
+
for (const match of content.matchAll(headingPattern)) {
|
|
90
|
+
keys.add(`${match[1]}\u0000${match[2].trim().toLowerCase()}`);
|
|
91
|
+
}
|
|
92
|
+
return keys;
|
|
93
|
+
}
|
|
94
|
+
async function rollupLedger(input, entries, dependencies) {
|
|
95
|
+
const target = await resolveProjectLogLedgerTarget(input.repoRoot, input.home ?? homedir(), dependencies);
|
|
96
|
+
if (!target.explicitlyConfigured &&
|
|
97
|
+
!(await dirExists(target.defaultReferenceLayer))) {
|
|
98
|
+
return 'skipped_permitted';
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
const existing = (await fileExists(target.path))
|
|
102
|
+
? await readFile(target.path, 'utf8')
|
|
103
|
+
: '# Project Observations\n\n## Entries\n';
|
|
104
|
+
const keys = existingLedgerKeys(existing);
|
|
105
|
+
const candidates = entries.filter((entry) => entry.class === 'judgment' && entry.scope === 'general');
|
|
106
|
+
const additions = [];
|
|
107
|
+
for (const entry of candidates) {
|
|
108
|
+
const key = ledgerKey(entry);
|
|
109
|
+
if (keys.has(key)) {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
keys.add(key);
|
|
113
|
+
additions.push(entry);
|
|
114
|
+
}
|
|
115
|
+
if (additions.length === 0) {
|
|
116
|
+
return 'deduplicated';
|
|
117
|
+
}
|
|
118
|
+
await mkdir(dirname(target.path), { recursive: true });
|
|
119
|
+
await writeFile(target.path, `${existing.trimEnd()}\n\n${renderEntries(additions)}\n`, 'utf8');
|
|
120
|
+
return 'appended';
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
return 'failed';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
export async function rollupProjectLog(input, overrides = {}) {
|
|
127
|
+
const dependencies = {
|
|
128
|
+
...DEFAULT_ROLLUP_DEPENDENCIES,
|
|
129
|
+
...overrides,
|
|
130
|
+
};
|
|
131
|
+
const artifactTarget = {
|
|
132
|
+
...DEFAULT_PROJECT_LOG_ARTIFACT_TARGET,
|
|
133
|
+
...input.artifactTarget,
|
|
134
|
+
};
|
|
135
|
+
const projectPath = await resolveTargetProject(input, dependencies);
|
|
136
|
+
const logPath = join(projectPath, artifactTarget.filename);
|
|
137
|
+
if (!(await fileExists(logPath))) {
|
|
138
|
+
throw new Error(`Project log does not exist: ${logPath}.`);
|
|
139
|
+
}
|
|
140
|
+
const summaryPath = input.summaryPath
|
|
141
|
+
? isAbsolute(input.summaryPath)
|
|
142
|
+
? resolve(input.summaryPath)
|
|
143
|
+
: resolve(input.repoRoot, input.summaryPath)
|
|
144
|
+
: join(projectPath, 'summary.md');
|
|
145
|
+
if (!(await fileExists(summaryPath))) {
|
|
146
|
+
throw new Error(`summary.md does not exist: ${summaryPath}. Author the project summary before roll-up.`);
|
|
147
|
+
}
|
|
148
|
+
const parsed = parseProjectLogEntries(await readFile(logPath, 'utf8'));
|
|
149
|
+
const summaryUpdate = writeSummarySection(await readFile(summaryPath, 'utf8'), artifactTarget.summaryHeading ?? WORKFLOW_OBSERVATIONS_HEADING, renderEntries(parsed.entries));
|
|
150
|
+
await writeFile(summaryPath, summaryUpdate.content, 'utf8');
|
|
151
|
+
const ledgerOutcome = await rollupLedger(input, parsed.entries, dependencies);
|
|
152
|
+
return {
|
|
153
|
+
status: ledgerOutcome === 'failed' ? 'failed' : 'ok',
|
|
154
|
+
summarySection: summaryUpdate.outcome,
|
|
155
|
+
ledgerOutcome,
|
|
156
|
+
entriesRolledUp: parsed.entries.length,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
async function runRollupCommand(options, context, dependencies) {
|
|
160
|
+
try {
|
|
161
|
+
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
162
|
+
const result = await rollupProjectLog({
|
|
163
|
+
repoRoot,
|
|
164
|
+
home: context.home,
|
|
165
|
+
project: options.project,
|
|
166
|
+
summaryPath: options.summaryPath,
|
|
167
|
+
}, dependencies);
|
|
168
|
+
if (context.json) {
|
|
169
|
+
context.logger.json(result);
|
|
170
|
+
}
|
|
171
|
+
else if (result.status === 'ok') {
|
|
172
|
+
context.logger.success(`Rolled up ${result.entriesRolledUp} project log entries.`);
|
|
173
|
+
if (result.ledgerOutcome === 'skipped_permitted') {
|
|
174
|
+
context.logger.warn('Skipped the project-observations ledger because the default reference layer is absent.');
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
context.logger.error('Project log summary was written, but the configured ledger write failed.');
|
|
179
|
+
}
|
|
180
|
+
process.exitCode = result.status === 'ok' ? 0 : 1;
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
184
|
+
if (context.json) {
|
|
185
|
+
context.logger.json({ status: 'error', message });
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
context.logger.error(message);
|
|
189
|
+
}
|
|
190
|
+
process.exitCode = 1;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
export function createProjectLogRollupCommand(overrides = {}) {
|
|
194
|
+
const dependencies = { ...DEFAULT_COMMAND_DEPENDENCIES, ...overrides };
|
|
195
|
+
return new Command('rollup')
|
|
196
|
+
.description('Write project-log observations to summary and repository ledger')
|
|
197
|
+
.option('--project <path>', 'Explicit project path; defaults to the active project')
|
|
198
|
+
.option('--summary-path <path>', 'Summary path relative to the repository; defaults to project summary.md')
|
|
199
|
+
.action(async (options, command) => {
|
|
200
|
+
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
201
|
+
await runRollupCommand(options, context, dependencies);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type CommandContext, type GlobalOptions } from '../../../app/command-context.js';
|
|
2
|
+
import { type ActiveProjectResolution } from '../../../config/oat-config.js';
|
|
3
|
+
import { Command } from 'commander';
|
|
4
|
+
export interface SynthesizeProjectLogInput {
|
|
5
|
+
repoRoot: string;
|
|
6
|
+
project?: string;
|
|
7
|
+
body?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ProjectLogSynthesizeResult {
|
|
10
|
+
status: 'synthesized';
|
|
11
|
+
logPath: string;
|
|
12
|
+
}
|
|
13
|
+
export interface SynthesizeProjectLogDependencies {
|
|
14
|
+
resolveActiveProject: (repoRoot: string) => Promise<ActiveProjectResolution>;
|
|
15
|
+
}
|
|
16
|
+
export interface ProjectLogSynthesizeCommandDependencies extends SynthesizeProjectLogDependencies {
|
|
17
|
+
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
18
|
+
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
19
|
+
readStdin: () => Promise<string>;
|
|
20
|
+
}
|
|
21
|
+
export declare function synthesizeProjectLog(input: SynthesizeProjectLogInput, overrides?: Partial<SynthesizeProjectLogDependencies>): Promise<ProjectLogSynthesizeResult>;
|
|
22
|
+
export declare function createProjectLogSynthesizeCommand(overrides?: Partial<ProjectLogSynthesizeCommandDependencies>): Command;
|
|
23
|
+
//# sourceMappingURL=synthesize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/log/synthesize.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gCAAgC;IAC/C,oBAAoB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,uCAAwC,SAAQ,gCAAgC;IAC/F,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACrD,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CAClC;AA+CD,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,yBAAyB,EAChC,SAAS,GAAE,OAAO,CAAC,gCAAgC,CAAM,GACxD,OAAO,CAAC,0BAA0B,CAAC,CAwDrC;AAqCD,wBAAgB,iCAAiC,CAC/C,SAAS,GAAE,OAAO,CAAC,uCAAuC,CAAM,GAC/D,OAAO,CAeT"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { isAbsolute, join, resolve } from 'node:path';
|
|
3
|
+
import { buildCommandContext, } from '../../../app/command-context.js';
|
|
4
|
+
import { readGlobalOptions } from '../../shared/shared.utils.js';
|
|
5
|
+
import { resolveActiveProject, } from '../../../config/oat-config.js';
|
|
6
|
+
import { dirExists, fileExists } from '../../../fs/io.js';
|
|
7
|
+
import { resolveProjectRoot } from '../../../fs/paths.js';
|
|
8
|
+
import { Command } from 'commander';
|
|
9
|
+
import { findCanonicalProjectLogSynthesisSection, PROJECT_LOG_FILENAME, SYNTHESIS_COMPLETE_HEADING, SYNTHESIS_PENDING_HEADING, } from './check.js';
|
|
10
|
+
const DEFAULT_SYNTHESIZE_DEPENDENCIES = {
|
|
11
|
+
resolveActiveProject,
|
|
12
|
+
};
|
|
13
|
+
const DEFAULT_COMMAND_DEPENDENCIES = {
|
|
14
|
+
...DEFAULT_SYNTHESIZE_DEPENDENCIES,
|
|
15
|
+
buildCommandContext,
|
|
16
|
+
resolveProjectRoot,
|
|
17
|
+
readStdin: async () => {
|
|
18
|
+
const chunks = [];
|
|
19
|
+
for await (const chunk of process.stdin) {
|
|
20
|
+
chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
|
|
21
|
+
}
|
|
22
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
async function resolveTargetProject(input, dependencies) {
|
|
26
|
+
if (input.project) {
|
|
27
|
+
const projectPath = isAbsolute(input.project)
|
|
28
|
+
? resolve(input.project)
|
|
29
|
+
: resolve(input.repoRoot, input.project);
|
|
30
|
+
if (!(await dirExists(projectPath)) ||
|
|
31
|
+
!(await fileExists(join(projectPath, 'state.md')))) {
|
|
32
|
+
throw new Error(`Project path is missing or invalid: ${input.project}. Pass --project <path> for a directory containing state.md.`);
|
|
33
|
+
}
|
|
34
|
+
return projectPath;
|
|
35
|
+
}
|
|
36
|
+
const active = await dependencies.resolveActiveProject(input.repoRoot);
|
|
37
|
+
if (active.status !== 'active' || !active.path) {
|
|
38
|
+
throw new Error('No active project resolves. Set activeProject or pass --project <path>.');
|
|
39
|
+
}
|
|
40
|
+
return resolve(input.repoRoot, active.path);
|
|
41
|
+
}
|
|
42
|
+
export async function synthesizeProjectLog(input, overrides = {}) {
|
|
43
|
+
const dependencies = {
|
|
44
|
+
...DEFAULT_SYNTHESIZE_DEPENDENCIES,
|
|
45
|
+
...overrides,
|
|
46
|
+
};
|
|
47
|
+
const body = input.body?.trim();
|
|
48
|
+
if (!body) {
|
|
49
|
+
throw new Error('--body is required and must contain non-whitespace text.');
|
|
50
|
+
}
|
|
51
|
+
if (body
|
|
52
|
+
.split(/\r?\n/)
|
|
53
|
+
.some((line) => line === SYNTHESIS_PENDING_HEADING ||
|
|
54
|
+
line === SYNTHESIS_COMPLETE_HEADING)) {
|
|
55
|
+
throw new Error('--body must not recreate command-owned project-log synthesis markers.');
|
|
56
|
+
}
|
|
57
|
+
const projectPath = await resolveTargetProject(input, dependencies);
|
|
58
|
+
const logPath = join(projectPath, PROJECT_LOG_FILENAME);
|
|
59
|
+
if (!(await fileExists(logPath))) {
|
|
60
|
+
throw new Error(`Project log does not exist: ${logPath}. Append an entry before synthesizing.`);
|
|
61
|
+
}
|
|
62
|
+
const content = await readFile(logPath, 'utf8');
|
|
63
|
+
const synthesis = findCanonicalProjectLogSynthesisSection(content);
|
|
64
|
+
if (synthesis.status === 'complete') {
|
|
65
|
+
throw new Error('End-of-run synthesis is already written; append a correction judgment instead of replacing it.');
|
|
66
|
+
}
|
|
67
|
+
if (synthesis.status === 'ambiguous') {
|
|
68
|
+
throw new Error('Project log must contain one unique canonical end-of-run synthesis section and cannot be synthesized safely.');
|
|
69
|
+
}
|
|
70
|
+
if (synthesis.status === 'missing') {
|
|
71
|
+
throw new Error('Project log is missing the pending synthesis marker and cannot be synthesized safely.');
|
|
72
|
+
}
|
|
73
|
+
const suffix = content.slice(synthesis.section.end);
|
|
74
|
+
const nextContent = `${content.slice(0, synthesis.section.start)}${SYNTHESIS_COMPLETE_HEADING}\n\n${body}\n${suffix ? '\n' : ''}${suffix}`;
|
|
75
|
+
await writeFile(logPath, nextContent, 'utf8');
|
|
76
|
+
return { status: 'synthesized', logPath };
|
|
77
|
+
}
|
|
78
|
+
async function runSynthesizeCommand(options, context, dependencies) {
|
|
79
|
+
try {
|
|
80
|
+
const repoRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
81
|
+
const body = options.body === '-' ? await dependencies.readStdin() : options.body;
|
|
82
|
+
const result = await synthesizeProjectLog({ repoRoot, project: options.project, body }, dependencies);
|
|
83
|
+
if (context.json) {
|
|
84
|
+
context.logger.json(result);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
context.logger.success(`Wrote project log synthesis: ${result.logPath}`);
|
|
88
|
+
}
|
|
89
|
+
process.exitCode = 0;
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
93
|
+
if (context.json) {
|
|
94
|
+
context.logger.json({ status: 'error', message });
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
context.logger.error(message);
|
|
98
|
+
}
|
|
99
|
+
process.exitCode = 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export function createProjectLogSynthesizeCommand(overrides = {}) {
|
|
103
|
+
const dependencies = { ...DEFAULT_COMMAND_DEPENDENCIES, ...overrides };
|
|
104
|
+
return new Command('synthesize')
|
|
105
|
+
.description('Complete the project log end-of-run synthesis')
|
|
106
|
+
.option('--body <text>', 'Synthesis body, or - to read from stdin')
|
|
107
|
+
.option('--project <path>', 'Explicit project path; defaults to the active project')
|
|
108
|
+
.action(async (options, command) => {
|
|
109
|
+
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
110
|
+
await runSynthesizeCommand(options, context, dependencies);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
@@ -11,6 +11,7 @@ interface ProjectNewDependencies {
|
|
|
11
11
|
setActive: boolean;
|
|
12
12
|
refreshDashboard: boolean;
|
|
13
13
|
commit: boolean;
|
|
14
|
+
projectLog?: boolean;
|
|
14
15
|
}) => Promise<ScaffoldProjectResult>;
|
|
15
16
|
}
|
|
16
17
|
export declare function createProjectNewCommand(overrides?: Partial<ProjectNewDependencies>): Command;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAE5C,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC3B,MAAM,YAAY,CAAC;AAkBpB,UAAU,sBAAsB;IAC9B,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,cAAc,CAAC;IAChE,eAAe,EAAE,CAAC,OAAO,EAAE;QACzB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC;QACf,SAAS,EAAE,OAAO,CAAC;QACnB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,MAAM,EAAE,OAAO,CAAC;QAChB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACtC;AA0FD,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,OAAO,CAAC,sBAAsB,CAAM,GAC9C,OAAO,CA0CT"}
|
|
@@ -58,6 +58,11 @@ async function runProjectNew(projectName, options, context, dependencies) {
|
|
|
58
58
|
setActive: options.setActive,
|
|
59
59
|
refreshDashboard: options.dashboard,
|
|
60
60
|
commit: options.commit,
|
|
61
|
+
projectLog: options.withProjectLog === true
|
|
62
|
+
? true
|
|
63
|
+
: options.projectLog === false
|
|
64
|
+
? false
|
|
65
|
+
: undefined,
|
|
61
66
|
});
|
|
62
67
|
reportSuccess(context, projectName, result);
|
|
63
68
|
process.exitCode = 0;
|
|
@@ -88,6 +93,8 @@ export function createProjectNewCommand(overrides = {}) {
|
|
|
88
93
|
.option('--no-set-active', 'Do not update active project in local config')
|
|
89
94
|
.option('--no-dashboard', 'Do not refresh .oat/state.md after scaffold')
|
|
90
95
|
.option('--no-commit', 'Do not git-commit the scaffolded project directory')
|
|
96
|
+
.option('--with-project-log', 'Create project-log.md regardless of workflow.projectLog config')
|
|
97
|
+
.option('--no-project-log', 'Do not create project-log.md during scaffolding')
|
|
91
98
|
.action(async (name, options, command) => {
|
|
92
99
|
if (name.startsWith('-')) {
|
|
93
100
|
command.help();
|
|
@@ -6,6 +6,7 @@ export interface ScaffoldProjectOptions {
|
|
|
6
6
|
force?: boolean;
|
|
7
7
|
setActive?: boolean;
|
|
8
8
|
refreshDashboard?: boolean;
|
|
9
|
+
projectLog?: boolean;
|
|
9
10
|
/**
|
|
10
11
|
* Commit the freshly scaffolded project directory so the artifact baseline is
|
|
11
12
|
* git-tracked from t=0. Opt-in (default false) so library callers that manage
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/scaffold.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../../../src/commands/project/new/scaffold.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,mBAAmB,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvE;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,kBAAkB,GAClB,qBAAqB,GACrB,iBAAiB,GACjB,QAAQ,CAAC;AAEb,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,oBAAoB,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAmWD,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,qBAAqB,CAAC,CAuGhC"}
|
|
@@ -2,9 +2,11 @@ import { execFileSync } from 'node:child_process';
|
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
|
+
import { instantiateProjectLogTemplate } from '../../project/log/append.js';
|
|
5
6
|
import { resolveProjectsRoot } from '../../shared/oat-paths.js';
|
|
6
7
|
import { generateStateDashboard } from '../../state/generate.js';
|
|
7
8
|
import { setActiveProject } from '../../../config/oat-config.js';
|
|
9
|
+
import { resolveEffectiveConfig } from '../../../config/resolve.js';
|
|
8
10
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
9
11
|
import { fileExists } from '../../../fs/io.js';
|
|
10
12
|
import { assertValidProjectStateContent } from '../../../validation/project-state.js';
|
|
@@ -199,6 +201,17 @@ async function scaffoldModeTemplates(userOatRoot, repoRoot, projectPath, project
|
|
|
199
201
|
}
|
|
200
202
|
return { createdFiles, skippedFiles };
|
|
201
203
|
}
|
|
204
|
+
async function scaffoldProjectLog(userOatRoot, repoRoot, projectPath, projectName, today) {
|
|
205
|
+
const templateFile = 'project-log.md';
|
|
206
|
+
const dest = join(repoRoot, projectPath, templateFile);
|
|
207
|
+
if (await fileExists(dest)) {
|
|
208
|
+
return 'skipped';
|
|
209
|
+
}
|
|
210
|
+
const src = await resolveTemplateSource(userOatRoot, repoRoot, templateFile);
|
|
211
|
+
const template = await readFile(src, 'utf8');
|
|
212
|
+
await writeFile(dest, instantiateProjectLogTemplate(template, projectName, today), 'utf8');
|
|
213
|
+
return 'created';
|
|
214
|
+
}
|
|
202
215
|
async function resolveTemplateSource(userOatRoot, repoRoot, templateFile) {
|
|
203
216
|
const userSource = join(userOatRoot, 'templates', templateFile);
|
|
204
217
|
if (await fileExists(userSource)) {
|
|
@@ -247,6 +260,17 @@ export async function scaffoldProject(options) {
|
|
|
247
260
|
void options.force;
|
|
248
261
|
await ensureStructure(options.repoRoot, projectPath, mode);
|
|
249
262
|
const { createdFiles, skippedFiles } = await scaffoldModeTemplates(userOatRoot, options.repoRoot, projectPath, options.projectName, mode, today, nowUtc);
|
|
263
|
+
const effectiveProjectLog = options.projectLog ??
|
|
264
|
+
(await resolveEffectiveConfig(options.repoRoot, userOatRoot, env)).resolved['workflow.projectLog']?.value === true;
|
|
265
|
+
if (effectiveProjectLog) {
|
|
266
|
+
const projectLogResult = await scaffoldProjectLog(userOatRoot, options.repoRoot, projectPath, options.projectName, today);
|
|
267
|
+
if (projectLogResult === 'created') {
|
|
268
|
+
createdFiles.push('project-log.md');
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
skippedFiles.push('project-log.md');
|
|
272
|
+
}
|
|
273
|
+
}
|
|
250
274
|
if (setActive) {
|
|
251
275
|
await setActiveProject(options.repoRoot, projectPath);
|
|
252
276
|
}
|
|
@@ -19,6 +19,7 @@ export interface OatArchiveConfig {
|
|
|
19
19
|
awsRegion?: string;
|
|
20
20
|
}
|
|
21
21
|
export type WorkflowHillCheckpointDefault = 'every' | 'final';
|
|
22
|
+
export type WorkflowProjectLog = true | false | 'auto';
|
|
22
23
|
export type WorkflowPostImplementStep = 'summary' | 'document' | 'pr';
|
|
23
24
|
export type WorkflowPostImplementLegacySequence = 'wait' | 'summary' | 'pr' | 'docs-pr';
|
|
24
25
|
export interface WorkflowPostImplementStructuredSequence {
|
|
@@ -35,6 +36,9 @@ export type WorkflowDispatchPolicyMode = 'managed' | 'inherit';
|
|
|
35
36
|
export type WorkflowManagedDispatchPolicy = 'economy' | 'balanced' | 'high' | 'frontier' | 'uncapped';
|
|
36
37
|
export type GateOnFailure = 'block' | 'prompt' | 'warn';
|
|
37
38
|
export type GateAvoid = 'same-family' | 'same-runtime' | 'none';
|
|
39
|
+
export declare const MIN_GATE_TIMEOUT_MS = 1000;
|
|
40
|
+
export declare const MAX_GATE_TIMEOUT_MS = 14400000;
|
|
41
|
+
export declare function isValidGateTimeoutMs(value: unknown): value is number;
|
|
38
42
|
export interface WorkflowDispatchCeiling {
|
|
39
43
|
preset?: WorkflowDispatchCeilingPreset;
|
|
40
44
|
recommendationVersion?: string;
|
|
@@ -66,12 +70,17 @@ export interface ExecTarget {
|
|
|
66
70
|
hostDetectionCommand?: string[];
|
|
67
71
|
availabilityCommand?: string[];
|
|
68
72
|
priority: number;
|
|
73
|
+
timeoutMs?: number;
|
|
69
74
|
}
|
|
70
75
|
export type ExecTargetConfig = Partial<ExecTarget>;
|
|
71
76
|
export interface WorkflowGatesConfig {
|
|
72
77
|
execTargets?: Record<string, ExecTargetConfig | null>;
|
|
73
78
|
skills?: Record<string, GateConfig | null>;
|
|
74
79
|
}
|
|
80
|
+
export interface WorkflowGateTimeouts {
|
|
81
|
+
code?: number;
|
|
82
|
+
artifact?: number;
|
|
83
|
+
}
|
|
75
84
|
export interface OatWorkflowConfig {
|
|
76
85
|
hillCheckpointDefault?: WorkflowHillCheckpointDefault;
|
|
77
86
|
archiveOnComplete?: boolean;
|
|
@@ -81,9 +90,12 @@ export interface OatWorkflowConfig {
|
|
|
81
90
|
autoReviewAtHillCheckpoints?: boolean;
|
|
82
91
|
autoNarrowReReviewScope?: boolean;
|
|
83
92
|
autoArtifactReview?: WorkflowAutoArtifactReview;
|
|
93
|
+
projectLog?: WorkflowProjectLog;
|
|
94
|
+
projectLogLedgerPath?: string;
|
|
84
95
|
designMode?: WorkflowDesignMode;
|
|
85
96
|
dispatchPolicy?: WorkflowDispatchPolicy;
|
|
86
97
|
dispatchCeiling?: WorkflowDispatchCeiling;
|
|
98
|
+
gateTimeouts?: WorkflowGateTimeouts;
|
|
87
99
|
gates?: WorkflowGatesConfig;
|
|
88
100
|
}
|
|
89
101
|
export declare const VALID_CODEX_DISPATCH_CEILINGS: readonly WorkflowCodexDispatchCeiling[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oat-config.d.ts","sourceRoot":"","sources":["../../src/config/oat-config.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,2BAA2B,EAC3B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,iCAAiC,EACjC,2BAA2B,EAC3B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,GACjC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,GA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14 @@ import { normalizeToPosixPath, validateRealPathWithinScope } from '../fs/paths.j
|
|
|
6
6
|
import { normalizeDispatchMatrix, } from './dispatch-matrix.js';
|
|
7
7
|
import { parseJsonConfig } from './json.js';
|
|
8
8
|
export { VALID_DISPATCH_MATRIX_TIERS, isCodexMaterializedRouteTarget, isWorkflowDispatchCandidateLadder, isWorkflowDispatchFallbackRoute, toWorkflowDispatchCandidateLadder, validateDispatchRouteTarget, } from './dispatch-matrix.js';
|
|
9
|
+
export const MIN_GATE_TIMEOUT_MS = 1_000;
|
|
10
|
+
export const MAX_GATE_TIMEOUT_MS = 14_400_000;
|
|
11
|
+
export function isValidGateTimeoutMs(value) {
|
|
12
|
+
return (typeof value === 'number' &&
|
|
13
|
+
Number.isInteger(value) &&
|
|
14
|
+
value >= MIN_GATE_TIMEOUT_MS &&
|
|
15
|
+
value <= MAX_GATE_TIMEOUT_MS);
|
|
16
|
+
}
|
|
9
17
|
const VALID_HILL_CHECKPOINT_DEFAULTS = ['every', 'final'];
|
|
10
18
|
const VALID_POST_IMPLEMENT_LEGACY_SEQUENCES = ['wait', 'summary', 'pr', 'docs-pr'];
|
|
11
19
|
const VALID_POST_IMPLEMENT_STEPS = [
|
|
@@ -206,6 +214,9 @@ function normalizeExecTarget(value) {
|
|
|
206
214
|
target.priority = value.priority;
|
|
207
215
|
}
|
|
208
216
|
}
|
|
217
|
+
if (isValidGateTimeoutMs(value.timeoutMs)) {
|
|
218
|
+
target.timeoutMs = value.timeoutMs;
|
|
219
|
+
}
|
|
209
220
|
const hostDetectionCommand = normalizeArgv(value.hostDetectionCommand);
|
|
210
221
|
if (hostDetectionCommand !== undefined) {
|
|
211
222
|
target.hostDetectionCommand = hostDetectionCommand;
|
|
@@ -278,6 +289,13 @@ function normalizeWorkflowConfig(parsed) {
|
|
|
278
289
|
next.autoArtifactReview = autoArtifactReview;
|
|
279
290
|
}
|
|
280
291
|
}
|
|
292
|
+
if (typeof parsed.projectLog === 'boolean' || parsed.projectLog === 'auto') {
|
|
293
|
+
next.projectLog = parsed.projectLog;
|
|
294
|
+
}
|
|
295
|
+
const projectLogLedgerPath = trimNonEmptyString(parsed.projectLogLedgerPath);
|
|
296
|
+
if (projectLogLedgerPath !== undefined) {
|
|
297
|
+
next.projectLogLedgerPath = projectLogLedgerPath;
|
|
298
|
+
}
|
|
281
299
|
if (typeof parsed.designMode === 'string' &&
|
|
282
300
|
VALID_DESIGN_MODES.includes(parsed.designMode)) {
|
|
283
301
|
next.designMode = parsed.designMode;
|
|
@@ -323,6 +341,18 @@ function normalizeWorkflowConfig(parsed) {
|
|
|
323
341
|
next.dispatchCeiling = dispatchCeiling;
|
|
324
342
|
}
|
|
325
343
|
}
|
|
344
|
+
if (isRecord(parsed.gateTimeouts)) {
|
|
345
|
+
const gateTimeouts = {};
|
|
346
|
+
if (isValidGateTimeoutMs(parsed.gateTimeouts.code)) {
|
|
347
|
+
gateTimeouts.code = parsed.gateTimeouts.code;
|
|
348
|
+
}
|
|
349
|
+
if (isValidGateTimeoutMs(parsed.gateTimeouts.artifact)) {
|
|
350
|
+
gateTimeouts.artifact = parsed.gateTimeouts.artifact;
|
|
351
|
+
}
|
|
352
|
+
if (Object.keys(gateTimeouts).length > 0) {
|
|
353
|
+
next.gateTimeouts = gateTimeouts;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
326
356
|
if (isRecord(parsed.gates)) {
|
|
327
357
|
const gates = {};
|
|
328
358
|
const execTargets = normalizeRecordMap(parsed.gates.execTargets, normalizeExecTarget);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/config/resolve.ts"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,OAAO,GACP,MAAM,GACN,KAAK,GAC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S,CAAC,CAAC;IACxD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAClE,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CAChE;AAsFD,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,SAAS,GAAE,OAAO,CAAC,kCAAkC,CAAM,GAC1D,OAAO,CAAC,cAAc,CAAC,CAgFzB;AAED,wBAAgB,WAAW,CACzB,SAAS,EAAE,cAAc,EACzB,SAAS,EAAE,MAAM,GAChB,UAAU,GAAG,IAAI,CAcnB;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,cAAc,GACxB,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAY5B;AAED,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,gBAAgB,CAAC;IACzB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,cAAc,GACxB,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAoDxC"}
|
package/dist/config/resolve.js
CHANGED
|
@@ -58,6 +58,8 @@ const DEFAULT_WORKFLOW_CONFIG = {
|
|
|
58
58
|
plan: true,
|
|
59
59
|
analysis: true,
|
|
60
60
|
},
|
|
61
|
+
projectLog: 'auto',
|
|
62
|
+
projectLogLedgerPath: '.oat/repo/reference/project-observations.md',
|
|
61
63
|
designMode: null,
|
|
62
64
|
dispatchCeiling: {
|
|
63
65
|
preset: null,
|
|
@@ -235,6 +237,7 @@ function mergeExecTargetLayer(targets, layer) {
|
|
|
235
237
|
hostDetectionCommand: override.hostDetectionCommand ?? existing.hostDetectionCommand,
|
|
236
238
|
availabilityCommand: override.availabilityCommand ?? existing.availabilityCommand,
|
|
237
239
|
priority: override.priority ?? existing.priority,
|
|
240
|
+
timeoutMs: override.timeoutMs ?? existing.timeoutMs,
|
|
238
241
|
});
|
|
239
242
|
continue;
|
|
240
243
|
}
|
|
@@ -268,6 +271,9 @@ function cloneExecTarget(target) {
|
|
|
268
271
|
if (target.models) {
|
|
269
272
|
next.models = [...target.models];
|
|
270
273
|
}
|
|
274
|
+
if (target.timeoutMs !== undefined) {
|
|
275
|
+
next.timeoutMs = target.timeoutMs;
|
|
276
|
+
}
|
|
271
277
|
return next;
|
|
272
278
|
}
|
|
273
279
|
function toCompleteExecTarget(target) {
|
|
@@ -294,6 +300,9 @@ function toCompleteExecTarget(target) {
|
|
|
294
300
|
if (isValidStringList(target.models)) {
|
|
295
301
|
completeTarget.models = target.models.map((model) => model.trim());
|
|
296
302
|
}
|
|
303
|
+
if (target.timeoutMs !== undefined) {
|
|
304
|
+
completeTarget.timeoutMs = target.timeoutMs;
|
|
305
|
+
}
|
|
297
306
|
return completeTarget;
|
|
298
307
|
}
|
|
299
308
|
function mergeExecTargetInvocation(existing, override) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.73",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.1.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.1.73"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|