terminal-pilot 0.0.8 → 0.0.10
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.js +38 -15
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +18 -2
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +18 -2
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/fill.js +18 -2
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +18 -2
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.js +18 -2
- package/dist/commands/index.js.map +2 -2
- package/dist/commands/list-sessions.js +18 -2
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +18 -2
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +18 -2
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +18 -2
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +18 -2
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.js +18 -2
- package/dist/commands/runtime.js.map +2 -2
- package/dist/commands/screenshot.js +18 -2
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +18 -2
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +18 -2
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/wait-for-exit.js +18 -2
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.js +18 -2
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/index.js +18 -2
- package/dist/index.js.map +2 -2
- package/dist/terminal-pilot.js +18 -2
- package/dist/terminal-pilot.js.map +2 -2
- package/dist/terminal-session.js +18 -2
- package/dist/terminal-session.js.map +2 -2
- package/dist/testing/cli-repl.js +38 -15
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +38 -15
- package/dist/testing/qa-cli.js.map +4 -4
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -641,12 +641,19 @@ function renderTable(options) {
|
|
|
641
641
|
import chalk7 from "chalk";
|
|
642
642
|
var AGENT_PREFIX = `${chalk7.green.bold("\u2713")} agent: `;
|
|
643
643
|
|
|
644
|
+
// ../design-system/src/dashboard/buffer.ts
|
|
645
|
+
import chalk8 from "chalk";
|
|
646
|
+
|
|
647
|
+
// ../design-system/src/dashboard/terminal.ts
|
|
648
|
+
import readline from "node:readline";
|
|
649
|
+
import { PassThrough } from "node:stream";
|
|
650
|
+
|
|
644
651
|
// ../design-system/src/prompts/index.ts
|
|
645
|
-
import
|
|
652
|
+
import chalk15 from "chalk";
|
|
646
653
|
import * as clack from "@clack/prompts";
|
|
647
654
|
|
|
648
655
|
// ../design-system/src/prompts/primitives/cancel.ts
|
|
649
|
-
import
|
|
656
|
+
import chalk9 from "chalk";
|
|
650
657
|
|
|
651
658
|
// ../../node_modules/@clack/core/dist/index.mjs
|
|
652
659
|
var import_sisteransi = __toESM(require_src(), 1);
|
|
@@ -676,16 +683,16 @@ function cancel(msg = "") {
|
|
|
676
683
|
if (resolveOutputFormat() !== "terminal") {
|
|
677
684
|
return;
|
|
678
685
|
}
|
|
679
|
-
process.stdout.write(`${
|
|
686
|
+
process.stdout.write(`${chalk9.gray("\u2514")} ${chalk9.red(msg)}
|
|
680
687
|
|
|
681
688
|
`);
|
|
682
689
|
}
|
|
683
690
|
|
|
684
691
|
// ../design-system/src/prompts/primitives/intro.ts
|
|
685
|
-
import
|
|
692
|
+
import chalk10 from "chalk";
|
|
686
693
|
|
|
687
694
|
// ../design-system/src/prompts/primitives/note.ts
|
|
688
|
-
import
|
|
695
|
+
import chalk11 from "chalk";
|
|
689
696
|
function getVisibleWidth(value) {
|
|
690
697
|
return stripAnsi(value).length;
|
|
691
698
|
}
|
|
@@ -696,15 +703,15 @@ function renderTerminalNote(message2, title) {
|
|
|
696
703
|
visibleTitle.length,
|
|
697
704
|
...contentLines.map((line) => getVisibleWidth(line))
|
|
698
705
|
) + 2;
|
|
699
|
-
const titleLine = `${
|
|
706
|
+
const titleLine = `${chalk11.green("\u25C7")} ${chalk11.reset(title ?? "")} ${chalk11.gray(
|
|
700
707
|
`${"\u2500".repeat(Math.max(contentWidth - visibleTitle.length - 1, 1))}\u256E`
|
|
701
708
|
)}`;
|
|
702
709
|
const content = contentLines.map((line) => {
|
|
703
710
|
const padding = " ".repeat(contentWidth - getVisibleWidth(line));
|
|
704
|
-
return `${
|
|
711
|
+
return `${chalk11.gray("\u2502")} ${line}${padding}${chalk11.gray("\u2502")}`;
|
|
705
712
|
});
|
|
706
|
-
const bottom =
|
|
707
|
-
return [
|
|
713
|
+
const bottom = chalk11.gray(`\u251C${"\u2500".repeat(contentWidth + 2)}\u256F`);
|
|
714
|
+
return [chalk11.gray("\u2502"), titleLine, ...content, bottom].join("\n");
|
|
708
715
|
}
|
|
709
716
|
function note(message2, title) {
|
|
710
717
|
const format = resolveOutputFormat();
|
|
@@ -735,13 +742,13 @@ function note(message2, title) {
|
|
|
735
742
|
}
|
|
736
743
|
|
|
737
744
|
// ../design-system/src/prompts/primitives/outro.ts
|
|
738
|
-
import
|
|
745
|
+
import chalk12 from "chalk";
|
|
739
746
|
|
|
740
747
|
// ../design-system/src/prompts/primitives/spinner.ts
|
|
741
|
-
import
|
|
748
|
+
import chalk14 from "chalk";
|
|
742
749
|
|
|
743
750
|
// ../design-system/src/static/spinner.ts
|
|
744
|
-
import
|
|
751
|
+
import chalk13 from "chalk";
|
|
745
752
|
|
|
746
753
|
// ../design-system/src/prompts/index.ts
|
|
747
754
|
async function select2(opts) {
|
|
@@ -755,7 +762,7 @@ async function confirm2(opts) {
|
|
|
755
762
|
}
|
|
756
763
|
|
|
757
764
|
// ../design-system/src/static/menu.ts
|
|
758
|
-
import
|
|
765
|
+
import chalk16 from "chalk";
|
|
759
766
|
|
|
760
767
|
// ../cmdkit/src/index.ts
|
|
761
768
|
import { fileURLToPath } from "node:url";
|
|
@@ -3551,9 +3558,25 @@ function ensureSpawnHelperExecutable() {
|
|
|
3551
3558
|
const helper = join(nodePtyDir, "..", "prebuilds", `${process.platform}-${process.arch}`, "spawn-helper");
|
|
3552
3559
|
try {
|
|
3553
3560
|
accessSync(helper, constants.X_OK);
|
|
3554
|
-
} catch {
|
|
3555
|
-
|
|
3561
|
+
} catch (error2) {
|
|
3562
|
+
if (isMissingFileError(error2)) {
|
|
3563
|
+
return;
|
|
3564
|
+
}
|
|
3565
|
+
try {
|
|
3566
|
+
chmodSync(helper, 493);
|
|
3567
|
+
} catch (chmodError) {
|
|
3568
|
+
if (isMissingFileError(chmodError)) {
|
|
3569
|
+
return;
|
|
3570
|
+
}
|
|
3571
|
+
throw chmodError;
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
function isMissingFileError(error2) {
|
|
3576
|
+
if (!(error2 instanceof Error)) {
|
|
3577
|
+
return false;
|
|
3556
3578
|
}
|
|
3579
|
+
return "code" in error2 && error2.code === "ENOENT";
|
|
3557
3580
|
}
|
|
3558
3581
|
function matchPattern(buffer, pattern) {
|
|
3559
3582
|
const clean = normalizeHistoryBuffer(stripAnsi2(buffer));
|