terminal-pilot 0.0.23 → 0.0.24
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 +113 -37
- package/dist/cli.js.map +3 -3
- package/dist/commands/index.js +22 -0
- package/dist/commands/index.js.map +3 -3
- package/dist/commands/install.js +22 -0
- package/dist/commands/install.js.map +3 -3
- package/dist/commands/installer.js +22 -0
- package/dist/commands/installer.js.map +3 -3
- package/dist/commands/uninstall.js +22 -0
- package/dist/commands/uninstall.js.map +3 -3
- package/dist/testing/cli-repl.js +113 -37
- package/dist/testing/cli-repl.js.map +3 -3
- package/dist/testing/qa-cli.js +113 -37
- package/dist/testing/qa-cli.js.map +3 -3
- package/node_modules/@poe-code/agent-skill-config/dist/configs.js +4 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12886,9 +12886,31 @@ function createOption(field, globalLongOptionFlags) {
|
|
|
12886
12886
|
const option = createCommanderOption(`${flags} <value>`, field.description, field);
|
|
12887
12887
|
return [option];
|
|
12888
12888
|
}
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12889
|
+
function resolveCLIControls(controls) {
|
|
12890
|
+
return {
|
|
12891
|
+
debug: controls?.debug === true,
|
|
12892
|
+
output: controls?.output === true,
|
|
12893
|
+
verbose: controls?.verbose === true,
|
|
12894
|
+
yes: controls?.yes === true
|
|
12895
|
+
};
|
|
12896
|
+
}
|
|
12897
|
+
function getGlobalLongOptionFlags(presetsEnabled, versionEnabled, controls) {
|
|
12898
|
+
const flags = [];
|
|
12899
|
+
if (presetsEnabled) {
|
|
12900
|
+
flags.push("--preset");
|
|
12901
|
+
}
|
|
12902
|
+
if (controls.yes) {
|
|
12903
|
+
flags.push("--yes");
|
|
12904
|
+
}
|
|
12905
|
+
if (controls.output) {
|
|
12906
|
+
flags.push("--output");
|
|
12907
|
+
}
|
|
12908
|
+
if (controls.debug) {
|
|
12909
|
+
flags.push("--debug");
|
|
12910
|
+
}
|
|
12911
|
+
if (controls.verbose) {
|
|
12912
|
+
flags.push("--verbose");
|
|
12913
|
+
}
|
|
12892
12914
|
if (versionEnabled) {
|
|
12893
12915
|
flags.push("--version");
|
|
12894
12916
|
}
|
|
@@ -13270,11 +13292,16 @@ function formatGlobalOptionsLine(ctx) {
|
|
|
13270
13292
|
if (ctx.presetsEnabled) {
|
|
13271
13293
|
flags.push("--preset <path>");
|
|
13272
13294
|
}
|
|
13273
|
-
|
|
13295
|
+
if (ctx.controls.yes) {
|
|
13296
|
+
flags.push("--yes");
|
|
13297
|
+
}
|
|
13298
|
+
if (ctx.controls.output) {
|
|
13299
|
+
flags.push("--output <format>");
|
|
13300
|
+
}
|
|
13274
13301
|
if (ctx.showVersion) {
|
|
13275
13302
|
flags.push("--version");
|
|
13276
13303
|
}
|
|
13277
|
-
return `${text.section("Options:")} ${flags.join(" ")}
|
|
13304
|
+
return flags.length > 0 ? `${text.section("Options:")} ${flags.join(" ")}` : "";
|
|
13278
13305
|
}
|
|
13279
13306
|
function collectSchemaGlobalFieldRows(group, scope, casing, globalLongOptionFlags) {
|
|
13280
13307
|
const seen = /* @__PURE__ */ new Map();
|
|
@@ -13326,7 +13353,8 @@ function renderGroupHelp(group, breadcrumb, scope, casing, globalOptions, rootUs
|
|
|
13326
13353
|
const sections = [];
|
|
13327
13354
|
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
13328
13355
|
globalOptions.presetsEnabled,
|
|
13329
|
-
globalOptions.showVersion
|
|
13356
|
+
globalOptions.showVersion,
|
|
13357
|
+
globalOptions.controls
|
|
13330
13358
|
);
|
|
13331
13359
|
const commandRows = formatCommandRows(group, scope, casing, globalLongOptionFlags);
|
|
13332
13360
|
if (commandRows.length > 0) {
|
|
@@ -13364,7 +13392,8 @@ function renderLeafHelp(command, breadcrumb, casing, globalOptions, rootUsageNam
|
|
|
13364
13392
|
const sections = [];
|
|
13365
13393
|
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
13366
13394
|
globalOptions.presetsEnabled,
|
|
13367
|
-
globalOptions.showVersion
|
|
13395
|
+
globalOptions.showVersion,
|
|
13396
|
+
globalOptions.controls
|
|
13368
13397
|
);
|
|
13369
13398
|
const collected = collectFields(command.params, casing, globalLongOptionFlags);
|
|
13370
13399
|
const fields = assignPositionals(collected.fields, command.positional);
|
|
@@ -13421,6 +13450,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13421
13450
|
const output = resolveHelpOutput(argv);
|
|
13422
13451
|
const casing = options.casing ?? "kebab";
|
|
13423
13452
|
const rootUsageName = options.rootUsageName ?? inferProgramName(argv);
|
|
13453
|
+
const controls = resolveCLIControls(options.controls);
|
|
13424
13454
|
await withOutputFormat2(output, async () => {
|
|
13425
13455
|
const rendered = target.node.kind === "group" ? renderGroupHelp(
|
|
13426
13456
|
target.node,
|
|
@@ -13428,6 +13458,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13428
13458
|
"cli",
|
|
13429
13459
|
casing,
|
|
13430
13460
|
{
|
|
13461
|
+
controls,
|
|
13431
13462
|
showVersion: options.version !== void 0,
|
|
13432
13463
|
presetsEnabled: options.presets === true
|
|
13433
13464
|
},
|
|
@@ -13438,6 +13469,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13438
13469
|
target.breadcrumb,
|
|
13439
13470
|
casing,
|
|
13440
13471
|
{
|
|
13472
|
+
controls,
|
|
13441
13473
|
showVersion: options.version !== void 0,
|
|
13442
13474
|
presetsEnabled: options.presets === true
|
|
13443
13475
|
},
|
|
@@ -13446,7 +13478,7 @@ async function renderGeneratedHelp(root, argv, options) {
|
|
|
13446
13478
|
process.stdout.write(rendered);
|
|
13447
13479
|
});
|
|
13448
13480
|
}
|
|
13449
|
-
function createNodeCommand(node, casing, globalLongOptionFlags, execute, presetsEnabled, pathSegments = []) {
|
|
13481
|
+
function createNodeCommand(node, casing, globalLongOptionFlags, execute, presetsEnabled, controls, pathSegments = []) {
|
|
13450
13482
|
const nextPathSegments = [...pathSegments, node.name];
|
|
13451
13483
|
if (node.kind === "command") {
|
|
13452
13484
|
if (!node.scope.includes("cli")) {
|
|
@@ -13461,7 +13493,7 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13461
13493
|
}
|
|
13462
13494
|
node.aliases.forEach((alias) => command.alias(alias));
|
|
13463
13495
|
command.addHelpCommand(false);
|
|
13464
|
-
addGlobalOptions(command, presetsEnabled);
|
|
13496
|
+
addGlobalOptions(command, presetsEnabled, controls);
|
|
13465
13497
|
command.allowExcessArguments(true);
|
|
13466
13498
|
if (collected.dynamicFields.length > 0) {
|
|
13467
13499
|
command.allowUnknownOption(true);
|
|
@@ -13503,6 +13535,7 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13503
13535
|
globalLongOptionFlags,
|
|
13504
13536
|
execute,
|
|
13505
13537
|
presetsEnabled,
|
|
13538
|
+
controls,
|
|
13506
13539
|
nextPathSegments
|
|
13507
13540
|
)
|
|
13508
13541
|
).filter((child) => child !== null);
|
|
@@ -13512,39 +13545,47 @@ function createNodeCommand(node, casing, globalLongOptionFlags, execute, presets
|
|
|
13512
13545
|
}
|
|
13513
13546
|
node.aliases.forEach((alias) => group.alias(alias));
|
|
13514
13547
|
group.addHelpCommand(false);
|
|
13515
|
-
addGlobalOptions(group, presetsEnabled);
|
|
13548
|
+
addGlobalOptions(group, presetsEnabled, controls);
|
|
13516
13549
|
for (const child of visibleChildren) {
|
|
13517
13550
|
const isDefaultChild = node.default !== void 0 && node.default.scope.includes("cli") && (child.name() === node.default.name || child.aliases().includes(node.default.name));
|
|
13518
13551
|
group.addCommand(child, isDefaultChild ? { isDefault: true } : void 0);
|
|
13519
13552
|
}
|
|
13520
13553
|
return group;
|
|
13521
13554
|
}
|
|
13522
|
-
function addGlobalOptions(command, presetsEnabled) {
|
|
13555
|
+
function addGlobalOptions(command, presetsEnabled, controls) {
|
|
13523
13556
|
const options = [];
|
|
13524
13557
|
if (presetsEnabled) {
|
|
13525
13558
|
options.push(new Option("--preset <path>", "Load parameter defaults from a JSON file."));
|
|
13526
13559
|
}
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
|
|
13540
|
-
|
|
13541
|
-
|
|
13542
|
-
|
|
13543
|
-
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13560
|
+
if (controls.yes) {
|
|
13561
|
+
options.push(new Option("--yes", "Accept defaults and skip prompts."));
|
|
13562
|
+
}
|
|
13563
|
+
if (controls.output) {
|
|
13564
|
+
options.push(
|
|
13565
|
+
new Option("--output <format>", "Output format.").argParser((value) => {
|
|
13566
|
+
if (value === "rich" || value === "md" || value === "json") {
|
|
13567
|
+
return value;
|
|
13568
|
+
}
|
|
13569
|
+
if (value === "markdown") {
|
|
13570
|
+
return "md";
|
|
13571
|
+
}
|
|
13572
|
+
throw new InvalidArgumentError(
|
|
13573
|
+
formatInvalidEnumMessage("--output", value, ["rich", "md", "markdown", "json"], {
|
|
13574
|
+
candidates: ["rich", "markdown", "json"],
|
|
13575
|
+
threshold: 3
|
|
13576
|
+
})
|
|
13577
|
+
);
|
|
13578
|
+
})
|
|
13579
|
+
);
|
|
13580
|
+
}
|
|
13581
|
+
if (controls.debug) {
|
|
13582
|
+
options.push(
|
|
13583
|
+
new Option("--debug [mode]", "Print stack traces for unexpected errors.").preset("trim").argParser(parseDebugStackMode)
|
|
13584
|
+
);
|
|
13585
|
+
}
|
|
13586
|
+
if (controls.verbose) {
|
|
13587
|
+
options.push(new Option("--verbose", "Print detailed runtime diagnostics."));
|
|
13588
|
+
}
|
|
13548
13589
|
for (const option of options) {
|
|
13549
13590
|
option.hideHelp(true);
|
|
13550
13591
|
command.addOption(option);
|
|
@@ -15342,13 +15383,14 @@ function configureCommanderSuggestionOutput(command) {
|
|
|
15342
15383
|
async function runCLI(roots, options = {}) {
|
|
15343
15384
|
enableSourceMaps();
|
|
15344
15385
|
const normalizedRoot = normalizeRoots(roots, process.argv);
|
|
15345
|
-
const root = options.approvals ===
|
|
15386
|
+
const root = options.approvals === true ? mergeApprovalsGroup(normalizedRoot) : normalizedRoot;
|
|
15346
15387
|
await resolveMcpProxies(root, { projectRoot: options.projectRoot });
|
|
15347
15388
|
const casing = options.casing ?? "kebab";
|
|
15348
15389
|
const services = options.services ?? {};
|
|
15349
15390
|
const runtimeOptions = options.humanInLoop ?? {};
|
|
15350
15391
|
const version = options.version ?? findEntrypointPackageMetadata(process.argv[1])?.version;
|
|
15351
15392
|
const rootUsageName = options.rootUsageName ?? inferProgramName(process.argv);
|
|
15393
|
+
const controls = resolveCLIControls(options.controls);
|
|
15352
15394
|
const servicesWithBuiltIns = {
|
|
15353
15395
|
...services,
|
|
15354
15396
|
runtimeOptions,
|
|
@@ -15368,8 +15410,12 @@ async function runCLI(roots, options = {}) {
|
|
|
15368
15410
|
program.showHelpAfterError();
|
|
15369
15411
|
program.addHelpCommand(false);
|
|
15370
15412
|
const presetsEnabled = options.presets === true;
|
|
15371
|
-
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
15372
|
-
|
|
15413
|
+
const globalLongOptionFlags = getGlobalLongOptionFlags(
|
|
15414
|
+
presetsEnabled,
|
|
15415
|
+
version !== void 0,
|
|
15416
|
+
controls
|
|
15417
|
+
);
|
|
15418
|
+
addGlobalOptions(program, presetsEnabled, controls);
|
|
15373
15419
|
if (version !== void 0) {
|
|
15374
15420
|
program.version(version, "--version");
|
|
15375
15421
|
}
|
|
@@ -15395,7 +15441,8 @@ async function runCLI(roots, options = {}) {
|
|
|
15395
15441
|
casing,
|
|
15396
15442
|
globalLongOptionFlags,
|
|
15397
15443
|
execute,
|
|
15398
|
-
presetsEnabled
|
|
15444
|
+
presetsEnabled,
|
|
15445
|
+
controls
|
|
15399
15446
|
);
|
|
15400
15447
|
if (command === null) {
|
|
15401
15448
|
continue;
|
|
@@ -17066,6 +17113,23 @@ var codexAgent = {
|
|
|
17066
17113
|
}
|
|
17067
17114
|
};
|
|
17068
17115
|
|
|
17116
|
+
// ../agent-defs/src/agents/cursor.ts
|
|
17117
|
+
var cursorAgent = {
|
|
17118
|
+
id: "cursor",
|
|
17119
|
+
name: "cursor",
|
|
17120
|
+
aliases: ["cursor-agent"],
|
|
17121
|
+
label: "Cursor",
|
|
17122
|
+
summary: "Cursor's CLI coding agent.",
|
|
17123
|
+
binaryName: "cursor-agent",
|
|
17124
|
+
configPath: "~/.cursor/cli-config.json",
|
|
17125
|
+
branding: {
|
|
17126
|
+
colors: {
|
|
17127
|
+
dark: "#FFFFFF",
|
|
17128
|
+
light: "#000000"
|
|
17129
|
+
}
|
|
17130
|
+
}
|
|
17131
|
+
};
|
|
17132
|
+
|
|
17069
17133
|
// ../agent-defs/src/agents/gemini-cli.ts
|
|
17070
17134
|
var geminiCliAgent = {
|
|
17071
17135
|
id: "gemini-cli",
|
|
@@ -17180,6 +17244,7 @@ var allAgents = Object.freeze([
|
|
|
17180
17244
|
freezeAgent(claudeCodeAgent),
|
|
17181
17245
|
freezeAgent(claudeDesktopAgent),
|
|
17182
17246
|
freezeAgent(codexAgent),
|
|
17247
|
+
freezeAgent(cursorAgent),
|
|
17183
17248
|
freezeAgent(geminiCliAgent),
|
|
17184
17249
|
freezeAgent(openCodeAgent),
|
|
17185
17250
|
freezeAgent(kimiAgent),
|
|
@@ -17213,6 +17278,10 @@ var agentSkillConfigs = {
|
|
|
17213
17278
|
globalSkillDir: "~/.codex/skills",
|
|
17214
17279
|
localSkillDir: ".codex/skills"
|
|
17215
17280
|
},
|
|
17281
|
+
cursor: {
|
|
17282
|
+
globalSkillDir: "~/.cursor/skills-cursor",
|
|
17283
|
+
localSkillDir: ".cursor/skills"
|
|
17284
|
+
},
|
|
17216
17285
|
"gemini-cli": {
|
|
17217
17286
|
globalSkillDir: "~/.gemini/skills",
|
|
17218
17287
|
localSkillDir: ".gemini/skills"
|
|
@@ -20066,7 +20135,14 @@ async function main(argv = process.argv) {
|
|
|
20066
20135
|
const originalArgv = process.argv;
|
|
20067
20136
|
process.argv = normalizeArgv(argv);
|
|
20068
20137
|
try {
|
|
20069
|
-
await runCLI(createTerminalPilotGroup(), {
|
|
20138
|
+
await runCLI(createTerminalPilotGroup(), {
|
|
20139
|
+
controls: {
|
|
20140
|
+
debug: true,
|
|
20141
|
+
output: true,
|
|
20142
|
+
verbose: true,
|
|
20143
|
+
yes: true
|
|
20144
|
+
}
|
|
20145
|
+
});
|
|
20070
20146
|
} finally {
|
|
20071
20147
|
process.argv = originalArgv;
|
|
20072
20148
|
}
|