terminal-pilot 0.0.21 → 0.0.23

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.
Files changed (61) hide show
  1. package/dist/cli.js +614 -250
  2. package/dist/cli.js.map +4 -4
  3. package/dist/commands/close-session.js +6 -4
  4. package/dist/commands/close-session.js.map +3 -3
  5. package/dist/commands/create-session.js +6 -4
  6. package/dist/commands/create-session.js.map +3 -3
  7. package/dist/commands/fill.js +6 -4
  8. package/dist/commands/fill.js.map +3 -3
  9. package/dist/commands/get-session.js +6 -4
  10. package/dist/commands/get-session.js.map +3 -3
  11. package/dist/commands/index.d.ts +35 -35
  12. package/dist/commands/index.js +97 -36
  13. package/dist/commands/index.js.map +4 -4
  14. package/dist/commands/install.js +74 -20
  15. package/dist/commands/install.js.map +4 -4
  16. package/dist/commands/installer.js +36 -2
  17. package/dist/commands/installer.js.map +4 -4
  18. package/dist/commands/list-sessions.js +6 -4
  19. package/dist/commands/list-sessions.js.map +3 -3
  20. package/dist/commands/press-key.js +6 -4
  21. package/dist/commands/press-key.js.map +3 -3
  22. package/dist/commands/read-history.js +6 -4
  23. package/dist/commands/read-history.js.map +3 -3
  24. package/dist/commands/read-screen.js +6 -4
  25. package/dist/commands/read-screen.js.map +3 -3
  26. package/dist/commands/resize.js +6 -4
  27. package/dist/commands/resize.js.map +3 -3
  28. package/dist/commands/runtime.js +6 -4
  29. package/dist/commands/runtime.js.map +3 -3
  30. package/dist/commands/screenshot.js +22 -8
  31. package/dist/commands/screenshot.js.map +4 -4
  32. package/dist/commands/send-signal.js +6 -4
  33. package/dist/commands/send-signal.js.map +3 -3
  34. package/dist/commands/type.js +6 -4
  35. package/dist/commands/type.js.map +3 -3
  36. package/dist/commands/uninstall.js +39 -5
  37. package/dist/commands/uninstall.js.map +4 -4
  38. package/dist/commands/wait-for-exit.js +6 -4
  39. package/dist/commands/wait-for-exit.js.map +3 -3
  40. package/dist/commands/wait-for.js +6 -4
  41. package/dist/commands/wait-for.js.map +3 -3
  42. package/dist/errors.d.ts +1 -0
  43. package/dist/errors.js +8 -0
  44. package/dist/errors.js.map +7 -0
  45. package/dist/index.js +8 -4
  46. package/dist/index.js.map +3 -3
  47. package/dist/terminal-pilot.js +6 -4
  48. package/dist/terminal-pilot.js.map +3 -3
  49. package/dist/terminal-session.js +6 -4
  50. package/dist/terminal-session.js.map +3 -3
  51. package/dist/testing/cli-repl.js +614 -250
  52. package/dist/testing/cli-repl.js.map +4 -4
  53. package/dist/testing/qa-cli.js +614 -250
  54. package/dist/testing/qa-cli.js.map +4 -4
  55. package/node_modules/@poe-code/agent-skill-config/dist/apply.js +2 -1
  56. package/node_modules/@poe-code/agent-skill-config/dist/bridge-active-skills.js +8 -9
  57. package/node_modules/@poe-code/agent-skill-config/dist/error-codes.d.ts +1 -0
  58. package/node_modules/@poe-code/agent-skill-config/dist/error-codes.js +5 -0
  59. package/node_modules/@poe-code/agent-skill-config/dist/git-exclude.js +18 -12
  60. package/node_modules/@poe-code/agent-skill-config/dist/templates.js +2 -1
  61. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  // src/commands/uninstall.ts
2
- import { randomUUID as randomUUID2 } from "node:crypto";
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 typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "ENOENT";
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-${randomUUID2()}`;
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 (typeof error2 === "object" && error2 !== null && "code" in error2 && error2.code === "ENOENT") {
1434
+ if (hasOwnErrorCode(error2, "ENOENT")) {
1401
1435
  return false;
1402
1436
  }
1403
1437
  throw error2;