terminal-pilot 0.0.48 → 0.0.49

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 (80) hide show
  1. package/dist/cli.js +584 -163
  2. package/dist/cli.js.map +4 -4
  3. package/dist/commands/close-session.js.map +1 -1
  4. package/dist/commands/create-session.js.map +1 -1
  5. package/dist/commands/daemon-runtime.js.map +1 -1
  6. package/dist/commands/fill.js.map +1 -1
  7. package/dist/commands/get-session.js.map +1 -1
  8. package/dist/commands/index.js +61 -11
  9. package/dist/commands/index.js.map +4 -4
  10. package/dist/commands/install.js +65 -15
  11. package/dist/commands/install.js.map +4 -4
  12. package/dist/commands/installer.js +21 -7
  13. package/dist/commands/installer.js.map +2 -2
  14. package/dist/commands/list-sessions.js.map +1 -1
  15. package/dist/commands/press-key.js.map +1 -1
  16. package/dist/commands/read-history.js.map +1 -1
  17. package/dist/commands/read-screen.js.map +1 -1
  18. package/dist/commands/resize.js.map +1 -1
  19. package/dist/commands/runtime.js.map +1 -1
  20. package/dist/commands/screenshot.js.map +1 -1
  21. package/dist/commands/send-signal.js.map +1 -1
  22. package/dist/commands/type.js.map +1 -1
  23. package/dist/commands/uninstall.js +21 -7
  24. package/dist/commands/uninstall.js.map +2 -2
  25. package/dist/commands/wait-for-exit.js.map +1 -1
  26. package/dist/commands/wait-for.js.map +1 -1
  27. package/dist/composition.json +6 -1
  28. package/dist/testing/cli-repl.js +584 -163
  29. package/dist/testing/cli-repl.js.map +4 -4
  30. package/dist/testing/qa-cli.js +584 -163
  31. package/dist/testing/qa-cli.js.map +4 -4
  32. package/node_modules/@poe-code/agent-defs/README.md +14 -1
  33. package/node_modules/@poe-code/agent-defs/dist/agents/claude-code.js +2 -1
  34. package/node_modules/@poe-code/agent-defs/dist/agents/claude-desktop.js +1 -0
  35. package/node_modules/@poe-code/agent-defs/dist/agents/codex.js +2 -1
  36. package/node_modules/@poe-code/agent-defs/dist/agents/cursor.js +1 -0
  37. package/node_modules/@poe-code/agent-defs/dist/agents/gemini-cli.js +2 -1
  38. package/node_modules/@poe-code/agent-defs/dist/agents/goose.js +1 -0
  39. package/node_modules/@poe-code/agent-defs/dist/agents/kimi.js +2 -1
  40. package/node_modules/@poe-code/agent-defs/dist/agents/opencode.js +2 -1
  41. package/node_modules/@poe-code/agent-defs/dist/agents/pi.js +2 -1
  42. package/node_modules/@poe-code/agent-defs/dist/agents/poe-agent.js +1 -0
  43. package/node_modules/@poe-code/agent-defs/dist/capabilities.d.ts +14 -0
  44. package/node_modules/@poe-code/agent-defs/dist/capabilities.js +63 -0
  45. package/node_modules/@poe-code/agent-defs/dist/index.d.ts +2 -1
  46. package/node_modules/@poe-code/agent-defs/dist/index.js +1 -0
  47. package/node_modules/@poe-code/agent-defs/dist/registry.js +3 -0
  48. package/node_modules/@poe-code/agent-defs/dist/types.d.ts +7 -0
  49. package/node_modules/@poe-code/agent-skill-config/dist/apply.d.ts +2 -0
  50. package/node_modules/@poe-code/agent-skill-config/dist/apply.js +18 -14
  51. package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +3 -1
  52. package/node_modules/@poe-code/agent-skill-config/dist/configs.d.ts +2 -0
  53. package/node_modules/@poe-code/agent-skill-config/dist/configs.js +2 -1
  54. package/node_modules/@poe-code/frontmatter/README.md +3 -0
  55. package/node_modules/@poe-code/frontmatter/dist/index.d.ts +1 -1
  56. package/node_modules/@poe-code/frontmatter/dist/index.js +1 -1
  57. package/node_modules/@poe-code/frontmatter/dist/parse.d.ts +9 -0
  58. package/node_modules/@poe-code/frontmatter/dist/parse.js +16 -0
  59. package/node_modules/toolcraft-design/dist/acp/components.d.ts +8 -1
  60. package/node_modules/toolcraft-design/dist/acp/components.js +11 -6
  61. package/node_modules/toolcraft-design/dist/acp/index.d.ts +1 -0
  62. package/node_modules/toolcraft-design/dist/components/command-errors.d.ts +2 -0
  63. package/node_modules/toolcraft-design/dist/components/command-errors.js +8 -2
  64. package/node_modules/toolcraft-design/dist/components/help-formatter-plain.js +61 -25
  65. package/node_modules/toolcraft-design/dist/components/help-formatter.d.ts +15 -0
  66. package/node_modules/toolcraft-design/dist/components/help-formatter.js +128 -29
  67. package/node_modules/toolcraft-design/dist/components/index.d.ts +3 -3
  68. package/node_modules/toolcraft-design/dist/components/index.js +2 -2
  69. package/node_modules/toolcraft-design/dist/components/table.d.ts +1 -0
  70. package/node_modules/toolcraft-design/dist/components/table.js +52 -5
  71. package/node_modules/toolcraft-design/dist/components/template.d.ts +9 -0
  72. package/node_modules/toolcraft-design/dist/components/template.js +27 -2
  73. package/node_modules/toolcraft-design/dist/help-formatter.d.ts +2 -2
  74. package/node_modules/toolcraft-design/dist/help-formatter.js +1 -1
  75. package/node_modules/toolcraft-design/dist/index.d.ts +4 -4
  76. package/node_modules/toolcraft-design/dist/index.js +3 -3
  77. package/node_modules/toolcraft-design/dist/prompts/interactive/core.d.ts +5 -0
  78. package/node_modules/toolcraft-design/dist/prompts/interactive/core.js +15 -1
  79. package/node_modules/toolcraft-design/dist/prompts/primitives/spinner.js +1 -1
  80. package/package.json +4 -3
@@ -2773,7 +2773,7 @@ var claudeCodeAgent = {
2773
2773
  id: "claude-code",
2774
2774
  name: "claude-code",
2775
2775
  label: "Claude Code",
2776
- summary: "Configure Claude Code to route through Poe.",
2776
+ summary: "Anthropic's agentic coding tool for the terminal.",
2777
2777
  aliases: ["claude"],
2778
2778
  binaryName: "claude",
2779
2779
  apiShapes: ["anthropic-messages"],
@@ -2783,6 +2783,7 @@ var claudeCodeAgent = {
2783
2783
  }
2784
2784
  },
2785
2785
  configPath: "~/.claude.json",
2786
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
2786
2787
  branding: {
2787
2788
  colors: {
2788
2789
  dark: "#C15F3C",
@@ -2803,6 +2804,7 @@ var claudeDesktopAgent = {
2803
2804
  linux: "~/.config/Claude/claude_desktop_config.json",
2804
2805
  win32: "~/AppData/Roaming/Claude/claude_desktop_config.json"
2805
2806
  },
2807
+ capabilities: ["mcp"],
2806
2808
  branding: {
2807
2809
  colors: {
2808
2810
  dark: "#D97757",
@@ -2816,7 +2818,7 @@ var codexAgent = {
2816
2818
  id: "codex",
2817
2819
  name: "codex",
2818
2820
  label: "Codex",
2819
- summary: "Configure Codex to use Poe as the model provider.",
2821
+ summary: "OpenAI's coding agent for the terminal.",
2820
2822
  binaryName: "codex",
2821
2823
  apiShapes: ["openai-responses"],
2822
2824
  otelCapture: {
@@ -2830,6 +2832,7 @@ var codexAgent = {
2830
2832
  ]
2831
2833
  },
2832
2834
  configPath: "~/.codex/config.toml",
2835
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
2833
2836
  branding: {
2834
2837
  colors: {
2835
2838
  dark: "#D5D9DF",
@@ -2847,6 +2850,7 @@ var cursorAgent = {
2847
2850
  summary: "Cursor's CLI coding agent.",
2848
2851
  binaryName: "cursor-agent",
2849
2852
  configPath: "~/.cursor/mcp.json",
2853
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
2850
2854
  branding: {
2851
2855
  colors: {
2852
2856
  dark: "#FFFFFF",
@@ -2861,10 +2865,11 @@ var geminiCliAgent = {
2861
2865
  name: "gemini-cli",
2862
2866
  aliases: ["gemini"],
2863
2867
  label: "Gemini CLI",
2864
- summary: "Configure Google's Gemini CLI to use a compatible Google generations API.",
2868
+ summary: "Google's open-source AI agent for the terminal.",
2865
2869
  binaryName: "gemini",
2866
2870
  configPath: "~/.gemini/settings.json",
2867
2871
  apiShapes: ["google-generations"],
2872
+ capabilities: ["spawn", "configure", "install", "test", "skill"],
2868
2873
  branding: {
2869
2874
  colors: {
2870
2875
  dark: "#8AB4F8",
@@ -2878,7 +2883,7 @@ var openCodeAgent = {
2878
2883
  id: "opencode",
2879
2884
  name: "opencode",
2880
2885
  label: "OpenCode CLI",
2881
- summary: "Configure OpenCode CLI to use the Poe API.",
2886
+ summary: "Open-source AI coding agent for the terminal.",
2882
2887
  binaryName: "opencode",
2883
2888
  apiShapes: ["openai-chat-completions"],
2884
2889
  otelCapture: {
@@ -2887,6 +2892,7 @@ var openCodeAgent = {
2887
2892
  }
2888
2893
  },
2889
2894
  configPath: "~/.config/opencode/opencode.json",
2895
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
2890
2896
  branding: {
2891
2897
  colors: {
2892
2898
  dark: "#4A4F55",
@@ -2900,11 +2906,12 @@ var kimiAgent = {
2900
2906
  id: "kimi",
2901
2907
  name: "kimi",
2902
2908
  label: "Kimi",
2903
- summary: "Configure Kimi CLI to use Poe API",
2909
+ summary: "Moonshot AI's coding agent for the terminal.",
2904
2910
  aliases: ["kimi-cli"],
2905
2911
  binaryName: "kimi",
2906
2912
  apiShapes: ["openai-chat-completions"],
2907
2913
  configPath: "~/.kimi/mcp.json",
2914
+ capabilities: ["spawn", "configure", "install", "test", "mcp"],
2908
2915
  branding: {
2909
2916
  colors: {
2910
2917
  dark: "#7B68EE",
@@ -2923,6 +2930,7 @@ var gooseAgent = {
2923
2930
  apiShapes: ["openai-chat-completions"],
2924
2931
  otelCapture: {},
2925
2932
  configPath: "~/.config/goose/config.yaml",
2933
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
2926
2934
  branding: {
2927
2935
  colors: {
2928
2936
  dark: "#FF6B35",
@@ -2937,8 +2945,9 @@ var piAgent = {
2937
2945
  name: "pi",
2938
2946
  aliases: ["pi-agent"],
2939
2947
  label: "Pi",
2940
- summary: "Pi coding agent (spawn-only; uses local Pi auth/settings).",
2948
+ summary: "Minimal AI coding agent for the terminal.",
2941
2949
  binaryName: "pi",
2950
+ capabilities: ["spawn"],
2942
2951
  branding: {
2943
2952
  colors: {
2944
2953
  dark: "#F2F2F2",
@@ -2955,6 +2964,7 @@ var poeAgentAgent = {
2955
2964
  summary: "Run one-shot prompts with the built-in Poe agent runtime.",
2956
2965
  apiShapes: ["openai-responses", "openai-chat-completions"],
2957
2966
  configPath: "~/.poe-code/config.json",
2967
+ capabilities: ["configure"],
2958
2968
  branding: {
2959
2969
  colors: {
2960
2970
  dark: "#A465F7",
@@ -2971,6 +2981,9 @@ function freezeAgent(agent) {
2971
2981
  if (agent.apiShapes !== void 0) {
2972
2982
  Object.freeze(agent.apiShapes);
2973
2983
  }
2984
+ if (agent.capabilities !== void 0) {
2985
+ Object.freeze(agent.capabilities);
2986
+ }
2974
2987
  if (agent.otelCapture?.env !== void 0) {
2975
2988
  Object.freeze(agent.otelCapture.env);
2976
2989
  }
@@ -3034,7 +3047,8 @@ var agentSkillConfigs = {
3034
3047
  },
3035
3048
  goose: {
3036
3049
  globalSkillDir: "~/.agents/skills",
3037
- localSkillDir: ".agents/skills"
3050
+ localSkillDir: ".agents/skills",
3051
+ dirNote: "Goose discovers skills from the shared .agents/skills convention, not a goose-specific directory."
3038
3052
  }
3039
3053
  };
3040
3054
  var supportedAgents = Object.freeze(Object.keys(agentSkillConfigs));
@@ -3764,6 +3778,19 @@ import { wrapAnsi } from "fast-wrap-ansi";
3764
3778
 
3765
3779
  // ../toolcraft-design/src/components/template.ts
3766
3780
  var MAX_PARTIAL_DEPTH = 100;
3781
+ var MAX_TAG_EXCERPT_LENGTH = 40;
3782
+ var TemplateParseError = class extends Error {
3783
+ description;
3784
+ line;
3785
+ column;
3786
+ constructor(description, position) {
3787
+ super(`${description} at line ${position.line}, column ${position.column}`);
3788
+ this.name = "TemplateParseError";
3789
+ this.description = description;
3790
+ this.line = position.line;
3791
+ this.column = position.column;
3792
+ }
3793
+ };
3767
3794
  var HTML_ESCAPE = {
3768
3795
  "&": "&",
3769
3796
  "<": "&lt;",
@@ -3870,13 +3897,13 @@ function parseTag(template, open) {
3870
3897
  if (template.startsWith("{{{", open)) {
3871
3898
  const close2 = template.indexOf("}}}", open + 3);
3872
3899
  if (close2 === -1) {
3873
- throw new Error("Unclosed unescaped tag");
3900
+ throw unclosedTagError(template, open, "}}}");
3874
3901
  }
3875
3902
  return { kind: "unescaped", name: template.slice(open + 3, close2).trim(), end: close2 + 3 };
3876
3903
  }
3877
3904
  const close = template.indexOf("}}", open + 2);
3878
3905
  if (close === -1) {
3879
- throw new Error("Unclosed tag");
3906
+ throw unclosedTagError(template, open, "}}");
3880
3907
  }
3881
3908
  const raw = template.slice(open + 2, close).trim();
3882
3909
  const sigil = raw[0];
@@ -3891,6 +3918,16 @@ function parseTag(template, open) {
3891
3918
  if (sigil === "=" && raw.endsWith("=")) return { kind: "delimiter", name, end };
3892
3919
  return { kind: "name", name: raw, end };
3893
3920
  }
3921
+ function unclosedTagError(template, open, expected) {
3922
+ const before = template.slice(0, open);
3923
+ const lineEnd = template.indexOf("\n", open);
3924
+ const opened = template.slice(open, lineEnd === -1 ? template.length : lineEnd).trimEnd();
3925
+ const tag = opened.length > MAX_TAG_EXCERPT_LENGTH ? `${opened.slice(0, MAX_TAG_EXCERPT_LENGTH)}...` : opened;
3926
+ return new TemplateParseError(`Unclosed tag "${tag}": expected "${expected}"`, {
3927
+ line: before.split("\n").length,
3928
+ column: open - (before.lastIndexOf("\n") + 1) + 1
3929
+ });
3930
+ }
3894
3931
  function getStandalone(template, tagStart, tagEnd, kind) {
3895
3932
  if (!["section", "inverted", "close", "comment", "partial", "delimiter"].includes(kind)) {
3896
3933
  return void 0;
@@ -5651,6 +5688,16 @@ async function executeMutation(mutation, context, options) {
5651
5688
  }
5652
5689
  }
5653
5690
 
5691
+ // ../user-error/src/index.ts
5692
+ var UserError2 = class extends Error {
5693
+ hint;
5694
+ constructor(message2, options) {
5695
+ super(message2, options);
5696
+ this.name = "UserError";
5697
+ this.hint = options?.hint;
5698
+ }
5699
+ };
5700
+
5654
5701
  // ../agent-skill-config/src/error-codes.ts
5655
5702
  function hasOwnErrorCode3(error2, code) {
5656
5703
  return error2 instanceof Error && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
@@ -5702,8 +5749,11 @@ async function installSkill(agentId, skill, options) {
5702
5749
  const skillFilePath = `${skillFolderPath}/SKILL.md`;
5703
5750
  const displayPath = `${scope === "global" ? config2.globalSkillDir : config2.localSkillDir}/${skill.name}/SKILL.md`;
5704
5751
  const absoluteSkillPath = `${scope === "global" ? options.homeDir : options.cwd}/${skillFilePath.slice(2)}`;
5705
- if (await pathExists2(options.fs, absoluteSkillPath)) {
5706
- throw new Error(`Skill already exists: ${displayPath}`);
5752
+ if (!options.force && await pathExists2(options.fs, absoluteSkillPath)) {
5753
+ throw new UserError2(
5754
+ `Skill already exists: ${displayPath}
5755
+ Re-run with --force to overwrite it, or remove it first.`
5756
+ );
5707
5757
  }
5708
5758
  await runMutations(
5709
5759
  [