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
package/dist/commands/index.js
CHANGED
|
@@ -784,6 +784,9 @@ function cloneRequires(requires) {
|
|
|
784
784
|
check: requires.check
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
|
+
function cloneToolAnnotations(annotations) {
|
|
788
|
+
return annotations === void 0 ? void 0 : { ...annotations };
|
|
789
|
+
}
|
|
787
790
|
function cloneStringArray(values) {
|
|
788
791
|
return values === void 0 ? void 0 : [...values];
|
|
789
792
|
}
|
|
@@ -934,16 +937,24 @@ function resolveGroupScope(ownScope, inheritedScope) {
|
|
|
934
937
|
return cloneScope(ownScope ?? inheritedScope);
|
|
935
938
|
}
|
|
936
939
|
function createBaseCommand(config2) {
|
|
940
|
+
if (config2.mcpResult !== void 0 && config2.result === void 0) {
|
|
941
|
+
throw new ToolcraftBugError(
|
|
942
|
+
`Command "${config2.name}" defines mcpResult without a result schema.`
|
|
943
|
+
);
|
|
944
|
+
}
|
|
937
945
|
const command = {
|
|
938
946
|
kind: "command",
|
|
939
947
|
name: config2.name,
|
|
948
|
+
title: config2.title,
|
|
940
949
|
description: config2.description,
|
|
950
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
941
951
|
hidden: config2.hidden ?? false,
|
|
942
952
|
examples: cloneCommandExamples(config2.examples),
|
|
943
953
|
aliases: [...config2.aliases ?? []],
|
|
944
954
|
positional: [...config2.positional ?? []],
|
|
945
955
|
params: config2.params,
|
|
946
956
|
result: config2.result,
|
|
957
|
+
mcpResult: config2.mcpResult,
|
|
947
958
|
stream: void 0,
|
|
948
959
|
secrets: cloneSecrets(config2.secrets),
|
|
949
960
|
scope: resolveCommandScope(config2.scope, void 0),
|
|
@@ -955,10 +966,13 @@ function createBaseCommand(config2) {
|
|
|
955
966
|
};
|
|
956
967
|
Object.defineProperty(command, commandConfigSymbol, {
|
|
957
968
|
value: {
|
|
969
|
+
title: config2.title,
|
|
970
|
+
annotations: cloneToolAnnotations(config2.annotations),
|
|
958
971
|
scope: cloneScope(config2.scope),
|
|
959
972
|
hidden: config2.hidden ?? false,
|
|
960
973
|
examples: cloneCommandExamples(config2.examples),
|
|
961
974
|
result: config2.result,
|
|
975
|
+
mcpResult: config2.mcpResult,
|
|
962
976
|
humanInLoop: config2.humanInLoop,
|
|
963
977
|
secrets: cloneSecrets(config2.secrets),
|
|
964
978
|
requires: cloneRequires(config2.requires),
|
|
@@ -1006,13 +1020,16 @@ function materializeCommand(command, inherited) {
|
|
|
1006
1020
|
const materialized = {
|
|
1007
1021
|
kind: "command",
|
|
1008
1022
|
name: command.name,
|
|
1023
|
+
title: internal.title,
|
|
1009
1024
|
description: command.description,
|
|
1025
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
1010
1026
|
hidden: internal.hidden,
|
|
1011
1027
|
examples: cloneCommandExamples(internal.examples),
|
|
1012
1028
|
aliases: [...command.aliases],
|
|
1013
1029
|
positional: [...command.positional],
|
|
1014
1030
|
params: command.params,
|
|
1015
1031
|
result: internal.result,
|
|
1032
|
+
mcpResult: internal.mcpResult,
|
|
1016
1033
|
stream: command.stream,
|
|
1017
1034
|
secrets: mergeSecrets(inherited.secrets, internal.secrets),
|
|
1018
1035
|
scope: resolveCommandScope(internal.scope, inherited.scope),
|
|
@@ -1024,10 +1041,13 @@ function materializeCommand(command, inherited) {
|
|
|
1024
1041
|
};
|
|
1025
1042
|
Object.defineProperty(materialized, commandConfigSymbol, {
|
|
1026
1043
|
value: {
|
|
1044
|
+
title: internal.title,
|
|
1045
|
+
annotations: cloneToolAnnotations(internal.annotations),
|
|
1027
1046
|
scope: cloneScope(internal.scope),
|
|
1028
1047
|
hidden: internal.hidden,
|
|
1029
1048
|
examples: cloneCommandExamples(internal.examples),
|
|
1030
1049
|
result: internal.result,
|
|
1050
|
+
mcpResult: internal.mcpResult,
|
|
1031
1051
|
humanInLoop: internal.humanInLoop,
|
|
1032
1052
|
secrets: cloneSecrets(internal.secrets),
|
|
1033
1053
|
requires: cloneRequires(internal.requires),
|
|
@@ -3431,9 +3451,9 @@ function detectThemeFromEnv(env) {
|
|
|
3431
3451
|
const colorFGBG = env.COLORFGBG;
|
|
3432
3452
|
if (typeof colorFGBG === "string") {
|
|
3433
3453
|
const parts = colorFGBG.split(";").map((part) => Number.parseInt(part, 10));
|
|
3434
|
-
const
|
|
3435
|
-
if (Number.isFinite(
|
|
3436
|
-
return
|
|
3454
|
+
const background2 = parts.at(-1);
|
|
3455
|
+
if (Number.isFinite(background2)) {
|
|
3456
|
+
return background2 >= 8 ? "light" : "dark";
|
|
3437
3457
|
}
|
|
3438
3458
|
}
|
|
3439
3459
|
return void 0;
|
|
@@ -4376,6 +4396,19 @@ var storage = new AsyncLocalStorage2();
|
|
|
4376
4396
|
import readline from "node:readline";
|
|
4377
4397
|
import { PassThrough } from "node:stream";
|
|
4378
4398
|
|
|
4399
|
+
// ../toolcraft-design/src/screen/style.ts
|
|
4400
|
+
var STYLE_BOLD = 1 << 0;
|
|
4401
|
+
var STYLE_DIM = 1 << 1;
|
|
4402
|
+
var STYLE_UNDERLINE = 1 << 2;
|
|
4403
|
+
var STYLE_INVERSE = 1 << 3;
|
|
4404
|
+
|
|
4405
|
+
// ../toolcraft-design/src/explorer/runtime.ts
|
|
4406
|
+
import { appendFileSync } from "node:fs";
|
|
4407
|
+
|
|
4408
|
+
// ../toolcraft-design/src/terminal/input.ts
|
|
4409
|
+
var PASTE_START = Buffer.from("\x1B[200~");
|
|
4410
|
+
var PASTE_END = Buffer.from("\x1B[201~");
|
|
4411
|
+
|
|
4379
4412
|
// ../toolcraft-design/src/explorer/state.ts
|
|
4380
4413
|
var REGION_HEADER = 1 << 0;
|
|
4381
4414
|
var REGION_LIST = 1 << 1;
|
|
@@ -7053,9 +7086,9 @@ function renderBackgrounds(line, startX, y, height) {
|
|
|
7053
7086
|
const rectangles = [];
|
|
7054
7087
|
for (const run of line) {
|
|
7055
7088
|
const width = displayWidth3(run.text, column);
|
|
7056
|
-
const
|
|
7057
|
-
if (
|
|
7058
|
-
rectangles.push(`<rect x="${formatNumber(startX + column * CHARACTER_WIDTH)}" y="${formatNumber(y)}" width="${formatNumber(width * CHARACTER_WIDTH)}" height="${formatNumber(height)}" fill="${escapeXmlAttribute(
|
|
7089
|
+
const background2 = resolveBackgroundColor(run);
|
|
7090
|
+
if (background2 !== BACKGROUND && width > 0) {
|
|
7091
|
+
rectangles.push(`<rect x="${formatNumber(startX + column * CHARACTER_WIDTH)}" y="${formatNumber(y)}" width="${formatNumber(width * CHARACTER_WIDTH)}" height="${formatNumber(height)}" fill="${escapeXmlAttribute(background2)}" />`);
|
|
7059
7092
|
}
|
|
7060
7093
|
column += width;
|
|
7061
7094
|
}
|