@snappedly-tools/shipyard 0.8.0 → 0.9.1
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 +24 -14
- package/dist/MountConfig-K5ILnfht.d.ts +26 -0
- package/dist/{MountConfig-BHnKnA4h.d.ts → SandboxProvider-oUAwYlWm.d.ts} +1 -26
- package/dist/{chunk-L6PX5QTU.js → chunk-57EEKW3R.js} +57 -55
- package/dist/chunk-57EEKW3R.js.map +1 -0
- package/dist/{chunk-JI3HDDMS.js → chunk-HXSZM52J.js} +3 -3
- package/dist/{chunk-JI3HDDMS.js.map → chunk-HXSZM52J.js.map} +1 -1
- package/dist/{chunk-44I2BL6E.js → chunk-JZUBT4WG.js} +20 -4
- package/dist/chunk-JZUBT4WG.js.map +1 -0
- package/dist/chunk-NQRFVKCU.js +1840 -0
- package/dist/chunk-NQRFVKCU.js.map +1 -0
- package/dist/chunk-Z5C4LHVP.js +137 -0
- package/dist/chunk-Z5C4LHVP.js.map +1 -0
- package/dist/createSandbox-DmbnWAZv.d.ts +739 -0
- package/dist/index.d.ts +7 -2534
- package/dist/index.js +216 -7269
- package/dist/index.js.map +1 -1
- package/dist/integrations/github.d.ts +52 -0
- package/dist/integrations/github.js +1049 -0
- package/dist/integrations/github.js.map +1 -0
- package/dist/integrations/releases.d.ts +136 -0
- package/dist/integrations/releases.js +500 -0
- package/dist/integrations/releases.js.map +1 -0
- package/dist/main.js +641 -383
- package/dist/main.js.map +1 -1
- package/dist/publication-BPoy_M9M.d.ts +1200 -0
- package/dist/sandboxes/docker.d.ts +2 -1
- package/dist/sandboxes/docker.js +2 -2
- package/dist/templates/parallel-planner/main.mts +11 -7
- package/dist/templates/parallel-planner/setup.sh +1 -0
- package/dist/templates/parallel-planner-with-review/main.mts +11 -7
- package/dist/templates/parallel-planner-with-review/setup.sh +1 -0
- package/dist/templates/sequential-reviewer/main.mts +7 -3
- package/dist/templates/sequential-reviewer/setup.sh +1 -0
- package/dist/templates/shared/setup.sh +1 -0
- package/dist/templates/simple-loop/main.mts +7 -3
- package/dist/templates/simple-loop/setup.sh +1 -0
- package/dist/workflow/coordinator/migrations/002_workflow_phase_records.sql +11 -0
- package/dist/workflow/coordinator/migrations/003_phase_record_schema_version.sql +6 -0
- package/dist/workflow.d.ts +472 -0
- package/dist/workflow.js +4345 -0
- package/dist/workflow.js.map +1 -0
- package/package.json +13 -1
- package/dist/chunk-44I2BL6E.js.map +0 -1
- package/dist/chunk-L6PX5QTU.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as IsolatedSandboxProvider } from '../SandboxProvider-oUAwYlWm.js';
|
|
2
|
+
import { M as MountConfig } from '../MountConfig-K5ILnfht.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shared mount utilities for the Docker sandbox provider.
|
package/dist/sandboxes/docker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defaultImageName, docker } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { defaultImageName, docker } from '../chunk-JZUBT4WG.js';
|
|
2
|
+
import '../chunk-57EEKW3R.js';
|
|
3
3
|
//# sourceMappingURL=docker.js.map
|
|
4
4
|
//# sourceMappingURL=docker.js.map
|
|
@@ -71,7 +71,11 @@ if (
|
|
|
71
71
|
!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repository)
|
|
72
72
|
)
|
|
73
73
|
throw new Error("Invalid target branch or GitHub repository");
|
|
74
|
-
|
|
74
|
+
const sandboxAuthOptions = {};
|
|
75
|
+
const sandboxProvider = docker({
|
|
76
|
+
env: { GH_REPO: repository },
|
|
77
|
+
...sandboxAuthOptions,
|
|
78
|
+
});
|
|
75
79
|
const hooks = {
|
|
76
80
|
sandbox: {
|
|
77
81
|
onSandboxReady: [
|
|
@@ -157,7 +161,7 @@ const runWorker = async (scope: Scope, ticket: Ticket) => {
|
|
|
157
161
|
const sandbox = await shipyard.createSandbox({
|
|
158
162
|
branch,
|
|
159
163
|
baseBranch: scope.branch,
|
|
160
|
-
sandbox:
|
|
164
|
+
sandbox: sandboxProvider,
|
|
161
165
|
hooks,
|
|
162
166
|
});
|
|
163
167
|
try {
|
|
@@ -203,7 +207,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
203
207
|
const plannerBranch = await resolvePlannerBranch(localBranches);
|
|
204
208
|
const plan = await shipyard.run({
|
|
205
209
|
hooks,
|
|
206
|
-
sandbox:
|
|
210
|
+
sandbox: sandboxProvider,
|
|
207
211
|
name: "planner",
|
|
208
212
|
branchStrategy: { type: "branch", branch: plannerBranch },
|
|
209
213
|
maxIterations: 1,
|
|
@@ -261,7 +265,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
261
265
|
if (scope.kind === "spec") {
|
|
262
266
|
const seed = await shipyard.createSandbox({
|
|
263
267
|
branch: scope.branch,
|
|
264
|
-
sandbox:
|
|
268
|
+
sandbox: sandboxProvider,
|
|
265
269
|
hooks,
|
|
266
270
|
});
|
|
267
271
|
await closeClean(seed);
|
|
@@ -295,7 +299,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
295
299
|
if (failures.length) throw new TicketFailures(failures);
|
|
296
300
|
const wave = await shipyard.createSandbox({
|
|
297
301
|
branch: scope.branch,
|
|
298
|
-
sandbox:
|
|
302
|
+
sandbox: sandboxProvider,
|
|
299
303
|
hooks,
|
|
300
304
|
});
|
|
301
305
|
try {
|
|
@@ -420,7 +424,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
420
424
|
}
|
|
421
425
|
const integration = await shipyard.createSandbox({
|
|
422
426
|
branch: scope.branch,
|
|
423
|
-
sandbox:
|
|
427
|
+
sandbox: sandboxProvider,
|
|
424
428
|
hooks,
|
|
425
429
|
});
|
|
426
430
|
let handoffEvidence: string;
|
|
@@ -468,7 +472,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
468
472
|
}
|
|
469
473
|
const publication = await shipyard.createSandbox({
|
|
470
474
|
branch: scope.branch,
|
|
471
|
-
sandbox:
|
|
475
|
+
sandbox: sandboxProvider,
|
|
472
476
|
});
|
|
473
477
|
try {
|
|
474
478
|
const scopeIds = [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# The sandbox starts from a temporary Git bundle, so reset its origin before Git pushes.
|
|
4
5
|
if [[ -n ${GH_REPO:-} ]]; then
|
|
5
6
|
[[ "$GH_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] || { echo "Invalid GH_REPO" >&2; exit 1; }
|
|
6
7
|
git remote set-url origin "https://github.com/$GH_REPO.git"
|
|
@@ -71,7 +71,11 @@ if (
|
|
|
71
71
|
!/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/.test(repository)
|
|
72
72
|
)
|
|
73
73
|
throw new Error("Invalid target branch or GitHub repository");
|
|
74
|
-
|
|
74
|
+
const sandboxAuthOptions = {};
|
|
75
|
+
const sandboxProvider = docker({
|
|
76
|
+
env: { GH_REPO: repository },
|
|
77
|
+
...sandboxAuthOptions,
|
|
78
|
+
});
|
|
75
79
|
const hooks = {
|
|
76
80
|
sandbox: {
|
|
77
81
|
onSandboxReady: [
|
|
@@ -167,7 +171,7 @@ const runWorker = async (scope: Scope, ticket: Ticket) => {
|
|
|
167
171
|
const sandbox = await shipyard.createSandbox({
|
|
168
172
|
branch,
|
|
169
173
|
baseBranch: scope.branch,
|
|
170
|
-
sandbox:
|
|
174
|
+
sandbox: sandboxProvider,
|
|
171
175
|
hooks,
|
|
172
176
|
});
|
|
173
177
|
try {
|
|
@@ -226,7 +230,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
226
230
|
const plannerBranch = await resolvePlannerBranch(localBranches);
|
|
227
231
|
const plan = await shipyard.run({
|
|
228
232
|
hooks,
|
|
229
|
-
sandbox:
|
|
233
|
+
sandbox: sandboxProvider,
|
|
230
234
|
name: "planner",
|
|
231
235
|
branchStrategy: { type: "branch", branch: plannerBranch },
|
|
232
236
|
maxIterations: 1,
|
|
@@ -284,7 +288,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
284
288
|
if (scope.kind === "spec") {
|
|
285
289
|
const seed = await shipyard.createSandbox({
|
|
286
290
|
branch: scope.branch,
|
|
287
|
-
sandbox:
|
|
291
|
+
sandbox: sandboxProvider,
|
|
288
292
|
hooks,
|
|
289
293
|
});
|
|
290
294
|
await closeClean(seed);
|
|
@@ -318,7 +322,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
318
322
|
if (failures.length) throw new TicketFailures(failures);
|
|
319
323
|
const wave = await shipyard.createSandbox({
|
|
320
324
|
branch: scope.branch,
|
|
321
|
-
sandbox:
|
|
325
|
+
sandbox: sandboxProvider,
|
|
322
326
|
hooks,
|
|
323
327
|
});
|
|
324
328
|
try {
|
|
@@ -443,7 +447,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
443
447
|
}
|
|
444
448
|
const integration = await shipyard.createSandbox({
|
|
445
449
|
branch: scope.branch,
|
|
446
|
-
sandbox:
|
|
450
|
+
sandbox: sandboxProvider,
|
|
447
451
|
hooks,
|
|
448
452
|
});
|
|
449
453
|
let handoffEvidence: string;
|
|
@@ -519,7 +523,7 @@ for (let iteration = 0; iteration < 10; iteration++) {
|
|
|
519
523
|
}
|
|
520
524
|
const publication = await shipyard.createSandbox({
|
|
521
525
|
branch: scope.branch,
|
|
522
|
-
sandbox:
|
|
526
|
+
sandbox: sandboxProvider,
|
|
523
527
|
});
|
|
524
528
|
try {
|
|
525
529
|
const scopeIds = [
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# The sandbox starts from a temporary Git bundle, so reset its origin before Git pushes.
|
|
4
5
|
if [[ -n ${GH_REPO:-} ]]; then
|
|
5
6
|
[[ "$GH_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] || { echo "Invalid GH_REPO" >&2; exit 1; }
|
|
6
7
|
git remote set-url origin "https://github.com/$GH_REPO.git"
|
|
@@ -70,7 +70,11 @@ if (
|
|
|
70
70
|
) {
|
|
71
71
|
throw new Error("Invalid target branch or GitHub repository");
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
const sandboxAuthOptions = {};
|
|
74
|
+
const sandboxProvider = docker({
|
|
75
|
+
env: { GH_REPO: repository },
|
|
76
|
+
...sandboxAuthOptions,
|
|
77
|
+
});
|
|
74
78
|
const MAX_ITERATIONS = 10;
|
|
75
79
|
const hooks = {
|
|
76
80
|
sandbox: {
|
|
@@ -175,7 +179,7 @@ for (let iteration = 0; iteration < MAX_ITERATIONS; iteration++) {
|
|
|
175
179
|
]);
|
|
176
180
|
const sandbox = await shipyard.createSandbox({
|
|
177
181
|
branch: issue.branch,
|
|
178
|
-
sandbox:
|
|
182
|
+
sandbox: sandboxProvider,
|
|
179
183
|
hooks,
|
|
180
184
|
});
|
|
181
185
|
let evidence: string;
|
|
@@ -240,7 +244,7 @@ for (let iteration = 0; iteration < MAX_ITERATIONS; iteration++) {
|
|
|
240
244
|
|
|
241
245
|
const publication = await shipyard.createSandbox({
|
|
242
246
|
branch: issue.branch,
|
|
243
|
-
sandbox:
|
|
247
|
+
sandbox: sandboxProvider,
|
|
244
248
|
});
|
|
245
249
|
try {
|
|
246
250
|
publicationUncertain = true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# The sandbox starts from a temporary Git bundle, so reset its origin before Git pushes.
|
|
4
5
|
if [[ -n ${GH_REPO:-} ]]; then
|
|
5
6
|
[[ "$GH_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] || { echo "Invalid GH_REPO" >&2; exit 1; }
|
|
6
7
|
git remote set-url origin "https://github.com/$GH_REPO.git"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# The sandbox starts from a temporary Git bundle, so reset its origin before Git pushes.
|
|
4
5
|
if [[ -n ${GH_REPO:-} ]]; then
|
|
5
6
|
[[ "$GH_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] || { echo "Invalid GH_REPO" >&2; exit 1; }
|
|
6
7
|
git remote set-url origin "https://github.com/$GH_REPO.git"
|
|
@@ -70,7 +70,11 @@ if (
|
|
|
70
70
|
) {
|
|
71
71
|
throw new Error("Invalid target branch or GitHub repository");
|
|
72
72
|
}
|
|
73
|
-
|
|
73
|
+
const sandboxAuthOptions = {};
|
|
74
|
+
const sandboxProvider = docker({
|
|
75
|
+
env: { GH_REPO: repository },
|
|
76
|
+
...sandboxAuthOptions,
|
|
77
|
+
});
|
|
74
78
|
const hooks = {
|
|
75
79
|
sandbox: {
|
|
76
80
|
onSandboxReady: [
|
|
@@ -172,7 +176,7 @@ for (let iteration = 0; iteration < 3; iteration++) {
|
|
|
172
176
|
]);
|
|
173
177
|
const sandbox = await shipyard.createSandbox({
|
|
174
178
|
branch: issue.branch,
|
|
175
|
-
sandbox:
|
|
179
|
+
sandbox: sandboxProvider,
|
|
176
180
|
hooks,
|
|
177
181
|
});
|
|
178
182
|
let evidence: string;
|
|
@@ -220,7 +224,7 @@ for (let iteration = 0; iteration < 3; iteration++) {
|
|
|
220
224
|
// branch so a later invocation can fast-forward the same PR.
|
|
221
225
|
const publication = await shipyard.createSandbox({
|
|
222
226
|
branch: issue.branch,
|
|
223
|
-
sandbox:
|
|
227
|
+
sandbox: sandboxProvider,
|
|
224
228
|
});
|
|
225
229
|
try {
|
|
226
230
|
publicationUncertain = true;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
+
# The sandbox starts from a temporary Git bundle, so reset its origin before Git pushes.
|
|
4
5
|
if [[ -n ${GH_REPO:-} ]]; then
|
|
5
6
|
[[ "$GH_REPO" =~ ^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$ ]] || { echo "Invalid GH_REPO" >&2; exit 1; }
|
|
6
7
|
git remote set-url origin "https://github.com/$GH_REPO.git"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Durable records for triage investigations and bounded repair publication.
|
|
2
|
+
-- These records resume phase-specific work; the coordinator ledger remains
|
|
3
|
+
-- responsible for job, dispatch, lease, and event state.
|
|
4
|
+
|
|
5
|
+
CREATE TABLE IF NOT EXISTS shipyard_workflow_phase_records (
|
|
6
|
+
namespace TEXT NOT NULL CHECK (namespace IN ('triage', 'repair-batch')),
|
|
7
|
+
record_key TEXT NOT NULL,
|
|
8
|
+
record JSONB NOT NULL,
|
|
9
|
+
updated_at TIMESTAMPTZ NOT NULL,
|
|
10
|
+
PRIMARY KEY (namespace, record_key)
|
|
11
|
+
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Version phase records without breaking writers from the previous release.
|
|
2
|
+
-- The default assigns old-format inserts version 1; code rollback can leave the
|
|
3
|
+
-- additive column in place.
|
|
4
|
+
ALTER TABLE shipyard_workflow_phase_records
|
|
5
|
+
ADD COLUMN IF NOT EXISTS schema_version INTEGER NOT NULL DEFAULT 1
|
|
6
|
+
CHECK (schema_version = 1);
|