@volter/supercode-teams 0.2.132 → 0.2.133
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 +10 -0
- package/package.json +1 -1
package/machine.mjs
CHANGED
|
@@ -129,6 +129,15 @@ function deadPaneExit(session) {
|
|
|
129
129
|
/** How often a pane whose launcher asked to be told of its end is looked for. */
|
|
130
130
|
const LAUNCH_END_POLL_MS = 5000;
|
|
131
131
|
|
|
132
|
+
function paneExitOutput(pane) {
|
|
133
|
+
if (!/^p_[A-Za-z0-9_-]+$/.test(pane ?? '')) return null;
|
|
134
|
+
for (const root of [process.env.SUPERCODE_HOME, join(homedir(), '.config', 'supercode')].filter(Boolean)) {
|
|
135
|
+
try { const bytes=readFileSync(join(root,'pane-exits',`${pane}.screen`));return {screen:bytes.subarray(-32768).toString('utf8'),stream:'pty_stdout_stderr',truncated:bytes.length>=32768}; }
|
|
136
|
+
catch { /* Older launches did not retain their output. */ }
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
132
141
|
function paneExit(pane) {
|
|
133
142
|
const logs = [process.env.SUPERCODE_HOME, join(homedir(), '.config', 'supercode')].filter(Boolean).map((dir) => join(dir, 'pane-exits.log'));
|
|
134
143
|
for (const log of logs) {
|
|
@@ -1409,6 +1418,7 @@ export class TeamsMachine extends MachineCore {
|
|
|
1409
1418
|
if (!found) return null;
|
|
1410
1419
|
const session = await this.#paneByContext(found.pane);
|
|
1411
1420
|
return {
|
|
1421
|
+
exit_output: !session || session.dead ? paneExitOutput(found.pane) : null,
|
|
1412
1422
|
exit: session?.dead ? deadPaneExit(session) : !session ? paneExit(found.pane) : null,
|
|
1413
1423
|
key: found.key, pane: found.pane, live: Boolean(session && !session.dead), label: session?.label ?? null, activeCommand: session?.activeCommand ?? null,
|
|
1414
1424
|
...initialInputFacts(found),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-teams",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.133",
|
|
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",
|