@schoolai/shipyard-mcp 0.1.3-next.454 → 0.1.3-next.458
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/apps/hook/dist/index.js +125 -109
- package/apps/server/dist/{chunk-DYIXTO56.js → chunk-4BEPSPPL.js} +1 -1
- package/apps/server/dist/{chunk-7GPZDCWI.js → chunk-E5DWX2WU.js} +23 -1
- package/apps/server/dist/{chunk-O54HNUOM.js → chunk-FTOVV4YW.js} +1 -1
- package/apps/server/dist/{dist-FMDQHG7P.js → dist-FZ4WTJ2H.js} +1 -1
- package/apps/server/dist/index.js +97 -44
- package/apps/server/dist/{input-request-manager-4DWWEEXS.js → input-request-manager-YMNFW4JM.js} +2 -2
- package/apps/server/dist/{server-identity-KUXYHULN.js → server-identity-6PHKR2FY.js} +3 -1
- package/package.json +1 -1
package/apps/hook/dist/index.js
CHANGED
|
@@ -498,9 +498,9 @@ var require_lz_string = __commonJS({
|
|
|
498
498
|
}
|
|
499
499
|
});
|
|
500
500
|
|
|
501
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
501
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-helpers.js
|
|
502
502
|
var require_err_helpers = __commonJS({
|
|
503
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
503
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-helpers.js"(exports2, module2) {
|
|
504
504
|
"use strict";
|
|
505
505
|
init_cjs_shims();
|
|
506
506
|
var isErrorLike = (err) => {
|
|
@@ -556,9 +556,9 @@ var require_err_helpers = __commonJS({
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
|
|
559
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
559
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-proto.js
|
|
560
560
|
var require_err_proto = __commonJS({
|
|
561
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
561
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-proto.js"(exports2, module2) {
|
|
562
562
|
"use strict";
|
|
563
563
|
init_cjs_shims();
|
|
564
564
|
var seen = /* @__PURE__ */ Symbol("circular-ref-tag");
|
|
@@ -608,9 +608,9 @@ var require_err_proto = __commonJS({
|
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
610
|
|
|
611
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
611
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err.js
|
|
612
612
|
var require_err = __commonJS({
|
|
613
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
613
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err.js"(exports2, module2) {
|
|
614
614
|
"use strict";
|
|
615
615
|
init_cjs_shims();
|
|
616
616
|
module2.exports = errSerializer;
|
|
@@ -649,9 +649,9 @@ var require_err = __commonJS({
|
|
|
649
649
|
}
|
|
650
650
|
});
|
|
651
651
|
|
|
652
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
652
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-with-cause.js
|
|
653
653
|
var require_err_with_cause = __commonJS({
|
|
654
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
654
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/err-with-cause.js"(exports2, module2) {
|
|
655
655
|
"use strict";
|
|
656
656
|
init_cjs_shims();
|
|
657
657
|
module2.exports = errWithCauseSerializer;
|
|
@@ -693,9 +693,9 @@ var require_err_with_cause = __commonJS({
|
|
|
693
693
|
}
|
|
694
694
|
});
|
|
695
695
|
|
|
696
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
696
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/req.js
|
|
697
697
|
var require_req = __commonJS({
|
|
698
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
698
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/req.js"(exports2, module2) {
|
|
699
699
|
"use strict";
|
|
700
700
|
init_cjs_shims();
|
|
701
701
|
module2.exports = {
|
|
@@ -789,9 +789,9 @@ var require_req = __commonJS({
|
|
|
789
789
|
}
|
|
790
790
|
});
|
|
791
791
|
|
|
792
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
792
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/res.js
|
|
793
793
|
var require_res = __commonJS({
|
|
794
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
794
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/lib/res.js"(exports2, module2) {
|
|
795
795
|
"use strict";
|
|
796
796
|
init_cjs_shims();
|
|
797
797
|
module2.exports = {
|
|
@@ -839,9 +839,9 @@ var require_res = __commonJS({
|
|
|
839
839
|
}
|
|
840
840
|
});
|
|
841
841
|
|
|
842
|
-
// ../../node_modules/.pnpm/pino-std-serializers@7.
|
|
842
|
+
// ../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/index.js
|
|
843
843
|
var require_pino_std_serializers = __commonJS({
|
|
844
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.
|
|
844
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/index.js"(exports2, module2) {
|
|
845
845
|
"use strict";
|
|
846
846
|
init_cjs_shims();
|
|
847
847
|
var errSerializer = require_err();
|
|
@@ -877,9 +877,9 @@ var require_pino_std_serializers = __commonJS({
|
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
879
|
|
|
880
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
880
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/caller.js
|
|
881
881
|
var require_caller = __commonJS({
|
|
882
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
882
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/caller.js"(exports2, module2) {
|
|
883
883
|
"use strict";
|
|
884
884
|
init_cjs_shims();
|
|
885
885
|
function noOpPrepareStackTrace(_, stack) {
|
|
@@ -1340,9 +1340,9 @@ var require_redact = __commonJS({
|
|
|
1340
1340
|
}
|
|
1341
1341
|
});
|
|
1342
1342
|
|
|
1343
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
1343
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/symbols.js
|
|
1344
1344
|
var require_symbols = __commonJS({
|
|
1345
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
1345
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/symbols.js"(exports2, module2) {
|
|
1346
1346
|
"use strict";
|
|
1347
1347
|
init_cjs_shims();
|
|
1348
1348
|
var setLevelSym = /* @__PURE__ */ Symbol("pino.setLevel");
|
|
@@ -1412,9 +1412,9 @@ var require_symbols = __commonJS({
|
|
|
1412
1412
|
}
|
|
1413
1413
|
});
|
|
1414
1414
|
|
|
1415
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
1415
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/redaction.js
|
|
1416
1416
|
var require_redaction = __commonJS({
|
|
1417
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
1417
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/redaction.js"(exports2, module2) {
|
|
1418
1418
|
"use strict";
|
|
1419
1419
|
init_cjs_shims();
|
|
1420
1420
|
var Redact = require_redact();
|
|
@@ -1495,9 +1495,9 @@ var require_redaction = __commonJS({
|
|
|
1495
1495
|
}
|
|
1496
1496
|
});
|
|
1497
1497
|
|
|
1498
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
1498
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/time.js
|
|
1499
1499
|
var require_time = __commonJS({
|
|
1500
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
1500
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/time.js"(exports2, module2) {
|
|
1501
1501
|
"use strict";
|
|
1502
1502
|
init_cjs_shims();
|
|
1503
1503
|
var nullTime = () => "";
|
|
@@ -2354,49 +2354,44 @@ var require_on_exit_leak_free = __commonJS({
|
|
|
2354
2354
|
}
|
|
2355
2355
|
});
|
|
2356
2356
|
|
|
2357
|
-
// ../../node_modules/.pnpm/thread-stream@
|
|
2357
|
+
// ../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/package.json
|
|
2358
2358
|
var require_package = __commonJS({
|
|
2359
|
-
"../../node_modules/.pnpm/thread-stream@
|
|
2359
|
+
"../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/package.json"(exports2, module2) {
|
|
2360
2360
|
module2.exports = {
|
|
2361
2361
|
name: "thread-stream",
|
|
2362
|
-
version: "
|
|
2362
|
+
version: "4.0.0",
|
|
2363
2363
|
description: "A streaming way to send data to a Node.js Worker Thread",
|
|
2364
2364
|
main: "index.js",
|
|
2365
2365
|
types: "index.d.ts",
|
|
2366
|
+
engines: {
|
|
2367
|
+
node: ">=20"
|
|
2368
|
+
},
|
|
2366
2369
|
dependencies: {
|
|
2367
2370
|
"real-require": "^0.2.0"
|
|
2368
2371
|
},
|
|
2369
2372
|
devDependencies: {
|
|
2370
|
-
"@types/node": "^
|
|
2371
|
-
"@
|
|
2372
|
-
|
|
2373
|
+
"@types/node": "^22.0.0",
|
|
2374
|
+
"@yao-pkg/pkg": "^6.0.0",
|
|
2375
|
+
borp: "^0.21.0",
|
|
2373
2376
|
desm: "^1.3.0",
|
|
2377
|
+
eslint: "^9.39.1",
|
|
2374
2378
|
fastbench: "^1.0.1",
|
|
2375
2379
|
husky: "^9.0.6",
|
|
2380
|
+
neostandard: "^0.12.2",
|
|
2376
2381
|
"pino-elasticsearch": "^8.0.0",
|
|
2377
2382
|
"sonic-boom": "^4.0.1",
|
|
2378
|
-
standard: "^17.0.0",
|
|
2379
|
-
tap: "^16.2.0",
|
|
2380
2383
|
"ts-node": "^10.8.0",
|
|
2381
|
-
typescript: "
|
|
2382
|
-
"why-is-node-running": "^2.2.2"
|
|
2384
|
+
typescript: "~5.7.3"
|
|
2383
2385
|
},
|
|
2384
2386
|
scripts: {
|
|
2385
2387
|
build: "tsc --noEmit",
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
"test:ci
|
|
2389
|
-
"test:
|
|
2390
|
-
"test:yarn": 'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',
|
|
2388
|
+
lint: "eslint",
|
|
2389
|
+
test: "npm run lint && npm run build && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'",
|
|
2390
|
+
"test:ci": "npm run lint && npm run transpile && borp --pattern 'test/*.test.{js,mjs}'",
|
|
2391
|
+
"test:yarn": "npm run transpile && borp --pattern 'test/*.test.js'",
|
|
2391
2392
|
transpile: "sh ./test/ts/transpile.sh",
|
|
2392
2393
|
prepare: "husky install"
|
|
2393
2394
|
},
|
|
2394
|
-
standard: {
|
|
2395
|
-
ignore: [
|
|
2396
|
-
"test/ts/**/*",
|
|
2397
|
-
"test/syntax-error.mjs"
|
|
2398
|
-
]
|
|
2399
|
-
},
|
|
2400
2395
|
repository: {
|
|
2401
2396
|
type: "git",
|
|
2402
2397
|
url: "git+https://github.com/mcollina/thread-stream.git"
|
|
@@ -2417,68 +2412,63 @@ var require_package = __commonJS({
|
|
|
2417
2412
|
}
|
|
2418
2413
|
});
|
|
2419
2414
|
|
|
2420
|
-
// ../../node_modules/.pnpm/thread-stream@
|
|
2415
|
+
// ../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/wait.js
|
|
2421
2416
|
var require_wait = __commonJS({
|
|
2422
|
-
"../../node_modules/.pnpm/thread-stream@
|
|
2417
|
+
"../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/wait.js"(exports2, module2) {
|
|
2423
2418
|
"use strict";
|
|
2424
2419
|
init_cjs_shims();
|
|
2425
|
-
var
|
|
2420
|
+
var WAIT_MS = 1e4;
|
|
2426
2421
|
function wait(state, index, expected, timeout, done) {
|
|
2427
|
-
const max = Date.now() + timeout;
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
if (Date.now() > max) {
|
|
2422
|
+
const max = timeout === Infinity ? Infinity : Date.now() + timeout;
|
|
2423
|
+
const check2 = () => {
|
|
2424
|
+
const current = Atomics.load(state, index);
|
|
2425
|
+
if (current === expected) {
|
|
2426
|
+
done(null, "ok");
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
if (max !== Infinity && Date.now() > max) {
|
|
2436
2430
|
done(null, "timed-out");
|
|
2431
|
+
return;
|
|
2432
|
+
}
|
|
2433
|
+
const remaining = max === Infinity ? WAIT_MS : Math.min(WAIT_MS, Math.max(1, max - Date.now()));
|
|
2434
|
+
const result = Atomics.waitAsync(state, index, current, remaining);
|
|
2435
|
+
if (result.async) {
|
|
2436
|
+
result.value.then(check2);
|
|
2437
2437
|
} else {
|
|
2438
|
-
|
|
2439
|
-
prior = current;
|
|
2440
|
-
current = Atomics.load(state, index);
|
|
2441
|
-
if (current === prior) {
|
|
2442
|
-
check2(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
|
|
2443
|
-
} else {
|
|
2444
|
-
if (current === expected) done(null, "ok");
|
|
2445
|
-
else done(null, "not-equal");
|
|
2446
|
-
}
|
|
2447
|
-
}, backoff);
|
|
2438
|
+
setImmediate(check2);
|
|
2448
2439
|
}
|
|
2449
2440
|
};
|
|
2450
|
-
check2(
|
|
2441
|
+
check2();
|
|
2451
2442
|
}
|
|
2452
2443
|
function waitDiff(state, index, expected, timeout, done) {
|
|
2453
|
-
const max = Date.now() + timeout;
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
if (Date.now() > max) {
|
|
2444
|
+
const max = timeout === Infinity ? Infinity : Date.now() + timeout;
|
|
2445
|
+
const check2 = () => {
|
|
2446
|
+
const current = Atomics.load(state, index);
|
|
2447
|
+
if (current !== expected) {
|
|
2448
|
+
done(null, "ok");
|
|
2449
|
+
return;
|
|
2450
|
+
}
|
|
2451
|
+
if (max !== Infinity && Date.now() > max) {
|
|
2461
2452
|
done(null, "timed-out");
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
const remaining = max === Infinity ? WAIT_MS : Math.min(WAIT_MS, Math.max(1, max - Date.now()));
|
|
2456
|
+
const result = Atomics.waitAsync(state, index, expected, remaining);
|
|
2457
|
+
if (result.async) {
|
|
2458
|
+
result.value.then(check2);
|
|
2462
2459
|
} else {
|
|
2463
|
-
|
|
2464
|
-
current = Atomics.load(state, index);
|
|
2465
|
-
if (current !== expected) {
|
|
2466
|
-
done(null, "ok");
|
|
2467
|
-
} else {
|
|
2468
|
-
check2(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
|
|
2469
|
-
}
|
|
2470
|
-
}, backoff);
|
|
2460
|
+
setImmediate(check2);
|
|
2471
2461
|
}
|
|
2472
2462
|
};
|
|
2473
|
-
check2(
|
|
2463
|
+
check2();
|
|
2474
2464
|
}
|
|
2475
2465
|
module2.exports = { wait, waitDiff };
|
|
2476
2466
|
}
|
|
2477
2467
|
});
|
|
2478
2468
|
|
|
2479
|
-
// ../../node_modules/.pnpm/thread-stream@
|
|
2469
|
+
// ../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/indexes.js
|
|
2480
2470
|
var require_indexes = __commonJS({
|
|
2481
|
-
"../../node_modules/.pnpm/thread-stream@
|
|
2471
|
+
"../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/indexes.js"(exports2, module2) {
|
|
2482
2472
|
"use strict";
|
|
2483
2473
|
init_cjs_shims();
|
|
2484
2474
|
var WRITE_INDEX = 4;
|
|
@@ -2490,9 +2480,9 @@ var require_indexes = __commonJS({
|
|
|
2490
2480
|
}
|
|
2491
2481
|
});
|
|
2492
2482
|
|
|
2493
|
-
// ../../node_modules/.pnpm/thread-stream@
|
|
2483
|
+
// ../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/index.js
|
|
2494
2484
|
var require_thread_stream = __commonJS({
|
|
2495
|
-
"../../node_modules/.pnpm/thread-stream@
|
|
2485
|
+
"../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/index.js"(exports2, module2) {
|
|
2496
2486
|
"use strict";
|
|
2497
2487
|
init_cjs_shims();
|
|
2498
2488
|
var { version: version2 } = require_package();
|
|
@@ -2588,6 +2578,7 @@ var require_thread_stream = __commonJS({
|
|
|
2588
2578
|
}
|
|
2589
2579
|
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
|
|
2590
2580
|
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
|
|
2581
|
+
Atomics.notify(stream[kImpl].state, READ_INDEX);
|
|
2591
2582
|
while (toWriteBytes > stream[kImpl].data.length) {
|
|
2592
2583
|
leftover = leftover / 2;
|
|
2593
2584
|
toWrite = stream[kImpl].buf.slice(0, leftover);
|
|
@@ -2604,6 +2595,7 @@ var require_thread_stream = __commonJS({
|
|
|
2604
2595
|
stream.flush(() => {
|
|
2605
2596
|
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
|
|
2606
2597
|
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
|
|
2598
|
+
Atomics.notify(stream[kImpl].state, READ_INDEX);
|
|
2607
2599
|
nextFlush(stream);
|
|
2608
2600
|
});
|
|
2609
2601
|
} else {
|
|
@@ -2866,6 +2858,7 @@ var require_thread_stream = __commonJS({
|
|
|
2866
2858
|
flushSync(stream);
|
|
2867
2859
|
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
|
|
2868
2860
|
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
|
|
2861
|
+
Atomics.notify(stream[kImpl].state, READ_INDEX);
|
|
2869
2862
|
continue;
|
|
2870
2863
|
} else if (leftover < 0) {
|
|
2871
2864
|
throw new Error("overwritten");
|
|
@@ -2879,6 +2872,7 @@ var require_thread_stream = __commonJS({
|
|
|
2879
2872
|
flushSync(stream);
|
|
2880
2873
|
Atomics.store(stream[kImpl].state, READ_INDEX, 0);
|
|
2881
2874
|
Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
|
|
2875
|
+
Atomics.notify(stream[kImpl].state, READ_INDEX);
|
|
2882
2876
|
while (toWriteBytes > stream[kImpl].buf.length) {
|
|
2883
2877
|
leftover = leftover / 2;
|
|
2884
2878
|
toWrite = stream[kImpl].buf.slice(0, leftover);
|
|
@@ -2914,9 +2908,9 @@ var require_thread_stream = __commonJS({
|
|
|
2914
2908
|
}
|
|
2915
2909
|
});
|
|
2916
2910
|
|
|
2917
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
2911
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/transport.js
|
|
2918
2912
|
var require_transport = __commonJS({
|
|
2919
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
2913
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/transport.js"(exports2, module2) {
|
|
2920
2914
|
"use strict";
|
|
2921
2915
|
init_cjs_shims();
|
|
2922
2916
|
var { createRequire } = require("module");
|
|
@@ -2932,7 +2926,26 @@ var require_transport = __commonJS({
|
|
|
2932
2926
|
onExit.unregister(stream);
|
|
2933
2927
|
});
|
|
2934
2928
|
}
|
|
2929
|
+
function hasPreloadFlags() {
|
|
2930
|
+
const execArgv = process.execArgv;
|
|
2931
|
+
for (let i = 0; i < execArgv.length; i++) {
|
|
2932
|
+
const arg = execArgv[i];
|
|
2933
|
+
if (arg === "--import" || arg === "--require" || arg === "-r") {
|
|
2934
|
+
return true;
|
|
2935
|
+
}
|
|
2936
|
+
if (arg.startsWith("--import=") || arg.startsWith("--require=") || arg.startsWith("-r=")) {
|
|
2937
|
+
return true;
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
return false;
|
|
2941
|
+
}
|
|
2935
2942
|
function buildStream(filename, workerData, workerOpts, sync) {
|
|
2943
|
+
if (!workerOpts.execArgv && hasPreloadFlags() && require.main === void 0) {
|
|
2944
|
+
workerOpts = {
|
|
2945
|
+
...workerOpts,
|
|
2946
|
+
execArgv: []
|
|
2947
|
+
};
|
|
2948
|
+
}
|
|
2936
2949
|
const stream = new ThreadStream({
|
|
2937
2950
|
filename,
|
|
2938
2951
|
workerData,
|
|
@@ -2978,7 +2991,7 @@ var require_transport = __commonJS({
|
|
|
2978
2991
|
...fullOptions.options
|
|
2979
2992
|
};
|
|
2980
2993
|
const callers = typeof caller === "string" ? [caller] : caller;
|
|
2981
|
-
const bundlerOverrides = "__bundlerPathsOverrides"
|
|
2994
|
+
const bundlerOverrides = typeof globalThis === "object" && Object.prototype.hasOwnProperty.call(globalThis, "__bundlerPathsOverrides") && globalThis.__bundlerPathsOverrides && typeof globalThis.__bundlerPathsOverrides === "object" ? globalThis.__bundlerPathsOverrides : /* @__PURE__ */ Object.create(null);
|
|
2982
2995
|
let target = fullOptions.target;
|
|
2983
2996
|
if (target && targets) {
|
|
2984
2997
|
throw new Error("only one of target or targets can be specified");
|
|
@@ -3046,9 +3059,9 @@ var require_transport = __commonJS({
|
|
|
3046
3059
|
}
|
|
3047
3060
|
});
|
|
3048
3061
|
|
|
3049
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
3062
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/tools.js
|
|
3050
3063
|
var require_tools = __commonJS({
|
|
3051
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
3064
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/tools.js"(exports2, module2) {
|
|
3052
3065
|
"use strict";
|
|
3053
3066
|
init_cjs_shims();
|
|
3054
3067
|
var diagChan = require("diagnostics_channel");
|
|
@@ -3076,7 +3089,9 @@ var require_tools = __commonJS({
|
|
|
3076
3089
|
} = require_symbols();
|
|
3077
3090
|
var { isMainThread } = require("worker_threads");
|
|
3078
3091
|
var transport = require_transport();
|
|
3092
|
+
var [nodeMajor] = process.versions.node.split(".").map((v) => Number(v));
|
|
3079
3093
|
var asJsonChan = diagChan.tracingChannel("pino_asJson");
|
|
3094
|
+
var asString = nodeMajor >= 25 ? (str) => JSON.stringify(str) : _asString;
|
|
3080
3095
|
function noop3() {
|
|
3081
3096
|
}
|
|
3082
3097
|
function genLog(level, hook) {
|
|
@@ -3114,7 +3129,7 @@ var require_tools = __commonJS({
|
|
|
3114
3129
|
}
|
|
3115
3130
|
}
|
|
3116
3131
|
}
|
|
3117
|
-
function
|
|
3132
|
+
function _asString(str) {
|
|
3118
3133
|
let result = "";
|
|
3119
3134
|
let last = 0;
|
|
3120
3135
|
let found = false;
|
|
@@ -3374,9 +3389,9 @@ var require_tools = __commonJS({
|
|
|
3374
3389
|
}
|
|
3375
3390
|
});
|
|
3376
3391
|
|
|
3377
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
3392
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/constants.js
|
|
3378
3393
|
var require_constants = __commonJS({
|
|
3379
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
3394
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/constants.js"(exports2, module2) {
|
|
3380
3395
|
"use strict";
|
|
3381
3396
|
init_cjs_shims();
|
|
3382
3397
|
var DEFAULT_LEVELS = {
|
|
@@ -3398,9 +3413,9 @@ var require_constants = __commonJS({
|
|
|
3398
3413
|
}
|
|
3399
3414
|
});
|
|
3400
3415
|
|
|
3401
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
3416
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/levels.js
|
|
3402
3417
|
var require_levels = __commonJS({
|
|
3403
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
3418
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/levels.js"(exports2, module2) {
|
|
3404
3419
|
"use strict";
|
|
3405
3420
|
init_cjs_shims();
|
|
3406
3421
|
var {
|
|
@@ -3592,18 +3607,18 @@ var require_levels = __commonJS({
|
|
|
3592
3607
|
}
|
|
3593
3608
|
});
|
|
3594
3609
|
|
|
3595
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
3610
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/meta.js
|
|
3596
3611
|
var require_meta = __commonJS({
|
|
3597
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
3612
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/meta.js"(exports2, module2) {
|
|
3598
3613
|
"use strict";
|
|
3599
3614
|
init_cjs_shims();
|
|
3600
|
-
module2.exports = { version: "10.1
|
|
3615
|
+
module2.exports = { version: "10.2.1" };
|
|
3601
3616
|
}
|
|
3602
3617
|
});
|
|
3603
3618
|
|
|
3604
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
3619
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/proto.js
|
|
3605
3620
|
var require_proto = __commonJS({
|
|
3606
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
3621
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/proto.js"(exports2, module2) {
|
|
3607
3622
|
"use strict";
|
|
3608
3623
|
init_cjs_shims();
|
|
3609
3624
|
var { EventEmitter } = require("events");
|
|
@@ -4429,9 +4444,9 @@ ${originalIndentation}`;
|
|
|
4429
4444
|
}
|
|
4430
4445
|
});
|
|
4431
4446
|
|
|
4432
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
4447
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/multistream.js
|
|
4433
4448
|
var require_multistream = __commonJS({
|
|
4434
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
4449
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/lib/multistream.js"(exports2, module2) {
|
|
4435
4450
|
"use strict";
|
|
4436
4451
|
init_cjs_shims();
|
|
4437
4452
|
var metadata = /* @__PURE__ */ Symbol.for("pino.metadata");
|
|
@@ -4598,9 +4613,9 @@ var require_multistream = __commonJS({
|
|
|
4598
4613
|
}
|
|
4599
4614
|
});
|
|
4600
4615
|
|
|
4601
|
-
// ../../node_modules/.pnpm/pino@10.1
|
|
4616
|
+
// ../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/pino.js
|
|
4602
4617
|
var require_pino = __commonJS({
|
|
4603
|
-
"../../node_modules/.pnpm/pino@10.1
|
|
4618
|
+
"../../node_modules/.pnpm/pino@10.2.1/node_modules/pino/pino.js"(exports2, module2) {
|
|
4604
4619
|
"use strict";
|
|
4605
4620
|
init_cjs_shims();
|
|
4606
4621
|
var os = require("os");
|
|
@@ -28479,7 +28494,7 @@ init_cjs_shims();
|
|
|
28479
28494
|
// ../../packages/schema/dist/index.mjs
|
|
28480
28495
|
init_cjs_shims();
|
|
28481
28496
|
|
|
28482
|
-
// ../../packages/schema/dist/yjs-helpers-
|
|
28497
|
+
// ../../packages/schema/dist/yjs-helpers-B435ND5d.mjs
|
|
28483
28498
|
init_cjs_shims();
|
|
28484
28499
|
|
|
28485
28500
|
// ../../packages/schema/dist/plan.mjs
|
|
@@ -42650,7 +42665,7 @@ var PRReviewCommentSchema = external_exports.object({
|
|
|
42650
42665
|
resolved: external_exports.boolean().optional()
|
|
42651
42666
|
});
|
|
42652
42667
|
|
|
42653
|
-
// ../../packages/schema/dist/yjs-helpers-
|
|
42668
|
+
// ../../packages/schema/dist/yjs-helpers-B435ND5d.mjs
|
|
42654
42669
|
function assertNever2(value) {
|
|
42655
42670
|
throw new Error(`Unhandled discriminated union member: ${JSON.stringify(value)}`);
|
|
42656
42671
|
}
|
|
@@ -45689,8 +45704,9 @@ init_cjs_shims();
|
|
|
45689
45704
|
|
|
45690
45705
|
// src/config/env/web.ts
|
|
45691
45706
|
init_cjs_shims();
|
|
45707
|
+
var defaultWebUrl = process.env.NODE_ENV === "production" ? "https://schoolai.github.io/shipyard" : "http://localhost:5173";
|
|
45692
45708
|
var schema3 = external_exports.object({
|
|
45693
|
-
SHIPYARD_WEB_URL: external_exports.string().url().default(
|
|
45709
|
+
SHIPYARD_WEB_URL: external_exports.string().url().default(defaultWebUrl)
|
|
45694
45710
|
});
|
|
45695
45711
|
var webConfig = loadEnv(schema3);
|
|
45696
45712
|
|
|
@@ -863,7 +863,7 @@ function createHandedOffConversationVersion(params) {
|
|
|
863
863
|
return ConversationVersionSchema.parse(version);
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
-
// ../../packages/schema/dist/yjs-helpers-
|
|
866
|
+
// ../../packages/schema/dist/yjs-helpers-B435ND5d.mjs
|
|
867
867
|
import { z as z2 } from "zod";
|
|
868
868
|
import { nanoid as nanoid2 } from "nanoid";
|
|
869
869
|
import * as Y from "yjs";
|
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
|
|
6
6
|
// src/server-identity.ts
|
|
7
7
|
import { execSync as execSync2 } from "child_process";
|
|
8
|
+
import os from "os";
|
|
9
|
+
import { basename } from "path";
|
|
8
10
|
|
|
9
11
|
// src/config/env/github.ts
|
|
10
12
|
import { execSync } from "child_process";
|
|
@@ -150,9 +152,29 @@ function getUsernameFromGitConfig() {
|
|
|
150
152
|
return null;
|
|
151
153
|
}
|
|
152
154
|
}
|
|
155
|
+
function getGitBranch() {
|
|
156
|
+
try {
|
|
157
|
+
return execSync2("git branch --show-current", {
|
|
158
|
+
encoding: "utf-8",
|
|
159
|
+
timeout: 2e3,
|
|
160
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
161
|
+
}).trim() || void 0;
|
|
162
|
+
} catch {
|
|
163
|
+
return void 0;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function getEnvironmentContext() {
|
|
167
|
+
return {
|
|
168
|
+
projectName: basename(process.cwd()) || void 0,
|
|
169
|
+
branch: getGitBranch(),
|
|
170
|
+
hostname: os.hostname(),
|
|
171
|
+
repo: getRepositoryFullName() || void 0
|
|
172
|
+
};
|
|
173
|
+
}
|
|
153
174
|
|
|
154
175
|
export {
|
|
155
176
|
githubConfig,
|
|
156
177
|
getRepositoryFullName,
|
|
157
|
-
getGitHubUsername
|
|
178
|
+
getGitHubUsername,
|
|
179
|
+
getEnvironmentContext
|
|
158
180
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
+
getEnvironmentContext,
|
|
3
4
|
getGitHubUsername,
|
|
4
5
|
getRepositoryFullName,
|
|
5
6
|
githubConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E5DWX2WU.js";
|
|
7
8
|
import {
|
|
8
9
|
assertNever,
|
|
9
10
|
getSessionIdByPlanId,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
} from "./chunk-EBNL5ZX7.js";
|
|
19
20
|
import {
|
|
20
21
|
InputRequestManager
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FTOVV4YW.js";
|
|
22
23
|
import {
|
|
23
24
|
ArtifactSchema,
|
|
24
25
|
DeliverableSchema,
|
|
@@ -67,7 +68,7 @@ import {
|
|
|
67
68
|
setPlanMetadata,
|
|
68
69
|
touchPlanIndexEntry,
|
|
69
70
|
transitionPlanStatus
|
|
70
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-4BEPSPPL.js";
|
|
71
72
|
import {
|
|
72
73
|
loadEnv,
|
|
73
74
|
logger
|
|
@@ -500,14 +501,14 @@ async function uploadArtifact(params) {
|
|
|
500
501
|
}
|
|
501
502
|
const { repo, planId, filename, content } = params;
|
|
502
503
|
const { owner, repoName } = parseRepoString(repo);
|
|
503
|
-
const
|
|
504
|
+
const path2 = `plans/${planId}/${filename}`;
|
|
504
505
|
await ensureArtifactsBranch(repo);
|
|
505
506
|
let existingSha;
|
|
506
507
|
try {
|
|
507
508
|
const { data } = await octokit.repos.getContent({
|
|
508
509
|
owner,
|
|
509
510
|
repo: repoName,
|
|
510
|
-
path,
|
|
511
|
+
path: path2,
|
|
511
512
|
ref: ARTIFACTS_BRANCH
|
|
512
513
|
});
|
|
513
514
|
if (!Array.isArray(data) && data.type === "file") {
|
|
@@ -521,14 +522,14 @@ async function uploadArtifact(params) {
|
|
|
521
522
|
await octokit.repos.createOrUpdateFileContents({
|
|
522
523
|
owner,
|
|
523
524
|
repo: repoName,
|
|
524
|
-
path,
|
|
525
|
+
path: path2,
|
|
525
526
|
message: `Add artifact: ${filename}`,
|
|
526
527
|
content,
|
|
527
528
|
branch: ARTIFACTS_BRANCH,
|
|
528
529
|
sha: existingSha
|
|
529
530
|
});
|
|
530
|
-
const url = `https://raw.githubusercontent.com/${repo}/${ARTIFACTS_BRANCH}/${
|
|
531
|
-
logger.info({ repo, path, url }, "Artifact uploaded");
|
|
531
|
+
const url = `https://raw.githubusercontent.com/${repo}/${ARTIFACTS_BRANCH}/${path2}`;
|
|
532
|
+
logger.info({ repo, path: path2, url }, "Artifact uploaded");
|
|
532
533
|
return url;
|
|
533
534
|
});
|
|
534
535
|
}
|
|
@@ -557,8 +558,9 @@ import open from "open";
|
|
|
557
558
|
|
|
558
559
|
// src/config/env/web.ts
|
|
559
560
|
import { z as z2 } from "zod";
|
|
561
|
+
var defaultWebUrl = process.env.NODE_ENV === "production" ? "https://schoolai.github.io/shipyard" : "http://localhost:5173";
|
|
560
562
|
var schema2 = z2.object({
|
|
561
|
-
SHIPYARD_WEB_URL: z2.string().url().default(
|
|
563
|
+
SHIPYARD_WEB_URL: z2.string().url().default(defaultWebUrl)
|
|
562
564
|
});
|
|
563
565
|
var webConfig = loadEnv(schema2);
|
|
564
566
|
|
|
@@ -1683,6 +1685,10 @@ function handleResolvedComments(doc, planId, threads, prev, actor) {
|
|
|
1683
1685
|
}
|
|
1684
1686
|
|
|
1685
1687
|
// src/registry-server.ts
|
|
1688
|
+
function getParam(value) {
|
|
1689
|
+
if (Array.isArray(value)) return value[0];
|
|
1690
|
+
return value;
|
|
1691
|
+
}
|
|
1686
1692
|
var PERSISTENCE_DIR = join3(homedir3(), ".shipyard", "plans");
|
|
1687
1693
|
var HUB_LOCK_FILE = join3(homedir3(), ".shipyard", "hub.lock");
|
|
1688
1694
|
var SHIPYARD_DIR = join3(homedir3(), ".shipyard");
|
|
@@ -1986,7 +1992,8 @@ async function handleHealthCheck(_req, res) {
|
|
|
1986
1992
|
res.json({ status: "ok" });
|
|
1987
1993
|
}
|
|
1988
1994
|
async function handleGetPRDiff(req, res) {
|
|
1989
|
-
const
|
|
1995
|
+
const planId = getParam(req.params.id);
|
|
1996
|
+
const prNumber = getParam(req.params.prNumber);
|
|
1990
1997
|
if (!planId || !prNumber) {
|
|
1991
1998
|
res.status(400).json({ error: "Missing plan ID or PR number" });
|
|
1992
1999
|
return;
|
|
@@ -2022,7 +2029,8 @@ async function handleGetPRDiff(req, res) {
|
|
|
2022
2029
|
}
|
|
2023
2030
|
}
|
|
2024
2031
|
async function handleGetPRFiles(req, res) {
|
|
2025
|
-
const
|
|
2032
|
+
const planId = getParam(req.params.id);
|
|
2033
|
+
const prNumber = getParam(req.params.prNumber);
|
|
2026
2034
|
if (!planId || !prNumber) {
|
|
2027
2035
|
res.status(400).json({ error: "Missing plan ID or PR number" });
|
|
2028
2036
|
return;
|
|
@@ -2063,7 +2071,7 @@ async function handleGetPRFiles(req, res) {
|
|
|
2063
2071
|
}
|
|
2064
2072
|
}
|
|
2065
2073
|
async function handleGetTranscript(req, res) {
|
|
2066
|
-
const planId = req.params.id;
|
|
2074
|
+
const planId = getParam(req.params.id);
|
|
2067
2075
|
if (!planId) {
|
|
2068
2076
|
res.status(400).json({ error: "Missing plan ID" });
|
|
2069
2077
|
return;
|
|
@@ -2153,8 +2161,8 @@ function createApp() {
|
|
|
2153
2161
|
app.get("/api/plans/:id/pr-diff/:prNumber", handleGetPRDiff);
|
|
2154
2162
|
app.get("/api/plans/:id/pr-files/:prNumber", handleGetPRFiles);
|
|
2155
2163
|
app.get("/artifacts/:planId/:filename", async (req, res) => {
|
|
2156
|
-
const planId = req.params.planId;
|
|
2157
|
-
const filename = req.params.filename;
|
|
2164
|
+
const planId = getParam(req.params.planId);
|
|
2165
|
+
const filename = getParam(req.params.filename);
|
|
2158
2166
|
if (!planId || !filename) {
|
|
2159
2167
|
res.status(400).json({ error: "Missing planId or filename" });
|
|
2160
2168
|
return;
|
|
@@ -2258,7 +2266,8 @@ async function isRegistryRunning() {
|
|
|
2258
2266
|
// src/webrtc-provider.ts
|
|
2259
2267
|
import wrtc from "@roamhq/wrtc";
|
|
2260
2268
|
import { WebrtcProvider } from "y-webrtc";
|
|
2261
|
-
var
|
|
2269
|
+
var defaultSignaling = process.env.NODE_ENV === "production" ? "wss://shipyard-signaling.jacob-191.workers.dev" : "ws://localhost:4444";
|
|
2270
|
+
var SIGNALING_SERVER = process.env.SIGNALING_URL || defaultSignaling;
|
|
2262
2271
|
if (typeof globalThis.RTCPeerConnection === "undefined") {
|
|
2263
2272
|
globalThis.RTCPeerConnection = wrtc.RTCPeerConnection;
|
|
2264
2273
|
globalThis.RTCSessionDescription = wrtc.RTCSessionDescription;
|
|
@@ -2289,29 +2298,28 @@ async function createWebRtcProvider(ydoc, planId) {
|
|
|
2289
2298
|
}
|
|
2290
2299
|
}
|
|
2291
2300
|
});
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
}
|
|
2301
|
+
const username = await getGitHubUsername().catch(() => void 0);
|
|
2302
|
+
const fallbackId = `mcp-anon-${crypto.randomUUID().slice(0, 8)}`;
|
|
2303
|
+
const userId = username ? `mcp-${username}` : fallbackId;
|
|
2304
|
+
const displayName = username ? `Claude Code (${username})` : "Claude Code";
|
|
2305
|
+
const awarenessState = {
|
|
2306
|
+
user: {
|
|
2307
|
+
id: userId,
|
|
2308
|
+
name: displayName,
|
|
2309
|
+
color: "#0066cc"
|
|
2310
|
+
},
|
|
2311
|
+
platform: "claude-code",
|
|
2312
|
+
status: "approved",
|
|
2313
|
+
isOwner: true,
|
|
2314
|
+
webrtcPeerId: crypto.randomUUID(),
|
|
2315
|
+
context: getEnvironmentContext()
|
|
2316
|
+
};
|
|
2317
|
+
provider.awareness.setLocalStateField("planStatus", awarenessState);
|
|
2318
|
+
logger.info(
|
|
2319
|
+
{ planId, username: username ?? fallbackId, platform: "claude-code", hasContext: true },
|
|
2320
|
+
"MCP awareness state set"
|
|
2321
|
+
);
|
|
2322
|
+
sendApprovalStateToSignaling(provider, planId, username ?? fallbackId);
|
|
2315
2323
|
setupProviderListeners(provider, planId);
|
|
2316
2324
|
logger.info(
|
|
2317
2325
|
{
|
|
@@ -2459,7 +2467,12 @@ async function hasActiveConnections2(planId) {
|
|
|
2459
2467
|
}
|
|
2460
2468
|
|
|
2461
2469
|
// src/tools/execute-code.ts
|
|
2470
|
+
import * as child_process from "child_process";
|
|
2471
|
+
import * as fs from "fs";
|
|
2472
|
+
import * as os from "os";
|
|
2473
|
+
import * as path from "path";
|
|
2462
2474
|
import * as vm from "vm";
|
|
2475
|
+
import ffmpegInstaller from "@ffmpeg-installer/ffmpeg";
|
|
2463
2476
|
import { z as z12 } from "zod";
|
|
2464
2477
|
|
|
2465
2478
|
// src/tools/add-artifact.ts
|
|
@@ -3600,7 +3613,7 @@ Bad deliverables (not provable):
|
|
|
3600
3613
|
deleted: false
|
|
3601
3614
|
});
|
|
3602
3615
|
logger.info({ planId }, "Plan index updated");
|
|
3603
|
-
const url =
|
|
3616
|
+
const url = `${webConfig.SHIPYARD_WEB_URL}/plan/${planId}`;
|
|
3604
3617
|
await openPlanInBrowser(planId, url);
|
|
3605
3618
|
const repoInfo = repo ? `Repo: ${repo}${!input.repo ? " (auto-detected)" : ""}` : "Repo: Not set (provide repo and prNumber for artifact uploads)";
|
|
3606
3619
|
return {
|
|
@@ -5062,7 +5075,7 @@ async function setupReviewNotification(planId, pollIntervalSeconds) {
|
|
|
5062
5075
|
return { script, fullResponse: text };
|
|
5063
5076
|
}
|
|
5064
5077
|
async function requestUserInput(opts) {
|
|
5065
|
-
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-
|
|
5078
|
+
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-YMNFW4JM.js");
|
|
5066
5079
|
const ydoc = await getOrCreateDoc3(PLAN_INDEX_DOC_NAME);
|
|
5067
5080
|
const manager = new InputRequestManager2();
|
|
5068
5081
|
const params = opts.type === "choice" ? {
|
|
@@ -5106,8 +5119,8 @@ async function requestUserInput(opts) {
|
|
|
5106
5119
|
};
|
|
5107
5120
|
}
|
|
5108
5121
|
async function postActivityUpdate(opts) {
|
|
5109
|
-
const { logPlanEvent: logPlanEvent2 } = await import("./dist-
|
|
5110
|
-
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-
|
|
5122
|
+
const { logPlanEvent: logPlanEvent2 } = await import("./dist-FZ4WTJ2H.js");
|
|
5123
|
+
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-6PHKR2FY.js");
|
|
5111
5124
|
const { nanoid: nanoid7 } = await import("nanoid");
|
|
5112
5125
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
5113
5126
|
const actorName = await getGitHubUsername2();
|
|
@@ -5129,8 +5142,8 @@ async function postActivityUpdate(opts) {
|
|
|
5129
5142
|
return { success: true, eventId, requestId };
|
|
5130
5143
|
}
|
|
5131
5144
|
async function resolveActivityRequest(opts) {
|
|
5132
|
-
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-
|
|
5133
|
-
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-
|
|
5145
|
+
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-FZ4WTJ2H.js");
|
|
5146
|
+
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-6PHKR2FY.js");
|
|
5134
5147
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
5135
5148
|
const actorName = await getGitHubUsername2();
|
|
5136
5149
|
const events = getPlanEvents(doc);
|
|
@@ -5174,7 +5187,38 @@ var executeCodeTool = {
|
|
|
5174
5187
|
const { code } = ExecuteCodeInput.parse(args);
|
|
5175
5188
|
logger.info({ codeLength: code.length }, "Executing code");
|
|
5176
5189
|
try {
|
|
5190
|
+
async function encodeVideo(opts) {
|
|
5191
|
+
const fps = opts.fps || 6;
|
|
5192
|
+
const outputPath = opts.outputPath || path.join(os.tmpdir(), `video-${Date.now()}.mp4`);
|
|
5193
|
+
const { spawnSync } = child_process;
|
|
5194
|
+
const result2 = spawnSync(
|
|
5195
|
+
ffmpegInstaller.path,
|
|
5196
|
+
[
|
|
5197
|
+
"-y",
|
|
5198
|
+
"-framerate",
|
|
5199
|
+
String(fps),
|
|
5200
|
+
"-i",
|
|
5201
|
+
path.join(opts.framesDir, "frame-%06d.jpg"),
|
|
5202
|
+
"-vf",
|
|
5203
|
+
"scale=trunc(iw/2)*2:trunc(ih/2)*2",
|
|
5204
|
+
"-c:v",
|
|
5205
|
+
"libx264",
|
|
5206
|
+
"-pix_fmt",
|
|
5207
|
+
"yuv420p",
|
|
5208
|
+
"-preset",
|
|
5209
|
+
"fast",
|
|
5210
|
+
outputPath
|
|
5211
|
+
],
|
|
5212
|
+
{ encoding: "utf-8", timeout: 6e4 }
|
|
5213
|
+
);
|
|
5214
|
+
if (result2.status !== 0) {
|
|
5215
|
+
throw new Error(`FFmpeg encoding failed: ${result2.stderr?.slice(-300)}`);
|
|
5216
|
+
}
|
|
5217
|
+
fs.rmSync(opts.framesDir, { recursive: true, force: true });
|
|
5218
|
+
return outputPath;
|
|
5219
|
+
}
|
|
5177
5220
|
const sandbox = {
|
|
5221
|
+
// Shipyard API functions
|
|
5178
5222
|
createPlan,
|
|
5179
5223
|
readPlan,
|
|
5180
5224
|
updatePlan,
|
|
@@ -5187,6 +5231,15 @@ var executeCodeTool = {
|
|
|
5187
5231
|
requestUserInput,
|
|
5188
5232
|
postActivityUpdate,
|
|
5189
5233
|
resolveActivityRequest,
|
|
5234
|
+
// Video encoding helper (uses bundled FFmpeg)
|
|
5235
|
+
encodeVideo,
|
|
5236
|
+
// Node.js modules for advanced workflows (file ops, process spawning)
|
|
5237
|
+
child_process,
|
|
5238
|
+
fs,
|
|
5239
|
+
path,
|
|
5240
|
+
os,
|
|
5241
|
+
// FFmpeg bundled with server - no installation required
|
|
5242
|
+
ffmpegPath: ffmpegInstaller.path,
|
|
5190
5243
|
console: {
|
|
5191
5244
|
log: (...logArgs) => logger.info({ output: logArgs }, "console.log"),
|
|
5192
5245
|
error: (...logArgs) => logger.error({ output: logArgs }, "console.error")
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
getEnvironmentContext,
|
|
2
3
|
getGitHubUsername,
|
|
3
4
|
getRepositoryFullName
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E5DWX2WU.js";
|
|
5
6
|
import "./chunk-GSGLHRWX.js";
|
|
6
7
|
import "./chunk-JSBRDJBE.js";
|
|
7
8
|
export {
|
|
9
|
+
getEnvironmentContext,
|
|
8
10
|
getGitHubUsername,
|
|
9
11
|
getRepositoryFullName
|
|
10
12
|
};
|