@volter/supercode-teams 0.2.102 → 0.2.103
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/fleet.mjs +4 -7
- package/bin/teams.mjs +7 -10
- package/package.json +1 -1
package/bin/fleet.mjs
CHANGED
|
@@ -46,16 +46,13 @@ function channelForOn() {
|
|
|
46
46
|
return openOn(onName(), { context: contextName() });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// Who starts a pane
|
|
50
|
-
//
|
|
49
|
+
// Who starts a pane, as supercode answers it (`teams caller`); a launch nothing answers for records no starter, so no
|
|
50
|
+
// session may act on the pane.
|
|
51
51
|
let launcherAnswer;
|
|
52
52
|
function launcher() {
|
|
53
53
|
if (launcherAnswer === undefined) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const r = spawnSync(process.env.SUPERCODE_BIN || 'supercode', ['teams', 'caller'], { encoding: 'utf8', shell: process.platform === 'win32', windowsHide: true });
|
|
57
|
-
try { launcherAnswer = JSON.parse(r.stdout.trim().split('\n').pop()).caller ?? null; } catch { launcherAnswer = null; }
|
|
58
|
-
}
|
|
54
|
+
const r = spawnSync(process.env.SUPERCODE_BIN || 'supercode', ['teams', 'caller'], { encoding: 'utf8', shell: process.platform === 'win32', windowsHide: true });
|
|
55
|
+
try { launcherAnswer = JSON.parse(r.stdout.trim().split('\n').pop()).caller ?? null; } catch { launcherAnswer = null; }
|
|
59
56
|
}
|
|
60
57
|
return launcherAnswer;
|
|
61
58
|
}
|
package/bin/teams.mjs
CHANGED
|
@@ -108,19 +108,16 @@ async function machineChannel() {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// The session (or board) this command acts for: the pane doors refuse a session acting on a pane it did not start.
|
|
111
|
-
// supercode
|
|
112
|
-
//
|
|
111
|
+
// supercode answers it (`teams caller`: the session in this process's ancestry first, a named caller only as supercode
|
|
112
|
+
// itself takes one), so this bin holds the same rule as \`supercode teams\`; a command nothing answers for is refused.
|
|
113
113
|
let callerAnswer;
|
|
114
114
|
function caller() {
|
|
115
115
|
if (callerAnswer === undefined) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (!answer || !('caller' in answer)) die(`cannot tell which session runs this, so the pane doors cannot hold it to the panes it started; nothing was done. Run it as \`supercode teams …\` (${(r.error?.message ?? r.stderr ?? '').trim().slice(0, 200)})`, 1);
|
|
122
|
-
callerAnswer = answer.caller ?? null;
|
|
123
|
-
}
|
|
116
|
+
const r = spawnSync(process.env.SUPERCODE_BIN || 'supercode', ['teams', 'caller'], { encoding: 'utf8', shell: process.platform === 'win32', windowsHide: true });
|
|
117
|
+
let answer;
|
|
118
|
+
try { answer = JSON.parse(r.stdout.trim().split('\n').pop()); } catch { /* no answer */ }
|
|
119
|
+
if (!answer || !('caller' in answer)) die(`cannot tell which session runs this, so the pane doors cannot hold it to the panes it started; nothing was done (${(r.error?.message ?? r.stderr ?? '').trim().slice(0, 200)})`, 1);
|
|
120
|
+
callerAnswer = answer.caller ?? null;
|
|
124
121
|
}
|
|
125
122
|
return callerAnswer ?? undefined;
|
|
126
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.103",
|
|
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",
|