terminal-pilot 0.0.21 → 0.0.22
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 +467 -193
- package/dist/cli.js.map +4 -4
- package/dist/commands/close-session.js +6 -4
- package/dist/commands/close-session.js.map +3 -3
- package/dist/commands/create-session.js +6 -4
- package/dist/commands/create-session.js.map +3 -3
- package/dist/commands/fill.js +6 -4
- package/dist/commands/fill.js.map +3 -3
- package/dist/commands/get-session.js +6 -4
- package/dist/commands/get-session.js.map +3 -3
- package/dist/commands/index.js +79 -33
- package/dist/commands/index.js.map +4 -4
- package/dist/commands/install.js +64 -20
- package/dist/commands/install.js.map +4 -4
- package/dist/commands/installer.js +36 -2
- package/dist/commands/installer.js.map +4 -4
- package/dist/commands/list-sessions.js +6 -4
- package/dist/commands/list-sessions.js.map +3 -3
- package/dist/commands/press-key.js +6 -4
- package/dist/commands/press-key.js.map +3 -3
- package/dist/commands/read-history.js +6 -4
- package/dist/commands/read-history.js.map +3 -3
- package/dist/commands/read-screen.js +6 -4
- package/dist/commands/read-screen.js.map +3 -3
- package/dist/commands/resize.js +6 -4
- package/dist/commands/resize.js.map +3 -3
- package/dist/commands/runtime.js +6 -4
- package/dist/commands/runtime.js.map +3 -3
- package/dist/commands/screenshot.js +17 -8
- package/dist/commands/screenshot.js.map +3 -3
- package/dist/commands/send-signal.js +6 -4
- package/dist/commands/send-signal.js.map +3 -3
- package/dist/commands/type.js +6 -4
- package/dist/commands/type.js.map +3 -3
- package/dist/commands/uninstall.js +39 -5
- package/dist/commands/uninstall.js.map +4 -4
- package/dist/commands/wait-for-exit.js +6 -4
- package/dist/commands/wait-for-exit.js.map +3 -3
- package/dist/commands/wait-for.js +6 -4
- package/dist/commands/wait-for.js.map +3 -3
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +7 -0
- package/dist/index.js +8 -4
- package/dist/index.js.map +3 -3
- package/dist/terminal-pilot.js +6 -4
- package/dist/terminal-pilot.js.map +3 -3
- package/dist/terminal-session.js +6 -4
- package/dist/terminal-session.js.map +3 -3
- package/dist/testing/cli-repl.js +467 -193
- package/dist/testing/cli-repl.js.map +4 -4
- package/dist/testing/qa-cli.js +467 -193
- package/dist/testing/qa-cli.js.map +4 -4
- package/node_modules/@poe-code/agent-skill-config/dist/apply.js +4 -1
- package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +1 -1
- package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +17 -9
- package/node_modules/@poe-code/agent-skill-config/dist/templates.js +4 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/commands/uninstall.ts
|
|
2
|
-
import { randomUUID as
|
|
2
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
3
3
|
|
|
4
4
|
// ../toolcraft/src/index.ts
|
|
5
5
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
@@ -414,6 +414,11 @@ function defineCommand(config2) {
|
|
|
414
414
|
);
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
+
// src/errors.ts
|
|
418
|
+
function hasOwnErrorCode(error2, code) {
|
|
419
|
+
return error2 instanceof Error && Object.prototype.hasOwnProperty.call(error2, "code") && error2.code === code;
|
|
420
|
+
}
|
|
421
|
+
|
|
417
422
|
// src/commands/installer.ts
|
|
418
423
|
import os2 from "node:os";
|
|
419
424
|
import path9 from "node:path";
|
|
@@ -433,6 +438,11 @@ var claudeCodeAgent = {
|
|
|
433
438
|
aliases: ["claude"],
|
|
434
439
|
binaryName: "claude",
|
|
435
440
|
apiShapes: ["anthropic-messages"],
|
|
441
|
+
otelCapture: {
|
|
442
|
+
env: {
|
|
443
|
+
CLAUDE_CODE_ENABLE_TELEMETRY: "1"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
436
446
|
configPath: "~/.claude/settings.json",
|
|
437
447
|
branding: {
|
|
438
448
|
colors: {
|
|
@@ -465,6 +475,16 @@ var codexAgent = {
|
|
|
465
475
|
summary: "Configure Codex to use Poe as the model provider.",
|
|
466
476
|
binaryName: "codex",
|
|
467
477
|
apiShapes: ["openai-responses"],
|
|
478
|
+
otelCapture: {
|
|
479
|
+
args: (endpoint, content) => [
|
|
480
|
+
"-c",
|
|
481
|
+
`otel.trace_exporter={"otlp-http"={endpoint=${JSON.stringify(`${endpoint}/v1/traces`)},protocol="json"}}`,
|
|
482
|
+
"-c",
|
|
483
|
+
`otel.exporter={"otlp-http"={endpoint=${JSON.stringify(`${endpoint}/v1/logs`)},protocol="json"}}`,
|
|
484
|
+
"-c",
|
|
485
|
+
`otel.log_user_prompt=${content}`
|
|
486
|
+
]
|
|
487
|
+
},
|
|
468
488
|
configPath: "~/.codex/config.toml",
|
|
469
489
|
branding: {
|
|
470
490
|
colors: {
|
|
@@ -500,6 +520,11 @@ var openCodeAgent = {
|
|
|
500
520
|
summary: "Configure OpenCode CLI to use the Poe API.",
|
|
501
521
|
binaryName: "opencode",
|
|
502
522
|
apiShapes: ["openai-chat-completions"],
|
|
523
|
+
otelCapture: {
|
|
524
|
+
env: {
|
|
525
|
+
OPENCODE_CONFIG_CONTENT: '{"experimental":{"openTelemetry":true}}'
|
|
526
|
+
}
|
|
527
|
+
},
|
|
503
528
|
configPath: "~/.config/opencode/config.json",
|
|
504
529
|
branding: {
|
|
505
530
|
colors: {
|
|
@@ -535,6 +560,7 @@ var gooseAgent = {
|
|
|
535
560
|
summary: "Block's open-source AI agent with ACP support.",
|
|
536
561
|
binaryName: "goose",
|
|
537
562
|
apiShapes: ["openai-chat-completions"],
|
|
563
|
+
otelCapture: {},
|
|
538
564
|
configPath: "~/.config/goose/config.yaml",
|
|
539
565
|
branding: {
|
|
540
566
|
colors: {
|
|
@@ -568,6 +594,12 @@ function freezeAgent(agent) {
|
|
|
568
594
|
if (agent.apiShapes !== void 0) {
|
|
569
595
|
Object.freeze(agent.apiShapes);
|
|
570
596
|
}
|
|
597
|
+
if (agent.otelCapture?.env !== void 0) {
|
|
598
|
+
Object.freeze(agent.otelCapture.env);
|
|
599
|
+
}
|
|
600
|
+
if (agent.otelCapture !== void 0) {
|
|
601
|
+
Object.freeze(agent.otelCapture);
|
|
602
|
+
}
|
|
571
603
|
Object.freeze(agent.branding.colors);
|
|
572
604
|
Object.freeze(agent.branding);
|
|
573
605
|
return Object.freeze(agent);
|
|
@@ -640,6 +672,7 @@ function getAgentConfig(agentId) {
|
|
|
640
672
|
}
|
|
641
673
|
|
|
642
674
|
// ../config-mutations/src/execution/apply-mutation.ts
|
|
675
|
+
import { randomUUID } from "node:crypto";
|
|
643
676
|
import path4 from "node:path";
|
|
644
677
|
|
|
645
678
|
// ../toolcraft-design/src/internal/color-support.ts
|
|
@@ -1260,12 +1293,13 @@ import path6 from "node:path";
|
|
|
1260
1293
|
|
|
1261
1294
|
// ../agent-skill-config/src/git-exclude.ts
|
|
1262
1295
|
import { execFileSync } from "node:child_process";
|
|
1296
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
1263
1297
|
import * as fs from "node:fs";
|
|
1264
1298
|
import path7 from "node:path";
|
|
1265
1299
|
|
|
1266
1300
|
// ../agent-skill-config/src/bridge-active-skills.ts
|
|
1267
1301
|
import * as fs2 from "node:fs";
|
|
1268
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
1302
|
+
import { createHash, randomUUID as randomUUID3 } from "node:crypto";
|
|
1269
1303
|
import path8 from "node:path";
|
|
1270
1304
|
|
|
1271
1305
|
// src/commands/installer.ts
|
|
@@ -1273,7 +1307,7 @@ var DEFAULT_INSTALL_AGENT = "claude-code";
|
|
|
1273
1307
|
var TERMINAL_PILOT_SKILL_NAME = "terminal-pilot";
|
|
1274
1308
|
var installableAgents = supportedAgents;
|
|
1275
1309
|
function isNotFoundError(error2) {
|
|
1276
|
-
return
|
|
1310
|
+
return hasOwnErrorCode(error2, "ENOENT");
|
|
1277
1311
|
}
|
|
1278
1312
|
function resolveInstallerServices(installer) {
|
|
1279
1313
|
return {
|
|
@@ -1371,7 +1405,7 @@ var uninstall = defineCommand({
|
|
|
1371
1405
|
if (!await folderExists(services.fs, skill.fullPath)) {
|
|
1372
1406
|
continue;
|
|
1373
1407
|
}
|
|
1374
|
-
const stagingPath = `${skill.fullPath}.removing-${
|
|
1408
|
+
const stagingPath = `${skill.fullPath}.removing-${randomUUID4()}`;
|
|
1375
1409
|
await services.fs.rename(skill.fullPath, stagingPath);
|
|
1376
1410
|
staged.push({ ...skill, stagingPath });
|
|
1377
1411
|
}
|
|
@@ -1397,7 +1431,7 @@ async function folderExists(fs3, folderPath) {
|
|
|
1397
1431
|
await fs3.stat(folderPath);
|
|
1398
1432
|
return true;
|
|
1399
1433
|
} catch (error2) {
|
|
1400
|
-
if (
|
|
1434
|
+
if (hasOwnErrorCode(error2, "ENOENT")) {
|
|
1401
1435
|
return false;
|
|
1402
1436
|
}
|
|
1403
1437
|
throw error2;
|