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.
Files changed (45) hide show
  1. package/dist/cli.js +38 -15
  2. package/dist/cli.js.map +4 -4
  3. package/dist/commands/close-session.js +18 -2
  4. package/dist/commands/close-session.js.map +2 -2
  5. package/dist/commands/create-session.js +18 -2
  6. package/dist/commands/create-session.js.map +2 -2
  7. package/dist/commands/fill.js +18 -2
  8. package/dist/commands/fill.js.map +2 -2
  9. package/dist/commands/get-session.js +18 -2
  10. package/dist/commands/get-session.js.map +2 -2
  11. package/dist/commands/index.js +18 -2
  12. package/dist/commands/index.js.map +2 -2
  13. package/dist/commands/list-sessions.js +18 -2
  14. package/dist/commands/list-sessions.js.map +2 -2
  15. package/dist/commands/press-key.js +18 -2
  16. package/dist/commands/press-key.js.map +2 -2
  17. package/dist/commands/read-history.js +18 -2
  18. package/dist/commands/read-history.js.map +2 -2
  19. package/dist/commands/read-screen.js +18 -2
  20. package/dist/commands/read-screen.js.map +2 -2
  21. package/dist/commands/resize.js +18 -2
  22. package/dist/commands/resize.js.map +2 -2
  23. package/dist/commands/runtime.js +18 -2
  24. package/dist/commands/runtime.js.map +2 -2
  25. package/dist/commands/screenshot.js +18 -2
  26. package/dist/commands/screenshot.js.map +2 -2
  27. package/dist/commands/send-signal.js +18 -2
  28. package/dist/commands/send-signal.js.map +2 -2
  29. package/dist/commands/type.js +18 -2
  30. package/dist/commands/type.js.map +2 -2
  31. package/dist/commands/wait-for-exit.js +18 -2
  32. package/dist/commands/wait-for-exit.js.map +2 -2
  33. package/dist/commands/wait-for.js +18 -2
  34. package/dist/commands/wait-for.js.map +2 -2
  35. package/dist/index.js +18 -2
  36. package/dist/index.js.map +2 -2
  37. package/dist/terminal-pilot.js +18 -2
  38. package/dist/terminal-pilot.js.map +2 -2
  39. package/dist/terminal-session.js +18 -2
  40. package/dist/terminal-session.js.map +2 -2
  41. package/dist/testing/cli-repl.js +38 -15
  42. package/dist/testing/cli-repl.js.map +4 -4
  43. package/dist/testing/qa-cli.js +38 -15
  44. package/dist/testing/qa-cli.js.map +4 -4
  45. package/package.json +2 -2
@@ -720,12 +720,19 @@ function renderTable(options) {
720
720
  import chalk7 from "chalk";
721
721
  var AGENT_PREFIX = `${chalk7.green.bold("\u2713")} agent: `;
722
722
 
723
+ // ../design-system/src/dashboard/buffer.ts
724
+ import chalk8 from "chalk";
725
+
726
+ // ../design-system/src/dashboard/terminal.ts
727
+ import readline from "node:readline";
728
+ import { PassThrough } from "node:stream";
729
+
723
730
  // ../design-system/src/prompts/index.ts
724
- import chalk14 from "chalk";
731
+ import chalk15 from "chalk";
725
732
  import * as clack from "@clack/prompts";
726
733
 
727
734
  // ../design-system/src/prompts/primitives/cancel.ts
728
- import chalk8 from "chalk";
735
+ import chalk9 from "chalk";
729
736
 
730
737
  // ../../node_modules/@clack/core/dist/index.mjs
731
738
  var import_sisteransi = __toESM(require_src(), 1);
@@ -755,16 +762,16 @@ function cancel(msg = "") {
755
762
  if (resolveOutputFormat() !== "terminal") {
756
763
  return;
757
764
  }
758
- process.stdout.write(`${chalk8.gray("\u2514")} ${chalk8.red(msg)}
765
+ process.stdout.write(`${chalk9.gray("\u2514")} ${chalk9.red(msg)}
759
766
 
760
767
  `);
761
768
  }
762
769
 
763
770
  // ../design-system/src/prompts/primitives/intro.ts
764
- import chalk9 from "chalk";
771
+ import chalk10 from "chalk";
765
772
 
766
773
  // ../design-system/src/prompts/primitives/note.ts
767
- import chalk10 from "chalk";
774
+ import chalk11 from "chalk";
768
775
  function getVisibleWidth(value) {
769
776
  return stripAnsi2(value).length;
770
777
  }
@@ -775,15 +782,15 @@ function renderTerminalNote(message2, title) {
775
782
  visibleTitle.length,
776
783
  ...contentLines.map((line) => getVisibleWidth(line))
777
784
  ) + 2;
778
- const titleLine = `${chalk10.green("\u25C7")} ${chalk10.reset(title ?? "")} ${chalk10.gray(
785
+ const titleLine = `${chalk11.green("\u25C7")} ${chalk11.reset(title ?? "")} ${chalk11.gray(
779
786
  `${"\u2500".repeat(Math.max(contentWidth - visibleTitle.length - 1, 1))}\u256E`
780
787
  )}`;
781
788
  const content = contentLines.map((line) => {
782
789
  const padding = " ".repeat(contentWidth - getVisibleWidth(line));
783
- return `${chalk10.gray("\u2502")} ${line}${padding}${chalk10.gray("\u2502")}`;
790
+ return `${chalk11.gray("\u2502")} ${line}${padding}${chalk11.gray("\u2502")}`;
784
791
  });
785
- const bottom = chalk10.gray(`\u251C${"\u2500".repeat(contentWidth + 2)}\u256F`);
786
- return [chalk10.gray("\u2502"), titleLine, ...content, bottom].join("\n");
792
+ const bottom = chalk11.gray(`\u251C${"\u2500".repeat(contentWidth + 2)}\u256F`);
793
+ return [chalk11.gray("\u2502"), titleLine, ...content, bottom].join("\n");
787
794
  }
788
795
  function note(message2, title) {
789
796
  const format = resolveOutputFormat();
@@ -814,13 +821,13 @@ function note(message2, title) {
814
821
  }
815
822
 
816
823
  // ../design-system/src/prompts/primitives/outro.ts
817
- import chalk11 from "chalk";
824
+ import chalk12 from "chalk";
818
825
 
819
826
  // ../design-system/src/prompts/primitives/spinner.ts
820
- import chalk13 from "chalk";
827
+ import chalk14 from "chalk";
821
828
 
822
829
  // ../design-system/src/static/spinner.ts
823
- import chalk12 from "chalk";
830
+ import chalk13 from "chalk";
824
831
 
825
832
  // ../design-system/src/prompts/index.ts
826
833
  async function select2(opts) {
@@ -834,7 +841,7 @@ async function confirm2(opts) {
834
841
  }
835
842
 
836
843
  // ../design-system/src/static/menu.ts
837
- import chalk15 from "chalk";
844
+ import chalk16 from "chalk";
838
845
 
839
846
  // ../cmdkit/src/index.ts
840
847
  import { fileURLToPath } from "node:url";
@@ -3557,9 +3564,25 @@ function ensureSpawnHelperExecutable() {
3557
3564
  const helper = join(nodePtyDir, "..", "prebuilds", `${process.platform}-${process.arch}`, "spawn-helper");
3558
3565
  try {
3559
3566
  accessSync(helper, constants.X_OK);
3560
- } catch {
3561
- chmodSync(helper, 493);
3567
+ } catch (error2) {
3568
+ if (isMissingFileError(error2)) {
3569
+ return;
3570
+ }
3571
+ try {
3572
+ chmodSync(helper, 493);
3573
+ } catch (chmodError) {
3574
+ if (isMissingFileError(chmodError)) {
3575
+ return;
3576
+ }
3577
+ throw chmodError;
3578
+ }
3579
+ }
3580
+ }
3581
+ function isMissingFileError(error2) {
3582
+ if (!(error2 instanceof Error)) {
3583
+ return false;
3562
3584
  }
3585
+ return "code" in error2 && error2.code === "ENOENT";
3563
3586
  }
3564
3587
  function matchPattern(buffer, pattern) {
3565
3588
  const clean = normalizeHistoryBuffer(stripAnsi(buffer));