@tablation/crew 0.149.2 → 0.149.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +17 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -5303,6 +5303,13 @@ import { createHash as createHash3 } from "crypto";
5303
5303
  function isCompiledBinary(moduleUrl) {
5304
5304
  return moduleUrl.includes("$bunfs");
5305
5305
  }
5306
+ function selfLaunch(env = currentLaunchEnv()) {
5307
+ if (env.compiled) return { command: env.execPath, args: [] };
5308
+ return { command: env.execPath, args: [...env.execArgv, env.argv1 ?? "crew"] };
5309
+ }
5310
+ function currentLaunchEnv() {
5311
+ return { compiled: isCompiledBinary(import.meta.url), execPath: process.execPath, execArgv: process.execArgv, argv1: process.argv[1] };
5312
+ }
5306
5313
 
5307
5314
  // src/install.ts
5308
5315
  function crewInvocation(crewHome) {
@@ -13530,6 +13537,7 @@ function codeBridgeFor(o, harness) {
13530
13537
  }
13531
13538
  if (!wantsCodeBridge(intel)) return void 0;
13532
13539
  const sandbox = o.ship.runner === "sandbox";
13540
+ const self = selfLaunch();
13533
13541
  const args = sandbox ? [
13534
13542
  SANDBOX_BRIDGE_PATH,
13535
13543
  "--attach-file",
@@ -13543,8 +13551,8 @@ function codeBridgeFor(o, harness) {
13543
13551
  "--ticket",
13544
13552
  number,
13545
13553
  ...seed ? ["--seed-cache", seed] : []
13546
- ] : [...process.execArgv, process.argv[1] ?? "crew", "intel", "bridge", o.route.route, number, "--state-dir", o.stateDir];
13547
- const bridge = { command: sandbox ? "node" : process.execPath, args };
13554
+ ] : [...self.args, "intel", "bridge", o.route.route, number, "--state-dir", o.stateDir];
13555
+ const bridge = { command: sandbox ? "node" : self.command, args };
13548
13556
  if (harness === "gemini") {
13549
13557
  const text2 = `${JSON.stringify({ mcpServers: { [INTEL_SERVER_NAME]: { command: bridge.command, args } } }, null, 2)}
13550
13558
  `;
@@ -26794,7 +26802,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
26794
26802
  import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
26795
26803
  import { join as join58 } from "path";
26796
26804
  function builtVersion() {
26797
- return true ? "0.149.2" : null;
26805
+ return true ? "0.149.3" : null;
26798
26806
  }
26799
26807
  var REBUILD_HINT = "rebuild with npm run build";
26800
26808
  function newestMtime(path) {
@@ -27138,7 +27146,8 @@ function syncPassengerSyncDaemons(plans, cfg, stateDir, deps = {}) {
27138
27146
  }
27139
27147
  const secret = existing && existing.mountsHash === plan.mountsHash ? existing.secret : generateSyncSecret();
27140
27148
  const targets = passengerCheckoutSyncSpecs(cfg, plan.workspaceId);
27141
- const child = spawnFn(process.execPath, [process.argv[1] ?? "", "passenger-sync-daemon"], {
27149
+ const self = selfLaunch();
27150
+ const child = spawnFn(self.command, [...self.args, "passenger-sync-daemon"], {
27142
27151
  ...process.env,
27143
27152
  PASSENGER_SYNC_PORT: String(port),
27144
27153
  PASSENGER_SYNC_SECRET: secret,
@@ -27820,7 +27829,8 @@ async function handlePeriscopes(h, q2) {
27820
27829
  }
27821
27830
  function runCrew(args, onLine, timeoutMs = 20 * 6e4) {
27822
27831
  return new Promise((resolve8) => {
27823
- const child = spawn11(process.execPath, [process.argv[1] ?? "", ...args], { stdio: ["ignore", "pipe", "pipe"] });
27832
+ const self = selfLaunch();
27833
+ const child = spawn11(self.command, [...self.args, ...args], { stdio: ["ignore", "pipe", "pipe"] });
27824
27834
  let stdout = "";
27825
27835
  let stderr = "";
27826
27836
  let pending = "";
@@ -28333,7 +28343,8 @@ function schedulerHandler(control, run4 = runDetached) {
28333
28343
  }
28334
28344
  function crewJson(args, timeoutMs = 6e4) {
28335
28345
  return new Promise((resolve8) => {
28336
- execFile6(process.execPath, [process.argv[1] ?? "", ...args], { timeout: timeoutMs, maxBuffer: 16 * 1024 * 1024 }, (_e, stdout) => {
28346
+ const self = selfLaunch();
28347
+ execFile6(self.command, [...self.args, ...args], { timeout: timeoutMs, maxBuffer: 16 * 1024 * 1024 }, (_e, stdout) => {
28337
28348
  try {
28338
28349
  const v = JSON.parse(String(stdout));
28339
28350
  resolve8(v && typeof v === "object" && !Array.isArray(v) ? v : null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.149.2",
3
+ "version": "0.149.3",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",