@volter/supercode-teams 0.2.147 → 0.2.148
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/machine.mjs +12 -1
- package/package.json +1 -1
package/machine.mjs
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
// It decides nothing on anyone's behalf. Every act is logged.
|
|
27
27
|
import { spawn, spawnSync } from 'node:child_process';
|
|
28
28
|
import { EventEmitter } from 'node:events';
|
|
29
|
-
import { appendFileSync, readFileSync, writeFileSync, writeSync, statSync, readdirSync, mkdirSync, renameSync, rmSync, existsSync, openSync, readSync, closeSync } from 'node:fs';
|
|
29
|
+
import { appendFileSync, readFileSync, writeFileSync, writeSync, statSync, readdirSync, mkdirSync, renameSync, rmSync, existsSync, openSync, readSync, closeSync, accessSync, constants } from 'node:fs';
|
|
30
30
|
import { join, resolve, dirname } from 'node:path';
|
|
31
31
|
import { fileURLToPath } from 'node:url';
|
|
32
32
|
import { homedir, hostname } from 'node:os';
|
|
@@ -619,6 +619,9 @@ export class TeamsMachine extends MachineCore {
|
|
|
619
619
|
*/
|
|
620
620
|
#paneEnv(contextKey, requested) {
|
|
621
621
|
const env = { ...(requested ?? {}) };
|
|
622
|
+
// A long-lived tmux server can predate a consolidated installation.
|
|
623
|
+
// New panes inherit this daemon's selected tools, not that stale PATH.
|
|
624
|
+
env.PATH ??= this.env.PATH;
|
|
622
625
|
const inherited = env.NODE_OPTIONS ?? this.env.NODE_OPTIONS ?? '';
|
|
623
626
|
// Quoted: NODE_OPTIONS splits on spaces, and a home path may hold one (Windows user folders often do).
|
|
624
627
|
env.NODE_OPTIONS = `${inherited} --require ${JSON.stringify(PORTHOLE_HOOK)}`.trim();
|
|
@@ -1409,6 +1412,14 @@ export class TeamsMachine extends MachineCore {
|
|
|
1409
1412
|
let session;
|
|
1410
1413
|
let nativeInput;
|
|
1411
1414
|
try {
|
|
1415
|
+
if (process.platform !== 'win32' && !String(params.program).includes('/')) {
|
|
1416
|
+
const search = params.env?.PATH ?? this.env.PATH ?? '';
|
|
1417
|
+
const program = search.split(':').map(dir => resolve(dir || params.cwd || process.cwd(), params.program)).find(path => {
|
|
1418
|
+
try { accessSync(path, constants.X_OK); return statSync(path).isFile(); } catch { return false; }
|
|
1419
|
+
});
|
|
1420
|
+
if (!program) throw new Error(`program ${params.program} is absent from this machine's launch PATH`);
|
|
1421
|
+
params = { ...params, program };
|
|
1422
|
+
}
|
|
1412
1423
|
if (params.kind === 'codex') params = { ...params, arguments: canonicalCodexFolderTrust(params.cwd, params.arguments) };
|
|
1413
1424
|
session = await this.host.createSession({
|
|
1414
1425
|
command: this.#nativeQuestionCommand(params, contextKey, by, (value) => { nativeInput = value; }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.148",
|
|
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",
|