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
package/dist/testing/cli-repl.js
CHANGED
|
@@ -19447,6 +19447,9 @@ function createTerminalPilotRuntime(options = {}) {
|
|
|
19447
19447
|
};
|
|
19448
19448
|
},
|
|
19449
19449
|
listSessions: listSessions2,
|
|
19450
|
+
async hasRetainedSessions() {
|
|
19451
|
+
return nameToId.size > 0 || pendingNames.size > 0;
|
|
19452
|
+
},
|
|
19450
19453
|
async close() {
|
|
19451
19454
|
if (pilotPromise === void 0) {
|
|
19452
19455
|
return;
|
|
@@ -22969,8 +22972,7 @@ async function runTerminalPilotDaemon() {
|
|
|
22969
22972
|
clearTimeout(idleTimer);
|
|
22970
22973
|
idleTimer = void 0;
|
|
22971
22974
|
}
|
|
22972
|
-
|
|
22973
|
-
if (sessions.length > 0) {
|
|
22975
|
+
if (await runtime.hasRetainedSessions()) {
|
|
22974
22976
|
return;
|
|
22975
22977
|
}
|
|
22976
22978
|
idleTimer = setTimeout(() => {
|
|
@@ -23056,6 +23058,9 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
23056
23058
|
session: proxySession(entry.name, entry.session)
|
|
23057
23059
|
}));
|
|
23058
23060
|
},
|
|
23061
|
+
async hasRetainedSessions() {
|
|
23062
|
+
return request("hasRetainedSessions");
|
|
23063
|
+
},
|
|
23059
23064
|
async close() {
|
|
23060
23065
|
await request("shutdown").catch(() => void 0);
|
|
23061
23066
|
}
|
|
@@ -23107,6 +23112,9 @@ async function handleRequest(runtime, request) {
|
|
|
23107
23112
|
const sessions = await runtime.listSessions();
|
|
23108
23113
|
return sessions.map(formatNamedSession);
|
|
23109
23114
|
}
|
|
23115
|
+
if (request.method === "hasRetainedSessions") {
|
|
23116
|
+
return runtime.hasRetainedSessions();
|
|
23117
|
+
}
|
|
23110
23118
|
if (request.method === "closeSession") {
|
|
23111
23119
|
return runtime.closeSession(optionalString2(params17.name), envFromValue(params17.envSession));
|
|
23112
23120
|
}
|
|
@@ -23299,6 +23307,9 @@ function sleep2(ms) {
|
|
|
23299
23307
|
|
|
23300
23308
|
// src/cli.ts
|
|
23301
23309
|
configureTheme({ brand: "green", label: "Terminal Pilot" });
|
|
23310
|
+
function getBundledPackageVersion() {
|
|
23311
|
+
return true ? "0.0.39" : void 0;
|
|
23312
|
+
}
|
|
23302
23313
|
function normalizeArgv(argv) {
|
|
23303
23314
|
if (argv.includes("--json") && !argv.some((argument) => argument === "--output" || argument.startsWith("--output="))) {
|
|
23304
23315
|
return argv.flatMap((argument) => argument === "--json" ? ["--output", "json"] : [argument]);
|
|
@@ -23313,6 +23324,7 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23313
23324
|
const originalArgv = process.argv;
|
|
23314
23325
|
process.argv = normalizeArgv(argv);
|
|
23315
23326
|
try {
|
|
23327
|
+
const packageVersion = options.packageVersion ?? getBundledPackageVersion();
|
|
23316
23328
|
await runCLI(createTerminalPilotGroup(), {
|
|
23317
23329
|
services: {
|
|
23318
23330
|
terminalPilotRuntime: options.terminalPilotRuntime ?? createDaemonTerminalPilotRuntime()
|
|
@@ -23322,7 +23334,8 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23322
23334
|
output: true,
|
|
23323
23335
|
verbose: true,
|
|
23324
23336
|
yes: true
|
|
23325
|
-
}
|
|
23337
|
+
},
|
|
23338
|
+
...packageVersion === void 0 ? {} : { version: packageVersion }
|
|
23326
23339
|
});
|
|
23327
23340
|
} finally {
|
|
23328
23341
|
process.argv = originalArgv;
|