terminal-pilot 0.0.50 → 0.0.52
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/assets/jetbrains-mono-400-italic.ttf +0 -0
- package/assets/jetbrains-mono-400-normal.ttf +0 -0
- package/assets/jetbrains-mono-700-italic.ttf +0 -0
- package/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/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 +3 -2
- 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
|
@@ -11,6 +11,12 @@ var UserError = class extends Error {
|
|
|
11
11
|
this.name = "UserError";
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
|
+
var ToolcraftBugError = class extends Error {
|
|
15
|
+
constructor(message2) {
|
|
16
|
+
super(message2);
|
|
17
|
+
this.name = "ToolcraftBugError";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
14
20
|
|
|
15
21
|
// ../toolcraft/src/human-in-loop/config.ts
|
|
16
22
|
function validateHumanInLoopOnDefine(config2) {
|
|
@@ -780,6 +786,9 @@ function cloneRequires(requires) {
|
|
|
780
786
|
check: requires.check
|
|
781
787
|
};
|
|
782
788
|
}
|
|
789
|
+
function cloneToolAnnotations(annotations) {
|
|
790
|
+
return annotations === void 0 ? void 0 : { ...annotations };
|
|
791
|
+
}
|
|
783
792
|
function cloneCommandExamples(examples) {
|
|
784
793
|
return (examples ?? []).map((example) => ({
|
|
785
794
|
title: example.title,
|
|
@@ -875,16 +884,24 @@ function resolveCommandScope(ownScope, inheritedScope) {
|
|
|
875
884
|
return cloneScope(ownScope ?? inheritedScope) ?? ["cli", "sdk"];
|
|
876
885
|
}
|
|
877
886
|
function createBaseCommand(config2) {
|
|
887
|
+
if (config2.mcpResult !== void 0 && config2.result === void 0) {
|
|
888
|
+
throw new ToolcraftBugError(
|
|
889
|
+
`Command "${config2.name}" defines mcpResult without a result schema.`
|
|
890
|
+
);
|
|
891
|
+
}
|
|
878
892
|
const command = {
|
|
879
893
|
kind: "command",
|
|
880
894
|
name: config2.name,
|
|
895
|
+
title: config2.title,
|
|
881
896
|
description: config2.description,
|
|
897
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
882
898
|
hidden: config2.hidden ?? false,
|
|
883
899
|
examples: cloneCommandExamples(config2.examples),
|
|
884
900
|
aliases: [...config2.aliases ?? []],
|
|
885
901
|
positional: [...config2.positional ?? []],
|
|
886
902
|
params: config2.params,
|
|
887
903
|
result: config2.result,
|
|
904
|
+
mcpResult: config2.mcpResult,
|
|
888
905
|
stream: void 0,
|
|
889
906
|
secrets: cloneSecrets(config2.secrets),
|
|
890
907
|
scope: resolveCommandScope(config2.scope, void 0),
|
|
@@ -896,10 +913,13 @@ function createBaseCommand(config2) {
|
|
|
896
913
|
};
|
|
897
914
|
Object.defineProperty(command, commandConfigSymbol, {
|
|
898
915
|
value: {
|
|
916
|
+
title: config2.title,
|
|
917
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
899
918
|
scope: cloneScope(config2.scope),
|
|
900
919
|
hidden: config2.hidden ?? false,
|
|
901
920
|
examples: cloneCommandExamples(config2.examples),
|
|
902
921
|
result: config2.result,
|
|
922
|
+
mcpResult: config2.mcpResult,
|
|
903
923
|
humanInLoop: config2.humanInLoop,
|
|
904
924
|
secrets: cloneSecrets(config2.secrets),
|
|
905
925
|
requires: cloneRequires(config2.requires),
|
|
@@ -916,13 +936,16 @@ function materializeCommand(command, inherited) {
|
|
|
916
936
|
const materialized = {
|
|
917
937
|
kind: "command",
|
|
918
938
|
name: command.name,
|
|
939
|
+
title: internal.title,
|
|
919
940
|
description: command.description,
|
|
941
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
920
942
|
hidden: internal.hidden,
|
|
921
943
|
examples: cloneCommandExamples(internal.examples),
|
|
922
944
|
aliases: [...command.aliases],
|
|
923
945
|
positional: [...command.positional],
|
|
924
946
|
params: command.params,
|
|
925
947
|
result: internal.result,
|
|
948
|
+
mcpResult: internal.mcpResult,
|
|
926
949
|
stream: command.stream,
|
|
927
950
|
secrets: mergeSecrets(inherited.secrets, internal.secrets),
|
|
928
951
|
scope: resolveCommandScope(internal.scope, inherited.scope),
|
|
@@ -934,10 +957,13 @@ function materializeCommand(command, inherited) {
|
|
|
934
957
|
};
|
|
935
958
|
Object.defineProperty(materialized, commandConfigSymbol, {
|
|
936
959
|
value: {
|
|
960
|
+
title: internal.title,
|
|
961
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
937
962
|
scope: cloneScope(internal.scope),
|
|
938
963
|
hidden: internal.hidden,
|
|
939
964
|
examples: cloneCommandExamples(internal.examples),
|
|
940
965
|
result: internal.result,
|
|
966
|
+
mcpResult: internal.mcpResult,
|
|
941
967
|
humanInLoop: internal.humanInLoop,
|
|
942
968
|
secrets: cloneSecrets(internal.secrets),
|
|
943
969
|
requires: cloneRequires(internal.requires),
|
|
@@ -1548,9 +1574,9 @@ function detectThemeFromEnv(env) {
|
|
|
1548
1574
|
const colorFGBG = env.COLORFGBG;
|
|
1549
1575
|
if (typeof colorFGBG === "string") {
|
|
1550
1576
|
const parts = colorFGBG.split(";").map((part) => Number.parseInt(part, 10));
|
|
1551
|
-
const
|
|
1552
|
-
if (Number.isFinite(
|
|
1553
|
-
return
|
|
1577
|
+
const background2 = parts.at(-1);
|
|
1578
|
+
if (Number.isFinite(background2)) {
|
|
1579
|
+
return background2 >= 8 ? "light" : "dark";
|
|
1554
1580
|
}
|
|
1555
1581
|
}
|
|
1556
1582
|
return void 0;
|
|
@@ -2058,6 +2084,19 @@ var storage = new AsyncLocalStorage2();
|
|
|
2058
2084
|
import readline from "node:readline";
|
|
2059
2085
|
import { PassThrough } from "node:stream";
|
|
2060
2086
|
|
|
2087
|
+
// ../toolcraft-design/src/screen/style.ts
|
|
2088
|
+
var STYLE_BOLD = 1 << 0;
|
|
2089
|
+
var STYLE_DIM = 1 << 1;
|
|
2090
|
+
var STYLE_UNDERLINE = 1 << 2;
|
|
2091
|
+
var STYLE_INVERSE = 1 << 3;
|
|
2092
|
+
|
|
2093
|
+
// ../toolcraft-design/src/explorer/runtime.ts
|
|
2094
|
+
import { appendFileSync } from "node:fs";
|
|
2095
|
+
|
|
2096
|
+
// ../toolcraft-design/src/terminal/input.ts
|
|
2097
|
+
var PASTE_START = Buffer.from("\x1B[200~");
|
|
2098
|
+
var PASTE_END = Buffer.from("\x1B[201~");
|
|
2099
|
+
|
|
2061
2100
|
// ../toolcraft-design/src/explorer/state.ts
|
|
2062
2101
|
var REGION_HEADER = 1 << 0;
|
|
2063
2102
|
var REGION_LIST = 1 << 1;
|