@shapeshift-labs/frontier-swarm-codex 0.1.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.
@@ -0,0 +1,102 @@
1
+ import { createSwarmProof, type FrontierSwarmJob, type FrontierSwarmJobResultInput, type FrontierSwarmManifestInput, type FrontierSwarmPlan, type FrontierSwarmPlanInput, type FrontierSwarmRun, type FrontierSwarmTaskInput } from '@shapeshift-labs/frontier-swarm';
2
+ export declare const FRONTIER_SWARM_CODEX_DEFAULT_MODEL = "gpt-5.5";
3
+ export declare const FRONTIER_SWARM_CODEX_DEFAULT_REASONING_EFFORT = "xhigh";
4
+ export type FrontierCodexSwarmWorkspaceMode = 'current' | 'git-worktree' | 'snapshot' | 'copy';
5
+ export interface FrontierCodexSwarmWorkspaceInput {
6
+ mode?: FrontierCodexSwarmWorkspaceMode;
7
+ root?: string;
8
+ create?: boolean;
9
+ replace?: boolean;
10
+ includes?: readonly string[];
11
+ excludes?: readonly string[];
12
+ artifactIncludes?: readonly string[];
13
+ linkPaths?: readonly string[];
14
+ linkNodeModules?: boolean;
15
+ skipGitRepoCheck?: boolean;
16
+ }
17
+ export interface FrontierCodexSwarmRunOptions {
18
+ outDir: string;
19
+ cwd?: string;
20
+ codexPath?: string;
21
+ maxConcurrency?: number;
22
+ workspace?: FrontierCodexSwarmWorkspaceInput;
23
+ sandbox?: string;
24
+ approval?: string;
25
+ model?: string;
26
+ reasoningEffort?: string;
27
+ profile?: string;
28
+ ephemeral?: boolean;
29
+ dryRun?: boolean;
30
+ runVerification?: boolean;
31
+ collectGitStatus?: boolean;
32
+ jobTimeoutMs?: number;
33
+ addDirs?: readonly string[];
34
+ executor?: FrontierCodexExecutor;
35
+ }
36
+ export interface FrontierCodexWorkspacePlan {
37
+ mode: FrontierCodexSwarmWorkspaceMode;
38
+ root: string;
39
+ path: string;
40
+ includes: string[];
41
+ excludes: string[];
42
+ artifactIncludes: string[];
43
+ linkPaths: string[];
44
+ linkNodeModules: boolean;
45
+ replace: boolean;
46
+ skipGitRepoCheck: boolean;
47
+ }
48
+ export interface FrontierCodexJobPaths {
49
+ jobDir: string;
50
+ promptPath: string;
51
+ eventsPath: string;
52
+ stderrPath: string;
53
+ lastMessagePath: string;
54
+ evidenceDir: string;
55
+ }
56
+ export interface FrontierCodexExecutorInput {
57
+ job: FrontierSwarmJob;
58
+ prompt: string;
59
+ args: string[];
60
+ cwd: string;
61
+ workspacePath: string;
62
+ codexPath: string;
63
+ paths: FrontierCodexJobPaths;
64
+ timeoutMs: number;
65
+ }
66
+ export interface FrontierCodexExecutorResult {
67
+ exitCode: number;
68
+ signal?: string;
69
+ changedPaths?: readonly string[];
70
+ lastMessage?: string;
71
+ error?: unknown;
72
+ }
73
+ export type FrontierCodexExecutor = (input: FrontierCodexExecutorInput) => Promise<FrontierCodexExecutorResult>;
74
+ export interface FrontierCodexSwarmRunResult {
75
+ ok: boolean;
76
+ outDir: string;
77
+ plan: FrontierSwarmPlan;
78
+ run: FrontierSwarmRun;
79
+ proof: ReturnType<typeof createSwarmProof>;
80
+ }
81
+ export interface FrontierCodexSwarmCliInput {
82
+ manifest: unknown;
83
+ tasks: unknown;
84
+ plan?: FrontierSwarmPlanInput;
85
+ }
86
+ export declare function createCodexSwarmPlan(input: FrontierCodexSwarmCliInput): FrontierSwarmPlan;
87
+ export declare function coerceCodexSwarmManifestInput(value: unknown): FrontierSwarmManifestInput;
88
+ export declare function coerceCodexSwarmTasksInput(value: unknown): FrontierSwarmTaskInput[];
89
+ export declare function runCodexSwarm(plan: FrontierSwarmPlan, options: FrontierCodexSwarmRunOptions): Promise<FrontierCodexSwarmRunResult>;
90
+ export declare function runCodexJob(job: FrontierSwarmJob, options: FrontierCodexSwarmRunOptions, outDir: string): Promise<FrontierSwarmJobResultInput>;
91
+ export declare function buildCodexArgs(job: FrontierSwarmJob, input: FrontierCodexSwarmRunOptions & {
92
+ workspacePath: string;
93
+ paths: FrontierCodexJobPaths;
94
+ }): string[];
95
+ export declare function renderCodexPrompt(job: FrontierSwarmJob, input: {
96
+ workspacePath: string;
97
+ paths: FrontierCodexJobPaths;
98
+ }): string;
99
+ export declare function spawnCodexExecutor(input: FrontierCodexExecutorInput): Promise<FrontierCodexExecutorResult>;
100
+ export declare function prepareCodexWorkspace(job: FrontierSwarmJob, options: FrontierCodexSwarmRunOptions): Promise<string>;
101
+ export declare function createCodexWorkspacePlan(job: FrontierSwarmJob, options: FrontierCodexSwarmRunOptions): FrontierCodexWorkspacePlan;
102
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,gBAAgB,EAKhB,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,iCAAiC,CAAC;AAEzC,eAAO,MAAM,kCAAkC,YAA+B,CAAC;AAC/E,eAAO,MAAM,6CAA6C,UAA0C,CAAC;AAcrG,MAAM,MAAM,+BAA+B,GAAG,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,CAAC;AAE/F,MAAM,WAAW,gCAAgC;IAC/C,IAAI,CAAC,EAAE,+BAA+B,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,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