@pi-harness/pi-harness 0.1.2 → 0.1.4
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/LICENSE +9 -0
- package/README.md +31 -7
- package/apps/web/dist/assets/index-CihATCjR.css +2 -0
- package/apps/web/dist/assets/index-NzapJoGa.js +20 -0
- package/apps/web/dist/assets/markdown-vendor-DUdMWn0M.js +66 -0
- package/apps/web/dist/assets/react-vendor-BD7-wQo9.js +9 -0
- package/apps/web/dist/icons/app/android-192.png +0 -0
- package/apps/web/dist/icons/app/android-512.png +0 -0
- package/apps/web/dist/icons/app/app-blue-512.png +0 -0
- package/apps/web/dist/icons/app/app-store-1024.png +0 -0
- package/apps/web/dist/icons/app/apple-touch-icon-180.png +0 -0
- package/apps/web/dist/icons/app/maskable-512.png +0 -0
- package/apps/web/dist/icons/favicon/favicon-16.png +0 -0
- package/apps/web/dist/icons/favicon/favicon-32.png +0 -0
- package/apps/web/dist/icons/favicon/favicon-48.png +0 -0
- package/apps/web/dist/icons/png-blue/pi-256.png +0 -0
- package/apps/web/dist/icons/png-blue/pi-512.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-1024.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-128.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-16.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-24.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-256.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-32.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-48.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-512.png +0 -0
- package/apps/web/dist/icons/png-ink/pi-64.png +0 -0
- package/apps/web/dist/icons/png-white/pi-1024.png +0 -0
- package/apps/web/dist/icons/png-white/pi-128.png +0 -0
- package/apps/web/dist/icons/png-white/pi-16.png +0 -0
- package/apps/web/dist/icons/png-white/pi-24.png +0 -0
- package/apps/web/dist/icons/png-white/pi-256.png +0 -0
- package/apps/web/dist/icons/png-white/pi-32.png +0 -0
- package/apps/web/dist/icons/png-white/pi-48.png +0 -0
- package/apps/web/dist/icons/png-white/pi-512.png +0 -0
- package/apps/web/dist/icons/png-white/pi-64.png +0 -0
- package/apps/web/dist/icons/social/og-1200x630.png +0 -0
- package/apps/web/dist/icons/svg/app-icon-blue.svg +13 -0
- package/apps/web/dist/icons/svg/app-icon-ink.svg +13 -0
- package/apps/web/dist/icons/svg/favicon.svg +10 -0
- package/apps/web/dist/icons/svg/lockup-horizontal.svg +13 -0
- package/apps/web/dist/icons/svg/mark-blue.svg +10 -0
- package/apps/web/dist/icons/svg/mark-compact.svg +10 -0
- package/apps/web/dist/icons/svg/mark-ink.svg +10 -0
- package/apps/web/dist/icons/svg/mark-white.svg +10 -0
- package/apps/web/dist/icons/svg/mark.svg +10 -0
- package/apps/web/dist/index.html +18 -6
- package/apps/web/dist/manifest.webmanifest +14 -0
- package/apps/web/index.html +14 -4
- package/apps/web/package.json +11 -9
- package/apps/web/profile/cordis.yml +222 -1
- package/apps/web/public/icons/app/android-192.png +0 -0
- package/apps/web/public/icons/app/android-512.png +0 -0
- package/apps/web/public/icons/app/app-blue-512.png +0 -0
- package/apps/web/public/icons/app/app-store-1024.png +0 -0
- package/apps/web/public/icons/app/apple-touch-icon-180.png +0 -0
- package/apps/web/public/icons/app/maskable-512.png +0 -0
- package/apps/web/public/icons/favicon/favicon-16.png +0 -0
- package/apps/web/public/icons/favicon/favicon-32.png +0 -0
- package/apps/web/public/icons/favicon/favicon-48.png +0 -0
- package/apps/web/public/icons/png-blue/pi-256.png +0 -0
- package/apps/web/public/icons/png-blue/pi-512.png +0 -0
- package/apps/web/public/icons/png-ink/pi-1024.png +0 -0
- package/apps/web/public/icons/png-ink/pi-128.png +0 -0
- package/apps/web/public/icons/png-ink/pi-16.png +0 -0
- package/apps/web/public/icons/png-ink/pi-24.png +0 -0
- package/apps/web/public/icons/png-ink/pi-256.png +0 -0
- package/apps/web/public/icons/png-ink/pi-32.png +0 -0
- package/apps/web/public/icons/png-ink/pi-48.png +0 -0
- package/apps/web/public/icons/png-ink/pi-512.png +0 -0
- package/apps/web/public/icons/png-ink/pi-64.png +0 -0
- package/apps/web/public/icons/png-white/pi-1024.png +0 -0
- package/apps/web/public/icons/png-white/pi-128.png +0 -0
- package/apps/web/public/icons/png-white/pi-16.png +0 -0
- package/apps/web/public/icons/png-white/pi-24.png +0 -0
- package/apps/web/public/icons/png-white/pi-256.png +0 -0
- package/apps/web/public/icons/png-white/pi-32.png +0 -0
- package/apps/web/public/icons/png-white/pi-48.png +0 -0
- package/apps/web/public/icons/png-white/pi-512.png +0 -0
- package/apps/web/public/icons/png-white/pi-64.png +0 -0
- package/apps/web/public/icons/social/og-1200x630.png +0 -0
- package/apps/web/public/icons/svg/app-icon-blue.svg +13 -0
- package/apps/web/public/icons/svg/app-icon-ink.svg +13 -0
- package/apps/web/public/icons/svg/favicon.svg +10 -0
- package/apps/web/public/icons/svg/lockup-horizontal.svg +13 -0
- package/apps/web/public/icons/svg/mark-blue.svg +10 -0
- package/apps/web/public/icons/svg/mark-compact.svg +10 -0
- package/apps/web/public/icons/svg/mark-ink.svg +10 -0
- package/apps/web/public/icons/svg/mark-white.svg +10 -0
- package/apps/web/public/icons/svg/mark.svg +10 -0
- package/apps/web/public/manifest.webmanifest +14 -0
- package/apps/web/server-dist/bin.js +19 -6
- package/apps/web/server-dist/bin.js.map +1 -1
- package/apps/web/src/command-palette.ts +28 -7
- package/apps/web/src/file-diff.ts +15 -10
- package/apps/web/src/main.ts +4 -1
- package/apps/web/src/runtime.css +17 -4
- package/apps/web/src/server/bin.ts +24 -7
- package/apps/web/src/style.css +2618 -8
- package/apps/web/src/tailwind.css +25 -0
- package/apps/web/tsconfig.build.json +5 -1
- package/apps/web/tsconfig.json +1 -1
- package/apps/web/vite.config.ts +20 -0
- package/package.json +29 -17
- package/packages/api-gateway/LICENSE +9 -0
- package/packages/api-gateway/dist/index.d.ts.map +1 -1
- package/packages/api-gateway/dist/index.js +1188 -42
- package/packages/api-gateway/dist/index.js.map +1 -1
- package/packages/api-gateway/dist/marketplace-entries/official/agent-teams.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/anchored-standard.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/annotation.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/archify.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/at-file.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/auto-mode.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/better-sidebar.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/browser-fetch.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/browser-session.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/canvas-draw.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/change-verifier.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cleaner.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cli-notifier.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/code2skill.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/colleague-skill.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/context-doctor.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/context.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-group.json +16 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-logger-console.json +16 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cordis-timer.json +16 -0
- package/packages/api-gateway/dist/marketplace-entries/official/cost-meter.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/dependency-checker.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/docker-sandbox.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/fail-logger.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/genui.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/git-time-capsule.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/graph-memory.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/history-compressor.json +33 -0
- package/packages/api-gateway/dist/marketplace-entries/official/hol-guard.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/i18n-pair.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/image-compressor.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/llm-verifier.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/mcp-client.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/mcp-panel.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/memory.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/mirage-bridge.json +33 -0
- package/packages/api-gateway/dist/marketplace-entries/official/mock-server.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/modlens.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/module-search.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/obsidian-sync.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/openpets.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plan-execute.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-check.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-dev.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-finder.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-radar.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/plugin-stars.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/prompt-guard.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/prompt-library.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/readme-gen.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/recall-unread.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/reverse-skill.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/reviewer-bot.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/runtime-doctor.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/secure-audit.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-bookmarks.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-bridge.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-compare.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-export.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-insights.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/session-search.json +30 -0
- package/packages/api-gateway/dist/marketplace-entries/official/skill-catalog.json +31 -0
- package/packages/api-gateway/dist/marketplace-entries/official/skill-guard.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/sql-lens.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/synapse.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/tab-manager.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/taskboard.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/telemetry-blocker.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/test-harness.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/theme-studio.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/token-guard.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/turn-rewind.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/undo-savepoint.json +28 -0
- package/packages/api-gateway/dist/marketplace-entries/official/vision-toolkit.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/web-research.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/workspace-navigator.json +32 -0
- package/packages/api-gateway/dist/marketplace-entries/official/workspace-search.json +29 -0
- package/packages/api-gateway/dist/marketplace-entries/official/yaml-validator.json +29 -0
- package/packages/api-gateway/dist/marketplace.d.ts +40 -2
- package/packages/api-gateway/dist/marketplace.d.ts.map +1 -1
- package/packages/api-gateway/dist/marketplace.js +225 -19
- package/packages/api-gateway/dist/marketplace.js.map +1 -1
- package/packages/api-gateway/dist/workspaces.d.ts +8 -0
- package/packages/api-gateway/dist/workspaces.d.ts.map +1 -0
- package/packages/api-gateway/dist/workspaces.js +14 -0
- package/packages/api-gateway/dist/workspaces.js.map +1 -0
- package/packages/api-gateway/package.json +20 -10
- package/packages/api-gateway/scripts/copy-marketplace-entries.mjs +13 -0
- package/packages/api-gateway/src/index.ts +1258 -61
- package/packages/api-gateway/src/marketplace-entries/official/agent-teams.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/anchored-standard.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/annotation.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/archify.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/at-file.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/auto-mode.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/better-sidebar.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/browser-fetch.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/browser-session.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/canvas-draw.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/change-verifier.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/cleaner.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/cli-notifier.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/code2skill.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/colleague-skill.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/context-doctor.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/context.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/cordis-group.json +16 -0
- package/packages/api-gateway/src/marketplace-entries/official/cordis-logger-console.json +16 -0
- package/packages/api-gateway/src/marketplace-entries/official/cordis-timer.json +16 -0
- package/packages/api-gateway/src/marketplace-entries/official/cost-meter.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/dependency-checker.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/docker-sandbox.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/fail-logger.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/genui.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/git-time-capsule.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/graph-memory.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/history-compressor.json +33 -0
- package/packages/api-gateway/src/marketplace-entries/official/hol-guard.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/i18n-pair.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/image-compressor.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/llm-verifier.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/mcp-client.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/mcp-panel.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/memory.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/mirage-bridge.json +33 -0
- package/packages/api-gateway/src/marketplace-entries/official/mock-server.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/modlens.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/module-search.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/obsidian-sync.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/openpets.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/plan-execute.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/plugin-check.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/plugin-dev.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/plugin-finder.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/plugin-radar.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/plugin-stars.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/prompt-guard.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/prompt-library.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/readme-gen.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/recall-unread.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/reverse-skill.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/reviewer-bot.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/runtime-doctor.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/secure-audit.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-bookmarks.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-bridge.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-compare.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-export.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-insights.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/session-search.json +30 -0
- package/packages/api-gateway/src/marketplace-entries/official/skill-catalog.json +31 -0
- package/packages/api-gateway/src/marketplace-entries/official/skill-guard.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/sql-lens.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/synapse.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/tab-manager.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/taskboard.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/telemetry-blocker.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/test-harness.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/theme-studio.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/token-guard.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/turn-rewind.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/undo-savepoint.json +28 -0
- package/packages/api-gateway/src/marketplace-entries/official/vision-toolkit.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/web-research.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/workspace-navigator.json +32 -0
- package/packages/api-gateway/src/marketplace-entries/official/workspace-search.json +29 -0
- package/packages/api-gateway/src/marketplace-entries/official/yaml-validator.json +29 -0
- package/packages/api-gateway/src/marketplace.ts +267 -22
- package/packages/api-gateway/src/workspaces.ts +20 -0
- package/packages/api-gateway/test/index.test.ts +483 -33
- package/packages/api-gateway/test/marketplace.test.ts +282 -3
- package/packages/api-gateway/test/release-version.test.ts +71 -0
- package/packages/api-gateway/test/workspaces.test.ts +13 -0
- package/packages/api-gateway/tsconfig.build.json +1 -1
- package/packages/api-gateway/tsconfig.json +1 -1
- package/packages/bundle-web-app/LICENSE +9 -0
- package/packages/bundle-web-app/package.json +19 -9
- package/packages/bundle-web-app/tsconfig.build.json +1 -1
- package/packages/bundle-web-app/tsconfig.json +1 -1
- package/packages/cli/LICENSE +9 -0
- package/packages/cli/dist/args.d.ts.map +1 -1
- package/packages/cli/dist/args.js +16 -9
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/bin.js +12 -3
- package/packages/cli/dist/bin.js.map +1 -1
- package/packages/cli/dist/main.d.ts +1 -0
- package/packages/cli/dist/main.d.ts.map +1 -1
- package/packages/cli/dist/main.js +49 -9
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/node-stdio.d.ts +3 -1
- package/packages/cli/dist/node-stdio.d.ts.map +1 -1
- package/packages/cli/dist/node-stdio.js +91 -13
- package/packages/cli/dist/node-stdio.js.map +1 -1
- package/packages/cli/dist/relaunch.d.ts.map +1 -1
- package/packages/cli/dist/relaunch.js +23 -10
- package/packages/cli/dist/relaunch.js.map +1 -1
- package/packages/cli/package.json +18 -8
- package/packages/cli/src/args.ts +16 -10
- package/packages/cli/src/bin.ts +12 -3
- package/packages/cli/src/main.ts +54 -10
- package/packages/cli/src/node-stdio.ts +85 -13
- package/packages/cli/src/relaunch.ts +19 -6
- package/packages/cli/test/args.test.ts +22 -3
- package/packages/cli/test/binary.test.ts +58 -0
- package/packages/cli/test/broken-pipe.test.ts +32 -0
- package/packages/cli/test/cli.test.ts +57 -8
- package/packages/cli/test/node-stdio.test.ts +89 -0
- package/packages/cli/test/relaunch.test.ts +30 -2
- package/packages/cli/test/stdin-shutdown.test.ts +59 -0
- package/packages/cli/tsconfig.build.json +1 -3
- package/packages/cli/tsconfig.json +1 -4
- package/packages/client-web/LICENSE +9 -0
- package/packages/client-web/dist/annotation-ui.d.ts +11 -0
- package/packages/client-web/dist/annotation-ui.d.ts.map +1 -0
- package/packages/client-web/dist/annotation-ui.js +24 -0
- package/packages/client-web/dist/annotation-ui.js.map +1 -0
- package/packages/client-web/dist/browser-session-view.d.ts +7 -0
- package/packages/client-web/dist/browser-session-view.d.ts.map +1 -0
- package/packages/client-web/dist/browser-session-view.js +8 -0
- package/packages/client-web/dist/browser-session-view.js.map +1 -0
- package/packages/client-web/dist/control-room.d.ts +151 -6
- package/packages/client-web/dist/control-room.d.ts.map +1 -1
- package/packages/client-web/dist/control-room.js +156 -11
- package/packages/client-web/dist/control-room.js.map +1 -1
- package/packages/client-web/dist/design-contract.d.ts.map +1 -1
- package/packages/client-web/dist/design-contract.js +178 -19
- package/packages/client-web/dist/design-contract.js.map +1 -1
- package/packages/client-web/dist/index.d.ts +4 -1
- package/packages/client-web/dist/index.d.ts.map +1 -1
- package/packages/client-web/dist/index.js +11 -3
- package/packages/client-web/dist/index.js.map +1 -1
- package/packages/client-web/dist/markdown.d.ts +5 -0
- package/packages/client-web/dist/markdown.d.ts.map +1 -0
- package/packages/client-web/dist/markdown.js +20 -0
- package/packages/client-web/dist/markdown.js.map +1 -0
- package/packages/client-web/dist/marketplace-catalog.d.ts +3 -0
- package/packages/client-web/dist/marketplace-catalog.d.ts.map +1 -0
- package/packages/client-web/dist/marketplace-catalog.js +10 -0
- package/packages/client-web/dist/marketplace-catalog.js.map +1 -0
- package/packages/client-web/dist/marketplace-navigation.d.ts +19 -0
- package/packages/client-web/dist/marketplace-navigation.d.ts.map +1 -0
- package/packages/client-web/dist/marketplace-navigation.js +31 -0
- package/packages/client-web/dist/marketplace-navigation.js.map +1 -0
- package/packages/client-web/dist/message-content.d.ts +9 -0
- package/packages/client-web/dist/message-content.d.ts.map +1 -0
- package/packages/client-web/dist/message-content.js +54 -0
- package/packages/client-web/dist/message-content.js.map +1 -0
- package/packages/client-web/dist/plugin-navigation.d.ts +3 -0
- package/packages/client-web/dist/plugin-navigation.d.ts.map +1 -0
- package/packages/client-web/dist/plugin-navigation.js +10 -0
- package/packages/client-web/dist/plugin-navigation.js.map +1 -0
- package/packages/client-web/dist/plugin-search.d.ts +2 -0
- package/packages/client-web/dist/plugin-search.d.ts.map +1 -0
- package/packages/client-web/dist/plugin-search.js +7 -0
- package/packages/client-web/dist/plugin-search.js.map +1 -0
- package/packages/client-web/dist/plugin-stars-view.d.ts +12 -0
- package/packages/client-web/dist/plugin-stars-view.d.ts.map +1 -0
- package/packages/client-web/dist/plugin-stars-view.js +8 -0
- package/packages/client-web/dist/plugin-stars-view.js.map +1 -0
- package/packages/client-web/dist/prompt-completion.d.ts +13 -0
- package/packages/client-web/dist/prompt-completion.d.ts.map +1 -0
- package/packages/client-web/dist/prompt-completion.js +17 -0
- package/packages/client-web/dist/prompt-completion.js.map +1 -0
- package/packages/client-web/dist/react-room.d.ts +2 -1
- package/packages/client-web/dist/react-room.d.ts.map +1 -1
- package/packages/client-web/dist/react-room.js +2347 -93
- package/packages/client-web/dist/react-room.js.map +1 -1
- package/packages/client-web/dist/runtime-events.d.ts +4 -0
- package/packages/client-web/dist/runtime-events.d.ts.map +1 -0
- package/packages/client-web/dist/runtime-events.js +29 -0
- package/packages/client-web/dist/runtime-events.js.map +1 -0
- package/packages/client-web/package.json +19 -7
- package/packages/client-web/src/annotation-ui.ts +29 -0
- package/packages/client-web/src/browser-session-view.ts +13 -0
- package/packages/client-web/src/control-room.ts +359 -11
- package/packages/client-web/src/design-contract.ts +248 -26
- package/packages/client-web/src/index.ts +17 -4
- package/packages/client-web/src/markdown.tsx +22 -0
- package/packages/client-web/src/marketplace-catalog.ts +10 -0
- package/packages/client-web/src/marketplace-navigation.ts +46 -0
- package/packages/client-web/src/message-content.ts +51 -0
- package/packages/client-web/src/plugin-navigation.ts +9 -0
- package/packages/client-web/src/plugin-search.ts +5 -0
- package/packages/client-web/src/plugin-stars-view.ts +19 -0
- package/packages/client-web/src/prompt-completion.ts +24 -0
- package/packages/client-web/src/react-room.tsx +7360 -54
- package/packages/client-web/src/runtime-events.ts +29 -0
- package/packages/client-web/test/annotation-ui.test.ts +21 -0
- package/packages/client-web/test/browser-session-view.test.ts +17 -0
- package/packages/client-web/test/design-contract.test.ts +46 -1
- package/packages/client-web/test/marketplace-catalog.test.ts +52 -0
- package/packages/client-web/test/message-content.test.ts +43 -0
- package/packages/client-web/test/plugin-navigation.test.ts +16 -0
- package/packages/client-web/test/plugin-search.test.ts +22 -0
- package/packages/client-web/test/plugin-stars-view.test.ts +20 -0
- package/packages/client-web/test/prompt-completion.test.ts +21 -0
- package/packages/client-web/test/runtime-events.test.ts +28 -0
- package/packages/client-web/tsconfig.build.json +13 -1
- package/packages/client-web/tsconfig.json +11 -1
- package/packages/core/LICENSE +9 -0
- package/packages/core/dist/boot.d.ts.map +1 -1
- package/packages/core/dist/boot.js +42 -3
- package/packages/core/dist/boot.js.map +1 -1
- package/packages/core/dist/config.d.ts +2 -0
- package/packages/core/dist/config.d.ts.map +1 -0
- package/packages/core/dist/config.js +8 -0
- package/packages/core/dist/config.js.map +1 -0
- package/packages/core/dist/http.d.ts +8 -0
- package/packages/core/dist/http.d.ts.map +1 -0
- package/packages/core/dist/http.js +27 -0
- package/packages/core/dist/http.js.map +1 -0
- package/packages/core/dist/index.d.ts +2 -0
- package/packages/core/dist/index.d.ts.map +1 -1
- package/packages/core/dist/index.js +2 -0
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/plugins/agent-teams.d.ts +17 -0
- package/packages/core/dist/plugins/agent-teams.d.ts.map +1 -0
- package/packages/core/dist/plugins/agent-teams.js +298 -0
- package/packages/core/dist/plugins/agent-teams.js.map +1 -0
- package/packages/core/dist/plugins/anchored-standard.d.ts +14 -0
- package/packages/core/dist/plugins/anchored-standard.d.ts.map +1 -0
- package/packages/core/dist/plugins/anchored-standard.js +84 -0
- package/packages/core/dist/plugins/anchored-standard.js.map +1 -0
- package/packages/core/dist/plugins/annotation.d.ts +18 -0
- package/packages/core/dist/plugins/annotation.d.ts.map +1 -0
- package/packages/core/dist/plugins/annotation.js +94 -0
- package/packages/core/dist/plugins/annotation.js.map +1 -0
- package/packages/core/dist/plugins/archify.d.ts +23 -0
- package/packages/core/dist/plugins/archify.d.ts.map +1 -0
- package/packages/core/dist/plugins/archify.js +98 -0
- package/packages/core/dist/plugins/archify.js.map +1 -0
- package/packages/core/dist/plugins/at-file.d.ts +8 -0
- package/packages/core/dist/plugins/at-file.d.ts.map +1 -0
- package/packages/core/dist/plugins/at-file.js +52 -0
- package/packages/core/dist/plugins/at-file.js.map +1 -0
- package/packages/core/dist/plugins/auto-mode.d.ts +15 -0
- package/packages/core/dist/plugins/auto-mode.d.ts.map +1 -0
- package/packages/core/dist/plugins/auto-mode.js +114 -0
- package/packages/core/dist/plugins/auto-mode.js.map +1 -0
- package/packages/core/dist/plugins/better-sidebar.d.ts +37 -0
- package/packages/core/dist/plugins/better-sidebar.d.ts.map +1 -0
- package/packages/core/dist/plugins/better-sidebar.js +89 -0
- package/packages/core/dist/plugins/better-sidebar.js.map +1 -0
- package/packages/core/dist/plugins/browser-fetch.d.ts +14 -0
- package/packages/core/dist/plugins/browser-fetch.d.ts.map +1 -0
- package/packages/core/dist/plugins/browser-fetch.js +167 -0
- package/packages/core/dist/plugins/browser-fetch.js.map +1 -0
- package/packages/core/dist/plugins/browser-session.d.ts +14 -0
- package/packages/core/dist/plugins/browser-session.d.ts.map +1 -0
- package/packages/core/dist/plugins/browser-session.js +265 -0
- package/packages/core/dist/plugins/browser-session.js.map +1 -0
- package/packages/core/dist/plugins/canvas-draw.d.ts +8 -0
- package/packages/core/dist/plugins/canvas-draw.d.ts.map +1 -0
- package/packages/core/dist/plugins/canvas-draw.js +88 -0
- package/packages/core/dist/plugins/canvas-draw.js.map +1 -0
- package/packages/core/dist/plugins/change-verifier.d.ts +8 -0
- package/packages/core/dist/plugins/change-verifier.d.ts.map +1 -0
- package/packages/core/dist/plugins/change-verifier.js +67 -0
- package/packages/core/dist/plugins/change-verifier.js.map +1 -0
- package/packages/core/dist/plugins/cleaner.d.ts +8 -0
- package/packages/core/dist/plugins/cleaner.d.ts.map +1 -0
- package/packages/core/dist/plugins/cleaner.js +56 -0
- package/packages/core/dist/plugins/cleaner.js.map +1 -0
- package/packages/core/dist/plugins/cli-notifier.d.ts +15 -0
- package/packages/core/dist/plugins/cli-notifier.d.ts.map +1 -0
- package/packages/core/dist/plugins/cli-notifier.js +110 -0
- package/packages/core/dist/plugins/cli-notifier.js.map +1 -0
- package/packages/core/dist/plugins/code2skill.d.ts +8 -0
- package/packages/core/dist/plugins/code2skill.d.ts.map +1 -0
- package/packages/core/dist/plugins/code2skill.js +95 -0
- package/packages/core/dist/plugins/code2skill.js.map +1 -0
- package/packages/core/dist/plugins/colleague-skill.d.ts +27 -0
- package/packages/core/dist/plugins/colleague-skill.d.ts.map +1 -0
- package/packages/core/dist/plugins/colleague-skill.js +99 -0
- package/packages/core/dist/plugins/colleague-skill.js.map +1 -0
- package/packages/core/dist/plugins/context-doctor.d.ts +30 -0
- package/packages/core/dist/plugins/context-doctor.d.ts.map +1 -0
- package/packages/core/dist/plugins/context-doctor.js +95 -0
- package/packages/core/dist/plugins/context-doctor.js.map +1 -0
- package/packages/core/dist/plugins/context.d.ts +8 -0
- package/packages/core/dist/plugins/context.d.ts.map +1 -0
- package/packages/core/dist/plugins/context.js +87 -0
- package/packages/core/dist/plugins/context.js.map +1 -0
- package/packages/core/dist/plugins/cost-meter.d.ts +32 -0
- package/packages/core/dist/plugins/cost-meter.d.ts.map +1 -0
- package/packages/core/dist/plugins/cost-meter.js +204 -0
- package/packages/core/dist/plugins/cost-meter.js.map +1 -0
- package/packages/core/dist/plugins/dependency-checker.d.ts +27 -0
- package/packages/core/dist/plugins/dependency-checker.d.ts.map +1 -0
- package/packages/core/dist/plugins/dependency-checker.js +221 -0
- package/packages/core/dist/plugins/dependency-checker.js.map +1 -0
- package/packages/core/dist/plugins/docker-sandbox.d.ts +8 -0
- package/packages/core/dist/plugins/docker-sandbox.d.ts.map +1 -0
- package/packages/core/dist/plugins/docker-sandbox.js +102 -0
- package/packages/core/dist/plugins/docker-sandbox.js.map +1 -0
- package/packages/core/dist/plugins/fail-logger.d.ts +8 -0
- package/packages/core/dist/plugins/fail-logger.d.ts.map +1 -0
- package/packages/core/dist/plugins/fail-logger.js +51 -0
- package/packages/core/dist/plugins/fail-logger.js.map +1 -0
- package/packages/core/dist/plugins/genui.d.ts +8 -0
- package/packages/core/dist/plugins/genui.d.ts.map +1 -0
- package/packages/core/dist/plugins/genui.js +79 -0
- package/packages/core/dist/plugins/genui.js.map +1 -0
- package/packages/core/dist/plugins/git-time-capsule.d.ts +9 -0
- package/packages/core/dist/plugins/git-time-capsule.d.ts.map +1 -0
- package/packages/core/dist/plugins/git-time-capsule.js +90 -0
- package/packages/core/dist/plugins/git-time-capsule.js.map +1 -0
- package/packages/core/dist/plugins/graph-memory.d.ts +16 -0
- package/packages/core/dist/plugins/graph-memory.d.ts.map +1 -0
- package/packages/core/dist/plugins/graph-memory.js +382 -0
- package/packages/core/dist/plugins/graph-memory.js.map +1 -0
- package/packages/core/dist/plugins/history-compressor.d.ts +15 -0
- package/packages/core/dist/plugins/history-compressor.d.ts.map +1 -0
- package/packages/core/dist/plugins/history-compressor.js +80 -0
- package/packages/core/dist/plugins/history-compressor.js.map +1 -0
- package/packages/core/dist/plugins/hol-guard.d.ts +29 -0
- package/packages/core/dist/plugins/hol-guard.d.ts.map +1 -0
- package/packages/core/dist/plugins/hol-guard.js +139 -0
- package/packages/core/dist/plugins/hol-guard.js.map +1 -0
- package/packages/core/dist/plugins/i18n-pair.d.ts +8 -0
- package/packages/core/dist/plugins/i18n-pair.d.ts.map +1 -0
- package/packages/core/dist/plugins/i18n-pair.js +76 -0
- package/packages/core/dist/plugins/i18n-pair.js.map +1 -0
- package/packages/core/dist/plugins/image-compressor.d.ts +8 -0
- package/packages/core/dist/plugins/image-compressor.d.ts.map +1 -0
- package/packages/core/dist/plugins/image-compressor.js +150 -0
- package/packages/core/dist/plugins/image-compressor.js.map +1 -0
- package/packages/core/dist/plugins/llm-verifier.d.ts +42 -0
- package/packages/core/dist/plugins/llm-verifier.d.ts.map +1 -0
- package/packages/core/dist/plugins/llm-verifier.js +128 -0
- package/packages/core/dist/plugins/llm-verifier.js.map +1 -0
- package/packages/core/dist/plugins/mcp-client.d.ts +19 -0
- package/packages/core/dist/plugins/mcp-client.d.ts.map +1 -0
- package/packages/core/dist/plugins/mcp-client.js +534 -0
- package/packages/core/dist/plugins/mcp-client.js.map +1 -0
- package/packages/core/dist/plugins/mcp-panel.d.ts +14 -0
- package/packages/core/dist/plugins/mcp-panel.d.ts.map +1 -0
- package/packages/core/dist/plugins/mcp-panel.js +180 -0
- package/packages/core/dist/plugins/mcp-panel.js.map +1 -0
- package/packages/core/dist/plugins/memory.d.ts +15 -0
- package/packages/core/dist/plugins/memory.d.ts.map +1 -0
- package/packages/core/dist/plugins/memory.js +161 -0
- package/packages/core/dist/plugins/memory.js.map +1 -0
- package/packages/core/dist/plugins/mirage-bridge.d.ts +23 -0
- package/packages/core/dist/plugins/mirage-bridge.d.ts.map +1 -0
- package/packages/core/dist/plugins/mirage-bridge.js +149 -0
- package/packages/core/dist/plugins/mirage-bridge.js.map +1 -0
- package/packages/core/dist/plugins/mock-server.d.ts +22 -0
- package/packages/core/dist/plugins/mock-server.d.ts.map +1 -0
- package/packages/core/dist/plugins/mock-server.js +149 -0
- package/packages/core/dist/plugins/mock-server.js.map +1 -0
- package/packages/core/dist/plugins/model.d.ts +1 -1
- package/packages/core/dist/plugins/model.d.ts.map +1 -1
- package/packages/core/dist/plugins/model.js +3 -1
- 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 +5 -2
- package/packages/core/dist/plugins/models.js.map +1 -1
- package/packages/core/dist/plugins/modlens.d.ts +8 -0
- package/packages/core/dist/plugins/modlens.d.ts.map +1 -0
- package/packages/core/dist/plugins/modlens.js +63 -0
- package/packages/core/dist/plugins/modlens.js.map +1 -0
- package/packages/core/dist/plugins/module-search.d.ts +27 -0
- package/packages/core/dist/plugins/module-search.d.ts.map +1 -0
- package/packages/core/dist/plugins/module-search.js +174 -0
- package/packages/core/dist/plugins/module-search.js.map +1 -0
- package/packages/core/dist/plugins/obsidian-sync.d.ts +14 -0
- package/packages/core/dist/plugins/obsidian-sync.d.ts.map +1 -0
- package/packages/core/dist/plugins/obsidian-sync.js +79 -0
- package/packages/core/dist/plugins/obsidian-sync.js.map +1 -0
- package/packages/core/dist/plugins/openpets.d.ts +14 -0
- package/packages/core/dist/plugins/openpets.d.ts.map +1 -0
- package/packages/core/dist/plugins/openpets.js +99 -0
- package/packages/core/dist/plugins/openpets.js.map +1 -0
- package/packages/core/dist/plugins/plan-execute.d.ts +8 -0
- package/packages/core/dist/plugins/plan-execute.d.ts.map +1 -0
- package/packages/core/dist/plugins/plan-execute.js +70 -0
- package/packages/core/dist/plugins/plan-execute.js.map +1 -0
- package/packages/core/dist/plugins/plugin-check.d.ts +38 -0
- package/packages/core/dist/plugins/plugin-check.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-check.js +227 -0
- package/packages/core/dist/plugins/plugin-check.js.map +1 -0
- package/packages/core/dist/plugins/plugin-dev.d.ts +8 -0
- package/packages/core/dist/plugins/plugin-dev.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-dev.js +44 -0
- package/packages/core/dist/plugins/plugin-dev.js.map +1 -0
- package/packages/core/dist/plugins/plugin-finder.d.ts +16 -0
- package/packages/core/dist/plugins/plugin-finder.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-finder.js +98 -0
- package/packages/core/dist/plugins/plugin-finder.js.map +1 -0
- package/packages/core/dist/plugins/plugin-radar.d.ts +29 -0
- package/packages/core/dist/plugins/plugin-radar.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-radar.js +146 -0
- package/packages/core/dist/plugins/plugin-radar.js.map +1 -0
- package/packages/core/dist/plugins/plugin-stars.d.ts +45 -0
- package/packages/core/dist/plugins/plugin-stars.d.ts.map +1 -0
- package/packages/core/dist/plugins/plugin-stars.js +165 -0
- package/packages/core/dist/plugins/plugin-stars.js.map +1 -0
- package/packages/core/dist/plugins/prompt-guard.d.ts +8 -0
- package/packages/core/dist/plugins/prompt-guard.d.ts.map +1 -0
- package/packages/core/dist/plugins/prompt-guard.js +114 -0
- package/packages/core/dist/plugins/prompt-guard.js.map +1 -0
- package/packages/core/dist/plugins/prompt-library.d.ts +25 -0
- package/packages/core/dist/plugins/prompt-library.d.ts.map +1 -0
- package/packages/core/dist/plugins/prompt-library.js +142 -0
- package/packages/core/dist/plugins/prompt-library.js.map +1 -0
- package/packages/core/dist/plugins/readme-gen.d.ts +25 -0
- package/packages/core/dist/plugins/readme-gen.d.ts.map +1 -0
- package/packages/core/dist/plugins/readme-gen.js +139 -0
- package/packages/core/dist/plugins/readme-gen.js.map +1 -0
- package/packages/core/dist/plugins/recall-unread.d.ts +24 -0
- package/packages/core/dist/plugins/recall-unread.d.ts.map +1 -0
- package/packages/core/dist/plugins/recall-unread.js +124 -0
- package/packages/core/dist/plugins/recall-unread.js.map +1 -0
- package/packages/core/dist/plugins/resources.d.ts +1 -0
- package/packages/core/dist/plugins/resources.d.ts.map +1 -1
- package/packages/core/dist/plugins/resources.js +31 -22
- package/packages/core/dist/plugins/resources.js.map +1 -1
- package/packages/core/dist/plugins/reverse-skill.d.ts +23 -0
- package/packages/core/dist/plugins/reverse-skill.d.ts.map +1 -0
- package/packages/core/dist/plugins/reverse-skill.js +60 -0
- package/packages/core/dist/plugins/reverse-skill.js.map +1 -0
- package/packages/core/dist/plugins/reviewer-bot.d.ts +14 -0
- package/packages/core/dist/plugins/reviewer-bot.d.ts.map +1 -0
- package/packages/core/dist/plugins/reviewer-bot.js +133 -0
- package/packages/core/dist/plugins/reviewer-bot.js.map +1 -0
- package/packages/core/dist/plugins/runtime-doctor.d.ts +33 -0
- package/packages/core/dist/plugins/runtime-doctor.d.ts.map +1 -0
- package/packages/core/dist/plugins/runtime-doctor.js +114 -0
- package/packages/core/dist/plugins/runtime-doctor.js.map +1 -0
- package/packages/core/dist/plugins/runtime.d.ts.map +1 -1
- package/packages/core/dist/plugins/runtime.js +63 -14
- package/packages/core/dist/plugins/runtime.js.map +1 -1
- package/packages/core/dist/plugins/secure-audit.d.ts +31 -0
- package/packages/core/dist/plugins/secure-audit.d.ts.map +1 -0
- package/packages/core/dist/plugins/secure-audit.js +121 -0
- package/packages/core/dist/plugins/secure-audit.js.map +1 -0
- package/packages/core/dist/plugins/session-bookmarks.d.ts +15 -0
- package/packages/core/dist/plugins/session-bookmarks.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-bookmarks.js +87 -0
- package/packages/core/dist/plugins/session-bookmarks.js.map +1 -0
- package/packages/core/dist/plugins/session-bridge.d.ts +44 -0
- package/packages/core/dist/plugins/session-bridge.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-bridge.js +265 -0
- package/packages/core/dist/plugins/session-bridge.js.map +1 -0
- package/packages/core/dist/plugins/session-compare.d.ts +33 -0
- package/packages/core/dist/plugins/session-compare.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-compare.js +150 -0
- package/packages/core/dist/plugins/session-compare.js.map +1 -0
- package/packages/core/dist/plugins/session-export.d.ts +9 -0
- package/packages/core/dist/plugins/session-export.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-export.js +93 -0
- package/packages/core/dist/plugins/session-export.js.map +1 -0
- package/packages/core/dist/plugins/session-insights.d.ts +8 -0
- package/packages/core/dist/plugins/session-insights.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-insights.js +47 -0
- package/packages/core/dist/plugins/session-insights.js.map +1 -0
- package/packages/core/dist/plugins/session-search.d.ts +20 -0
- package/packages/core/dist/plugins/session-search.d.ts.map +1 -0
- package/packages/core/dist/plugins/session-search.js +122 -0
- package/packages/core/dist/plugins/session-search.js.map +1 -0
- package/packages/core/dist/plugins/session.d.ts.map +1 -1
- package/packages/core/dist/plugins/session.js +4 -2
- package/packages/core/dist/plugins/session.js.map +1 -1
- package/packages/core/dist/plugins/skill-catalog.d.ts +26 -0
- package/packages/core/dist/plugins/skill-catalog.d.ts.map +1 -0
- package/packages/core/dist/plugins/skill-catalog.js +97 -0
- package/packages/core/dist/plugins/skill-catalog.js.map +1 -0
- package/packages/core/dist/plugins/skill-guard.d.ts +26 -0
- package/packages/core/dist/plugins/skill-guard.d.ts.map +1 -0
- package/packages/core/dist/plugins/skill-guard.js +139 -0
- package/packages/core/dist/plugins/skill-guard.js.map +1 -0
- package/packages/core/dist/plugins/sql-lens.d.ts +8 -0
- package/packages/core/dist/plugins/sql-lens.d.ts.map +1 -0
- package/packages/core/dist/plugins/sql-lens.js +85 -0
- package/packages/core/dist/plugins/sql-lens.js.map +1 -0
- package/packages/core/dist/plugins/stdio.d.ts +1 -1
- package/packages/core/dist/plugins/stdio.d.ts.map +1 -1
- package/packages/core/dist/plugins/stdio.js +3 -1
- package/packages/core/dist/plugins/stdio.js.map +1 -1
- package/packages/core/dist/plugins/synapse.d.ts +38 -0
- package/packages/core/dist/plugins/synapse.d.ts.map +1 -0
- package/packages/core/dist/plugins/synapse.js +93 -0
- package/packages/core/dist/plugins/synapse.js.map +1 -0
- package/packages/core/dist/plugins/tab-manager.d.ts +8 -0
- package/packages/core/dist/plugins/tab-manager.d.ts.map +1 -0
- package/packages/core/dist/plugins/tab-manager.js +135 -0
- package/packages/core/dist/plugins/tab-manager.js.map +1 -0
- package/packages/core/dist/plugins/taskboard.d.ts +15 -0
- package/packages/core/dist/plugins/taskboard.d.ts.map +1 -0
- package/packages/core/dist/plugins/taskboard.js +347 -0
- package/packages/core/dist/plugins/taskboard.js.map +1 -0
- package/packages/core/dist/plugins/telemetry-blocker.d.ts +8 -0
- package/packages/core/dist/plugins/telemetry-blocker.d.ts.map +1 -0
- package/packages/core/dist/plugins/telemetry-blocker.js +57 -0
- package/packages/core/dist/plugins/telemetry-blocker.js.map +1 -0
- package/packages/core/dist/plugins/test-harness.d.ts +8 -0
- package/packages/core/dist/plugins/test-harness.d.ts.map +1 -0
- package/packages/core/dist/plugins/test-harness.js +64 -0
- package/packages/core/dist/plugins/test-harness.js.map +1 -0
- package/packages/core/dist/plugins/theme-studio.d.ts +29 -0
- package/packages/core/dist/plugins/theme-studio.d.ts.map +1 -0
- package/packages/core/dist/plugins/theme-studio.js +141 -0
- package/packages/core/dist/plugins/theme-studio.js.map +1 -0
- package/packages/core/dist/plugins/token-guard.d.ts +15 -0
- package/packages/core/dist/plugins/token-guard.d.ts.map +1 -0
- package/packages/core/dist/plugins/token-guard.js +78 -0
- package/packages/core/dist/plugins/token-guard.js.map +1 -0
- package/packages/core/dist/plugins/tools.d.ts.map +1 -1
- package/packages/core/dist/plugins/tools.js +5 -2
- package/packages/core/dist/plugins/tools.js.map +1 -1
- package/packages/core/dist/plugins/turn-rewind.d.ts +19 -0
- package/packages/core/dist/plugins/turn-rewind.d.ts.map +1 -0
- package/packages/core/dist/plugins/turn-rewind.js +74 -0
- package/packages/core/dist/plugins/turn-rewind.js.map +1 -0
- package/packages/core/dist/plugins/undo-savepoint.d.ts +17 -0
- package/packages/core/dist/plugins/undo-savepoint.d.ts.map +1 -0
- package/packages/core/dist/plugins/undo-savepoint.js +247 -0
- package/packages/core/dist/plugins/undo-savepoint.js.map +1 -0
- package/packages/core/dist/plugins/vision-toolkit.d.ts +17 -0
- package/packages/core/dist/plugins/vision-toolkit.d.ts.map +1 -0
- package/packages/core/dist/plugins/vision-toolkit.js +145 -0
- package/packages/core/dist/plugins/vision-toolkit.js.map +1 -0
- package/packages/core/dist/plugins/web-research.d.ts +17 -0
- package/packages/core/dist/plugins/web-research.d.ts.map +1 -0
- package/packages/core/dist/plugins/web-research.js +275 -0
- package/packages/core/dist/plugins/web-research.js.map +1 -0
- package/packages/core/dist/plugins/workspace-navigator.d.ts +36 -0
- package/packages/core/dist/plugins/workspace-navigator.d.ts.map +1 -0
- package/packages/core/dist/plugins/workspace-navigator.js +150 -0
- package/packages/core/dist/plugins/workspace-navigator.js.map +1 -0
- package/packages/core/dist/plugins/workspace-search.d.ts +8 -0
- package/packages/core/dist/plugins/workspace-search.d.ts.map +1 -0
- package/packages/core/dist/plugins/workspace-search.js +134 -0
- package/packages/core/dist/plugins/workspace-search.js.map +1 -0
- package/packages/core/dist/plugins/yaml-validator.d.ts +8 -0
- package/packages/core/dist/plugins/yaml-validator.d.ts.map +1 -0
- package/packages/core/dist/plugins/yaml-validator.js +94 -0
- package/packages/core/dist/plugins/yaml-validator.js.map +1 -0
- package/packages/core/dist/profile.d.ts +1 -0
- package/packages/core/dist/profile.d.ts.map +1 -1
- package/packages/core/dist/profile.js +3 -0
- package/packages/core/dist/profile.js.map +1 -1
- package/packages/core/dist/runtime.d.ts.map +1 -1
- package/packages/core/dist/runtime.js +13 -4
- package/packages/core/dist/runtime.js.map +1 -1
- package/packages/core/dist/services.d.ts +55 -0
- package/packages/core/dist/services.d.ts.map +1 -1
- package/packages/core/dist/services.js +58 -2
- package/packages/core/dist/services.js.map +1 -1
- package/packages/core/dist/stdio.d.ts +13 -2
- package/packages/core/dist/stdio.d.ts.map +1 -1
- package/packages/core/dist/stdio.js +75 -9
- package/packages/core/dist/stdio.js.map +1 -1
- package/packages/core/dist/workspace-path.d.ts +12 -0
- package/packages/core/dist/workspace-path.d.ts.map +1 -0
- package/packages/core/dist/workspace-path.js +62 -0
- package/packages/core/dist/workspace-path.js.map +1 -0
- package/packages/core/package.json +18 -8
- package/packages/core/profiles/default/cordis.yml +85 -0
- package/packages/core/profiles/development/cordis.yml +1 -1
- package/packages/core/src/boot.ts +38 -2
- package/packages/core/src/config.ts +5 -0
- package/packages/core/src/http.ts +32 -0
- package/packages/core/src/index.ts +2 -0
- package/packages/core/src/plugins/agent-teams.ts +291 -0
- package/packages/core/src/plugins/anchored-standard.ts +88 -0
- package/packages/core/src/plugins/annotation.ts +106 -0
- package/packages/core/src/plugins/archify.ts +124 -0
- package/packages/core/src/plugins/at-file.ts +54 -0
- package/packages/core/src/plugins/auto-mode.ts +123 -0
- package/packages/core/src/plugins/better-sidebar.ts +117 -0
- package/packages/core/src/plugins/browser-fetch.ts +171 -0
- package/packages/core/src/plugins/browser-session.ts +287 -0
- package/packages/core/src/plugins/canvas-draw.ts +90 -0
- package/packages/core/src/plugins/change-verifier.ts +79 -0
- package/packages/core/src/plugins/cleaner.ts +61 -0
- package/packages/core/src/plugins/cli-notifier.ts +125 -0
- package/packages/core/src/plugins/code2skill.ts +96 -0
- package/packages/core/src/plugins/colleague-skill.ts +122 -0
- package/packages/core/src/plugins/context-doctor.ts +117 -0
- package/packages/core/src/plugins/context.ts +102 -0
- package/packages/core/src/plugins/cost-meter.ts +231 -0
- package/packages/core/src/plugins/dependency-checker.ts +241 -0
- package/packages/core/src/plugins/docker-sandbox.ts +100 -0
- package/packages/core/src/plugins/fail-logger.ts +51 -0
- package/packages/core/src/plugins/genui.ts +88 -0
- package/packages/core/src/plugins/git-time-capsule.ts +97 -0
- package/packages/core/src/plugins/graph-memory.ts +394 -0
- package/packages/core/src/plugins/history-compressor.ts +81 -0
- package/packages/core/src/plugins/hol-guard.ts +153 -0
- package/packages/core/src/plugins/i18n-pair.ts +82 -0
- package/packages/core/src/plugins/image-compressor.ts +144 -0
- package/packages/core/src/plugins/llm-verifier.ts +164 -0
- package/packages/core/src/plugins/mcp-client.ts +559 -0
- package/packages/core/src/plugins/mcp-panel.ts +190 -0
- package/packages/core/src/plugins/memory.ts +176 -0
- package/packages/core/src/plugins/mirage-bridge.ts +179 -0
- package/packages/core/src/plugins/mock-server.ts +158 -0
- package/packages/core/src/plugins/model.ts +3 -1
- package/packages/core/src/plugins/models.ts +5 -2
- package/packages/core/src/plugins/modlens.ts +63 -0
- package/packages/core/src/plugins/module-search.ts +201 -0
- package/packages/core/src/plugins/obsidian-sync.ts +83 -0
- package/packages/core/src/plugins/openpets.ts +109 -0
- package/packages/core/src/plugins/plan-execute.ts +76 -0
- package/packages/core/src/plugins/plugin-check.ts +232 -0
- package/packages/core/src/plugins/plugin-dev.ts +47 -0
- package/packages/core/src/plugins/plugin-finder.ts +108 -0
- package/packages/core/src/plugins/plugin-radar.ts +179 -0
- package/packages/core/src/plugins/plugin-stars.ts +205 -0
- package/packages/core/src/plugins/prompt-guard.ts +122 -0
- package/packages/core/src/plugins/prompt-library.ts +165 -0
- package/packages/core/src/plugins/readme-gen.ts +147 -0
- package/packages/core/src/plugins/recall-unread.ts +142 -0
- package/packages/core/src/plugins/resources.ts +28 -21
- package/packages/core/src/plugins/reverse-skill.ts +79 -0
- package/packages/core/src/plugins/reviewer-bot.ts +146 -0
- package/packages/core/src/plugins/runtime-doctor.ts +137 -0
- package/packages/core/src/plugins/runtime.ts +61 -14
- package/packages/core/src/plugins/secure-audit.ts +146 -0
- package/packages/core/src/plugins/session-bookmarks.ts +89 -0
- package/packages/core/src/plugins/session-bridge.ts +299 -0
- package/packages/core/src/plugins/session-compare.ts +180 -0
- package/packages/core/src/plugins/session-export.ts +99 -0
- package/packages/core/src/plugins/session-insights.ts +47 -0
- package/packages/core/src/plugins/session-search.ts +126 -0
- package/packages/core/src/plugins/session.ts +4 -2
- package/packages/core/src/plugins/skill-catalog.ts +117 -0
- package/packages/core/src/plugins/skill-guard.ts +152 -0
- package/packages/core/src/plugins/sql-lens.ts +92 -0
- package/packages/core/src/plugins/stdio.ts +3 -1
- package/packages/core/src/plugins/synapse.ts +130 -0
- package/packages/core/src/plugins/tab-manager.ts +135 -0
- package/packages/core/src/plugins/taskboard.ts +412 -0
- package/packages/core/src/plugins/telemetry-blocker.ts +62 -0
- package/packages/core/src/plugins/test-harness.ts +67 -0
- package/packages/core/src/plugins/theme-studio.ts +165 -0
- package/packages/core/src/plugins/token-guard.ts +84 -0
- package/packages/core/src/plugins/tools.ts +5 -2
- package/packages/core/src/plugins/turn-rewind.ts +86 -0
- package/packages/core/src/plugins/undo-savepoint.ts +284 -0
- package/packages/core/src/plugins/vision-toolkit.ts +153 -0
- package/packages/core/src/plugins/web-research.ts +289 -0
- package/packages/core/src/plugins/workspace-navigator.ts +164 -0
- package/packages/core/src/plugins/workspace-search.ts +139 -0
- package/packages/core/src/plugins/yaml-validator.ts +97 -0
- package/packages/core/src/profile.ts +3 -0
- package/packages/core/src/runtime.ts +11 -4
- package/packages/core/src/services.ts +110 -3
- package/packages/core/src/stdio.ts +79 -9
- package/packages/core/src/workspace-path.ts +69 -0
- package/packages/core/test/agent-teams.test.ts +24 -0
- package/packages/core/test/archify.test.ts +33 -0
- package/packages/core/test/better-sidebar.test.ts +125 -0
- package/packages/core/test/boot.test.ts +49 -6
- package/packages/core/test/colleague-skill.test.ts +74 -0
- package/packages/core/test/config.test.ts +121 -0
- package/packages/core/test/context-doctor.test.ts +32 -0
- package/packages/core/test/dependency-checker.test.ts +60 -0
- package/packages/core/test/git-time-capsule.test.ts +115 -0
- package/packages/core/test/http.test.ts +34 -0
- package/packages/core/test/llm-verifier.test.ts +72 -0
- package/packages/core/test/mirage-bridge.test.ts +54 -0
- package/packages/core/test/module-search.test.ts +78 -0
- package/packages/core/test/plugin-check.test.ts +16 -0
- package/packages/core/test/plugin-stars.test.ts +55 -0
- package/packages/core/test/profiles.integration.test.ts +49 -15
- package/packages/core/test/prompt-library.test.ts +56 -0
- package/packages/core/test/readme-gen.test.ts +45 -0
- package/packages/core/test/recall-unread.test.ts +35 -0
- package/packages/core/test/registry.test.ts +48 -0
- package/packages/core/test/reverse-skill.test.ts +40 -0
- package/packages/core/test/runtime-doctor.test.ts +55 -0
- package/packages/core/test/runtime-fixture.ts +4 -4
- package/packages/core/test/runtime.test.ts +90 -1
- package/packages/core/test/secure-audit.test.ts +16 -0
- package/packages/core/test/services.test.ts +2024 -5
- package/packages/core/test/session-bookmarks.test.ts +62 -0
- package/packages/core/test/session-bridge.test.ts +103 -0
- package/packages/core/test/session-compare.test.ts +94 -0
- package/packages/core/test/session-export.test.ts +54 -0
- package/packages/core/test/session-search.test.ts +30 -0
- package/packages/core/test/skill-catalog.test.ts +18 -0
- package/packages/core/test/skill-guard.test.ts +21 -0
- package/packages/core/test/stdio-args.test.ts +178 -0
- package/packages/core/test/theme-studio.test.ts +39 -0
- package/packages/core/test/token-guard.test.ts +34 -0
- package/packages/core/test/turn-rewind.test.ts +19 -0
- package/packages/core/test/vision-toolkit.test.ts +38 -0
- package/packages/core/test/workspace-git-status.test.ts +37 -0
- package/packages/core/test/workspace-navigator.test.ts +33 -0
- package/packages/core/test/workspace-path.test.ts +34 -0
- package/packages/core/tsconfig.build.json +1 -3
- package/packages/core/tsconfig.json +1 -4
- package/packages/host-webserver/LICENSE +9 -0
- package/packages/host-webserver/dist/index.js +1 -1
- package/packages/host-webserver/dist/index.js.map +1 -1
- package/packages/host-webserver/package.json +17 -7
- package/packages/host-webserver/src/index.ts +1 -1
- package/packages/host-webserver/test/index.test.ts +4 -1
- package/packages/host-webserver/tsconfig.build.json +1 -1
- package/packages/host-webserver/tsconfig.json +1 -1
- package/apps/web/dist/assets/index-Bwqek8LF.js +0 -20
- package/apps/web/dist/assets/index-DCHSASjq.css +0 -1
- package/packages/api-gateway/dist/marketplace-registry.json +0 -62
- package/packages/api-gateway/src/marketplace-registry.json +0 -62
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { mkdir } from "node:fs/promises";
|
|
3
|
+
import { DatabaseSync } from "node:sqlite";
|
|
4
|
+
import { basename, dirname, resolve } from "node:path";
|
|
5
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
6
|
+
import z from "@deepseek-ai/schemastery";
|
|
7
|
+
import { Type } from "@earendil-works/pi-ai";
|
|
8
|
+
import { defineTool, type AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
9
|
+
|
|
10
|
+
const defaultFileName = "taskboard.sqlite";
|
|
11
|
+
const maxTitleLength = 200;
|
|
12
|
+
const maxDescriptionBytes = 16 * 1024;
|
|
13
|
+
const maxQueryLength = 160;
|
|
14
|
+
const maxTasksPerList = 100;
|
|
15
|
+
|
|
16
|
+
type TaskStatus = "backlog" | "todo" | "in_progress" | "in_review" | "blocked" | "canceled" | "done";
|
|
17
|
+
type TaskPriority = "low" | "medium" | "high" | "urgent";
|
|
18
|
+
type Task = {
|
|
19
|
+
id: string;
|
|
20
|
+
key: string;
|
|
21
|
+
workspace: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
status: TaskStatus;
|
|
25
|
+
priority: TaskPriority;
|
|
26
|
+
dueDate?: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
version: number;
|
|
30
|
+
};
|
|
31
|
+
type TaskReport = { status?: TaskStatus; query?: string; total: number; tasks: Task[] };
|
|
32
|
+
type TaskboardPanel = { workspace: string; total: number; counts: Record<TaskStatus, number>; recent: Task[] };
|
|
33
|
+
|
|
34
|
+
export interface TaskboardPluginConfig {
|
|
35
|
+
fileName?: string;
|
|
36
|
+
keyPrefix?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Config: z<TaskboardPluginConfig> = z.object({
|
|
40
|
+
fileName: z.string().default(defaultFileName),
|
|
41
|
+
keyPrefix: z.string().default("PIH"),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const statuses: readonly TaskStatus[] = ["backlog", "todo", "in_progress", "in_review", "blocked", "canceled", "done"];
|
|
45
|
+
const priorities: readonly TaskPriority[] = ["low", "medium", "high", "urgent"];
|
|
46
|
+
|
|
47
|
+
function isTaskStatus(value: unknown): value is TaskStatus {
|
|
48
|
+
return typeof value === "string" && statuses.includes(value as TaskStatus);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function isTaskPriority(value: unknown): value is TaskPriority {
|
|
52
|
+
return typeof value === "string" && priorities.includes(value as TaskPriority);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function normalizeFilePath(agentDir: string, fileName: string | undefined): string {
|
|
56
|
+
const name = (fileName ?? defaultFileName).trim();
|
|
57
|
+
if (name === "" || basename(name) !== name || !/\.(?:sqlite|db)$/iu.test(name))
|
|
58
|
+
throw new Error("Taskboard fileName must be a single .sqlite or .db filename");
|
|
59
|
+
return resolve(agentDir, name);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function normalizeText(value: string, field: string, maxLength: number): string {
|
|
63
|
+
const normalized = value.trim();
|
|
64
|
+
if (normalized.length === 0 || normalized.length > maxLength) throw new Error(`${field} must contain 1-${maxLength} characters`);
|
|
65
|
+
return normalized;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function normalizeDescription(value: string | undefined): string {
|
|
69
|
+
const normalized = value?.trim() ?? "";
|
|
70
|
+
if (Buffer.byteLength(normalized, "utf8") > maxDescriptionBytes) throw new Error(`Taskboard description must be at most ${maxDescriptionBytes} bytes`);
|
|
71
|
+
return normalized;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function normalizeDueDate(value: string | undefined): string | undefined {
|
|
75
|
+
if (value === undefined) return undefined;
|
|
76
|
+
const normalized = value.trim();
|
|
77
|
+
if (!/^\d{4}-\d{2}-\d{2}$/u.test(normalized) || !Number.isFinite(Date.parse(`${normalized}T00:00:00Z`)))
|
|
78
|
+
throw new Error("Taskboard dueDate must use YYYY-MM-DD");
|
|
79
|
+
return normalized;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function normalizeKeyPrefix(value: string | undefined): string {
|
|
83
|
+
const normalized = (value ?? "PIH").trim().toUpperCase();
|
|
84
|
+
if (!/^[A-Z][A-Z0-9_-]{1,11}$/u.test(normalized)) throw new Error("Taskboard keyPrefix must contain 2-12 letters, numbers, _ or -");
|
|
85
|
+
return normalized;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function taskFromRow(row: Record<string, unknown>): Task {
|
|
89
|
+
if (
|
|
90
|
+
typeof row.id !== "string" ||
|
|
91
|
+
typeof row.task_key !== "string" ||
|
|
92
|
+
typeof row.workspace !== "string" ||
|
|
93
|
+
typeof row.title !== "string" ||
|
|
94
|
+
typeof row.description !== "string" ||
|
|
95
|
+
!isTaskStatus(row.status) ||
|
|
96
|
+
!isTaskPriority(row.priority) ||
|
|
97
|
+
(row.due_date !== null && typeof row.due_date !== "string") ||
|
|
98
|
+
typeof row.created_at !== "string" ||
|
|
99
|
+
typeof row.updated_at !== "string" ||
|
|
100
|
+
typeof row.version !== "number"
|
|
101
|
+
)
|
|
102
|
+
throw new Error("Taskboard database contains an invalid task row");
|
|
103
|
+
return {
|
|
104
|
+
id: row.id,
|
|
105
|
+
key: row.task_key,
|
|
106
|
+
workspace: row.workspace,
|
|
107
|
+
title: row.title,
|
|
108
|
+
description: row.description,
|
|
109
|
+
status: row.status,
|
|
110
|
+
priority: row.priority,
|
|
111
|
+
...(row.due_date === null ? {} : { dueDate: row.due_date }),
|
|
112
|
+
createdAt: row.created_at,
|
|
113
|
+
updatedAt: row.updated_at,
|
|
114
|
+
version: row.version,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function withTransaction<T>(database: DatabaseSync, operation: () => T): T {
|
|
119
|
+
database.exec("BEGIN IMMEDIATE");
|
|
120
|
+
try {
|
|
121
|
+
const result = operation();
|
|
122
|
+
database.exec("COMMIT");
|
|
123
|
+
return result;
|
|
124
|
+
} catch (error) {
|
|
125
|
+
database.exec("ROLLBACK");
|
|
126
|
+
throw error;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export default {
|
|
131
|
+
name: "pi-taskboard",
|
|
132
|
+
inject: ["piHarnessLaunch", "piPluginUi", "piTools"],
|
|
133
|
+
Config,
|
|
134
|
+
apply(context: Context, config: TaskboardPluginConfig) {
|
|
135
|
+
const filePath = normalizeFilePath(context.piHarnessLaunch.agentDir, config.fileName);
|
|
136
|
+
const workspace = resolve(context.piHarnessLaunch.cwd);
|
|
137
|
+
const keyPrefix = normalizeKeyPrefix(config.keyPrefix);
|
|
138
|
+
let writeQueue = Promise.resolve();
|
|
139
|
+
|
|
140
|
+
const withDatabase = async <T>(operation: (database: DatabaseSync) => T): Promise<T> => {
|
|
141
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
142
|
+
const database = new DatabaseSync(filePath);
|
|
143
|
+
database.exec(`
|
|
144
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
145
|
+
id TEXT PRIMARY KEY,
|
|
146
|
+
task_key TEXT NOT NULL UNIQUE,
|
|
147
|
+
workspace TEXT NOT NULL,
|
|
148
|
+
title TEXT NOT NULL,
|
|
149
|
+
description TEXT NOT NULL DEFAULT '',
|
|
150
|
+
status TEXT NOT NULL CHECK (status IN ('backlog','todo','in_progress','in_review','blocked','canceled','done')),
|
|
151
|
+
priority TEXT NOT NULL CHECK (priority IN ('low','medium','high','urgent')),
|
|
152
|
+
due_date TEXT,
|
|
153
|
+
created_at TEXT NOT NULL,
|
|
154
|
+
updated_at TEXT NOT NULL,
|
|
155
|
+
version INTEGER NOT NULL
|
|
156
|
+
);
|
|
157
|
+
CREATE INDEX IF NOT EXISTS tasks_workspace_updated ON tasks(workspace, updated_at DESC);
|
|
158
|
+
CREATE INDEX IF NOT EXISTS tasks_workspace_status ON tasks(workspace, status);
|
|
159
|
+
`);
|
|
160
|
+
try {
|
|
161
|
+
return operation(database);
|
|
162
|
+
} finally {
|
|
163
|
+
database.close();
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const mutate = async <T>(operation: (database: DatabaseSync) => T): Promise<T> => {
|
|
168
|
+
let result: T | undefined;
|
|
169
|
+
const run = async (): Promise<void> => {
|
|
170
|
+
result = await withDatabase((database) => withTransaction(database, () => operation(database)));
|
|
171
|
+
};
|
|
172
|
+
writeQueue = writeQueue.catch(() => undefined).then(run);
|
|
173
|
+
await writeQueue;
|
|
174
|
+
return result as T;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
const findTask = (database: DatabaseSync, key: string): Task | undefined => {
|
|
178
|
+
const row = database.prepare("SELECT * FROM tasks WHERE workspace = ? AND task_key = ?").get(workspace, key) as Record<string, unknown> | undefined;
|
|
179
|
+
return row === undefined ? undefined : taskFromRow(row);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const createTool = defineTool({
|
|
183
|
+
name: "taskboard_create",
|
|
184
|
+
label: "Create taskboard task",
|
|
185
|
+
description: "Create a local project task with a stable readable key and an explicit priority.",
|
|
186
|
+
promptSnippet: "create a taskboard task for this workspace",
|
|
187
|
+
parameters: Type.Object({
|
|
188
|
+
title: Type.String(),
|
|
189
|
+
description: Type.Optional(Type.String()),
|
|
190
|
+
priority: Type.Optional(Type.Union([Type.Literal("low"), Type.Literal("medium"), Type.Literal("high"), Type.Literal("urgent")])),
|
|
191
|
+
dueDate: Type.Optional(Type.String()),
|
|
192
|
+
}),
|
|
193
|
+
async execute(_toolCallId, params): Promise<AgentToolResult<Task>> {
|
|
194
|
+
const title = normalizeText(params.title, "Taskboard title", maxTitleLength);
|
|
195
|
+
const description = normalizeDescription(params.description);
|
|
196
|
+
const priority = params.priority ?? "medium";
|
|
197
|
+
const dueDate = normalizeDueDate(params.dueDate);
|
|
198
|
+
const task = await mutate((database) => {
|
|
199
|
+
const rows = database.prepare("SELECT task_key FROM tasks WHERE task_key LIKE ?").all(`${keyPrefix}-%`) as Array<Record<string, unknown>>;
|
|
200
|
+
const nextNumber =
|
|
201
|
+
rows.reduce((max, row) => {
|
|
202
|
+
const match = typeof row.task_key === "string" ? row.task_key.match(new RegExp(`^${keyPrefix}-(\\d+)$`, "u")) : null;
|
|
203
|
+
return match === null ? max : Math.max(max, Number.parseInt(match[1] ?? "0", 10));
|
|
204
|
+
}, 0) + 1;
|
|
205
|
+
const now = new Date().toISOString();
|
|
206
|
+
const next: Task = {
|
|
207
|
+
id: randomUUID(),
|
|
208
|
+
key: `${keyPrefix}-${nextNumber}`,
|
|
209
|
+
workspace,
|
|
210
|
+
title,
|
|
211
|
+
description,
|
|
212
|
+
status: "backlog",
|
|
213
|
+
priority,
|
|
214
|
+
...(dueDate === undefined ? {} : { dueDate }),
|
|
215
|
+
createdAt: now,
|
|
216
|
+
updatedAt: now,
|
|
217
|
+
version: 1,
|
|
218
|
+
};
|
|
219
|
+
database
|
|
220
|
+
.prepare(
|
|
221
|
+
"INSERT INTO tasks (id, task_key, workspace, title, description, status, priority, due_date, created_at, updated_at, version) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
|
|
222
|
+
)
|
|
223
|
+
.run(
|
|
224
|
+
next.id,
|
|
225
|
+
next.key,
|
|
226
|
+
next.workspace,
|
|
227
|
+
next.title,
|
|
228
|
+
next.description,
|
|
229
|
+
next.status,
|
|
230
|
+
next.priority,
|
|
231
|
+
next.dueDate ?? null,
|
|
232
|
+
next.createdAt,
|
|
233
|
+
next.updatedAt,
|
|
234
|
+
next.version,
|
|
235
|
+
);
|
|
236
|
+
return next;
|
|
237
|
+
});
|
|
238
|
+
return { content: [{ type: "text", text: `Task created: ${task.key} (${task.id}) [${task.status}] ${task.title}` }], details: task };
|
|
239
|
+
},
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
const listTool = defineTool({
|
|
243
|
+
name: "taskboard_list",
|
|
244
|
+
label: "List taskboard tasks",
|
|
245
|
+
description: "List bounded local tasks for this workspace, optionally filtered by status or text.",
|
|
246
|
+
promptSnippet: "list taskboard tasks for this workspace",
|
|
247
|
+
parameters: Type.Object({
|
|
248
|
+
status: Type.Optional(
|
|
249
|
+
Type.Union(statuses.map((status) => Type.Literal(status)) as [ReturnType<typeof Type.Literal>, ...ReturnType<typeof Type.Literal>[]]),
|
|
250
|
+
),
|
|
251
|
+
query: Type.Optional(Type.String()),
|
|
252
|
+
limit: Type.Optional(Type.Number()),
|
|
253
|
+
}),
|
|
254
|
+
async execute(_toolCallId, params): Promise<AgentToolResult<TaskReport>> {
|
|
255
|
+
const query = params.query === undefined ? undefined : normalizeText(params.query, "Taskboard query", maxQueryLength);
|
|
256
|
+
const limit = Math.max(1, Math.min(maxTasksPerList, Math.trunc(params.limit ?? 20)));
|
|
257
|
+
const report = await withDatabase((database) => {
|
|
258
|
+
const rows = database.prepare("SELECT * FROM tasks WHERE workspace = ? ORDER BY updated_at DESC, task_key DESC").all(workspace) as Array<
|
|
259
|
+
Record<string, unknown>
|
|
260
|
+
>;
|
|
261
|
+
const all = rows.map(taskFromRow).filter((task) => {
|
|
262
|
+
if (params.status !== undefined && task.status !== params.status) return false;
|
|
263
|
+
if (query === undefined) return true;
|
|
264
|
+
const needle = query.toLocaleLowerCase();
|
|
265
|
+
return `${task.key} ${task.title} ${task.description}`.toLocaleLowerCase().includes(needle);
|
|
266
|
+
});
|
|
267
|
+
return {
|
|
268
|
+
...(params.status === undefined ? {} : { status: params.status as TaskStatus }),
|
|
269
|
+
...(query === undefined ? {} : { query }),
|
|
270
|
+
total: all.length,
|
|
271
|
+
tasks: all.slice(0, limit),
|
|
272
|
+
} satisfies TaskReport;
|
|
273
|
+
});
|
|
274
|
+
return {
|
|
275
|
+
content: [
|
|
276
|
+
{
|
|
277
|
+
type: "text",
|
|
278
|
+
text:
|
|
279
|
+
report.total === 0
|
|
280
|
+
? "No taskboard tasks found."
|
|
281
|
+
: report.tasks.map((task) => `${task.key} [${task.status}/${task.priority}] ${task.title}`).join("\n"),
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
details: report,
|
|
285
|
+
};
|
|
286
|
+
},
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
const updateTool = defineTool({
|
|
290
|
+
name: "taskboard_update",
|
|
291
|
+
label: "Update taskboard task",
|
|
292
|
+
description: "Update task details or move a task through the agent-owned workflow; completion requires taskboard_accept.",
|
|
293
|
+
promptSnippet: "update a taskboard task without bypassing completion review",
|
|
294
|
+
parameters: Type.Object({
|
|
295
|
+
key: Type.String(),
|
|
296
|
+
title: Type.Optional(Type.String()),
|
|
297
|
+
description: Type.Optional(Type.String()),
|
|
298
|
+
status: Type.Optional(
|
|
299
|
+
Type.Union(
|
|
300
|
+
statuses.filter((status) => status !== "done").map((status) => Type.Literal(status)) as [
|
|
301
|
+
ReturnType<typeof Type.Literal>,
|
|
302
|
+
...ReturnType<typeof Type.Literal>[],
|
|
303
|
+
],
|
|
304
|
+
),
|
|
305
|
+
),
|
|
306
|
+
priority: Type.Optional(Type.Union([Type.Literal("low"), Type.Literal("medium"), Type.Literal("high"), Type.Literal("urgent")])),
|
|
307
|
+
dueDate: Type.Optional(Type.String()),
|
|
308
|
+
clearDueDate: Type.Optional(Type.Boolean()),
|
|
309
|
+
}),
|
|
310
|
+
async execute(_toolCallId, params): Promise<AgentToolResult<Task>> {
|
|
311
|
+
const key = normalizeText(params.key, "Taskboard key", 32).toUpperCase();
|
|
312
|
+
if (params.status === "done") throw new Error("Taskboard tasks must reach in_review before taskboard_accept can mark them done");
|
|
313
|
+
if (
|
|
314
|
+
params.title === undefined &&
|
|
315
|
+
params.description === undefined &&
|
|
316
|
+
params.status === undefined &&
|
|
317
|
+
params.priority === undefined &&
|
|
318
|
+
params.dueDate === undefined &&
|
|
319
|
+
params.clearDueDate !== true
|
|
320
|
+
)
|
|
321
|
+
throw new Error("Taskboard update requires at least one changed field");
|
|
322
|
+
if (params.dueDate !== undefined && params.clearDueDate === true) throw new Error("Taskboard dueDate and clearDueDate cannot be used together");
|
|
323
|
+
const title = params.title === undefined ? undefined : normalizeText(params.title, "Taskboard title", maxTitleLength);
|
|
324
|
+
const description = params.description === undefined ? undefined : normalizeDescription(params.description);
|
|
325
|
+
const dueDate = normalizeDueDate(params.dueDate);
|
|
326
|
+
const task = await mutate((database) => {
|
|
327
|
+
const current = findTask(database, key);
|
|
328
|
+
if (current === undefined) throw new Error(`Taskboard task not found: ${key}`);
|
|
329
|
+
if (current.status === "done" || current.status === "canceled") throw new Error(`Taskboard task ${key} is ${current.status} and cannot be updated`);
|
|
330
|
+
const next: Task = {
|
|
331
|
+
...current,
|
|
332
|
+
...(title === undefined ? {} : { title }),
|
|
333
|
+
...(description === undefined ? {} : { description }),
|
|
334
|
+
...(params.status === undefined ? {} : { status: params.status as TaskStatus }),
|
|
335
|
+
...(params.priority === undefined ? {} : { priority: params.priority }),
|
|
336
|
+
...(dueDate === undefined || params.clearDueDate === true ? {} : { dueDate }),
|
|
337
|
+
updatedAt: new Date().toISOString(),
|
|
338
|
+
version: current.version + 1,
|
|
339
|
+
};
|
|
340
|
+
if (params.clearDueDate === true) delete next.dueDate;
|
|
341
|
+
database
|
|
342
|
+
.prepare(
|
|
343
|
+
"UPDATE tasks SET title = ?, description = ?, status = ?, priority = ?, due_date = ?, updated_at = ?, version = ? WHERE workspace = ? AND task_key = ? AND version = ?",
|
|
344
|
+
)
|
|
345
|
+
.run(next.title, next.description, next.status, next.priority, next.dueDate ?? null, next.updatedAt, next.version, workspace, key, current.version);
|
|
346
|
+
return next;
|
|
347
|
+
});
|
|
348
|
+
return { content: [{ type: "text", text: `Task updated: ${task.key} [${task.status}] ${task.title}` }], details: task };
|
|
349
|
+
},
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
const acceptTool = defineTool({
|
|
353
|
+
name: "taskboard_accept",
|
|
354
|
+
label: "Accept taskboard task",
|
|
355
|
+
description: "Accept a task in review as done after explicit confirmation.",
|
|
356
|
+
promptSnippet: "accept a reviewed taskboard task as done",
|
|
357
|
+
parameters: Type.Object({ key: Type.String(), confirm: Type.Boolean() }),
|
|
358
|
+
async execute(_toolCallId, params): Promise<AgentToolResult<Task>> {
|
|
359
|
+
const key = normalizeText(params.key, "Taskboard key", 32).toUpperCase();
|
|
360
|
+
if (params.confirm !== true) throw new Error("Accepting a task requires confirm=true");
|
|
361
|
+
const task = await mutate((database) => {
|
|
362
|
+
const current = findTask(database, key);
|
|
363
|
+
if (current === undefined) throw new Error(`Taskboard task not found: ${key}`);
|
|
364
|
+
if (current.status !== "in_review") throw new Error(`Taskboard task ${key} must be in_review before acceptance`);
|
|
365
|
+
const next = { ...current, status: "done" as const, updatedAt: new Date().toISOString(), version: current.version + 1 };
|
|
366
|
+
database
|
|
367
|
+
.prepare("UPDATE tasks SET status = ?, updated_at = ?, version = ? WHERE workspace = ? AND task_key = ? AND version = ?")
|
|
368
|
+
.run("done", next.updatedAt, next.version, workspace, key, current.version);
|
|
369
|
+
return next;
|
|
370
|
+
});
|
|
371
|
+
return { content: [{ type: "text", text: `Task accepted: ${task.key} [done] ${task.title}` }], details: task };
|
|
372
|
+
},
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
const disposers: Array<() => void> = [];
|
|
376
|
+
try {
|
|
377
|
+
disposers.push(context.piTools.register(createTool));
|
|
378
|
+
disposers.push(context.piTools.register(listTool));
|
|
379
|
+
disposers.push(context.piTools.register(updateTool));
|
|
380
|
+
disposers.push(context.piTools.register(acceptTool));
|
|
381
|
+
disposers.push(
|
|
382
|
+
context.piPluginUi.register({
|
|
383
|
+
id: "taskboard-panel",
|
|
384
|
+
pluginId: "@pi-harness/core/plugins/taskboard",
|
|
385
|
+
title: "Taskboard",
|
|
386
|
+
description: "本工作区的本地任务、状态流转与验收队列。",
|
|
387
|
+
icon: "▦",
|
|
388
|
+
read: async (): Promise<TaskboardPanel> => {
|
|
389
|
+
const report = await withDatabase((database) => {
|
|
390
|
+
const rows = database.prepare("SELECT * FROM tasks WHERE workspace = ? ORDER BY updated_at DESC, task_key DESC").all(workspace) as Array<
|
|
391
|
+
Record<string, unknown>
|
|
392
|
+
>;
|
|
393
|
+
const tasks = rows.map(taskFromRow);
|
|
394
|
+
const counts = Object.fromEntries(statuses.map((status) => [status, tasks.filter((task) => task.status === status).length])) as Record<
|
|
395
|
+
TaskStatus,
|
|
396
|
+
number
|
|
397
|
+
>;
|
|
398
|
+
return { workspace, total: tasks.length, counts, recent: tasks.slice(0, 8) };
|
|
399
|
+
});
|
|
400
|
+
return report;
|
|
401
|
+
},
|
|
402
|
+
}),
|
|
403
|
+
);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
for (const dispose of disposers.reverse()) dispose();
|
|
406
|
+
throw error;
|
|
407
|
+
}
|
|
408
|
+
context.effect(() => () => {
|
|
409
|
+
for (const dispose of disposers.reverse()) dispose();
|
|
410
|
+
});
|
|
411
|
+
},
|
|
412
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import { Type } from "@earendil-works/pi-ai";
|
|
3
|
+
import { defineTool, type AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
4
|
+
import type { PiTelemetryEvent, PiTelemetryService } from "../services.js";
|
|
5
|
+
|
|
6
|
+
type TelemetrySnapshot = { blocked: number; names: readonly string[] };
|
|
7
|
+
|
|
8
|
+
function eventName(value: string): string {
|
|
9
|
+
const name = value.trim().slice(0, 80);
|
|
10
|
+
if (name.length === 0) throw new Error("Telemetry event name must not be empty");
|
|
11
|
+
return name;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: "pi-telemetry-blocker",
|
|
16
|
+
inject: ["piPluginUi", "piTools"],
|
|
17
|
+
apply(context: Context) {
|
|
18
|
+
let blocked = 0;
|
|
19
|
+
const names: string[] = [];
|
|
20
|
+
const record = (event: PiTelemetryEvent): { blocked: true; name: string } => {
|
|
21
|
+
const name = eventName(event.name);
|
|
22
|
+
blocked += 1;
|
|
23
|
+
if (!names.includes(name)) names.push(name);
|
|
24
|
+
return { blocked: true, name };
|
|
25
|
+
};
|
|
26
|
+
const service: PiTelemetryService = {
|
|
27
|
+
enabled: false,
|
|
28
|
+
send: record,
|
|
29
|
+
snapshot: (): TelemetrySnapshot => ({ blocked, names: [...names] }),
|
|
30
|
+
};
|
|
31
|
+
context.provide("piTelemetry", service);
|
|
32
|
+
const unsubscribe = context.on("pi/telemetry", (event) => {
|
|
33
|
+
record(event);
|
|
34
|
+
});
|
|
35
|
+
const unregisterTool = context.piTools.register(
|
|
36
|
+
defineTool({
|
|
37
|
+
name: "telemetry_status",
|
|
38
|
+
label: "Telemetry status",
|
|
39
|
+
description: "Report the local telemetry policy. Pi Harness telemetry is disabled and no event properties are retained.",
|
|
40
|
+
promptSnippet: "check whether telemetry is enabled",
|
|
41
|
+
parameters: Type.Object({}),
|
|
42
|
+
execute(): Promise<AgentToolResult<TelemetrySnapshot>> {
|
|
43
|
+
const snapshot = service.snapshot();
|
|
44
|
+
return Promise.resolve({ content: [{ type: "text", text: `Telemetry disabled; blocked ${snapshot.blocked} event(s).` }], details: snapshot });
|
|
45
|
+
},
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
const disposePanel = context.piPluginUi.register({
|
|
49
|
+
id: "telemetry-blocker-panel",
|
|
50
|
+
pluginId: "@pi-harness/core/plugins/telemetry-blocker",
|
|
51
|
+
title: "Telemetry Blocker",
|
|
52
|
+
description: "默认关闭遥测,只保留事件名和计数,不保存事件属性。",
|
|
53
|
+
icon: "⊘",
|
|
54
|
+
read: () => ({ enabled: service.enabled, blocked, names: [...names] }),
|
|
55
|
+
});
|
|
56
|
+
context.effect(() => () => {
|
|
57
|
+
unsubscribe();
|
|
58
|
+
unregisterTool();
|
|
59
|
+
disposePanel();
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
import type { Context } from "@deepseek-ai/cordis";
|
|
4
|
+
import { Type } from "@earendil-works/pi-ai";
|
|
5
|
+
import { defineTool, type AgentToolResult } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
8
|
+
const allowedScripts = new Set(["test", "build", "format:check", "lint", "typecheck"]);
|
|
9
|
+
type TestRun = { script: string; command: string; exitCode: number; durationMs: number; output: string };
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "pi-test-harness",
|
|
13
|
+
inject: ["piHarnessLaunch", "piPluginUi", "piTools"],
|
|
14
|
+
apply(context: Context) {
|
|
15
|
+
let latest: TestRun | undefined;
|
|
16
|
+
const unregisterTool = context.piTools.register(
|
|
17
|
+
defineTool({
|
|
18
|
+
name: "run_project_tests",
|
|
19
|
+
label: "Run project tests",
|
|
20
|
+
description: "Run one approved npm script in the current workspace and return its real output.",
|
|
21
|
+
promptSnippet: "run an approved project verification script",
|
|
22
|
+
parameters: Type.Object({ script: Type.Optional(Type.String({ description: "One of test, build, format:check, lint, typecheck" })) }),
|
|
23
|
+
async execute(_toolCallId, params): Promise<AgentToolResult<TestRun>> {
|
|
24
|
+
const script = params.script?.trim() || "test";
|
|
25
|
+
if (!allowedScripts.has(script)) throw new Error(`Script is not allowed: ${script}`);
|
|
26
|
+
const started = Date.now();
|
|
27
|
+
try {
|
|
28
|
+
const result = await execFileAsync("npm", ["run", script], { cwd: context.piHarnessLaunch.cwd, timeout: 120_000, maxBuffer: 4 * 1024 * 1024 });
|
|
29
|
+
latest = {
|
|
30
|
+
script,
|
|
31
|
+
command: `npm run ${script}`,
|
|
32
|
+
exitCode: 0,
|
|
33
|
+
durationMs: Date.now() - started,
|
|
34
|
+
output: `${result.stdout}${result.stderr}`.slice(-12_000),
|
|
35
|
+
};
|
|
36
|
+
} catch (error) {
|
|
37
|
+
const failure = error as { code?: number | string; stdout?: string; stderr?: string; message?: string };
|
|
38
|
+
latest = {
|
|
39
|
+
script,
|
|
40
|
+
command: `npm run ${script}`,
|
|
41
|
+
exitCode: typeof failure.code === "number" ? failure.code : 1,
|
|
42
|
+
durationMs: Date.now() - started,
|
|
43
|
+
output: `${failure.stdout ?? ""}${failure.stderr ?? failure.message ?? ""}`.slice(-12_000),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const result = latest;
|
|
47
|
+
return {
|
|
48
|
+
content: [{ type: "text", text: `${result.command} exited with ${result.exitCode}.\n${result.output}` }],
|
|
49
|
+
details: result,
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
const disposePanel = context.piPluginUi.register({
|
|
55
|
+
id: "test-harness-panel",
|
|
56
|
+
pluginId: "@pi-harness/core/plugins/test-harness",
|
|
57
|
+
title: "Test Harness",
|
|
58
|
+
description: "执行受限 npm 验证脚本,并显示真实退出码、耗时和输出摘要。",
|
|
59
|
+
icon: "✓",
|
|
60
|
+
read: () => ({ allowedScripts: [...allowedScripts], latest: latest ?? null }),
|
|
61
|
+
});
|
|
62
|
+
context.effect(() => () => {
|
|
63
|
+
unregisterTool();
|
|
64
|
+
disposePanel();
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
};
|