terminal-pilot 0.0.19 → 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 +1076 -496
- 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 +481 -163
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +448 -130
- 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 +1072 -492
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +1082 -502
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/@poe-code/agent-skill-config/README.md +103 -0
- package/node_modules/@poe-code/agent-skill-config/dist/apply.d.ts +25 -0
- package/node_modules/@poe-code/agent-skill-config/dist/apply.js +159 -0
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.d.ts +23 -0
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +341 -0
- package/node_modules/@poe-code/agent-skill-config/dist/configs.d.ts +16 -0
- package/node_modules/@poe-code/agent-skill-config/dist/configs.js +70 -0
- package/node_modules/@poe-code/agent-skill-config/dist/exports.compile-check.d.ts +1 -0
- package/node_modules/@poe-code/agent-skill-config/dist/exports.compile-check.js +1 -0
- package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.d.ts +8 -0
- package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +159 -0
- package/node_modules/@poe-code/agent-skill-config/dist/index.d.ts +11 -0
- package/node_modules/@poe-code/agent-skill-config/dist/index.js +6 -0
- package/node_modules/@poe-code/agent-skill-config/dist/resolve-skill-reference.d.ts +22 -0
- package/node_modules/@poe-code/agent-skill-config/dist/resolve-skill-reference.js +87 -0
- package/node_modules/@poe-code/agent-skill-config/dist/templates/poe-generate.md +47 -0
- package/node_modules/@poe-code/agent-skill-config/dist/templates/terminal-pilot.md +45 -0
- package/node_modules/@poe-code/agent-skill-config/dist/templates.d.ts +3 -0
- package/node_modules/@poe-code/agent-skill-config/dist/templates.js +63 -0
- package/node_modules/@poe-code/agent-skill-config/dist/types.d.ts +16 -0
- package/node_modules/@poe-code/agent-skill-config/dist/types.js +1 -0
- package/node_modules/@poe-code/agent-skill-config/package.json +24 -0
- package/package.json +4 -2
|
@@ -228,11 +228,11 @@ function resolveAgentSupport(input, registry = agentSkillConfigs) {
|
|
|
228
228
|
if (!resolvedId) {
|
|
229
229
|
return { status: "unknown", input };
|
|
230
230
|
}
|
|
231
|
-
const
|
|
232
|
-
if (!
|
|
231
|
+
const config2 = registry[resolvedId];
|
|
232
|
+
if (!config2) {
|
|
233
233
|
return { status: "unsupported", input, id: resolvedId };
|
|
234
234
|
}
|
|
235
|
-
return { status: "supported", input, id: resolvedId, config: { ...
|
|
235
|
+
return { status: "supported", input, id: resolvedId, config: { ...config2 } };
|
|
236
236
|
}
|
|
237
237
|
function getAgentConfig(agentId) {
|
|
238
238
|
const support = resolveAgentSupport(agentId);
|
|
@@ -242,7 +242,7 @@ function getAgentConfig(agentId) {
|
|
|
242
242
|
// ../config-mutations/src/execution/apply-mutation.ts
|
|
243
243
|
import path4 from "node:path";
|
|
244
244
|
|
|
245
|
-
// ../design
|
|
245
|
+
// ../toolcraft-design/src/internal/color-support.ts
|
|
246
246
|
function supportsColor(env = process.env, stream = process.stdout) {
|
|
247
247
|
if (env.FORCE_COLOR !== void 0 && env.FORCE_COLOR !== "0") {
|
|
248
248
|
return true;
|
|
@@ -256,7 +256,7 @@ function supportsColor(env = process.env, stream = process.stdout) {
|
|
|
256
256
|
return typeof env.TERM === "string" && env.TERM.length > 0 && env.TERM !== "dumb";
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
// ../design
|
|
259
|
+
// ../toolcraft-design/src/components/color.ts
|
|
260
260
|
var reset = "\x1B[0m";
|
|
261
261
|
var ansiStyles = {
|
|
262
262
|
reset: { open: reset },
|
|
@@ -358,41 +358,122 @@ function createColor(styles = []) {
|
|
|
358
358
|
}
|
|
359
359
|
var color = createColor();
|
|
360
360
|
|
|
361
|
-
// ../design
|
|
362
|
-
var
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
number: (text4) => color.cyanBright(text4),
|
|
367
|
-
intro: (text4) => color.bgMagenta.white(` Poe - ${text4} `),
|
|
368
|
-
resolvedSymbol: color.magenta("\u25C7"),
|
|
369
|
-
errorSymbol: color.red("\u25A0"),
|
|
370
|
-
accent: (text4) => color.cyan(text4),
|
|
371
|
-
muted: (text4) => color.dim(text4),
|
|
372
|
-
success: (text4) => color.green(text4),
|
|
373
|
-
warning: (text4) => color.yellow(text4),
|
|
374
|
-
error: (text4) => color.red(text4),
|
|
375
|
-
info: (text4) => color.magenta(text4),
|
|
376
|
-
badge: (text4) => color.bgYellow.black(` ${text4} `)
|
|
361
|
+
// ../toolcraft-design/src/tokens/brand.ts
|
|
362
|
+
var brands = {
|
|
363
|
+
purple: { name: "purple", primary: "#a200ff" },
|
|
364
|
+
blue: { name: "blue", primary: "#2f6fed" },
|
|
365
|
+
green: { name: "green", primary: "#1f9d57" }
|
|
377
366
|
};
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
intro: (text4) => color.bgHex("#a200ff").white(` Poe - ${text4} `),
|
|
384
|
-
resolvedSymbol: color.hex("#a200ff")("\u25C7"),
|
|
385
|
-
errorSymbol: color.hex("#cc0000")("\u25A0"),
|
|
386
|
-
accent: (text4) => color.hex("#006699").bold(text4),
|
|
387
|
-
muted: (text4) => color.hex("#666666")(text4),
|
|
388
|
-
success: (text4) => color.hex("#008800")(text4),
|
|
389
|
-
warning: (text4) => color.hex("#cc6600")(text4),
|
|
390
|
-
error: (text4) => color.hex("#cc0000")(text4),
|
|
391
|
-
info: (text4) => color.hex("#a200ff")(text4),
|
|
392
|
-
badge: (text4) => color.bgHex("#cc6600").white(` ${text4} `)
|
|
367
|
+
|
|
368
|
+
// ../toolcraft-design/src/internal/theme-state.ts
|
|
369
|
+
var defaults = {
|
|
370
|
+
brand: "purple",
|
|
371
|
+
label: "Poe"
|
|
393
372
|
};
|
|
373
|
+
var config = { ...defaults };
|
|
374
|
+
var revision = 0;
|
|
375
|
+
var brandConfigured = false;
|
|
376
|
+
function getThemeConfig() {
|
|
377
|
+
return { ...config };
|
|
378
|
+
}
|
|
379
|
+
function getThemeRevision() {
|
|
380
|
+
return revision;
|
|
381
|
+
}
|
|
382
|
+
function isThemeBrandConfigured() {
|
|
383
|
+
return brandConfigured;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// ../toolcraft-design/src/tokens/colors.ts
|
|
387
|
+
var brand = brands.purple.primary;
|
|
388
|
+
function withStyles(palette, styles) {
|
|
389
|
+
return Object.defineProperty(palette, "styles", {
|
|
390
|
+
value: styles,
|
|
391
|
+
enumerable: false
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
function brandColor(activeBrand, purple) {
|
|
395
|
+
return activeBrand.name === "purple" ? purple : color.hex(activeBrand.primary);
|
|
396
|
+
}
|
|
397
|
+
function brandBackground(activeBrand, purple) {
|
|
398
|
+
return activeBrand.name === "purple" ? purple : color.bgHex(activeBrand.primary);
|
|
399
|
+
}
|
|
400
|
+
function createPalette(activeBrand, mode) {
|
|
401
|
+
const isPurple = activeBrand.name === "purple";
|
|
402
|
+
if (mode === "light") {
|
|
403
|
+
const active2 = color.hex(activeBrand.primary);
|
|
404
|
+
const prompt2 = isPurple ? color.hex("#006699") : active2;
|
|
405
|
+
const number2 = isPurple ? color.hex("#0077cc") : active2;
|
|
406
|
+
return withStyles(
|
|
407
|
+
{
|
|
408
|
+
header: (text4) => active2.bold(text4),
|
|
409
|
+
divider: (text4) => color.hex("#666666")(text4),
|
|
410
|
+
prompt: (text4) => prompt2.bold(text4),
|
|
411
|
+
number: (text4) => number2.bold(text4),
|
|
412
|
+
intro: (text4) => color.bgHex(activeBrand.primary).white(` ${getThemeConfig().label} - ${text4} `),
|
|
413
|
+
get resolvedSymbol() {
|
|
414
|
+
return active2("\u25C7");
|
|
415
|
+
},
|
|
416
|
+
get errorSymbol() {
|
|
417
|
+
return color.hex("#cc0000")("\u25A0");
|
|
418
|
+
},
|
|
419
|
+
accent: (text4) => prompt2.bold(text4),
|
|
420
|
+
muted: (text4) => color.hex("#666666")(text4),
|
|
421
|
+
success: (text4) => color.hex("#008800")(text4),
|
|
422
|
+
warning: (text4) => color.hex("#cc6600")(text4),
|
|
423
|
+
error: (text4) => color.hex("#cc0000")(text4),
|
|
424
|
+
info: (text4) => active2(text4),
|
|
425
|
+
badge: (text4) => color.bgHex("#cc6600").white(` ${text4} `)
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
accent: { fg: isPurple ? "#006699" : activeBrand.primary, bold: true },
|
|
429
|
+
muted: { fg: "#666666" },
|
|
430
|
+
success: { fg: "#008800" },
|
|
431
|
+
warning: { fg: "#cc6600" },
|
|
432
|
+
error: { fg: "#cc0000" },
|
|
433
|
+
info: { fg: activeBrand.primary }
|
|
434
|
+
}
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
const active = brandColor(activeBrand, color.magenta);
|
|
438
|
+
const activeBright = brandColor(activeBrand, color.magentaBright);
|
|
439
|
+
const activeBackground = brandBackground(activeBrand, color.bgMagenta);
|
|
440
|
+
const prompt = isPurple ? color.cyan : active;
|
|
441
|
+
const number = isPurple ? color.cyanBright : active;
|
|
442
|
+
return withStyles(
|
|
443
|
+
{
|
|
444
|
+
header: (text4) => activeBright.bold(text4),
|
|
445
|
+
divider: (text4) => color.dim(text4),
|
|
446
|
+
prompt: (text4) => prompt(text4),
|
|
447
|
+
number: (text4) => number(text4),
|
|
448
|
+
intro: (text4) => activeBackground.white(` ${getThemeConfig().label} - ${text4} `),
|
|
449
|
+
get resolvedSymbol() {
|
|
450
|
+
return active("\u25C7");
|
|
451
|
+
},
|
|
452
|
+
get errorSymbol() {
|
|
453
|
+
return color.red("\u25A0");
|
|
454
|
+
},
|
|
455
|
+
accent: (text4) => prompt(text4),
|
|
456
|
+
muted: (text4) => color.dim(text4),
|
|
457
|
+
success: (text4) => color.green(text4),
|
|
458
|
+
warning: (text4) => color.yellow(text4),
|
|
459
|
+
error: (text4) => color.red(text4),
|
|
460
|
+
info: (text4) => active(text4),
|
|
461
|
+
badge: (text4) => color.bgYellow.black(` ${text4} `)
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
accent: { fg: isPurple ? "cyan" : activeBrand.primary, bold: true },
|
|
465
|
+
muted: { dim: true },
|
|
466
|
+
success: { fg: "green" },
|
|
467
|
+
warning: { fg: "yellow" },
|
|
468
|
+
error: { fg: "red" },
|
|
469
|
+
info: { fg: isPurple ? "magenta" : activeBrand.primary }
|
|
470
|
+
}
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
var dark = createPalette(brands.purple, "dark");
|
|
474
|
+
var light = createPalette(brands.purple, "light");
|
|
394
475
|
|
|
395
|
-
// ../design
|
|
476
|
+
// ../toolcraft-design/src/internal/output-format.ts
|
|
396
477
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
397
478
|
var VALID_FORMATS = /* @__PURE__ */ new Set(["terminal", "markdown", "json"]);
|
|
398
479
|
var formatStorage = new AsyncLocalStorage();
|
|
@@ -410,7 +491,7 @@ function resolveOutputFormat(env = process.env) {
|
|
|
410
491
|
return cached;
|
|
411
492
|
}
|
|
412
493
|
|
|
413
|
-
// ../design
|
|
494
|
+
// ../toolcraft-design/src/internal/theme-detect.ts
|
|
414
495
|
function detectThemeFromEnv(env) {
|
|
415
496
|
const apple = env.APPLE_INTERFACE_STYLE;
|
|
416
497
|
if (typeof apple === "string") {
|
|
@@ -447,17 +528,30 @@ function resolveThemeName(env = process.env) {
|
|
|
447
528
|
}
|
|
448
529
|
return "dark";
|
|
449
530
|
}
|
|
450
|
-
var
|
|
531
|
+
var themeCache = /* @__PURE__ */ new Map();
|
|
532
|
+
var cachedRevision = -1;
|
|
451
533
|
function getTheme(env) {
|
|
534
|
+
const themeName = resolveThemeName(env);
|
|
535
|
+
const config2 = getThemeConfig();
|
|
536
|
+
const requestedBrand = env?.POE_BRAND?.toLowerCase();
|
|
537
|
+
const activeBrandName = !isThemeBrandConfigured() && requestedBrand && Object.hasOwn(brands, requestedBrand) ? requestedBrand : config2.brand;
|
|
538
|
+
const revision2 = getThemeRevision();
|
|
539
|
+
if (revision2 !== cachedRevision) {
|
|
540
|
+
themeCache.clear();
|
|
541
|
+
cachedRevision = revision2;
|
|
542
|
+
}
|
|
543
|
+
const cacheKey = `${activeBrandName}:${themeName}`;
|
|
544
|
+
const cachedTheme = themeCache.get(cacheKey);
|
|
452
545
|
if (cachedTheme) {
|
|
453
546
|
return cachedTheme;
|
|
454
547
|
}
|
|
455
|
-
const
|
|
456
|
-
|
|
457
|
-
|
|
548
|
+
const activeBrand = brands[activeBrandName];
|
|
549
|
+
const theme = activeBrandName === "purple" ? themeName === "light" ? light : dark : createPalette(activeBrand, themeName);
|
|
550
|
+
themeCache.set(cacheKey, theme);
|
|
551
|
+
return theme;
|
|
458
552
|
}
|
|
459
553
|
|
|
460
|
-
// ../design
|
|
554
|
+
// ../toolcraft-design/src/components/symbols.ts
|
|
461
555
|
var symbols = {
|
|
462
556
|
get info() {
|
|
463
557
|
const format = resolveOutputFormat();
|
|
@@ -511,12 +605,12 @@ var symbols = {
|
|
|
511
605
|
}
|
|
512
606
|
};
|
|
513
607
|
|
|
514
|
-
// ../design
|
|
608
|
+
// ../toolcraft-design/src/internal/strip-ansi.ts
|
|
515
609
|
function stripAnsi(value) {
|
|
516
610
|
return value.replace(/\u001b\[[0-9;]*m/g, "");
|
|
517
611
|
}
|
|
518
612
|
|
|
519
|
-
// ../design
|
|
613
|
+
// ../toolcraft-design/src/prompts/primitives/log.ts
|
|
520
614
|
function renderMarkdownInline(value) {
|
|
521
615
|
return stripAnsi(value).replaceAll("\r\n", " ").replaceAll("\n", " ").replaceAll("\r", " ");
|
|
522
616
|
}
|
|
@@ -643,7 +737,7 @@ var log = {
|
|
|
643
737
|
error
|
|
644
738
|
};
|
|
645
739
|
|
|
646
|
-
// ../design
|
|
740
|
+
// ../toolcraft-design/src/components/logger.ts
|
|
647
741
|
function createLogger(emitter) {
|
|
648
742
|
const emit = (level, message2) => {
|
|
649
743
|
if (emitter) {
|
|
@@ -704,28 +798,28 @@ function createLogger(emitter) {
|
|
|
704
798
|
}
|
|
705
799
|
var logger = createLogger();
|
|
706
800
|
|
|
707
|
-
// ../design
|
|
801
|
+
// ../toolcraft-design/src/components/help-formatter.ts
|
|
708
802
|
var graphemeSegmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
709
803
|
|
|
710
|
-
// ../design
|
|
804
|
+
// ../toolcraft-design/src/components/table.ts
|
|
711
805
|
var graphemeSegmenter2 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
712
806
|
|
|
713
|
-
// ../design
|
|
807
|
+
// ../toolcraft-design/src/components/browser.ts
|
|
714
808
|
import { spawn } from "node:child_process";
|
|
715
809
|
import process2 from "node:process";
|
|
716
810
|
|
|
717
|
-
// ../design
|
|
811
|
+
// ../toolcraft-design/src/acp/writer.ts
|
|
718
812
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
719
813
|
var storage = new AsyncLocalStorage2();
|
|
720
814
|
|
|
721
|
-
// ../design
|
|
815
|
+
// ../toolcraft-design/src/dashboard/terminal-width.ts
|
|
722
816
|
var graphemeSegmenter3 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
723
817
|
|
|
724
|
-
// ../design
|
|
818
|
+
// ../toolcraft-design/src/dashboard/terminal.ts
|
|
725
819
|
import readline from "node:readline";
|
|
726
820
|
import { PassThrough } from "node:stream";
|
|
727
821
|
|
|
728
|
-
// ../design
|
|
822
|
+
// ../toolcraft-design/src/explorer/state.ts
|
|
729
823
|
var REGION_HEADER = 1 << 0;
|
|
730
824
|
var REGION_LIST = 1 << 1;
|
|
731
825
|
var REGION_DETAIL = 1 << 2;
|
|
@@ -734,13 +828,13 @@ var REGION_MODAL = 1 << 4;
|
|
|
734
828
|
var REGION_TOAST = 1 << 5;
|
|
735
829
|
var REGION_ALL = REGION_HEADER | REGION_LIST | REGION_DETAIL | REGION_FOOTER | REGION_MODAL | REGION_TOAST;
|
|
736
830
|
|
|
737
|
-
// ../design
|
|
831
|
+
// ../toolcraft-design/src/prompts/index.ts
|
|
738
832
|
import * as clack from "@clack/prompts";
|
|
739
833
|
|
|
740
|
-
// ../design
|
|
834
|
+
// ../toolcraft-design/src/prompts/primitives/cancel.ts
|
|
741
835
|
import { isCancel } from "@clack/prompts";
|
|
742
836
|
|
|
743
|
-
// ../design
|
|
837
|
+
// ../toolcraft-design/src/static/spinner.ts
|
|
744
838
|
var SPINNER_FRAMES = Object.freeze(["\u25D2", "\u25D0", "\u25D3", "\u25D1"]);
|
|
745
839
|
|
|
746
840
|
// ../config-mutations/src/formats/json.ts
|
|
@@ -844,17 +938,17 @@ function resolveHomeRelativePath(targetPath, homeDir) {
|
|
|
844
938
|
return targetPath;
|
|
845
939
|
}
|
|
846
940
|
function getSkillFolderWithHome(agent, scope, cwd, homeDir) {
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
941
|
+
const config2 = getAgentConfig(agent);
|
|
942
|
+
if (!config2) {
|
|
849
943
|
throwUnsupportedAgent(agent);
|
|
850
944
|
}
|
|
851
945
|
return {
|
|
852
946
|
displayPath: path9.join(
|
|
853
|
-
scope === "global" ?
|
|
947
|
+
scope === "global" ? config2.globalSkillDir : config2.localSkillDir,
|
|
854
948
|
TERMINAL_PILOT_SKILL_NAME
|
|
855
949
|
),
|
|
856
950
|
fullPath: path9.join(
|
|
857
|
-
scope === "global" ? resolveHomeRelativePath(
|
|
951
|
+
scope === "global" ? resolveHomeRelativePath(config2.globalSkillDir, homeDir) : path9.resolve(cwd, config2.localSkillDir),
|
|
858
952
|
TERMINAL_PILOT_SKILL_NAME
|
|
859
953
|
)
|
|
860
954
|
};
|