@cordfuse/crosstalk 5.0.0-alpha.2 → 5.0.0-alpha.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.
package/bin/crosstalk.js CHANGED
@@ -103,7 +103,22 @@ if (!STANDALONE_SUBCOMMANDS.has(subcommand)) {
103
103
  // Strip a single leading `--` separator if present (legacy npm run X -- ergonomics).
104
104
  const cleanedArgs = forwardArgs[0] === '--' ? forwardArgs.slice(1) : forwardArgs;
105
105
 
106
- const result = spawnSync('npx', ['tsx', toolPath, ...cleanedArgs], {
106
+ // Resolve tsx directly from the runtime's own bundled node_modules. Going
107
+ // through `npx tsx` was fragile in containers where the entrypoint changes
108
+ // npm's global prefix (the bin shim would lstat the new prefix's lib/
109
+ // directory and fail with ENOENT if tsx wasn't installed there too). Direct
110
+ // invocation of the bundled tsx binary sidesteps the entire npm resolution
111
+ // dance.
112
+ const tsxBin = join(runtimeRoot, 'node_modules', '.bin', 'tsx');
113
+ if (!existsSync(tsxBin)) {
114
+ process.stderr.write(
115
+ `crosstalk: bundled tsx not found at ${tsxBin}.\n` +
116
+ `The @cordfuse/crosstalk installation may be corrupted; try reinstalling.\n`,
117
+ );
118
+ process.exit(2);
119
+ }
120
+
121
+ const result = spawnSync(tsxBin, [toolPath, ...cleanedArgs], {
107
122
  cwd: workingDir,
108
123
  stdio: 'inherit',
109
124
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cordfuse/crosstalk",
3
- "version": "5.0.0-alpha.2",
3
+ "version": "5.0.0-alpha.3",
4
4
  "description": "Crosstalk runtime — async messaging between agents over git. The crosstalk CLI plus dispatch, send, attach, chat, and supporting tools.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/dispatch.ts CHANGED
@@ -80,7 +80,7 @@ function writeHeartbeat(): void {
80
80
  try {
81
81
  const dir = join(transportRoot, '.turnq');
82
82
  mkdirSync(dir, { recursive: true });
83
- const data = { ts: new Date().toISOString(), pid: process.pid, version: '5.0.0-alpha.1' };
83
+ const data = { ts: new Date().toISOString(), pid: process.pid, version: '5.0.0-alpha.3' };
84
84
  writeFileSync(join(dir, 'heartbeat'), JSON.stringify(data) + '\n');
85
85
  } catch { /* best-effort */ }
86
86
  }
@@ -467,7 +467,7 @@ async function waitForWakeOrTimeout(ms: number): Promise<'wake' | 'timeout'> {
467
467
  async function main(): Promise<void> {
468
468
  log('dispatch_start', {
469
469
  transport: transportRoot,
470
- version: '5.0.0-alpha.1',
470
+ version: '5.0.0-alpha.3',
471
471
  log_file: logFile ?? null,
472
472
  });
473
473
  if (onceMode) {