terminal-pilot 0.0.38 → 0.0.40
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 +20 -4
- 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 +14 -3
- 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 +20 -4
- package/dist/testing/cli-repl.js.map +2 -2
- package/dist/testing/qa-cli.js +20 -4
- package/dist/testing/qa-cli.js.map +2 -2
- package/package.json +1 -1
package/dist/testing/qa-cli.js
CHANGED
|
@@ -19454,6 +19454,9 @@ function createTerminalPilotRuntime(options = {}) {
|
|
|
19454
19454
|
};
|
|
19455
19455
|
},
|
|
19456
19456
|
listSessions: listSessions2,
|
|
19457
|
+
async hasRetainedSessions() {
|
|
19458
|
+
return nameToId.size > 0 || pendingNames.size > 0;
|
|
19459
|
+
},
|
|
19457
19460
|
async close() {
|
|
19458
19461
|
if (pilotPromise === void 0) {
|
|
19459
19462
|
return;
|
|
@@ -22976,8 +22979,7 @@ async function runTerminalPilotDaemon() {
|
|
|
22976
22979
|
clearTimeout(idleTimer);
|
|
22977
22980
|
idleTimer = void 0;
|
|
22978
22981
|
}
|
|
22979
|
-
|
|
22980
|
-
if (sessions.length > 0) {
|
|
22982
|
+
if (await runtime.hasRetainedSessions()) {
|
|
22981
22983
|
return;
|
|
22982
22984
|
}
|
|
22983
22985
|
idleTimer = setTimeout(() => {
|
|
@@ -23038,7 +23040,10 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
23038
23040
|
return {
|
|
23039
23041
|
async createSession(params17, env) {
|
|
23040
23042
|
const result = await request("createSession", {
|
|
23041
|
-
params:
|
|
23043
|
+
params: {
|
|
23044
|
+
...params17,
|
|
23045
|
+
cwd: params17.cwd ?? process.cwd()
|
|
23046
|
+
},
|
|
23042
23047
|
envSession: env?.get(SESSION_ENV_VAR)
|
|
23043
23048
|
});
|
|
23044
23049
|
return { name: result.name, session: proxySession(result.name, result.session) };
|
|
@@ -23063,6 +23068,9 @@ function createDaemonTerminalPilotRuntime() {
|
|
|
23063
23068
|
session: proxySession(entry.name, entry.session)
|
|
23064
23069
|
}));
|
|
23065
23070
|
},
|
|
23071
|
+
async hasRetainedSessions() {
|
|
23072
|
+
return request("hasRetainedSessions");
|
|
23073
|
+
},
|
|
23066
23074
|
async close() {
|
|
23067
23075
|
await request("shutdown").catch(() => void 0);
|
|
23068
23076
|
}
|
|
@@ -23114,6 +23122,9 @@ async function handleRequest(runtime, request) {
|
|
|
23114
23122
|
const sessions = await runtime.listSessions();
|
|
23115
23123
|
return sessions.map(formatNamedSession);
|
|
23116
23124
|
}
|
|
23125
|
+
if (request.method === "hasRetainedSessions") {
|
|
23126
|
+
return runtime.hasRetainedSessions();
|
|
23127
|
+
}
|
|
23117
23128
|
if (request.method === "closeSession") {
|
|
23118
23129
|
return runtime.closeSession(optionalString2(params17.name), envFromValue(params17.envSession));
|
|
23119
23130
|
}
|
|
@@ -23306,6 +23317,9 @@ function sleep2(ms) {
|
|
|
23306
23317
|
|
|
23307
23318
|
// src/cli.ts
|
|
23308
23319
|
configureTheme({ brand: "green", label: "Terminal Pilot" });
|
|
23320
|
+
function getBundledPackageVersion() {
|
|
23321
|
+
return true ? "0.0.40" : void 0;
|
|
23322
|
+
}
|
|
23309
23323
|
function normalizeArgv(argv) {
|
|
23310
23324
|
if (argv.includes("--json") && !argv.some((argument) => argument === "--output" || argument.startsWith("--output="))) {
|
|
23311
23325
|
return argv.flatMap((argument) => argument === "--json" ? ["--output", "json"] : [argument]);
|
|
@@ -23320,6 +23334,7 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23320
23334
|
const originalArgv = process.argv;
|
|
23321
23335
|
process.argv = normalizeArgv(argv);
|
|
23322
23336
|
try {
|
|
23337
|
+
const packageVersion = options.packageVersion ?? getBundledPackageVersion();
|
|
23323
23338
|
await runCLI(createTerminalPilotGroup(), {
|
|
23324
23339
|
services: {
|
|
23325
23340
|
terminalPilotRuntime: options.terminalPilotRuntime ?? createDaemonTerminalPilotRuntime()
|
|
@@ -23329,7 +23344,8 @@ async function main(argv = process.argv, options = {}) {
|
|
|
23329
23344
|
output: true,
|
|
23330
23345
|
verbose: true,
|
|
23331
23346
|
yes: true
|
|
23332
|
-
}
|
|
23347
|
+
},
|
|
23348
|
+
...packageVersion === void 0 ? {} : { version: packageVersion }
|
|
23333
23349
|
});
|
|
23334
23350
|
} finally {
|
|
23335
23351
|
process.argv = originalArgv;
|