terminal-pilot 0.0.49 → 0.0.51
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/assets/jetbrains-mono-400-italic.ttf +0 -0
- package/dist/assets/jetbrains-mono-400-normal.ttf +0 -0
- package/dist/assets/jetbrains-mono-700-italic.ttf +0 -0
- package/dist/assets/jetbrains-mono-700-normal.ttf +0 -0
- package/dist/cli.js +64 -32
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +26 -0
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +26 -0
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/daemon-runtime.js.map +1 -1
- package/dist/commands/fill.js +26 -0
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +26 -0
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.js +39 -6
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +42 -3
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +16 -3
- package/dist/commands/installer.js.map +4 -4
- package/dist/commands/list-sessions.js +26 -0
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +26 -0
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +26 -0
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +26 -0
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +26 -0
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.js.map +1 -1
- package/dist/commands/screenshot.js +26 -0
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +26 -0
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +26 -0
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/uninstall.js +42 -3
- package/dist/commands/uninstall.js.map +4 -4
- package/dist/commands/wait-for-exit.js +26 -0
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.js +26 -0
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/composition.json +1 -1
- package/dist/testing/cli-repl.js +64 -32
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +64 -32
- package/dist/testing/qa-cli.js.map +4 -4
- 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/README.md +30 -0
- package/node_modules/toolcraft-design/dist/dashboard/terminal-width.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/dashboard/terminal-width.js +18 -1
- package/node_modules/toolcraft-design/dist/explorer/actions.d.ts +3 -2
- package/node_modules/toolcraft-design/dist/explorer/actions.js +50 -4
- package/node_modules/toolcraft-design/dist/explorer/events.d.ts +7 -2
- package/node_modules/toolcraft-design/dist/explorer/filter.js +1 -1
- package/node_modules/toolcraft-design/dist/explorer/index.d.ts +2 -4
- package/node_modules/toolcraft-design/dist/explorer/index.js +1 -2
- package/node_modules/toolcraft-design/dist/explorer/jobs.d.ts +2 -2
- package/node_modules/toolcraft-design/dist/explorer/jobs.js +3 -5
- package/node_modules/toolcraft-design/dist/explorer/keymap.d.ts +13 -3
- package/node_modules/toolcraft-design/dist/explorer/keymap.js +89 -348
- package/node_modules/toolcraft-design/dist/explorer/layout.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/explorer/layout.js +14 -4
- package/node_modules/toolcraft-design/dist/explorer/reducer.js +116 -16
- package/node_modules/toolcraft-design/dist/explorer/render/detail.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/explorer/render/detail.js +45 -7
- package/node_modules/toolcraft-design/dist/explorer/render/footer.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/explorer/render/footer.js +18 -3
- package/node_modules/toolcraft-design/dist/explorer/render/header.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/explorer/render/header.js +6 -2
- package/node_modules/toolcraft-design/dist/explorer/render/index.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/explorer/render/index.js +2 -1
- package/node_modules/toolcraft-design/dist/explorer/render/list.d.ts +16 -2
- package/node_modules/toolcraft-design/dist/explorer/render/list.js +13 -34
- package/node_modules/toolcraft-design/dist/explorer/render/modal.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/explorer/render/modal.js +11 -11
- package/node_modules/toolcraft-design/dist/explorer/render/pane.d.ts +5 -2
- package/node_modules/toolcraft-design/dist/explorer/render/pane.js +9 -6
- package/node_modules/toolcraft-design/dist/explorer/render/test-fixtures.js +2 -3
- package/node_modules/toolcraft-design/dist/explorer/runtime.js +115 -73
- package/node_modules/toolcraft-design/dist/explorer/runtime.test-helpers.d.ts +23 -37
- package/node_modules/toolcraft-design/dist/explorer/runtime.test-helpers.js +32 -83
- package/node_modules/toolcraft-design/dist/explorer/state.d.ts +79 -8
- package/node_modules/toolcraft-design/dist/explorer/state.js +70 -18
- package/node_modules/toolcraft-design/dist/index.d.ts +8 -2
- package/node_modules/toolcraft-design/dist/index.js +5 -1
- package/node_modules/toolcraft-design/dist/screen/ansi-text.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/screen/ansi-text.js +35 -0
- package/node_modules/toolcraft-design/dist/screen/screen.d.ts +40 -0
- package/node_modules/toolcraft-design/dist/screen/screen.js +122 -0
- package/node_modules/toolcraft-design/dist/screen/style.d.ts +16 -0
- package/node_modules/toolcraft-design/dist/screen/style.js +55 -0
- package/node_modules/toolcraft-design/dist/terminal/driver.d.ts +34 -0
- package/node_modules/toolcraft-design/dist/terminal/driver.js +65 -0
- package/node_modules/toolcraft-design/dist/terminal/input.d.ts +25 -0
- package/node_modules/toolcraft-design/dist/terminal/input.js +181 -0
- package/node_modules/toolcraft-design/dist/terminal/output.d.ts +10 -0
- package/node_modules/toolcraft-design/dist/terminal/output.js +44 -0
- package/package.json +2 -1
- package/node_modules/toolcraft-design/dist/explorer/two-pane.d.ts +0 -102
- package/node_modules/toolcraft-design/dist/explorer/two-pane.js +0 -510
- package/node_modules/toolcraft-design/dist/run-two-pane-explorer.d.ts +0 -2
- package/node_modules/toolcraft-design/dist/run-two-pane-explorer.js +0 -1
package/dist/commands/install.js
CHANGED
|
@@ -661,9 +661,9 @@ function detectThemeFromEnv(env) {
|
|
|
661
661
|
const colorFGBG = env.COLORFGBG;
|
|
662
662
|
if (typeof colorFGBG === "string") {
|
|
663
663
|
const parts = colorFGBG.split(";").map((part) => Number.parseInt(part, 10));
|
|
664
|
-
const
|
|
665
|
-
if (Number.isFinite(
|
|
666
|
-
return
|
|
664
|
+
const background2 = parts.at(-1);
|
|
665
|
+
if (Number.isFinite(background2)) {
|
|
666
|
+
return background2 >= 8 ? "light" : "dark";
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
return void 0;
|
|
@@ -1606,6 +1606,19 @@ var storage = new AsyncLocalStorage2();
|
|
|
1606
1606
|
import readline from "node:readline";
|
|
1607
1607
|
import { PassThrough } from "node:stream";
|
|
1608
1608
|
|
|
1609
|
+
// ../toolcraft-design/src/screen/style.ts
|
|
1610
|
+
var STYLE_BOLD = 1 << 0;
|
|
1611
|
+
var STYLE_DIM = 1 << 1;
|
|
1612
|
+
var STYLE_UNDERLINE = 1 << 2;
|
|
1613
|
+
var STYLE_INVERSE = 1 << 3;
|
|
1614
|
+
|
|
1615
|
+
// ../toolcraft-design/src/explorer/runtime.ts
|
|
1616
|
+
import { appendFileSync } from "node:fs";
|
|
1617
|
+
|
|
1618
|
+
// ../toolcraft-design/src/terminal/input.ts
|
|
1619
|
+
var PASTE_START = Buffer.from("\x1B[200~");
|
|
1620
|
+
var PASTE_END = Buffer.from("\x1B[201~");
|
|
1621
|
+
|
|
1609
1622
|
// ../toolcraft-design/src/explorer/state.ts
|
|
1610
1623
|
var REGION_HEADER = 1 << 0;
|
|
1611
1624
|
var REGION_LIST = 1 << 1;
|
|
@@ -3038,6 +3051,12 @@ var UserError2 = class extends Error {
|
|
|
3038
3051
|
this.name = "UserError";
|
|
3039
3052
|
}
|
|
3040
3053
|
};
|
|
3054
|
+
var ToolcraftBugError = class extends Error {
|
|
3055
|
+
constructor(message2) {
|
|
3056
|
+
super(message2);
|
|
3057
|
+
this.name = "ToolcraftBugError";
|
|
3058
|
+
}
|
|
3059
|
+
};
|
|
3041
3060
|
|
|
3042
3061
|
// ../toolcraft/src/human-in-loop/config.ts
|
|
3043
3062
|
function validateHumanInLoopOnDefine(config2) {
|
|
@@ -3807,6 +3826,9 @@ function cloneRequires(requires) {
|
|
|
3807
3826
|
check: requires.check
|
|
3808
3827
|
};
|
|
3809
3828
|
}
|
|
3829
|
+
function cloneToolAnnotations(annotations) {
|
|
3830
|
+
return annotations === void 0 ? void 0 : { ...annotations };
|
|
3831
|
+
}
|
|
3810
3832
|
function cloneCommandExamples(examples) {
|
|
3811
3833
|
return (examples ?? []).map((example) => ({
|
|
3812
3834
|
title: example.title,
|
|
@@ -3902,16 +3924,24 @@ function resolveCommandScope(ownScope, inheritedScope) {
|
|
|
3902
3924
|
return cloneScope(ownScope ?? inheritedScope) ?? ["cli", "sdk"];
|
|
3903
3925
|
}
|
|
3904
3926
|
function createBaseCommand(config2) {
|
|
3927
|
+
if (config2.mcpResult !== void 0 && config2.result === void 0) {
|
|
3928
|
+
throw new ToolcraftBugError(
|
|
3929
|
+
`Command "${config2.name}" defines mcpResult without a result schema.`
|
|
3930
|
+
);
|
|
3931
|
+
}
|
|
3905
3932
|
const command = {
|
|
3906
3933
|
kind: "command",
|
|
3907
3934
|
name: config2.name,
|
|
3935
|
+
title: config2.title,
|
|
3908
3936
|
description: config2.description,
|
|
3937
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
3909
3938
|
hidden: config2.hidden ?? false,
|
|
3910
3939
|
examples: cloneCommandExamples(config2.examples),
|
|
3911
3940
|
aliases: [...config2.aliases ?? []],
|
|
3912
3941
|
positional: [...config2.positional ?? []],
|
|
3913
3942
|
params: config2.params,
|
|
3914
3943
|
result: config2.result,
|
|
3944
|
+
mcpResult: config2.mcpResult,
|
|
3915
3945
|
stream: void 0,
|
|
3916
3946
|
secrets: cloneSecrets(config2.secrets),
|
|
3917
3947
|
scope: resolveCommandScope(config2.scope, void 0),
|
|
@@ -3923,10 +3953,13 @@ function createBaseCommand(config2) {
|
|
|
3923
3953
|
};
|
|
3924
3954
|
Object.defineProperty(command, commandConfigSymbol, {
|
|
3925
3955
|
value: {
|
|
3956
|
+
title: config2.title,
|
|
3957
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
3926
3958
|
scope: cloneScope(config2.scope),
|
|
3927
3959
|
hidden: config2.hidden ?? false,
|
|
3928
3960
|
examples: cloneCommandExamples(config2.examples),
|
|
3929
3961
|
result: config2.result,
|
|
3962
|
+
mcpResult: config2.mcpResult,
|
|
3930
3963
|
humanInLoop: config2.humanInLoop,
|
|
3931
3964
|
secrets: cloneSecrets(config2.secrets),
|
|
3932
3965
|
requires: cloneRequires(config2.requires),
|
|
@@ -3943,13 +3976,16 @@ function materializeCommand(command, inherited) {
|
|
|
3943
3976
|
const materialized = {
|
|
3944
3977
|
kind: "command",
|
|
3945
3978
|
name: command.name,
|
|
3979
|
+
title: internal.title,
|
|
3946
3980
|
description: command.description,
|
|
3981
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
3947
3982
|
hidden: internal.hidden,
|
|
3948
3983
|
examples: cloneCommandExamples(internal.examples),
|
|
3949
3984
|
aliases: [...command.aliases],
|
|
3950
3985
|
positional: [...command.positional],
|
|
3951
3986
|
params: command.params,
|
|
3952
3987
|
result: internal.result,
|
|
3988
|
+
mcpResult: internal.mcpResult,
|
|
3953
3989
|
stream: command.stream,
|
|
3954
3990
|
secrets: mergeSecrets(inherited.secrets, internal.secrets),
|
|
3955
3991
|
scope: resolveCommandScope(internal.scope, inherited.scope),
|
|
@@ -3961,10 +3997,13 @@ function materializeCommand(command, inherited) {
|
|
|
3961
3997
|
};
|
|
3962
3998
|
Object.defineProperty(materialized, commandConfigSymbol, {
|
|
3963
3999
|
value: {
|
|
4000
|
+
title: internal.title,
|
|
4001
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
3964
4002
|
scope: cloneScope(internal.scope),
|
|
3965
4003
|
hidden: internal.hidden,
|
|
3966
4004
|
examples: cloneCommandExamples(internal.examples),
|
|
3967
4005
|
result: internal.result,
|
|
4006
|
+
mcpResult: internal.mcpResult,
|
|
3968
4007
|
humanInLoop: internal.humanInLoop,
|
|
3969
4008
|
secrets: cloneSecrets(internal.secrets),
|
|
3970
4009
|
requires: cloneRequires(internal.requires),
|