@cydm/pie 2.1.0 → 2.1.1

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 (37) hide show
  1. package/README.md +6 -3
  2. package/dist/builtin/extensions/ask-user/index.js +1 -1
  3. package/dist/builtin/extensions/computer-use/index.js +3993 -107
  4. package/dist/builtin/extensions/plan-mode/index.js +1 -1
  5. package/dist/builtin/extensions/subagent/index.js +2 -2
  6. package/dist/builtin/extensions/todo/index.js +1 -1
  7. package/dist/builtin/skills/chrome-devtools-axi/LICENSE +21 -0
  8. package/dist/builtin/skills/chrome-devtools-axi/SKILL.md +20 -1
  9. package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-bridge.js +20034 -0
  10. package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-cli.js +8 -2
  11. package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-runtime.js +26 -0
  12. package/dist/builtin/skills/chrome-devtools-axi/chunk-42SGITKJ.js +11 -0
  13. package/dist/builtin/skills/chrome-devtools-axi/chunk-OJ6N23UZ.js +47 -0
  14. package/dist/builtin/skills/chrome-devtools-axi/chunk-UPATXALW.js +215 -0
  15. package/dist/builtin/skills/chrome-devtools-axi/cli-F2VCSVL4.js +4424 -0
  16. package/dist/builtin/skills/skill-creator/SKILL.md +5 -2
  17. package/dist/builtin/skills/skill-creator/eval-viewer/generate_review.mjs +7 -20
  18. package/dist/builtin/skills/skill-creator/eval-viewer/viewer.html +15 -15
  19. package/dist/builtin/skills/skill-creator/scripts/aggregate_benchmark.mjs +20 -19
  20. package/dist/builtin/skills/skill-creator/scripts/generate_report.mjs +3 -3
  21. package/dist/builtin/skills/skill-creator/scripts/improve_description.mjs +12 -8
  22. package/dist/builtin/skills/skill-creator/scripts/package_skill.mjs +1 -0
  23. package/dist/builtin/skills/skill-creator/scripts/pie_runner.mjs +77 -31
  24. package/dist/builtin/skills/skill-creator/scripts/run_eval.mjs +38 -11
  25. package/dist/builtin/skills/skill-creator/scripts/run_loop.mjs +12 -6
  26. package/dist/builtin/skills/skill-creator/scripts/skill_metadata.mjs +12 -1
  27. package/dist/builtin/skills/tui-use/LICENSE +21 -0
  28. package/dist/builtin/skills/tui-use/README.md +13 -3
  29. package/dist/builtin/skills/tui-use/SKILL.md +87 -39
  30. package/dist/builtin/skills/tui-use/tui-use-cli.cjs +10608 -0
  31. package/dist/builtin/skills/tui-use/tui-use-cli.js +39 -0
  32. package/dist/builtin/skills/tui-use/tui-use-daemon.cjs +7916 -0
  33. package/dist/chunks/{chunk-PMPD56N2.js → chunk-LU7RKALH.js} +82 -24
  34. package/dist/chunks/{chunk-G2POWIA5.js → chunk-TJ2F4FL5.js} +64 -16
  35. package/dist/cli.js +7503 -87
  36. package/package.json +26 -18
  37. package/scripts/repair-node-pty.mjs +45 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cydm/pie",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Pie AI Agent CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,29 +10,30 @@
10
10
  "clean": "node ../../scripts/clean-package-output.mjs dist .test-dist",
11
11
  "prebuild": "node ../../scripts/clean-package-output.mjs dist",
12
12
  "build": "node scripts/build-release.mjs",
13
- "check:types:strict": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.strict.json",
13
+ "check:types:strict": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.strict.json && tsc -p vendor/tui-use/tsconfig.json && tsc -p vendor/chrome-devtools-axi/tsconfig.json",
14
14
  "dev": "tsc -p tsconfig.json --watch --preserveWatchOutput",
15
15
  "start": "node dist/cli.js",
16
16
  "init:models": "tsx scripts/init-models-config.ts",
17
17
  "validate:models": "tsx scripts/validate-models-config.ts",
18
18
  "test": "npm run test:offline",
19
- "pretest:offline": "npm run build --workspace @pie/agent-framework && npm run build --workspace @pie/shared-headless-capabilities && npm run build",
19
+ "pretest:offline": "npm run build --workspace @pie/agent-framework && npm run build --workspace @pie/shared-headless-capabilities && npm run build && npm run test:skill-regressions",
20
+ "test:skill-regressions": "node --test --import tsx test/bash-lifecycle.test.ts test/skill-creator-runner.test.ts test/tui-use-contract.test.ts test/tui-use-runtime.test.ts test/browser-runtime.test.ts test/computer-evidence.test.ts test/interactive-lifecycle.test.ts",
20
21
  "posttest:offline": "node --test --import tsx test/remote-model-catalog.test.ts",
21
- "test:offline": "node --test --import tsx test/builtin-extensions.test.ts test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-provider.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/mcp-adapter.test.ts test/extensions-enablement.test.ts test/extension-selector-shortcuts.test.ts test/skill-tool-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.test.ts test/runtime-mode-context.test.ts test/tool-policy.test.ts test/retry-policy.test.ts test/yolo-command.test.ts test/footer-lifecycle.test.ts test/files-utils.test.ts test/source-size-guard.test.ts test/runtime-logger.test.ts test/release-readiness.test.ts test/package-artifacts.test.ts test/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/skills-agents-discovery.test.ts test/skills-symlink.test.ts test/model-overrides.test.ts test/auth-storage.test.ts test/extension-register-provider.test.ts test/extension-reload.test.ts test/extension-terminal-input.test.ts test/extension-session-before-events.test.ts test/extension-widgets.test.ts test/extension-render-hint.test.ts test/extension-oauth-restore.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/interactive-controller-title.test.ts test/todo-title.terminal.test.ts test/plan-mode-extension.test.ts test/rendered-page-reader.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/bash-yolo.test.ts test/direct-bash.test.ts test/terminal-bell.test.ts test/calm-mode.test.ts test/project-root.test.ts test/guard-advisory-context.test.ts test/clear-command-usage.test.ts test/daily-agent-smoke.terminal.test.ts test/slash-menu-toggles.terminal.test.ts test/cli-args.test.ts test/extensions-configured-paths.test.ts test/extensions-loader-path.test.ts test/file-picker.test.ts test/interrupt-recovery.test.ts test/mention-insert-regression.test.ts test/mention-picker-navigation.test.ts test/pie-unity-rpc-skill.test.ts test/skill-creator-scripts.test.ts",
22
+ "test:offline": "node --test --test-concurrency=4 --import tsx test/builtin-extensions.test.ts test/core-services.test.ts test/cli.test.ts test/cli-auto-compaction.test.ts test/execution-state-manager.test.ts test/queued-steer-execution-state.test.ts test/architecture-boundaries.test.ts test/attachment-resolver.test.ts test/kimi-attachment-provider.test.ts test/document-attachment-extension.test.ts test/auto-compact-overflow.test.ts test/hierarchical-command-system.test.ts test/mcp-adapter.test.ts test/extensions-enablement.test.ts test/extension-selector-shortcuts.test.ts test/skill-tool-enablement.test.ts test/message-queue-unit.test.ts test/evals-harness.test.ts test/session-trace.test.ts test/runtime-mode-context.test.ts test/tool-policy.test.ts test/retry-policy.test.ts test/yolo-command.test.ts test/footer-lifecycle.test.ts test/files-utils.test.ts test/source-size-guard.test.ts test/runtime-logger.test.ts test/release-readiness.test.ts test/package-artifacts.test.ts test/code-intel-typescript-provider.test.ts test/init-extension-contract.test.ts test/skills-runtime.test.ts test/skills-agents-discovery.test.ts test/skills-symlink.test.ts test/model-overrides.test.ts test/auth-storage.test.ts test/extension-register-provider.test.ts test/extension-reload.test.ts test/extension-terminal-input.test.ts test/extension-session-before-events.test.ts test/extension-widgets.test.ts test/extension-render-hint.test.ts test/extension-oauth-restore.test.ts test/cross-host-parity.test.ts test/tool-name-rendering.test.ts test/session-selector.test.ts test/terminal-title.test.ts test/interactive-controller-title.test.ts test/todo-title.terminal.test.ts test/plan-mode-extension.test.ts test/rendered-page-reader.test.ts test/tools-registry.test.ts test/system-prompt-contract.test.ts test/bash-yolo.test.ts test/direct-bash.test.ts test/terminal-bell.test.ts test/ctrl-d-exit.test.ts test/session-display-title.test.ts test/calm-mode.test.ts test/project-root.test.ts test/guard-advisory-context.test.ts test/clear-command-usage.test.ts test/daily-agent-smoke.terminal.test.ts test/slash-menu-toggles.terminal.test.ts test/cli-args.test.ts test/extensions-configured-paths.test.ts test/extensions-loader-path.test.ts test/file-picker.test.ts test/interrupt-recovery.test.ts test/mention-insert-regression.test.ts test/mention-picker-navigation.test.ts test/pie-unity-rpc-skill.test.ts test/skill-creator-scripts.test.ts",
22
23
  "test:all": "npm run test:offline && npm run test:terminal:vitest",
23
24
  "test:terminal:vitest": "vitest run test/mention-file-select.terminal.test.ts test/tool-partial-display.terminal.test.ts test/footer-plan-mode.test.ts test/viewport-position-final.test.ts test/resume-header.terminal.test.ts --no-file-parallelism",
24
- "test:todo-tui": "PIE_REAL_TODO_TUI=1 node --test --import tsx test/todo-closure.terminal.test.ts",
25
+ "test:todo-tui": "node ../../scripts/run-with-env.mjs PIE_REAL_TODO_TUI=1 -- --test --import tsx test/todo-closure.terminal.test.ts",
25
26
  "test:daily-tui": "npm run test:daily-tui:quick",
26
- "test:daily-tui:quick": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=quick node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
27
- "test:daily-tui:full": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=full node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
28
- "test:daily-tui:quick:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
29
- "test:daily-tui:full:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
30
- "test:daily-gate:quick": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=1 node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
31
- "test:daily-gate:full": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full PIE_DAILY_REPEAT=1 node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
32
- "test:daily-gate:mock": "PIE_DAILY_MOCK_GATE=1 node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
33
- "test:daily-gate:quick:repeat:stable": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=3 node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
34
- "test:daily-gate:quick:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
35
- "test:daily-gate:full:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full node --test --import tsx test/daily-agent-smoke.terminal.test.ts",
27
+ "test:daily-tui:quick": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=quick -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
28
+ "test:daily-tui:full": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=full -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
29
+ "test:daily-tui:quick:repeat": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
30
+ "test:daily-tui:full:repeat": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
31
+ "test:daily-gate:quick": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=1 -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
32
+ "test:daily-gate:full": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full PIE_DAILY_REPEAT=1 -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
33
+ "test:daily-gate:mock": "node ../../scripts/run-with-env.mjs PIE_DAILY_MOCK_GATE=1 -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
34
+ "test:daily-gate:quick:repeat:stable": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=3 -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
35
+ "test:daily-gate:quick:repeat": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
36
+ "test:daily-gate:full:repeat": "node ../../scripts/run-with-env.mjs PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full -- --test --import tsx test/daily-agent-smoke.terminal.test.ts",
36
37
  "test:kimi-smoke": "node scripts/kimi-attachment-smoke.mjs",
37
38
  "test:integration": "node --test --import tsx test/cli.test.ts test/compact-e2e.test.ts test/human-simulation.test.ts test/interactive-integration.test.ts test/pie-cli.terminal.test.ts",
38
39
  "eval": "tsx evals/runner.ts",
@@ -43,11 +44,13 @@
43
44
  "eval:core:compare": "tsx evals/runner.ts --layer=task --dataset=core",
44
45
  "eval:cognitive": "tsx evals/run.ts",
45
46
  "pack:check": "npm pack --dry-run",
46
- "prepack": "npm run build"
47
+ "prepack": "npm run build",
48
+ "postinstall": "node scripts/repair-node-pty.mjs"
47
49
  },
48
50
  "files": [
49
51
  "dist/**/*",
50
52
  "models.schema.json",
53
+ "scripts/repair-node-pty.mjs",
51
54
  "README.md"
52
55
  ],
53
56
  "publishConfig": {
@@ -62,18 +65,23 @@
62
65
  "author": "",
63
66
  "license": "MIT",
64
67
  "engines": {
65
- "node": ">=20.0.0"
68
+ "node": ">=20.19.0"
66
69
  },
67
70
  "dependencies": {
68
71
  "@anthropic-ai/sdk": "0.50.4",
69
72
  "@modelcontextprotocol/client": "2.2.0",
70
73
  "@sinclair/typebox": "^0.34.49",
74
+ "@xterm/addon-unicode11": "0.9.0",
75
+ "@xterm/headless": "6.0.0",
71
76
  "chrome-devtools-axi": "0.1.35",
72
77
  "chrome-devtools-mcp": "1.10.1",
73
78
  "cli-highlight": "^2.1.11",
79
+ "commander": "12.1.0",
74
80
  "diff": "8.0.3",
75
81
  "jszip": "^3.10.1",
76
82
  "koffi": "^2.15.6",
83
+ "node-pty": "1.1.0",
84
+ "ws": "8.22.0",
77
85
  "yaml": "^2.8.3"
78
86
  },
79
87
  "devDependencies": {
@@ -85,8 +93,8 @@
85
93
  "@pie/tui": "*",
86
94
  "@types/diff": "7.0.2",
87
95
  "@types/node": "^22.10.5",
96
+ "@types/ws": "8.18.2",
88
97
  "esbuild": "^0.28.0",
89
- "node-pty": "^1.1.0",
90
98
  "tsx": "^4.20.3",
91
99
  "typescript": "^5.7.3",
92
100
  "vitest": "4.1.11"
@@ -0,0 +1,45 @@
1
+ // node-pty@1.1.0's registry tarball ships the unix spawn-helper without the
2
+ // executable bit, so a plain `npm install` produces a node-pty whose
3
+ // posix_spawnp fails (EACCES) and the tui-use daemon cannot start any session.
4
+ // The repo root postinstall repairs the development tree; this copy ships in
5
+ // the published package and repairs whichever node-pty install it lands next
6
+ // to (global prefix or project node_modules, hoisted or nested).
7
+ import fs from "node:fs";
8
+ import path from "node:path";
9
+ import { createRequire } from "node:module";
10
+ import { fileURLToPath } from "node:url";
11
+
12
+ export function repairNodePtySpawnHelperAt(nodePtyDir, platform = process.platform, arch = process.arch) {
13
+ if (platform === "win32") {
14
+ return { status: "skipped", reason: "win32" };
15
+ }
16
+ const helperPath = path.join(nodePtyDir, "prebuilds", `${platform}-${arch}`, "spawn-helper");
17
+ if (!fs.existsSync(helperPath)) {
18
+ return { status: "skipped", reason: "missing", helperPath };
19
+ }
20
+ const stat = fs.statSync(helperPath);
21
+ if ((stat.mode & 0o111) !== 0o000) {
22
+ return { status: "ok", helperPath };
23
+ }
24
+ fs.chmodSync(helperPath, stat.mode | 0o755);
25
+ return { status: "repaired", helperPath };
26
+ }
27
+
28
+ function resolveNodePtyDir() {
29
+ const require = createRequire(import.meta.url);
30
+ return path.dirname(require.resolve("node-pty/package.json"));
31
+ }
32
+
33
+ const isMain = process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1]);
34
+ if (isMain) {
35
+ try {
36
+ const result = repairNodePtySpawnHelperAt(resolveNodePtyDir());
37
+ if (result.status === "repaired") {
38
+ console.log(`@cydm/pie: repaired node-pty spawn-helper executable bit: ${result.helperPath}`);
39
+ }
40
+ } catch (error) {
41
+ // An exotic or missing node-pty layout must not fail the whole install;
42
+ // tui-use surfaces a precise error if the helper stays broken.
43
+ console.warn(`@cydm/pie: node-pty spawn-helper repair skipped: ${error instanceof Error ? error.message : String(error)}`);
44
+ }
45
+ }