terminal-pilot 0.0.20 → 0.0.21
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 +544 -259
- 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/fill.js.map +1 -1
- package/dist/commands/get-session.js.map +1 -1
- package/dist/commands/index.js +220 -126
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +187 -93
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +154 -60
- package/dist/commands/installer.js.map +4 -4
- 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 +187 -93
- package/dist/commands/uninstall.js.map +4 -4
- package/dist/commands/wait-for-exit.js.map +1 -1
- package/dist/commands/wait-for.js.map +1 -1
- package/dist/testing/cli-repl.js +544 -259
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +544 -259
- package/dist/testing/qa-cli.js.map +4 -4
- package/package.json +2 -1
package/dist/commands/install.js
CHANGED
|
@@ -206,11 +206,11 @@ function resolveAgentSupport(input, registry = agentSkillConfigs) {
|
|
|
206
206
|
if (!resolvedId) {
|
|
207
207
|
return { status: "unknown", input };
|
|
208
208
|
}
|
|
209
|
-
const
|
|
210
|
-
if (!
|
|
209
|
+
const config2 = registry[resolvedId];
|
|
210
|
+
if (!config2) {
|
|
211
211
|
return { status: "unsupported", input, id: resolvedId };
|
|
212
212
|
}
|
|
213
|
-
return { status: "supported", input, id: resolvedId, config: { ...
|
|
213
|
+
return { status: "supported", input, id: resolvedId, config: { ...config2 } };
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// ../config-mutations/src/mutations/file-mutation.ts
|
|
@@ -307,7 +307,7 @@ var templateMutation = {
|
|
|
307
307
|
// ../config-mutations/src/execution/apply-mutation.ts
|
|
308
308
|
import path3 from "node:path";
|
|
309
309
|
|
|
310
|
-
// ../design
|
|
310
|
+
// ../toolcraft-design/src/internal/color-support.ts
|
|
311
311
|
function supportsColor(env = process.env, stream = process.stdout) {
|
|
312
312
|
if (env.FORCE_COLOR !== void 0 && env.FORCE_COLOR !== "0") {
|
|
313
313
|
return true;
|
|
@@ -321,7 +321,7 @@ function supportsColor(env = process.env, stream = process.stdout) {
|
|
|
321
321
|
return typeof env.TERM === "string" && env.TERM.length > 0 && env.TERM !== "dumb";
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
-
// ../design
|
|
324
|
+
// ../toolcraft-design/src/components/color.ts
|
|
325
325
|
var reset = "\x1B[0m";
|
|
326
326
|
var ansiStyles = {
|
|
327
327
|
reset: { open: reset },
|
|
@@ -423,41 +423,122 @@ function createColor(styles = []) {
|
|
|
423
423
|
}
|
|
424
424
|
var color = createColor();
|
|
425
425
|
|
|
426
|
-
// ../design
|
|
427
|
-
var
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
number: (text4) => color.cyanBright(text4),
|
|
432
|
-
intro: (text4) => color.bgMagenta.white(` Poe - ${text4} `),
|
|
433
|
-
resolvedSymbol: color.magenta("\u25C7"),
|
|
434
|
-
errorSymbol: color.red("\u25A0"),
|
|
435
|
-
accent: (text4) => color.cyan(text4),
|
|
436
|
-
muted: (text4) => color.dim(text4),
|
|
437
|
-
success: (text4) => color.green(text4),
|
|
438
|
-
warning: (text4) => color.yellow(text4),
|
|
439
|
-
error: (text4) => color.red(text4),
|
|
440
|
-
info: (text4) => color.magenta(text4),
|
|
441
|
-
badge: (text4) => color.bgYellow.black(` ${text4} `)
|
|
426
|
+
// ../toolcraft-design/src/tokens/brand.ts
|
|
427
|
+
var brands = {
|
|
428
|
+
purple: { name: "purple", primary: "#a200ff" },
|
|
429
|
+
blue: { name: "blue", primary: "#2f6fed" },
|
|
430
|
+
green: { name: "green", primary: "#1f9d57" }
|
|
442
431
|
};
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
intro: (text4) => color.bgHex("#a200ff").white(` Poe - ${text4} `),
|
|
449
|
-
resolvedSymbol: color.hex("#a200ff")("\u25C7"),
|
|
450
|
-
errorSymbol: color.hex("#cc0000")("\u25A0"),
|
|
451
|
-
accent: (text4) => color.hex("#006699").bold(text4),
|
|
452
|
-
muted: (text4) => color.hex("#666666")(text4),
|
|
453
|
-
success: (text4) => color.hex("#008800")(text4),
|
|
454
|
-
warning: (text4) => color.hex("#cc6600")(text4),
|
|
455
|
-
error: (text4) => color.hex("#cc0000")(text4),
|
|
456
|
-
info: (text4) => color.hex("#a200ff")(text4),
|
|
457
|
-
badge: (text4) => color.bgHex("#cc6600").white(` ${text4} `)
|
|
432
|
+
|
|
433
|
+
// ../toolcraft-design/src/internal/theme-state.ts
|
|
434
|
+
var defaults = {
|
|
435
|
+
brand: "purple",
|
|
436
|
+
label: "Poe"
|
|
458
437
|
};
|
|
438
|
+
var config = { ...defaults };
|
|
439
|
+
var revision = 0;
|
|
440
|
+
var brandConfigured = false;
|
|
441
|
+
function getThemeConfig() {
|
|
442
|
+
return { ...config };
|
|
443
|
+
}
|
|
444
|
+
function getThemeRevision() {
|
|
445
|
+
return revision;
|
|
446
|
+
}
|
|
447
|
+
function isThemeBrandConfigured() {
|
|
448
|
+
return brandConfigured;
|
|
449
|
+
}
|
|
459
450
|
|
|
460
|
-
// ../design
|
|
451
|
+
// ../toolcraft-design/src/tokens/colors.ts
|
|
452
|
+
var brand = brands.purple.primary;
|
|
453
|
+
function withStyles(palette, styles) {
|
|
454
|
+
return Object.defineProperty(palette, "styles", {
|
|
455
|
+
value: styles,
|
|
456
|
+
enumerable: false
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
function brandColor(activeBrand, purple) {
|
|
460
|
+
return activeBrand.name === "purple" ? purple : color.hex(activeBrand.primary);
|
|
461
|
+
}
|
|
462
|
+
function brandBackground(activeBrand, purple) {
|
|
463
|
+
return activeBrand.name === "purple" ? purple : color.bgHex(activeBrand.primary);
|
|
464
|
+
}
|
|
465
|
+
function createPalette(activeBrand, mode) {
|
|
466
|
+
const isPurple = activeBrand.name === "purple";
|
|
467
|
+
if (mode === "light") {
|
|
468
|
+
const active2 = color.hex(activeBrand.primary);
|
|
469
|
+
const prompt2 = isPurple ? color.hex("#006699") : active2;
|
|
470
|
+
const number2 = isPurple ? color.hex("#0077cc") : active2;
|
|
471
|
+
return withStyles(
|
|
472
|
+
{
|
|
473
|
+
header: (text4) => active2.bold(text4),
|
|
474
|
+
divider: (text4) => color.hex("#666666")(text4),
|
|
475
|
+
prompt: (text4) => prompt2.bold(text4),
|
|
476
|
+
number: (text4) => number2.bold(text4),
|
|
477
|
+
intro: (text4) => color.bgHex(activeBrand.primary).white(` ${getThemeConfig().label} - ${text4} `),
|
|
478
|
+
get resolvedSymbol() {
|
|
479
|
+
return active2("\u25C7");
|
|
480
|
+
},
|
|
481
|
+
get errorSymbol() {
|
|
482
|
+
return color.hex("#cc0000")("\u25A0");
|
|
483
|
+
},
|
|
484
|
+
accent: (text4) => prompt2.bold(text4),
|
|
485
|
+
muted: (text4) => color.hex("#666666")(text4),
|
|
486
|
+
success: (text4) => color.hex("#008800")(text4),
|
|
487
|
+
warning: (text4) => color.hex("#cc6600")(text4),
|
|
488
|
+
error: (text4) => color.hex("#cc0000")(text4),
|
|
489
|
+
info: (text4) => active2(text4),
|
|
490
|
+
badge: (text4) => color.bgHex("#cc6600").white(` ${text4} `)
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
accent: { fg: isPurple ? "#006699" : activeBrand.primary, bold: true },
|
|
494
|
+
muted: { fg: "#666666" },
|
|
495
|
+
success: { fg: "#008800" },
|
|
496
|
+
warning: { fg: "#cc6600" },
|
|
497
|
+
error: { fg: "#cc0000" },
|
|
498
|
+
info: { fg: activeBrand.primary }
|
|
499
|
+
}
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
const active = brandColor(activeBrand, color.magenta);
|
|
503
|
+
const activeBright = brandColor(activeBrand, color.magentaBright);
|
|
504
|
+
const activeBackground = brandBackground(activeBrand, color.bgMagenta);
|
|
505
|
+
const prompt = isPurple ? color.cyan : active;
|
|
506
|
+
const number = isPurple ? color.cyanBright : active;
|
|
507
|
+
return withStyles(
|
|
508
|
+
{
|
|
509
|
+
header: (text4) => activeBright.bold(text4),
|
|
510
|
+
divider: (text4) => color.dim(text4),
|
|
511
|
+
prompt: (text4) => prompt(text4),
|
|
512
|
+
number: (text4) => number(text4),
|
|
513
|
+
intro: (text4) => activeBackground.white(` ${getThemeConfig().label} - ${text4} `),
|
|
514
|
+
get resolvedSymbol() {
|
|
515
|
+
return active("\u25C7");
|
|
516
|
+
},
|
|
517
|
+
get errorSymbol() {
|
|
518
|
+
return color.red("\u25A0");
|
|
519
|
+
},
|
|
520
|
+
accent: (text4) => prompt(text4),
|
|
521
|
+
muted: (text4) => color.dim(text4),
|
|
522
|
+
success: (text4) => color.green(text4),
|
|
523
|
+
warning: (text4) => color.yellow(text4),
|
|
524
|
+
error: (text4) => color.red(text4),
|
|
525
|
+
info: (text4) => active(text4),
|
|
526
|
+
badge: (text4) => color.bgYellow.black(` ${text4} `)
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
accent: { fg: isPurple ? "cyan" : activeBrand.primary, bold: true },
|
|
530
|
+
muted: { dim: true },
|
|
531
|
+
success: { fg: "green" },
|
|
532
|
+
warning: { fg: "yellow" },
|
|
533
|
+
error: { fg: "red" },
|
|
534
|
+
info: { fg: isPurple ? "magenta" : activeBrand.primary }
|
|
535
|
+
}
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
var dark = createPalette(brands.purple, "dark");
|
|
539
|
+
var light = createPalette(brands.purple, "light");
|
|
540
|
+
|
|
541
|
+
// ../toolcraft-design/src/internal/output-format.ts
|
|
461
542
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
462
543
|
var VALID_FORMATS = /* @__PURE__ */ new Set(["terminal", "markdown", "json"]);
|
|
463
544
|
var formatStorage = new AsyncLocalStorage();
|
|
@@ -475,7 +556,7 @@ function resolveOutputFormat(env = process.env) {
|
|
|
475
556
|
return cached;
|
|
476
557
|
}
|
|
477
558
|
|
|
478
|
-
// ../design
|
|
559
|
+
// ../toolcraft-design/src/internal/theme-detect.ts
|
|
479
560
|
function detectThemeFromEnv(env) {
|
|
480
561
|
const apple = env.APPLE_INTERFACE_STYLE;
|
|
481
562
|
if (typeof apple === "string") {
|
|
@@ -512,17 +593,30 @@ function resolveThemeName(env = process.env) {
|
|
|
512
593
|
}
|
|
513
594
|
return "dark";
|
|
514
595
|
}
|
|
515
|
-
var
|
|
596
|
+
var themeCache = /* @__PURE__ */ new Map();
|
|
597
|
+
var cachedRevision = -1;
|
|
516
598
|
function getTheme(env) {
|
|
599
|
+
const themeName = resolveThemeName(env);
|
|
600
|
+
const config2 = getThemeConfig();
|
|
601
|
+
const requestedBrand = env?.POE_BRAND?.toLowerCase();
|
|
602
|
+
const activeBrandName = !isThemeBrandConfigured() && requestedBrand && Object.hasOwn(brands, requestedBrand) ? requestedBrand : config2.brand;
|
|
603
|
+
const revision2 = getThemeRevision();
|
|
604
|
+
if (revision2 !== cachedRevision) {
|
|
605
|
+
themeCache.clear();
|
|
606
|
+
cachedRevision = revision2;
|
|
607
|
+
}
|
|
608
|
+
const cacheKey = `${activeBrandName}:${themeName}`;
|
|
609
|
+
const cachedTheme = themeCache.get(cacheKey);
|
|
517
610
|
if (cachedTheme) {
|
|
518
611
|
return cachedTheme;
|
|
519
612
|
}
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
613
|
+
const activeBrand = brands[activeBrandName];
|
|
614
|
+
const theme = activeBrandName === "purple" ? themeName === "light" ? light : dark : createPalette(activeBrand, themeName);
|
|
615
|
+
themeCache.set(cacheKey, theme);
|
|
616
|
+
return theme;
|
|
523
617
|
}
|
|
524
618
|
|
|
525
|
-
// ../design
|
|
619
|
+
// ../toolcraft-design/src/components/symbols.ts
|
|
526
620
|
var symbols = {
|
|
527
621
|
get info() {
|
|
528
622
|
const format = resolveOutputFormat();
|
|
@@ -576,12 +670,12 @@ var symbols = {
|
|
|
576
670
|
}
|
|
577
671
|
};
|
|
578
672
|
|
|
579
|
-
// ../design
|
|
673
|
+
// ../toolcraft-design/src/internal/strip-ansi.ts
|
|
580
674
|
function stripAnsi(value) {
|
|
581
675
|
return value.replace(/\u001b\[[0-9;]*m/g, "");
|
|
582
676
|
}
|
|
583
677
|
|
|
584
|
-
// ../design
|
|
678
|
+
// ../toolcraft-design/src/prompts/primitives/log.ts
|
|
585
679
|
function renderMarkdownInline(value) {
|
|
586
680
|
return stripAnsi(value).replaceAll("\r\n", " ").replaceAll("\n", " ").replaceAll("\r", " ");
|
|
587
681
|
}
|
|
@@ -708,7 +802,7 @@ var log = {
|
|
|
708
802
|
error
|
|
709
803
|
};
|
|
710
804
|
|
|
711
|
-
// ../design
|
|
805
|
+
// ../toolcraft-design/src/components/logger.ts
|
|
712
806
|
function createLogger(emitter) {
|
|
713
807
|
const emit = (level, message2) => {
|
|
714
808
|
if (emitter) {
|
|
@@ -769,13 +863,13 @@ function createLogger(emitter) {
|
|
|
769
863
|
}
|
|
770
864
|
var logger = createLogger();
|
|
771
865
|
|
|
772
|
-
// ../design
|
|
866
|
+
// ../toolcraft-design/src/components/help-formatter.ts
|
|
773
867
|
var graphemeSegmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
774
868
|
|
|
775
|
-
// ../design
|
|
869
|
+
// ../toolcraft-design/src/components/table.ts
|
|
776
870
|
var graphemeSegmenter2 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
777
871
|
|
|
778
|
-
// ../design
|
|
872
|
+
// ../toolcraft-design/src/components/template.ts
|
|
779
873
|
var MAX_PARTIAL_DEPTH = 100;
|
|
780
874
|
var HTML_ESCAPE = {
|
|
781
875
|
"&": "&",
|
|
@@ -1187,22 +1281,22 @@ function hasProperty(value, key) {
|
|
|
1187
1281
|
return Object.prototype.hasOwnProperty.call(value, key);
|
|
1188
1282
|
}
|
|
1189
1283
|
|
|
1190
|
-
// ../design
|
|
1284
|
+
// ../toolcraft-design/src/components/browser.ts
|
|
1191
1285
|
import { spawn } from "node:child_process";
|
|
1192
1286
|
import process2 from "node:process";
|
|
1193
1287
|
|
|
1194
|
-
// ../design
|
|
1288
|
+
// ../toolcraft-design/src/acp/writer.ts
|
|
1195
1289
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
1196
1290
|
var storage = new AsyncLocalStorage2();
|
|
1197
1291
|
|
|
1198
|
-
// ../design
|
|
1292
|
+
// ../toolcraft-design/src/dashboard/terminal-width.ts
|
|
1199
1293
|
var graphemeSegmenter3 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
1200
1294
|
|
|
1201
|
-
// ../design
|
|
1295
|
+
// ../toolcraft-design/src/dashboard/terminal.ts
|
|
1202
1296
|
import readline from "node:readline";
|
|
1203
1297
|
import { PassThrough } from "node:stream";
|
|
1204
1298
|
|
|
1205
|
-
// ../design
|
|
1299
|
+
// ../toolcraft-design/src/explorer/state.ts
|
|
1206
1300
|
var REGION_HEADER = 1 << 0;
|
|
1207
1301
|
var REGION_LIST = 1 << 1;
|
|
1208
1302
|
var REGION_DETAIL = 1 << 2;
|
|
@@ -1211,13 +1305,13 @@ var REGION_MODAL = 1 << 4;
|
|
|
1211
1305
|
var REGION_TOAST = 1 << 5;
|
|
1212
1306
|
var REGION_ALL = REGION_HEADER | REGION_LIST | REGION_DETAIL | REGION_FOOTER | REGION_MODAL | REGION_TOAST;
|
|
1213
1307
|
|
|
1214
|
-
// ../design
|
|
1308
|
+
// ../toolcraft-design/src/prompts/index.ts
|
|
1215
1309
|
import * as clack from "@clack/prompts";
|
|
1216
1310
|
|
|
1217
|
-
// ../design
|
|
1311
|
+
// ../toolcraft-design/src/prompts/primitives/cancel.ts
|
|
1218
1312
|
import { isCancel } from "@clack/prompts";
|
|
1219
1313
|
|
|
1220
|
-
// ../design
|
|
1314
|
+
// ../toolcraft-design/src/static/spinner.ts
|
|
1221
1315
|
var SPINNER_FRAMES = Object.freeze(["\u25D2", "\u25D0", "\u25D3", "\u25D1"]);
|
|
1222
1316
|
|
|
1223
1317
|
// ../config-mutations/src/formats/json.ts
|
|
@@ -2451,14 +2545,14 @@ async function installSkill(agentId, skill, options) {
|
|
|
2451
2545
|
throw new UnsupportedAgentError(agentId);
|
|
2452
2546
|
}
|
|
2453
2547
|
const scope = options.scope ?? "local";
|
|
2454
|
-
const
|
|
2548
|
+
const config2 = support.config;
|
|
2455
2549
|
if (skill.name.length === 0 || skill.name === "." || skill.name === ".." || skill.name.includes("/") || skill.name.includes("\\") || skill.name.includes("\n") || skill.name.includes("\r")) {
|
|
2456
2550
|
throw new Error(`Invalid skill name: ${skill.name}`);
|
|
2457
2551
|
}
|
|
2458
|
-
const skillDir = scope === "global" ?
|
|
2552
|
+
const skillDir = scope === "global" ? config2.globalSkillDir : toHomeRelative(config2.localSkillDir);
|
|
2459
2553
|
const skillFolderPath = `${skillDir}/${skill.name}`;
|
|
2460
2554
|
const skillFilePath = `${skillFolderPath}/SKILL.md`;
|
|
2461
|
-
const displayPath = `${scope === "global" ?
|
|
2555
|
+
const displayPath = `${scope === "global" ? config2.globalSkillDir : config2.localSkillDir}/${skill.name}/SKILL.md`;
|
|
2462
2556
|
const absoluteSkillPath = `${scope === "global" ? options.homeDir : options.cwd}/${skillFilePath.slice(2)}`;
|
|
2463
2557
|
if (await pathExists2(options.fs, absoluteSkillPath)) {
|
|
2464
2558
|
throw new Error(`Skill already exists: ${displayPath}`);
|
|
@@ -2517,19 +2611,19 @@ var UserError = class extends Error {
|
|
|
2517
2611
|
};
|
|
2518
2612
|
|
|
2519
2613
|
// ../toolcraft/src/human-in-loop/config.ts
|
|
2520
|
-
function validateHumanInLoopOnDefine(
|
|
2521
|
-
const label = Array.isArray(
|
|
2522
|
-
if (
|
|
2523
|
-
throw new Error(`${label} '${
|
|
2614
|
+
function validateHumanInLoopOnDefine(config2) {
|
|
2615
|
+
const label = Array.isArray(config2.children) ? "group" : "command";
|
|
2616
|
+
if (config2.confirm === true && config2.humanInLoop !== void 0 && config2.humanInLoop !== null) {
|
|
2617
|
+
throw new Error(`${label} '${config2.name}': use either confirm or humanInLoop, not both`);
|
|
2524
2618
|
}
|
|
2525
|
-
if (
|
|
2619
|
+
if (config2.humanInLoop === void 0 || config2.humanInLoop === null) {
|
|
2526
2620
|
return;
|
|
2527
2621
|
}
|
|
2528
|
-
if (
|
|
2529
|
-
throw new Error(`${label} '${
|
|
2622
|
+
if (config2.humanInLoop.mode !== "sync" && config2.humanInLoop.mode !== "async") {
|
|
2623
|
+
throw new Error(`${label} '${config2.name}': humanInLoop.mode must be "sync" or "async"`);
|
|
2530
2624
|
}
|
|
2531
|
-
if (typeof
|
|
2532
|
-
throw new Error(`${label} '${
|
|
2625
|
+
if (typeof config2.humanInLoop.message !== "function") {
|
|
2626
|
+
throw new Error(`${label} '${config2.name}': humanInLoop.message must be a function`);
|
|
2533
2627
|
}
|
|
2534
2628
|
}
|
|
2535
2629
|
function mergeHumanInLoopFromGroup(groupHumanInLoop, childHumanInLoop) {
|
|
@@ -2559,12 +2653,12 @@ function assertValidBranches(branches, discriminator) {
|
|
|
2559
2653
|
}
|
|
2560
2654
|
}
|
|
2561
2655
|
}
|
|
2562
|
-
function OneOf(
|
|
2563
|
-
assertValidBranches(
|
|
2656
|
+
function OneOf(config2) {
|
|
2657
|
+
assertValidBranches(config2.branches, config2.discriminator);
|
|
2564
2658
|
return {
|
|
2565
2659
|
kind: "oneOf",
|
|
2566
|
-
discriminator:
|
|
2567
|
-
branches:
|
|
2660
|
+
discriminator: config2.discriminator,
|
|
2661
|
+
branches: config2.branches
|
|
2568
2662
|
};
|
|
2569
2663
|
}
|
|
2570
2664
|
|
|
@@ -2844,28 +2938,28 @@ function mergeSecrets(parent, child) {
|
|
|
2844
2938
|
function resolveCommandScope(ownScope, inheritedScope) {
|
|
2845
2939
|
return cloneScope(ownScope ?? inheritedScope) ?? ["cli", "sdk"];
|
|
2846
2940
|
}
|
|
2847
|
-
function createBaseCommand(
|
|
2941
|
+
function createBaseCommand(config2) {
|
|
2848
2942
|
const command = {
|
|
2849
2943
|
kind: "command",
|
|
2850
|
-
name:
|
|
2851
|
-
description:
|
|
2852
|
-
aliases: [...
|
|
2853
|
-
positional: [...
|
|
2854
|
-
params:
|
|
2855
|
-
secrets: cloneSecrets(
|
|
2856
|
-
scope: resolveCommandScope(
|
|
2857
|
-
confirm:
|
|
2858
|
-
humanInLoop:
|
|
2859
|
-
requires: cloneRequires(
|
|
2860
|
-
handler:
|
|
2861
|
-
render:
|
|
2944
|
+
name: config2.name,
|
|
2945
|
+
description: config2.description,
|
|
2946
|
+
aliases: [...config2.aliases ?? []],
|
|
2947
|
+
positional: [...config2.positional ?? []],
|
|
2948
|
+
params: config2.params,
|
|
2949
|
+
secrets: cloneSecrets(config2.secrets),
|
|
2950
|
+
scope: resolveCommandScope(config2.scope, void 0),
|
|
2951
|
+
confirm: config2.confirm ?? false,
|
|
2952
|
+
humanInLoop: config2.humanInLoop,
|
|
2953
|
+
requires: cloneRequires(config2.requires),
|
|
2954
|
+
handler: config2.handler,
|
|
2955
|
+
render: config2.render
|
|
2862
2956
|
};
|
|
2863
2957
|
Object.defineProperty(command, commandConfigSymbol, {
|
|
2864
2958
|
value: {
|
|
2865
|
-
scope: cloneScope(
|
|
2866
|
-
humanInLoop:
|
|
2867
|
-
secrets: cloneSecrets(
|
|
2868
|
-
requires: cloneRequires(
|
|
2959
|
+
scope: cloneScope(config2.scope),
|
|
2960
|
+
humanInLoop: config2.humanInLoop,
|
|
2961
|
+
secrets: cloneSecrets(config2.secrets),
|
|
2962
|
+
requires: cloneRequires(config2.requires),
|
|
2869
2963
|
sourcePath: inferCommandSourcePath()
|
|
2870
2964
|
}
|
|
2871
2965
|
});
|
|
@@ -2905,10 +2999,10 @@ function materializeCommand(command, inherited) {
|
|
|
2905
2999
|
});
|
|
2906
3000
|
return materialized;
|
|
2907
3001
|
}
|
|
2908
|
-
function defineCommand(
|
|
2909
|
-
validateHumanInLoopOnDefine(
|
|
3002
|
+
function defineCommand(config2) {
|
|
3003
|
+
validateHumanInLoopOnDefine(config2);
|
|
2910
3004
|
return materializeCommand(
|
|
2911
|
-
createBaseCommand(
|
|
3005
|
+
createBaseCommand(config2),
|
|
2912
3006
|
{
|
|
2913
3007
|
scope: void 0,
|
|
2914
3008
|
humanInLoop: void 0,
|