@snappedly-tools/shipyard 0.7.0 → 0.8.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 +34 -41
- package/dist/MountConfig-BHnKnA4h.d.ts +145 -0
- package/dist/{chunk-WAXEMZUV.js → chunk-44I2BL6E.js} +225 -33
- package/dist/chunk-44I2BL6E.js.map +1 -0
- package/dist/{chunk-56TDSWFU.js → chunk-JI3HDDMS.js} +3 -3
- package/dist/{chunk-56TDSWFU.js.map → chunk-JI3HDDMS.js.map} +1 -1
- package/dist/{chunk-FDYOTN55.js → chunk-L6PX5QTU.js} +253 -878
- package/dist/chunk-L6PX5QTU.js.map +1 -0
- package/dist/index.d.ts +117 -97
- package/dist/index.js +322 -344
- package/dist/index.js.map +1 -1
- package/dist/main.js +235 -139
- package/dist/main.js.map +1 -1
- package/dist/sandboxes/docker.d.ts +1 -3
- package/dist/sandboxes/docker.js +2 -4
- package/dist/templates/parallel-planner/main.mts +67 -9
- package/dist/templates/parallel-planner/planner-branch.mts +151 -0
- package/dist/templates/parallel-planner-with-review/main.mts +70 -12
- package/dist/templates/parallel-planner-with-review/planner-branch.mts +151 -0
- package/dist/templates/sequential-reviewer/main.mts +52 -3
- package/dist/templates/simple-loop/main.mts +51 -2
- package/package.json +1 -17
- package/dist/MountConfig-bZoCs4Dd.d.ts +0 -26
- package/dist/SandboxProvider-XJQqEdSf.d.ts +0 -261
- package/dist/chunk-ACD46ZM4.js +0 -136
- package/dist/chunk-ACD46ZM4.js.map +0 -1
- package/dist/chunk-FDYOTN55.js.map +0 -1
- package/dist/chunk-KMGNFXKN.js +0 -38
- package/dist/chunk-KMGNFXKN.js.map +0 -1
- package/dist/chunk-SOJTAJTF.js +0 -78
- package/dist/chunk-SOJTAJTF.js.map +0 -1
- package/dist/chunk-WAXEMZUV.js.map +0 -1
- package/dist/sandboxes/no-sandbox.d.ts +0 -37
- package/dist/sandboxes/no-sandbox.js +0 -4
- package/dist/sandboxes/no-sandbox.js.map +0 -1
- package/dist/sandboxes/vercel.d.ts +0 -104
- package/dist/sandboxes/vercel.js +0 -166
- package/dist/sandboxes/vercel.js.map +0 -1
- package/dist/templates/blank/main.mts +0 -13
- package/dist/templates/blank/prompt.md +0 -12
- package/dist/templates/blank/template.json +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,61 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { c as
|
|
1
|
+
import { S as SessionTransferHandle, a as SandboxProvider, B as BranchStrategy, E as ExecResult, b as MergeToHeadBranchStrategy, N as NamedBranchStrategy } from './MountConfig-BHnKnA4h.js';
|
|
2
|
+
export { c as InteractiveExecOptions, d as IsolatedCreateOptions, e as IsolatedSandboxHandle, I as IsolatedSandboxProvider, f as IsolatedSandboxProviderConfig, M as MountConfig, g as createIsolatedSandboxProvider } from './MountConfig-BHnKnA4h.js';
|
|
3
3
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
4
|
-
export { M as MountConfig } from './MountConfig-bZoCs4Dd.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Session JSONL transfer primitives.
|
|
8
|
-
*
|
|
9
|
-
* The transfer functions are pure: they take a JSONL string and the source/
|
|
10
|
-
* target cwds, and return the rewritten JSONL string. Call sites do their own
|
|
11
|
-
* file I/O (reading the source, writing the destination). Per ADR 0012, the
|
|
12
|
-
* cwd rewrite is specific to each agent's JSONL format, so each agent owns
|
|
13
|
-
* its own transfer function.
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Result of locating a session on the host by its unique id, independent of any
|
|
18
|
-
* cwd-derived path encoding.
|
|
19
|
-
*/
|
|
20
|
-
interface HostSessionLookup {
|
|
21
|
-
/** Absolute path to the located session file, or `undefined` when no session
|
|
22
|
-
* with this id exists anywhere under the searched root. */
|
|
23
|
-
readonly path: string | undefined;
|
|
24
|
-
/** The host directory that was scanned — surfaced in not-found errors so the
|
|
25
|
-
* user knows where Shipyard looked. */
|
|
26
|
-
readonly searchedRoot: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Encode a cwd into the Claude Code `~/.claude/projects/<encoded>/` layout.
|
|
30
|
-
* Replaces path separators with hyphens, matching Claude Code's convention.
|
|
31
|
-
*/
|
|
32
|
-
declare const encodeProjectPath: (cwd: string) => string;
|
|
33
|
-
/** Absolute host path to a Claude session JSONL file. */
|
|
34
|
-
declare const claudeHostSessionPath: (cwd: string, id: string, projectsDir?: string) => string;
|
|
35
|
-
/** Sandbox-side path to a Claude session JSONL file (always POSIX separators). */
|
|
36
|
-
declare const claudeSandboxSessionPath: (cwd: string, id: string, projectsDir: string) => string;
|
|
37
|
-
/**
|
|
38
|
-
* Locate a Claude Code session JSONL on the host by its unique id, scanning each
|
|
39
|
-
* `~/.claude/projects/<encoded-cwd>/` directory rather than reconstructing the
|
|
40
|
-
* cwd encoding. The session id is globally unique, so the first match wins.
|
|
41
|
-
*/
|
|
42
|
-
declare const findClaudeSessionOnHost: (id: string, projectsDir?: string) => Promise<HostSessionLookup>;
|
|
43
|
-
/**
|
|
44
|
-
* Rewrite a Claude Code session JSONL string, replacing `cwd` fields that
|
|
45
|
-
* match `fromCwd` with `toCwd`. Pure function — no file I/O.
|
|
46
|
-
*/
|
|
47
|
-
declare const transferClaudeSession: (jsonl: string, fromCwd: string, toCwd: string) => string;
|
|
48
|
-
/**
|
|
49
|
-
* Locate a Codex session rollout file on the host by its id, reusing the
|
|
50
|
-
* date-nested scan.
|
|
51
|
-
*/
|
|
52
|
-
declare const findCodexSessionOnHost: (id: string, sessionsDir?: string) => Promise<HostSessionLookup>;
|
|
53
|
-
/**
|
|
54
|
-
* Rewrite a Codex session JSONL string, replacing `cwd` fields (both top-level
|
|
55
|
-
* and `session_meta.payload.cwd`) that match `fromCwd` with `toCwd`. Pure
|
|
56
|
-
* function — no file I/O.
|
|
57
|
-
*/
|
|
58
|
-
declare const transferCodexSession: (jsonl: string, fromCwd: string, toCwd: string) => string;
|
|
59
4
|
|
|
60
5
|
/** Reasoning efforts accepted by the Codex CLI. */
|
|
61
6
|
declare const CODEX_REASONING_EFFORTS: readonly ["low", "medium", "high", "xhigh", "max"];
|
|
@@ -129,14 +74,14 @@ interface AgentSessionStorage {
|
|
|
129
74
|
hostCwd: string;
|
|
130
75
|
sandboxCwd: string;
|
|
131
76
|
sessionId: string;
|
|
132
|
-
handle:
|
|
77
|
+
handle: SessionTransferHandle;
|
|
133
78
|
}): Promise<void>;
|
|
134
79
|
/** Transfer a session JSONL from the host store into the sandbox. */
|
|
135
80
|
resumeIntoSandbox(args: {
|
|
136
81
|
hostCwd: string;
|
|
137
82
|
sandboxCwd: string;
|
|
138
83
|
sessionId: string;
|
|
139
|
-
handle:
|
|
84
|
+
handle: SessionTransferHandle;
|
|
140
85
|
}): Promise<void>;
|
|
141
86
|
/** Read a captured session JSONL from the host store. Returns undefined when absent. */
|
|
142
87
|
readHostSession(cwd: string, sessionId: string): Promise<string | undefined>;
|
|
@@ -144,14 +89,6 @@ interface AgentSessionStorage {
|
|
|
144
89
|
existsOnHost(cwd: string, sessionId: string): Promise<boolean>;
|
|
145
90
|
/** Absolute host path where a session would be stored (for not-found error messages). */
|
|
146
91
|
hostSessionFilePath(cwd: string, sessionId: string): string | undefined;
|
|
147
|
-
/**
|
|
148
|
-
* Locate a session on the host by its unique id, independent of cwd encoding.
|
|
149
|
-
* Used by the no-sandbox resume precheck, where the agent runs on the host and
|
|
150
|
-
* writes the session in place under a cwd-derived directory Shipyard cannot
|
|
151
|
-
* reliably reconstruct. Returns the located path (or `undefined`) plus the
|
|
152
|
-
* directory that was searched (for not-found errors).
|
|
153
|
-
*/
|
|
154
|
-
findByIdOnHost(sessionId: string): Promise<HostSessionLookup>;
|
|
155
92
|
}
|
|
156
93
|
interface AgentProvider {
|
|
157
94
|
readonly name: string;
|
|
@@ -171,7 +108,8 @@ interface AgentProvider {
|
|
|
171
108
|
}
|
|
172
109
|
/** Options for the codex agent provider. */
|
|
173
110
|
interface CodexOptions {
|
|
174
|
-
|
|
111
|
+
/** Set to `null` to use the provider default instead of a configured role effort. */
|
|
112
|
+
readonly effort?: CodexReasoningEffort | null;
|
|
175
113
|
/** Environment variables injected by this agent provider. */
|
|
176
114
|
readonly env?: Record<string, string>;
|
|
177
115
|
/** When false, session capture is disabled. Default: true. */
|
|
@@ -196,7 +134,8 @@ declare const codex: (model: string | CodexModelConfig, options?: CodexOptions)
|
|
|
196
134
|
readonly sessionStorage: AgentSessionStorage;
|
|
197
135
|
};
|
|
198
136
|
interface ClaudeCodeOptions {
|
|
199
|
-
|
|
137
|
+
/** Set to `null` to leave effort selection to the provider. */
|
|
138
|
+
readonly effort?: "low" | "medium" | "high" | "xhigh" | "max" | null;
|
|
200
139
|
/** Environment variables injected by this agent provider. */
|
|
201
140
|
readonly env?: Record<string, string>;
|
|
202
141
|
/** When false, session capture is disabled. Default: true. */
|
|
@@ -468,7 +407,7 @@ type LoggingOption =
|
|
|
468
407
|
};
|
|
469
408
|
/** Override default timeouts for built-in lifecycle steps. Unset keys keep their defaults. */
|
|
470
409
|
interface Timeouts {
|
|
471
|
-
/** Timeout (ms) for
|
|
410
|
+
/** Timeout (ms) for copying selected paths into a worktree or Docker sandbox. Default: 60_000. */
|
|
472
411
|
readonly copyToWorktreeMs?: number;
|
|
473
412
|
/** Timeout (ms) for each in-sandbox git setup command (safe.directory, user.name/email, branch discovery). Default: 10_000. */
|
|
474
413
|
readonly gitSetupMs?: number;
|
|
@@ -527,12 +466,11 @@ interface RunOptions<A extends AgentProvider = AgentProvider> {
|
|
|
527
466
|
readonly completionTimeoutSeconds?: number;
|
|
528
467
|
/** Optional name for the run, shown as a prefix in log output */
|
|
529
468
|
readonly name?: string;
|
|
530
|
-
/** Paths relative to the host repo root to copy into
|
|
469
|
+
/** Paths relative to the host repo root to copy into Docker after Git sync. */
|
|
531
470
|
readonly copyToWorktree?: string[];
|
|
532
471
|
/** Tools the provider must enforce for this controlled phase. */
|
|
533
472
|
readonly toolAllowlist?: readonly string[];
|
|
534
|
-
/** Branch strategy
|
|
535
|
-
* Defaults to { type: "head" } for bind-mount providers and { type: "merge-to-head" } for isolated providers. */
|
|
473
|
+
/** Branch strategy; defaults to merge-to-head. */
|
|
536
474
|
readonly branchStrategy?: BranchStrategy;
|
|
537
475
|
/** Resume a prior agent session by ID. The session record must exist on the host. Incompatible with maxIterations > 1. */
|
|
538
476
|
readonly resumeSession?: string;
|
|
@@ -620,20 +558,19 @@ declare function run<A extends AgentProvider>(options: RunOptions<A>): Promise<R
|
|
|
620
558
|
interface InteractiveOptions {
|
|
621
559
|
/** Agent provider to use (e.g. codex(CODEX_MODELS.routine)) */
|
|
622
560
|
readonly agent: AgentProvider;
|
|
623
|
-
/**
|
|
624
|
-
readonly sandbox
|
|
561
|
+
/** Docker sandbox provider. */
|
|
562
|
+
readonly sandbox: SandboxProvider;
|
|
625
563
|
/** Inline prompt string (mutually exclusive with promptFile). */
|
|
626
564
|
readonly prompt?: string;
|
|
627
565
|
/** Path to a prompt file (mutually exclusive with prompt). */
|
|
628
566
|
readonly promptFile?: string;
|
|
629
567
|
/** Optional name for the interactive session. */
|
|
630
568
|
readonly name?: string;
|
|
631
|
-
/** Branch strategy
|
|
632
|
-
* Defaults to { type: "head" } for bind-mount providers and { type: "merge-to-head" } for isolated providers. */
|
|
569
|
+
/** Branch strategy; defaults to merge-to-head. */
|
|
633
570
|
readonly branchStrategy?: BranchStrategy;
|
|
634
571
|
/** Hooks to run during sandbox lifecycle */
|
|
635
572
|
readonly hooks?: SandboxHooks;
|
|
636
|
-
/** Paths relative to the host repo root to copy into
|
|
573
|
+
/** Paths relative to the host repo root to copy into Docker after Git sync. */
|
|
637
574
|
readonly copyToWorktree?: string[];
|
|
638
575
|
/** Key-value map for {{KEY}} placeholder substitution in prompts */
|
|
639
576
|
readonly promptArgs?: PromptArgs;
|
|
@@ -707,7 +644,7 @@ interface CreateSandboxOptions {
|
|
|
707
644
|
readonly cwd?: string;
|
|
708
645
|
/** Lifecycle hooks grouped by execution location (host or sandbox). */
|
|
709
646
|
readonly hooks?: SandboxHooks;
|
|
710
|
-
/** Paths relative to the host repo root to copy into
|
|
647
|
+
/** Paths relative to the host repo root to copy into Docker after Git sync. */
|
|
711
648
|
readonly copyToWorktree?: string[];
|
|
712
649
|
/** Override default timeouts for built-in lifecycle steps. Unset keys keep their defaults. */
|
|
713
650
|
readonly timeouts?: Timeouts;
|
|
@@ -838,7 +775,7 @@ interface Sandbox {
|
|
|
838
775
|
*
|
|
839
776
|
* Returns the full `ExecResult` — non-zero `exitCode` is surfaced, not
|
|
840
777
|
* thrown. Callers that want strict semantics should check `result.exitCode`
|
|
841
|
-
* themselves (matching the contract of `
|
|
778
|
+
* themselves (matching the contract of `SessionTransferHandle.exec`).
|
|
842
779
|
*/
|
|
843
780
|
exec(command: string, options?: SandboxExecOptions): Promise<ExecResult>;
|
|
844
781
|
/** Tear down the sandbox and worktree. */
|
|
@@ -863,7 +800,7 @@ interface SandboxExecOptions {
|
|
|
863
800
|
}
|
|
864
801
|
/**
|
|
865
802
|
* Eagerly creates a git worktree on the provided explicit branch and starts
|
|
866
|
-
* a sandbox with
|
|
803
|
+
* a Docker sandbox with a synced Git workspace. Returns a Sandbox handle that
|
|
867
804
|
* can be reused across multiple `run()` calls.
|
|
868
805
|
*/
|
|
869
806
|
declare const createSandbox: (options: CreateSandboxOptions) => Promise<Sandbox>;
|
|
@@ -894,8 +831,8 @@ interface CreateWorktreeOptions {
|
|
|
894
831
|
interface WorktreeInteractiveOptions {
|
|
895
832
|
/** Agent provider to use (e.g. codex(CODEX_MODELS.routine)) */
|
|
896
833
|
readonly agent: AgentProvider;
|
|
897
|
-
/**
|
|
898
|
-
readonly sandbox
|
|
834
|
+
/** Docker sandbox provider. */
|
|
835
|
+
readonly sandbox: SandboxProvider;
|
|
899
836
|
/** Inline prompt string (mutually exclusive with promptFile). */
|
|
900
837
|
readonly prompt?: string;
|
|
901
838
|
/** Path to a prompt file (mutually exclusive with prompt). */
|
|
@@ -1011,6 +948,60 @@ interface Worktree {
|
|
|
1011
948
|
*/
|
|
1012
949
|
declare const createWorktree: (options: CreateWorktreeOptions) => Promise<Worktree>;
|
|
1013
950
|
|
|
951
|
+
/**
|
|
952
|
+
* Session JSONL transfer primitives.
|
|
953
|
+
*
|
|
954
|
+
* The transfer functions are pure: they take a JSONL string and the source/
|
|
955
|
+
* target cwds, and return the rewritten JSONL string. Call sites do their own
|
|
956
|
+
* file I/O (reading the source, writing the destination). Per ADR 0012, the
|
|
957
|
+
* cwd rewrite is specific to each agent's JSONL format, so each agent owns
|
|
958
|
+
* its own transfer function.
|
|
959
|
+
*/
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Result of locating a session on the host by its unique id, independent of any
|
|
963
|
+
* cwd-derived path encoding.
|
|
964
|
+
*/
|
|
965
|
+
interface HostSessionLookup {
|
|
966
|
+
/** Absolute path to the located session file, or `undefined` when no session
|
|
967
|
+
* with this id exists anywhere under the searched root. */
|
|
968
|
+
readonly path: string | undefined;
|
|
969
|
+
/** The host directory that was scanned — surfaced in not-found errors so the
|
|
970
|
+
* user knows where Shipyard looked. */
|
|
971
|
+
readonly searchedRoot: string;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Encode a cwd into the Claude Code `~/.claude/projects/<encoded>/` layout.
|
|
975
|
+
* Replaces path separators with hyphens, matching Claude Code's convention.
|
|
976
|
+
*/
|
|
977
|
+
declare const encodeProjectPath: (cwd: string) => string;
|
|
978
|
+
/** Absolute host path to a Claude session JSONL file. */
|
|
979
|
+
declare const claudeHostSessionPath: (cwd: string, id: string, projectsDir?: string) => string;
|
|
980
|
+
/** Sandbox-side path to a Claude session JSONL file (always POSIX separators). */
|
|
981
|
+
declare const claudeSandboxSessionPath: (cwd: string, id: string, projectsDir: string) => string;
|
|
982
|
+
/**
|
|
983
|
+
* Locate a Claude Code session JSONL on the host by its unique id, scanning each
|
|
984
|
+
* `~/.claude/projects/<encoded-cwd>/` directory rather than reconstructing the
|
|
985
|
+
* cwd encoding. The session id is globally unique, so the first match wins.
|
|
986
|
+
*/
|
|
987
|
+
declare const findClaudeSessionOnHost: (id: string, projectsDir?: string) => Promise<HostSessionLookup>;
|
|
988
|
+
/**
|
|
989
|
+
* Rewrite a Claude Code session JSONL string, replacing `cwd` fields that
|
|
990
|
+
* match `fromCwd` with `toCwd`. Pure function — no file I/O.
|
|
991
|
+
*/
|
|
992
|
+
declare const transferClaudeSession: (jsonl: string, fromCwd: string, toCwd: string) => string;
|
|
993
|
+
/**
|
|
994
|
+
* Locate a Codex session rollout file on the host by its id, reusing the
|
|
995
|
+
* date-nested scan.
|
|
996
|
+
*/
|
|
997
|
+
declare const findCodexSessionOnHost: (id: string, sessionsDir?: string) => Promise<HostSessionLookup>;
|
|
998
|
+
/**
|
|
999
|
+
* Rewrite a Codex session JSONL string, replacing `cwd` fields (both top-level
|
|
1000
|
+
* and `session_meta.payload.cwd`) that match `fromCwd` with `toCwd`. Pure
|
|
1001
|
+
* function — no file I/O.
|
|
1002
|
+
*/
|
|
1003
|
+
declare const transferCodexSession: (jsonl: string, fromCwd: string, toCwd: string) => string;
|
|
1004
|
+
|
|
1014
1005
|
interface CwdErrorConstructor {
|
|
1015
1006
|
new (args: {
|
|
1016
1007
|
readonly message: string;
|
|
@@ -1037,6 +1028,8 @@ declare const CwdError: CwdErrorConstructor;
|
|
|
1037
1028
|
declare const WORKFLOW_CONTRACT_VERSION: 1;
|
|
1038
1029
|
type WorkItemKind = "planning-spec" | "executable-issue" | "pr-repair";
|
|
1039
1030
|
type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
1031
|
+
type WorkRisk = RiskLevel | "unknown";
|
|
1032
|
+
type WorkScope = "small" | "substantial" | "unknown";
|
|
1040
1033
|
type WorkflowPhase = "triage" | "implementation" | "checking" | "review" | "repair" | "handoff" | "merge" | "release-verification";
|
|
1041
1034
|
type LifecycleState = "queued" | "waiting-info" | "authorized" | "implementing" | "checking" | "reviewing" | "repairing" | "human-review" | "merged" | "release-verifying" | "completed" | "failed" | "blocked" | "cancelled";
|
|
1042
1035
|
type PhaseOutcome = "completed" | "needs-info" | "blocked" | "failed" | "cancelled";
|
|
@@ -1083,7 +1076,8 @@ interface WorkBrief {
|
|
|
1083
1076
|
readonly evidence: readonly string[];
|
|
1084
1077
|
readonly acceptanceCriteria: readonly string[];
|
|
1085
1078
|
readonly exclusions: readonly string[];
|
|
1086
|
-
readonly risk:
|
|
1079
|
+
readonly risk: WorkRisk;
|
|
1080
|
+
readonly scope?: WorkScope;
|
|
1087
1081
|
readonly verification: VerificationPlan;
|
|
1088
1082
|
readonly unresolvedQuestions: readonly string[];
|
|
1089
1083
|
readonly authorization: Authorization;
|
|
@@ -1101,6 +1095,27 @@ interface PhaseBudget {
|
|
|
1101
1095
|
readonly maxAttempts: number;
|
|
1102
1096
|
readonly timeoutSeconds: number;
|
|
1103
1097
|
}
|
|
1098
|
+
type AgentRole = "routine" | "strong";
|
|
1099
|
+
interface AgentModelRoles {
|
|
1100
|
+
readonly routine: string;
|
|
1101
|
+
readonly strong: string;
|
|
1102
|
+
}
|
|
1103
|
+
type WorkerPolicy = {
|
|
1104
|
+
readonly provider: string;
|
|
1105
|
+
readonly sandbox: string;
|
|
1106
|
+
readonly skillRevision: string;
|
|
1107
|
+
} & ({
|
|
1108
|
+
readonly model: string;
|
|
1109
|
+
readonly models?: never;
|
|
1110
|
+
} | {
|
|
1111
|
+
readonly model?: never;
|
|
1112
|
+
readonly models: AgentModelRoles;
|
|
1113
|
+
});
|
|
1114
|
+
interface AgentSelection {
|
|
1115
|
+
readonly provider: string;
|
|
1116
|
+
readonly model: string;
|
|
1117
|
+
readonly role: AgentRole;
|
|
1118
|
+
}
|
|
1104
1119
|
interface RepositoryPolicy {
|
|
1105
1120
|
readonly contractVersion: typeof WORKFLOW_CONTRACT_VERSION;
|
|
1106
1121
|
readonly repository: string;
|
|
@@ -1112,12 +1127,7 @@ interface RepositoryPolicy {
|
|
|
1112
1127
|
readonly allowedActors: readonly ("maintainer" | "owner" | "policy")[];
|
|
1113
1128
|
readonly autoStartRisk: readonly RiskLevel[];
|
|
1114
1129
|
};
|
|
1115
|
-
readonly worker:
|
|
1116
|
-
readonly provider: string;
|
|
1117
|
-
readonly model: string;
|
|
1118
|
-
readonly sandbox: string;
|
|
1119
|
-
readonly skillRevision: string;
|
|
1120
|
-
};
|
|
1130
|
+
readonly worker: WorkerPolicy;
|
|
1121
1131
|
readonly checks: readonly CheckCommand[];
|
|
1122
1132
|
readonly phaseBudgets: Readonly<Record<WorkflowPhase, PhaseBudget>>;
|
|
1123
1133
|
readonly repairBudget: {
|
|
@@ -1192,6 +1202,8 @@ interface Assignment {
|
|
|
1192
1202
|
readonly briefHash: string;
|
|
1193
1203
|
readonly policyRevision: string;
|
|
1194
1204
|
readonly skillRevision: string;
|
|
1205
|
+
/** Missing only on assignments persisted before role model selection shipped. */
|
|
1206
|
+
readonly agentSelection?: AgentSelection;
|
|
1195
1207
|
readonly base: RevisionReference;
|
|
1196
1208
|
readonly head?: RevisionReference;
|
|
1197
1209
|
readonly createdAt: string;
|
|
@@ -1228,6 +1240,7 @@ declare const parseWorkBrief: (value: unknown) => WorkBrief;
|
|
|
1228
1240
|
type CreateRepositoryPolicyInput = Omit<RepositoryPolicy, "contractVersion">;
|
|
1229
1241
|
declare const parseRepositoryPolicy: (value: unknown) => RepositoryPolicy;
|
|
1230
1242
|
declare const createRepositoryPolicy: (input: CreateRepositoryPolicyInput) => RepositoryPolicy;
|
|
1243
|
+
declare const resolveAgentSelection: (policy: Pick<RepositoryPolicy, "worker">, phase: WorkflowPhase, risk?: WorkRisk, scope?: WorkScope) => AgentSelection;
|
|
1231
1244
|
declare const parseCheckEvidence: (value: unknown) => CheckEvidence;
|
|
1232
1245
|
declare const requireTransition: (from: LifecycleState, to: LifecycleState, context: TransitionContext) => void;
|
|
1233
1246
|
interface CreateAssignmentInput {
|
|
@@ -1620,6 +1633,7 @@ interface PhaseCheckout {
|
|
|
1620
1633
|
}
|
|
1621
1634
|
interface PhaseEngineRequest {
|
|
1622
1635
|
readonly assignment: Assignment;
|
|
1636
|
+
readonly agentSelection: AgentSelection;
|
|
1623
1637
|
readonly trusted: TrustedPhaseInputs;
|
|
1624
1638
|
readonly untrusted: UntrustedPhaseInputs;
|
|
1625
1639
|
readonly controls: PhaseControls;
|
|
@@ -1703,21 +1717,28 @@ interface ExecutePhaseOptions {
|
|
|
1703
1717
|
readonly signal?: AbortSignal;
|
|
1704
1718
|
}
|
|
1705
1719
|
declare const executePhase: (options: ExecutePhaseOptions) => Promise<PhaseExecutionResult>;
|
|
1706
|
-
|
|
1720
|
+
type PhaseAgentResolver = {
|
|
1721
|
+
/** Pre-resolved provider for legacy single-model policies. */
|
|
1707
1722
|
readonly agent: AgentProvider;
|
|
1723
|
+
readonly resolveAgent?: never;
|
|
1724
|
+
} | {
|
|
1725
|
+
readonly agent?: never;
|
|
1726
|
+
/** Creates the provider selected by the assignment's trusted policy. */
|
|
1727
|
+
readonly resolveAgent: (selection: AgentSelection) => AgentProvider;
|
|
1728
|
+
};
|
|
1729
|
+
type RunPhaseEngineAdapterOptions = PhaseAgentResolver & {
|
|
1708
1730
|
readonly sandbox: SandboxProvider;
|
|
1709
1731
|
readonly cwd?: string;
|
|
1710
1732
|
readonly run: (options: RunOptions) => Promise<RunResult & {
|
|
1711
1733
|
output?: unknown;
|
|
1712
1734
|
}>;
|
|
1713
|
-
}
|
|
1735
|
+
};
|
|
1714
1736
|
declare const createRunPhaseEngineAdapter: (options: RunPhaseEngineAdapterOptions) => PhaseEngineAdapter;
|
|
1715
|
-
|
|
1716
|
-
readonly agent: AgentProvider;
|
|
1737
|
+
type CreateSandboxPhaseEngineAdapterOptions = PhaseAgentResolver & {
|
|
1717
1738
|
readonly sandbox: SandboxProvider;
|
|
1718
1739
|
readonly cwd?: string;
|
|
1719
1740
|
readonly createSandbox: (options: CreateSandboxOptions) => Promise<Sandbox>;
|
|
1720
|
-
}
|
|
1741
|
+
};
|
|
1721
1742
|
declare const createCreateSandboxPhaseEngineAdapter: (options: CreateSandboxPhaseEngineAdapterOptions) => PhaseEngineAdapter;
|
|
1722
1743
|
|
|
1723
1744
|
interface HandoffCandidate {
|
|
@@ -2363,7 +2384,6 @@ declare class GitHubIntegration {
|
|
|
2363
2384
|
normalize(envelope: GitHubWebhookEnvelope): Promise<GitHubNormalizationResult>;
|
|
2364
2385
|
reconcile(input: GitHubReconciliationInput): Promise<GitHubReconciliationResult>;
|
|
2365
2386
|
private processEnvelope;
|
|
2366
|
-
private recordRejected;
|
|
2367
2387
|
private rejectStored;
|
|
2368
2388
|
private ignoreStored;
|
|
2369
2389
|
private briefForIssue;
|
|
@@ -2800,4 +2820,4 @@ declare class ReleaseIntegration {
|
|
|
2800
2820
|
}
|
|
2801
2821
|
declare const candidateMatchesApproval: (candidate: ReleaseCandidate, approval: ProductionApproval) => boolean;
|
|
2802
2822
|
|
|
2803
|
-
export { type AcquireBranchLeaseInput, type AgentCommandOptions, type AgentProvider, type
|
|
2823
|
+
export { type AcquireBranchLeaseInput, type AgentCommandOptions, type AgentModelRoles, type AgentProvider, type AgentRole, type AgentSelection, type AgentStreamEvent, type ArtifactStore, type Assignment, type Authorization, type AuthorizedImplementationOptions, type AuthorizedImplementationResult, type BoundedRepairExecutionResult, type BranchLease, type BranchProtectionState, BranchStrategy, CODEX_MODELS, CODEX_REASONING_EFFORTS, type CheckCommand, type CheckEvidence, type CheckStatus, type ClarificationReply, type ClaudeCodeOptions, type CloseResult, type CloseSourceIssueOptions, type CodexModelConfig, type CodexOptions, type CodexReasoningEffort, type CompletionInput, type CompletionResult, ContractValidationError, type CoordinatorClock, type CoordinatorStorage, type CoordinatorStorageTransaction, type CostMeasurement, type CreateAssignmentInput, type CreateRepositoryPolicyInput, type CreateSandboxOptions, type CreateSandboxPhaseEngineAdapterOptions, type CreateWorkBriefInput, type CreateWorktreeOptions, CredentialNotAllowedError, type CredentialResolver, CredentialUnavailableError, type CurrentCandidate, type CurrentImplementationCandidate, type CurrentRepairCandidate, CwdError, type DispatchBlockReason, type DispatchIntent, type DispatchRequest, type DispatchResult, type DispatchStatus, type EffectExecution, type EffectIntent, type EffectOperationContext, type EffectStatus, type EventIgnoreReason, type EventStatus, ExecResult, type ExecutePhaseOptions, type FakePhaseEngineAdapterOptions, type Finding, type FindingDisposition, type FindingSeverity, type GitHubActor, type GitHubActorType, type GitHubAuthorizationPolicy, type GitHubBranchPublicationInput, type GitHubBranchSnapshot, type GitHubBriefDefaults, type GitHubBriefFactory, type GitHubBriefFactoryInput, type GitHubBriefPublicationInput, type GitHubCheckPublicationInput, type GitHubCheckSnapshot, type GitHubCommentPublicationInput, type GitHubCommentSnapshot, type GitHubDeliveryRecord, type GitHubDeliveryStatus, type GitHubDeliveryStore, type GitHubEventIgnoreReason, type GitHubEventName, type GitHubIgnoredEvent, GitHubIntegration, type GitHubIntegrationOptions, type GitHubIssueEventKind, type GitHubIssueSnapshot, type GitHubNormalizationResult, type GitHubNormalizedEvent, type GitHubNormalizedEventKind, GitHubPublication, type GitHubPublicationOptions, type GitHubPublicationResult, type GitHubPullRequestPublicationInput, type GitHubPullRequestReviewHandler, type GitHubPullRequestReviewSnapshot, type GitHubPullRequestReviewState, type GitHubPullRequestSnapshot, type GitHubReadTransport, type GitHubReconciliationInput, type GitHubReconciliationResult, type GitHubRepairIssuePublicationInput, type GitHubRepairLinkPublicationInput, type GitHubTrackedPullRequest, type GitHubTrackedPullRequestEventKind, type GitHubTrackingStore, type GitHubWebhookEnvelope, type GitHubWebhookReceipt, type GitHubWebhookRequest, type GitHubWebhookSignatureInput, type GitHubWriteTransport, type HandoffCandidate, type HandoffOutcome, type HandoffPacket, type HandoffReadinessInput, type HandoffReadinessResult, type HostSessionLookup, type HumanApproval, type HumanHandoffPublisher, type HumanReviewDecision, type HumanReviewDecisionInput, type HumanReviewRoundTripOptions, type HumanReviewRoundTripResult, type ImplementationExecutionTemplate, type ImplementationOutcome, type ImplementationPublication, type InMemoryArtifactStore, InMemoryCoordinatorStorage, InMemoryGitHubStore, InMemoryReleaseStore, InMemoryRepairBatchStore, InMemoryTriageStore, type IndependentReviewOptions, type IndependentReviewResult, type InfrastructureFailureInput, type InfrastructureRetryResult, type IngestResult, type InteractiveOptions, type InteractiveResult, type IterationResult, type IterationUsage, type JobControl, LeaseBusyError, LeaseLostError, type LifecycleState, type LoggingOption, type MergeCandidateOptions, type MergeResult, MergeToHeadBranchStrategy, type MergeTransport, NamedBranchStrategy, type OperatorCheckStatus, type OperatorIntervention, type OperatorStatus, type OperatorStatusOptions, Output, type OutputDefinition, type OutputObjectDefinition, type OutputStringDefinition, type PhaseAgentResolver, type PhaseArtifact, type PhaseBudget, type PhaseCheckout, type PhaseControls, type PhaseCredentials, type PhaseEngineAdapter, type PhaseEngineRequest, type PhaseEngineResponse, type PhaseExecutionResult, type PhaseExecutionStatus, type PhaseFailure, type PhaseOutcome, type PhaseReport, type PhaseResult, type PhaseResultSubmission, type PostgresConnection, PostgresCoordinatorStorage, type PostgresCoordinatorStorageOptions, type PostgresQueryClient, type PostgresQueryResult, type PrepareHandoffOptions, type PrintCommand, type ProductionApproval, type PromptArgs, type PublishEffectInput, type RecoveryRecord, type ReleaseActor, type ReleaseCandidate, type ReleaseCheck, type ReleaseCheckStatus, type ReleaseEnvironment, ReleaseIntegration, type ReleaseIntegrationOptions, type ReleaseOperationResult, type ReleasePolicy, type ReleaseState, type ReleaseStateStatus, type ReleaseStore, type ReleaseTransport, type ReleaseVerification, type RepairBatch, type RepairBatchResult, type RepairBatchStore, type RepairBudgetUsage, type RepairCandidate, type RepairExecutionTemplate, type RepairRequestResult, type RepairScheduleOutcome, type RepositoryControl, type RepositoryPolicy, type ResumeSandboxRunResultOptions, type ReviewAxis, type ReviewCandidate, type ReviewCheckout, type ReviewEvidence, type ReviewFailure, type ReviewFindingInput, type ReviewProvider, type ReviewRequest, type ReviewResponse, type ReviewRunOutcome, type ReviewSchedulingInput, type ReviewSchedulingResult, type RevisionReference, type RiskLevel, type RunBoundedRepairOptions, type RunOptions, type RunPhaseEngineAdapterOptions, type RunResult, type RunTriageOptions, type Sandbox, type SandboxExecOptions, type SandboxHooks, type SandboxInteractiveOptions, type SandboxInteractiveResult, SandboxProvider, type SandboxRunOptions, type SandboxRunResult, type SchedulePhaseInput, type SchedulePhaseResult, type ScheduleRepairInput, type ScheduleRepairOptions, type SourceIssueCloser, type SourceIssueClosureResult, type SourceReference, type StoredEvent, StructuredOutputError, type SubmitPhaseResultInput, type Timeouts, type TransitionContext, type TriageAssessment, type TriageCategory, type TriageInvestigationRequest, type TriageInvestigator, type TriageOutcome, type TriageRecord, type TriageResult, type TriageSource, type TriageStore, type TrustedPhaseInputs, type UntrustedPhaseInputs, type VerificationPlan, WORKFLOW_CONTRACT_VERSION, type WorkBrief, type WorkIdentity, type WorkItemKind, type WorkKey, type WorkRisk, type WorkScope, type WorkerPolicy, WorkflowCoordinator, type WorkflowCoordinatorOptions, type WorkflowEventInput, type WorkflowJob, WorkflowOperator, type WorkflowOperatorOptions, type WorkflowPhase, type Worktree, type WorktreeBranchStrategy, type WorktreeCreateSandboxOptions, type WorktreeInteractiveOptions, type WorktreeRunOptions, type WorktreeRunResult, candidateMatchesApproval, claudeCode, claudeHostSessionPath, claudeSandboxSessionPath, closeSourceIssue, codex, completeSourceIssue, createAssignment, createCreateSandboxPhaseEngineAdapter, createFakePhaseEngineAdapter, createGitHubIssueBrief, createInMemoryArtifactStore, createRepositoryPolicy, createRunPhaseEngineAdapter, createSandbox, createWorkBrief, createWorktree, defaultInvestigator as defaultTriageInvestigator, encodeProjectPath, evaluateHandoffReadiness, executePhase, findClaudeSessionOnHost, findCodexSessionOnHost, interactive, isAuthorizationAllowed, mergeProtectedCandidate, parseCheckEvidence, parsePhaseResult, parseRepositoryPolicy, parseWorkBrief, prepareHumanHandoff, prepareIndependentReview, processHumanReviewDecision, redact as redactOperatorText, releaseCandidateKey, requireTransition, resolveAgentSelection, resolveHumanReviewDecision, reviewDecisionFor, run, runAuthorizedImplementation, runBoundedRepair, runIndependentReview, runTriage, scheduleBoundedRepair, transferClaudeSession, transferCodexSession, verifyGitHubWebhookSignature };
|