@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
|
@@ -1,28 +1,470 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
|
-
import { basename } from "node:path";
|
|
3
2
|
import z from "@deepseek-ai/schemastery";
|
|
4
3
|
import { Type } from "@earendil-works/pi-ai";
|
|
5
4
|
import { defineTool } from "@earendil-works/pi-coding-agent";
|
|
5
|
+
import packageMetadata from "../../package.json" with { type: "json" };
|
|
6
|
+
import { assertKnownConfigKeys } from "../config.js";
|
|
6
7
|
export const Config = z.object({
|
|
7
8
|
servers: z.array(z.object({ id: z.string(), command: z.array(z.string()), autoStart: z.boolean().default(false) })).default([]),
|
|
8
9
|
});
|
|
9
10
|
const shellCommands = new Set(["sh", "bash", "zsh", "fish", "cmd", "powershell", "pwsh"]);
|
|
10
11
|
const maxCommandArgs = 32;
|
|
11
12
|
const maxArgumentBytes = 4096;
|
|
13
|
+
const maxToolArgumentsBytes = 64 * 1024;
|
|
14
|
+
const maxToolArgumentDepth = 32;
|
|
15
|
+
const maxResponseBytes = 1024 * 1024;
|
|
16
|
+
const maxInventoryItems = 1000;
|
|
17
|
+
const maxPaginationPages = 100;
|
|
18
|
+
const maxManagedServers = 128;
|
|
19
|
+
const maxStderrBytes = 8192;
|
|
12
20
|
const requestTimeoutMs = 30_000;
|
|
21
|
+
const maxPanelItems = 20;
|
|
22
|
+
const clientVersion = packageMetadata.version;
|
|
23
|
+
const disposedMessage = "MCP client plugin disposed";
|
|
24
|
+
const connectionParameterNames = new Set(["command", "serverId"]);
|
|
25
|
+
const callParameterNames = new Set(["command", "serverId", "name", "arguments"]);
|
|
26
|
+
const stopParameterNames = new Set(["serverId"]);
|
|
27
|
+
const readResourceParameterNames = new Set(["command", "serverId", "uri"]);
|
|
28
|
+
const noParameterNames = new Set();
|
|
29
|
+
const utf8Decoder = new TextDecoder("utf-8", { fatal: true });
|
|
30
|
+
function decodeFrame(value) {
|
|
31
|
+
try {
|
|
32
|
+
return utf8Decoder.decode(value);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
throw new Error("MCP server response must contain valid UTF-8", { cause: error });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function inspectParameters(value, allowed) {
|
|
39
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
40
|
+
throw new Error("MCP parameters must be an object");
|
|
41
|
+
try {
|
|
42
|
+
const prototype = Object.getPrototypeOf(value);
|
|
43
|
+
if (prototype !== Object.prototype && prototype !== null)
|
|
44
|
+
throw new Error("MCP parameters must be a plain object");
|
|
45
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
46
|
+
if (Reflect.ownKeys(descriptors).some((key) => typeof key !== "string" || !allowed.has(key)))
|
|
47
|
+
throw new Error("MCP parameters contain an unknown property");
|
|
48
|
+
if (Object.values(descriptors).some((descriptor) => !("value" in descriptor)))
|
|
49
|
+
throw new Error("MCP parameters must use data properties");
|
|
50
|
+
return Object.fromEntries(Object.entries(descriptors).map(([key, descriptor]) => [key, descriptor.value]));
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
if (error instanceof Error &&
|
|
54
|
+
/^(?:MCP parameters must be a plain object|MCP parameters contain an unknown property|MCP parameters must use data properties)$/u.test(error.message))
|
|
55
|
+
throw error;
|
|
56
|
+
throw new Error("MCP parameters must be an accessible plain object", { cause: error });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function optionalString(value, field) {
|
|
60
|
+
if (value === undefined)
|
|
61
|
+
return undefined;
|
|
62
|
+
if (typeof value !== "string")
|
|
63
|
+
throw new Error(`MCP ${field} must be a string`);
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
function requiredString(value, field) {
|
|
67
|
+
const result = optionalString(value, field);
|
|
68
|
+
if (result === undefined)
|
|
69
|
+
throw new Error(`MCP ${field} is required`);
|
|
70
|
+
return result;
|
|
71
|
+
}
|
|
72
|
+
function serverIdValue(value, required = false) {
|
|
73
|
+
const result = optionalString(value, "serverId");
|
|
74
|
+
if (result === undefined) {
|
|
75
|
+
if (required)
|
|
76
|
+
throw new Error("MCP serverId is required");
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
if (!/^[a-z0-9][a-z0-9_-]{0,63}$/iu.test(result))
|
|
80
|
+
throw new Error("MCP serverId must use 1-64 letters, numbers, _ or -");
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
function boundedInput(value, field, maximum) {
|
|
84
|
+
if (value.includes("\0"))
|
|
85
|
+
throw new Error(`MCP ${field} must not contain NUL characters`);
|
|
86
|
+
if (value.length === 0 || value.length > maximum)
|
|
87
|
+
throw new Error(`MCP ${field} must contain 1-${maximum} characters`);
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
function rejectAmbiguousTarget(command, serverId) {
|
|
91
|
+
if (command !== undefined && serverId !== undefined)
|
|
92
|
+
throw new Error("Provide either command or serverId, not both");
|
|
93
|
+
}
|
|
94
|
+
function optionalCommand(value) {
|
|
95
|
+
if (value === undefined)
|
|
96
|
+
return undefined;
|
|
97
|
+
if (!Array.isArray(value))
|
|
98
|
+
throw new Error("MCP command must be an array of strings");
|
|
99
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
100
|
+
const length = descriptors.length?.value;
|
|
101
|
+
if (typeof length !== "number" || !Number.isSafeInteger(length) || length < 0)
|
|
102
|
+
throw new Error("MCP command must be a dense array of string data properties");
|
|
103
|
+
const result = [];
|
|
104
|
+
for (let index = 0; index < length; index += 1) {
|
|
105
|
+
const descriptor = descriptors[String(index)];
|
|
106
|
+
if (descriptor === undefined || !("value" in descriptor) || typeof descriptor.value !== "string")
|
|
107
|
+
throw new Error("MCP command must be a dense array of string data properties");
|
|
108
|
+
result.push(descriptor.value);
|
|
109
|
+
}
|
|
110
|
+
if (Reflect.ownKeys(descriptors).some((key) => typeof key !== "string" || (key !== "length" && !/^(0|[1-9]\d*)$/u.test(key))))
|
|
111
|
+
throw new Error("MCP command contains an unknown property");
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
function jsonObject(value) {
|
|
115
|
+
if (value === undefined)
|
|
116
|
+
return {};
|
|
117
|
+
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
118
|
+
throw new Error("MCP arguments must be a JSON object");
|
|
119
|
+
const result = cloneJsonValue(value, new Set(), 0);
|
|
120
|
+
if (Buffer.byteLength(JSON.stringify(result), "utf8") > maxToolArgumentsBytes)
|
|
121
|
+
throw new Error("MCP arguments cannot exceed 64 KiB");
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
function promptArguments(value) {
|
|
125
|
+
const result = jsonObject(value);
|
|
126
|
+
if (Object.values(result).some((item) => typeof item !== "string"))
|
|
127
|
+
throw new Error("MCP prompt arguments must contain string values");
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
function cloneJsonValue(value, ancestors, depth) {
|
|
131
|
+
if (value === null || typeof value === "string" || typeof value === "boolean")
|
|
132
|
+
return value;
|
|
133
|
+
if (typeof value === "number") {
|
|
134
|
+
if (!Number.isFinite(value))
|
|
135
|
+
throw new Error("MCP arguments must contain finite JSON numbers");
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
if (typeof value !== "object")
|
|
139
|
+
throw new Error("MCP arguments must contain only JSON values");
|
|
140
|
+
if (depth > maxToolArgumentDepth)
|
|
141
|
+
throw new Error(`MCP arguments cannot exceed ${maxToolArgumentDepth} levels of nesting`);
|
|
142
|
+
if (ancestors.has(value))
|
|
143
|
+
throw new Error("MCP arguments must not contain circular references");
|
|
144
|
+
ancestors.add(value);
|
|
145
|
+
try {
|
|
146
|
+
const descriptors = Object.getOwnPropertyDescriptors(value);
|
|
147
|
+
if (Object.values(descriptors).some((descriptor) => !("value" in descriptor)))
|
|
148
|
+
throw new Error("MCP arguments must use data properties");
|
|
149
|
+
if (Reflect.ownKeys(descriptors).some((key) => typeof key !== "string"))
|
|
150
|
+
throw new Error("MCP arguments cannot contain symbol properties");
|
|
151
|
+
if (Array.isArray(value)) {
|
|
152
|
+
const length = descriptors.length?.value;
|
|
153
|
+
if (typeof length !== "number" || !Number.isSafeInteger(length) || length < 0)
|
|
154
|
+
throw new Error("MCP argument arrays must be dense");
|
|
155
|
+
const result = [];
|
|
156
|
+
for (let index = 0; index < length; index += 1) {
|
|
157
|
+
const descriptor = descriptors[String(index)];
|
|
158
|
+
if (descriptor === undefined || !("value" in descriptor))
|
|
159
|
+
throw new Error("MCP argument arrays must be dense");
|
|
160
|
+
result.push(cloneJsonValue(descriptor.value, ancestors, depth + 1));
|
|
161
|
+
}
|
|
162
|
+
if (Object.keys(descriptors).some((key) => key !== "length" && !/^(0|[1-9]\d*)$/u.test(key)))
|
|
163
|
+
throw new Error("MCP argument arrays contain an unknown property");
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
const result = {};
|
|
167
|
+
for (const [key, descriptor] of Object.entries(descriptors)) {
|
|
168
|
+
if (descriptor.enumerable !== true)
|
|
169
|
+
continue;
|
|
170
|
+
result[key] = cloneJsonValue(descriptor.value, ancestors, depth + 1);
|
|
171
|
+
}
|
|
172
|
+
return result;
|
|
173
|
+
}
|
|
174
|
+
finally {
|
|
175
|
+
ancestors.delete(value);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function executionSignal(signal, lifecycle) {
|
|
179
|
+
return signal === undefined ? lifecycle : AbortSignal.any([signal, lifecycle]);
|
|
180
|
+
}
|
|
181
|
+
function clone(value) {
|
|
182
|
+
return structuredClone(value);
|
|
183
|
+
}
|
|
184
|
+
function appendByteTail(current, chunk, maximum) {
|
|
185
|
+
const combined = Buffer.concat([current, chunk]);
|
|
186
|
+
return combined.byteLength <= maximum ? combined : combined.subarray(combined.byteLength - maximum);
|
|
187
|
+
}
|
|
188
|
+
function toolInventory(value) {
|
|
189
|
+
if (!Array.isArray(value))
|
|
190
|
+
throw new Error("MCP server returned an invalid MCP tools inventory");
|
|
191
|
+
if (value.length > maxInventoryItems)
|
|
192
|
+
throw new Error(`MCP remote inventory cannot exceed ${maxInventoryItems} items`);
|
|
193
|
+
return value.map((item) => {
|
|
194
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
195
|
+
throw new Error("MCP server returned an invalid MCP tool descriptor");
|
|
196
|
+
const raw = item;
|
|
197
|
+
if (typeof raw.name !== "string" || raw.name.length === 0 || raw.name.length > 512 || raw.name.includes("\0"))
|
|
198
|
+
throw new Error("MCP server returned an invalid MCP tool descriptor");
|
|
199
|
+
if (raw.description !== undefined && (typeof raw.description !== "string" || raw.description.length > 8192))
|
|
200
|
+
throw new Error("MCP server returned an invalid MCP tool descriptor");
|
|
201
|
+
if (raw.inputSchema === null || typeof raw.inputSchema !== "object" || Array.isArray(raw.inputSchema))
|
|
202
|
+
throw new Error("MCP server returned an invalid MCP tool descriptor");
|
|
203
|
+
return {
|
|
204
|
+
name: raw.name,
|
|
205
|
+
...(raw.description === undefined ? {} : { description: raw.description }),
|
|
206
|
+
inputSchema: clone(raw.inputSchema),
|
|
207
|
+
};
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function resourceInventory(value) {
|
|
211
|
+
if (!Array.isArray(value))
|
|
212
|
+
throw new Error("MCP server returned an invalid MCP resources inventory");
|
|
213
|
+
if (value.length > maxInventoryItems)
|
|
214
|
+
throw new Error(`MCP remote inventory cannot exceed ${maxInventoryItems} items`);
|
|
215
|
+
return value.map((item) => {
|
|
216
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
217
|
+
throw new Error("MCP server returned an invalid MCP resource descriptor");
|
|
218
|
+
const raw = item;
|
|
219
|
+
if (typeof raw.uri !== "string" || raw.uri.length === 0 || raw.uri.length > 4096 || raw.uri.includes("\0"))
|
|
220
|
+
throw new Error("MCP server returned an invalid MCP resource descriptor");
|
|
221
|
+
if (typeof raw.name !== "string" || raw.name.length === 0 || raw.name.length > 512 || raw.name.includes("\0"))
|
|
222
|
+
throw new Error("MCP server returned an invalid MCP resource descriptor");
|
|
223
|
+
if (raw.description !== undefined && (typeof raw.description !== "string" || raw.description.length > 8192))
|
|
224
|
+
throw new Error("MCP server returned an invalid MCP resource descriptor");
|
|
225
|
+
if (raw.mimeType !== undefined && (typeof raw.mimeType !== "string" || raw.mimeType.length > 256))
|
|
226
|
+
throw new Error("MCP server returned an invalid MCP resource descriptor");
|
|
227
|
+
return {
|
|
228
|
+
uri: raw.uri,
|
|
229
|
+
name: raw.name,
|
|
230
|
+
...(raw.description === undefined ? {} : { description: raw.description }),
|
|
231
|
+
...(raw.mimeType === undefined ? {} : { mimeType: raw.mimeType }),
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function promptInventory(value) {
|
|
236
|
+
if (!Array.isArray(value))
|
|
237
|
+
throw new Error("MCP server returned an invalid MCP prompts inventory");
|
|
238
|
+
if (value.length > maxInventoryItems)
|
|
239
|
+
throw new Error(`MCP remote inventory cannot exceed ${maxInventoryItems} items`);
|
|
240
|
+
return value.map((item) => {
|
|
241
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
242
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
243
|
+
const raw = item;
|
|
244
|
+
if (typeof raw.name !== "string" || raw.name.length === 0 || raw.name.length > 512 || raw.name.includes("\0"))
|
|
245
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
246
|
+
if (raw.description !== undefined && (typeof raw.description !== "string" || raw.description.length > 8192))
|
|
247
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
248
|
+
if (raw.arguments !== undefined && !Array.isArray(raw.arguments))
|
|
249
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
250
|
+
if (Array.isArray(raw.arguments) && raw.arguments.length > 128)
|
|
251
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
252
|
+
const argumentsValue = Array.isArray(raw.arguments)
|
|
253
|
+
? raw.arguments.map((argument) => {
|
|
254
|
+
if (argument === null || typeof argument !== "object" || Array.isArray(argument))
|
|
255
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
256
|
+
const candidate = argument;
|
|
257
|
+
if (typeof candidate.name !== "string" || candidate.name.length === 0 || candidate.name.length > 512)
|
|
258
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
259
|
+
if (candidate.description !== undefined && (typeof candidate.description !== "string" || candidate.description.length > 8192))
|
|
260
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
261
|
+
if (candidate.required !== undefined && typeof candidate.required !== "boolean")
|
|
262
|
+
throw new Error("MCP server returned an invalid MCP prompt descriptor");
|
|
263
|
+
return {
|
|
264
|
+
name: candidate.name,
|
|
265
|
+
...(candidate.description === undefined ? {} : { description: candidate.description }),
|
|
266
|
+
...(candidate.required === undefined ? {} : { required: candidate.required }),
|
|
267
|
+
};
|
|
268
|
+
})
|
|
269
|
+
: undefined;
|
|
270
|
+
return {
|
|
271
|
+
name: raw.name,
|
|
272
|
+
...(raw.description === undefined ? {} : { description: raw.description }),
|
|
273
|
+
...(argumentsValue === undefined ? {} : { arguments: argumentsValue }),
|
|
274
|
+
};
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function paginationCursor(value) {
|
|
278
|
+
if (value === undefined)
|
|
279
|
+
return undefined;
|
|
280
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 4096 || value.includes("\0"))
|
|
281
|
+
throw new Error("MCP server returned an invalid pagination cursor");
|
|
282
|
+
return value;
|
|
283
|
+
}
|
|
284
|
+
async function paginatedInventory(method, field, requestPage, validate) {
|
|
285
|
+
const result = [];
|
|
286
|
+
const seenCursors = new Set();
|
|
287
|
+
let cursor;
|
|
288
|
+
for (let page = 0; page < maxPaginationPages; page += 1) {
|
|
289
|
+
const response = await requestPage(cursor === undefined ? undefined : { cursor });
|
|
290
|
+
const pageItems = validate(response[field]);
|
|
291
|
+
if (result.length + pageItems.length > maxInventoryItems)
|
|
292
|
+
throw new Error(`MCP remote inventory cannot exceed ${maxInventoryItems} items`);
|
|
293
|
+
result.push(...pageItems);
|
|
294
|
+
const nextCursor = paginationCursor(response.nextCursor);
|
|
295
|
+
if (nextCursor === undefined)
|
|
296
|
+
return result;
|
|
297
|
+
if (seenCursors.has(nextCursor))
|
|
298
|
+
throw new Error(`MCP server repeated a pagination cursor for ${method}`);
|
|
299
|
+
seenCursors.add(nextCursor);
|
|
300
|
+
cursor = nextCursor;
|
|
301
|
+
}
|
|
302
|
+
throw new Error(`MCP ${method} pagination cannot exceed ${maxPaginationPages} pages`);
|
|
303
|
+
}
|
|
304
|
+
function requiredRemoteString(value, message, maximum = maxResponseBytes) {
|
|
305
|
+
if (typeof value !== "string" || value.length > maximum || value.includes("\0"))
|
|
306
|
+
throw new Error(message);
|
|
307
|
+
return value;
|
|
308
|
+
}
|
|
309
|
+
function base64RemoteString(value, message) {
|
|
310
|
+
const result = requiredRemoteString(value, message);
|
|
311
|
+
if (!/^(?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/u.test(result))
|
|
312
|
+
throw new Error(message);
|
|
313
|
+
return result;
|
|
314
|
+
}
|
|
315
|
+
function toolResultContent(result) {
|
|
316
|
+
if (!Array.isArray(result.content) || result.content.length > maxInventoryItems)
|
|
317
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
318
|
+
if (result.isError !== undefined && typeof result.isError !== "boolean")
|
|
319
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
320
|
+
return result.content.map((item) => {
|
|
321
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
322
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
323
|
+
const raw = item;
|
|
324
|
+
if (raw.type === "text") {
|
|
325
|
+
return { type: "text", text: requiredRemoteString(raw.text, "MCP server returned invalid MCP tool result content") };
|
|
326
|
+
}
|
|
327
|
+
if (raw.type === "image") {
|
|
328
|
+
const data = base64RemoteString(raw.data, "MCP server returned invalid MCP tool result content");
|
|
329
|
+
const mimeType = requiredRemoteString(raw.mimeType, "MCP server returned invalid MCP tool result content", 256);
|
|
330
|
+
if (!mimeType.startsWith("image/"))
|
|
331
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
332
|
+
return { type: "image", data, mimeType };
|
|
333
|
+
}
|
|
334
|
+
if (raw.type === "audio") {
|
|
335
|
+
const mimeType = requiredRemoteString(raw.mimeType, "MCP server returned invalid MCP tool result content", 256);
|
|
336
|
+
base64RemoteString(raw.data, "MCP server returned invalid MCP tool result content");
|
|
337
|
+
return { type: "text", text: `[MCP audio content omitted: ${mimeType}]` };
|
|
338
|
+
}
|
|
339
|
+
if (raw.type === "resource") {
|
|
340
|
+
if (raw.resource === null || typeof raw.resource !== "object" || Array.isArray(raw.resource))
|
|
341
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
342
|
+
const resource = raw.resource;
|
|
343
|
+
const uri = requiredRemoteString(resource.uri, "MCP server returned invalid MCP tool result content", 4096);
|
|
344
|
+
if (typeof resource.text === "string")
|
|
345
|
+
return { type: "text", text: resource.text };
|
|
346
|
+
if (typeof resource.blob === "string") {
|
|
347
|
+
const blob = base64RemoteString(resource.blob, "MCP server returned invalid MCP tool result content");
|
|
348
|
+
const mimeType = resource.mimeType === undefined ? undefined : requiredRemoteString(resource.mimeType, "MCP server returned invalid MCP tool result content", 256);
|
|
349
|
+
return mimeType?.startsWith("image/") === true
|
|
350
|
+
? { type: "image", data: blob, mimeType }
|
|
351
|
+
: { type: "text", text: `[MCP binary resource omitted: ${uri} (${mimeType ?? "unknown MIME type"})]` };
|
|
352
|
+
}
|
|
353
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
354
|
+
}
|
|
355
|
+
if (raw.type === "resource_link") {
|
|
356
|
+
const uri = requiredRemoteString(raw.uri, "MCP server returned invalid MCP tool result content", 4096);
|
|
357
|
+
const name = raw.name === undefined ? uri : requiredRemoteString(raw.name, "MCP server returned invalid MCP tool result content", 512);
|
|
358
|
+
return { type: "text", text: `[MCP resource: ${name} — ${uri}]` };
|
|
359
|
+
}
|
|
360
|
+
throw new Error("MCP server returned invalid MCP tool result content");
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
function validateInitializeResult(result) {
|
|
364
|
+
if (result.protocolVersion !== "2025-06-18" ||
|
|
365
|
+
result.capabilities === null ||
|
|
366
|
+
typeof result.capabilities !== "object" ||
|
|
367
|
+
Array.isArray(result.capabilities) ||
|
|
368
|
+
result.serverInfo === null ||
|
|
369
|
+
typeof result.serverInfo !== "object" ||
|
|
370
|
+
Array.isArray(result.serverInfo))
|
|
371
|
+
throw new Error("MCP server returned an invalid MCP initialize result");
|
|
372
|
+
const serverInfo = result.serverInfo;
|
|
373
|
+
if (typeof serverInfo.name !== "string" ||
|
|
374
|
+
serverInfo.name.length === 0 ||
|
|
375
|
+
serverInfo.name.length > 512 ||
|
|
376
|
+
typeof serverInfo.version !== "string" ||
|
|
377
|
+
serverInfo.version.length === 0 ||
|
|
378
|
+
serverInfo.version.length > 512 ||
|
|
379
|
+
(result.instructions !== undefined && (typeof result.instructions !== "string" || result.instructions.length > 65_536)))
|
|
380
|
+
throw new Error("MCP server returned an invalid MCP initialize result");
|
|
381
|
+
}
|
|
382
|
+
function resourceResultContent(result) {
|
|
383
|
+
if (!Array.isArray(result.contents) || result.contents.length > maxInventoryItems)
|
|
384
|
+
throw new Error("MCP server returned invalid MCP resource contents");
|
|
385
|
+
return result.contents.map((item) => {
|
|
386
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
387
|
+
throw new Error("MCP server returned invalid MCP resource contents");
|
|
388
|
+
const raw = item;
|
|
389
|
+
const uri = requiredRemoteString(raw.uri, "MCP server returned invalid MCP resource contents", 4096);
|
|
390
|
+
if (typeof raw.text === "string")
|
|
391
|
+
return { type: "text", text: raw.text };
|
|
392
|
+
if (typeof raw.blob === "string") {
|
|
393
|
+
const blob = base64RemoteString(raw.blob, "MCP server returned invalid MCP resource contents");
|
|
394
|
+
const mimeType = raw.mimeType === undefined ? undefined : requiredRemoteString(raw.mimeType, "MCP server returned invalid MCP resource contents", 256);
|
|
395
|
+
return mimeType?.startsWith("image/") === true
|
|
396
|
+
? { type: "image", data: blob, mimeType }
|
|
397
|
+
: { type: "text", text: `[MCP binary resource omitted: ${uri} (${mimeType ?? "unknown MIME type"})]` };
|
|
398
|
+
}
|
|
399
|
+
throw new Error("MCP server returned invalid MCP resource contents");
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
function promptResultContent(result) {
|
|
403
|
+
if (result.description !== undefined && (typeof result.description !== "string" || result.description.length > 8192))
|
|
404
|
+
throw new Error("MCP server returned invalid MCP prompt messages");
|
|
405
|
+
if (!Array.isArray(result.messages) || result.messages.length > maxInventoryItems)
|
|
406
|
+
throw new Error("MCP server returned invalid MCP prompt messages");
|
|
407
|
+
return result.messages.flatMap((item) => {
|
|
408
|
+
if (item === null || typeof item !== "object" || Array.isArray(item))
|
|
409
|
+
throw new Error("MCP server returned invalid MCP prompt messages");
|
|
410
|
+
const raw = item;
|
|
411
|
+
const role = raw.role;
|
|
412
|
+
if (role !== "user" && role !== "assistant")
|
|
413
|
+
throw new Error("MCP server returned invalid MCP prompt messages");
|
|
414
|
+
const normalized = toolResultContent({ content: [raw.content] });
|
|
415
|
+
return normalized.flatMap((content) => content.type === "text" ? [{ type: "text", text: `[${role}]\n${content.text}` }] : [{ type: "text", text: `[${role}]` }, content]);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
13
418
|
function validateCommand(command) {
|
|
14
419
|
if (command.length === 0)
|
|
15
420
|
throw new Error("MCP server command cannot be empty");
|
|
16
421
|
if (command.length > maxCommandArgs)
|
|
17
422
|
throw new Error(`MCP server command cannot exceed ${maxCommandArgs} arguments`);
|
|
423
|
+
if (command.some((part) => part.includes("\0")))
|
|
424
|
+
throw new Error("MCP server command arguments must not contain NUL characters");
|
|
18
425
|
if (command.some((part) => part.length === 0 || Buffer.byteLength(part) > maxArgumentBytes))
|
|
19
426
|
throw new Error("MCP server command contains an invalid argument");
|
|
20
|
-
|
|
427
|
+
const executable = executableName(command)
|
|
428
|
+
.toLowerCase()
|
|
429
|
+
.replace(/\.(?:exe|cmd|bat|com)$/u, "");
|
|
430
|
+
if (shellCommands.has(executable))
|
|
21
431
|
throw new Error("MCP shell wrappers are not allowed; pass an executable argv directly");
|
|
22
432
|
}
|
|
433
|
+
function executableName(command) {
|
|
434
|
+
return (command[0] ?? "").replaceAll("\\", "/").split("/").pop() ?? "";
|
|
435
|
+
}
|
|
436
|
+
function serverLabel(command) {
|
|
437
|
+
const count = Math.max(0, command.length - 1);
|
|
438
|
+
return `${executableName(command)}${count === 0 ? "" : ` (+${count} ${count === 1 ? "arg" : "args"})`}`;
|
|
439
|
+
}
|
|
23
440
|
function encodeMessage(message) {
|
|
24
|
-
|
|
25
|
-
|
|
441
|
+
return Buffer.from(`${JSON.stringify(message)}\n`, "utf8");
|
|
442
|
+
}
|
|
443
|
+
function waitForChildClose(child, timeoutMs) {
|
|
444
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
445
|
+
return Promise.resolve(true);
|
|
446
|
+
return new Promise((resolve) => {
|
|
447
|
+
const onClose = () => finish(true);
|
|
448
|
+
const timer = setTimeout(() => finish(false), timeoutMs);
|
|
449
|
+
timer.unref();
|
|
450
|
+
const finish = (closed) => {
|
|
451
|
+
clearTimeout(timer);
|
|
452
|
+
child.off("close", onClose);
|
|
453
|
+
resolve(closed);
|
|
454
|
+
};
|
|
455
|
+
child.once("close", onClose);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
async function terminateChild(child) {
|
|
459
|
+
if (!child.stdin.destroyed && !child.stdin.writableEnded)
|
|
460
|
+
child.stdin.end();
|
|
461
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
462
|
+
return;
|
|
463
|
+
child.kill("SIGTERM");
|
|
464
|
+
if (await waitForChildClose(child, 250))
|
|
465
|
+
return;
|
|
466
|
+
child.kill("SIGKILL");
|
|
467
|
+
await waitForChildClose(child, 500);
|
|
26
468
|
}
|
|
27
469
|
function parseFrames(buffer) {
|
|
28
470
|
const messages = [];
|
|
@@ -37,10 +479,12 @@ function parseFrames(buffer) {
|
|
|
37
479
|
if (match === null)
|
|
38
480
|
throw new Error("MCP server returned an invalid Content-Length header");
|
|
39
481
|
const length = Number(match[1]);
|
|
482
|
+
if (!Number.isSafeInteger(length) || length > maxResponseBytes)
|
|
483
|
+
throw new Error("MCP server response exceeded the 1 MiB limit");
|
|
40
484
|
const bodyStart = separator + 4;
|
|
41
485
|
if (rest.length < bodyStart + length)
|
|
42
486
|
break;
|
|
43
|
-
const body = rest.subarray(bodyStart, bodyStart + length)
|
|
487
|
+
const body = decodeFrame(rest.subarray(bodyStart, bodyStart + length));
|
|
44
488
|
const message = JSON.parse(body);
|
|
45
489
|
if (typeof message === "object" && message !== null)
|
|
46
490
|
messages.push(message);
|
|
@@ -50,7 +494,7 @@ function parseFrames(buffer) {
|
|
|
50
494
|
const newline = rest.indexOf(10);
|
|
51
495
|
if (newline < 0)
|
|
52
496
|
break;
|
|
53
|
-
const line = rest.subarray(0, newline)
|
|
497
|
+
const line = decodeFrame(rest.subarray(0, newline)).trim();
|
|
54
498
|
rest = rest.subarray(newline + 1);
|
|
55
499
|
if (line === "")
|
|
56
500
|
continue;
|
|
@@ -65,81 +509,201 @@ function parseFrames(buffer) {
|
|
|
65
509
|
}
|
|
66
510
|
return { messages, rest };
|
|
67
511
|
}
|
|
68
|
-
|
|
512
|
+
function cancellationError(method, reason) {
|
|
513
|
+
if (reason instanceof Error && reason.message === disposedMessage)
|
|
514
|
+
return reason;
|
|
515
|
+
return new Error(`MCP request was cancelled: ${method}${reason instanceof Error ? ` (${reason.message})` : ""}`, { cause: reason });
|
|
516
|
+
}
|
|
517
|
+
function withCancellation(operation, signal, method) {
|
|
518
|
+
if (signal === undefined)
|
|
519
|
+
return operation;
|
|
520
|
+
if (signal.aborted)
|
|
521
|
+
return Promise.reject(cancellationError(method, signal.reason));
|
|
69
522
|
return new Promise((resolve, reject) => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
523
|
+
const onAbort = () => {
|
|
524
|
+
signal.removeEventListener("abort", onAbort);
|
|
525
|
+
reject(cancellationError(method, signal.reason));
|
|
526
|
+
};
|
|
527
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
528
|
+
void operation.then((value) => {
|
|
529
|
+
signal.removeEventListener("abort", onAbort);
|
|
530
|
+
resolve(value);
|
|
531
|
+
}, (error) => {
|
|
532
|
+
signal.removeEventListener("abort", onAbort);
|
|
533
|
+
reject(error instanceof Error ? error : new Error("MCP operation failed", { cause: error }));
|
|
534
|
+
});
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
const stdioRouters = new WeakMap();
|
|
538
|
+
function responseResult(message) {
|
|
539
|
+
const hasError = Object.hasOwn(message, "error");
|
|
540
|
+
const hasResult = Object.hasOwn(message, "result");
|
|
541
|
+
if (message.jsonrpc !== "2.0" || hasError === hasResult)
|
|
542
|
+
throw new Error("MCP server returned an invalid JSON-RPC response");
|
|
543
|
+
if (hasError) {
|
|
544
|
+
if (typeof message.error !== "object" || message.error === null || Array.isArray(message.error))
|
|
545
|
+
throw new Error("MCP server returned an invalid JSON-RPC response");
|
|
546
|
+
const errorMessage = message.error.message;
|
|
547
|
+
const errorCode = message.error.code;
|
|
548
|
+
if (typeof errorMessage !== "string" || typeof errorCode !== "number" || !Number.isInteger(errorCode))
|
|
549
|
+
throw new Error("MCP server returned an invalid JSON-RPC response");
|
|
550
|
+
throw new Error(errorMessage);
|
|
551
|
+
}
|
|
552
|
+
if (typeof message.result !== "object" || message.result === null || Array.isArray(message.result))
|
|
553
|
+
throw new Error("MCP server returned an invalid response");
|
|
554
|
+
return message.result;
|
|
555
|
+
}
|
|
556
|
+
function stdioRouter(child) {
|
|
557
|
+
const existing = stdioRouters.get(child);
|
|
558
|
+
if (existing !== undefined)
|
|
559
|
+
return existing;
|
|
560
|
+
const router = { buffer: Buffer.alloc(0), pending: new Map() };
|
|
561
|
+
const fail = (error) => {
|
|
562
|
+
if (router.terminalError !== undefined)
|
|
563
|
+
return;
|
|
564
|
+
router.terminalError = error;
|
|
565
|
+
router.buffer = Buffer.alloc(0);
|
|
566
|
+
child.stdout.off("data", onData);
|
|
567
|
+
child.off("error", onError);
|
|
568
|
+
child.off("close", onClose);
|
|
569
|
+
for (const request of [...router.pending.values()])
|
|
570
|
+
request.reject(error);
|
|
571
|
+
};
|
|
572
|
+
const onData = (chunk) => {
|
|
573
|
+
for (const request of [...router.pending.values()]) {
|
|
574
|
+
request.receivedBytes += chunk.byteLength;
|
|
575
|
+
if (request.receivedBytes > maxResponseBytes)
|
|
576
|
+
request.reject(new Error("MCP server response exceeded the 1 MiB limit"));
|
|
577
|
+
}
|
|
578
|
+
if (router.buffer.byteLength + chunk.byteLength > maxResponseBytes) {
|
|
579
|
+
fail(new Error("MCP server response exceeded the 1 MiB limit"));
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
const buffer = router.buffer.byteLength === 0 ? chunk : Buffer.concat([router.buffer, chunk]);
|
|
583
|
+
let parsed;
|
|
584
|
+
try {
|
|
585
|
+
parsed = parseFrames(buffer);
|
|
586
|
+
}
|
|
587
|
+
catch (error) {
|
|
588
|
+
fail(error instanceof Error ? error : new Error("Failed to parse MCP response", { cause: error }));
|
|
589
|
+
return;
|
|
590
|
+
}
|
|
591
|
+
router.buffer = parsed.rest.byteLength === 0 ? Buffer.alloc(0) : Buffer.from(parsed.rest);
|
|
592
|
+
for (const message of parsed.messages) {
|
|
593
|
+
if (typeof message.id !== "number")
|
|
594
|
+
continue;
|
|
595
|
+
const request = router.pending.get(message.id);
|
|
596
|
+
if (request === undefined)
|
|
597
|
+
continue;
|
|
78
598
|
try {
|
|
79
|
-
|
|
599
|
+
request.resolve(responseResult(message));
|
|
80
600
|
}
|
|
81
601
|
catch (error) {
|
|
82
|
-
|
|
83
|
-
reject(error instanceof Error ? error : new Error("Failed to parse MCP response", { cause: error }));
|
|
84
|
-
return;
|
|
602
|
+
request.reject(error instanceof Error ? error : new Error("Failed to validate MCP response", { cause: error }));
|
|
85
603
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
const onError = (error) => fail(error);
|
|
607
|
+
const onClose = (code) => fail(new Error(`MCP server exited before responding${code === null ? "" : ` (code ${code})`}`));
|
|
608
|
+
child.stdout.on("data", onData);
|
|
609
|
+
child.once("error", onError);
|
|
610
|
+
child.once("close", onClose);
|
|
611
|
+
stdioRouters.set(child, router);
|
|
612
|
+
return router;
|
|
613
|
+
}
|
|
614
|
+
async function request(child, id, method, params, signal) {
|
|
615
|
+
if (signal?.aborted === true)
|
|
616
|
+
throw cancellationError(method, signal.reason);
|
|
617
|
+
return new Promise((resolve, reject) => {
|
|
618
|
+
const router = stdioRouter(child);
|
|
619
|
+
if (router.terminalError !== undefined) {
|
|
620
|
+
reject(router.terminalError);
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
if (router.pending.has(id)) {
|
|
624
|
+
reject(new Error(`MCP request id is already pending: ${id}`));
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
let settled = false;
|
|
628
|
+
let sent = false;
|
|
629
|
+
const sendCancellation = (reason) => {
|
|
630
|
+
if (!sent || method === "initialize" || child.stdin.destroyed || child.stdin.writableEnded)
|
|
99
631
|
return;
|
|
632
|
+
try {
|
|
633
|
+
child.stdin.write(encodeMessage({ jsonrpc: "2.0", method: "notifications/cancelled", params: { requestId: id, reason } }), () => undefined);
|
|
634
|
+
}
|
|
635
|
+
catch {
|
|
636
|
+
// The original timeout or cancellation remains the actionable error.
|
|
100
637
|
}
|
|
101
638
|
};
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
639
|
+
const timer = setTimeout(() => {
|
|
640
|
+
sendCancellation(`MCP request timed out: ${method}`);
|
|
641
|
+
rejectRequest(new Error(`MCP request timed out: ${method}`));
|
|
642
|
+
}, requestTimeoutMs);
|
|
643
|
+
timer.unref();
|
|
644
|
+
const onAbort = () => {
|
|
645
|
+
sendCancellation(signal?.reason instanceof Error ? signal.reason.message : "MCP client request cancelled");
|
|
646
|
+
rejectRequest(cancellationError(method, signal?.reason));
|
|
109
647
|
};
|
|
110
648
|
const cleanup = () => {
|
|
111
649
|
clearTimeout(timer);
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
child.off("close", onClose);
|
|
650
|
+
router.pending.delete(id);
|
|
651
|
+
signal?.removeEventListener("abort", onAbort);
|
|
115
652
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
653
|
+
const resolveRequest = (value) => {
|
|
654
|
+
if (settled)
|
|
655
|
+
return;
|
|
656
|
+
settled = true;
|
|
657
|
+
cleanup();
|
|
658
|
+
resolve(value);
|
|
659
|
+
};
|
|
660
|
+
const rejectRequest = (error) => {
|
|
661
|
+
if (settled)
|
|
662
|
+
return;
|
|
663
|
+
settled = true;
|
|
664
|
+
cleanup();
|
|
665
|
+
reject(error);
|
|
666
|
+
};
|
|
667
|
+
router.pending.set(id, { receivedBytes: 0, resolve: resolveRequest, reject: rejectRequest });
|
|
668
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
669
|
+
try {
|
|
670
|
+
child.stdin.write(encodeMessage({ jsonrpc: "2.0", id, method, ...(params === undefined ? {} : { params }) }), (error) => {
|
|
671
|
+
if (error === null || error === undefined)
|
|
672
|
+
return;
|
|
673
|
+
rejectRequest(error);
|
|
674
|
+
});
|
|
675
|
+
sent = true;
|
|
676
|
+
}
|
|
677
|
+
catch (error) {
|
|
678
|
+
rejectRequest(error instanceof Error ? error : new Error("Failed to write MCP request", { cause: error }));
|
|
679
|
+
}
|
|
120
680
|
});
|
|
121
681
|
}
|
|
122
|
-
async function withServer(command, cwd, callback) {
|
|
682
|
+
async function withServer(command, cwd, callback, signal) {
|
|
123
683
|
validateCommand(command);
|
|
684
|
+
if (signal?.aborted === true)
|
|
685
|
+
throw cancellationError("initialize", signal.reason);
|
|
124
686
|
const child = spawn(command[0], command.slice(1), { cwd, shell: false, stdio: ["pipe", "pipe", "pipe"] });
|
|
125
|
-
let stderr =
|
|
126
|
-
child.stderr.setEncoding("utf8");
|
|
687
|
+
let stderr = Buffer.alloc(0);
|
|
127
688
|
child.stderr.on("data", (chunk) => {
|
|
128
|
-
stderr =
|
|
689
|
+
stderr = appendByteTail(stderr, chunk, maxStderrBytes);
|
|
129
690
|
});
|
|
130
691
|
try {
|
|
131
|
-
await request(child, 1, "initialize", { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "pi-harness", version:
|
|
692
|
+
const initializeResult = await request(child, 1, "initialize", { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "pi-harness", version: clientVersion } }, signal);
|
|
693
|
+
validateInitializeResult(initializeResult);
|
|
132
694
|
child.stdin.write(encodeMessage({ jsonrpc: "2.0", method: "notifications/initialized" }));
|
|
133
695
|
return await callback(child);
|
|
134
696
|
}
|
|
135
697
|
catch (error) {
|
|
136
|
-
if (error instanceof Error &&
|
|
137
|
-
throw
|
|
698
|
+
if (error instanceof Error && error.message === disposedMessage)
|
|
699
|
+
throw error;
|
|
700
|
+
const stderrText = stderr.toString("utf8").trim();
|
|
701
|
+
if (error instanceof Error && stderrText !== "")
|
|
702
|
+
throw new Error(`${error.message}: ${stderrText}`, { cause: error });
|
|
138
703
|
throw error;
|
|
139
704
|
}
|
|
140
705
|
finally {
|
|
141
|
-
child
|
|
142
|
-
child.kill();
|
|
706
|
+
await terminateChild(child);
|
|
143
707
|
}
|
|
144
708
|
}
|
|
145
709
|
export default {
|
|
@@ -147,28 +711,70 @@ export default {
|
|
|
147
711
|
inject: ["piHarnessLaunch", "piPluginUi", "piTools"],
|
|
148
712
|
Config,
|
|
149
713
|
async apply(context, config) {
|
|
714
|
+
assertKnownConfigKeys("pi-mcp-client", config, ["servers"]);
|
|
715
|
+
const lifecycle = new AbortController();
|
|
150
716
|
let latest;
|
|
717
|
+
let latestKey;
|
|
718
|
+
const previousFor = (key) => (latestKey === key ? latest : undefined);
|
|
719
|
+
const publishLatest = (key, value) => {
|
|
720
|
+
latestKey = key;
|
|
721
|
+
latest = clone(value);
|
|
722
|
+
return clone(value);
|
|
723
|
+
};
|
|
151
724
|
const servers = new Map();
|
|
725
|
+
const startingServers = new Set();
|
|
726
|
+
const unregisters = [];
|
|
727
|
+
const registerTool = (definition) => {
|
|
728
|
+
try {
|
|
729
|
+
const unregister = context.piTools.register(definition);
|
|
730
|
+
unregisters.push(unregister);
|
|
731
|
+
return unregister;
|
|
732
|
+
}
|
|
733
|
+
catch (error) {
|
|
734
|
+
for (const unregister of unregisters.splice(0).reverse())
|
|
735
|
+
unregister();
|
|
736
|
+
lifecycle.abort(new Error("MCP client plugin activation failed", { cause: error }));
|
|
737
|
+
throw error;
|
|
738
|
+
}
|
|
739
|
+
};
|
|
152
740
|
const configured = new Map();
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
741
|
+
const definitions = config.servers ?? [];
|
|
742
|
+
if (definitions.length > maxManagedServers)
|
|
743
|
+
throw new Error(`MCP configured inventory cannot exceed ${maxManagedServers} servers`);
|
|
744
|
+
for (const definition of definitions) {
|
|
745
|
+
const id = serverIdValue(definition.id, true);
|
|
746
|
+
if (configured.has(id))
|
|
747
|
+
throw new Error(`Configured MCP server id is duplicated: ${id}`);
|
|
158
748
|
validateCommand(definition.command);
|
|
159
|
-
configured.set(
|
|
749
|
+
configured.set(id, { id, command: [...definition.command], autoStart: definition.autoStart === true });
|
|
160
750
|
}
|
|
161
751
|
let nextServerId = 1;
|
|
162
|
-
const startServer = async (command, requestedId) => {
|
|
752
|
+
const startServer = async (command, requestedId, signal) => {
|
|
163
753
|
validateCommand(command);
|
|
164
|
-
|
|
754
|
+
let id = requestedId;
|
|
755
|
+
if (id === undefined) {
|
|
756
|
+
do
|
|
757
|
+
id = `mcp-${nextServerId++}`;
|
|
758
|
+
while (configured.has(id) || servers.has(id) || startingServers.has(id));
|
|
759
|
+
}
|
|
165
760
|
if (servers.has(id))
|
|
166
761
|
throw new Error(`MCP server is already running: ${id}`);
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
762
|
+
if (startingServers.has(id))
|
|
763
|
+
throw new Error(`MCP server is already starting: ${id}`);
|
|
764
|
+
if (servers.size + startingServers.size >= maxManagedServers)
|
|
765
|
+
throw new Error(`MCP client cannot manage more than ${maxManagedServers} running servers`);
|
|
766
|
+
startingServers.add(id);
|
|
767
|
+
let child;
|
|
768
|
+
try {
|
|
769
|
+
child = spawn(command[0], command.slice(1), { cwd: context.piHarnessLaunch.cwd, shell: false, stdio: ["pipe", "pipe", "pipe"] });
|
|
770
|
+
}
|
|
771
|
+
catch (error) {
|
|
772
|
+
startingServers.delete(id);
|
|
773
|
+
throw error;
|
|
774
|
+
}
|
|
775
|
+
let stderr = Buffer.alloc(0);
|
|
170
776
|
child.stderr.on("data", (chunk) => {
|
|
171
|
-
stderr =
|
|
777
|
+
stderr = appendByteTail(stderr, chunk, maxStderrBytes);
|
|
172
778
|
});
|
|
173
779
|
const server = {
|
|
174
780
|
id,
|
|
@@ -178,42 +784,57 @@ export default {
|
|
|
178
784
|
nextRequestId: 2,
|
|
179
785
|
queue: Promise.resolve(),
|
|
180
786
|
startedAt: Date.now(),
|
|
787
|
+
lifecycle: new AbortController(),
|
|
181
788
|
};
|
|
182
789
|
child.once("close", () => {
|
|
183
790
|
server.status = "stopping";
|
|
791
|
+
server.lifecycle.abort(new Error(`MCP server exited: ${server.id}`));
|
|
184
792
|
servers.delete(server.id);
|
|
185
793
|
});
|
|
186
794
|
try {
|
|
187
|
-
await request(child, 1, "initialize", { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "pi-harness", version:
|
|
188
|
-
|
|
795
|
+
const initializeResult = await request(child, 1, "initialize", { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "pi-harness", version: clientVersion } }, signal);
|
|
796
|
+
validateInitializeResult(initializeResult);
|
|
797
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
798
|
+
throw new Error(`MCP server exited during initialization: ${id}`);
|
|
189
799
|
servers.set(server.id, server);
|
|
800
|
+
child.stdin.write(encodeMessage({ jsonrpc: "2.0", method: "notifications/initialized" }));
|
|
190
801
|
return server;
|
|
191
802
|
}
|
|
192
803
|
catch (error) {
|
|
193
|
-
|
|
194
|
-
child
|
|
195
|
-
if (error instanceof Error &&
|
|
196
|
-
throw
|
|
804
|
+
servers.delete(server.id);
|
|
805
|
+
await terminateChild(child);
|
|
806
|
+
if (error instanceof Error && error.message === disposedMessage)
|
|
807
|
+
throw error;
|
|
808
|
+
const stderrText = stderr.toString("utf8").trim();
|
|
809
|
+
if (error instanceof Error && stderrText !== "")
|
|
810
|
+
throw new Error(`${error.message}: ${stderrText}`, { cause: error });
|
|
197
811
|
throw error;
|
|
198
812
|
}
|
|
813
|
+
finally {
|
|
814
|
+
startingServers.delete(id);
|
|
815
|
+
}
|
|
199
816
|
};
|
|
200
|
-
const stopServer =
|
|
817
|
+
const stopServer = (serverId, signal) => {
|
|
201
818
|
const server = servers.get(serverId);
|
|
202
819
|
if (server === undefined)
|
|
203
820
|
throw new Error(`MCP server is not running: ${serverId}`);
|
|
204
821
|
server.status = "stopping";
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
822
|
+
server.lifecycle.abort(new Error(`MCP server stopped: ${server.id}`));
|
|
823
|
+
const operation = (async () => {
|
|
824
|
+
await server.queue;
|
|
825
|
+
servers.delete(server.id);
|
|
826
|
+
await terminateChild(server.child);
|
|
827
|
+
return true;
|
|
828
|
+
})();
|
|
829
|
+
return withCancellation(operation, signal, "server/stop");
|
|
210
830
|
};
|
|
211
|
-
const requestManaged = (server, method, params) => {
|
|
831
|
+
const requestManaged = (server, method, params, signal) => {
|
|
212
832
|
if (server.status !== "running")
|
|
213
833
|
throw new Error(`MCP server is not running: ${server.id}`);
|
|
214
|
-
const
|
|
834
|
+
const requestSignal = signal === undefined ? server.lifecycle.signal : AbortSignal.any([signal, server.lifecycle.signal]);
|
|
835
|
+
const task = server.queue.then(() => request(server.child, server.nextRequestId++, method, params, requestSignal));
|
|
215
836
|
server.queue = task.then(() => undefined, () => undefined);
|
|
216
|
-
return task;
|
|
837
|
+
return withCancellation(task, requestSignal, method);
|
|
217
838
|
};
|
|
218
839
|
const getServer = (serverId) => {
|
|
219
840
|
const server = servers.get(serverId);
|
|
@@ -227,99 +848,165 @@ export default {
|
|
|
227
848
|
throw new Error(`Configured MCP server is not found: ${serverId}`);
|
|
228
849
|
return [...definition.command];
|
|
229
850
|
};
|
|
230
|
-
const
|
|
851
|
+
const statusSnapshot = () => {
|
|
852
|
+
const running = [...servers.values()].map((server) => ({
|
|
853
|
+
id: server.id,
|
|
854
|
+
executable: executableName(server.command),
|
|
855
|
+
argumentCount: Math.max(0, server.command.length - 1),
|
|
856
|
+
status: server.status,
|
|
857
|
+
startedAt: server.startedAt,
|
|
858
|
+
}));
|
|
859
|
+
const active = new Set(running.map((server) => server.id));
|
|
860
|
+
return [
|
|
861
|
+
...running,
|
|
862
|
+
...[...configured.values()]
|
|
863
|
+
.filter((definition) => !active.has(definition.id))
|
|
864
|
+
.map((definition) => ({
|
|
865
|
+
id: definition.id,
|
|
866
|
+
executable: executableName(definition.command),
|
|
867
|
+
argumentCount: Math.max(0, definition.command.length - 1),
|
|
868
|
+
status: "stopped",
|
|
869
|
+
startedAt: 0,
|
|
870
|
+
})),
|
|
871
|
+
];
|
|
872
|
+
};
|
|
873
|
+
const list = async (command, serverId, signal) => {
|
|
874
|
+
rejectAmbiguousTarget(command, serverId);
|
|
231
875
|
if (serverId !== undefined) {
|
|
232
876
|
const managed = getServer(serverId);
|
|
233
|
-
const
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
return
|
|
877
|
+
const tools = await paginatedInventory("tools/list", "tools", (params) => requestManaged(managed, "tools/list", params, signal), toolInventory);
|
|
878
|
+
const key = `managed:${managed.id}`;
|
|
879
|
+
const server = serverLabel(managed.command);
|
|
880
|
+
const previous = previousFor(key);
|
|
881
|
+
const next = { server, tools, resources: previous?.resources ?? [], prompts: previous?.prompts ?? [] };
|
|
882
|
+
return publishLatest(key, next);
|
|
239
883
|
}
|
|
240
884
|
if (command === undefined)
|
|
241
885
|
throw new Error("Provide command or serverId to list MCP tools");
|
|
242
886
|
return withServer(command, context.piHarnessLaunch.cwd, async (child) => {
|
|
243
|
-
|
|
244
|
-
const tools =
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
887
|
+
let requestId = 2;
|
|
888
|
+
const tools = await paginatedInventory("tools/list", "tools", (params) => request(child, requestId++, "tools/list", params, signal), toolInventory);
|
|
889
|
+
const key = `command:${JSON.stringify(command)}`;
|
|
890
|
+
const server = serverLabel(command);
|
|
891
|
+
const previous = previousFor(key);
|
|
892
|
+
const next = { server, tools, resources: previous?.resources ?? [], prompts: previous?.prompts ?? [] };
|
|
893
|
+
return publishLatest(key, next);
|
|
894
|
+
}, signal);
|
|
250
895
|
};
|
|
251
|
-
const call = async (command, serverId, name, args) => {
|
|
896
|
+
const call = async (command, serverId, name, args, signal) => {
|
|
897
|
+
rejectAmbiguousTarget(command, serverId);
|
|
898
|
+
boundedInput(name, "tool name", 512);
|
|
252
899
|
if (serverId !== undefined) {
|
|
253
900
|
const managed = getServer(serverId);
|
|
254
|
-
const result = (await requestManaged(managed, "tools/call", { name, arguments: args }));
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
901
|
+
const result = (await requestManaged(managed, "tools/call", { name, arguments: args }, signal));
|
|
902
|
+
toolResultContent(result);
|
|
903
|
+
const key = `managed:${managed.id}`;
|
|
904
|
+
const server = serverLabel(managed.command);
|
|
905
|
+
const previous = previousFor(key);
|
|
906
|
+
publishLatest(key, {
|
|
907
|
+
server,
|
|
908
|
+
tools: previous?.tools ?? [],
|
|
909
|
+
resources: previous?.resources ?? [],
|
|
910
|
+
prompts: previous?.prompts ?? [],
|
|
260
911
|
lastCall: name,
|
|
261
|
-
};
|
|
912
|
+
});
|
|
262
913
|
return result;
|
|
263
914
|
}
|
|
264
915
|
if (command === undefined)
|
|
265
916
|
throw new Error("Provide command or serverId to call an MCP tool");
|
|
266
917
|
return withServer(command, context.piHarnessLaunch.cwd, async (child) => {
|
|
267
|
-
const result = (await request(child, 2, "tools/call", { name, arguments: args }));
|
|
268
|
-
|
|
918
|
+
const result = (await request(child, 2, "tools/call", { name, arguments: args }, signal));
|
|
919
|
+
toolResultContent(result);
|
|
920
|
+
const key = `command:${JSON.stringify(command)}`;
|
|
921
|
+
const server = serverLabel(command);
|
|
922
|
+
const previous = previousFor(key);
|
|
923
|
+
publishLatest(key, {
|
|
924
|
+
server,
|
|
925
|
+
tools: previous?.tools ?? [],
|
|
926
|
+
resources: previous?.resources ?? [],
|
|
927
|
+
prompts: previous?.prompts ?? [],
|
|
928
|
+
lastCall: name,
|
|
929
|
+
});
|
|
269
930
|
return result;
|
|
270
|
-
});
|
|
931
|
+
}, signal);
|
|
271
932
|
};
|
|
272
|
-
const requestOneShot = async (command, method, params) => withServer(command, context.piHarnessLaunch.cwd, async (child) => request(child, 2, method, params));
|
|
933
|
+
const requestOneShot = async (command, method, params, signal) => withServer(command, context.piHarnessLaunch.cwd, async (child) => request(child, 2, method, params, signal), signal);
|
|
273
934
|
const requireCommand = (command, message) => {
|
|
274
935
|
if (command === undefined)
|
|
275
936
|
throw new Error(message);
|
|
276
937
|
return command;
|
|
277
938
|
};
|
|
278
|
-
const resources = async (command, serverId) => {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
939
|
+
const resources = async (command, serverId, signal) => {
|
|
940
|
+
rejectAmbiguousTarget(command, serverId);
|
|
941
|
+
let items;
|
|
942
|
+
let selectedCommand;
|
|
943
|
+
if (serverId === undefined) {
|
|
944
|
+
selectedCommand = requireCommand(command, "Provide command or serverId to list MCP resources");
|
|
945
|
+
items = await withServer(selectedCommand, context.piHarnessLaunch.cwd, async (child) => {
|
|
946
|
+
let requestId = 2;
|
|
947
|
+
return paginatedInventory("resources/list", "resources", (params) => request(child, requestId++, "resources/list", params, signal), resourceInventory);
|
|
948
|
+
}, signal);
|
|
949
|
+
}
|
|
950
|
+
else {
|
|
951
|
+
const managed = getServer(serverId);
|
|
952
|
+
selectedCommand = managed.command;
|
|
953
|
+
items = await paginatedInventory("resources/list", "resources", (params) => requestManaged(managed, "resources/list", params, signal), resourceInventory);
|
|
954
|
+
}
|
|
955
|
+
const key = serverId === undefined ? `command:${JSON.stringify(selectedCommand)}` : `managed:${serverId}`;
|
|
956
|
+
const server = serverLabel(selectedCommand);
|
|
957
|
+
const previous = previousFor(key);
|
|
958
|
+
const next = {
|
|
959
|
+
server,
|
|
960
|
+
tools: previous?.tools ?? [],
|
|
288
961
|
resources: items,
|
|
289
|
-
prompts:
|
|
962
|
+
prompts: previous?.prompts ?? [],
|
|
290
963
|
};
|
|
291
|
-
|
|
964
|
+
publishLatest(key, next);
|
|
965
|
+
return clone(items);
|
|
292
966
|
};
|
|
293
|
-
const readResource = async (command, serverId, uri) => {
|
|
294
|
-
|
|
295
|
-
|
|
967
|
+
const readResource = async (command, serverId, uri, signal) => {
|
|
968
|
+
rejectAmbiguousTarget(command, serverId);
|
|
969
|
+
boundedInput(uri, "resource URI", 4096);
|
|
296
970
|
return serverId === undefined
|
|
297
|
-
? requestOneShot(requireCommand(command, "Provide command or serverId to read an MCP resource"), "resources/read", { uri })
|
|
298
|
-
: requestManaged(getServer(serverId), "resources/read", { uri });
|
|
971
|
+
? requestOneShot(requireCommand(command, "Provide command or serverId to read an MCP resource"), "resources/read", { uri }, signal)
|
|
972
|
+
: requestManaged(getServer(serverId), "resources/read", { uri }, signal);
|
|
299
973
|
};
|
|
300
|
-
const prompts = async (command, serverId) => {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
974
|
+
const prompts = async (command, serverId, signal) => {
|
|
975
|
+
rejectAmbiguousTarget(command, serverId);
|
|
976
|
+
let items;
|
|
977
|
+
let selectedCommand;
|
|
978
|
+
if (serverId === undefined) {
|
|
979
|
+
selectedCommand = requireCommand(command, "Provide command or serverId to list MCP prompts");
|
|
980
|
+
items = await withServer(selectedCommand, context.piHarnessLaunch.cwd, async (child) => {
|
|
981
|
+
let requestId = 2;
|
|
982
|
+
return paginatedInventory("prompts/list", "prompts", (params) => request(child, requestId++, "prompts/list", params, signal), promptInventory);
|
|
983
|
+
}, signal);
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
const managed = getServer(serverId);
|
|
987
|
+
selectedCommand = managed.command;
|
|
988
|
+
items = await paginatedInventory("prompts/list", "prompts", (params) => requestManaged(managed, "prompts/list", params, signal), promptInventory);
|
|
989
|
+
}
|
|
990
|
+
const key = serverId === undefined ? `command:${JSON.stringify(selectedCommand)}` : `managed:${serverId}`;
|
|
991
|
+
const server = serverLabel(selectedCommand);
|
|
992
|
+
const previous = previousFor(key);
|
|
993
|
+
const next = {
|
|
994
|
+
server,
|
|
995
|
+
tools: previous?.tools ?? [],
|
|
996
|
+
resources: previous?.resources ?? [],
|
|
311
997
|
prompts: items,
|
|
312
998
|
};
|
|
313
|
-
|
|
999
|
+
publishLatest(key, next);
|
|
1000
|
+
return clone(items);
|
|
314
1001
|
};
|
|
315
|
-
const getPrompt = async (command, serverId, name, args) => {
|
|
316
|
-
|
|
317
|
-
|
|
1002
|
+
const getPrompt = async (command, serverId, name, args, signal) => {
|
|
1003
|
+
rejectAmbiguousTarget(command, serverId);
|
|
1004
|
+
boundedInput(name, "prompt name", 512);
|
|
318
1005
|
return serverId === undefined
|
|
319
|
-
? requestOneShot(requireCommand(command, "Provide command or serverId to get an MCP prompt"), "prompts/get", { name, arguments: args })
|
|
320
|
-
: requestManaged(getServer(serverId), "prompts/get", { name, arguments: args });
|
|
1006
|
+
? requestOneShot(requireCommand(command, "Provide command or serverId to get an MCP prompt"), "prompts/get", { name, arguments: args }, signal)
|
|
1007
|
+
: requestManaged(getServer(serverId), "prompts/get", { name, arguments: args }, signal);
|
|
321
1008
|
};
|
|
322
|
-
const unregisterList =
|
|
1009
|
+
const unregisterList = registerTool(defineTool({
|
|
323
1010
|
name: "mcp_list_tools",
|
|
324
1011
|
label: "MCP list tools",
|
|
325
1012
|
description: "Start an MCP stdio server and list its available tools.",
|
|
@@ -327,9 +1014,13 @@ export default {
|
|
|
327
1014
|
parameters: Type.Object({
|
|
328
1015
|
command: Type.Optional(Type.Array(Type.String(), { description: "MCP server executable and arguments; shell wrappers are rejected" })),
|
|
329
1016
|
serverId: Type.Optional(Type.String({ description: "A configured or running MCP server id" })),
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
|
|
1017
|
+
}, { additionalProperties: false }),
|
|
1018
|
+
executionMode: "sequential",
|
|
1019
|
+
async execute(_toolCallId, params, signal) {
|
|
1020
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1021
|
+
operationSignal.throwIfAborted();
|
|
1022
|
+
const raw = inspectParameters(params, connectionParameterNames);
|
|
1023
|
+
const result = await list(optionalCommand(raw.command), serverIdValue(raw.serverId), operationSignal);
|
|
333
1024
|
return {
|
|
334
1025
|
content: [
|
|
335
1026
|
{ type: "text", text: result.tools.map((tool) => `${tool.name}: ${tool.description ?? ""}`).join("\n") || "MCP server returned no tools." },
|
|
@@ -338,7 +1029,7 @@ export default {
|
|
|
338
1029
|
};
|
|
339
1030
|
},
|
|
340
1031
|
}));
|
|
341
|
-
const unregisterCall =
|
|
1032
|
+
const unregisterCall = registerTool(defineTool({
|
|
342
1033
|
name: "mcp_call",
|
|
343
1034
|
label: "MCP call tool",
|
|
344
1035
|
description: "Call a named tool on an MCP stdio server with a JSON object of arguments.",
|
|
@@ -348,14 +1039,17 @@ export default {
|
|
|
348
1039
|
serverId: Type.Optional(Type.String()),
|
|
349
1040
|
name: Type.String(),
|
|
350
1041
|
arguments: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
351
|
-
}),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
const
|
|
355
|
-
|
|
1042
|
+
}, { additionalProperties: false }),
|
|
1043
|
+
executionMode: "sequential",
|
|
1044
|
+
async execute(_toolCallId, params, signal) {
|
|
1045
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1046
|
+
operationSignal.throwIfAborted();
|
|
1047
|
+
const raw = inspectParameters(params, callParameterNames);
|
|
1048
|
+
const result = await call(optionalCommand(raw.command), serverIdValue(raw.serverId), requiredString(raw.name, "tool name"), jsonObject(raw.arguments), operationSignal);
|
|
1049
|
+
return { content: toolResultContent(result), details: clone(result) };
|
|
356
1050
|
},
|
|
357
1051
|
}));
|
|
358
|
-
const unregisterStart =
|
|
1052
|
+
const unregisterStart = registerTool(defineTool({
|
|
359
1053
|
name: "mcp_server_start",
|
|
360
1054
|
label: "MCP server start",
|
|
361
1055
|
description: "Start and initialize a persistent MCP stdio server managed by Pi Harness.",
|
|
@@ -363,103 +1057,120 @@ export default {
|
|
|
363
1057
|
parameters: Type.Object({
|
|
364
1058
|
command: Type.Optional(Type.Array(Type.String(), { description: "MCP server executable and arguments; shell wrappers are rejected" })),
|
|
365
1059
|
serverId: Type.Optional(Type.String({ description: "Configured server id or a running server id" })),
|
|
366
|
-
}),
|
|
367
|
-
|
|
368
|
-
|
|
1060
|
+
}, { additionalProperties: false }),
|
|
1061
|
+
executionMode: "sequential",
|
|
1062
|
+
async execute(_toolCallId, params, signal) {
|
|
1063
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1064
|
+
operationSignal.throwIfAborted();
|
|
1065
|
+
const raw = inspectParameters(params, connectionParameterNames);
|
|
1066
|
+
const serverId = serverIdValue(raw.serverId);
|
|
1067
|
+
const command = optionalCommand(raw.command) ?? (serverId === undefined ? undefined : configuredCommand(serverId));
|
|
369
1068
|
if (command === undefined)
|
|
370
1069
|
throw new Error("Provide command or configured serverId to start an MCP server");
|
|
371
|
-
const server = await startServer(command,
|
|
1070
|
+
const server = await startServer(command, serverId, operationSignal);
|
|
372
1071
|
return {
|
|
373
1072
|
content: [{ type: "text", text: `MCP server ${server.id} is running.` }],
|
|
374
|
-
details: { serverId: server.id, command: server.command, status: server.status },
|
|
1073
|
+
details: { serverId: server.id, command: [...server.command], status: server.status },
|
|
375
1074
|
};
|
|
376
1075
|
},
|
|
377
1076
|
}));
|
|
378
|
-
const unregisterStatus =
|
|
1077
|
+
const unregisterStatus = registerTool(defineTool({
|
|
379
1078
|
name: "mcp_server_status",
|
|
380
1079
|
label: "MCP server status",
|
|
381
1080
|
description: "List persistent MCP stdio servers managed by Pi Harness.",
|
|
382
1081
|
promptSnippet: "inspect running MCP server status",
|
|
383
|
-
parameters: Type.Object({}),
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
: snapshot.map((server) => `${server.id}: ${server.status} (${server.command.join(" ")})`).join("\n"),
|
|
405
|
-
},
|
|
406
|
-
],
|
|
407
|
-
details: { servers: snapshot },
|
|
1082
|
+
parameters: Type.Object({}, { additionalProperties: false }),
|
|
1083
|
+
executionMode: "sequential",
|
|
1084
|
+
execute(_toolCallId, params, signal) {
|
|
1085
|
+
return Promise.resolve().then(() => {
|
|
1086
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1087
|
+
operationSignal.throwIfAborted();
|
|
1088
|
+
inspectParameters(params, noParameterNames);
|
|
1089
|
+
const snapshot = statusSnapshot();
|
|
1090
|
+
return {
|
|
1091
|
+
content: [
|
|
1092
|
+
{
|
|
1093
|
+
type: "text",
|
|
1094
|
+
text: snapshot.length === 0
|
|
1095
|
+
? "No MCP servers are running."
|
|
1096
|
+
: snapshot
|
|
1097
|
+
.map((server) => `${server.id}: ${server.status} (${server.executable}, ${server.argumentCount} argument${server.argumentCount === 1 ? "" : "s"})`)
|
|
1098
|
+
.join("\n"),
|
|
1099
|
+
},
|
|
1100
|
+
],
|
|
1101
|
+
details: { servers: snapshot },
|
|
1102
|
+
};
|
|
408
1103
|
});
|
|
409
1104
|
},
|
|
410
1105
|
}));
|
|
411
|
-
const unregisterStop =
|
|
1106
|
+
const unregisterStop = registerTool(defineTool({
|
|
412
1107
|
name: "mcp_server_stop",
|
|
413
1108
|
label: "MCP server stop",
|
|
414
1109
|
description: "Stop a persistent MCP stdio server and remove it from the managed set.",
|
|
415
1110
|
promptSnippet: "stop a persistent MCP stdio server",
|
|
416
|
-
parameters: Type.Object({ serverId: Type.String() }),
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
1111
|
+
parameters: Type.Object({ serverId: Type.String() }, { additionalProperties: false }),
|
|
1112
|
+
executionMode: "sequential",
|
|
1113
|
+
async execute(_toolCallId, params, signal) {
|
|
1114
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1115
|
+
operationSignal.throwIfAborted();
|
|
1116
|
+
const raw = inspectParameters(params, stopParameterNames);
|
|
1117
|
+
const serverId = serverIdValue(raw.serverId, true);
|
|
1118
|
+
const stopped = await stopServer(serverId, operationSignal);
|
|
1119
|
+
return { content: [{ type: "text", text: `MCP server ${serverId} stopped.` }], details: { serverId, stopped } };
|
|
420
1120
|
},
|
|
421
1121
|
}));
|
|
422
|
-
const unregisterListResources =
|
|
1122
|
+
const unregisterListResources = registerTool(defineTool({
|
|
423
1123
|
name: "mcp_list_resources",
|
|
424
1124
|
label: "MCP list resources",
|
|
425
1125
|
description: "List resources exposed by an MCP server.",
|
|
426
1126
|
promptSnippet: "list resources exposed by an MCP server",
|
|
427
|
-
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()) }),
|
|
428
|
-
|
|
429
|
-
|
|
1127
|
+
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()) }, { additionalProperties: false }),
|
|
1128
|
+
executionMode: "sequential",
|
|
1129
|
+
async execute(_toolCallId, params, signal) {
|
|
1130
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1131
|
+
operationSignal.throwIfAborted();
|
|
1132
|
+
const raw = inspectParameters(params, connectionParameterNames);
|
|
1133
|
+
const items = await resources(optionalCommand(raw.command), serverIdValue(raw.serverId), operationSignal);
|
|
430
1134
|
return {
|
|
431
1135
|
content: [{ type: "text", text: items.map((item) => `${item.uri} ${item.name ?? ""}`).join("\n") || "MCP server returned no resources." }],
|
|
432
1136
|
details: { resources: items },
|
|
433
1137
|
};
|
|
434
1138
|
},
|
|
435
1139
|
}));
|
|
436
|
-
const unregisterReadResource =
|
|
1140
|
+
const unregisterReadResource = registerTool(defineTool({
|
|
437
1141
|
name: "mcp_read_resource",
|
|
438
1142
|
label: "MCP read resource",
|
|
439
1143
|
description: "Read one resource exposed by an MCP server.",
|
|
440
1144
|
promptSnippet: "read a resource exposed by an MCP server",
|
|
441
|
-
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()), uri: Type.String() }),
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
const
|
|
445
|
-
|
|
1145
|
+
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()), uri: Type.String() }, { additionalProperties: false }),
|
|
1146
|
+
executionMode: "sequential",
|
|
1147
|
+
async execute(_toolCallId, params, signal) {
|
|
1148
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1149
|
+
operationSignal.throwIfAborted();
|
|
1150
|
+
const raw = inspectParameters(params, readResourceParameterNames);
|
|
1151
|
+
const result = await readResource(optionalCommand(raw.command), serverIdValue(raw.serverId), requiredString(raw.uri, "resource URI"), operationSignal);
|
|
1152
|
+
return { content: resourceResultContent(result), details: clone(result) };
|
|
446
1153
|
},
|
|
447
1154
|
}));
|
|
448
|
-
const unregisterListPrompts =
|
|
1155
|
+
const unregisterListPrompts = registerTool(defineTool({
|
|
449
1156
|
name: "mcp_list_prompts",
|
|
450
1157
|
label: "MCP list prompts",
|
|
451
1158
|
description: "List prompt templates exposed by an MCP server.",
|
|
452
1159
|
promptSnippet: "list prompt templates exposed by an MCP server",
|
|
453
|
-
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()) }),
|
|
454
|
-
|
|
455
|
-
|
|
1160
|
+
parameters: Type.Object({ command: Type.Optional(Type.Array(Type.String())), serverId: Type.Optional(Type.String()) }, { additionalProperties: false }),
|
|
1161
|
+
executionMode: "sequential",
|
|
1162
|
+
async execute(_toolCallId, params, signal) {
|
|
1163
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1164
|
+
operationSignal.throwIfAborted();
|
|
1165
|
+
const raw = inspectParameters(params, connectionParameterNames);
|
|
1166
|
+
const items = await prompts(optionalCommand(raw.command), serverIdValue(raw.serverId), operationSignal);
|
|
456
1167
|
return {
|
|
457
1168
|
content: [{ type: "text", text: items.map((item) => `${item.name}: ${item.description ?? ""}`).join("\n") || "MCP server returned no prompts." }],
|
|
458
1169
|
details: { prompts: items },
|
|
459
1170
|
};
|
|
460
1171
|
},
|
|
461
1172
|
}));
|
|
462
|
-
const unregisterGetPrompt =
|
|
1173
|
+
const unregisterGetPrompt = registerTool(defineTool({
|
|
463
1174
|
name: "mcp_get_prompt",
|
|
464
1175
|
label: "MCP get prompt",
|
|
465
1176
|
description: "Render a prompt template exposed by an MCP server.",
|
|
@@ -468,18 +1179,21 @@ export default {
|
|
|
468
1179
|
command: Type.Optional(Type.Array(Type.String())),
|
|
469
1180
|
serverId: Type.Optional(Type.String()),
|
|
470
1181
|
name: Type.String(),
|
|
471
|
-
arguments: Type.Optional(Type.Record(Type.String(), Type.
|
|
472
|
-
}),
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
const
|
|
476
|
-
|
|
1182
|
+
arguments: Type.Optional(Type.Record(Type.String(), Type.String())),
|
|
1183
|
+
}, { additionalProperties: false }),
|
|
1184
|
+
executionMode: "sequential",
|
|
1185
|
+
async execute(_toolCallId, params, signal) {
|
|
1186
|
+
const operationSignal = executionSignal(signal, lifecycle.signal);
|
|
1187
|
+
operationSignal.throwIfAborted();
|
|
1188
|
+
const raw = inspectParameters(params, callParameterNames);
|
|
1189
|
+
const result = await getPrompt(optionalCommand(raw.command), serverIdValue(raw.serverId), requiredString(raw.name, "prompt name"), promptArguments(raw.arguments), operationSignal);
|
|
1190
|
+
return { content: promptResultContent(result), details: clone(result) };
|
|
477
1191
|
},
|
|
478
1192
|
}));
|
|
479
1193
|
const serverSnapshot = () => {
|
|
480
1194
|
const running = [...servers.values()].map((server) => ({
|
|
481
1195
|
id: server.id,
|
|
482
|
-
command: [
|
|
1196
|
+
command: [executableName(server.command)],
|
|
483
1197
|
status: server.status,
|
|
484
1198
|
startedAt: server.startedAt,
|
|
485
1199
|
}));
|
|
@@ -488,26 +1202,65 @@ export default {
|
|
|
488
1202
|
...running,
|
|
489
1203
|
...[...configured.values()]
|
|
490
1204
|
.filter((definition) => !active.has(definition.id))
|
|
491
|
-
.map((definition) => ({ id: definition.id, command: [
|
|
1205
|
+
.map((definition) => ({ id: definition.id, command: [executableName(definition.command)], status: "stopped", startedAt: 0 })),
|
|
492
1206
|
];
|
|
493
1207
|
};
|
|
494
1208
|
context.provide("piMcp", { snapshot: () => ({ servers: serverSnapshot() }) });
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
1209
|
+
let disposePanel;
|
|
1210
|
+
try {
|
|
1211
|
+
disposePanel = context.piPluginUi.register({
|
|
1212
|
+
id: "mcp-client-panel",
|
|
1213
|
+
pluginId: "@pi-harness/core/plugins/mcp-client",
|
|
1214
|
+
title: "MCP Client",
|
|
1215
|
+
description: "通过 stdio JSON-RPC 连接外部 MCP 工具服务器。",
|
|
1216
|
+
icon: "⌘",
|
|
1217
|
+
read: () => {
|
|
1218
|
+
const tools = latest?.tools ?? [];
|
|
1219
|
+
const resources = latest?.resources ?? [];
|
|
1220
|
+
const prompts = latest?.prompts ?? [];
|
|
1221
|
+
const serverStatuses = statusSnapshot();
|
|
1222
|
+
return clone({
|
|
1223
|
+
server: latest?.server ?? null,
|
|
1224
|
+
tools: tools.slice(0, maxPanelItems),
|
|
1225
|
+
resources: resources.slice(0, maxPanelItems),
|
|
1226
|
+
prompts: prompts.slice(0, maxPanelItems),
|
|
1227
|
+
lastCall: latest?.lastCall ?? null,
|
|
1228
|
+
servers: serverStatuses.slice(0, maxPanelItems),
|
|
1229
|
+
inventory: {
|
|
1230
|
+
tools: { total: tools.length, shown: Math.min(tools.length, maxPanelItems), truncated: tools.length > maxPanelItems },
|
|
1231
|
+
resources: { total: resources.length, shown: Math.min(resources.length, maxPanelItems), truncated: resources.length > maxPanelItems },
|
|
1232
|
+
prompts: { total: prompts.length, shown: Math.min(prompts.length, maxPanelItems), truncated: prompts.length > maxPanelItems },
|
|
1233
|
+
servers: {
|
|
1234
|
+
total: serverStatuses.length,
|
|
1235
|
+
shown: Math.min(serverStatuses.length, maxPanelItems),
|
|
1236
|
+
truncated: serverStatuses.length > maxPanelItems,
|
|
1237
|
+
},
|
|
1238
|
+
},
|
|
1239
|
+
limits: {
|
|
1240
|
+
responseBytes: maxResponseBytes,
|
|
1241
|
+
commandArgs: maxCommandArgs,
|
|
1242
|
+
argumentBytes: maxArgumentBytes,
|
|
1243
|
+
toolArgumentsBytes: maxToolArgumentsBytes,
|
|
1244
|
+
toolArgumentDepth: maxToolArgumentDepth,
|
|
1245
|
+
requestTimeoutMs,
|
|
1246
|
+
panelItems: maxPanelItems,
|
|
1247
|
+
inventoryItems: maxInventoryItems,
|
|
1248
|
+
paginationPages: maxPaginationPages,
|
|
1249
|
+
stderrBytes: maxStderrBytes,
|
|
1250
|
+
managedServers: maxManagedServers,
|
|
1251
|
+
},
|
|
1252
|
+
});
|
|
1253
|
+
},
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
catch (error) {
|
|
1257
|
+
for (const unregister of unregisters.splice(0).reverse())
|
|
1258
|
+
unregister();
|
|
1259
|
+
lifecycle.abort(new Error("MCP client plugin activation failed", { cause: error }));
|
|
1260
|
+
throw error;
|
|
1261
|
+
}
|
|
1262
|
+
context.effect(() => async () => {
|
|
1263
|
+
lifecycle.abort(new Error(disposedMessage));
|
|
511
1264
|
unregisterList();
|
|
512
1265
|
unregisterCall();
|
|
513
1266
|
unregisterStart();
|
|
@@ -517,17 +1270,18 @@ export default {
|
|
|
517
1270
|
unregisterReadResource();
|
|
518
1271
|
unregisterListPrompts();
|
|
519
1272
|
unregisterGetPrompt();
|
|
520
|
-
|
|
1273
|
+
const running = [...servers.values()];
|
|
1274
|
+
for (const server of running) {
|
|
521
1275
|
server.status = "stopping";
|
|
522
|
-
server.
|
|
523
|
-
server.child.kill();
|
|
1276
|
+
server.lifecycle.abort(new Error(disposedMessage));
|
|
524
1277
|
}
|
|
525
1278
|
servers.clear();
|
|
526
1279
|
disposePanel();
|
|
1280
|
+
await Promise.all(running.map(async (server) => terminateChild(server.child)));
|
|
527
1281
|
});
|
|
528
1282
|
for (const definition of configured.values()) {
|
|
529
1283
|
if (definition.autoStart === true)
|
|
530
|
-
await startServer(definition.command, definition.id);
|
|
1284
|
+
await startServer(definition.command, definition.id, lifecycle.signal);
|
|
531
1285
|
}
|
|
532
1286
|
},
|
|
533
1287
|
};
|