@schoolai/shipyard-mcp 0.1.3-next.453 → 0.1.3-next.457
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 +123 -108
- package/apps/server/dist/{chunk-UN6RJ77A.js → chunk-4BEPSPPL.js} +30 -1
- package/apps/server/dist/{chunk-7GPZDCWI.js → chunk-E5DWX2WU.js} +23 -1
- package/apps/server/dist/{chunk-LD5NBKJ5.js → chunk-FTOVV4YW.js} +1 -1
- package/apps/server/dist/{dist-4IAHBBMC.js → dist-FZ4WTJ2H.js} +3 -1
- package/apps/server/dist/index.js +93 -42
- package/apps/server/dist/{input-request-manager-RO5G36ST.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
|
}
|
|
@@ -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";
|
|
@@ -1701,6 +1701,34 @@ function cancelInputRequest(ydoc, requestId) {
|
|
|
1701
1701
|
});
|
|
1702
1702
|
return { success: true };
|
|
1703
1703
|
}
|
|
1704
|
+
function declineInputRequest(ydoc, requestId) {
|
|
1705
|
+
const requestsArray = ydoc.getArray(YDOC_KEYS.INPUT_REQUESTS);
|
|
1706
|
+
const requests = requestsArray.toJSON();
|
|
1707
|
+
const index = requests.findIndex((r) => r.id === requestId);
|
|
1708
|
+
if (index === -1) return {
|
|
1709
|
+
success: false,
|
|
1710
|
+
error: "Request not found"
|
|
1711
|
+
};
|
|
1712
|
+
const request = requests[index];
|
|
1713
|
+
if (!request) return {
|
|
1714
|
+
success: false,
|
|
1715
|
+
error: "Request not found"
|
|
1716
|
+
};
|
|
1717
|
+
if (request.status !== "pending") return {
|
|
1718
|
+
success: false,
|
|
1719
|
+
error: `Request is not pending`
|
|
1720
|
+
};
|
|
1721
|
+
const declinedRequest = {
|
|
1722
|
+
...request,
|
|
1723
|
+
status: "declined"
|
|
1724
|
+
};
|
|
1725
|
+
const validated = InputRequestSchema.parse(declinedRequest);
|
|
1726
|
+
ydoc.transact(() => {
|
|
1727
|
+
requestsArray.delete(index, 1);
|
|
1728
|
+
requestsArray.insert(index, [validated]);
|
|
1729
|
+
});
|
|
1730
|
+
return { success: true };
|
|
1731
|
+
}
|
|
1704
1732
|
|
|
1705
1733
|
// ../../packages/schema/dist/url-encoding.mjs
|
|
1706
1734
|
var import_lz_string = __toESM(require_lz_string(), 1);
|
|
@@ -2842,6 +2870,7 @@ export {
|
|
|
2842
2870
|
unarchivePlan,
|
|
2843
2871
|
answerInputRequest,
|
|
2844
2872
|
cancelInputRequest,
|
|
2873
|
+
declineInputRequest,
|
|
2845
2874
|
isUrlEncodedPlanV1,
|
|
2846
2875
|
isUrlEncodedPlanV2,
|
|
2847
2876
|
encodePlan,
|
|
@@ -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
|
};
|
|
@@ -109,6 +109,7 @@ import {
|
|
|
109
109
|
createPlanUrl,
|
|
110
110
|
createPlanUrlWithHistory,
|
|
111
111
|
createUserResolver,
|
|
112
|
+
declineInputRequest,
|
|
112
113
|
decodeChunkMessage,
|
|
113
114
|
decodeExportEndMessage,
|
|
114
115
|
decodeExportStartMessage,
|
|
@@ -202,7 +203,7 @@ import {
|
|
|
202
203
|
updateLinkedPRStatus,
|
|
203
204
|
updatePlanIndexViewedBy,
|
|
204
205
|
validateA2AMessages
|
|
205
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-4BEPSPPL.js";
|
|
206
207
|
import "./chunk-JSBRDJBE.js";
|
|
207
208
|
export {
|
|
208
209
|
A2ADataPartSchema,
|
|
@@ -315,6 +316,7 @@ export {
|
|
|
315
316
|
createPlanUrl,
|
|
316
317
|
createPlanUrlWithHistory,
|
|
317
318
|
createUserResolver,
|
|
319
|
+
declineInputRequest,
|
|
318
320
|
decodeChunkMessage,
|
|
319
321
|
decodeExportEndMessage,
|
|
320
322
|
decodeExportStartMessage,
|
|
@@ -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
|
}
|
|
@@ -1683,6 +1684,10 @@ function handleResolvedComments(doc, planId, threads, prev, actor) {
|
|
|
1683
1684
|
}
|
|
1684
1685
|
|
|
1685
1686
|
// src/registry-server.ts
|
|
1687
|
+
function getParam(value) {
|
|
1688
|
+
if (Array.isArray(value)) return value[0];
|
|
1689
|
+
return value;
|
|
1690
|
+
}
|
|
1686
1691
|
var PERSISTENCE_DIR = join3(homedir3(), ".shipyard", "plans");
|
|
1687
1692
|
var HUB_LOCK_FILE = join3(homedir3(), ".shipyard", "hub.lock");
|
|
1688
1693
|
var SHIPYARD_DIR = join3(homedir3(), ".shipyard");
|
|
@@ -1986,7 +1991,8 @@ async function handleHealthCheck(_req, res) {
|
|
|
1986
1991
|
res.json({ status: "ok" });
|
|
1987
1992
|
}
|
|
1988
1993
|
async function handleGetPRDiff(req, res) {
|
|
1989
|
-
const
|
|
1994
|
+
const planId = getParam(req.params.id);
|
|
1995
|
+
const prNumber = getParam(req.params.prNumber);
|
|
1990
1996
|
if (!planId || !prNumber) {
|
|
1991
1997
|
res.status(400).json({ error: "Missing plan ID or PR number" });
|
|
1992
1998
|
return;
|
|
@@ -2022,7 +2028,8 @@ async function handleGetPRDiff(req, res) {
|
|
|
2022
2028
|
}
|
|
2023
2029
|
}
|
|
2024
2030
|
async function handleGetPRFiles(req, res) {
|
|
2025
|
-
const
|
|
2031
|
+
const planId = getParam(req.params.id);
|
|
2032
|
+
const prNumber = getParam(req.params.prNumber);
|
|
2026
2033
|
if (!planId || !prNumber) {
|
|
2027
2034
|
res.status(400).json({ error: "Missing plan ID or PR number" });
|
|
2028
2035
|
return;
|
|
@@ -2063,7 +2070,7 @@ async function handleGetPRFiles(req, res) {
|
|
|
2063
2070
|
}
|
|
2064
2071
|
}
|
|
2065
2072
|
async function handleGetTranscript(req, res) {
|
|
2066
|
-
const planId = req.params.id;
|
|
2073
|
+
const planId = getParam(req.params.id);
|
|
2067
2074
|
if (!planId) {
|
|
2068
2075
|
res.status(400).json({ error: "Missing plan ID" });
|
|
2069
2076
|
return;
|
|
@@ -2153,8 +2160,8 @@ function createApp() {
|
|
|
2153
2160
|
app.get("/api/plans/:id/pr-diff/:prNumber", handleGetPRDiff);
|
|
2154
2161
|
app.get("/api/plans/:id/pr-files/:prNumber", handleGetPRFiles);
|
|
2155
2162
|
app.get("/artifacts/:planId/:filename", async (req, res) => {
|
|
2156
|
-
const planId = req.params.planId;
|
|
2157
|
-
const filename = req.params.filename;
|
|
2163
|
+
const planId = getParam(req.params.planId);
|
|
2164
|
+
const filename = getParam(req.params.filename);
|
|
2158
2165
|
if (!planId || !filename) {
|
|
2159
2166
|
res.status(400).json({ error: "Missing planId or filename" });
|
|
2160
2167
|
return;
|
|
@@ -2258,7 +2265,7 @@ async function isRegistryRunning() {
|
|
|
2258
2265
|
// src/webrtc-provider.ts
|
|
2259
2266
|
import wrtc from "@roamhq/wrtc";
|
|
2260
2267
|
import { WebrtcProvider } from "y-webrtc";
|
|
2261
|
-
var SIGNALING_SERVER = process.env.SIGNALING_URL || "
|
|
2268
|
+
var SIGNALING_SERVER = process.env.SIGNALING_URL || "ws://localhost:4444";
|
|
2262
2269
|
if (typeof globalThis.RTCPeerConnection === "undefined") {
|
|
2263
2270
|
globalThis.RTCPeerConnection = wrtc.RTCPeerConnection;
|
|
2264
2271
|
globalThis.RTCSessionDescription = wrtc.RTCSessionDescription;
|
|
@@ -2289,29 +2296,28 @@ async function createWebRtcProvider(ydoc, planId) {
|
|
|
2289
2296
|
}
|
|
2290
2297
|
}
|
|
2291
2298
|
});
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
}
|
|
2299
|
+
const username = await getGitHubUsername().catch(() => void 0);
|
|
2300
|
+
const fallbackId = `mcp-anon-${crypto.randomUUID().slice(0, 8)}`;
|
|
2301
|
+
const userId = username ? `mcp-${username}` : fallbackId;
|
|
2302
|
+
const displayName = username ? `Claude Code (${username})` : "Claude Code";
|
|
2303
|
+
const awarenessState = {
|
|
2304
|
+
user: {
|
|
2305
|
+
id: userId,
|
|
2306
|
+
name: displayName,
|
|
2307
|
+
color: "#0066cc"
|
|
2308
|
+
},
|
|
2309
|
+
platform: "claude-code",
|
|
2310
|
+
status: "approved",
|
|
2311
|
+
isOwner: true,
|
|
2312
|
+
webrtcPeerId: crypto.randomUUID(),
|
|
2313
|
+
context: getEnvironmentContext()
|
|
2314
|
+
};
|
|
2315
|
+
provider.awareness.setLocalStateField("planStatus", awarenessState);
|
|
2316
|
+
logger.info(
|
|
2317
|
+
{ planId, username: username ?? fallbackId, platform: "claude-code", hasContext: true },
|
|
2318
|
+
"MCP awareness state set"
|
|
2319
|
+
);
|
|
2320
|
+
sendApprovalStateToSignaling(provider, planId, username ?? fallbackId);
|
|
2315
2321
|
setupProviderListeners(provider, planId);
|
|
2316
2322
|
logger.info(
|
|
2317
2323
|
{
|
|
@@ -2459,7 +2465,12 @@ async function hasActiveConnections2(planId) {
|
|
|
2459
2465
|
}
|
|
2460
2466
|
|
|
2461
2467
|
// src/tools/execute-code.ts
|
|
2468
|
+
import * as child_process from "child_process";
|
|
2469
|
+
import * as fs from "fs";
|
|
2470
|
+
import * as os from "os";
|
|
2471
|
+
import * as path from "path";
|
|
2462
2472
|
import * as vm from "vm";
|
|
2473
|
+
import ffmpegInstaller from "@ffmpeg-installer/ffmpeg";
|
|
2463
2474
|
import { z as z12 } from "zod";
|
|
2464
2475
|
|
|
2465
2476
|
// src/tools/add-artifact.ts
|
|
@@ -5062,7 +5073,7 @@ async function setupReviewNotification(planId, pollIntervalSeconds) {
|
|
|
5062
5073
|
return { script, fullResponse: text };
|
|
5063
5074
|
}
|
|
5064
5075
|
async function requestUserInput(opts) {
|
|
5065
|
-
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-
|
|
5076
|
+
const { InputRequestManager: InputRequestManager2 } = await import("./input-request-manager-YMNFW4JM.js");
|
|
5066
5077
|
const ydoc = await getOrCreateDoc3(PLAN_INDEX_DOC_NAME);
|
|
5067
5078
|
const manager = new InputRequestManager2();
|
|
5068
5079
|
const params = opts.type === "choice" ? {
|
|
@@ -5106,8 +5117,8 @@ async function requestUserInput(opts) {
|
|
|
5106
5117
|
};
|
|
5107
5118
|
}
|
|
5108
5119
|
async function postActivityUpdate(opts) {
|
|
5109
|
-
const { logPlanEvent: logPlanEvent2 } = await import("./dist-
|
|
5110
|
-
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-
|
|
5120
|
+
const { logPlanEvent: logPlanEvent2 } = await import("./dist-FZ4WTJ2H.js");
|
|
5121
|
+
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-6PHKR2FY.js");
|
|
5111
5122
|
const { nanoid: nanoid7 } = await import("nanoid");
|
|
5112
5123
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
5113
5124
|
const actorName = await getGitHubUsername2();
|
|
@@ -5129,8 +5140,8 @@ async function postActivityUpdate(opts) {
|
|
|
5129
5140
|
return { success: true, eventId, requestId };
|
|
5130
5141
|
}
|
|
5131
5142
|
async function resolveActivityRequest(opts) {
|
|
5132
|
-
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-
|
|
5133
|
-
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-
|
|
5143
|
+
const { logPlanEvent: logPlanEvent2, getPlanEvents } = await import("./dist-FZ4WTJ2H.js");
|
|
5144
|
+
const { getGitHubUsername: getGitHubUsername2 } = await import("./server-identity-6PHKR2FY.js");
|
|
5134
5145
|
const doc = await getOrCreateDoc3(opts.planId);
|
|
5135
5146
|
const actorName = await getGitHubUsername2();
|
|
5136
5147
|
const events = getPlanEvents(doc);
|
|
@@ -5174,7 +5185,38 @@ var executeCodeTool = {
|
|
|
5174
5185
|
const { code } = ExecuteCodeInput.parse(args);
|
|
5175
5186
|
logger.info({ codeLength: code.length }, "Executing code");
|
|
5176
5187
|
try {
|
|
5188
|
+
async function encodeVideo(opts) {
|
|
5189
|
+
const fps = opts.fps || 6;
|
|
5190
|
+
const outputPath = opts.outputPath || path.join(os.tmpdir(), `video-${Date.now()}.mp4`);
|
|
5191
|
+
const { spawnSync } = child_process;
|
|
5192
|
+
const result2 = spawnSync(
|
|
5193
|
+
ffmpegInstaller.path,
|
|
5194
|
+
[
|
|
5195
|
+
"-y",
|
|
5196
|
+
"-framerate",
|
|
5197
|
+
String(fps),
|
|
5198
|
+
"-i",
|
|
5199
|
+
path.join(opts.framesDir, "frame-%06d.jpg"),
|
|
5200
|
+
"-vf",
|
|
5201
|
+
"scale=trunc(iw/2)*2:trunc(ih/2)*2",
|
|
5202
|
+
"-c:v",
|
|
5203
|
+
"libx264",
|
|
5204
|
+
"-pix_fmt",
|
|
5205
|
+
"yuv420p",
|
|
5206
|
+
"-preset",
|
|
5207
|
+
"fast",
|
|
5208
|
+
outputPath
|
|
5209
|
+
],
|
|
5210
|
+
{ encoding: "utf-8", timeout: 6e4 }
|
|
5211
|
+
);
|
|
5212
|
+
if (result2.status !== 0) {
|
|
5213
|
+
throw new Error(`FFmpeg encoding failed: ${result2.stderr?.slice(-300)}`);
|
|
5214
|
+
}
|
|
5215
|
+
fs.rmSync(opts.framesDir, { recursive: true, force: true });
|
|
5216
|
+
return outputPath;
|
|
5217
|
+
}
|
|
5177
5218
|
const sandbox = {
|
|
5219
|
+
// Shipyard API functions
|
|
5178
5220
|
createPlan,
|
|
5179
5221
|
readPlan,
|
|
5180
5222
|
updatePlan,
|
|
@@ -5187,6 +5229,15 @@ var executeCodeTool = {
|
|
|
5187
5229
|
requestUserInput,
|
|
5188
5230
|
postActivityUpdate,
|
|
5189
5231
|
resolveActivityRequest,
|
|
5232
|
+
// Video encoding helper (uses bundled FFmpeg)
|
|
5233
|
+
encodeVideo,
|
|
5234
|
+
// Node.js modules for advanced workflows (file ops, process spawning)
|
|
5235
|
+
child_process,
|
|
5236
|
+
fs,
|
|
5237
|
+
path,
|
|
5238
|
+
os,
|
|
5239
|
+
// FFmpeg bundled with server - no installation required
|
|
5240
|
+
ffmpegPath: ffmpegInstaller.path,
|
|
5190
5241
|
console: {
|
|
5191
5242
|
log: (...logArgs) => logger.info({ output: logArgs }, "console.log"),
|
|
5192
5243
|
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
|
};
|