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/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -19444,6 +19444,9 @@ function createTerminalPilotRuntime(options = {}) {
|
|
|
19444
19444
|
};
|
|
19445
19445
|
},
|
|
19446
19446
|
listSessions: listSessions2,
|
|
19447
|
+
async hasRetainedSessions() {
|
|
19448
|
+
return nameToId.size > 0 || pendingNames.size > 0;
|
|
19449
|
+
},
|
|
19447
19450
|
async close() {
|
|
19448
19451
|
if (pilotPromise === void 0) {
|
|
19449
19452
|
return;
|
|
@@ -22966,8 +22969,7 @@ async function runTerminalPilotDaemon() {
|
|
|
22966
22969
|
clearTimeout(idleTimer);
|
|
22967
22970
|
idleTimer = void 0;
|
|
22968
22971
|
}
|
|
22969
|
-
|
|
22970
|
-
if (sessions.length > 0) {
|
|
22972
|
+
if (await runtime.hasRetainedSessions()) {
|
|
22971
22973
|
return;
|
|
22972
22974
|
}
|
|
22973
22975
|
idleTimer = setTimeout(() => {
|
|
@@ -23053,6 +23055,9 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
23053
23055
|
session: proxySession(entry.name, entry.session)
|
|
23054
23056
|
}));
|
|
23055
23057
|
},
|
|
23058
|
+
async hasRetainedSessions() {
|
|
23059
|
+
return request("hasRetainedSessions");
|
|
23060
|
+
},
|
|
23056
23061
|
async close() {
|
|
23057
23062
|
await request("shutdown").catch(() => void 0);
|
|
23058
23063
|
}
|
|
@@ -23104,6 +23109,9 @@ async function handleRequest(runtime, request) {
|
|
|
23104
23109
|
const sessions = await runtime.listSessions();
|
|
23105
23110
|
return sessions.map(formatNamedSession);
|
|
23106
23111
|
}
|
|
23112
|
+
if (request.method === "hasRetainedSessions") {
|
|
23113
|
+
return runtime.hasRetainedSessions();
|
|
23114
|
+
}
|
|
23107
23115
|
if (request.method === "closeSession") {
|
|
23108
23116
|
return runtime.closeSession(optionalString2(params17.name), envFromValue(params17.envSession));
|
|
23109
23117
|
}
|
|
@@ -23296,6 +23304,9 @@ function sleep2(ms) {
|
|
|
23296
23304
|
|
|
23297
23305
|
// src/cli.ts
|
|
23298
23306
|
configureTheme({ brand: "green", label: "Terminal Pilot" });
|
|
23307
|
+
function getBundledPackageVersion() {
|
|
23308
|
+
return true ? "0.0.39" : void 0;
|
|
23309
|
+
}
|
|
23299
23310
|
function normalizeArgv(argv) {
|
|
23300
23311
|
if (argv.includes("--json") && !argv.some((argument) => argument === "--output" || argument.startsWith("--output="))) {
|
|
23301
23312
|
return argv.flatMap((argument) => argument === "--json" ? ["--output", "json"] : [argument]);
|
|
@@ -23310,6 +23321,7 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23310
23321
|
const originalArgv = process.argv;
|
|
23311
23322
|
process.argv = normalizeArgv(argv);
|
|
23312
23323
|
try {
|
|
23324
|
+
const packageVersion = options.packageVersion ?? getBundledPackageVersion();
|
|
23313
23325
|
await runCLI(createTerminalPilotGroup(), {
|
|
23314
23326
|
services: {
|
|
23315
23327
|
terminalPilotRuntime: options.terminalPilotRuntime ?? createDaemonTerminalPilotRuntime()
|
|
@@ -23319,7 +23331,8 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23319
23331
|
output: true,
|
|
23320
23332
|
verbose: true,
|
|
23321
23333
|
yes: true
|
|
23322
|
-
}
|
|
23334
|
+
},
|
|
23335
|
+
...packageVersion === void 0 ? {} : { version: packageVersion }
|
|
23323
23336
|
});
|
|
23324
23337
|
} finally {
|
|
23325
23338
|
process.argv = originalArgv;
|