terminal-pilot 0.0.48 → 0.0.50

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 (84) 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/@poe-code/user-error/README.md +56 -0
  60. package/node_modules/@poe-code/user-error/dist/index.d.ts +17 -0
  61. package/node_modules/@poe-code/user-error/dist/index.js +21 -0
  62. package/node_modules/@poe-code/user-error/package.json +24 -0
  63. package/node_modules/toolcraft-design/dist/acp/components.d.ts +8 -1
  64. package/node_modules/toolcraft-design/dist/acp/components.js +11 -6
  65. package/node_modules/toolcraft-design/dist/acp/index.d.ts +1 -0
  66. package/node_modules/toolcraft-design/dist/components/command-errors.d.ts +2 -0
  67. package/node_modules/toolcraft-design/dist/components/command-errors.js +8 -2
  68. package/node_modules/toolcraft-design/dist/components/help-formatter-plain.js +61 -25
  69. package/node_modules/toolcraft-design/dist/components/help-formatter.d.ts +15 -0
  70. package/node_modules/toolcraft-design/dist/components/help-formatter.js +128 -29
  71. package/node_modules/toolcraft-design/dist/components/index.d.ts +3 -3
  72. package/node_modules/toolcraft-design/dist/components/index.js +2 -2
  73. package/node_modules/toolcraft-design/dist/components/table.d.ts +1 -0
  74. package/node_modules/toolcraft-design/dist/components/table.js +52 -5
  75. package/node_modules/toolcraft-design/dist/components/template.d.ts +9 -0
  76. package/node_modules/toolcraft-design/dist/components/template.js +27 -2
  77. package/node_modules/toolcraft-design/dist/help-formatter.d.ts +2 -2
  78. package/node_modules/toolcraft-design/dist/help-formatter.js +1 -1
  79. package/node_modules/toolcraft-design/dist/index.d.ts +4 -4
  80. package/node_modules/toolcraft-design/dist/index.js +3 -3
  81. package/node_modules/toolcraft-design/dist/prompts/interactive/core.d.ts +5 -0
  82. package/node_modules/toolcraft-design/dist/prompts/interactive/core.js +15 -1
  83. package/node_modules/toolcraft-design/dist/prompts/primitives/spinner.js +1 -1
  84. package/package.json +5 -3
@@ -7,7 +7,7 @@ var claudeCodeAgent = {
7
7
  id: "claude-code",
8
8
  name: "claude-code",
9
9
  label: "Claude Code",
10
- summary: "Configure Claude Code to route through Poe.",
10
+ summary: "Anthropic's agentic coding tool for the terminal.",
11
11
  aliases: ["claude"],
12
12
  binaryName: "claude",
13
13
  apiShapes: ["anthropic-messages"],
@@ -17,6 +17,7 @@ var claudeCodeAgent = {
17
17
  }
18
18
  },
19
19
  configPath: "~/.claude.json",
20
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
20
21
  branding: {
21
22
  colors: {
22
23
  dark: "#C15F3C",
@@ -37,6 +38,7 @@ var claudeDesktopAgent = {
37
38
  linux: "~/.config/Claude/claude_desktop_config.json",
38
39
  win32: "~/AppData/Roaming/Claude/claude_desktop_config.json"
39
40
  },
41
+ capabilities: ["mcp"],
40
42
  branding: {
41
43
  colors: {
42
44
  dark: "#D97757",
@@ -50,7 +52,7 @@ var codexAgent = {
50
52
  id: "codex",
51
53
  name: "codex",
52
54
  label: "Codex",
53
- summary: "Configure Codex to use Poe as the model provider.",
55
+ summary: "OpenAI's coding agent for the terminal.",
54
56
  binaryName: "codex",
55
57
  apiShapes: ["openai-responses"],
56
58
  otelCapture: {
@@ -64,6 +66,7 @@ var codexAgent = {
64
66
  ]
65
67
  },
66
68
  configPath: "~/.codex/config.toml",
69
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
67
70
  branding: {
68
71
  colors: {
69
72
  dark: "#D5D9DF",
@@ -81,6 +84,7 @@ var cursorAgent = {
81
84
  summary: "Cursor's CLI coding agent.",
82
85
  binaryName: "cursor-agent",
83
86
  configPath: "~/.cursor/mcp.json",
87
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
84
88
  branding: {
85
89
  colors: {
86
90
  dark: "#FFFFFF",
@@ -95,10 +99,11 @@ var geminiCliAgent = {
95
99
  name: "gemini-cli",
96
100
  aliases: ["gemini"],
97
101
  label: "Gemini CLI",
98
- summary: "Configure Google's Gemini CLI to use a compatible Google generations API.",
102
+ summary: "Google's open-source AI agent for the terminal.",
99
103
  binaryName: "gemini",
100
104
  configPath: "~/.gemini/settings.json",
101
105
  apiShapes: ["google-generations"],
106
+ capabilities: ["spawn", "configure", "install", "test", "skill"],
102
107
  branding: {
103
108
  colors: {
104
109
  dark: "#8AB4F8",
@@ -112,7 +117,7 @@ var openCodeAgent = {
112
117
  id: "opencode",
113
118
  name: "opencode",
114
119
  label: "OpenCode CLI",
115
- summary: "Configure OpenCode CLI to use the Poe API.",
120
+ summary: "Open-source AI coding agent for the terminal.",
116
121
  binaryName: "opencode",
117
122
  apiShapes: ["openai-chat-completions"],
118
123
  otelCapture: {
@@ -121,6 +126,7 @@ var openCodeAgent = {
121
126
  }
122
127
  },
123
128
  configPath: "~/.config/opencode/opencode.json",
129
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
124
130
  branding: {
125
131
  colors: {
126
132
  dark: "#4A4F55",
@@ -134,11 +140,12 @@ var kimiAgent = {
134
140
  id: "kimi",
135
141
  name: "kimi",
136
142
  label: "Kimi",
137
- summary: "Configure Kimi CLI to use Poe API",
143
+ summary: "Moonshot AI's coding agent for the terminal.",
138
144
  aliases: ["kimi-cli"],
139
145
  binaryName: "kimi",
140
146
  apiShapes: ["openai-chat-completions"],
141
147
  configPath: "~/.kimi/mcp.json",
148
+ capabilities: ["spawn", "configure", "install", "test", "mcp"],
142
149
  branding: {
143
150
  colors: {
144
151
  dark: "#7B68EE",
@@ -157,6 +164,7 @@ var gooseAgent = {
157
164
  apiShapes: ["openai-chat-completions"],
158
165
  otelCapture: {},
159
166
  configPath: "~/.config/goose/config.yaml",
167
+ capabilities: ["spawn", "configure", "install", "test", "skill", "mcp"],
160
168
  branding: {
161
169
  colors: {
162
170
  dark: "#FF6B35",
@@ -171,8 +179,9 @@ var piAgent = {
171
179
  name: "pi",
172
180
  aliases: ["pi-agent"],
173
181
  label: "Pi",
174
- summary: "Pi coding agent (spawn-only; uses local Pi auth/settings).",
182
+ summary: "Minimal AI coding agent for the terminal.",
175
183
  binaryName: "pi",
184
+ capabilities: ["spawn"],
176
185
  branding: {
177
186
  colors: {
178
187
  dark: "#F2F2F2",
@@ -189,6 +198,7 @@ var poeAgentAgent = {
189
198
  summary: "Run one-shot prompts with the built-in Poe agent runtime.",
190
199
  apiShapes: ["openai-responses", "openai-chat-completions"],
191
200
  configPath: "~/.poe-code/config.json",
201
+ capabilities: ["configure"],
192
202
  branding: {
193
203
  colors: {
194
204
  dark: "#A465F7",
@@ -205,6 +215,9 @@ function freezeAgent(agent) {
205
215
  if (agent.apiShapes !== void 0) {
206
216
  Object.freeze(agent.apiShapes);
207
217
  }
218
+ if (agent.capabilities !== void 0) {
219
+ Object.freeze(agent.capabilities);
220
+ }
208
221
  if (agent.otelCapture?.env !== void 0) {
209
222
  Object.freeze(agent.otelCapture.env);
210
223
  }
@@ -268,7 +281,8 @@ var agentSkillConfigs = {
268
281
  },
269
282
  goose: {
270
283
  globalSkillDir: "~/.agents/skills",
271
- localSkillDir: ".agents/skills"
284
+ localSkillDir: ".agents/skills",
285
+ dirNote: "Goose discovers skills from the shared .agents/skills convention, not a goose-specific directory."
272
286
  }
273
287
  };
274
288
  var supportedAgents = Object.freeze(Object.keys(agentSkillConfigs));
@@ -994,6 +1008,19 @@ import { wrapAnsi } from "fast-wrap-ansi";
994
1008
 
995
1009
  // ../toolcraft-design/src/components/template.ts
996
1010
  var MAX_PARTIAL_DEPTH = 100;
1011
+ var MAX_TAG_EXCERPT_LENGTH = 40;
1012
+ var TemplateParseError = class extends Error {
1013
+ description;
1014
+ line;
1015
+ column;
1016
+ constructor(description, position) {
1017
+ super(`${description} at line ${position.line}, column ${position.column}`);
1018
+ this.name = "TemplateParseError";
1019
+ this.description = description;
1020
+ this.line = position.line;
1021
+ this.column = position.column;
1022
+ }
1023
+ };
997
1024
  var HTML_ESCAPE = {
998
1025
  "&": "&",
999
1026
  "<": "&lt;",
@@ -1100,13 +1127,13 @@ function parseTag(template, open) {
1100
1127
  if (template.startsWith("{{{", open)) {
1101
1128
  const close2 = template.indexOf("}}}", open + 3);
1102
1129
  if (close2 === -1) {
1103
- throw new Error("Unclosed unescaped tag");
1130
+ throw unclosedTagError(template, open, "}}}");
1104
1131
  }
1105
1132
  return { kind: "unescaped", name: template.slice(open + 3, close2).trim(), end: close2 + 3 };
1106
1133
  }
1107
1134
  const close = template.indexOf("}}", open + 2);
1108
1135
  if (close === -1) {
1109
- throw new Error("Unclosed tag");
1136
+ throw unclosedTagError(template, open, "}}");
1110
1137
  }
1111
1138
  const raw = template.slice(open + 2, close).trim();
1112
1139
  const sigil = raw[0];
@@ -1121,6 +1148,16 @@ function parseTag(template, open) {
1121
1148
  if (sigil === "=" && raw.endsWith("=")) return { kind: "delimiter", name, end };
1122
1149
  return { kind: "name", name: raw, end };
1123
1150
  }
1151
+ function unclosedTagError(template, open, expected) {
1152
+ const before = template.slice(0, open);
1153
+ const lineEnd = template.indexOf("\n", open);
1154
+ const opened = template.slice(open, lineEnd === -1 ? template.length : lineEnd).trimEnd();
1155
+ const tag = opened.length > MAX_TAG_EXCERPT_LENGTH ? `${opened.slice(0, MAX_TAG_EXCERPT_LENGTH)}...` : opened;
1156
+ return new TemplateParseError(`Unclosed tag "${tag}": expected "${expected}"`, {
1157
+ line: before.split("\n").length,
1158
+ column: open - (before.lastIndexOf("\n") + 1) + 1
1159
+ });
1160
+ }
1124
1161
  function getStandalone(template, tagStart, tagEnd, kind) {
1125
1162
  if (!["section", "inverted", "close", "comment", "partial", "delimiter"].includes(kind)) {
1126
1163
  return void 0;
@@ -2881,6 +2918,16 @@ async function executeMutation(mutation, context, options) {
2881
2918
  }
2882
2919
  }
2883
2920
 
2921
+ // ../user-error/src/index.ts
2922
+ var UserError = class extends Error {
2923
+ hint;
2924
+ constructor(message2, options) {
2925
+ super(message2, options);
2926
+ this.name = "UserError";
2927
+ this.hint = options?.hint;
2928
+ }
2929
+ };
2930
+
2884
2931
  // ../agent-skill-config/src/error-codes.ts
2885
2932
  function hasOwnErrorCode2(error2, code) {
2886
2933
  return error2 instanceof Error && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
@@ -2932,8 +2979,11 @@ async function installSkill(agentId, skill, options) {
2932
2979
  const skillFilePath = `${skillFolderPath}/SKILL.md`;
2933
2980
  const displayPath = `${scope === "global" ? config2.globalSkillDir : config2.localSkillDir}/${skill.name}/SKILL.md`;
2934
2981
  const absoluteSkillPath = `${scope === "global" ? options.homeDir : options.cwd}/${skillFilePath.slice(2)}`;
2935
- if (await pathExists2(options.fs, absoluteSkillPath)) {
2936
- throw new Error(`Skill already exists: ${displayPath}`);
2982
+ if (!options.force && await pathExists2(options.fs, absoluteSkillPath)) {
2983
+ throw new UserError(
2984
+ `Skill already exists: ${displayPath}
2985
+ Re-run with --force to overwrite it, or remove it first.`
2986
+ );
2937
2987
  }
2938
2988
  await runMutations(
2939
2989
  [
@@ -2982,7 +3032,7 @@ import path7 from "node:path";
2982
3032
  import { fileURLToPath as fileURLToPath3 } from "node:url";
2983
3033
 
2984
3034
  // ../toolcraft/src/user-error.ts
2985
- var UserError = class extends Error {
3035
+ var UserError2 = class extends Error {
2986
3036
  constructor(message2, options) {
2987
3037
  super(message2, options);
2988
3038
  this.name = "UserError";
@@ -3966,7 +4016,7 @@ function resolveInstallerServices(installer) {
3966
4016
  };
3967
4017
  }
3968
4018
  function throwUnsupportedAgent(agent) {
3969
- throw new UserError(`Unsupported agent: ${agent}`);
4019
+ throw new UserError2(`Unsupported agent: ${agent}`);
3970
4020
  }
3971
4021
  function resolveInstallableAgent(agent) {
3972
4022
  const skillSupport = resolveAgentSupport(agent);
@@ -3977,7 +4027,7 @@ function resolveInstallableAgent(agent) {
3977
4027
  }
3978
4028
  function resolveInstallScope(input) {
3979
4029
  if (input.local && input.global) {
3980
- throw new UserError("Use either --local or --global, not both.");
4030
+ throw new UserError2("Use either --local or --global, not both.");
3981
4031
  }
3982
4032
  if (input.local) {
3983
4033
  return "local";
@@ -4003,7 +4053,7 @@ async function loadTerminalPilotTemplate() {
4003
4053
  throw error2;
4004
4054
  }
4005
4055
  }
4006
- throw new UserError("terminal-pilot skill template is missing.");
4056
+ throw new UserError2("terminal-pilot skill template is missing.");
4007
4057
  }
4008
4058
 
4009
4059
  // src/commands/install.ts