@pi-harness/pi-harness 0.1.13 → 0.1.14
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 +678 -2
- package/apps/web/dist/assets/index-BVI_IS-R.css +2 -0
- package/apps/web/dist/assets/index-C98SJjJd.js +22 -0
- package/apps/web/dist/index.html +2 -2
- package/apps/web/package.json +6 -6
- package/node_modules/@pi-harness/api-gateway/dist/index.d.ts.map +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/index.js +97 -9
- package/node_modules/@pi-harness/api-gateway/dist/index.js.map +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/agent-teams.json +6 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/annotation.json +1 -2
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/at-file.json +11 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-fetch.json +12 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/browser-session.json +14 -8
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/canvas-draw.json +3 -4
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cleaner.json +11 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cli-notifier.json +5 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/code2skill.json +5 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -2
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context-doctor.json +12 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/context.json +10 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-group.json +2 -2
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-logger-console.json +4 -4
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cordis-timer.json +3 -3
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/cost-meter.json +9 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/dependency-checker.json +13 -10
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +10 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/fail-logger.json +11 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/genui.json +7 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +13 -8
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/graph-memory.json +13 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/hol-guard.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/i18n-pair.json +9 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-client.json +12 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/modlens.json +4 -4
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/openpets.json +9 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-dev.json +8 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/plugin-stars.json +15 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/readme-gen.json +12 -8
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/recall-unread.json +11 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-bridge.json +13 -8
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-insights.json +12 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/skill-guard.json +9 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/sql-lens.json +13 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/test-harness.json +14 -7
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/token-guard.json +12 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/turn-rewind.json +11 -6
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +8 -5
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
- package/node_modules/@pi-harness/api-gateway/dist/marketplace-entries/official/yaml-validator.json +8 -5
- package/node_modules/@pi-harness/api-gateway/package.json +1 -1
- package/node_modules/@pi-harness/cli/dist/node-stdio.d.ts.map +1 -1
- package/node_modules/@pi-harness/cli/dist/node-stdio.js +83 -20
- package/node_modules/@pi-harness/cli/dist/node-stdio.js.map +1 -1
- package/node_modules/@pi-harness/cli/package.json +1 -1
- package/node_modules/@pi-harness/core/dist/atomic-write.d.ts +8 -0
- package/node_modules/@pi-harness/core/dist/atomic-write.d.ts.map +1 -0
- package/node_modules/@pi-harness/core/dist/atomic-write.js +40 -0
- package/node_modules/@pi-harness/core/dist/atomic-write.js.map +1 -0
- package/node_modules/@pi-harness/core/dist/boot.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/boot.js +132 -10
- package/node_modules/@pi-harness/core/dist/boot.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/bounded-file.d.ts +7 -0
- package/node_modules/@pi-harness/core/dist/bounded-file.d.ts.map +1 -0
- package/node_modules/@pi-harness/core/dist/bounded-file.js +50 -0
- package/node_modules/@pi-harness/core/dist/bounded-file.js.map +1 -0
- package/node_modules/@pi-harness/core/dist/config.d.ts +2 -0
- package/node_modules/@pi-harness/core/dist/config.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/config.js +21 -0
- package/node_modules/@pi-harness/core/dist/config.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/cordis-timer.d.ts +15 -0
- package/node_modules/@pi-harness/core/dist/cordis-timer.d.ts.map +1 -0
- package/node_modules/@pi-harness/core/dist/cordis-timer.js +99 -0
- package/node_modules/@pi-harness/core/dist/cordis-timer.js.map +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/agent-teams.d.ts +5 -1
- package/node_modules/@pi-harness/core/dist/plugins/agent-teams.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/agent-teams.js +986 -105
- package/node_modules/@pi-harness/core/dist/plugins/agent-teams.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.js +39 -11
- package/node_modules/@pi-harness/core/dist/plugins/anchored-standard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/annotation.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/annotation.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/annotation.js +35 -17
- package/node_modules/@pi-harness/core/dist/plugins/annotation.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/archify.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/archify.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/archify.js +69 -22
- package/node_modules/@pi-harness/core/dist/plugins/archify.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/at-file.d.ts +5 -1
- package/node_modules/@pi-harness/core/dist/plugins/at-file.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/at-file.js +120 -29
- package/node_modules/@pi-harness/core/dist/plugins/at-file.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/auto-mode.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/auto-mode.js +89 -20
- package/node_modules/@pi-harness/core/dist/plugins/auto-mode.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.js +14 -4
- package/node_modules/@pi-harness/core/dist/plugins/better-sidebar.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.js +288 -96
- package/node_modules/@pi-harness/core/dist/plugins/browser-fetch.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/browser-session.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/browser-session.js +445 -106
- package/node_modules/@pi-harness/core/dist/plugins/browser-session.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.js +71 -19
- package/node_modules/@pi-harness/core/dist/plugins/canvas-draw.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/change-verifier.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/change-verifier.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/change-verifier.js +30 -9
- package/node_modules/@pi-harness/core/dist/plugins/change-verifier.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cleaner.d.ts +5 -1
- package/node_modules/@pi-harness/core/dist/plugins/cleaner.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cleaner.js +337 -40
- package/node_modules/@pi-harness/core/dist/plugins/cleaner.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.d.ts +2 -1
- package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.js +99 -42
- package/node_modules/@pi-harness/core/dist/plugins/cli-notifier.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/code2skill.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/code2skill.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/code2skill.js +178 -38
- package/node_modules/@pi-harness/core/dist/plugins/code2skill.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.d.ts +2 -1
- package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.js +79 -49
- package/node_modules/@pi-harness/core/dist/plugins/colleague-skill.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/context-doctor.d.ts +6 -1
- package/node_modules/@pi-harness/core/dist/plugins/context-doctor.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/context-doctor.js +403 -39
- package/node_modules/@pi-harness/core/dist/plugins/context-doctor.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/context.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/context.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/context.js +169 -42
- package/node_modules/@pi-harness/core/dist/plugins/context.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cost-meter.d.ts +4 -0
- package/node_modules/@pi-harness/core/dist/plugins/cost-meter.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/cost-meter.js +319 -93
- package/node_modules/@pi-harness/core/dist/plugins/cost-meter.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.d.ts +11 -2
- package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.js +463 -114
- package/node_modules/@pi-harness/core/dist/plugins/dependency-checker.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.js +322 -80
- package/node_modules/@pi-harness/core/dist/plugins/docker-sandbox.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/fail-logger.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/fail-logger.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/fail-logger.js +187 -20
- package/node_modules/@pi-harness/core/dist/plugins/fail-logger.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/genui.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/genui.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/genui.js +103 -38
- package/node_modules/@pi-harness/core/dist/plugins/genui.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.d.ts +8 -2
- package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.js +400 -54
- package/node_modules/@pi-harness/core/dist/plugins/git-time-capsule.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/graph-memory.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/graph-memory.js +329 -42
- package/node_modules/@pi-harness/core/dist/plugins/graph-memory.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/history-compressor.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/history-compressor.js +31 -12
- package/node_modules/@pi-harness/core/dist/plugins/history-compressor.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/hol-guard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/hol-guard.js +33 -13
- package/node_modules/@pi-harness/core/dist/plugins/hol-guard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.d.ts +5 -1
- package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.js +308 -52
- package/node_modules/@pi-harness/core/dist/plugins/i18n-pair.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/image-compressor.d.ts +7 -0
- package/node_modules/@pi-harness/core/dist/plugins/image-compressor.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/image-compressor.js +98 -25
- package/node_modules/@pi-harness/core/dist/plugins/image-compressor.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.js +21 -11
- package/node_modules/@pi-harness/core/dist/plugins/llm-verifier.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mcp-client.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mcp-client.js +986 -232
- package/node_modules/@pi-harness/core/dist/plugins/mcp-client.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.js +30 -16
- package/node_modules/@pi-harness/core/dist/plugins/mcp-panel.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/memory.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/memory.js +292 -59
- package/node_modules/@pi-harness/core/dist/plugins/memory.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.js +20 -10
- package/node_modules/@pi-harness/core/dist/plugins/mirage-bridge.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mock-server.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/mock-server.js +85 -54
- package/node_modules/@pi-harness/core/dist/plugins/mock-server.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/model.d.ts +3 -0
- package/node_modules/@pi-harness/core/dist/plugins/model.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/model.js +3 -0
- package/node_modules/@pi-harness/core/dist/plugins/model.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/models.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/models.js +10 -2
- package/node_modules/@pi-harness/core/dist/plugins/models.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/modlens.d.ts +8 -1
- package/node_modules/@pi-harness/core/dist/plugins/modlens.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/modlens.js +438 -31
- package/node_modules/@pi-harness/core/dist/plugins/modlens.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/module-search.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/module-search.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/module-search.js +35 -16
- package/node_modules/@pi-harness/core/dist/plugins/module-search.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.js +20 -11
- package/node_modules/@pi-harness/core/dist/plugins/obsidian-sync.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/openpets.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/openpets.js +203 -44
- package/node_modules/@pi-harness/core/dist/plugins/openpets.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plan-execute.d.ts +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/plan-execute.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plan-execute.js +42 -21
- package/node_modules/@pi-harness/core/dist/plugins/plan-execute.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-check.d.ts +12 -3
- package/node_modules/@pi-harness/core/dist/plugins/plugin-check.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-check.js +83 -12
- package/node_modules/@pi-harness/core/dist/plugins/plugin-check.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.js +156 -23
- package/node_modules/@pi-harness/core/dist/plugins/plugin-dev.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.js +131 -13
- package/node_modules/@pi-harness/core/dist/plugins/plugin-finder.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.d.ts +4 -0
- package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.js +137 -36
- package/node_modules/@pi-harness/core/dist/plugins/plugin-radar.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.js +282 -81
- package/node_modules/@pi-harness/core/dist/plugins/plugin-stars.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.js +60 -9
- package/node_modules/@pi-harness/core/dist/plugins/prompt-guard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/prompt-library.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/prompt-library.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/prompt-library.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/prompt-library.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/readme-gen.d.ts +6 -2
- package/node_modules/@pi-harness/core/dist/plugins/readme-gen.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/readme-gen.js +514 -73
- package/node_modules/@pi-harness/core/dist/plugins/readme-gen.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/recall-unread.d.ts +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/recall-unread.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/recall-unread.js +411 -68
- package/node_modules/@pi-harness/core/dist/plugins/recall-unread.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/resources.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/resources.js +66 -3
- package/node_modules/@pi-harness/core/dist/plugins/resources.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.js +2 -1
- package/node_modules/@pi-harness/core/dist/plugins/reverse-skill.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.js +35 -16
- package/node_modules/@pi-harness/core/dist/plugins/reviewer-bot.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/runtime-doctor.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/runtime.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/runtime.js +104 -70
- package/node_modules/@pi-harness/core/dist/plugins/runtime.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/secure-audit.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/secure-audit.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/secure-audit.js +30 -12
- package/node_modules/@pi-harness/core/dist/plugins/secure-audit.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-bookmarks.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-bridge.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/session-bridge.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-bridge.js +401 -88
- package/node_modules/@pi-harness/core/dist/plugins/session-bridge.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-compare.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/session-compare.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-compare.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-compare.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-export.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/session-export.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-export.js +6 -6
- package/node_modules/@pi-harness/core/dist/plugins/session-export.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-insights.d.ts +37 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-insights.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-insights.js +406 -21
- package/node_modules/@pi-harness/core/dist/plugins/session-insights.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-search.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/session-search.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-search.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/session-search.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/session.js +8 -1
- package/node_modules/@pi-harness/core/dist/plugins/session.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.js +6 -5
- package/node_modules/@pi-harness/core/dist/plugins/skill-catalog.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/skill-guard.d.ts +2 -1
- package/node_modules/@pi-harness/core/dist/plugins/skill-guard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/skill-guard.js +241 -61
- package/node_modules/@pi-harness/core/dist/plugins/skill-guard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.d.ts +2 -0
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.d.ts.map +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.js +206 -0
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens-worker.js.map +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens.d.ts +7 -1
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens.js +301 -68
- package/node_modules/@pi-harness/core/dist/plugins/sql-lens.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/stdio.d.ts +3 -0
- package/node_modules/@pi-harness/core/dist/plugins/stdio.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/stdio.js +62 -4
- package/node_modules/@pi-harness/core/dist/plugins/stdio.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/synapse.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/synapse.js +17 -9
- package/node_modules/@pi-harness/core/dist/plugins/synapse.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/tab-manager.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/tab-manager.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/tab-manager.js +167 -62
- package/node_modules/@pi-harness/core/dist/plugins/tab-manager.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/taskboard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/taskboard.js +50 -22
- package/node_modules/@pi-harness/core/dist/plugins/taskboard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.d.ts +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.js +30 -11
- package/node_modules/@pi-harness/core/dist/plugins/telemetry-blocker.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/test-harness.d.ts +7 -1
- package/node_modules/@pi-harness/core/dist/plugins/test-harness.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/test-harness.js +255 -43
- package/node_modules/@pi-harness/core/dist/plugins/test-harness.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/theme-studio.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/theme-studio.js +4 -2
- package/node_modules/@pi-harness/core/dist/plugins/theme-studio.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/token-guard.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/token-guard.js +164 -32
- package/node_modules/@pi-harness/core/dist/plugins/token-guard.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/tools.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/tools.js +4 -1
- package/node_modules/@pi-harness/core/dist/plugins/tools.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.d.ts +17 -0
- package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.js +340 -36
- package/node_modules/@pi-harness/core/dist/plugins/turn-rewind.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.js +157 -51
- package/node_modules/@pi-harness/core/dist/plugins/undo-savepoint.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.d.ts +22 -3
- package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.js +389 -66
- package/node_modules/@pi-harness/core/dist/plugins/vision-toolkit.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/web-research.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/web-research.js +13 -4
- package/node_modules/@pi-harness/core/dist/plugins/web-research.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.d.ts +8 -2
- package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.js +28 -10
- package/node_modules/@pi-harness/core/dist/plugins/workspace-navigator.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/workspace-search.d.ts +7 -0
- package/node_modules/@pi-harness/core/dist/plugins/workspace-search.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/workspace-search.js +67 -34
- package/node_modules/@pi-harness/core/dist/plugins/workspace-search.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.js +156 -47
- package/node_modules/@pi-harness/core/dist/plugins/yaml-validator.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/runtime.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/runtime.js +8 -3
- package/node_modules/@pi-harness/core/dist/runtime.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/services.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/services.js +22 -2
- package/node_modules/@pi-harness/core/dist/services.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/stdio.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/stdio.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/stdio.js +241 -25
- package/node_modules/@pi-harness/core/dist/stdio.js.map +1 -1
- package/node_modules/@pi-harness/core/dist/workspace-path.d.ts +1 -0
- package/node_modules/@pi-harness/core/dist/workspace-path.d.ts.map +1 -1
- package/node_modules/@pi-harness/core/dist/workspace-path.js +9 -0
- package/node_modules/@pi-harness/core/dist/workspace-path.js.map +1 -1
- package/node_modules/@pi-harness/core/package.json +1 -1
- package/node_modules/@pi-harness/core/profiles/default/cordis.yml +4 -2
- package/node_modules/@pi-harness/host-webserver/package.json +1 -1
- package/node_modules/@pi-harness/web-app/package.json +1 -1
- package/package.json +12 -7
- package/packages/api-gateway/dist/index.d.ts.map +1 -1
- package/packages/api-gateway/dist/index.js +97 -9
- package/packages/api-gateway/dist/index.js.map +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/agent-teams.json +6 -6
- package/packages/api-gateway/dist/marketplace-entries/official/anchored-standard.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/annotation.json +1 -2
- package/packages/api-gateway/dist/marketplace-entries/official/archify.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/at-file.json +11 -5
- package/packages/api-gateway/dist/marketplace-entries/official/auto-mode.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/better-sidebar.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/browser-fetch.json +12 -5
- package/packages/api-gateway/dist/marketplace-entries/official/browser-session.json +14 -8
- package/packages/api-gateway/dist/marketplace-entries/official/canvas-draw.json +3 -4
- package/packages/api-gateway/dist/marketplace-entries/official/change-verifier.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/cleaner.json +11 -6
- package/packages/api-gateway/dist/marketplace-entries/official/cli-notifier.json +5 -5
- package/packages/api-gateway/dist/marketplace-entries/official/code2skill.json +5 -5
- package/packages/api-gateway/dist/marketplace-entries/official/colleague-skill.json +1 -2
- package/packages/api-gateway/dist/marketplace-entries/official/context-doctor.json +12 -7
- package/packages/api-gateway/dist/marketplace-entries/official/context.json +10 -5
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-group.json +2 -2
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-logger-console.json +4 -4
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-timer.json +3 -3
- package/packages/api-gateway/dist/marketplace-entries/official/cost-meter.json +9 -6
- package/packages/api-gateway/dist/marketplace-entries/official/dependency-checker.json +13 -10
- package/packages/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +10 -5
- package/packages/api-gateway/dist/marketplace-entries/official/fail-logger.json +11 -6
- package/packages/api-gateway/dist/marketplace-entries/official/genui.json +7 -5
- package/packages/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +13 -8
- package/packages/api-gateway/dist/marketplace-entries/official/graph-memory.json +13 -7
- package/packages/api-gateway/dist/marketplace-entries/official/history-compressor.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/hol-guard.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/i18n-pair.json +9 -6
- package/packages/api-gateway/dist/marketplace-entries/official/image-compressor.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/llm-verifier.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/mcp-client.json +12 -7
- package/packages/api-gateway/dist/marketplace-entries/official/mcp-panel.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/memory.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/mock-server.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/modlens.json +4 -4
- package/packages/api-gateway/dist/marketplace-entries/official/module-search.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/openpets.json +9 -5
- package/packages/api-gateway/dist/marketplace-entries/official/plan-execute.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-check.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-dev.json +8 -6
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-finder.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-radar.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-stars.json +15 -7
- package/packages/api-gateway/dist/marketplace-entries/official/prompt-guard.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/prompt-library.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/readme-gen.json +12 -8
- package/packages/api-gateway/dist/marketplace-entries/official/recall-unread.json +11 -6
- package/packages/api-gateway/dist/marketplace-entries/official/reverse-skill.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/secure-audit.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/session-bridge.json +13 -8
- package/packages/api-gateway/dist/marketplace-entries/official/session-compare.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/session-export.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/session-insights.json +12 -6
- package/packages/api-gateway/dist/marketplace-entries/official/session-search.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/skill-catalog.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/skill-guard.json +9 -5
- package/packages/api-gateway/dist/marketplace-entries/official/sql-lens.json +13 -7
- package/packages/api-gateway/dist/marketplace-entries/official/synapse.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/tab-manager.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/taskboard.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/test-harness.json +14 -7
- package/packages/api-gateway/dist/marketplace-entries/official/theme-studio.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/token-guard.json +12 -6
- package/packages/api-gateway/dist/marketplace-entries/official/turn-rewind.json +11 -6
- package/packages/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +8 -5
- package/packages/api-gateway/dist/marketplace-entries/official/web-research.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/workspace-search.json +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/yaml-validator.json +8 -5
- package/packages/api-gateway/package.json +1 -1
- package/packages/api-gateway/src/index.ts +90 -9
- package/packages/api-gateway/src/marketplace-entries/official/agent-teams.json +6 -6
- package/packages/api-gateway/src/marketplace-entries/official/anchored-standard.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/annotation.json +1 -2
- package/packages/api-gateway/src/marketplace-entries/official/archify.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/at-file.json +11 -5
- package/packages/api-gateway/src/marketplace-entries/official/auto-mode.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/better-sidebar.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/browser-fetch.json +12 -5
- package/packages/api-gateway/src/marketplace-entries/official/browser-session.json +14 -8
- package/packages/api-gateway/src/marketplace-entries/official/canvas-draw.json +3 -4
- package/packages/api-gateway/src/marketplace-entries/official/change-verifier.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/cleaner.json +11 -6
- package/packages/api-gateway/src/marketplace-entries/official/cli-notifier.json +5 -5
- package/packages/api-gateway/src/marketplace-entries/official/code2skill.json +5 -5
- package/packages/api-gateway/src/marketplace-entries/official/colleague-skill.json +1 -2
- package/packages/api-gateway/src/marketplace-entries/official/context-doctor.json +12 -7
- package/packages/api-gateway/src/marketplace-entries/official/context.json +10 -5
- package/packages/api-gateway/src/marketplace-entries/official/cordis-group.json +2 -2
- package/packages/api-gateway/src/marketplace-entries/official/cordis-logger-console.json +4 -4
- package/packages/api-gateway/src/marketplace-entries/official/cordis-timer.json +3 -3
- package/packages/api-gateway/src/marketplace-entries/official/cost-meter.json +9 -6
- package/packages/api-gateway/src/marketplace-entries/official/dependency-checker.json +13 -10
- package/packages/api-gateway/src/marketplace-entries/official/docker-sandbox.json +10 -5
- package/packages/api-gateway/src/marketplace-entries/official/fail-logger.json +11 -6
- package/packages/api-gateway/src/marketplace-entries/official/genui.json +7 -5
- package/packages/api-gateway/src/marketplace-entries/official/git-time-capsule.json +13 -8
- package/packages/api-gateway/src/marketplace-entries/official/graph-memory.json +13 -7
- package/packages/api-gateway/src/marketplace-entries/official/history-compressor.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/hol-guard.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/i18n-pair.json +9 -6
- package/packages/api-gateway/src/marketplace-entries/official/image-compressor.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/llm-verifier.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/mcp-client.json +12 -7
- package/packages/api-gateway/src/marketplace-entries/official/mcp-panel.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/memory.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/mirage-bridge.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/mock-server.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/modlens.json +4 -4
- package/packages/api-gateway/src/marketplace-entries/official/module-search.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/obsidian-sync.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/openpets.json +9 -5
- package/packages/api-gateway/src/marketplace-entries/official/plan-execute.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/plugin-check.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/plugin-dev.json +8 -6
- package/packages/api-gateway/src/marketplace-entries/official/plugin-finder.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/plugin-radar.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/plugin-stars.json +15 -7
- package/packages/api-gateway/src/marketplace-entries/official/prompt-guard.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/prompt-library.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/readme-gen.json +12 -8
- package/packages/api-gateway/src/marketplace-entries/official/recall-unread.json +11 -6
- package/packages/api-gateway/src/marketplace-entries/official/reverse-skill.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/reviewer-bot.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/runtime-doctor.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/secure-audit.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/session-bookmarks.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/session-bridge.json +13 -8
- package/packages/api-gateway/src/marketplace-entries/official/session-compare.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/session-export.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/session-insights.json +12 -6
- package/packages/api-gateway/src/marketplace-entries/official/session-search.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/skill-catalog.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/skill-guard.json +9 -5
- package/packages/api-gateway/src/marketplace-entries/official/sql-lens.json +13 -7
- package/packages/api-gateway/src/marketplace-entries/official/synapse.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/tab-manager.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/taskboard.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/telemetry-blocker.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/test-harness.json +14 -7
- package/packages/api-gateway/src/marketplace-entries/official/theme-studio.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/token-guard.json +12 -6
- package/packages/api-gateway/src/marketplace-entries/official/turn-rewind.json +11 -6
- package/packages/api-gateway/src/marketplace-entries/official/undo-savepoint.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/vision-toolkit.json +8 -5
- package/packages/api-gateway/src/marketplace-entries/official/web-research.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/workspace-navigator.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/workspace-search.json +1 -1
- package/packages/api-gateway/src/marketplace-entries/official/yaml-validator.json +8 -5
- package/packages/api-gateway/test/index.test.ts +1594 -2
- package/packages/api-gateway/test/marketplace.test.ts +389 -2
- package/packages/api-gateway/test/release-package.test.ts +1 -0
- package/packages/bundle-web-app/package.json +1 -1
- package/packages/cli/dist/node-stdio.d.ts.map +1 -1
- package/packages/cli/dist/node-stdio.js +83 -20
- package/packages/cli/dist/node-stdio.js.map +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/node-stdio.ts +77 -20
- package/packages/cli/test/node-stdio.test.ts +118 -2
- package/packages/client-web/dist/agent-teams-view.d.ts +70 -0
- package/packages/client-web/dist/agent-teams-view.d.ts.map +1 -0
- package/packages/client-web/dist/agent-teams-view.js +159 -0
- package/packages/client-web/dist/agent-teams-view.js.map +1 -0
- package/packages/client-web/dist/at-file-view.d.ts +10 -0
- package/packages/client-web/dist/at-file-view.d.ts.map +1 -0
- package/packages/client-web/dist/at-file-view.js +65 -0
- package/packages/client-web/dist/at-file-view.js.map +1 -0
- package/packages/client-web/dist/browser-fetch-view.d.ts +22 -0
- package/packages/client-web/dist/browser-fetch-view.d.ts.map +1 -0
- package/packages/client-web/dist/browser-fetch-view.js +101 -0
- package/packages/client-web/dist/browser-fetch-view.js.map +1 -0
- package/packages/client-web/dist/browser-session-view.d.ts +32 -0
- package/packages/client-web/dist/browser-session-view.d.ts.map +1 -1
- package/packages/client-web/dist/browser-session-view.js +206 -3
- package/packages/client-web/dist/browser-session-view.js.map +1 -1
- package/packages/client-web/dist/cleaner-view.d.ts +29 -0
- package/packages/client-web/dist/cleaner-view.d.ts.map +1 -0
- package/packages/client-web/dist/cleaner-view.js +191 -0
- package/packages/client-web/dist/cleaner-view.js.map +1 -0
- package/packages/client-web/dist/context-doctor-view.d.ts +35 -0
- package/packages/client-web/dist/context-doctor-view.d.ts.map +1 -0
- package/packages/client-web/dist/context-doctor-view.js +129 -0
- package/packages/client-web/dist/context-doctor-view.js.map +1 -0
- package/packages/client-web/dist/context-insights-view.d.ts +31 -0
- package/packages/client-web/dist/context-insights-view.d.ts.map +1 -0
- package/packages/client-web/dist/context-insights-view.js +90 -0
- package/packages/client-web/dist/context-insights-view.js.map +1 -0
- package/packages/client-web/dist/cost-meter-view.d.ts +16 -0
- package/packages/client-web/dist/cost-meter-view.d.ts.map +1 -0
- package/packages/client-web/dist/cost-meter-view.js +43 -0
- package/packages/client-web/dist/cost-meter-view.js.map +1 -0
- package/packages/client-web/dist/dependency-checker-view.d.ts +24 -0
- package/packages/client-web/dist/dependency-checker-view.d.ts.map +1 -0
- package/packages/client-web/dist/dependency-checker-view.js +195 -0
- package/packages/client-web/dist/dependency-checker-view.js.map +1 -0
- package/packages/client-web/dist/docker-sandbox-view.d.ts +28 -0
- package/packages/client-web/dist/docker-sandbox-view.d.ts.map +1 -0
- package/packages/client-web/dist/docker-sandbox-view.js +152 -0
- package/packages/client-web/dist/docker-sandbox-view.js.map +1 -0
- package/packages/client-web/dist/fail-logger-view.d.ts +16 -0
- package/packages/client-web/dist/fail-logger-view.d.ts.map +1 -0
- package/packages/client-web/dist/fail-logger-view.js +97 -0
- package/packages/client-web/dist/fail-logger-view.js.map +1 -0
- package/packages/client-web/dist/genui-view.d.ts +28 -0
- package/packages/client-web/dist/genui-view.d.ts.map +1 -0
- package/packages/client-web/dist/genui-view.js +62 -0
- package/packages/client-web/dist/genui-view.js.map +1 -0
- package/packages/client-web/dist/git-time-capsule-view.d.ts +31 -0
- package/packages/client-web/dist/git-time-capsule-view.d.ts.map +1 -0
- package/packages/client-web/dist/git-time-capsule-view.js +203 -0
- package/packages/client-web/dist/git-time-capsule-view.js.map +1 -0
- package/packages/client-web/dist/graph-memory-view.d.ts +39 -0
- package/packages/client-web/dist/graph-memory-view.d.ts.map +1 -0
- package/packages/client-web/dist/graph-memory-view.js +82 -0
- package/packages/client-web/dist/graph-memory-view.js.map +1 -0
- package/packages/client-web/dist/i18n-pair-view.d.ts +32 -0
- package/packages/client-web/dist/i18n-pair-view.d.ts.map +1 -0
- package/packages/client-web/dist/i18n-pair-view.js +182 -0
- package/packages/client-web/dist/i18n-pair-view.js.map +1 -0
- package/packages/client-web/dist/mcp-client-view.d.ts +58 -0
- package/packages/client-web/dist/mcp-client-view.d.ts.map +1 -0
- package/packages/client-web/dist/mcp-client-view.js +121 -0
- package/packages/client-web/dist/mcp-client-view.js.map +1 -0
- package/packages/client-web/dist/modlens-view.d.ts +43 -0
- package/packages/client-web/dist/modlens-view.d.ts.map +1 -0
- package/packages/client-web/dist/modlens-view.js +176 -0
- package/packages/client-web/dist/modlens-view.js.map +1 -0
- package/packages/client-web/dist/openpets-view.d.ts +26 -0
- package/packages/client-web/dist/openpets-view.d.ts.map +1 -0
- package/packages/client-web/dist/openpets-view.js +62 -0
- package/packages/client-web/dist/openpets-view.js.map +1 -0
- package/packages/client-web/dist/panel-safe.d.ts +5 -0
- package/packages/client-web/dist/panel-safe.d.ts.map +1 -0
- package/packages/client-web/dist/panel-safe.js +58 -0
- package/packages/client-web/dist/panel-safe.js.map +1 -0
- package/packages/client-web/dist/plugin-dev-view.d.ts +15 -0
- package/packages/client-web/dist/plugin-dev-view.d.ts.map +1 -0
- package/packages/client-web/dist/plugin-dev-view.js +33 -0
- package/packages/client-web/dist/plugin-dev-view.js.map +1 -0
- package/packages/client-web/dist/plugin-stars-view.d.ts +28 -0
- package/packages/client-web/dist/plugin-stars-view.d.ts.map +1 -1
- package/packages/client-web/dist/plugin-stars-view.js +209 -1
- package/packages/client-web/dist/plugin-stars-view.js.map +1 -1
- package/packages/client-web/dist/react-room.d.ts +5 -1
- package/packages/client-web/dist/react-room.d.ts.map +1 -1
- package/packages/client-web/dist/react-room.js +463 -219
- package/packages/client-web/dist/react-room.js.map +1 -1
- package/packages/client-web/dist/readme-gen-view.d.ts +30 -0
- package/packages/client-web/dist/readme-gen-view.d.ts.map +1 -0
- package/packages/client-web/dist/readme-gen-view.js +134 -0
- package/packages/client-web/dist/readme-gen-view.js.map +1 -0
- package/packages/client-web/dist/recall-unread-view.d.ts +46 -0
- package/packages/client-web/dist/recall-unread-view.d.ts.map +1 -0
- package/packages/client-web/dist/recall-unread-view.js +104 -0
- package/packages/client-web/dist/recall-unread-view.js.map +1 -0
- package/packages/client-web/dist/session-bridge-view.d.ts +50 -0
- package/packages/client-web/dist/session-bridge-view.d.ts.map +1 -0
- package/packages/client-web/dist/session-bridge-view.js +113 -0
- package/packages/client-web/dist/session-bridge-view.js.map +1 -0
- package/packages/client-web/dist/session-insights-view.d.ts +40 -0
- package/packages/client-web/dist/session-insights-view.d.ts.map +1 -0
- package/packages/client-web/dist/session-insights-view.js +157 -0
- package/packages/client-web/dist/session-insights-view.js.map +1 -0
- package/packages/client-web/dist/skill-guard-view.d.ts +47 -0
- package/packages/client-web/dist/skill-guard-view.d.ts.map +1 -0
- package/packages/client-web/dist/skill-guard-view.js +93 -0
- package/packages/client-web/dist/skill-guard-view.js.map +1 -0
- package/packages/client-web/dist/sql-lens-view.d.ts +37 -0
- package/packages/client-web/dist/sql-lens-view.d.ts.map +1 -0
- package/packages/client-web/dist/sql-lens-view.js +235 -0
- package/packages/client-web/dist/sql-lens-view.js.map +1 -0
- package/packages/client-web/dist/test-harness-view.d.ts +24 -0
- package/packages/client-web/dist/test-harness-view.d.ts.map +1 -0
- package/packages/client-web/dist/test-harness-view.js +149 -0
- package/packages/client-web/dist/test-harness-view.js.map +1 -0
- package/packages/client-web/dist/token-guard-view.d.ts +19 -0
- package/packages/client-web/dist/token-guard-view.d.ts.map +1 -0
- package/packages/client-web/dist/token-guard-view.js +56 -0
- package/packages/client-web/dist/token-guard-view.js.map +1 -0
- package/packages/client-web/dist/turn-rewind-view.d.ts +41 -0
- package/packages/client-web/dist/turn-rewind-view.d.ts.map +1 -0
- package/packages/client-web/dist/turn-rewind-view.js +117 -0
- package/packages/client-web/dist/turn-rewind-view.js.map +1 -0
- package/packages/client-web/dist/vision-toolkit-view.d.ts +66 -0
- package/packages/client-web/dist/vision-toolkit-view.d.ts.map +1 -0
- package/packages/client-web/dist/vision-toolkit-view.js +238 -0
- package/packages/client-web/dist/vision-toolkit-view.js.map +1 -0
- package/packages/client-web/dist/yaml-validator-view.d.ts +52 -0
- package/packages/client-web/dist/yaml-validator-view.d.ts.map +1 -0
- package/packages/client-web/dist/yaml-validator-view.js +96 -0
- package/packages/client-web/dist/yaml-validator-view.js.map +1 -0
- package/packages/client-web/package.json +1 -1
- package/packages/client-web/src/agent-teams-view.ts +189 -0
- package/packages/client-web/src/at-file-view.ts +69 -0
- package/packages/client-web/src/browser-fetch-view.ts +114 -0
- package/packages/client-web/src/browser-session-view.ts +222 -3
- package/packages/client-web/src/cleaner-view.ts +207 -0
- package/packages/client-web/src/context-doctor-view.ts +140 -0
- package/packages/client-web/src/context-insights-view.ts +125 -0
- package/packages/client-web/src/cost-meter-view.ts +63 -0
- package/packages/client-web/src/dependency-checker-view.ts +215 -0
- package/packages/client-web/src/docker-sandbox-view.ts +177 -0
- package/packages/client-web/src/fail-logger-view.ts +112 -0
- package/packages/client-web/src/genui-view.ts +88 -0
- package/packages/client-web/src/git-time-capsule-view.ts +215 -0
- package/packages/client-web/src/graph-memory-view.ts +91 -0
- package/packages/client-web/src/i18n-pair-view.ts +194 -0
- package/packages/client-web/src/mcp-client-view.ts +122 -0
- package/packages/client-web/src/modlens-view.ts +210 -0
- package/packages/client-web/src/openpets-view.ts +67 -0
- package/packages/client-web/src/panel-safe.ts +47 -0
- package/packages/client-web/src/plugin-dev-view.ts +39 -0
- package/packages/client-web/src/plugin-stars-view.ts +239 -1
- package/packages/client-web/src/react-room.tsx +1770 -900
- package/packages/client-web/src/readme-gen-view.ts +145 -0
- package/packages/client-web/src/recall-unread-view.ts +105 -0
- package/packages/client-web/src/session-bridge-view.ts +118 -0
- package/packages/client-web/src/session-insights-view.ts +205 -0
- package/packages/client-web/src/skill-guard-view.ts +94 -0
- package/packages/client-web/src/sql-lens-view.ts +247 -0
- package/packages/client-web/src/test-harness-view.ts +170 -0
- package/packages/client-web/src/token-guard-view.ts +75 -0
- package/packages/client-web/src/turn-rewind-view.ts +120 -0
- package/packages/client-web/src/vision-toolkit-view.ts +280 -0
- package/packages/client-web/src/yaml-validator-view.ts +102 -0
- package/packages/client-web/test/agent-teams-view.test.ts +198 -0
- package/packages/client-web/test/at-file-panel.test.ts +76 -0
- package/packages/client-web/test/browser-fetch-panel.test.ts +44 -0
- package/packages/client-web/test/browser-fetch-view.test.ts +89 -0
- package/packages/client-web/test/browser-session-panel.test.ts +55 -0
- package/packages/client-web/test/browser-session-view.test.ts +99 -1
- package/packages/client-web/test/cleaner-panel.test.ts +66 -0
- package/packages/client-web/test/cleaner-view.test.ts +143 -0
- package/packages/client-web/test/context-doctor-view.test.ts +169 -0
- package/packages/client-web/test/context-insights-view.test.ts +120 -0
- package/packages/client-web/test/cost-meter-view.test.ts +53 -0
- package/packages/client-web/test/dependency-checker-panel.test.ts +51 -0
- package/packages/client-web/test/dependency-checker-view.test.ts +266 -0
- package/packages/client-web/test/docker-sandbox-panel.test.ts +44 -0
- package/packages/client-web/test/docker-sandbox-view.test.ts +127 -0
- package/packages/client-web/test/fail-logger-view.test.ts +155 -0
- package/packages/client-web/test/genui-view.test.ts +55 -0
- package/packages/client-web/test/git-time-capsule-view.test.ts +252 -0
- package/packages/client-web/test/graph-memory-view.test.ts +67 -0
- package/packages/client-web/test/i18n-pair-panel.test.ts +72 -0
- package/packages/client-web/test/i18n-pair-view.test.ts +164 -0
- package/packages/client-web/test/mcp-client-view.test.ts +106 -0
- package/packages/client-web/test/modlens-view.test.ts +198 -0
- package/packages/client-web/test/openpets-view.test.ts +57 -0
- package/packages/client-web/test/plugin-dev-view.test.ts +63 -0
- package/packages/client-web/test/plugin-stars-panel.test.ts +44 -0
- package/packages/client-web/test/plugin-stars-view.test.ts +88 -1
- package/packages/client-web/test/readme-gen-panel.test.ts +81 -0
- package/packages/client-web/test/readme-gen-view.test.ts +91 -0
- package/packages/client-web/test/recall-unread-view.test.ts +153 -0
- package/packages/client-web/test/session-bridge-view.test.ts +102 -0
- package/packages/client-web/test/session-insights-panel.test.ts +85 -0
- package/packages/client-web/test/session-insights-view.test.ts +152 -0
- package/packages/client-web/test/skill-guard-view.test.ts +138 -0
- package/packages/client-web/test/sql-lens-panel.test.ts +52 -0
- package/packages/client-web/test/sql-lens-view.test.ts +134 -0
- package/packages/client-web/test/test-harness-panel.test.ts +228 -0
- package/packages/client-web/test/token-guard-view.test.ts +93 -0
- package/packages/client-web/test/turn-rewind-view.test.ts +159 -0
- package/packages/client-web/test/vision-toolkit-view.test.ts +152 -0
- package/packages/client-web/test/yaml-validator-view.test.ts +100 -0
- package/packages/core/dist/atomic-write.d.ts +8 -0
- package/packages/core/dist/atomic-write.d.ts.map +1 -0
- package/packages/core/dist/atomic-write.js +40 -0
- package/packages/core/dist/atomic-write.js.map +1 -0
- package/packages/core/dist/boot.d.ts.map +1 -1
- package/packages/core/dist/boot.js +132 -10
- package/packages/core/dist/boot.js.map +1 -1
- package/packages/core/dist/bounded-file.d.ts +7 -0
- package/packages/core/dist/bounded-file.d.ts.map +1 -0
- package/packages/core/dist/bounded-file.js +50 -0
- package/packages/core/dist/bounded-file.js.map +1 -0
- package/packages/core/dist/config.d.ts +2 -0
- package/packages/core/dist/config.d.ts.map +1 -1
- package/packages/core/dist/config.js +21 -0
- package/packages/core/dist/config.js.map +1 -1
- package/packages/core/dist/cordis-timer.d.ts +15 -0
- package/packages/core/dist/cordis-timer.d.ts.map +1 -0
- package/packages/core/dist/cordis-timer.js +99 -0
- package/packages/core/dist/cordis-timer.js.map +1 -0
- package/packages/core/dist/plugins/agent-teams.d.ts +5 -1
- package/packages/core/dist/plugins/agent-teams.d.ts.map +1 -1
- package/packages/core/dist/plugins/agent-teams.js +986 -105
- package/packages/core/dist/plugins/agent-teams.js.map +1 -1
- package/packages/core/dist/plugins/anchored-standard.d.ts +1 -0
- package/packages/core/dist/plugins/anchored-standard.d.ts.map +1 -1
- package/packages/core/dist/plugins/anchored-standard.js +39 -11
- package/packages/core/dist/plugins/anchored-standard.js.map +1 -1
- package/packages/core/dist/plugins/annotation.d.ts +1 -0
- package/packages/core/dist/plugins/annotation.d.ts.map +1 -1
- package/packages/core/dist/plugins/annotation.js +35 -17
- package/packages/core/dist/plugins/annotation.js.map +1 -1
- package/packages/core/dist/plugins/archify.d.ts +1 -0
- package/packages/core/dist/plugins/archify.d.ts.map +1 -1
- package/packages/core/dist/plugins/archify.js +69 -22
- package/packages/core/dist/plugins/archify.js.map +1 -1
- package/packages/core/dist/plugins/at-file.d.ts +5 -1
- package/packages/core/dist/plugins/at-file.d.ts.map +1 -1
- package/packages/core/dist/plugins/at-file.js +120 -29
- package/packages/core/dist/plugins/at-file.js.map +1 -1
- package/packages/core/dist/plugins/auto-mode.d.ts.map +1 -1
- package/packages/core/dist/plugins/auto-mode.js +89 -20
- package/packages/core/dist/plugins/auto-mode.js.map +1 -1
- package/packages/core/dist/plugins/better-sidebar.d.ts +1 -0
- package/packages/core/dist/plugins/better-sidebar.d.ts.map +1 -1
- package/packages/core/dist/plugins/better-sidebar.js +14 -4
- package/packages/core/dist/plugins/better-sidebar.js.map +1 -1
- package/packages/core/dist/plugins/browser-fetch.d.ts +1 -0
- package/packages/core/dist/plugins/browser-fetch.d.ts.map +1 -1
- package/packages/core/dist/plugins/browser-fetch.js +288 -96
- package/packages/core/dist/plugins/browser-fetch.js.map +1 -1
- package/packages/core/dist/plugins/browser-session.d.ts.map +1 -1
- package/packages/core/dist/plugins/browser-session.js +445 -106
- package/packages/core/dist/plugins/browser-session.js.map +1 -1
- package/packages/core/dist/plugins/canvas-draw.d.ts +1 -0
- package/packages/core/dist/plugins/canvas-draw.d.ts.map +1 -1
- package/packages/core/dist/plugins/canvas-draw.js +71 -19
- package/packages/core/dist/plugins/canvas-draw.js.map +1 -1
- package/packages/core/dist/plugins/change-verifier.d.ts +1 -0
- package/packages/core/dist/plugins/change-verifier.d.ts.map +1 -1
- package/packages/core/dist/plugins/change-verifier.js +30 -9
- package/packages/core/dist/plugins/change-verifier.js.map +1 -1
- package/packages/core/dist/plugins/cleaner.d.ts +5 -1
- package/packages/core/dist/plugins/cleaner.d.ts.map +1 -1
- package/packages/core/dist/plugins/cleaner.js +337 -40
- package/packages/core/dist/plugins/cleaner.js.map +1 -1
- package/packages/core/dist/plugins/cli-notifier.d.ts +2 -1
- package/packages/core/dist/plugins/cli-notifier.d.ts.map +1 -1
- package/packages/core/dist/plugins/cli-notifier.js +99 -42
- package/packages/core/dist/plugins/cli-notifier.js.map +1 -1
- package/packages/core/dist/plugins/code2skill.d.ts +1 -0
- package/packages/core/dist/plugins/code2skill.d.ts.map +1 -1
- package/packages/core/dist/plugins/code2skill.js +178 -38
- package/packages/core/dist/plugins/code2skill.js.map +1 -1
- package/packages/core/dist/plugins/colleague-skill.d.ts +2 -1
- package/packages/core/dist/plugins/colleague-skill.d.ts.map +1 -1
- package/packages/core/dist/plugins/colleague-skill.js +79 -49
- package/packages/core/dist/plugins/colleague-skill.js.map +1 -1
- package/packages/core/dist/plugins/context-doctor.d.ts +6 -1
- package/packages/core/dist/plugins/context-doctor.d.ts.map +1 -1
- package/packages/core/dist/plugins/context-doctor.js +403 -39
- package/packages/core/dist/plugins/context-doctor.js.map +1 -1
- package/packages/core/dist/plugins/context.d.ts +1 -0
- package/packages/core/dist/plugins/context.d.ts.map +1 -1
- package/packages/core/dist/plugins/context.js +169 -42
- package/packages/core/dist/plugins/context.js.map +1 -1
- package/packages/core/dist/plugins/cost-meter.d.ts +4 -0
- package/packages/core/dist/plugins/cost-meter.d.ts.map +1 -1
- package/packages/core/dist/plugins/cost-meter.js +319 -93
- package/packages/core/dist/plugins/cost-meter.js.map +1 -1
- package/packages/core/dist/plugins/dependency-checker.d.ts +11 -2
- package/packages/core/dist/plugins/dependency-checker.d.ts.map +1 -1
- package/packages/core/dist/plugins/dependency-checker.js +463 -114
- package/packages/core/dist/plugins/dependency-checker.js.map +1 -1
- package/packages/core/dist/plugins/docker-sandbox.d.ts +1 -0
- package/packages/core/dist/plugins/docker-sandbox.d.ts.map +1 -1
- package/packages/core/dist/plugins/docker-sandbox.js +322 -80
- package/packages/core/dist/plugins/docker-sandbox.js.map +1 -1
- package/packages/core/dist/plugins/fail-logger.d.ts +1 -0
- package/packages/core/dist/plugins/fail-logger.d.ts.map +1 -1
- package/packages/core/dist/plugins/fail-logger.js +187 -20
- package/packages/core/dist/plugins/fail-logger.js.map +1 -1
- package/packages/core/dist/plugins/genui.d.ts +1 -0
- package/packages/core/dist/plugins/genui.d.ts.map +1 -1
- package/packages/core/dist/plugins/genui.js +103 -38
- package/packages/core/dist/plugins/genui.js.map +1 -1
- package/packages/core/dist/plugins/git-time-capsule.d.ts +8 -2
- package/packages/core/dist/plugins/git-time-capsule.d.ts.map +1 -1
- package/packages/core/dist/plugins/git-time-capsule.js +400 -54
- package/packages/core/dist/plugins/git-time-capsule.js.map +1 -1
- package/packages/core/dist/plugins/graph-memory.d.ts.map +1 -1
- package/packages/core/dist/plugins/graph-memory.js +329 -42
- package/packages/core/dist/plugins/graph-memory.js.map +1 -1
- package/packages/core/dist/plugins/history-compressor.d.ts.map +1 -1
- package/packages/core/dist/plugins/history-compressor.js +31 -12
- package/packages/core/dist/plugins/history-compressor.js.map +1 -1
- package/packages/core/dist/plugins/hol-guard.d.ts.map +1 -1
- package/packages/core/dist/plugins/hol-guard.js +33 -13
- package/packages/core/dist/plugins/hol-guard.js.map +1 -1
- package/packages/core/dist/plugins/i18n-pair.d.ts +5 -1
- package/packages/core/dist/plugins/i18n-pair.d.ts.map +1 -1
- package/packages/core/dist/plugins/i18n-pair.js +308 -52
- package/packages/core/dist/plugins/i18n-pair.js.map +1 -1
- package/packages/core/dist/plugins/image-compressor.d.ts +7 -0
- package/packages/core/dist/plugins/image-compressor.d.ts.map +1 -1
- package/packages/core/dist/plugins/image-compressor.js +98 -25
- package/packages/core/dist/plugins/image-compressor.js.map +1 -1
- package/packages/core/dist/plugins/llm-verifier.d.ts.map +1 -1
- package/packages/core/dist/plugins/llm-verifier.js +21 -11
- package/packages/core/dist/plugins/llm-verifier.js.map +1 -1
- package/packages/core/dist/plugins/mcp-client.d.ts.map +1 -1
- package/packages/core/dist/plugins/mcp-client.js +986 -232
- package/packages/core/dist/plugins/mcp-client.js.map +1 -1
- package/packages/core/dist/plugins/mcp-panel.d.ts.map +1 -1
- package/packages/core/dist/plugins/mcp-panel.js +30 -16
- package/packages/core/dist/plugins/mcp-panel.js.map +1 -1
- package/packages/core/dist/plugins/memory.d.ts.map +1 -1
- package/packages/core/dist/plugins/memory.js +292 -59
- package/packages/core/dist/plugins/memory.js.map +1 -1
- package/packages/core/dist/plugins/mirage-bridge.d.ts.map +1 -1
- package/packages/core/dist/plugins/mirage-bridge.js +20 -10
- package/packages/core/dist/plugins/mirage-bridge.js.map +1 -1
- package/packages/core/dist/plugins/mock-server.d.ts.map +1 -1
- package/packages/core/dist/plugins/mock-server.js +85 -54
- package/packages/core/dist/plugins/mock-server.js.map +1 -1
- package/packages/core/dist/plugins/model.d.ts +3 -0
- package/packages/core/dist/plugins/model.d.ts.map +1 -1
- package/packages/core/dist/plugins/model.js +3 -0
- package/packages/core/dist/plugins/model.js.map +1 -1
- package/packages/core/dist/plugins/models.d.ts.map +1 -1
- package/packages/core/dist/plugins/models.js +10 -2
- package/packages/core/dist/plugins/models.js.map +1 -1
- package/packages/core/dist/plugins/modlens.d.ts +8 -1
- package/packages/core/dist/plugins/modlens.d.ts.map +1 -1
- package/packages/core/dist/plugins/modlens.js +438 -31
- package/packages/core/dist/plugins/modlens.js.map +1 -1
- package/packages/core/dist/plugins/module-search.d.ts +1 -0
- package/packages/core/dist/plugins/module-search.d.ts.map +1 -1
- package/packages/core/dist/plugins/module-search.js +35 -16
- package/packages/core/dist/plugins/module-search.js.map +1 -1
- package/packages/core/dist/plugins/obsidian-sync.d.ts.map +1 -1
- package/packages/core/dist/plugins/obsidian-sync.js +20 -11
- package/packages/core/dist/plugins/obsidian-sync.js.map +1 -1
- package/packages/core/dist/plugins/openpets.d.ts.map +1 -1
- package/packages/core/dist/plugins/openpets.js +203 -44
- package/packages/core/dist/plugins/openpets.js.map +1 -1
- package/packages/core/dist/plugins/plan-execute.d.ts +4 -1
- package/packages/core/dist/plugins/plan-execute.d.ts.map +1 -1
- package/packages/core/dist/plugins/plan-execute.js +42 -21
- package/packages/core/dist/plugins/plan-execute.js.map +1 -1
- package/packages/core/dist/plugins/plugin-check.d.ts +12 -3
- package/packages/core/dist/plugins/plugin-check.d.ts.map +1 -1
- package/packages/core/dist/plugins/plugin-check.js +83 -12
- package/packages/core/dist/plugins/plugin-check.js.map +1 -1
- package/packages/core/dist/plugins/plugin-dev.d.ts +1 -0
- package/packages/core/dist/plugins/plugin-dev.d.ts.map +1 -1
- package/packages/core/dist/plugins/plugin-dev.js +156 -23
- package/packages/core/dist/plugins/plugin-dev.js.map +1 -1
- package/packages/core/dist/plugins/plugin-finder.d.ts +1 -0
- package/packages/core/dist/plugins/plugin-finder.d.ts.map +1 -1
- package/packages/core/dist/plugins/plugin-finder.js +131 -13
- package/packages/core/dist/plugins/plugin-finder.js.map +1 -1
- package/packages/core/dist/plugins/plugin-radar.d.ts +4 -0
- package/packages/core/dist/plugins/plugin-radar.d.ts.map +1 -1
- package/packages/core/dist/plugins/plugin-radar.js +137 -36
- package/packages/core/dist/plugins/plugin-radar.js.map +1 -1
- package/packages/core/dist/plugins/plugin-stars.d.ts.map +1 -1
- package/packages/core/dist/plugins/plugin-stars.js +282 -81
- package/packages/core/dist/plugins/plugin-stars.js.map +1 -1
- package/packages/core/dist/plugins/prompt-guard.d.ts +1 -0
- package/packages/core/dist/plugins/prompt-guard.d.ts.map +1 -1
- package/packages/core/dist/plugins/prompt-guard.js +60 -9
- package/packages/core/dist/plugins/prompt-guard.js.map +1 -1
- package/packages/core/dist/plugins/prompt-library.d.ts +1 -0
- package/packages/core/dist/plugins/prompt-library.d.ts.map +1 -1
- package/packages/core/dist/plugins/prompt-library.js +4 -1
- package/packages/core/dist/plugins/prompt-library.js.map +1 -1
- package/packages/core/dist/plugins/readme-gen.d.ts +6 -2
- package/packages/core/dist/plugins/readme-gen.d.ts.map +1 -1
- package/packages/core/dist/plugins/readme-gen.js +514 -73
- package/packages/core/dist/plugins/readme-gen.js.map +1 -1
- package/packages/core/dist/plugins/recall-unread.d.ts +1 -1
- package/packages/core/dist/plugins/recall-unread.d.ts.map +1 -1
- package/packages/core/dist/plugins/recall-unread.js +411 -68
- package/packages/core/dist/plugins/recall-unread.js.map +1 -1
- package/packages/core/dist/plugins/resources.d.ts.map +1 -1
- package/packages/core/dist/plugins/resources.js +66 -3
- package/packages/core/dist/plugins/resources.js.map +1 -1
- package/packages/core/dist/plugins/reverse-skill.d.ts.map +1 -1
- package/packages/core/dist/plugins/reverse-skill.js +2 -1
- package/packages/core/dist/plugins/reverse-skill.js.map +1 -1
- package/packages/core/dist/plugins/reviewer-bot.d.ts +1 -0
- package/packages/core/dist/plugins/reviewer-bot.d.ts.map +1 -1
- package/packages/core/dist/plugins/reviewer-bot.js +35 -16
- package/packages/core/dist/plugins/reviewer-bot.js.map +1 -1
- package/packages/core/dist/plugins/runtime-doctor.d.ts +1 -0
- package/packages/core/dist/plugins/runtime-doctor.d.ts.map +1 -1
- package/packages/core/dist/plugins/runtime-doctor.js +4 -1
- package/packages/core/dist/plugins/runtime-doctor.js.map +1 -1
- package/packages/core/dist/plugins/runtime.d.ts.map +1 -1
- package/packages/core/dist/plugins/runtime.js +104 -70
- package/packages/core/dist/plugins/runtime.js.map +1 -1
- package/packages/core/dist/plugins/secure-audit.d.ts +1 -0
- package/packages/core/dist/plugins/secure-audit.d.ts.map +1 -1
- package/packages/core/dist/plugins/secure-audit.js +30 -12
- package/packages/core/dist/plugins/secure-audit.js.map +1 -1
- package/packages/core/dist/plugins/session-bookmarks.d.ts +1 -0
- package/packages/core/dist/plugins/session-bookmarks.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-bookmarks.js +4 -1
- package/packages/core/dist/plugins/session-bookmarks.js.map +1 -1
- package/packages/core/dist/plugins/session-bridge.d.ts +1 -0
- package/packages/core/dist/plugins/session-bridge.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-bridge.js +401 -88
- package/packages/core/dist/plugins/session-bridge.js.map +1 -1
- package/packages/core/dist/plugins/session-compare.d.ts +1 -0
- package/packages/core/dist/plugins/session-compare.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-compare.js +4 -1
- package/packages/core/dist/plugins/session-compare.js.map +1 -1
- package/packages/core/dist/plugins/session-export.d.ts +1 -0
- package/packages/core/dist/plugins/session-export.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-export.js +6 -6
- package/packages/core/dist/plugins/session-export.js.map +1 -1
- package/packages/core/dist/plugins/session-insights.d.ts +37 -1
- package/packages/core/dist/plugins/session-insights.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-insights.js +406 -21
- package/packages/core/dist/plugins/session-insights.js.map +1 -1
- package/packages/core/dist/plugins/session-search.d.ts +1 -0
- package/packages/core/dist/plugins/session-search.d.ts.map +1 -1
- package/packages/core/dist/plugins/session-search.js +4 -1
- package/packages/core/dist/plugins/session-search.js.map +1 -1
- package/packages/core/dist/plugins/session.d.ts.map +1 -1
- package/packages/core/dist/plugins/session.js +8 -1
- package/packages/core/dist/plugins/session.js.map +1 -1
- package/packages/core/dist/plugins/skill-catalog.d.ts +1 -0
- package/packages/core/dist/plugins/skill-catalog.d.ts.map +1 -1
- package/packages/core/dist/plugins/skill-catalog.js +6 -5
- package/packages/core/dist/plugins/skill-catalog.js.map +1 -1
- package/packages/core/dist/plugins/skill-guard.d.ts +2 -1
- package/packages/core/dist/plugins/skill-guard.d.ts.map +1 -1
- package/packages/core/dist/plugins/skill-guard.js +241 -61
- package/packages/core/dist/plugins/skill-guard.js.map +1 -1
- package/packages/core/dist/plugins/sql-lens-worker.d.ts +2 -0
- package/packages/core/dist/plugins/sql-lens-worker.d.ts.map +1 -0
- package/packages/core/dist/plugins/sql-lens-worker.js +206 -0
- package/packages/core/dist/plugins/sql-lens-worker.js.map +1 -0
- package/packages/core/dist/plugins/sql-lens.d.ts +7 -1
- package/packages/core/dist/plugins/sql-lens.d.ts.map +1 -1
- package/packages/core/dist/plugins/sql-lens.js +301 -68
- package/packages/core/dist/plugins/sql-lens.js.map +1 -1
- package/packages/core/dist/plugins/stdio.d.ts +3 -0
- package/packages/core/dist/plugins/stdio.d.ts.map +1 -1
- package/packages/core/dist/plugins/stdio.js +62 -4
- package/packages/core/dist/plugins/stdio.js.map +1 -1
- package/packages/core/dist/plugins/synapse.d.ts.map +1 -1
- package/packages/core/dist/plugins/synapse.js +17 -9
- package/packages/core/dist/plugins/synapse.js.map +1 -1
- package/packages/core/dist/plugins/tab-manager.d.ts +1 -0
- package/packages/core/dist/plugins/tab-manager.d.ts.map +1 -1
- package/packages/core/dist/plugins/tab-manager.js +167 -62
- package/packages/core/dist/plugins/tab-manager.js.map +1 -1
- package/packages/core/dist/plugins/taskboard.d.ts.map +1 -1
- package/packages/core/dist/plugins/taskboard.js +50 -22
- package/packages/core/dist/plugins/taskboard.js.map +1 -1
- package/packages/core/dist/plugins/telemetry-blocker.d.ts +4 -1
- package/packages/core/dist/plugins/telemetry-blocker.d.ts.map +1 -1
- package/packages/core/dist/plugins/telemetry-blocker.js +30 -11
- package/packages/core/dist/plugins/telemetry-blocker.js.map +1 -1
- package/packages/core/dist/plugins/test-harness.d.ts +7 -1
- package/packages/core/dist/plugins/test-harness.d.ts.map +1 -1
- package/packages/core/dist/plugins/test-harness.js +255 -43
- package/packages/core/dist/plugins/test-harness.js.map +1 -1
- package/packages/core/dist/plugins/theme-studio.d.ts.map +1 -1
- package/packages/core/dist/plugins/theme-studio.js +4 -2
- package/packages/core/dist/plugins/theme-studio.js.map +1 -1
- package/packages/core/dist/plugins/token-guard.d.ts.map +1 -1
- package/packages/core/dist/plugins/token-guard.js +164 -32
- package/packages/core/dist/plugins/token-guard.js.map +1 -1
- package/packages/core/dist/plugins/tools.d.ts.map +1 -1
- package/packages/core/dist/plugins/tools.js +4 -1
- package/packages/core/dist/plugins/tools.js.map +1 -1
- package/packages/core/dist/plugins/turn-rewind.d.ts +17 -0
- package/packages/core/dist/plugins/turn-rewind.d.ts.map +1 -1
- package/packages/core/dist/plugins/turn-rewind.js +340 -36
- package/packages/core/dist/plugins/turn-rewind.js.map +1 -1
- package/packages/core/dist/plugins/undo-savepoint.d.ts.map +1 -1
- package/packages/core/dist/plugins/undo-savepoint.js +157 -51
- package/packages/core/dist/plugins/undo-savepoint.js.map +1 -1
- package/packages/core/dist/plugins/vision-toolkit.d.ts +22 -3
- package/packages/core/dist/plugins/vision-toolkit.d.ts.map +1 -1
- package/packages/core/dist/plugins/vision-toolkit.js +389 -66
- package/packages/core/dist/plugins/vision-toolkit.js.map +1 -1
- package/packages/core/dist/plugins/web-research.d.ts.map +1 -1
- package/packages/core/dist/plugins/web-research.js +13 -4
- package/packages/core/dist/plugins/web-research.js.map +1 -1
- package/packages/core/dist/plugins/workspace-navigator.d.ts +8 -2
- package/packages/core/dist/plugins/workspace-navigator.d.ts.map +1 -1
- package/packages/core/dist/plugins/workspace-navigator.js +28 -10
- package/packages/core/dist/plugins/workspace-navigator.js.map +1 -1
- package/packages/core/dist/plugins/workspace-search.d.ts +7 -0
- package/packages/core/dist/plugins/workspace-search.d.ts.map +1 -1
- package/packages/core/dist/plugins/workspace-search.js +67 -34
- package/packages/core/dist/plugins/workspace-search.js.map +1 -1
- package/packages/core/dist/plugins/yaml-validator.d.ts +1 -0
- package/packages/core/dist/plugins/yaml-validator.d.ts.map +1 -1
- package/packages/core/dist/plugins/yaml-validator.js +156 -47
- package/packages/core/dist/plugins/yaml-validator.js.map +1 -1
- package/packages/core/dist/runtime.d.ts.map +1 -1
- package/packages/core/dist/runtime.js +8 -3
- package/packages/core/dist/runtime.js.map +1 -1
- package/packages/core/dist/services.d.ts.map +1 -1
- package/packages/core/dist/services.js +22 -2
- package/packages/core/dist/services.js.map +1 -1
- package/packages/core/dist/stdio.d.ts +1 -0
- package/packages/core/dist/stdio.d.ts.map +1 -1
- package/packages/core/dist/stdio.js +241 -25
- package/packages/core/dist/stdio.js.map +1 -1
- package/packages/core/dist/workspace-path.d.ts +1 -0
- package/packages/core/dist/workspace-path.d.ts.map +1 -1
- package/packages/core/dist/workspace-path.js +9 -0
- package/packages/core/dist/workspace-path.js.map +1 -1
- package/packages/core/package.json +1 -1
- package/packages/core/profiles/default/cordis.yml +4 -2
- package/packages/core/src/atomic-write.ts +45 -0
- package/packages/core/src/boot.ts +123 -11
- package/packages/core/src/bounded-file.ts +41 -0
- package/packages/core/src/config.ts +18 -0
- package/packages/core/src/cordis-timer.ts +107 -0
- package/packages/core/src/plugins/agent-teams.ts +1003 -103
- package/packages/core/src/plugins/anchored-standard.ts +41 -14
- package/packages/core/src/plugins/annotation.ts +36 -19
- package/packages/core/src/plugins/archify.ts +80 -33
- package/packages/core/src/plugins/at-file.ts +110 -26
- package/packages/core/src/plugins/auto-mode.ts +91 -24
- package/packages/core/src/plugins/better-sidebar.ts +15 -4
- package/packages/core/src/plugins/browser-fetch.ts +286 -95
- package/packages/core/src/plugins/browser-session.ts +421 -102
- package/packages/core/src/plugins/canvas-draw.ts +74 -21
- package/packages/core/src/plugins/change-verifier.ts +33 -9
- package/packages/core/src/plugins/cleaner.ts +339 -37
- package/packages/core/src/plugins/cli-notifier.ts +110 -41
- package/packages/core/src/plugins/code2skill.ts +175 -34
- package/packages/core/src/plugins/colleague-skill.ts +72 -47
- package/packages/core/src/plugins/context-doctor.ts +410 -40
- package/packages/core/src/plugins/context.ts +164 -39
- package/packages/core/src/plugins/cost-meter.ts +360 -113
- package/packages/core/src/plugins/dependency-checker.ts +456 -119
- package/packages/core/src/plugins/docker-sandbox.ts +312 -76
- package/packages/core/src/plugins/fail-logger.ts +169 -18
- package/packages/core/src/plugins/genui.ts +104 -42
- package/packages/core/src/plugins/git-time-capsule.ts +424 -55
- package/packages/core/src/plugins/graph-memory.ts +333 -60
- package/packages/core/src/plugins/history-compressor.ts +29 -12
- package/packages/core/src/plugins/hol-guard.ts +31 -13
- package/packages/core/src/plugins/i18n-pair.ts +296 -52
- package/packages/core/src/plugins/image-compressor.ts +98 -25
- package/packages/core/src/plugins/llm-verifier.ts +39 -21
- package/packages/core/src/plugins/mcp-client.ts +1069 -249
- package/packages/core/src/plugins/mcp-panel.ts +37 -21
- package/packages/core/src/plugins/memory.ts +262 -57
- package/packages/core/src/plugins/mirage-bridge.ts +22 -10
- package/packages/core/src/plugins/mock-server.ts +91 -60
- package/packages/core/src/plugins/model.ts +4 -0
- package/packages/core/src/plugins/models.ts +10 -2
- package/packages/core/src/plugins/modlens.ts +463 -29
- package/packages/core/src/plugins/module-search.ts +40 -19
- package/packages/core/src/plugins/obsidian-sync.ts +26 -15
- package/packages/core/src/plugins/openpets.ts +193 -42
- package/packages/core/src/plugins/plan-execute.ts +49 -21
- package/packages/core/src/plugins/plugin-check.ts +100 -16
- package/packages/core/src/plugins/plugin-dev.ts +167 -23
- package/packages/core/src/plugins/plugin-finder.ts +119 -12
- package/packages/core/src/plugins/plugin-radar.ts +130 -39
- package/packages/core/src/plugins/plugin-stars.ts +252 -80
- package/packages/core/src/plugins/prompt-guard.ts +51 -12
- package/packages/core/src/plugins/prompt-library.ts +14 -8
- package/packages/core/src/plugins/readme-gen.ts +476 -79
- package/packages/core/src/plugins/recall-unread.ts +412 -68
- package/packages/core/src/plugins/resources.ts +70 -2
- package/packages/core/src/plugins/reverse-skill.ts +9 -5
- package/packages/core/src/plugins/reviewer-bot.ts +34 -16
- package/packages/core/src/plugins/runtime-doctor.ts +4 -1
- package/packages/core/src/plugins/runtime.ts +98 -68
- package/packages/core/src/plugins/secure-audit.ts +33 -12
- package/packages/core/src/plugins/session-bookmarks.ts +12 -6
- package/packages/core/src/plugins/session-bridge.ts +404 -89
- package/packages/core/src/plugins/session-compare.ts +10 -4
- package/packages/core/src/plugins/session-export.ts +12 -9
- package/packages/core/src/plugins/session-insights.ts +454 -31
- package/packages/core/src/plugins/session-search.ts +4 -1
- package/packages/core/src/plugins/session.ts +8 -1
- package/packages/core/src/plugins/skill-catalog.ts +13 -8
- package/packages/core/src/plugins/skill-guard.ts +254 -61
- package/packages/core/src/plugins/sql-lens-worker.ts +202 -0
- package/packages/core/src/plugins/sql-lens.ts +323 -71
- package/packages/core/src/plugins/stdio.ts +58 -3
- package/packages/core/src/plugins/synapse.ts +16 -9
- package/packages/core/src/plugins/tab-manager.ts +163 -65
- package/packages/core/src/plugins/taskboard.ts +81 -47
- package/packages/core/src/plugins/telemetry-blocker.ts +27 -11
- package/packages/core/src/plugins/test-harness.ts +275 -42
- package/packages/core/src/plugins/theme-studio.ts +7 -2
- package/packages/core/src/plugins/token-guard.ts +171 -31
- package/packages/core/src/plugins/tools.ts +4 -1
- package/packages/core/src/plugins/turn-rewind.ts +351 -37
- package/packages/core/src/plugins/undo-savepoint.ts +160 -59
- package/packages/core/src/plugins/vision-toolkit.ts +420 -63
- package/packages/core/src/plugins/web-research.ts +19 -7
- package/packages/core/src/plugins/workspace-navigator.ts +39 -14
- package/packages/core/src/plugins/workspace-search.ts +75 -37
- package/packages/core/src/plugins/yaml-validator.ts +165 -46
- package/packages/core/src/runtime.ts +8 -2
- package/packages/core/src/services.ts +22 -2
- package/packages/core/src/stdio.ts +220 -25
- package/packages/core/src/workspace-path.ts +10 -0
- package/packages/core/test/agent-teams.test.ts +495 -2
- package/packages/core/test/anchored-standard.test.ts +60 -0
- package/packages/core/test/annotation.test.ts +69 -0
- package/packages/core/test/archify.test.ts +212 -1
- package/packages/core/test/at-file.test.ts +666 -0
- package/packages/core/test/atomic-write.test.ts +52 -0
- package/packages/core/test/auto-mode.test.ts +629 -0
- package/packages/core/test/better-sidebar.test.ts +108 -1
- package/packages/core/test/boot.test.ts +129 -1
- package/packages/core/test/bounded-file.test.ts +55 -0
- package/packages/core/test/browser-fetch-rebinding.test.ts +93 -0
- package/packages/core/test/browser-fetch.test.ts +844 -0
- package/packages/core/test/browser-session.test.ts +1236 -0
- package/packages/core/test/canvas-draw.test.ts +164 -0
- package/packages/core/test/change-verifier.test.ts +200 -0
- package/packages/core/test/cleaner.test.ts +316 -0
- package/packages/core/test/cli-notifier.test.ts +235 -0
- package/packages/core/test/code2skill.test.ts +264 -0
- package/packages/core/test/colleague-skill.test.ts +167 -0
- package/packages/core/test/config.test.ts +8 -0
- package/packages/core/test/context-doctor.test.ts +597 -2
- package/packages/core/test/context-insights.test.ts +396 -0
- package/packages/core/test/cordis-timer.test.ts +147 -0
- package/packages/core/test/cost-meter.test.ts +362 -0
- package/packages/core/test/dependency-checker.test.ts +576 -3
- package/packages/core/test/docker-sandbox.test.ts +170 -0
- package/packages/core/test/fail-logger.test.ts +363 -0
- package/packages/core/test/genui.test.ts +162 -0
- package/packages/core/test/git-time-capsule.test.ts +1364 -3
- package/packages/core/test/graph-memory.test.ts +508 -0
- package/packages/core/test/history-compressor.test.ts +47 -0
- package/packages/core/test/hol-guard.test.ts +61 -0
- package/packages/core/test/i18n-pair.test.ts +367 -0
- package/packages/core/test/image-compressor.test.ts +59 -0
- package/packages/core/test/llm-verifier.test.ts +4 -0
- package/packages/core/test/mcp-client.test.ts +1037 -0
- package/packages/core/test/mcp-panel.test.ts +91 -0
- package/packages/core/test/memory.test.ts +125 -0
- package/packages/core/test/mirage-bridge.test.ts +4 -0
- package/packages/core/test/mock-server.test.ts +63 -0
- package/packages/core/test/model.test.ts +62 -0
- package/packages/core/test/models.test.ts +85 -0
- package/packages/core/test/modlens.test.ts +615 -0
- package/packages/core/test/module-search.test.ts +20 -0
- package/packages/core/test/obsidian-sync.test.ts +57 -0
- package/packages/core/test/openpets.test.ts +273 -0
- package/packages/core/test/plan-execute.test.ts +86 -0
- package/packages/core/test/plugin-dev.test.ts +246 -0
- package/packages/core/test/plugin-finder.test.ts +105 -0
- package/packages/core/test/plugin-radar.test.ts +87 -0
- package/packages/core/test/plugin-stars.test.ts +429 -4
- package/packages/core/test/profiles.integration.test.ts +451 -2
- package/packages/core/test/prompt-guard.test.ts +78 -0
- package/packages/core/test/readme-gen.test.ts +403 -3
- package/packages/core/test/recall-unread.test.ts +559 -2
- package/packages/core/test/registry.test.ts +16 -0
- package/packages/core/test/resources.test.ts +310 -0
- package/packages/core/test/reviewer-bot.test.ts +55 -0
- package/packages/core/test/runtime-fixture.ts +10 -1
- package/packages/core/test/runtime.test.ts +155 -2
- package/packages/core/test/secure-audit.test.ts +14 -1
- package/packages/core/test/services.test.ts +2772 -117
- package/packages/core/test/session-bridge.test.ts +309 -1
- package/packages/core/test/session-insights.test.ts +486 -0
- package/packages/core/test/session.test.ts +153 -0
- package/packages/core/test/skill-guard.test.ts +261 -2
- package/packages/core/test/sql-lens.test.ts +244 -0
- package/packages/core/test/stdio-args.test.ts +484 -1
- package/packages/core/test/stdio.test.ts +159 -0
- package/packages/core/test/synapse.test.ts +67 -0
- package/packages/core/test/tab-manager.test.ts +58 -0
- package/packages/core/test/taskboard.test.ts +73 -0
- package/packages/core/test/telemetry-blocker.test.ts +61 -0
- package/packages/core/test/test-harness.test.ts +297 -0
- package/packages/core/test/token-guard.test.ts +362 -1
- package/packages/core/test/tools.test.ts +118 -0
- package/packages/core/test/turn-rewind.test.ts +532 -2
- package/packages/core/test/undo-savepoint.test.ts +222 -0
- package/packages/core/test/vision-toolkit.test.ts +480 -7
- package/packages/core/test/web-research.test.ts +63 -0
- package/packages/core/test/workspace-git-status.test.ts +19 -2
- package/packages/core/test/workspace-navigator.test.ts +11 -1
- package/packages/core/test/workspace-search.test.ts +88 -0
- package/packages/core/test/yaml-validator.test.ts +195 -0
- package/packages/host-webserver/package.json +1 -1
- package/apps/web/dist/assets/index-C_AdODuM.js +0 -20
- package/apps/web/dist/assets/index-De8Rm01Z.css +0 -2
|
@@ -0,0 +1,1236 @@
|
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { describe, expect, test, vi } from "vitest";
|
|
3
|
+
import { PiPluginUiRegistry, PiToolRegistry, provideLaunchContext } from "../src/services.js";
|
|
4
|
+
import browserSessionPlugin from "../src/plugins/browser-session.js";
|
|
5
|
+
import toolsPlugin from "../src/plugins/tools.js";
|
|
6
|
+
|
|
7
|
+
async function createBrowserSession(): Promise<Context> {
|
|
8
|
+
const context = new Context();
|
|
9
|
+
provideLaunchContext(context, { cwd: "/tmp", agentDir: "/tmp", args: [], requestExit() {} });
|
|
10
|
+
await context.plugin(toolsPlugin, { names: [] });
|
|
11
|
+
await context.plugin(browserSessionPlugin, { endpoint: "http://127.0.0.1:9222" });
|
|
12
|
+
return context;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function browserTool(context: Context, name: string) {
|
|
16
|
+
const tool = context.piTools.snapshot().customTools.find((candidate) => candidate.name === name);
|
|
17
|
+
if (tool === undefined) throw new Error(`Browser session tool was not registered: ${name}`);
|
|
18
|
+
return tool;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
describe("browser session boundaries", () => {
|
|
22
|
+
test("declares bounded browser session inputs", async () => {
|
|
23
|
+
const context = await createBrowserSession();
|
|
24
|
+
try {
|
|
25
|
+
expect(browserSessionPlugin.Config.dict?.endpoint?.meta).toMatchObject({ min: 1, max: 2_048 });
|
|
26
|
+
expect(browserTool(context, "browser_navigate").parameters).toMatchObject({
|
|
27
|
+
type: "object",
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
properties: {
|
|
30
|
+
targetId: { type: "string", minLength: 1, maxLength: 512 },
|
|
31
|
+
url: { type: "string", minLength: 1, maxLength: 8_192 },
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
expect(browserTool(context, "browser_read").parameters).toMatchObject({
|
|
35
|
+
type: "object",
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
properties: { targetId: { type: "string", minLength: 1, maxLength: 512 } },
|
|
38
|
+
});
|
|
39
|
+
expect(browserTool(context, "browser_click").parameters).toMatchObject({
|
|
40
|
+
type: "object",
|
|
41
|
+
additionalProperties: false,
|
|
42
|
+
properties: {
|
|
43
|
+
targetId: { type: "string", minLength: 1, maxLength: 512 },
|
|
44
|
+
selector: { type: "string", minLength: 1, maxLength: 512 },
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
expect(browserTool(context, "browser_screenshot").parameters).toMatchObject({
|
|
48
|
+
type: "object",
|
|
49
|
+
additionalProperties: false,
|
|
50
|
+
properties: { targetId: { type: "string", minLength: 1, maxLength: 512 } },
|
|
51
|
+
});
|
|
52
|
+
} finally {
|
|
53
|
+
await context.fiber.dispose();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
test("rolls back every tool when panel registration fails", async () => {
|
|
58
|
+
const context = new Context();
|
|
59
|
+
const tools = new PiToolRegistry();
|
|
60
|
+
const panels = new PiPluginUiRegistry();
|
|
61
|
+
provideLaunchContext(context, { cwd: "/tmp", agentDir: "/tmp", args: [], requestExit() {} });
|
|
62
|
+
context.provide("piTools", tools);
|
|
63
|
+
context.provide("piPluginUi", panels);
|
|
64
|
+
panels.register({ id: "browser-session-panel", pluginId: "fixture", title: "Fixture", read: () => ({}) });
|
|
65
|
+
try {
|
|
66
|
+
await expect(context.plugin(browserSessionPlugin, { endpoint: "http://127.0.0.1:9222" })).rejects.toThrow(/already registered.*browser-session-panel/iu);
|
|
67
|
+
expect(tools.snapshot().customTools).toEqual([]);
|
|
68
|
+
} finally {
|
|
69
|
+
await context.fiber.dispose();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test("rejects malformed tool inputs before browser discovery", async () => {
|
|
74
|
+
const originalFetch = globalThis.fetch;
|
|
75
|
+
let fetches = 0;
|
|
76
|
+
globalThis.fetch = () => {
|
|
77
|
+
fetches += 1;
|
|
78
|
+
return Promise.resolve(Response.json([]));
|
|
79
|
+
};
|
|
80
|
+
const context = await createBrowserSession();
|
|
81
|
+
try {
|
|
82
|
+
await expect(browserTool(context, "browser_read").execute("read", null, undefined, undefined, {} as never)).rejects.toThrow(/parameters.*object/iu);
|
|
83
|
+
await expect(
|
|
84
|
+
browserTool(context, "browser_click").execute("click", { targetId: "tab-1", selector: null }, undefined, undefined, {} as never),
|
|
85
|
+
).rejects.toThrow(/selector must be a string/iu);
|
|
86
|
+
await expect(
|
|
87
|
+
browserTool(context, "browser_navigate").execute("navigate", { targetId: "tab-1", url: null }, undefined, undefined, {} as never),
|
|
88
|
+
).rejects.toThrow(/navigation URL must be a string/iu);
|
|
89
|
+
await expect(browserTool(context, "browser_screenshot").execute("screenshot", { targetId: null }, undefined, undefined, {} as never)).rejects.toThrow(
|
|
90
|
+
/target ID must be a string/iu,
|
|
91
|
+
);
|
|
92
|
+
expect(fetches).toBe(0);
|
|
93
|
+
} finally {
|
|
94
|
+
globalThis.fetch = originalFetch;
|
|
95
|
+
await context.fiber.dispose();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
test("strictly validates raw tool parameters without invoking accessors", async () => {
|
|
100
|
+
const originalFetch = globalThis.fetch;
|
|
101
|
+
let fetches = 0;
|
|
102
|
+
globalThis.fetch = () => {
|
|
103
|
+
fetches += 1;
|
|
104
|
+
return Promise.resolve(Response.json([]));
|
|
105
|
+
};
|
|
106
|
+
const context = await createBrowserSession();
|
|
107
|
+
let accessed = false;
|
|
108
|
+
const params = { url: "https://example.com/" } as { targetId?: string; url: string };
|
|
109
|
+
Object.defineProperty(params, "targetId", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get() {
|
|
112
|
+
accessed = true;
|
|
113
|
+
throw new Error("browser target accessor executed");
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
try {
|
|
117
|
+
await expect(browserTool(context, "browser_navigate").execute("navigate", params, undefined, undefined, {} as never)).rejects.toThrow(
|
|
118
|
+
/parameters.*data properties/iu,
|
|
119
|
+
);
|
|
120
|
+
expect(accessed).toBe(false);
|
|
121
|
+
await expect(browserTool(context, "browser_tabs").execute("tabs", { unexpected: true }, undefined, undefined, {} as never)).rejects.toThrow(
|
|
122
|
+
/parameters.*unknown property/iu,
|
|
123
|
+
);
|
|
124
|
+
expect(fetches).toBe(0);
|
|
125
|
+
} finally {
|
|
126
|
+
globalThis.fetch = originalFetch;
|
|
127
|
+
await context.fiber.dispose();
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
test("rejects an oversized DevTools tab list before reading its body", async () => {
|
|
132
|
+
const originalFetch = globalThis.fetch;
|
|
133
|
+
let bodyRead = false;
|
|
134
|
+
let bodyCancelled = false;
|
|
135
|
+
globalThis.fetch = () =>
|
|
136
|
+
Promise.resolve({
|
|
137
|
+
ok: true,
|
|
138
|
+
status: 200,
|
|
139
|
+
headers: new Headers({ "content-length": String(1024 * 1024 + 1) }),
|
|
140
|
+
body: {
|
|
141
|
+
cancel() {
|
|
142
|
+
bodyCancelled = true;
|
|
143
|
+
return Promise.resolve();
|
|
144
|
+
},
|
|
145
|
+
getReader() {
|
|
146
|
+
bodyRead = true;
|
|
147
|
+
throw new Error("oversized body was read");
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
json() {
|
|
151
|
+
bodyRead = true;
|
|
152
|
+
return Promise.reject(new Error("oversized body was read"));
|
|
153
|
+
},
|
|
154
|
+
} as unknown as Response);
|
|
155
|
+
const context = await createBrowserSession();
|
|
156
|
+
try {
|
|
157
|
+
await expect(browserTool(context, "browser_tabs").execute("call-1", {}, undefined, undefined, {} as never)).rejects.toThrow(/1 MiB limit/iu);
|
|
158
|
+
expect(bodyRead).toBe(false);
|
|
159
|
+
expect(bodyCancelled).toBe(true);
|
|
160
|
+
} finally {
|
|
161
|
+
globalThis.fetch = originalFetch;
|
|
162
|
+
await context.fiber.dispose();
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test("rejects invalid UTF-8 DevTools tab lists", async () => {
|
|
167
|
+
const originalFetch = globalThis.fetch;
|
|
168
|
+
globalThis.fetch = () => Promise.resolve(new Response(new Uint8Array([0xc3, 0x28]), { status: 200 }));
|
|
169
|
+
const context = await createBrowserSession();
|
|
170
|
+
try {
|
|
171
|
+
await expect(browserTool(context, "browser_tabs").execute("call-1", {}, undefined, undefined, {} as never)).rejects.toThrow(/valid UTF-8/iu);
|
|
172
|
+
} finally {
|
|
173
|
+
globalThis.fetch = originalFetch;
|
|
174
|
+
await context.fiber.dispose();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test("rejects DevTools tab inventories above the item limit", async () => {
|
|
179
|
+
const originalFetch = globalThis.fetch;
|
|
180
|
+
globalThis.fetch = () =>
|
|
181
|
+
Promise.resolve(
|
|
182
|
+
Response.json(
|
|
183
|
+
Array.from({ length: 257 }, (_, index) => ({
|
|
184
|
+
id: `tab-${index}`,
|
|
185
|
+
title: `Tab ${index}`,
|
|
186
|
+
url: `https://example.com/${index}`,
|
|
187
|
+
type: "page",
|
|
188
|
+
webSocketDebuggerUrl: `ws://127.0.0.1:9222/devtools/page/tab-${index}`,
|
|
189
|
+
})),
|
|
190
|
+
),
|
|
191
|
+
);
|
|
192
|
+
const context = await createBrowserSession();
|
|
193
|
+
try {
|
|
194
|
+
await expect(browserTool(context, "browser_tabs").execute("tabs", {}, undefined, undefined, {} as never)).rejects.toThrow(
|
|
195
|
+
/tab inventory cannot exceed 256 items/iu,
|
|
196
|
+
);
|
|
197
|
+
} finally {
|
|
198
|
+
globalThis.fetch = originalFetch;
|
|
199
|
+
await context.fiber.dispose();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
test.each([
|
|
204
|
+
[{ title: "Missing id", url: "https://example.com/", type: "page" }, /tab 1 target ID must be a string/iu],
|
|
205
|
+
[{ id: "tab\0one", title: "NUL id", url: "https://example.com/", type: "page" }, /tab 1 target ID.*NUL/iu],
|
|
206
|
+
[{ id: "tab-1", title: "x".repeat(4_097), url: "https://example.com/", type: "page" }, /tab 1 title.*4096/iu],
|
|
207
|
+
[{ id: "tab-1", title: "Fixture", url: "x".repeat(8_193), type: "page" }, /tab 1 URL.*8192/iu],
|
|
208
|
+
[{ id: "tab-1", title: "Fixture", url: "https://example.com/", type: "x".repeat(65) }, /tab 1 type.*64/iu],
|
|
209
|
+
[{ id: "tab-1", title: "Fixture", url: "https://example.com/", type: "page", webSocketDebuggerUrl: "x".repeat(2_049) }, /tab 1 WebSocket URL.*2048/iu],
|
|
210
|
+
])("rejects malformed DevTools tab descriptors", async (tab, expected) => {
|
|
211
|
+
const originalFetch = globalThis.fetch;
|
|
212
|
+
globalThis.fetch = () => Promise.resolve(Response.json([tab]));
|
|
213
|
+
const context = await createBrowserSession();
|
|
214
|
+
try {
|
|
215
|
+
await expect(browserTool(context, "browser_tabs").execute("tabs", {}, undefined, undefined, {} as never)).rejects.toThrow(expected);
|
|
216
|
+
} finally {
|
|
217
|
+
globalThis.fetch = originalFetch;
|
|
218
|
+
await context.fiber.dispose();
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
test("bounds the browser tab summary while retaining the complete bounded inventory in details", async () => {
|
|
223
|
+
const originalFetch = globalThis.fetch;
|
|
224
|
+
globalThis.fetch = () =>
|
|
225
|
+
Promise.resolve(
|
|
226
|
+
Response.json(
|
|
227
|
+
Array.from({ length: 40 }, (_, index) => ({
|
|
228
|
+
id: `tab-${index}`,
|
|
229
|
+
title: `${index}-${"t".repeat(4_000)}`,
|
|
230
|
+
url: `https://example.com/${index}/${"u".repeat(4_000)}`,
|
|
231
|
+
type: "page",
|
|
232
|
+
})),
|
|
233
|
+
),
|
|
234
|
+
);
|
|
235
|
+
const context = await createBrowserSession();
|
|
236
|
+
try {
|
|
237
|
+
const result = await browserTool(context, "browser_tabs").execute("tabs", {}, undefined, undefined, {} as never);
|
|
238
|
+
const content = result.content[0];
|
|
239
|
+
expect(content?.type).toBe("text");
|
|
240
|
+
if (content?.type !== "text") throw new Error("Expected a browser tab text summary");
|
|
241
|
+
expect(Buffer.byteLength(content.text, "utf8")).toBeLessThanOrEqual(128 * 1024);
|
|
242
|
+
expect(content.text).toMatch(/summary truncated.*40 tabs/iu);
|
|
243
|
+
expect((result.details as { tabs: unknown[] }).tabs).toHaveLength(40);
|
|
244
|
+
} finally {
|
|
245
|
+
globalThis.fetch = originalFetch;
|
|
246
|
+
await context.fiber.dispose();
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
test("times out DevTools discovery requests", async () => {
|
|
251
|
+
const originalFetch = globalThis.fetch;
|
|
252
|
+
let rejectFallback: ((reason: Error) => void) | undefined;
|
|
253
|
+
globalThis.fetch = (_input, init) =>
|
|
254
|
+
new Promise<Response>((_resolve, reject) => {
|
|
255
|
+
rejectFallback = reject;
|
|
256
|
+
init?.signal?.addEventListener(
|
|
257
|
+
"abort",
|
|
258
|
+
() => {
|
|
259
|
+
const reason: unknown = init.signal?.reason;
|
|
260
|
+
reject(reason instanceof Error ? reason : new Error("DevTools discovery aborted"));
|
|
261
|
+
},
|
|
262
|
+
{ once: true },
|
|
263
|
+
);
|
|
264
|
+
});
|
|
265
|
+
vi.useFakeTimers();
|
|
266
|
+
const context = await createBrowserSession();
|
|
267
|
+
try {
|
|
268
|
+
const pending = browserTool(context, "browser_tabs").execute("call-1", {}, undefined, undefined, {} as never);
|
|
269
|
+
const timedOut = expect(pending).rejects.toThrow(/timed out after 15000 ms/iu);
|
|
270
|
+
|
|
271
|
+
await vi.advanceTimersByTimeAsync(15_000);
|
|
272
|
+
rejectFallback?.(new Error("test fallback rejection"));
|
|
273
|
+
await timedOut;
|
|
274
|
+
} finally {
|
|
275
|
+
rejectFallback?.(new Error("test cleanup"));
|
|
276
|
+
vi.useRealTimers();
|
|
277
|
+
globalThis.fetch = originalFetch;
|
|
278
|
+
await context.fiber.dispose();
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
test("cancels in-flight DevTools discovery when the plugin is disposed", async () => {
|
|
283
|
+
const originalFetch = globalThis.fetch;
|
|
284
|
+
let rejectPending: ((reason: Error) => void) | undefined;
|
|
285
|
+
let aborted = false;
|
|
286
|
+
globalThis.fetch = (_input, init) =>
|
|
287
|
+
new Promise<Response>((_resolve, reject) => {
|
|
288
|
+
rejectPending = reject;
|
|
289
|
+
init?.signal?.addEventListener(
|
|
290
|
+
"abort",
|
|
291
|
+
() => {
|
|
292
|
+
aborted = true;
|
|
293
|
+
const reason: unknown = init.signal?.reason;
|
|
294
|
+
reject(reason instanceof Error ? reason : new Error("DevTools discovery aborted"));
|
|
295
|
+
},
|
|
296
|
+
{ once: true },
|
|
297
|
+
);
|
|
298
|
+
});
|
|
299
|
+
const context = await createBrowserSession();
|
|
300
|
+
const tools = context.piTools;
|
|
301
|
+
const panels = context.piPluginUi;
|
|
302
|
+
let fallback: ReturnType<typeof setTimeout> | undefined;
|
|
303
|
+
let execution: Promise<unknown> | undefined;
|
|
304
|
+
try {
|
|
305
|
+
execution = browserTool(context, "browser_tabs").execute("call-1", {}, undefined, undefined, {} as never);
|
|
306
|
+
|
|
307
|
+
await context.fiber.dispose();
|
|
308
|
+
const outcome = await Promise.race([
|
|
309
|
+
execution.then(
|
|
310
|
+
() => new Error("Browser discovery unexpectedly succeeded"),
|
|
311
|
+
(error: unknown) => error,
|
|
312
|
+
),
|
|
313
|
+
new Promise<string>((resolve) => {
|
|
314
|
+
fallback = setTimeout(() => resolve("Browser discovery remained pending"), 500);
|
|
315
|
+
}),
|
|
316
|
+
]);
|
|
317
|
+
|
|
318
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
319
|
+
expect(String(outcome)).toMatch(/disposed|cancelled/iu);
|
|
320
|
+
expect(aborted).toBe(true);
|
|
321
|
+
expect(tools.snapshot().customTools).toEqual([]);
|
|
322
|
+
await expect(panels.snapshot()).resolves.toEqual([]);
|
|
323
|
+
} finally {
|
|
324
|
+
if (fallback !== undefined) clearTimeout(fallback);
|
|
325
|
+
rejectPending?.(new Error("test cleanup"));
|
|
326
|
+
globalThis.fetch = originalFetch;
|
|
327
|
+
await context.fiber.dispose();
|
|
328
|
+
await execution?.catch(() => undefined);
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
test("rejects navigation URLs containing credentials before tab discovery", async () => {
|
|
333
|
+
const originalFetch = globalThis.fetch;
|
|
334
|
+
let fetches = 0;
|
|
335
|
+
globalThis.fetch = () => {
|
|
336
|
+
fetches += 1;
|
|
337
|
+
return Promise.resolve(Response.json([]));
|
|
338
|
+
};
|
|
339
|
+
const context = await createBrowserSession();
|
|
340
|
+
try {
|
|
341
|
+
await expect(
|
|
342
|
+
browserTool(context, "browser_navigate").execute(
|
|
343
|
+
"call-1",
|
|
344
|
+
{ targetId: "tab-1", url: "https://user:password@example.com/private" },
|
|
345
|
+
undefined,
|
|
346
|
+
undefined,
|
|
347
|
+
{} as never,
|
|
348
|
+
),
|
|
349
|
+
).rejects.toThrow(/without credentials/iu);
|
|
350
|
+
expect(fetches).toBe(0);
|
|
351
|
+
} finally {
|
|
352
|
+
globalThis.fetch = originalFetch;
|
|
353
|
+
await context.fiber.dispose();
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
test("rejects a navigation result containing a CDP errorText", async () => {
|
|
358
|
+
const originalFetch = globalThis.fetch;
|
|
359
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
360
|
+
const methods: string[] = [];
|
|
361
|
+
globalThis.fetch = () =>
|
|
362
|
+
Promise.resolve(
|
|
363
|
+
Response.json([
|
|
364
|
+
{
|
|
365
|
+
id: "tab-1",
|
|
366
|
+
title: "Fixture",
|
|
367
|
+
type: "page",
|
|
368
|
+
url: "about:blank",
|
|
369
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
370
|
+
},
|
|
371
|
+
]),
|
|
372
|
+
);
|
|
373
|
+
class NavigationSocket extends EventTarget {
|
|
374
|
+
constructor() {
|
|
375
|
+
super();
|
|
376
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
send(source: string): void {
|
|
380
|
+
const request = JSON.parse(source) as { id: number; method: string };
|
|
381
|
+
methods.push(request.method);
|
|
382
|
+
const result = request.method === "Page.navigate" ? { errorText: "net::ERR_NAME_NOT_RESOLVED" } : { result: { value: "complete" } };
|
|
383
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result }) })));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
close(): void {}
|
|
387
|
+
}
|
|
388
|
+
globalThis.WebSocket = NavigationSocket as unknown as typeof WebSocket;
|
|
389
|
+
const context = await createBrowserSession();
|
|
390
|
+
try {
|
|
391
|
+
await expect(
|
|
392
|
+
browserTool(context, "browser_navigate").execute(
|
|
393
|
+
"call-1",
|
|
394
|
+
{ targetId: "tab-1", url: "https://does-not-resolve.invalid/" },
|
|
395
|
+
undefined,
|
|
396
|
+
undefined,
|
|
397
|
+
{} as never,
|
|
398
|
+
),
|
|
399
|
+
).rejects.toThrow(/ERR_NAME_NOT_RESOLVED/iu);
|
|
400
|
+
expect(methods).toEqual(["Page.enable", "Page.navigate"]);
|
|
401
|
+
} finally {
|
|
402
|
+
globalThis.fetch = originalFetch;
|
|
403
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
404
|
+
await context.fiber.dispose();
|
|
405
|
+
}
|
|
406
|
+
});
|
|
407
|
+
|
|
408
|
+
test("records successful navigation in panel state", async () => {
|
|
409
|
+
const originalFetch = globalThis.fetch;
|
|
410
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
411
|
+
globalThis.fetch = () =>
|
|
412
|
+
Promise.resolve(
|
|
413
|
+
Response.json([
|
|
414
|
+
{
|
|
415
|
+
id: "tab-1",
|
|
416
|
+
title: "Fixture",
|
|
417
|
+
type: "page",
|
|
418
|
+
url: "about:blank",
|
|
419
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
420
|
+
},
|
|
421
|
+
]),
|
|
422
|
+
);
|
|
423
|
+
class NavigationSocket extends EventTarget {
|
|
424
|
+
constructor() {
|
|
425
|
+
super();
|
|
426
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
send(source: string): void {
|
|
430
|
+
const request = JSON.parse(source) as { id: number; method: string };
|
|
431
|
+
const result = request.method === "Runtime.evaluate" ? { result: { value: "complete" } } : {};
|
|
432
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result }) })));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
close(): void {}
|
|
436
|
+
}
|
|
437
|
+
globalThis.WebSocket = NavigationSocket as unknown as typeof WebSocket;
|
|
438
|
+
const context = await createBrowserSession();
|
|
439
|
+
try {
|
|
440
|
+
await browserTool(context, "browser_navigate").execute(
|
|
441
|
+
"call-1",
|
|
442
|
+
{ targetId: "tab-1", url: "https://example.com/next" },
|
|
443
|
+
undefined,
|
|
444
|
+
undefined,
|
|
445
|
+
{} as never,
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
await expect(context.piPluginUi.snapshot()).resolves.toMatchObject([
|
|
449
|
+
{ id: "browser-session-panel", data: { latest: { targetId: "tab-1", status: "navigated", url: "https://example.com/next" } } },
|
|
450
|
+
]);
|
|
451
|
+
} finally {
|
|
452
|
+
globalThis.fetch = originalFetch;
|
|
453
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
454
|
+
await context.fiber.dispose();
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
test("records an empty page read in panel state", async () => {
|
|
459
|
+
const originalFetch = globalThis.fetch;
|
|
460
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
461
|
+
globalThis.fetch = () =>
|
|
462
|
+
Promise.resolve(
|
|
463
|
+
Response.json([
|
|
464
|
+
{
|
|
465
|
+
id: "tab-1",
|
|
466
|
+
title: "Empty",
|
|
467
|
+
type: "page",
|
|
468
|
+
url: "https://example.com/empty",
|
|
469
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
470
|
+
},
|
|
471
|
+
]),
|
|
472
|
+
);
|
|
473
|
+
class ReadSocket extends EventTarget {
|
|
474
|
+
constructor() {
|
|
475
|
+
super();
|
|
476
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
send(source: string): void {
|
|
480
|
+
const request = JSON.parse(source) as { id: number };
|
|
481
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { result: { value: "" } } }) })));
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
close(): void {}
|
|
485
|
+
}
|
|
486
|
+
globalThis.WebSocket = ReadSocket as unknown as typeof WebSocket;
|
|
487
|
+
const context = await createBrowserSession();
|
|
488
|
+
try {
|
|
489
|
+
await browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
490
|
+
|
|
491
|
+
await expect(context.piPluginUi.snapshot()).resolves.toMatchObject([
|
|
492
|
+
{ id: "browser-session-panel", data: { latest: { status: "read", text: "", truncated: false } } },
|
|
493
|
+
]);
|
|
494
|
+
} finally {
|
|
495
|
+
globalThis.fetch = originalFetch;
|
|
496
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
497
|
+
await context.fiber.dispose();
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
test("publishes bounded tab and text previews with explicit panel inventory metadata", async () => {
|
|
502
|
+
const originalFetch = globalThis.fetch;
|
|
503
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
504
|
+
const pageText = "x".repeat(20_000);
|
|
505
|
+
const tabList = Array.from({ length: 25 }, (_, index) => ({
|
|
506
|
+
id: `tab-${index}`,
|
|
507
|
+
title: `Fixture ${index}`,
|
|
508
|
+
type: "page",
|
|
509
|
+
url: `https://example.com/${index}`,
|
|
510
|
+
webSocketDebuggerUrl: `ws://127.0.0.1:9222/devtools/page/tab-${index}`,
|
|
511
|
+
}));
|
|
512
|
+
globalThis.fetch = () => Promise.resolve(Response.json(tabList));
|
|
513
|
+
class ReadSocket extends EventTarget {
|
|
514
|
+
constructor() {
|
|
515
|
+
super();
|
|
516
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
send(source: string): void {
|
|
520
|
+
const request = JSON.parse(source) as { id: number };
|
|
521
|
+
queueMicrotask(() =>
|
|
522
|
+
this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { result: { value: pageText } } }) })),
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
close(): void {}
|
|
527
|
+
}
|
|
528
|
+
globalThis.WebSocket = ReadSocket as unknown as typeof WebSocket;
|
|
529
|
+
const context = await createBrowserSession();
|
|
530
|
+
try {
|
|
531
|
+
await browserTool(context, "browser_read").execute("call-1", { targetId: "tab-0" }, undefined, undefined, {} as never);
|
|
532
|
+
|
|
533
|
+
const panel = (await context.piPluginUi.snapshot())[0];
|
|
534
|
+
expect((panel?.data as { tabs: unknown[] }).tabs).toHaveLength(20);
|
|
535
|
+
expect(panel?.data).toMatchObject({
|
|
536
|
+
inventory: { total: 25, shown: 20, truncated: true },
|
|
537
|
+
limits: { tabs: 20, textPreviewCharacters: 12_000 },
|
|
538
|
+
latest: { text: "x".repeat(12_000), truncated: false, previewTruncated: true },
|
|
539
|
+
});
|
|
540
|
+
} finally {
|
|
541
|
+
globalThis.fetch = originalFetch;
|
|
542
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
543
|
+
await context.fiber.dispose();
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
|
|
547
|
+
test("rejects screenshots larger than 8 MiB", async () => {
|
|
548
|
+
const originalFetch = globalThis.fetch;
|
|
549
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
550
|
+
const screenshotData = "A".repeat(11_184_812);
|
|
551
|
+
globalThis.fetch = () =>
|
|
552
|
+
Promise.resolve(
|
|
553
|
+
Response.json([
|
|
554
|
+
{
|
|
555
|
+
id: "tab-1",
|
|
556
|
+
title: "Fixture",
|
|
557
|
+
type: "page",
|
|
558
|
+
url: "https://example.com/",
|
|
559
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
560
|
+
},
|
|
561
|
+
]),
|
|
562
|
+
);
|
|
563
|
+
class ScreenshotSocket extends EventTarget {
|
|
564
|
+
constructor() {
|
|
565
|
+
super();
|
|
566
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
send(source: string): void {
|
|
570
|
+
const request = JSON.parse(source) as { id: number };
|
|
571
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { data: screenshotData } }) })));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
close(): void {}
|
|
575
|
+
}
|
|
576
|
+
globalThis.WebSocket = ScreenshotSocket as unknown as typeof WebSocket;
|
|
577
|
+
const context = await createBrowserSession();
|
|
578
|
+
try {
|
|
579
|
+
const outcome = await browserTool(context, "browser_screenshot")
|
|
580
|
+
.execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never)
|
|
581
|
+
.then(
|
|
582
|
+
() => "resolved" as const,
|
|
583
|
+
(error: unknown) => error,
|
|
584
|
+
);
|
|
585
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
586
|
+
if (!(outcome instanceof Error)) throw new Error("Expected screenshot rejection");
|
|
587
|
+
expect(outcome.message).toMatch(/screenshot exceeded the 8 MiB limit/iu);
|
|
588
|
+
} finally {
|
|
589
|
+
globalThis.fetch = originalFetch;
|
|
590
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
591
|
+
await context.fiber.dispose();
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
test("cancels an in-flight DevTools command", async () => {
|
|
596
|
+
const originalFetch = globalThis.fetch;
|
|
597
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
598
|
+
const caller = new AbortController();
|
|
599
|
+
globalThis.fetch = () =>
|
|
600
|
+
Promise.resolve(
|
|
601
|
+
Response.json([
|
|
602
|
+
{
|
|
603
|
+
id: "tab-1",
|
|
604
|
+
title: "Fixture",
|
|
605
|
+
type: "page",
|
|
606
|
+
url: "https://example.com/",
|
|
607
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
608
|
+
},
|
|
609
|
+
]),
|
|
610
|
+
);
|
|
611
|
+
class HangingSocket extends EventTarget {
|
|
612
|
+
constructor() {
|
|
613
|
+
super();
|
|
614
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
send(): void {
|
|
618
|
+
caller.abort(new Error("cancel DevTools command"));
|
|
619
|
+
queueMicrotask(() => this.dispatchEvent(new Event("close")));
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
close(): void {}
|
|
623
|
+
}
|
|
624
|
+
globalThis.WebSocket = HangingSocket as unknown as typeof WebSocket;
|
|
625
|
+
const context = await createBrowserSession();
|
|
626
|
+
try {
|
|
627
|
+
await expect(browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, caller.signal, undefined, {} as never)).rejects.toThrow(
|
|
628
|
+
/cancelled/iu,
|
|
629
|
+
);
|
|
630
|
+
} finally {
|
|
631
|
+
globalThis.fetch = originalFetch;
|
|
632
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
633
|
+
await context.fiber.dispose();
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
test("does not miss cancellation while constructing a DevTools socket", async () => {
|
|
638
|
+
const originalFetch = globalThis.fetch;
|
|
639
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
640
|
+
const caller = new AbortController();
|
|
641
|
+
let closed = false;
|
|
642
|
+
globalThis.fetch = () =>
|
|
643
|
+
Promise.resolve(
|
|
644
|
+
Response.json([
|
|
645
|
+
{
|
|
646
|
+
id: "tab-1",
|
|
647
|
+
title: "Fixture",
|
|
648
|
+
type: "page",
|
|
649
|
+
url: "https://example.com/",
|
|
650
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
651
|
+
},
|
|
652
|
+
]),
|
|
653
|
+
);
|
|
654
|
+
class CancellingSocket extends EventTarget {
|
|
655
|
+
constructor() {
|
|
656
|
+
super();
|
|
657
|
+
caller.abort(new Error("cancel during socket construction"));
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
send(): void {}
|
|
661
|
+
|
|
662
|
+
close(): void {
|
|
663
|
+
closed = true;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
globalThis.WebSocket = CancellingSocket as unknown as typeof WebSocket;
|
|
667
|
+
vi.useFakeTimers();
|
|
668
|
+
const context = await createBrowserSession();
|
|
669
|
+
try {
|
|
670
|
+
const pending = browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, caller.signal, undefined, {} as never);
|
|
671
|
+
const outcomePromise = pending.then(
|
|
672
|
+
() => new Error("Browser command unexpectedly succeeded"),
|
|
673
|
+
(error: unknown) => error,
|
|
674
|
+
);
|
|
675
|
+
|
|
676
|
+
await vi.advanceTimersByTimeAsync(15_000);
|
|
677
|
+
|
|
678
|
+
const outcome = await outcomePromise;
|
|
679
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
680
|
+
if (!(outcome instanceof Error)) throw new Error("Expected cancellation");
|
|
681
|
+
expect(outcome.message).toMatch(/cancel during socket construction|cancelled/iu);
|
|
682
|
+
expect(closed).toBe(true);
|
|
683
|
+
} finally {
|
|
684
|
+
vi.useRealTimers();
|
|
685
|
+
globalThis.fetch = originalFetch;
|
|
686
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
687
|
+
await context.fiber.dispose();
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
test("rejects immediately when sending a DevTools command fails", async () => {
|
|
692
|
+
const originalFetch = globalThis.fetch;
|
|
693
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
694
|
+
let closed = false;
|
|
695
|
+
globalThis.fetch = () =>
|
|
696
|
+
Promise.resolve(
|
|
697
|
+
Response.json([
|
|
698
|
+
{
|
|
699
|
+
id: "tab-1",
|
|
700
|
+
title: "Fixture",
|
|
701
|
+
type: "page",
|
|
702
|
+
url: "https://example.com/",
|
|
703
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
704
|
+
},
|
|
705
|
+
]),
|
|
706
|
+
);
|
|
707
|
+
class ThrowingSocket {
|
|
708
|
+
addEventListener(type: string, listener: EventListener): void {
|
|
709
|
+
if (type !== "open") return;
|
|
710
|
+
queueMicrotask(() => {
|
|
711
|
+
try {
|
|
712
|
+
listener(new Event("open"));
|
|
713
|
+
} catch {
|
|
714
|
+
// Simulate an event target reporting the handler error without settling the CDP promise.
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
removeEventListener(): void {}
|
|
720
|
+
|
|
721
|
+
send(): void {
|
|
722
|
+
throw new Error("send failed");
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
close(): void {
|
|
726
|
+
closed = true;
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
globalThis.WebSocket = ThrowingSocket as unknown as typeof WebSocket;
|
|
730
|
+
vi.useFakeTimers();
|
|
731
|
+
const context = await createBrowserSession();
|
|
732
|
+
try {
|
|
733
|
+
const pending = browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
734
|
+
const outcomePromise = pending.then(
|
|
735
|
+
() => new Error("Browser command unexpectedly succeeded"),
|
|
736
|
+
(error: unknown) => error,
|
|
737
|
+
);
|
|
738
|
+
|
|
739
|
+
await vi.advanceTimersByTimeAsync(15_000);
|
|
740
|
+
|
|
741
|
+
const outcome = await outcomePromise;
|
|
742
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
743
|
+
if (!(outcome instanceof Error)) throw new Error("Expected send failure");
|
|
744
|
+
expect(outcome.message).toMatch(/send failed/iu);
|
|
745
|
+
expect(closed).toBe(true);
|
|
746
|
+
} finally {
|
|
747
|
+
vi.useRealTimers();
|
|
748
|
+
globalThis.fetch = originalFetch;
|
|
749
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
750
|
+
await context.fiber.dispose();
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
test("closes a DevTools socket after an error event", async () => {
|
|
755
|
+
const originalFetch = globalThis.fetch;
|
|
756
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
757
|
+
let closed = false;
|
|
758
|
+
globalThis.fetch = () =>
|
|
759
|
+
Promise.resolve(
|
|
760
|
+
Response.json([
|
|
761
|
+
{
|
|
762
|
+
id: "tab-1",
|
|
763
|
+
title: "Fixture",
|
|
764
|
+
type: "page",
|
|
765
|
+
url: "https://example.com/",
|
|
766
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
767
|
+
},
|
|
768
|
+
]),
|
|
769
|
+
);
|
|
770
|
+
class ErrorSocket extends EventTarget {
|
|
771
|
+
constructor() {
|
|
772
|
+
super();
|
|
773
|
+
queueMicrotask(() => this.dispatchEvent(new Event("error")));
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
send(): void {}
|
|
777
|
+
|
|
778
|
+
close(): void {
|
|
779
|
+
closed = true;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
globalThis.WebSocket = ErrorSocket as unknown as typeof WebSocket;
|
|
783
|
+
const context = await createBrowserSession();
|
|
784
|
+
try {
|
|
785
|
+
await expect(browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never)).rejects.toThrow(
|
|
786
|
+
/Could not connect/iu,
|
|
787
|
+
);
|
|
788
|
+
expect(closed).toBe(true);
|
|
789
|
+
} finally {
|
|
790
|
+
globalThis.fetch = originalFetch;
|
|
791
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
792
|
+
await context.fiber.dispose();
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
|
|
796
|
+
test("rejects browser session endpoints containing credentials", async () => {
|
|
797
|
+
const context = new Context();
|
|
798
|
+
provideLaunchContext(context, { cwd: "/tmp", agentDir: "/tmp", args: [], requestExit() {} });
|
|
799
|
+
await context.plugin(toolsPlugin, { names: [] });
|
|
800
|
+
try {
|
|
801
|
+
let activationError: unknown;
|
|
802
|
+
try {
|
|
803
|
+
await context.plugin(browserSessionPlugin, { endpoint: "http://user:password@127.0.0.1:9222" });
|
|
804
|
+
} catch (error) {
|
|
805
|
+
activationError = error;
|
|
806
|
+
}
|
|
807
|
+
expect(activationError).toBeInstanceOf(Error);
|
|
808
|
+
if (!(activationError instanceof Error)) throw new Error("Expected invalid endpoint rejection");
|
|
809
|
+
expect(activationError.message).toMatch(/must not contain credentials/iu);
|
|
810
|
+
} finally {
|
|
811
|
+
await context.fiber.dispose();
|
|
812
|
+
}
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
test("disables redirects while discovering DevTools tabs", async () => {
|
|
816
|
+
const originalFetch = globalThis.fetch;
|
|
817
|
+
let redirect: RequestRedirect | undefined;
|
|
818
|
+
globalThis.fetch = (_input, init) => {
|
|
819
|
+
redirect = init?.redirect;
|
|
820
|
+
return Promise.resolve(Response.json([]));
|
|
821
|
+
};
|
|
822
|
+
const context = await createBrowserSession();
|
|
823
|
+
try {
|
|
824
|
+
await browserTool(context, "browser_tabs").execute("call-1", {}, undefined, undefined, {} as never);
|
|
825
|
+
expect(redirect).toBe("error");
|
|
826
|
+
} finally {
|
|
827
|
+
globalThis.fetch = originalFetch;
|
|
828
|
+
await context.fiber.dispose();
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
test("rejects remote WebSocket URLs returned by local DevTools discovery", async () => {
|
|
833
|
+
const originalFetch = globalThis.fetch;
|
|
834
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
835
|
+
let connections = 0;
|
|
836
|
+
globalThis.fetch = () =>
|
|
837
|
+
Promise.resolve(
|
|
838
|
+
Response.json([
|
|
839
|
+
{
|
|
840
|
+
id: "tab-1",
|
|
841
|
+
title: "Fixture",
|
|
842
|
+
type: "page",
|
|
843
|
+
url: "https://example.com/",
|
|
844
|
+
webSocketDebuggerUrl: "ws://remote.example.com/devtools/page/tab-1",
|
|
845
|
+
},
|
|
846
|
+
]),
|
|
847
|
+
);
|
|
848
|
+
class RemoteSocket extends EventTarget {
|
|
849
|
+
constructor() {
|
|
850
|
+
super();
|
|
851
|
+
connections += 1;
|
|
852
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
send(source: string): void {
|
|
856
|
+
const request = JSON.parse(source) as { id: number };
|
|
857
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { data: "AAAA" } }) })));
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
close(): void {}
|
|
861
|
+
}
|
|
862
|
+
globalThis.WebSocket = RemoteSocket as unknown as typeof WebSocket;
|
|
863
|
+
const context = await createBrowserSession();
|
|
864
|
+
try {
|
|
865
|
+
await expect(browserTool(context, "browser_screenshot").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never)).rejects.toThrow(
|
|
866
|
+
/must stay on the configured local endpoint/iu,
|
|
867
|
+
);
|
|
868
|
+
expect(connections).toBe(0);
|
|
869
|
+
} finally {
|
|
870
|
+
globalThis.fetch = originalFetch;
|
|
871
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
872
|
+
await context.fiber.dispose();
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
test("rejects malformed base64 screenshot data", async () => {
|
|
877
|
+
const originalFetch = globalThis.fetch;
|
|
878
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
879
|
+
globalThis.fetch = () =>
|
|
880
|
+
Promise.resolve(
|
|
881
|
+
Response.json([
|
|
882
|
+
{
|
|
883
|
+
id: "tab-1",
|
|
884
|
+
title: "Fixture",
|
|
885
|
+
type: "page",
|
|
886
|
+
url: "https://example.com/",
|
|
887
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
888
|
+
},
|
|
889
|
+
]),
|
|
890
|
+
);
|
|
891
|
+
class InvalidScreenshotSocket extends EventTarget {
|
|
892
|
+
constructor() {
|
|
893
|
+
super();
|
|
894
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
send(source: string): void {
|
|
898
|
+
const request = JSON.parse(source) as { id: number };
|
|
899
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { data: "not base64!" } }) })));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
close(): void {}
|
|
903
|
+
}
|
|
904
|
+
globalThis.WebSocket = InvalidScreenshotSocket as unknown as typeof WebSocket;
|
|
905
|
+
const context = await createBrowserSession();
|
|
906
|
+
try {
|
|
907
|
+
await expect(browserTool(context, "browser_screenshot").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never)).rejects.toThrow(
|
|
908
|
+
/invalid base64/iu,
|
|
909
|
+
);
|
|
910
|
+
} finally {
|
|
911
|
+
globalThis.fetch = originalFetch;
|
|
912
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
913
|
+
await context.fiber.dispose();
|
|
914
|
+
}
|
|
915
|
+
});
|
|
916
|
+
|
|
917
|
+
test("keeps screenshot payload bytes out of tool details and panel state", async () => {
|
|
918
|
+
const originalFetch = globalThis.fetch;
|
|
919
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
920
|
+
const screenshotData = "iVBORw0KGgo=";
|
|
921
|
+
globalThis.fetch = () =>
|
|
922
|
+
Promise.resolve(
|
|
923
|
+
Response.json([
|
|
924
|
+
{
|
|
925
|
+
id: "tab-1",
|
|
926
|
+
title: "Fixture",
|
|
927
|
+
type: "page",
|
|
928
|
+
url: "https://example.com/",
|
|
929
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
930
|
+
},
|
|
931
|
+
]),
|
|
932
|
+
);
|
|
933
|
+
class ScreenshotSocket extends EventTarget {
|
|
934
|
+
constructor() {
|
|
935
|
+
super();
|
|
936
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
send(source: string): void {
|
|
940
|
+
const request = JSON.parse(source) as { id: number };
|
|
941
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { data: screenshotData } }) })));
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
close(): void {}
|
|
945
|
+
}
|
|
946
|
+
globalThis.WebSocket = ScreenshotSocket as unknown as typeof WebSocket;
|
|
947
|
+
const context = await createBrowserSession();
|
|
948
|
+
try {
|
|
949
|
+
const result = await browserTool(context, "browser_screenshot").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
950
|
+
|
|
951
|
+
expect(result.content).toEqual([{ type: "image", data: screenshotData, mimeType: "image/png" }]);
|
|
952
|
+
expect(result.details).toMatchObject({ screenshot: { bytes: 8, mimeType: "image/png" } });
|
|
953
|
+
expect((result.details as { screenshot: Record<string, unknown> }).screenshot).not.toHaveProperty("data");
|
|
954
|
+
const panel = (await context.piPluginUi.snapshot())[0];
|
|
955
|
+
expect(panel?.data).toMatchObject({ latest: { screenshot: { bytes: 8, mimeType: "image/png" } } });
|
|
956
|
+
expect((panel?.data as { latest?: { screenshot?: Record<string, unknown> } } | undefined)?.latest?.screenshot ?? {}).not.toHaveProperty("data");
|
|
957
|
+
} finally {
|
|
958
|
+
globalThis.fetch = originalFetch;
|
|
959
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
960
|
+
await context.fiber.dispose();
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
test("rejects DevTools WebSocket responses larger than 12 MiB", async () => {
|
|
965
|
+
const originalFetch = globalThis.fetch;
|
|
966
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
967
|
+
const oversizedText = "x".repeat(12 * 1024 * 1024);
|
|
968
|
+
globalThis.fetch = () =>
|
|
969
|
+
Promise.resolve(
|
|
970
|
+
Response.json([
|
|
971
|
+
{
|
|
972
|
+
id: "tab-1",
|
|
973
|
+
title: "Fixture",
|
|
974
|
+
type: "page",
|
|
975
|
+
url: "https://example.com/",
|
|
976
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
977
|
+
},
|
|
978
|
+
]),
|
|
979
|
+
);
|
|
980
|
+
class OversizedSocket extends EventTarget {
|
|
981
|
+
constructor() {
|
|
982
|
+
super();
|
|
983
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
send(source: string): void {
|
|
987
|
+
const request = JSON.parse(source) as { id: number };
|
|
988
|
+
queueMicrotask(() =>
|
|
989
|
+
this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { result: { value: oversizedText } } }) })),
|
|
990
|
+
);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
close(): void {}
|
|
994
|
+
}
|
|
995
|
+
globalThis.WebSocket = OversizedSocket as unknown as typeof WebSocket;
|
|
996
|
+
const context = await createBrowserSession();
|
|
997
|
+
try {
|
|
998
|
+
const outcome = await browserTool(context, "browser_read")
|
|
999
|
+
.execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never)
|
|
1000
|
+
.then(
|
|
1001
|
+
() => "resolved" as const,
|
|
1002
|
+
(error: unknown) => error,
|
|
1003
|
+
);
|
|
1004
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
1005
|
+
if (!(outcome instanceof Error)) throw new Error("Expected oversized response rejection");
|
|
1006
|
+
expect(outcome.message).toMatch(/response exceeded the 12 MiB limit/iu);
|
|
1007
|
+
} finally {
|
|
1008
|
+
globalThis.fetch = originalFetch;
|
|
1009
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
1010
|
+
await context.fiber.dispose();
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
|
|
1014
|
+
test("rejects malformed DevTools JSON responses and closes the socket", async () => {
|
|
1015
|
+
const originalFetch = globalThis.fetch;
|
|
1016
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
1017
|
+
let closed = false;
|
|
1018
|
+
globalThis.fetch = () =>
|
|
1019
|
+
Promise.resolve(
|
|
1020
|
+
Response.json([
|
|
1021
|
+
{
|
|
1022
|
+
id: "tab-1",
|
|
1023
|
+
title: "Fixture",
|
|
1024
|
+
type: "page",
|
|
1025
|
+
url: "https://example.com/",
|
|
1026
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
1027
|
+
},
|
|
1028
|
+
]),
|
|
1029
|
+
);
|
|
1030
|
+
class MalformedSocket extends EventTarget {
|
|
1031
|
+
constructor() {
|
|
1032
|
+
super();
|
|
1033
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
send(): void {
|
|
1037
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: "not json" })));
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
close(): void {
|
|
1041
|
+
closed = true;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
globalThis.WebSocket = MalformedSocket as unknown as typeof WebSocket;
|
|
1045
|
+
vi.useFakeTimers();
|
|
1046
|
+
const context = await createBrowserSession();
|
|
1047
|
+
try {
|
|
1048
|
+
const pending = browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
1049
|
+
const outcomePromise = pending.then(
|
|
1050
|
+
() => new Error("Browser command unexpectedly succeeded"),
|
|
1051
|
+
(error: unknown) => error,
|
|
1052
|
+
);
|
|
1053
|
+
|
|
1054
|
+
await vi.advanceTimersByTimeAsync(15_000);
|
|
1055
|
+
|
|
1056
|
+
const outcome = await outcomePromise;
|
|
1057
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
1058
|
+
if (!(outcome instanceof Error)) throw new Error("Expected invalid JSON rejection");
|
|
1059
|
+
expect(outcome.message).toMatch(/invalid JSON/iu);
|
|
1060
|
+
expect(closed).toBe(true);
|
|
1061
|
+
} finally {
|
|
1062
|
+
vi.useRealTimers();
|
|
1063
|
+
globalThis.fetch = originalFetch;
|
|
1064
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
1065
|
+
await context.fiber.dispose();
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
test.each([
|
|
1070
|
+
[[{ id: 1, result: { result: { value: "text" } } }], /invalid response envelope/iu],
|
|
1071
|
+
[{ id: 1, result: { result: { value: "text" } }, error: { message: "ambiguous" } }, /invalid response envelope/iu],
|
|
1072
|
+
[{ id: 1, error: { code: -1 } }, /invalid error response/iu],
|
|
1073
|
+
[{ id: 1, result: [] }, /invalid result response/iu],
|
|
1074
|
+
])("rejects malformed DevTools response envelopes immediately", async (envelope, expected) => {
|
|
1075
|
+
const originalFetch = globalThis.fetch;
|
|
1076
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
1077
|
+
globalThis.fetch = () =>
|
|
1078
|
+
Promise.resolve(
|
|
1079
|
+
Response.json([
|
|
1080
|
+
{
|
|
1081
|
+
id: "tab-1",
|
|
1082
|
+
title: "Fixture",
|
|
1083
|
+
type: "page",
|
|
1084
|
+
url: "https://example.com/",
|
|
1085
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
1086
|
+
},
|
|
1087
|
+
]),
|
|
1088
|
+
);
|
|
1089
|
+
class EnvelopeSocket extends EventTarget {
|
|
1090
|
+
constructor() {
|
|
1091
|
+
super();
|
|
1092
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
send(): void {
|
|
1096
|
+
queueMicrotask(() => this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify(envelope) })));
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
close(): void {}
|
|
1100
|
+
}
|
|
1101
|
+
globalThis.WebSocket = EnvelopeSocket as unknown as typeof WebSocket;
|
|
1102
|
+
vi.useFakeTimers();
|
|
1103
|
+
const context = await createBrowserSession();
|
|
1104
|
+
try {
|
|
1105
|
+
const pending = browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
1106
|
+
const outcomePromise = pending.then(
|
|
1107
|
+
() => new Error("Malformed envelope unexpectedly succeeded"),
|
|
1108
|
+
(error: unknown) => error,
|
|
1109
|
+
);
|
|
1110
|
+
|
|
1111
|
+
await vi.advanceTimersByTimeAsync(15_000);
|
|
1112
|
+
|
|
1113
|
+
const outcome = await outcomePromise;
|
|
1114
|
+
expect(outcome).toBeInstanceOf(Error);
|
|
1115
|
+
if (!(outcome instanceof Error)) throw new Error("Expected malformed envelope rejection");
|
|
1116
|
+
expect(outcome.message).toMatch(expected);
|
|
1117
|
+
expect(outcome.message).not.toMatch(/timed out/iu);
|
|
1118
|
+
} finally {
|
|
1119
|
+
vi.useRealTimers();
|
|
1120
|
+
globalThis.fetch = originalFetch;
|
|
1121
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
1122
|
+
await context.fiber.dispose();
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
test("does not split a UTF-8 character at the browser text byte limit", async () => {
|
|
1127
|
+
const originalFetch = globalThis.fetch;
|
|
1128
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
1129
|
+
const prefix = "a".repeat(128 * 1024 - 1);
|
|
1130
|
+
const pageText = `${prefix}😀`;
|
|
1131
|
+
globalThis.fetch = () =>
|
|
1132
|
+
Promise.resolve(
|
|
1133
|
+
Response.json([
|
|
1134
|
+
{
|
|
1135
|
+
id: "tab-1",
|
|
1136
|
+
title: "Fixture",
|
|
1137
|
+
type: "page",
|
|
1138
|
+
url: "https://example.com/",
|
|
1139
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
1140
|
+
},
|
|
1141
|
+
]),
|
|
1142
|
+
);
|
|
1143
|
+
class TextSocket extends EventTarget {
|
|
1144
|
+
constructor() {
|
|
1145
|
+
super();
|
|
1146
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
send(source: string): void {
|
|
1150
|
+
const request = JSON.parse(source) as { id: number };
|
|
1151
|
+
queueMicrotask(() =>
|
|
1152
|
+
this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { result: { value: pageText } } }) })),
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
close(): void {}
|
|
1157
|
+
}
|
|
1158
|
+
globalThis.WebSocket = TextSocket as unknown as typeof WebSocket;
|
|
1159
|
+
const context = await createBrowserSession();
|
|
1160
|
+
try {
|
|
1161
|
+
const result = await browserTool(context, "browser_read").execute("call-1", { targetId: "tab-1" }, undefined, undefined, {} as never);
|
|
1162
|
+
|
|
1163
|
+
const content = result.content[0];
|
|
1164
|
+
if (content?.type !== "text") throw new Error("Expected browser text content");
|
|
1165
|
+
expect(content.text.endsWith("�")).toBe(false);
|
|
1166
|
+
expect(content.text.length).toBe(prefix.length);
|
|
1167
|
+
expect(Buffer.byteLength(content.text, "utf8")).toBeLessThanOrEqual(128 * 1024);
|
|
1168
|
+
expect(result.details).toMatchObject({ truncated: true });
|
|
1169
|
+
expect((result.details as { text: string }).text).toBe(content.text);
|
|
1170
|
+
} finally {
|
|
1171
|
+
globalThis.fetch = originalFetch;
|
|
1172
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
1173
|
+
await context.fiber.dispose();
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
|
|
1177
|
+
test("does not expose mutable session state through tool results", async () => {
|
|
1178
|
+
const originalFetch = globalThis.fetch;
|
|
1179
|
+
const OriginalWebSocket = globalThis.WebSocket;
|
|
1180
|
+
globalThis.fetch = () =>
|
|
1181
|
+
Promise.resolve(
|
|
1182
|
+
Response.json([
|
|
1183
|
+
{
|
|
1184
|
+
id: "tab-1",
|
|
1185
|
+
title: "Fixture",
|
|
1186
|
+
type: "page",
|
|
1187
|
+
url: "https://example.com/",
|
|
1188
|
+
webSocketDebuggerUrl: "ws://127.0.0.1:9222/devtools/page/tab-1",
|
|
1189
|
+
},
|
|
1190
|
+
]),
|
|
1191
|
+
);
|
|
1192
|
+
class ClickSocket extends EventTarget {
|
|
1193
|
+
constructor() {
|
|
1194
|
+
super();
|
|
1195
|
+
queueMicrotask(() => this.dispatchEvent(new Event("open")));
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
send(source: string): void {
|
|
1199
|
+
const request = JSON.parse(source) as { id: number };
|
|
1200
|
+
queueMicrotask(() =>
|
|
1201
|
+
this.dispatchEvent(new MessageEvent("message", { data: JSON.stringify({ id: request.id, result: { result: { value: true } } }) })),
|
|
1202
|
+
);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
close(): void {}
|
|
1206
|
+
}
|
|
1207
|
+
globalThis.WebSocket = ClickSocket as unknown as typeof WebSocket;
|
|
1208
|
+
const context = await createBrowserSession();
|
|
1209
|
+
try {
|
|
1210
|
+
const result = await browserTool(context, "browser_click").execute(
|
|
1211
|
+
"call-1",
|
|
1212
|
+
{ targetId: "tab-1", selector: "#button" },
|
|
1213
|
+
undefined,
|
|
1214
|
+
undefined,
|
|
1215
|
+
{} as never,
|
|
1216
|
+
);
|
|
1217
|
+
|
|
1218
|
+
(result.details as { title: string }).title = "mutated";
|
|
1219
|
+
|
|
1220
|
+
await expect(context.piPluginUi.snapshot()).resolves.toMatchObject([{ id: "browser-session-panel", data: { latest: { title: "Fixture" } } }]);
|
|
1221
|
+
const panel = (await context.piPluginUi.snapshot())[0];
|
|
1222
|
+
if (panel === undefined) throw new Error("Browser session panel was not registered");
|
|
1223
|
+
(panel.data as { latest: { title: string } }).latest.title = "panel-mutated";
|
|
1224
|
+
|
|
1225
|
+
await expect(context.piPluginUi.snapshot()).resolves.toMatchObject([{ id: "browser-session-panel", data: { latest: { title: "Fixture" } } }]);
|
|
1226
|
+
globalThis.fetch = () => Promise.resolve(new Response("unavailable", { status: 503 }));
|
|
1227
|
+
await expect(context.piPluginUi.snapshot()).resolves.toMatchObject([
|
|
1228
|
+
{ id: "browser-session-panel", data: { connected: false, latest: { title: "Fixture" }, error: "Chrome DevTools returned HTTP 503" } },
|
|
1229
|
+
]);
|
|
1230
|
+
} finally {
|
|
1231
|
+
globalThis.fetch = originalFetch;
|
|
1232
|
+
globalThis.WebSocket = OriginalWebSocket;
|
|
1233
|
+
await context.fiber.dispose();
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
});
|