terminal-pilot 0.0.9 → 0.0.11
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 +214 -48
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +11 -2
- package/dist/commands/close-session.js.map +2 -2
- package/dist/commands/create-session.js +11 -2
- package/dist/commands/create-session.js.map +2 -2
- package/dist/commands/fill.js +11 -2
- package/dist/commands/fill.js.map +2 -2
- package/dist/commands/get-session.js +11 -2
- package/dist/commands/get-session.js.map +2 -2
- package/dist/commands/index.js +131 -7
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +123 -7
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +41 -1
- package/dist/commands/installer.js.map +3 -3
- package/dist/commands/list-sessions.js +11 -2
- package/dist/commands/list-sessions.js.map +2 -2
- package/dist/commands/press-key.js +11 -2
- package/dist/commands/press-key.js.map +2 -2
- package/dist/commands/read-history.js +11 -2
- package/dist/commands/read-history.js.map +2 -2
- package/dist/commands/read-screen.js +11 -2
- package/dist/commands/read-screen.js.map +2 -2
- package/dist/commands/resize.js +11 -2
- package/dist/commands/resize.js.map +2 -2
- package/dist/commands/runtime.js +8 -0
- package/dist/commands/runtime.js.map +2 -2
- package/dist/commands/screenshot.js +11 -2
- package/dist/commands/screenshot.js.map +2 -2
- package/dist/commands/send-signal.js +11 -2
- package/dist/commands/send-signal.js.map +2 -2
- package/dist/commands/type.js +11 -2
- package/dist/commands/type.js.map +2 -2
- package/dist/commands/uninstall.js +44 -3
- package/dist/commands/uninstall.js.map +3 -3
- package/dist/commands/wait-for-exit.js +11 -2
- package/dist/commands/wait-for-exit.js.map +2 -2
- package/dist/commands/wait-for.js +11 -2
- package/dist/commands/wait-for.js.map +2 -2
- package/dist/index.js +8 -0
- package/dist/index.js.map +2 -2
- package/dist/terminal-buffer.d.ts +1 -0
- package/dist/terminal-buffer.js +8 -0
- package/dist/terminal-buffer.js.map +2 -2
- package/dist/terminal-pilot.js +8 -0
- package/dist/terminal-pilot.js.map +2 -2
- package/dist/terminal-session.js +8 -0
- package/dist/terminal-session.js.map +2 -2
- package/dist/testing/cli-repl.js +214 -48
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +214 -48
- package/dist/testing/qa-cli.js.map +4 -4
- package/package.json +2 -2
package/dist/commands/install.js
CHANGED
|
@@ -83,13 +83,46 @@ var kimiAgent = {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
// ../agent-defs/src/agents/goose.ts
|
|
87
|
+
var gooseAgent = {
|
|
88
|
+
id: "goose",
|
|
89
|
+
name: "goose",
|
|
90
|
+
label: "Goose",
|
|
91
|
+
summary: "Block's open-source AI agent with ACP support.",
|
|
92
|
+
binaryName: "goose",
|
|
93
|
+
configPath: "~/.config/goose/config.yaml",
|
|
94
|
+
branding: {
|
|
95
|
+
colors: {
|
|
96
|
+
dark: "#FF6B35",
|
|
97
|
+
light: "#E85D26"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// ../agent-defs/src/agents/poe-agent.ts
|
|
103
|
+
var poeAgentAgent = {
|
|
104
|
+
id: "poe-agent",
|
|
105
|
+
name: "poe-agent",
|
|
106
|
+
label: "Poe Agent",
|
|
107
|
+
summary: "Run one-shot prompts with the built-in Poe agent runtime.",
|
|
108
|
+
configPath: "~/.poe-code/config.json",
|
|
109
|
+
branding: {
|
|
110
|
+
colors: {
|
|
111
|
+
dark: "#A465F7",
|
|
112
|
+
light: "#7A3FD3"
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
86
117
|
// ../agent-defs/src/registry.ts
|
|
87
118
|
var allAgents = [
|
|
88
119
|
claudeCodeAgent,
|
|
89
120
|
claudeDesktopAgent,
|
|
90
121
|
codexAgent,
|
|
91
122
|
openCodeAgent,
|
|
92
|
-
kimiAgent
|
|
123
|
+
kimiAgent,
|
|
124
|
+
gooseAgent,
|
|
125
|
+
poeAgentAgent
|
|
93
126
|
];
|
|
94
127
|
var lookup = /* @__PURE__ */ new Map();
|
|
95
128
|
for (const agent of allAgents) {
|
|
@@ -121,6 +154,10 @@ var agentSkillConfigs = {
|
|
|
121
154
|
opencode: {
|
|
122
155
|
globalSkillDir: "~/.config/opencode/skills",
|
|
123
156
|
localSkillDir: ".opencode/skills"
|
|
157
|
+
},
|
|
158
|
+
goose: {
|
|
159
|
+
globalSkillDir: "~/.agents/skills",
|
|
160
|
+
localSkillDir: ".agents/skills"
|
|
124
161
|
}
|
|
125
162
|
};
|
|
126
163
|
var supportedAgents = Object.keys(agentSkillConfigs);
|
|
@@ -380,14 +417,92 @@ var tomlFormat = {
|
|
|
380
417
|
prune: prune2
|
|
381
418
|
};
|
|
382
419
|
|
|
420
|
+
// ../config-mutations/src/formats/yaml.ts
|
|
421
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
422
|
+
function isConfigObject3(value) {
|
|
423
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
424
|
+
}
|
|
425
|
+
function parse4(content) {
|
|
426
|
+
if (!content || content.trim() === "") {
|
|
427
|
+
return {};
|
|
428
|
+
}
|
|
429
|
+
const parsed = parseYaml(content);
|
|
430
|
+
if (parsed === null || parsed === void 0) {
|
|
431
|
+
return {};
|
|
432
|
+
}
|
|
433
|
+
if (!isConfigObject3(parsed)) {
|
|
434
|
+
throw new Error("Expected YAML object.");
|
|
435
|
+
}
|
|
436
|
+
return parsed;
|
|
437
|
+
}
|
|
438
|
+
function serialize3(obj) {
|
|
439
|
+
const serialized = stringifyYaml(obj);
|
|
440
|
+
return serialized.endsWith("\n") ? serialized : `${serialized}
|
|
441
|
+
`;
|
|
442
|
+
}
|
|
443
|
+
function merge3(base, patch) {
|
|
444
|
+
const result = { ...base };
|
|
445
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
446
|
+
if (value === void 0) {
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
const existing = result[key];
|
|
450
|
+
if (isConfigObject3(existing) && isConfigObject3(value)) {
|
|
451
|
+
result[key] = merge3(existing, value);
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
result[key] = value;
|
|
455
|
+
}
|
|
456
|
+
return result;
|
|
457
|
+
}
|
|
458
|
+
function prune3(obj, shape) {
|
|
459
|
+
let changed = false;
|
|
460
|
+
const result = { ...obj };
|
|
461
|
+
for (const [key, pattern] of Object.entries(shape)) {
|
|
462
|
+
if (!(key in result)) {
|
|
463
|
+
continue;
|
|
464
|
+
}
|
|
465
|
+
const current = result[key];
|
|
466
|
+
if (isConfigObject3(pattern) && Object.keys(pattern).length === 0) {
|
|
467
|
+
delete result[key];
|
|
468
|
+
changed = true;
|
|
469
|
+
continue;
|
|
470
|
+
}
|
|
471
|
+
if (isConfigObject3(pattern) && isConfigObject3(current)) {
|
|
472
|
+
const { changed: childChanged, result: childResult } = prune3(current, pattern);
|
|
473
|
+
if (childChanged) {
|
|
474
|
+
changed = true;
|
|
475
|
+
}
|
|
476
|
+
if (Object.keys(childResult).length === 0) {
|
|
477
|
+
delete result[key];
|
|
478
|
+
} else {
|
|
479
|
+
result[key] = childResult;
|
|
480
|
+
}
|
|
481
|
+
continue;
|
|
482
|
+
}
|
|
483
|
+
delete result[key];
|
|
484
|
+
changed = true;
|
|
485
|
+
}
|
|
486
|
+
return { changed, result };
|
|
487
|
+
}
|
|
488
|
+
var yamlFormat = {
|
|
489
|
+
parse: parse4,
|
|
490
|
+
serialize: serialize3,
|
|
491
|
+
merge: merge3,
|
|
492
|
+
prune: prune3
|
|
493
|
+
};
|
|
494
|
+
|
|
383
495
|
// ../config-mutations/src/formats/index.ts
|
|
384
496
|
var formatRegistry = {
|
|
385
497
|
json: jsonFormat,
|
|
386
|
-
toml: tomlFormat
|
|
498
|
+
toml: tomlFormat,
|
|
499
|
+
yaml: yamlFormat
|
|
387
500
|
};
|
|
388
501
|
var extensionMap = {
|
|
389
502
|
".json": "json",
|
|
390
|
-
".toml": "toml"
|
|
503
|
+
".toml": "toml",
|
|
504
|
+
".yaml": "yaml",
|
|
505
|
+
".yml": "yaml"
|
|
391
506
|
};
|
|
392
507
|
function getConfigFormat(pathOrFormat) {
|
|
393
508
|
if (pathOrFormat in formatRegistry) {
|
|
@@ -536,7 +651,7 @@ function pruneKeysByPrefix(table, prefix) {
|
|
|
536
651
|
}
|
|
537
652
|
return result;
|
|
538
653
|
}
|
|
539
|
-
function
|
|
654
|
+
function isConfigObject4(value) {
|
|
540
655
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
541
656
|
}
|
|
542
657
|
function mergeWithPruneByPrefix(base, patch, pruneByPrefix) {
|
|
@@ -545,7 +660,7 @@ function mergeWithPruneByPrefix(base, patch, pruneByPrefix) {
|
|
|
545
660
|
for (const [key, value] of Object.entries(patch)) {
|
|
546
661
|
const current = result[key];
|
|
547
662
|
const prefix = prefixMap[key];
|
|
548
|
-
if (
|
|
663
|
+
if (isConfigObject4(current) && isConfigObject4(value)) {
|
|
549
664
|
if (prefix) {
|
|
550
665
|
const pruned = pruneKeysByPrefix(current, prefix);
|
|
551
666
|
result[key] = { ...pruned, ...value };
|
|
@@ -1162,10 +1277,11 @@ var S = {
|
|
|
1162
1277
|
...options
|
|
1163
1278
|
};
|
|
1164
1279
|
},
|
|
1165
|
-
Object(shape) {
|
|
1280
|
+
Object(shape, options = {}) {
|
|
1166
1281
|
return {
|
|
1167
1282
|
kind: "object",
|
|
1168
|
-
shape
|
|
1283
|
+
shape,
|
|
1284
|
+
...options
|
|
1169
1285
|
};
|
|
1170
1286
|
},
|
|
1171
1287
|
Optional(inner) {
|