@shapeshift-labs/frontier-swarm-codex 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -5
- package/benchmarks/package-bench.mjs +19 -2
- package/dist/cli.js +87 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +276 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +969 -23
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Node Codex CLI runner adapter for Frontier swarm plans.
|
|
|
4
4
|
|
|
5
5
|
`frontier-swarm-codex` executes `@shapeshift-labs/frontier-swarm` plans with the Codex CLI. It owns Node process spawning, prompt rendering, worktree/snapshot workspace setup, command shaping, JSONL output capture, last-message capture, optional verification commands, changed-path ownership checks, and swarm result/proof artifacts.
|
|
6
6
|
|
|
7
|
-
The default
|
|
7
|
+
The default swarm compute profile records `gpt-5.5` with `model_reasoning_effort="xhigh"` for planning. The Codex CLI invocation defaults to the local Codex config instead of forwarding planned model flags, because model availability and accepted flag values vary by Codex binary and account. Pass `--model ...`, `--model-policy plan`, or `modelPolicy: 'plan'` when a runner should force the planned profile. The pure `frontier-swarm` package stays runtime-neutral.
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
## Related Packages
|
|
@@ -38,7 +38,7 @@ The published Frontier package family is generated from one shared package catal
|
|
|
38
38
|
- [`@shapeshift-labs/frontier-workflow`](https://www.npmjs.com/package/@shapeshift-labs/frontier-workflow): Serializable durable workflow/process manifests for Frontier apps, including steps, waits, approvals, timers, retries, expected patches, compensation, records, timelines, and registry graph output.
|
|
39
39
|
- [`@shapeshift-labs/frontier-worker`](https://www.npmjs.com/package/@shapeshift-labs/frontier-worker): Serializable worker and edge task descriptors for Frontier apps, including queues, idempotency keys, retry and timeout policy, declared reads/writes/effects, snapshots, patch outputs, produced assets, execution records, logs, trace links, proof hashes, dedupe indexes, and registry graph output.
|
|
40
40
|
- [`@shapeshift-labs/frontier-queue`](https://www.npmjs.com/package/@shapeshift-labs/frontier-queue): Serializable durable queue state, leases, retries, dedupe keys, patch-carrying jobs, dead-letter records, replay evidence, and queue inspection for Frontier apps.
|
|
41
|
-
- [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, task queues, event streams, run records, changed-path checks, and proof artifacts for Frontier agent work.
|
|
41
|
+
- [`@shapeshift-labs/frontier-swarm`](https://www.npmjs.com/package/@shapeshift-labs/frontier-swarm): Hierarchical swarm plans, lanes, compute profiles, ownership policy, semantic ownership regions, task queues, event streams, run records, merge bundles, merge indexes, queue overlays, merge admission, changed-path checks, and proof artifacts for Frontier agent work.
|
|
42
42
|
- [`@shapeshift-labs/frontier-kv`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv): Serializable in-memory key/value state for Frontier apps, including TTL, versioned compare-and-set, batched patch mutations, scans, watchers, snapshots, JSONL event evidence, and replay verification.
|
|
43
43
|
- [`@shapeshift-labs/frontier-kv-locks`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-locks): Lease-style lock records on top of Frontier KV, including acquire, renew, release, fencing tokens, expiration, owner evidence, and replayable lock events.
|
|
44
44
|
- [`@shapeshift-labs/frontier-kv-rate-limit`](https://www.npmjs.com/package/@shapeshift-labs/frontier-kv-rate-limit): Patch-native rate limit buckets for Frontier KV, including fixed windows, sliding windows, token buckets, deterministic refill, consume evidence, and reset records.
|
|
@@ -184,6 +184,13 @@ frontier-swarm-codex run \
|
|
|
184
184
|
--link-path packages \
|
|
185
185
|
--link-node-modules true \
|
|
186
186
|
--sandbox workspace-write
|
|
187
|
+
|
|
188
|
+
frontier-swarm stop --run agent-runs/codex-swarm/run-1
|
|
189
|
+
|
|
190
|
+
frontier-swarm collect \
|
|
191
|
+
--run agent-runs/codex-swarm/run-1 \
|
|
192
|
+
--outDir agent-runs/codex-swarm/run-1/collected \
|
|
193
|
+
--branch-prefix codex/swarm-slice
|
|
187
194
|
```
|
|
188
195
|
|
|
189
196
|
## API
|
|
@@ -199,6 +206,7 @@ const plan = createCodexSwarmPlan({ manifest, tasks });
|
|
|
199
206
|
await runCodexSwarm(plan, {
|
|
200
207
|
outDir: 'agent-runs/codex-swarm/run-1',
|
|
201
208
|
maxConcurrency: 4,
|
|
209
|
+
modelPolicy: 'config-default',
|
|
202
210
|
workspace: {
|
|
203
211
|
mode: 'copy',
|
|
204
212
|
root: '../agent-workspaces',
|
|
@@ -211,6 +219,10 @@ await runCodexSwarm(plan, {
|
|
|
211
219
|
});
|
|
212
220
|
```
|
|
213
221
|
|
|
222
|
+
App-specific adapters should keep orchestration inside this package and use hooks for local policy. `prepareJobWorkspace` can link generated package artifacts or shared fixtures, `renderJobPrompt` can append product-specific migration rules, `changedPathFilter` can hide runner-owned symlinks from ownership checks, and `onJobStarted`/`onJobFinished`/`onSwarmFinished` can mirror lifecycle records into project-specific JSONL streams.
|
|
223
|
+
|
|
224
|
+
Use `modelPolicy: 'config-default'` for portable swarms that should respect each machine's Codex config. Use `modelPolicy: 'plan'` only when the installed Codex CLI and account are known to accept the planned model IDs. `approval: 'full-auto'` and `--approval-policy full-auto` are normalized to the current `--ask-for-approval never` spelling.
|
|
225
|
+
|
|
214
226
|
## Minimal Repro Workspaces
|
|
215
227
|
|
|
216
228
|
Large monorepos do not need one full git worktree per worker. The adapter supports four workspace modes:
|
|
@@ -220,24 +232,46 @@ Large monorepos do not need one full git worktree per worker. The adapter suppor
|
|
|
220
232
|
- `copy`: create a minimal copied workspace from declared includes, task `files`, `sourceRefs`, `targetRefs`, and task `snapshotIncludes`.
|
|
221
233
|
- `snapshot`: same minimal-copy mechanics with snapshot-oriented naming for legacy SNES-style task manifests.
|
|
222
234
|
|
|
223
|
-
For `copy` and `snapshot`, the runner excludes heavy paths by default (`.git`, `node_modules`, `dist`, coverage, agent-runs, ROM/test artifacts) and passes `--skip-git-repo-check` to Codex. It snapshots the copied workspace before and after execution so changed-path ownership checks still work without git metadata. Use `linkPaths` for heavy shared directories such as `packages`, corpora, ROMs, or research checkouts that should not be duplicated. Task JSON may also declare `snapshotIncludes`, `snapshotExcludes`, `snapshotArtifactIncludes`, and `
|
|
235
|
+
For `copy` and `snapshot`, the runner excludes heavy paths by default (`.git`, `node_modules`, `dist`, coverage, agent-runs, ROM/test artifacts) and passes `--skip-git-repo-check` to Codex. It snapshots the copied workspace before and after execution so changed-path ownership checks still work without git metadata. Runner-owned artifacts are recorded in `workspace-proof.json` and filtered out of ownership checks, which keeps parent dirty files and copied workspace logs from falsely failing useful workers. Each job also writes `changes.patch` when a patch can be derived and `merge.json` with the touched owned files, evidence paths, verification results, queue item IDs, risk, and merge disposition. Use `linkPaths` for heavy shared directories such as `packages`, corpora, ROMs, or research checkouts that should not be duplicated. Task JSON may also declare `snapshotIncludes`, `snapshotExcludes`, `snapshotArtifactIncludes`, `snapshotLinkPaths`, `requiredIncludes`, and `optionalIncludes`.
|
|
224
236
|
|
|
225
237
|
## Scalable Scheduling
|
|
226
238
|
|
|
227
|
-
`runCodexSwarm` uses `@shapeshift-labs/frontier-swarm` schedules and leases internally. Jobs become runnable only when their dependency DAG is satisfied, lane/compute/contention limits have capacity, and a lease can be issued for the local Codex worker. This keeps the public runner simple while making the execution model compatible with much larger queues and external lease-backed workers.
|
|
239
|
+
`runCodexSwarm` uses `@shapeshift-labs/frontier-swarm` schedules and leases internally. Jobs become runnable only when their dependency DAG is satisfied, lane/compute/contention limits have capacity, and a lease can be issued for the local Codex worker. Browser lanes can declare capabilities, port pools, profile directory prefixes, and lower lane concurrency in the upstream swarm manifest. This keeps the public runner simple while making the execution model compatible with much larger queues and external lease-backed workers.
|
|
228
240
|
|
|
229
241
|
Task JSON may declare `dependsOn`, `concurrencyKey`, `budget`, and `review`; the adapter carries those fields into the compiled plan and prompt.
|
|
230
242
|
|
|
243
|
+
Each run writes event streams under `streams/`, a `coordinator-dashboard.json` snapshot, `pids.json`, workspace proofs, patch files, merge bundles, and job results with merge-readiness classification. `frontier-swarm stop --run <run-dir>` reads the pid manifest and terminates live worker processes without manually hunting process state.
|
|
244
|
+
|
|
245
|
+
`frontier-swarm collect --run <run-dir>` derives status from immutable worker overlays instead of asking workers to edit a central queue. It scans `merge.json` files and writes:
|
|
246
|
+
|
|
247
|
+
- `ready-to-apply/` for auto-mergeable verified slices,
|
|
248
|
+
- `needs-human-port/` for patch candidates and discovery-only results,
|
|
249
|
+
- `failed-evidence/` for failed workers, blockers, ownership violations, or failed required commands,
|
|
250
|
+
- `stale-against-head/` for patch bundles that no longer apply.
|
|
251
|
+
|
|
252
|
+
It also writes `merge-index.json` and `queue-overlay.json` so coordinator dashboards can show stale patches, conflicts, derived queue status, and ready merge pressure without scraping every worker directory. The optional `--branch-prefix` adds suggested tiny patch branch names to each collected bundle so accepted slices can become one small branch/commit per surface, evidence path, and queue status overlay.
|
|
253
|
+
|
|
254
|
+
`frontier-swarm apply --collection <collection-dir>` reviews the `ready-to-apply/` bucket and writes `apply-ledger.json`. It defaults to `--dry-run`, which runs `git apply --check` without mutating the checkout. Non-dry-run apply refuses a dirty worktree unless `--allow-dirty` is passed, and can optionally create small branches with `--branch-prefix` and commits with `--commit`.
|
|
255
|
+
|
|
256
|
+
`frontier-swarm score --collection <collection-dir>` applies each collected bundle in a throwaway workspace and writes `patch-score.json`. Use `--focused-command` for the gate that proves the slice and `--global-command` with `--global-glob` for shared-code smoke/type/build gates. Scores are classified as `accepted-clean`, `accepted-needs-port`, `conflict`, `test-fail`, `stale`, or `evidence-only`, so the coordinator can review the best patch candidates before manually reading every bundle.
|
|
257
|
+
|
|
231
258
|
## Surface
|
|
232
259
|
|
|
233
260
|
- `createCodexSwarmPlan`
|
|
234
261
|
- `coerceCodexSwarmManifestInput`
|
|
235
262
|
- `coerceCodexSwarmTasksInput`
|
|
236
263
|
- `createCodexWorkspacePlan`
|
|
264
|
+
- `createSwarmWorkspaceManifest`, `createSwarmWorkspaceProof`
|
|
237
265
|
- `prepareCodexWorkspace`
|
|
238
266
|
- `runCodexSwarm`
|
|
239
267
|
- `runCodexJob`
|
|
240
268
|
- `buildCodexArgs`
|
|
269
|
+
- `normalizeCodexModelFlag`, `normalizeCodexApprovalPolicy`
|
|
270
|
+
- `initFileSwarmEventStream`, `appendFileSwarmEvent`, `writeSwarmCoordinatorSnapshot`
|
|
271
|
+
- `appendCodexPidManifest`, `readCodexPidManifest`, `stopCodexSwarmRun`
|
|
272
|
+
- `collectCodexSwarmRun`
|
|
273
|
+
- `applyCodexSwarmCollection`
|
|
274
|
+
- `scoreCodexSwarmPatches`
|
|
241
275
|
- `renderCodexPrompt`
|
|
242
276
|
- `spawnCodexExecutor`
|
|
243
277
|
|
|
@@ -249,7 +283,7 @@ Run the package-local benchmark:
|
|
|
249
283
|
npm run bench
|
|
250
284
|
```
|
|
251
285
|
|
|
252
|
-
The benchmark writes `benchmarks/results/frontier-swarm-codex-package-bench-latest.json` when run from the monorepo. These are Frontier-only package measurements for input coercion, Codex argument construction, and prompt rendering.
|
|
286
|
+
The benchmark writes `benchmarks/results/frontier-swarm-codex-package-bench-latest.json` when run from the monorepo. These are Frontier-only package measurements for input coercion, Codex argument construction, model/approval compatibility normalization, workspace manifest creation, and prompt rendering.
|
|
253
287
|
|
|
254
288
|
## Source Repository
|
|
255
289
|
|
|
@@ -5,6 +5,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
5
5
|
import {
|
|
6
6
|
buildCodexArgs,
|
|
7
7
|
createCodexSwarmPlan,
|
|
8
|
+
createCodexWorkspacePlan,
|
|
9
|
+
createSwarmWorkspaceManifest,
|
|
10
|
+
normalizeCodexApprovalPolicy,
|
|
11
|
+
normalizeCodexModelFlag,
|
|
8
12
|
renderCodexPrompt
|
|
9
13
|
} from '../dist/index.js';
|
|
10
14
|
|
|
@@ -27,7 +31,11 @@ const paths = {
|
|
|
27
31
|
eventsPath: 'events.jsonl',
|
|
28
32
|
stderrPath: 'stderr.log',
|
|
29
33
|
lastMessagePath: 'last.md',
|
|
30
|
-
evidenceDir: 'evidence'
|
|
34
|
+
evidenceDir: 'evidence',
|
|
35
|
+
workspaceProofPath: 'workspace-proof.json',
|
|
36
|
+
patchPath: 'changes.patch',
|
|
37
|
+
mergeBundlePath: 'merge.json',
|
|
38
|
+
pidManifestPath: 'pids.json'
|
|
31
39
|
};
|
|
32
40
|
|
|
33
41
|
const rows = [
|
|
@@ -35,7 +43,16 @@ const rows = [
|
|
|
35
43
|
plan = createCodexSwarmPlan(input);
|
|
36
44
|
return plan.jobs.length;
|
|
37
45
|
}),
|
|
38
|
-
measure('build-args-' + taskCount, 64, () => buildCodexArgs(plan.jobs[cursor++ % plan.jobs.length], { outDir: '.', workspacePath: '.', paths }).length),
|
|
46
|
+
measure('build-args-config-default-' + taskCount, 64, () => buildCodexArgs(plan.jobs[cursor++ % plan.jobs.length], { outDir: '.', workspacePath: '.', paths }).length),
|
|
47
|
+
measure('build-args-plan-model-' + taskCount, 64, () => buildCodexArgs(plan.jobs[cursor++ % plan.jobs.length], { outDir: '.', workspacePath: '.', paths, modelPolicy: 'plan', approval: 'full-auto' }).length),
|
|
48
|
+
measure('workspace-manifest-' + taskCount, 32, () => {
|
|
49
|
+
const workspacePlan = createCodexWorkspacePlan(plan.jobs[cursor++ % plan.jobs.length], {
|
|
50
|
+
outDir: '.',
|
|
51
|
+
workspace: { mode: 'copy', includes: ['AGENTS.md', 'package.json'], linkPaths: ['packages'], linkNodeModules: true }
|
|
52
|
+
});
|
|
53
|
+
return createSwarmWorkspaceManifest(workspacePlan).includeCount;
|
|
54
|
+
}),
|
|
55
|
+
measure('compat-normalize', 256, () => (normalizeCodexModelFlag('default') ? 1 : 0) + normalizeCodexApprovalPolicy('full-auto').length),
|
|
39
56
|
measure('render-prompt-' + taskCount, 32, () => renderCodexPrompt(plan.jobs[cursor++ % plan.jobs.length], { workspacePath: '.', paths }).length)
|
|
40
57
|
];
|
|
41
58
|
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import fs from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import { coerceCodexSwarmManifestInput, coerceCodexSwarmTasksInput, createCodexSwarmPlan, runCodexSwarm } from './index.js';
|
|
4
|
+
import { applyCodexSwarmCollection, coerceCodexSwarmManifestInput, coerceCodexSwarmTasksInput, collectCodexSwarmRun, createCodexSwarmPlan, runCodexSwarm, scoreCodexSwarmPatches, stopCodexSwarmRun } from './index.js';
|
|
5
5
|
const args = parseArgs(process.argv.slice(2));
|
|
6
6
|
const command = args._[0] ?? 'plan';
|
|
7
7
|
try {
|
|
@@ -20,8 +20,11 @@ try {
|
|
|
20
20
|
codexPath: stringArg(args.codex),
|
|
21
21
|
maxConcurrency: numberArg(args.maxConcurrency ?? args['max-concurrency'], 1),
|
|
22
22
|
sandbox: stringArg(args.sandbox),
|
|
23
|
-
approval: stringArg(args.approval ?? args['ask-for-approval']),
|
|
23
|
+
approval: stringArg(args.approval ?? args['ask-for-approval'] ?? args['approval-policy']),
|
|
24
24
|
model: stringArg(args.model),
|
|
25
|
+
modelPolicy: modelPolicyArg(args.modelPolicy ?? args['model-policy']),
|
|
26
|
+
forwardPlanModel: boolArg(args.forwardPlanModel ?? args['forward-plan-model'], false),
|
|
27
|
+
forwardPlanReasoningEffort: boolArg(args.forwardPlanReasoningEffort ?? args['forward-plan-reasoning-effort'], false),
|
|
25
28
|
reasoningEffort: stringArg(args.reasoningEffort ?? args['reasoning-effort']),
|
|
26
29
|
profile: stringArg(args.profile),
|
|
27
30
|
dryRun: boolArg(args.dryRun ?? args['dry-run'], false),
|
|
@@ -53,6 +56,66 @@ try {
|
|
|
53
56
|
if (!ok)
|
|
54
57
|
process.exitCode = 1;
|
|
55
58
|
}
|
|
59
|
+
else if (command === 'stop') {
|
|
60
|
+
const run = String(args.run ?? args.pidManifest ?? args['pid-manifest'] ?? '');
|
|
61
|
+
if (!run)
|
|
62
|
+
throw new Error('stop requires --run <run-dir|swarm-results.json|pids.json>');
|
|
63
|
+
const signal = String(args.signal ?? 'SIGTERM');
|
|
64
|
+
const result = await stopCodexSwarmRun({ run, signal });
|
|
65
|
+
console.log(JSON.stringify(result, null, 2));
|
|
66
|
+
if (!result.ok)
|
|
67
|
+
process.exitCode = 1;
|
|
68
|
+
}
|
|
69
|
+
else if (command === 'collect') {
|
|
70
|
+
const run = String(args.run ?? '');
|
|
71
|
+
if (!run)
|
|
72
|
+
throw new Error('collect requires --run <run-dir|swarm-results.json>');
|
|
73
|
+
const result = await collectCodexSwarmRun({
|
|
74
|
+
run,
|
|
75
|
+
outDir: stringArg(args.outDir ?? args.out),
|
|
76
|
+
checkStale: boolArg(args.checkStale ?? args['check-stale'], true),
|
|
77
|
+
branchPrefix: stringArg(args.branchPrefix ?? args['branch-prefix'])
|
|
78
|
+
});
|
|
79
|
+
console.log(JSON.stringify(result, null, 2));
|
|
80
|
+
if (!result.ok)
|
|
81
|
+
process.exitCode = 1;
|
|
82
|
+
}
|
|
83
|
+
else if (command === 'apply') {
|
|
84
|
+
const result = await applyCodexSwarmCollection({
|
|
85
|
+
collection: stringArg(args.collection),
|
|
86
|
+
run: stringArg(args.run),
|
|
87
|
+
outDir: stringArg(args.outDir ?? args.out),
|
|
88
|
+
bucket: bucketArg(args.bucket),
|
|
89
|
+
jobIds: listArg(args.job ?? args.jobId ?? args['job-id']),
|
|
90
|
+
dryRun: boolArg(args.dryRun ?? args['dry-run'], true),
|
|
91
|
+
allowDirty: boolArg(args.allowDirty ?? args['allow-dirty'], false),
|
|
92
|
+
commit: boolArg(args.commit, false),
|
|
93
|
+
branchPrefix: stringArg(args.branchPrefix ?? args['branch-prefix']),
|
|
94
|
+
limit: numberArg(args.limit, undefined)
|
|
95
|
+
});
|
|
96
|
+
console.log(JSON.stringify(result, null, 2));
|
|
97
|
+
if (!result.ok)
|
|
98
|
+
process.exitCode = 1;
|
|
99
|
+
}
|
|
100
|
+
else if (command === 'score') {
|
|
101
|
+
const result = await scoreCodexSwarmPatches({
|
|
102
|
+
collection: stringArg(args.collection),
|
|
103
|
+
run: stringArg(args.run),
|
|
104
|
+
outDir: stringArg(args.outDir ?? args.out),
|
|
105
|
+
bucket: bucketArg(args.bucket),
|
|
106
|
+
jobIds: listArg(args.job ?? args.jobId ?? args['job-id']),
|
|
107
|
+
workspaceIncludes: listArg(args.include),
|
|
108
|
+
workspaceExcludes: listArg(args.exclude),
|
|
109
|
+
focusedCommands: commandListArg(args.focusedCommand ?? args['focused-command']),
|
|
110
|
+
globalCommands: commandListArg(args.globalCommand ?? args['global-command']),
|
|
111
|
+
globalGlobs: listArg(args.globalGlob ?? args['global-glob']),
|
|
112
|
+
limit: numberArg(args.limit, undefined),
|
|
113
|
+
keepWorkspaces: boolArg(args.keepWorkspaces ?? args['keep-workspaces'], false)
|
|
114
|
+
});
|
|
115
|
+
console.log(JSON.stringify(result, null, 2));
|
|
116
|
+
if (!result.ok)
|
|
117
|
+
process.exitCode = 1;
|
|
118
|
+
}
|
|
56
119
|
else {
|
|
57
120
|
throw new Error(`unknown command: ${command}`);
|
|
58
121
|
}
|
|
@@ -118,12 +181,34 @@ function numberArg(value, fallback) {
|
|
|
118
181
|
function stringArg(value) {
|
|
119
182
|
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
120
183
|
}
|
|
184
|
+
function modelPolicyArg(value) {
|
|
185
|
+
const policy = stringArg(value);
|
|
186
|
+
if (policy === undefined)
|
|
187
|
+
return undefined;
|
|
188
|
+
if (policy === 'config-default' || policy === 'plan' || policy === 'explicit')
|
|
189
|
+
return policy;
|
|
190
|
+
throw new Error(`unsupported --model-policy ${policy}; expected config-default, plan, or explicit`);
|
|
191
|
+
}
|
|
121
192
|
function readWorkspaceMode(value) {
|
|
122
193
|
const mode = stringArg(value);
|
|
123
194
|
if (mode === 'snapshot' || mode === 'copy' || mode === 'git-worktree')
|
|
124
195
|
return mode;
|
|
125
196
|
return 'current';
|
|
126
197
|
}
|
|
198
|
+
function bucketArg(value) {
|
|
199
|
+
const bucket = stringArg(value);
|
|
200
|
+
if (bucket === undefined)
|
|
201
|
+
return undefined;
|
|
202
|
+
if (bucket === 'all' || bucket === 'ready-to-apply' || bucket === 'needs-human-port' || bucket === 'failed-evidence' || bucket === 'stale-against-head')
|
|
203
|
+
return bucket;
|
|
204
|
+
throw new Error(`unsupported --bucket ${bucket}`);
|
|
205
|
+
}
|
|
206
|
+
function commandListArg(value) {
|
|
207
|
+
if (value === undefined)
|
|
208
|
+
return undefined;
|
|
209
|
+
const raw = Array.isArray(value) ? value : [String(value)];
|
|
210
|
+
return raw.map((command) => command.trim()).filter(Boolean).map((command) => ({ name: command, command: 'sh', args: ['-c', command], required: true }));
|
|
211
|
+
}
|
|
127
212
|
function boolArg(value, fallback) {
|
|
128
213
|
if (value === undefined)
|
|
129
214
|
return fallback;
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EACd,MAAM,YAAY,CAAC;AAKpB,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC;AAEpC,IAAI,CAAC;IACH,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,GAAG,IAAI,mCA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OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1J,CAAC;AAED,SAAS,OAAO,CAAC,KAA2B,EAAE,QAAiB;IAC7D,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IACzC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,KAAK;IACZ,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACxD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { createSwarmProof, type FrontierSwarmJob, type FrontierSwarmJobResultInput, type FrontierSwarmLease, type FrontierSwarmManifestInput, type FrontierSwarmPlan, type FrontierSwarmPlanInput, type FrontierSwarmRun, type FrontierSwarmTaskInput } from '@shapeshift-labs/frontier-swarm';
|
|
1
|
+
import { createSwarmProof, type FrontierSwarmCommand, type FrontierSwarmEventInput, type FrontierSwarmEventStream, type FrontierSwarmJob, type FrontierSwarmJobResultInput, type FrontierSwarmMergeBundle, type FrontierSwarmMergeIndex, type FrontierSwarmLease, type FrontierSwarmManifestInput, type FrontierSwarmPlan, type FrontierSwarmPlanInput, type FrontierSwarmQueueOverlay, type FrontierSwarmRun, type FrontierSwarmTaskInput } from '@shapeshift-labs/frontier-swarm';
|
|
2
2
|
export declare const FRONTIER_SWARM_CODEX_DEFAULT_MODEL = "gpt-5.5";
|
|
3
3
|
export declare const FRONTIER_SWARM_CODEX_DEFAULT_REASONING_EFFORT = "xhigh";
|
|
4
|
+
export declare const FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_KIND = "frontier.swarm-codex.workspace-manifest";
|
|
5
|
+
export declare const FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_VERSION = 1;
|
|
6
|
+
export declare const FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_KIND = "frontier.swarm-codex.workspace-proof";
|
|
7
|
+
export declare const FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_VERSION = 1;
|
|
8
|
+
export declare const FRONTIER_SWARM_CODEX_PID_MANIFEST_KIND = "frontier.swarm-codex.pid-manifest";
|
|
9
|
+
export declare const FRONTIER_SWARM_CODEX_PID_MANIFEST_VERSION = 1;
|
|
10
|
+
export declare const FRONTIER_SWARM_CODEX_COLLECTION_KIND = "frontier.swarm-codex.collection";
|
|
11
|
+
export declare const FRONTIER_SWARM_CODEX_COLLECTION_VERSION = 1;
|
|
12
|
+
export declare const FRONTIER_SWARM_CODEX_APPLY_LEDGER_KIND = "frontier.swarm-codex.apply-ledger";
|
|
13
|
+
export declare const FRONTIER_SWARM_CODEX_APPLY_LEDGER_VERSION = 1;
|
|
14
|
+
export declare const FRONTIER_SWARM_CODEX_PATCH_SCORE_KIND = "frontier.swarm-codex.patch-score";
|
|
15
|
+
export declare const FRONTIER_SWARM_CODEX_PATCH_SCORE_VERSION = 1;
|
|
16
|
+
export type FrontierCodexModelPolicy = 'config-default' | 'plan' | 'explicit';
|
|
4
17
|
export type FrontierCodexSwarmWorkspaceMode = 'current' | 'git-worktree' | 'snapshot' | 'copy';
|
|
5
18
|
export interface FrontierCodexSwarmWorkspaceInput {
|
|
6
19
|
mode?: FrontierCodexSwarmWorkspaceMode;
|
|
@@ -11,6 +24,10 @@ export interface FrontierCodexSwarmWorkspaceInput {
|
|
|
11
24
|
excludes?: readonly string[];
|
|
12
25
|
artifactIncludes?: readonly string[];
|
|
13
26
|
linkPaths?: readonly string[];
|
|
27
|
+
requiredIncludes?: readonly string[];
|
|
28
|
+
optionalIncludes?: readonly string[];
|
|
29
|
+
strategy?: 'fs-cp' | 'rsync' | 'git-archive' | string;
|
|
30
|
+
guardRoot?: string;
|
|
14
31
|
linkNodeModules?: boolean;
|
|
15
32
|
skipGitRepoCheck?: boolean;
|
|
16
33
|
}
|
|
@@ -21,9 +38,12 @@ export interface FrontierCodexSwarmRunOptions {
|
|
|
21
38
|
maxConcurrency?: number;
|
|
22
39
|
workspace?: FrontierCodexSwarmWorkspaceInput;
|
|
23
40
|
sandbox?: string;
|
|
24
|
-
approval?: string;
|
|
25
|
-
model?: string;
|
|
26
|
-
|
|
41
|
+
approval?: string | false;
|
|
42
|
+
model?: string | false;
|
|
43
|
+
modelPolicy?: FrontierCodexModelPolicy;
|
|
44
|
+
forwardPlanModel?: boolean;
|
|
45
|
+
forwardPlanReasoningEffort?: boolean;
|
|
46
|
+
reasoningEffort?: string | false;
|
|
27
47
|
profile?: string;
|
|
28
48
|
ephemeral?: boolean;
|
|
29
49
|
dryRun?: boolean;
|
|
@@ -32,6 +52,15 @@ export interface FrontierCodexSwarmRunOptions {
|
|
|
32
52
|
jobTimeoutMs?: number;
|
|
33
53
|
addDirs?: readonly string[];
|
|
34
54
|
executor?: FrontierCodexExecutor;
|
|
55
|
+
eventStream?: FrontierSwarmEventStream;
|
|
56
|
+
coordinatorSnapshotPath?: string;
|
|
57
|
+
pidManifestPath?: string;
|
|
58
|
+
prepareJobWorkspace?: FrontierCodexJobWorkspaceHook;
|
|
59
|
+
renderJobPrompt?: FrontierCodexJobPromptHook;
|
|
60
|
+
changedPathFilter?: FrontierCodexChangedPathFilter;
|
|
61
|
+
onJobStarted?: FrontierCodexJobStartedHook;
|
|
62
|
+
onJobFinished?: FrontierCodexJobFinishedHook;
|
|
63
|
+
onSwarmFinished?: FrontierCodexSwarmFinishedHook;
|
|
35
64
|
}
|
|
36
65
|
export interface FrontierCodexWorkspacePlan {
|
|
37
66
|
mode: FrontierCodexSwarmWorkspaceMode;
|
|
@@ -41,6 +70,10 @@ export interface FrontierCodexWorkspacePlan {
|
|
|
41
70
|
excludes: string[];
|
|
42
71
|
artifactIncludes: string[];
|
|
43
72
|
linkPaths: string[];
|
|
73
|
+
requiredIncludes: string[];
|
|
74
|
+
optionalIncludes: string[];
|
|
75
|
+
strategy: string;
|
|
76
|
+
guardRoot?: string;
|
|
44
77
|
linkNodeModules: boolean;
|
|
45
78
|
replace: boolean;
|
|
46
79
|
skipGitRepoCheck: boolean;
|
|
@@ -52,6 +85,195 @@ export interface FrontierCodexJobPaths {
|
|
|
52
85
|
stderrPath: string;
|
|
53
86
|
lastMessagePath: string;
|
|
54
87
|
evidenceDir: string;
|
|
88
|
+
workspaceProofPath: string;
|
|
89
|
+
patchPath: string;
|
|
90
|
+
mergeBundlePath: string;
|
|
91
|
+
pidManifestPath: string;
|
|
92
|
+
}
|
|
93
|
+
export type FrontierCodexCollectBucket = 'ready-to-apply' | 'needs-human-port' | 'failed-evidence' | 'stale-against-head';
|
|
94
|
+
export interface FrontierCodexCollectInput {
|
|
95
|
+
run: string;
|
|
96
|
+
outDir?: string;
|
|
97
|
+
cwd?: string;
|
|
98
|
+
checkStale?: boolean;
|
|
99
|
+
branchPrefix?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface FrontierCodexCollectedBundle {
|
|
102
|
+
bucket: FrontierCodexCollectBucket;
|
|
103
|
+
jobId: string;
|
|
104
|
+
mergePath: string;
|
|
105
|
+
outputDir: string;
|
|
106
|
+
bundle: FrontierSwarmMergeBundle;
|
|
107
|
+
}
|
|
108
|
+
export interface FrontierCodexCollectResult {
|
|
109
|
+
kind: typeof FRONTIER_SWARM_CODEX_COLLECTION_KIND;
|
|
110
|
+
version: typeof FRONTIER_SWARM_CODEX_COLLECTION_VERSION;
|
|
111
|
+
ok: boolean;
|
|
112
|
+
runDir: string;
|
|
113
|
+
outDir: string;
|
|
114
|
+
generatedAt: number;
|
|
115
|
+
buckets: Record<FrontierCodexCollectBucket, FrontierCodexCollectedBundle[]>;
|
|
116
|
+
mergeIndex: FrontierSwarmMergeIndex;
|
|
117
|
+
queueOverlay: FrontierSwarmQueueOverlay;
|
|
118
|
+
summary: Record<FrontierCodexCollectBucket, number> & {
|
|
119
|
+
total: number;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export type FrontierCodexApplyStatus = 'checked' | 'applied' | 'committed' | 'skipped' | 'failed';
|
|
123
|
+
export interface FrontierCodexApplyInput {
|
|
124
|
+
collection?: string;
|
|
125
|
+
run?: string;
|
|
126
|
+
outDir?: string;
|
|
127
|
+
cwd?: string;
|
|
128
|
+
bucket?: FrontierCodexCollectBucket | 'all';
|
|
129
|
+
jobIds?: readonly string[];
|
|
130
|
+
dryRun?: boolean;
|
|
131
|
+
allowDirty?: boolean;
|
|
132
|
+
commit?: boolean;
|
|
133
|
+
branchPrefix?: string;
|
|
134
|
+
limit?: number;
|
|
135
|
+
}
|
|
136
|
+
export interface FrontierCodexApplyEntry {
|
|
137
|
+
jobId: string;
|
|
138
|
+
status: FrontierCodexApplyStatus;
|
|
139
|
+
bundlePath: string;
|
|
140
|
+
patchPath?: string;
|
|
141
|
+
branchName?: string;
|
|
142
|
+
commit?: string;
|
|
143
|
+
dryRun: boolean;
|
|
144
|
+
commands: Array<{
|
|
145
|
+
command: string[];
|
|
146
|
+
status: number;
|
|
147
|
+
stdoutTail: string[];
|
|
148
|
+
stderrTail: string[];
|
|
149
|
+
}>;
|
|
150
|
+
error?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface FrontierCodexApplyResult {
|
|
153
|
+
kind: typeof FRONTIER_SWARM_CODEX_APPLY_LEDGER_KIND;
|
|
154
|
+
version: typeof FRONTIER_SWARM_CODEX_APPLY_LEDGER_VERSION;
|
|
155
|
+
ok: boolean;
|
|
156
|
+
cwd: string;
|
|
157
|
+
collectionDir: string;
|
|
158
|
+
outDir: string;
|
|
159
|
+
generatedAt: number;
|
|
160
|
+
dryRun: boolean;
|
|
161
|
+
entries: FrontierCodexApplyEntry[];
|
|
162
|
+
summary: {
|
|
163
|
+
total: number;
|
|
164
|
+
checked: number;
|
|
165
|
+
applied: number;
|
|
166
|
+
committed: number;
|
|
167
|
+
skipped: number;
|
|
168
|
+
failed: number;
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
export type FrontierCodexPatchScoreStatus = 'accepted-clean' | 'accepted-needs-port' | 'conflict' | 'test-fail' | 'stale' | 'evidence-only';
|
|
172
|
+
export interface FrontierCodexPatchScoreInput {
|
|
173
|
+
collection?: string;
|
|
174
|
+
run?: string;
|
|
175
|
+
outDir?: string;
|
|
176
|
+
cwd?: string;
|
|
177
|
+
bucket?: FrontierCodexCollectBucket | 'all';
|
|
178
|
+
jobIds?: readonly string[];
|
|
179
|
+
workspaceIncludes?: readonly string[];
|
|
180
|
+
workspaceExcludes?: readonly string[];
|
|
181
|
+
focusedCommands?: readonly (string | FrontierSwarmCommand)[];
|
|
182
|
+
globalCommands?: readonly (string | FrontierSwarmCommand)[];
|
|
183
|
+
globalGlobs?: readonly string[];
|
|
184
|
+
limit?: number;
|
|
185
|
+
keepWorkspaces?: boolean;
|
|
186
|
+
}
|
|
187
|
+
export interface FrontierCodexPatchScoreEntry {
|
|
188
|
+
jobId: string;
|
|
189
|
+
status: FrontierCodexPatchScoreStatus;
|
|
190
|
+
score: number;
|
|
191
|
+
bundlePath: string;
|
|
192
|
+
patchPath?: string;
|
|
193
|
+
workspacePath?: string;
|
|
194
|
+
changedPaths: string[];
|
|
195
|
+
reasons: string[];
|
|
196
|
+
commands: Array<{
|
|
197
|
+
command: string[];
|
|
198
|
+
status: number;
|
|
199
|
+
stdoutTail: string[];
|
|
200
|
+
stderrTail: string[];
|
|
201
|
+
}>;
|
|
202
|
+
}
|
|
203
|
+
export interface FrontierCodexPatchScoreResult {
|
|
204
|
+
kind: typeof FRONTIER_SWARM_CODEX_PATCH_SCORE_KIND;
|
|
205
|
+
version: typeof FRONTIER_SWARM_CODEX_PATCH_SCORE_VERSION;
|
|
206
|
+
ok: boolean;
|
|
207
|
+
cwd: string;
|
|
208
|
+
collectionDir: string;
|
|
209
|
+
outDir: string;
|
|
210
|
+
generatedAt: number;
|
|
211
|
+
entries: FrontierCodexPatchScoreEntry[];
|
|
212
|
+
summary: Record<FrontierCodexPatchScoreStatus, number> & {
|
|
213
|
+
total: number;
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
export interface FrontierCodexWorkspaceManifest {
|
|
217
|
+
kind: typeof FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_KIND;
|
|
218
|
+
version: typeof FRONTIER_SWARM_CODEX_WORKSPACE_MANIFEST_VERSION;
|
|
219
|
+
id: string;
|
|
220
|
+
mode: FrontierCodexSwarmWorkspaceMode;
|
|
221
|
+
root: string;
|
|
222
|
+
path: string;
|
|
223
|
+
includes: string[];
|
|
224
|
+
excludes: string[];
|
|
225
|
+
artifactIncludes: string[];
|
|
226
|
+
linkPaths: string[];
|
|
227
|
+
requiredIncludes: string[];
|
|
228
|
+
optionalIncludes: string[];
|
|
229
|
+
strategy: string;
|
|
230
|
+
guardRoot?: string;
|
|
231
|
+
linkNodeModules: boolean;
|
|
232
|
+
skipGitRepoCheck: boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface FrontierCodexWorkspaceProof {
|
|
235
|
+
kind: typeof FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_KIND;
|
|
236
|
+
version: typeof FRONTIER_SWARM_CODEX_WORKSPACE_PROOF_VERSION;
|
|
237
|
+
id: string;
|
|
238
|
+
generatedAt: number;
|
|
239
|
+
manifest: FrontierCodexWorkspaceManifest;
|
|
240
|
+
copiedPaths: string[];
|
|
241
|
+
linkedPaths: string[];
|
|
242
|
+
missingRequired: string[];
|
|
243
|
+
missingOptional: string[];
|
|
244
|
+
ignoredChangedPaths: string[];
|
|
245
|
+
summary: {
|
|
246
|
+
copiedCount: number;
|
|
247
|
+
linkedCount: number;
|
|
248
|
+
missingRequiredCount: number;
|
|
249
|
+
missingOptionalCount: number;
|
|
250
|
+
ignoredChangedPathCount: number;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
export interface FrontierCodexPidEntry {
|
|
254
|
+
pid: number;
|
|
255
|
+
role: 'parent' | 'codex' | string;
|
|
256
|
+
runId?: string;
|
|
257
|
+
jobId?: string;
|
|
258
|
+
startedAt: number;
|
|
259
|
+
command?: string[];
|
|
260
|
+
}
|
|
261
|
+
export interface FrontierCodexPidManifest {
|
|
262
|
+
kind: typeof FRONTIER_SWARM_CODEX_PID_MANIFEST_KIND;
|
|
263
|
+
version: typeof FRONTIER_SWARM_CODEX_PID_MANIFEST_VERSION;
|
|
264
|
+
runId?: string;
|
|
265
|
+
entries: FrontierCodexPidEntry[];
|
|
266
|
+
}
|
|
267
|
+
export interface FrontierCodexStopResult {
|
|
268
|
+
ok: boolean;
|
|
269
|
+
pidManifestPath: string;
|
|
270
|
+
signal: NodeJS.Signals;
|
|
271
|
+
stopped: number[];
|
|
272
|
+
missing: number[];
|
|
273
|
+
errors: Array<{
|
|
274
|
+
pid: number;
|
|
275
|
+
error: string;
|
|
276
|
+
}>;
|
|
55
277
|
}
|
|
56
278
|
export interface FrontierCodexExecutorInput {
|
|
57
279
|
job: FrontierSwarmJob;
|
|
@@ -71,6 +293,34 @@ export interface FrontierCodexExecutorResult {
|
|
|
71
293
|
error?: unknown;
|
|
72
294
|
}
|
|
73
295
|
export type FrontierCodexExecutor = (input: FrontierCodexExecutorInput) => Promise<FrontierCodexExecutorResult>;
|
|
296
|
+
export interface FrontierCodexJobHookInput {
|
|
297
|
+
job: FrontierSwarmJob;
|
|
298
|
+
cwd: string;
|
|
299
|
+
outDir: string;
|
|
300
|
+
workspacePath: string;
|
|
301
|
+
workspacePlan: FrontierCodexWorkspacePlan;
|
|
302
|
+
paths: FrontierCodexJobPaths;
|
|
303
|
+
}
|
|
304
|
+
export interface FrontierCodexJobPromptHookInput extends FrontierCodexJobHookInput {
|
|
305
|
+
prompt: string;
|
|
306
|
+
}
|
|
307
|
+
export interface FrontierCodexJobStartedHookInput extends FrontierCodexJobHookInput {
|
|
308
|
+
prompt: string;
|
|
309
|
+
args: string[];
|
|
310
|
+
}
|
|
311
|
+
export interface FrontierCodexJobFinishedHookInput {
|
|
312
|
+
job: FrontierSwarmJob;
|
|
313
|
+
result: FrontierSwarmJobResultInput;
|
|
314
|
+
}
|
|
315
|
+
export interface FrontierCodexSwarmFinishedHookInput {
|
|
316
|
+
result: FrontierCodexSwarmRunResult;
|
|
317
|
+
}
|
|
318
|
+
export type FrontierCodexJobWorkspaceHook = (input: FrontierCodexJobHookInput) => Promise<void> | void;
|
|
319
|
+
export type FrontierCodexJobPromptHook = (input: FrontierCodexJobPromptHookInput) => Promise<string> | string;
|
|
320
|
+
export type FrontierCodexChangedPathFilter = (paths: readonly string[], input: FrontierCodexJobHookInput) => readonly string[];
|
|
321
|
+
export type FrontierCodexJobStartedHook = (input: FrontierCodexJobStartedHookInput) => Promise<void> | void;
|
|
322
|
+
export type FrontierCodexJobFinishedHook = (input: FrontierCodexJobFinishedHookInput) => Promise<void> | void;
|
|
323
|
+
export type FrontierCodexSwarmFinishedHook = (input: FrontierCodexSwarmFinishedHookInput) => Promise<void> | void;
|
|
74
324
|
export interface FrontierCodexSwarmRunResult {
|
|
75
325
|
ok: boolean;
|
|
76
326
|
outDir: string;
|
|
@@ -92,6 +342,8 @@ export declare function buildCodexArgs(job: FrontierSwarmJob, input: FrontierCod
|
|
|
92
342
|
workspacePath: string;
|
|
93
343
|
paths: FrontierCodexJobPaths;
|
|
94
344
|
}): string[];
|
|
345
|
+
export declare function normalizeCodexModelFlag(model: string | false | null | undefined): string | undefined;
|
|
346
|
+
export declare function normalizeCodexApprovalPolicy(approval: string | false | null | undefined): 'untrusted' | 'on-failure' | 'on-request' | 'never' | undefined;
|
|
95
347
|
export declare function renderCodexPrompt(job: FrontierSwarmJob, input: {
|
|
96
348
|
workspacePath: string;
|
|
97
349
|
paths: FrontierCodexJobPaths;
|
|
@@ -99,4 +351,24 @@ export declare function renderCodexPrompt(job: FrontierSwarmJob, input: {
|
|
|
99
351
|
export declare function spawnCodexExecutor(input: FrontierCodexExecutorInput): Promise<FrontierCodexExecutorResult>;
|
|
100
352
|
export declare function prepareCodexWorkspace(job: FrontierSwarmJob, options: FrontierCodexSwarmRunOptions): Promise<string>;
|
|
101
353
|
export declare function createCodexWorkspacePlan(job: FrontierSwarmJob, options: FrontierCodexSwarmRunOptions): FrontierCodexWorkspacePlan;
|
|
354
|
+
export declare function createSwarmWorkspaceManifest(plan: FrontierCodexWorkspacePlan): FrontierCodexWorkspaceManifest;
|
|
355
|
+
export declare function createSwarmWorkspaceProof(plan: FrontierCodexWorkspacePlan, input?: {
|
|
356
|
+
ignoredChangedPaths?: readonly string[];
|
|
357
|
+
generatedAt?: number;
|
|
358
|
+
}): Promise<FrontierCodexWorkspaceProof>;
|
|
359
|
+
export declare function initFileSwarmEventStream(stream: FrontierSwarmEventStream | undefined): Promise<void>;
|
|
360
|
+
export declare function appendFileSwarmEvent(stream: FrontierSwarmEventStream | undefined, event: FrontierSwarmEventInput): Promise<void>;
|
|
361
|
+
export declare function writeSwarmCoordinatorSnapshot(file: string, input: FrontierCodexSwarmRunResult & {
|
|
362
|
+
eventStream?: FrontierSwarmEventStream;
|
|
363
|
+
pidManifestPath?: string;
|
|
364
|
+
}): Promise<void>;
|
|
365
|
+
export declare function appendCodexPidManifest(file: string, entry: FrontierCodexPidEntry, runId?: string): Promise<void>;
|
|
366
|
+
export declare function readCodexPidManifest(file: string): Promise<FrontierCodexPidManifest>;
|
|
367
|
+
export declare function stopCodexSwarmRun(input: {
|
|
368
|
+
run: string;
|
|
369
|
+
signal?: NodeJS.Signals;
|
|
370
|
+
}): Promise<FrontierCodexStopResult>;
|
|
371
|
+
export declare function collectCodexSwarmRun(input: FrontierCodexCollectInput): Promise<FrontierCodexCollectResult>;
|
|
372
|
+
export declare function applyCodexSwarmCollection(input: FrontierCodexApplyInput): Promise<FrontierCodexApplyResult>;
|
|
373
|
+
export declare function scoreCodexSwarmPatches(input: FrontierCodexPatchScoreInput): Promise<FrontierCodexPatchScoreResult>;
|
|
102
374
|
//# sourceMappingURL=index.d.ts.map
|