@cydm/pie 1.0.51 → 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.
- package/README.md +36 -16
- package/dist/builtin/extensions/ask-user/index.js +4 -3
- package/dist/builtin/extensions/ask-user/package.json +8 -7
- package/dist/builtin/extensions/changelog/package.json +9 -9
- package/dist/builtin/extensions/computer-use/index.js +9352 -0
- package/dist/builtin/extensions/computer-use/package.json +11 -0
- package/dist/builtin/extensions/computer-use/prebuilt/linux/arm64/linux-bridge +0 -0
- package/dist/builtin/extensions/computer-use/prebuilt/linux/x64/linux-bridge +0 -0
- package/dist/builtin/extensions/computer-use/prebuilt/macos/arm64/pie-computer-use +0 -0
- package/dist/builtin/extensions/computer-use/prebuilt/macos/universal/pie-computer-use.app/Contents/Info.plist +24 -0
- package/dist/builtin/extensions/computer-use/prebuilt/macos/universal/pie-computer-use.app/Contents/MacOS/pie-computer-use +0 -0
- package/dist/builtin/extensions/computer-use/prebuilt/macos/universal/pie-computer-use.app/Contents/_CodeSignature/CodeResources +115 -0
- package/dist/builtin/extensions/computer-use/prebuilt/macos/x64/pie-computer-use +0 -0
- package/dist/builtin/extensions/computer-use/prebuilt/windows/windows-bridge.exe +0 -0
- package/dist/builtin/extensions/computer-use/scripts/build-native.mjs +277 -0
- package/dist/builtin/extensions/computer-use/scripts/helper-path.mjs +48 -0
- package/dist/builtin/extensions/computer-use/scripts/setup-helper.mjs +549 -0
- package/dist/builtin/extensions/document-attachments/package.json +9 -9
- package/dist/builtin/extensions/init/package.json +9 -9
- package/dist/builtin/extensions/mcp-adapter/index.js +25250 -0
- package/dist/builtin/extensions/mcp-adapter/package.json +11 -0
- package/dist/builtin/extensions/plan-mode/index.js +4 -3
- package/dist/builtin/extensions/plan-mode/package.json +9 -9
- package/dist/builtin/extensions/subagent/index.js +6 -4
- package/dist/builtin/extensions/subagent/package.json +16 -12
- package/dist/builtin/extensions/todo/index.js +4 -3
- package/dist/builtin/extensions/todo/package.json +9 -9
- package/dist/builtin/skills/chrome-devtools-axi/CHANGELOG.md +5 -0
- package/dist/builtin/skills/chrome-devtools-axi/LICENSE +21 -0
- package/dist/builtin/skills/chrome-devtools-axi/README.md +17 -0
- package/dist/builtin/skills/chrome-devtools-axi/SKILL.md +50 -0
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-bridge.js +20034 -0
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-cli.js +83 -0
- package/dist/builtin/skills/chrome-devtools-axi/chrome-devtools-axi-runtime.js +26 -0
- package/dist/builtin/skills/chrome-devtools-axi/chunk-42SGITKJ.js +11 -0
- package/dist/builtin/skills/chrome-devtools-axi/chunk-OJ6N23UZ.js +47 -0
- package/dist/builtin/skills/chrome-devtools-axi/chunk-UPATXALW.js +215 -0
- package/dist/builtin/skills/chrome-devtools-axi/cli-F2VCSVL4.js +4424 -0
- package/dist/builtin/skills/chrome-devtools-axi/package.json +12 -0
- package/dist/builtin/skills/skill-creator/SKILL.md +5 -2
- package/dist/builtin/skills/skill-creator/eval-viewer/generate_review.mjs +7 -20
- package/dist/builtin/skills/skill-creator/eval-viewer/viewer.html +15 -15
- package/dist/builtin/skills/skill-creator/scripts/aggregate_benchmark.mjs +20 -19
- package/dist/builtin/skills/skill-creator/scripts/generate_report.mjs +3 -3
- package/dist/builtin/skills/skill-creator/scripts/improve_description.mjs +12 -8
- package/dist/builtin/skills/skill-creator/scripts/package_skill.mjs +1 -0
- package/dist/builtin/skills/skill-creator/scripts/pie_runner.mjs +77 -31
- package/dist/builtin/skills/skill-creator/scripts/run_eval.mjs +38 -11
- package/dist/builtin/skills/skill-creator/scripts/run_loop.mjs +12 -6
- package/dist/builtin/skills/skill-creator/scripts/skill_metadata.mjs +12 -1
- package/dist/builtin/skills/tui-use/LICENSE +21 -0
- package/dist/builtin/skills/tui-use/README.md +17 -0
- package/dist/builtin/skills/tui-use/SKILL.md +106 -0
- package/dist/builtin/skills/tui-use/tui-use-cli.cjs +10608 -0
- package/dist/builtin/skills/tui-use/tui-use-cli.js +39 -0
- package/dist/builtin/skills/tui-use/tui-use-daemon.cjs +7916 -0
- package/dist/chunks/chunk-5353DEEC.js +130 -0
- package/dist/chunks/{chunk-S2J3SZZX.js → chunk-IM43UYVV.js} +827 -3385
- package/dist/chunks/{chunk-A644H2XX.js → chunk-LU7RKALH.js} +241 -96
- package/dist/chunks/{chunk-B3SMW2XW.js → chunk-QJH6YN2W.js} +1 -1
- package/dist/chunks/{chunk-KDPAGHYY.js → chunk-TJ2F4FL5.js} +190 -207
- package/dist/chunks/chunk-XXGYUYXI.js +2718 -0
- package/dist/chunks/{src-UKCIAX6F.js → src-QSP2OPHU.js} +3 -2
- package/dist/chunks/{test-stream-NCBFPM2I.js → test-stream-CVGWFLSX.js} +2 -1
- package/dist/chunks/webapi-MBCKO7ZV.js +2481 -0
- package/dist/cli.js +7866 -369
- package/package.json +29 -20
- package/scripts/repair-node-pty.mjs +45 -0
- package/dist/builtin/skills/browser-tools/CHANGELOG.md +0 -5
- package/dist/builtin/skills/browser-tools/README.md +0 -17
- package/dist/builtin/skills/browser-tools/SKILL.md +0 -43
- package/dist/builtin/skills/browser-tools/package.json +0 -12
- package/dist/builtin/skills/browser-tools/playwright-cli.js +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cydm/pie",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Pie AI Agent CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,32 +10,32 @@
|
|
|
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/extensions-enablement.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/tools-registry.test.ts test/system-prompt-contract.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
|
|
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
|
|
27
|
-
"test:daily-tui:full": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_TUI_LEVEL=full
|
|
28
|
-
"test:daily-tui:quick:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick
|
|
29
|
-
"test:daily-tui:full:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full
|
|
30
|
-
"test:daily-gate:quick": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=1
|
|
31
|
-
"test:daily-gate:full": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full PIE_DAILY_REPEAT=1
|
|
32
|
-
"test:daily-gate:mock": "PIE_DAILY_MOCK_GATE=1
|
|
33
|
-
"test:daily-gate:quick:repeat:stable": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick PIE_DAILY_REPEAT=3
|
|
34
|
-
"test:daily-gate:quick:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=quick
|
|
35
|
-
"test:daily-gate:full:repeat": "PIE_REAL_DAILY_TUI=1 PIE_DAILY_REPEAT_MODE=full
|
|
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
|
-
"test:fixes": "tsx test-fixes.ts",
|
|
39
39
|
"eval": "tsx evals/runner.ts",
|
|
40
40
|
"eval:task": "tsx evals/runner.ts --layer=task",
|
|
41
41
|
"eval:dev": "tsx evals/runner.ts --layer=task --dataset=dev",
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
"eval:core:compare": "tsx evals/runner.ts --layer=task --dataset=core",
|
|
45
45
|
"eval:cognitive": "tsx evals/run.ts",
|
|
46
46
|
"pack:check": "npm pack --dry-run",
|
|
47
|
-
"prepack": "npm run build"
|
|
47
|
+
"prepack": "npm run build",
|
|
48
|
+
"postinstall": "node scripts/repair-node-pty.mjs"
|
|
48
49
|
},
|
|
49
50
|
"files": [
|
|
50
51
|
"dist/**/*",
|
|
51
52
|
"models.schema.json",
|
|
53
|
+
"scripts/repair-node-pty.mjs",
|
|
52
54
|
"README.md"
|
|
53
55
|
],
|
|
54
56
|
"publishConfig": {
|
|
@@ -63,16 +65,23 @@
|
|
|
63
65
|
"author": "",
|
|
64
66
|
"license": "MIT",
|
|
65
67
|
"engines": {
|
|
66
|
-
"node": ">=20.
|
|
68
|
+
"node": ">=20.19.0"
|
|
67
69
|
},
|
|
68
70
|
"dependencies": {
|
|
69
71
|
"@anthropic-ai/sdk": "0.50.4",
|
|
70
|
-
"@
|
|
72
|
+
"@modelcontextprotocol/client": "2.2.0",
|
|
71
73
|
"@sinclair/typebox": "^0.34.49",
|
|
74
|
+
"@xterm/addon-unicode11": "0.9.0",
|
|
75
|
+
"@xterm/headless": "6.0.0",
|
|
76
|
+
"chrome-devtools-axi": "0.1.35",
|
|
77
|
+
"chrome-devtools-mcp": "1.10.1",
|
|
72
78
|
"cli-highlight": "^2.1.11",
|
|
79
|
+
"commander": "12.1.0",
|
|
73
80
|
"diff": "8.0.3",
|
|
74
81
|
"jszip": "^3.10.1",
|
|
75
82
|
"koffi": "^2.15.6",
|
|
83
|
+
"node-pty": "1.1.0",
|
|
84
|
+
"ws": "8.22.0",
|
|
76
85
|
"yaml": "^2.8.3"
|
|
77
86
|
},
|
|
78
87
|
"devDependencies": {
|
|
@@ -84,8 +93,8 @@
|
|
|
84
93
|
"@pie/tui": "*",
|
|
85
94
|
"@types/diff": "7.0.2",
|
|
86
95
|
"@types/node": "^22.10.5",
|
|
96
|
+
"@types/ws": "8.18.2",
|
|
87
97
|
"esbuild": "^0.28.0",
|
|
88
|
-
"node-pty": "^1.1.0",
|
|
89
98
|
"tsx": "^4.20.3",
|
|
90
99
|
"typescript": "^5.7.3",
|
|
91
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
|
+
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Browser Tools
|
|
2
|
-
|
|
3
|
-
Pie's browser-tools skill is backed by Microsoft Playwright CLI through `playwright-cli.js`.
|
|
4
|
-
|
|
5
|
-
Use:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
node playwright-cli.js --help
|
|
9
|
-
node playwright-cli.js open https://example.com
|
|
10
|
-
node playwright-cli.js snapshot
|
|
11
|
-
node playwright-cli.js screenshot
|
|
12
|
-
node playwright-cli.js console
|
|
13
|
-
node playwright-cli.js requests
|
|
14
|
-
node playwright-cli.js close
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Dependencies are provided by `@cydm/pie`; do not run `npm install` inside this skill directory.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: browser-tools
|
|
3
|
-
description: Interactive browser automation via Microsoft Playwright CLI. Use when you need to open pages, inspect DOM snapshots, click/type, capture screenshots, inspect console/request output, or test frontend flows in a real browser.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Browser Tools
|
|
7
|
-
|
|
8
|
-
Use Pie's packaged Microsoft Playwright CLI wrapper. Scripts live next to this skill; resolve `playwright-cli.js` against this skill's `baseDir` and use the resulting ordinary path with `bash`.
|
|
9
|
-
|
|
10
|
-
No manual dependency install is required when this skill is shipped with Pie.
|
|
11
|
-
|
|
12
|
-
## Common Commands
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
node <baseDir>/playwright-cli.js open https://example.com
|
|
16
|
-
node <baseDir>/playwright-cli.js goto https://example.com
|
|
17
|
-
node <baseDir>/playwright-cli.js snapshot
|
|
18
|
-
node <baseDir>/playwright-cli.js click "Submit"
|
|
19
|
-
node <baseDir>/playwright-cli.js type "hello"
|
|
20
|
-
node <baseDir>/playwright-cli.js screenshot
|
|
21
|
-
node <baseDir>/playwright-cli.js console
|
|
22
|
-
node <baseDir>/playwright-cli.js requests
|
|
23
|
-
node <baseDir>/playwright-cli.js close
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Use `node <baseDir>/playwright-cli.js --help` for the full command list.
|
|
27
|
-
|
|
28
|
-
## Workflow
|
|
29
|
-
|
|
30
|
-
Start with `open` or `goto`, then use `snapshot` before interacting. Prefer snapshot, console, and request output for diagnosis; use screenshots when visual layout matters. Use named sessions with `-s=<session>` when you need to keep multiple browser flows separate.
|
|
31
|
-
|
|
32
|
-
If the browser is not installed, run:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
node <baseDir>/playwright-cli.js install-browser chromium
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
If a session gets stuck, use:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
node <baseDir>/playwright-cli.js close
|
|
42
|
-
node <baseDir>/playwright-cli.js kill-all
|
|
43
|
-
```
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "browser-tools",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "Microsoft Playwright CLI wrapper for collaborative site exploration",
|
|
6
|
-
"author": "",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"private": true,
|
|
9
|
-
"pie": {
|
|
10
|
-
"dependenciesProvidedBy": "@cydm/pie"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { spawnSync } from "node:child_process";
|
|
4
|
-
import fs from "node:fs";
|
|
5
|
-
import { createRequire } from "node:module";
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
import { fileURLToPath } from "node:url";
|
|
8
|
-
|
|
9
|
-
const require = createRequire(import.meta.url);
|
|
10
|
-
|
|
11
|
-
export function resolvePlaywrightCli() {
|
|
12
|
-
return require.resolve("@playwright/cli/playwright-cli.js");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function runPlaywrightCli(args = process.argv.slice(2), options = {}) {
|
|
16
|
-
const bin = resolvePlaywrightCli();
|
|
17
|
-
return spawnSync(process.execPath, [bin, ...args], {
|
|
18
|
-
stdio: "inherit",
|
|
19
|
-
shell: false,
|
|
20
|
-
...options,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function normalizeDirectEntryPath(candidate) {
|
|
25
|
-
const resolved = path.resolve(candidate);
|
|
26
|
-
const real = fs.realpathSync.native(resolved);
|
|
27
|
-
const normalized = path.normalize(real);
|
|
28
|
-
return process.platform === "win32" ? normalized.toLowerCase() : normalized;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function isDirectEntry(moduleUrl = import.meta.url, argvPath = process.argv[1]) {
|
|
32
|
-
if (!argvPath) return false;
|
|
33
|
-
try {
|
|
34
|
-
const modulePath = normalizeDirectEntryPath(fileURLToPath(moduleUrl));
|
|
35
|
-
const entryPath = normalizeDirectEntryPath(argvPath);
|
|
36
|
-
return modulePath === entryPath;
|
|
37
|
-
} catch {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (isDirectEntry()) {
|
|
43
|
-
const result = runPlaywrightCli();
|
|
44
|
-
process.exitCode = result.status ?? 1;
|
|
45
|
-
}
|