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.
- package/dist/cli.js +584 -163
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js.map +1 -1
- package/dist/commands/create-session.js.map +1 -1
- package/dist/commands/daemon-runtime.js.map +1 -1
- package/dist/commands/fill.js.map +1 -1
- package/dist/commands/get-session.js.map +1 -1
- package/dist/commands/index.js +61 -11
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +65 -15
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +21 -7
- package/dist/commands/installer.js.map +2 -2
- package/dist/commands/list-sessions.js.map +1 -1
- package/dist/commands/press-key.js.map +1 -1
- package/dist/commands/read-history.js.map +1 -1
- package/dist/commands/read-screen.js.map +1 -1
- package/dist/commands/resize.js.map +1 -1
- package/dist/commands/runtime.js.map +1 -1
- package/dist/commands/screenshot.js.map +1 -1
- package/dist/commands/send-signal.js.map +1 -1
- package/dist/commands/type.js.map +1 -1
- package/dist/commands/uninstall.js +21 -7
- package/dist/commands/uninstall.js.map +2 -2
- package/dist/commands/wait-for-exit.js.map +1 -1
- package/dist/commands/wait-for.js.map +1 -1
- package/dist/composition.json +6 -1
- package/dist/testing/cli-repl.js +584 -163
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +584 -163
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/@poe-code/agent-defs/README.md +14 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/claude-code.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/claude-desktop.js +1 -0
- package/node_modules/@poe-code/agent-defs/dist/agents/codex.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/cursor.js +1 -0
- package/node_modules/@poe-code/agent-defs/dist/agents/gemini-cli.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/goose.js +1 -0
- package/node_modules/@poe-code/agent-defs/dist/agents/kimi.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/opencode.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/pi.js +2 -1
- package/node_modules/@poe-code/agent-defs/dist/agents/poe-agent.js +1 -0
- package/node_modules/@poe-code/agent-defs/dist/capabilities.d.ts +14 -0
- package/node_modules/@poe-code/agent-defs/dist/capabilities.js +63 -0
- package/node_modules/@poe-code/agent-defs/dist/index.d.ts +2 -1
- package/node_modules/@poe-code/agent-defs/dist/index.js +1 -0
- package/node_modules/@poe-code/agent-defs/dist/registry.js +3 -0
- package/node_modules/@poe-code/agent-defs/dist/types.d.ts +7 -0
- package/node_modules/@poe-code/agent-skill-config/dist/apply.d.ts +2 -0
- package/node_modules/@poe-code/agent-skill-config/dist/apply.js +18 -14
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +3 -1
- package/node_modules/@poe-code/agent-skill-config/dist/configs.d.ts +2 -0
- package/node_modules/@poe-code/agent-skill-config/dist/configs.js +2 -1
- package/node_modules/@poe-code/frontmatter/README.md +3 -0
- package/node_modules/@poe-code/frontmatter/dist/index.d.ts +1 -1
- package/node_modules/@poe-code/frontmatter/dist/index.js +1 -1
- package/node_modules/@poe-code/frontmatter/dist/parse.d.ts +9 -0
- package/node_modules/@poe-code/frontmatter/dist/parse.js +16 -0
- package/node_modules/@poe-code/user-error/README.md +56 -0
- package/node_modules/@poe-code/user-error/dist/index.d.ts +17 -0
- package/node_modules/@poe-code/user-error/dist/index.js +21 -0
- package/node_modules/@poe-code/user-error/package.json +24 -0
- package/node_modules/toolcraft-design/dist/acp/components.d.ts +8 -1
- package/node_modules/toolcraft-design/dist/acp/components.js +11 -6
- package/node_modules/toolcraft-design/dist/acp/index.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/components/command-errors.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/components/command-errors.js +8 -2
- package/node_modules/toolcraft-design/dist/components/help-formatter-plain.js +61 -25
- package/node_modules/toolcraft-design/dist/components/help-formatter.d.ts +15 -0
- package/node_modules/toolcraft-design/dist/components/help-formatter.js +128 -29
- package/node_modules/toolcraft-design/dist/components/index.d.ts +3 -3
- package/node_modules/toolcraft-design/dist/components/index.js +2 -2
- package/node_modules/toolcraft-design/dist/components/table.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/components/table.js +52 -5
- package/node_modules/toolcraft-design/dist/components/template.d.ts +9 -0
- package/node_modules/toolcraft-design/dist/components/template.js +27 -2
- package/node_modules/toolcraft-design/dist/help-formatter.d.ts +2 -2
- package/node_modules/toolcraft-design/dist/help-formatter.js +1 -1
- package/node_modules/toolcraft-design/dist/index.d.ts +4 -4
- package/node_modules/toolcraft-design/dist/index.js +3 -3
- package/node_modules/toolcraft-design/dist/prompts/interactive/core.d.ts +5 -0
- package/node_modules/toolcraft-design/dist/prompts/interactive/core.js +15 -1
- package/node_modules/toolcraft-design/dist/prompts/primitives/spinner.js +1 -1
- package/package.json +5 -3
package/dist/commands/install.js
CHANGED
|
@@ -7,7 +7,7 @@ var claudeCodeAgent = {
|
|
|
7
7
|
id: "claude-code",
|
|
8
8
|
name: "claude-code",
|
|
9
9
|
label: "Claude Code",
|
|
10
|
-
summary: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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: "
|
|
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
|
"<": "<",
|
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
4056
|
+
throw new UserError2("terminal-pilot skill template is missing.");
|
|
4007
4057
|
}
|
|
4008
4058
|
|
|
4009
4059
|
// src/commands/install.ts
|