@volter/supercode-teams 0.2.104 → 0.2.105

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/machine.mjs +5 -1
  2. package/package.json +1 -1
package/machine.mjs CHANGED
@@ -596,7 +596,11 @@ export class TeamsMachine extends MachineCore {
596
596
  let out = '';
597
597
  let child;
598
598
  try {
599
- child = spawn(this.supercodeBin, ['teams', 'caller', '--peer-fd', '3'], { stdio: ['ignore', 'pipe', 'ignore', entry.socket], env: this.env, windowsHide: true });
599
+ // The descriptor's number, not the socket: a stream handed to spawn stops being read here, and the
600
+ // connection's next request would never be answered. The child gets its own duplicate of the descriptor.
601
+ const fd = entry.socket._handle?.fd;
602
+ if (!Number.isInteger(fd) || fd < 0) { resolve({ unsupported: true }); return; }
603
+ child = spawn(this.supercodeBin, ['teams', 'caller', '--peer-fd', '3'], { stdio: ['ignore', 'pipe', 'ignore', fd], env: this.env, windowsHide: true });
600
604
  } catch { resolve({ unknown: true }); return; }
601
605
  child.stdout.on('data', (chunk) => { out += chunk; });
602
606
  child.on('error', () => resolve({ unknown: true }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-teams",
3
- "version": "0.2.104",
3
+ "version": "0.2.105",
4
4
  "type": "module",
5
5
  "description": "A machine daemon serving this machine's doors, and a local or remote Teams server for shared session discovery, OpenTelemetry ingestion and access to enrolled machines.",
6
6
  "license": "MIT",