terminal-pilot 0.0.21 → 0.0.23

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 (61) hide show
  1. package/dist/cli.js +614 -250
  2. package/dist/cli.js.map +4 -4
  3. package/dist/commands/close-session.js +6 -4
  4. package/dist/commands/close-session.js.map +3 -3
  5. package/dist/commands/create-session.js +6 -4
  6. package/dist/commands/create-session.js.map +3 -3
  7. package/dist/commands/fill.js +6 -4
  8. package/dist/commands/fill.js.map +3 -3
  9. package/dist/commands/get-session.js +6 -4
  10. package/dist/commands/get-session.js.map +3 -3
  11. package/dist/commands/index.d.ts +35 -35
  12. package/dist/commands/index.js +97 -36
  13. package/dist/commands/index.js.map +4 -4
  14. package/dist/commands/install.js +74 -20
  15. package/dist/commands/install.js.map +4 -4
  16. package/dist/commands/installer.js +36 -2
  17. package/dist/commands/installer.js.map +4 -4
  18. package/dist/commands/list-sessions.js +6 -4
  19. package/dist/commands/list-sessions.js.map +3 -3
  20. package/dist/commands/press-key.js +6 -4
  21. package/dist/commands/press-key.js.map +3 -3
  22. package/dist/commands/read-history.js +6 -4
  23. package/dist/commands/read-history.js.map +3 -3
  24. package/dist/commands/read-screen.js +6 -4
  25. package/dist/commands/read-screen.js.map +3 -3
  26. package/dist/commands/resize.js +6 -4
  27. package/dist/commands/resize.js.map +3 -3
  28. package/dist/commands/runtime.js +6 -4
  29. package/dist/commands/runtime.js.map +3 -3
  30. package/dist/commands/screenshot.js +22 -8
  31. package/dist/commands/screenshot.js.map +4 -4
  32. package/dist/commands/send-signal.js +6 -4
  33. package/dist/commands/send-signal.js.map +3 -3
  34. package/dist/commands/type.js +6 -4
  35. package/dist/commands/type.js.map +3 -3
  36. package/dist/commands/uninstall.js +39 -5
  37. package/dist/commands/uninstall.js.map +4 -4
  38. package/dist/commands/wait-for-exit.js +6 -4
  39. package/dist/commands/wait-for-exit.js.map +3 -3
  40. package/dist/commands/wait-for.js +6 -4
  41. package/dist/commands/wait-for.js.map +3 -3
  42. package/dist/errors.d.ts +1 -0
  43. package/dist/errors.js +8 -0
  44. package/dist/errors.js.map +7 -0
  45. package/dist/index.js +8 -4
  46. package/dist/index.js.map +3 -3
  47. package/dist/terminal-pilot.js +6 -4
  48. package/dist/terminal-pilot.js.map +3 -3
  49. package/dist/terminal-session.js +6 -4
  50. package/dist/terminal-session.js.map +3 -3
  51. package/dist/testing/cli-repl.js +614 -250
  52. package/dist/testing/cli-repl.js.map +4 -4
  53. package/dist/testing/qa-cli.js +614 -250
  54. package/dist/testing/qa-cli.js.map +4 -4
  55. package/node_modules/@poe-code/agent-skill-config/dist/apply.js +2 -1
  56. package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +8 -9
  57. package/node_modules/@poe-code/agent-skill-config/dist/error-codes.d.ts +1 -0
  58. package/node_modules/@poe-code/agent-skill-config/dist/error-codes.js +5 -0
  59. package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +18 -12
  60. package/node_modules/@poe-code/agent-skill-config/dist/templates.js +2 -1
  61. package/package.json +1 -1
@@ -494,6 +494,11 @@ function consumeTerminatedString(input, index, allowBellTerminator) {
494
494
  return input.length;
495
495
  }
496
496
 
497
+ // src/errors.ts
498
+ function hasOwnErrorCode(error, code) {
499
+ return error instanceof Error && Object.prototype.hasOwnProperty.call(error, "code") && error.code === code;
500
+ }
501
+
497
502
  // src/terminal-buffer.ts
498
503
  var RESET_SGR = "\x1B[0m";
499
504
  var DEC_SPECIAL_GRAPHICS = {
@@ -1593,10 +1598,7 @@ function ensureSpawnHelperExecutable() {
1593
1598
  }
1594
1599
  }
1595
1600
  function isMissingFileError(error) {
1596
- if (!(error instanceof Error)) {
1597
- return false;
1598
- }
1599
- return "code" in error && error.code === "ENOENT";
1601
+ return hasOwnErrorCode(error, "ENOENT");
1600
1602
  }
1601
1603
  function matchPattern(buffer, pattern) {
1602
1604
  const clean = normalizeHistoryBuffer(stripAnsi(buffer));