terminal-pilot 0.0.38 → 0.0.39
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/dist/cli.d.ts +1 -0
- package/dist/cli.js +16 -3
- package/dist/cli.js.map +2 -2
- package/dist/commands/close-session.js +3 -0
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +3 -0
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/daemon-runtime.js +10 -2
- package/dist/commands/daemon-runtime.js.map +2 -2
- package/dist/commands/fill.js +3 -0
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +3 -0
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.js +3 -0
- package/dist/commands/index.js.map +2 -2
- package/dist/commands/list-sessions.js +3 -0
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +3 -0
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +3 -0
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +3 -0
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +3 -0
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.d.ts +1 -0
- package/dist/commands/runtime.js +3 -0
- package/dist/commands/runtime.js.map +2 -2
- package/dist/commands/screenshot.js +3 -0
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +3 -0
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +3 -0
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/wait-for-exit.js +3 -0
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.js +3 -0
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/testing/cli-repl.js +16 -3
- package/dist/testing/cli-repl.js.map +2 -2
- package/dist/testing/qa-cli.js +16 -3
- package/dist/testing/qa-cli.js.map +2 -2
- package/package.json +1 -1
|
@@ -1541,6 +1541,9 @@ function createTerminalPilotRuntime(options = {}) {
|
|
|
1541
1541
|
};
|
|
1542
1542
|
},
|
|
1543
1543
|
listSessions,
|
|
1544
|
+
async hasRetainedSessions() {
|
|
1545
|
+
return nameToId.size > 0 || pendingNames.size > 0;
|
|
1546
|
+
},
|
|
1544
1547
|
async close() {
|
|
1545
1548
|
if (pilotPromise === void 0) {
|
|
1546
1549
|
return;
|
|
@@ -1609,8 +1612,7 @@ async function runTerminalPilotDaemon() {
|
|
|
1609
1612
|
clearTimeout(idleTimer);
|
|
1610
1613
|
idleTimer = void 0;
|
|
1611
1614
|
}
|
|
1612
|
-
|
|
1613
|
-
if (sessions.length > 0) {
|
|
1615
|
+
if (await runtime.hasRetainedSessions()) {
|
|
1614
1616
|
return;
|
|
1615
1617
|
}
|
|
1616
1618
|
idleTimer = setTimeout(() => {
|
|
@@ -1696,6 +1698,9 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
1696
1698
|
session: proxySession(entry.name, entry.session)
|
|
1697
1699
|
}));
|
|
1698
1700
|
},
|
|
1701
|
+
async hasRetainedSessions() {
|
|
1702
|
+
return request("hasRetainedSessions");
|
|
1703
|
+
},
|
|
1699
1704
|
async close() {
|
|
1700
1705
|
await request("shutdown").catch(() => void 0);
|
|
1701
1706
|
}
|
|
@@ -1747,6 +1752,9 @@ async function handleRequest(runtime, request) {
|
|
|
1747
1752
|
const sessions = await runtime.listSessions();
|
|
1748
1753
|
return sessions.map(formatNamedSession);
|
|
1749
1754
|
}
|
|
1755
|
+
if (request.method === "hasRetainedSessions") {
|
|
1756
|
+
return runtime.hasRetainedSessions();
|
|
1757
|
+
}
|
|
1750
1758
|
if (request.method === "closeSession") {
|
|
1751
1759
|
return runtime.closeSession(optionalString(params.name), envFromValue(params.envSession));
|
|
1752
1760
|
}
|