pi-harness-runtime 1.1.0 → 1.1.2
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/.pi/plugins/herdr-clipboard/herdr-plugin.toml +22 -0
- package/.pi/plugins/herdr-clipboard/start-bridge.sh +29 -0
- package/.pi/plugins/herdr-clipboard/tmux-watch.sh +39 -0
- package/CHANGELOG.md +175 -13
- package/README.md +87 -1
- package/config.toml.example +35 -0
- package/harness/autonomous-review.ts +5 -2
- package/harness/e2e/chatgpt-quota-scraper.ts +478 -0
- package/harness/e2e/glm-quota-scraper.ts +449 -0
- package/harness/herdr-agents.ts +6 -2
- package/harness/loop-code-agent.ts +4 -1
- package/harness/loop-review-agent.ts +5 -6
- package/harness/notification-events.ts +2 -2
- package/harness/task-graph.d.ts +51 -0
- package/index.ts +147 -2
- package/package.json +17 -16
- package/packages/a2a-adapter/dist/index.d.ts +1 -0
- package/packages/a2a-adapter/dist/index.d.ts.map +1 -1
- package/packages/a2a-adapter/dist/index.js +1 -0
- package/packages/a2a-adapter/dist/index.js.map +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/a2a-adapter/src/discovery.ts +106 -0
- package/packages/a2a-adapter/src/index.ts +8 -0
- package/packages/architecture-generator/package.json +21 -0
- package/packages/architecture-generator/src/adr.ts +51 -0
- package/packages/architecture-generator/src/index.ts +9 -0
- package/packages/architecture-generator/src/mermaid.ts +76 -0
- package/packages/architecture-generator/src/types.ts +30 -0
- package/packages/auth/package.json +1 -1
- package/packages/autonomous-refactor/package.json +1 -1
- package/packages/autonomous-runtime/package.json +1 -1
- package/packages/cache-strategy/package.json +1 -1
- package/packages/capability-registry/package.json +1 -1
- package/packages/checkpoint/package.json +1 -1
- package/packages/cli-plugin-sdk/package.json +2 -2
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard/src/copy-sync.ts +52 -3
- package/packages/clipboard/src/index.ts +1 -0
- package/packages/clipboard/src/paste-bridge.ts +86 -0
- package/packages/clipboard-plugin/package.json +17 -0
- package/packages/clipboard-plugin/src/index.ts +74 -0
- package/packages/clipboard-plugin/src/types.ts +30 -0
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +2 -2
- package/packages/config-capture/package.json +23 -0
- package/packages/config-capture/src/index.ts +357 -0
- package/packages/context-compiler/package.json +1 -1
- package/packages/context-discovery/package.json +1 -1
- package/packages/context-manager/package.json +1 -1
- package/packages/cookie-sanitizer/package.json +1 -1
- package/packages/cost-optimizer/package.json +1 -1
- package/packages/dependency-analyzer/package.json +1 -1
- package/packages/django-plugin/package.json +1 -1
- package/packages/doc-generator/package.json +1 -1
- package/packages/evaluation-engine/package.json +1 -1
- package/packages/evaluation-runner/package.json +1 -1
- package/packages/event-bus/package.json +1 -1
- package/packages/event-bus/src/herdr-bus.ts +4 -1
- package/packages/event-store/package.json +1 -1
- package/packages/experience-replay/package.json +1 -1
- package/packages/feedback-collector/package.json +1 -1
- package/packages/file-copy-helper/package.json +17 -0
- package/packages/file-copy-helper/src/extension.debug.ts +226 -0
- package/packages/file-copy-helper/src/extension.ts +226 -0
- package/packages/file-copy-helper/src/index.ts +1 -0
- package/packages/framework-detector/package.json +1 -1
- package/packages/framework-plugin-sdk/package.json +1 -1
- package/packages/frappe-plugin/package.json +1 -1
- package/packages/generic-web-plugin/package.json +1 -1
- package/packages/health-monitor/package.json +1 -1
- package/packages/intent-analyzer/package.json +1 -1
- package/packages/knowledge-graph/package.json +24 -0
- package/packages/knowledge-graph/src/graph-extractor.ts +338 -0
- package/packages/knowledge-graph/src/index.ts +27 -0
- package/packages/knowledge-graph/src/mcp-client.ts +237 -0
- package/packages/knowledge-graph/src/provenance-linker.ts +101 -0
- package/packages/knowledge-graph/src/types.ts +86 -0
- package/packages/knowledge-retrieval/package.json +25 -0
- package/packages/knowledge-retrieval/src/index.ts +18 -0
- package/packages/knowledge-retrieval/src/mcp-client.ts +212 -0
- package/packages/knowledge-retrieval/src/types.ts +112 -0
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +21 -0
- package/packages/milestone-manager/src/engine.ts +105 -0
- package/packages/milestone-manager/src/index.ts +6 -0
- package/packages/milestone-manager/src/types.ts +28 -0
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/notification/src/adapters/line-adapter.ts +119 -0
- package/packages/notification/src/index.ts +1 -0
- package/packages/notification/src/notification-center.ts +6 -0
- package/packages/notification/src/types.ts +7 -2
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/package.json +12 -0
- package/packages/okf-indexer/src/cli.ts +25 -0
- package/packages/okf-indexer/src/indexer.ts +186 -0
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/privilege-broker/package.json +1 -1
- package/packages/project-analyzer/package.json +1 -1
- package/packages/project-bootstrap/package.json +24 -0
- package/packages/project-bootstrap/src/bootstrap.ts +166 -0
- package/packages/project-bootstrap/src/frappe.ts +97 -0
- package/packages/project-bootstrap/src/index.ts +27 -0
- package/packages/project-bootstrap/src/minimal.ts +45 -0
- package/packages/project-bootstrap/src/types.ts +66 -0
- package/packages/project-bootstrap/src/typescript.ts +114 -0
- package/packages/projection-engine/package.json +1 -1
- package/packages/prompt-compiler/package.json +1 -1
- package/packages/prompt-versioning/package.json +1 -1
- package/packages/provider-adapter-sdk/package.json +1 -1
- package/packages/provider-router/dist/src/types.js +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/providers/src/adapters.ts +1 -1
- package/packages/providers/src/deepagents-adapter.ts +2 -2
- package/packages/quota-manager/package.json +1 -1
- package/packages/quota-manager/src/quota-manager.ts +1 -4
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/release-manager/package.json +1 -1
- package/packages/requirement-compiler/package.json +1 -1
- package/packages/runtime/package.json +1 -1
- package/packages/runtime/src/runtime-api.ts +16 -16
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/dist/manager.d.ts.map +1 -1
- package/packages/session/dist/manager.js +3 -1
- package/packages/session/dist/manager.js.map +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session/src/manager.ts +4 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/sprint-planner/package.json +1 -1
- package/packages/subscription-engine/package.json +1 -1
- package/packages/task-compiler/package.json +1 -1
- package/packages/tencentdb-memory/package.json +23 -0
- package/packages/tencentdb-memory/src/client.ts +130 -0
- package/packages/tencentdb-memory/src/index.ts +32 -0
- package/packages/tencentdb-memory/src/loader.ts +150 -0
- package/packages/tencentdb-memory/src/mcp-tools.ts +213 -0
- package/packages/tencentdb-memory/src/types.ts +101 -0
- package/packages/tencentdb-sync/package.json +26 -0
- package/packages/tencentdb-sync/src/cli.ts +363 -0
- package/packages/tencentdb-sync/src/client.ts +268 -0
- package/packages/tencentdb-sync/src/config.ts +139 -0
- package/packages/tencentdb-sync/src/index.ts +15 -0
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/todo-bd-sync/src/detector.ts +25 -4
- package/packages/todo-bd-sync/src/extension.ts +8 -86
- package/packages/todo-bd-sync/src/task-analyzer.ts +314 -0
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/package.json +1 -1
- package/packages/types/src/agent-worker-types.d.ts +206 -0
- package/packages/types/src/ai-providers.d.ts +36 -0
- package/packages/types/src/runtime-types.d.ts +6 -0
- package/packages/workflow-events/package.json +1 -1
- package/packages/workspace-scanner/package.json +1 -1
- package/packages/worktree/package.json +1 -1
- package/packages/worktree/src/worktree.ts +1 -4
- package/packages/write-review/package.json +22 -0
- package/packages/write-review/src/blackboard.ts +249 -0
- package/packages/write-review/src/gate.ts +169 -0
- package/packages/write-review/src/index.ts +65 -0
- package/packages/write-review/src/injection.ts +190 -0
- package/packages/write-review/src/review.ts +206 -0
- package/packages/write-review/src/trigger.ts +133 -0
- package/packages/write-review/src/types.ts +90 -0
- package/prompts/agents/reviewer.md +57 -0
- package/prompts/agents/writer.md +42 -0
- package/prompts/slash-commands.md +40 -0
- package/prompts/tencentdb-connect.md +35 -0
- package/prompts/tencentdb-setup.md +101 -0
- package/prompts/tencentdb.md +88 -0
- package/prompts/write-review.md +50 -0
- package/scripts/check-version-sync.ts +80 -0
- package/scripts/convert-skills-to-okf.ts +168 -0
- package/scripts/copy-plugins.js +56 -0
- package/scripts/gist-auth.ts +64 -0
- package/scripts/gist-poll.sh +127 -0
- package/scripts/release/actions-monitor.ts +357 -0
- package/scripts/release/adapters/base.ts +95 -0
- package/scripts/release/adapters/detector.ts +181 -0
- package/scripts/release/adapters/node-workspace.ts +230 -0
- package/scripts/release/adapters/python.ts +236 -0
- package/scripts/release/adapters/rust.ts +129 -0
- package/scripts/release/adapters/tauri.ts +298 -0
- package/scripts/release/orchestrator.ts +278 -0
- package/scripts/release-all.ts +211 -0
- package/scripts/scan-secrets.sh +68 -0
- package/scripts/skills-sync.ts +487 -0
- package/packages/a2a-adapter/tsconfig.json +0 -5
- package/packages/auth/dist/minimax-browser-auth.d.ts +0 -89
- package/packages/auth/dist/minimax-browser-auth.d.ts.map +0 -1
- package/packages/auth/dist/minimax-browser-auth.js +0 -890
- package/packages/auth/dist/minimax-browser-auth.js.map +0 -1
- package/packages/auth/dist/run-minimax-auth.d.ts +0 -19
- package/packages/auth/dist/run-minimax-auth.d.ts.map +0 -1
- package/packages/auth/dist/run-minimax-auth.js +0 -112
- package/packages/auth/dist/run-minimax-auth.js.map +0 -1
- package/packages/auth/tsconfig.json +0 -9
- package/packages/autonomous-refactor/tsconfig.json +0 -5
- package/packages/autonomous-runtime/test/inbox.test.mjs +0 -266
- package/packages/autonomous-runtime/tsconfig.json +0 -22
- package/packages/autonomous-runtime/tsconfig.tsbuildinfo +0 -1
- package/packages/cache-strategy/tsconfig.json +0 -5
- package/packages/capability-registry/src/types.d.ts.map +0 -1
- package/packages/capability-registry/src/types.js +0 -10
- package/packages/capability-registry/src/types.js.map +0 -1
- package/packages/capability-registry/tsconfig.json +0 -22
- package/packages/checkpoint/tsconfig.json +0 -33
- package/packages/checkpoint/tsconfig.tsbuildinfo +0 -1
- package/packages/cli-plugin-sdk/tsconfig.json +0 -11
- package/packages/clipboard/dist/src/clipboard.d.ts +0 -11
- package/packages/clipboard/dist/src/clipboard.d.ts.map +0 -1
- package/packages/clipboard/dist/src/clipboard.js +0 -51
- package/packages/clipboard/dist/src/clipboard.js.map +0 -1
- package/packages/clipboard/dist/src/copy-sync.d.ts +0 -27
- package/packages/clipboard/dist/src/copy-sync.d.ts.map +0 -1
- package/packages/clipboard/dist/src/copy-sync.js +0 -170
- package/packages/clipboard/dist/src/copy-sync.js.map +0 -1
- package/packages/clipboard/dist/src/gist-relay.d.ts +0 -48
- package/packages/clipboard/dist/src/gist-relay.d.ts.map +0 -1
- package/packages/clipboard/dist/src/gist-relay.js +0 -186
- package/packages/clipboard/dist/src/gist-relay.js.map +0 -1
- package/packages/clipboard/dist/src/github-login.d.ts +0 -16
- package/packages/clipboard/dist/src/github-login.d.ts.map +0 -1
- package/packages/clipboard/dist/src/github-login.js +0 -69
- package/packages/clipboard/dist/src/github-login.js.map +0 -1
- package/packages/clipboard/dist/src/index.d.ts +0 -4
- package/packages/clipboard/dist/src/index.d.ts.map +0 -1
- package/packages/clipboard/dist/src/index.js +0 -3
- package/packages/clipboard/dist/src/index.js.map +0 -1
- package/packages/clipboard/dist/src/types.d.ts +0 -13
- package/packages/clipboard/dist/src/types.d.ts.map +0 -1
- package/packages/clipboard/dist/src/types.js +0 -5
- package/packages/clipboard/dist/src/types.js.map +0 -1
- package/packages/clipboard/test/mojibake.test.mjs +0 -143
- package/packages/clipboard/tsconfig.json +0 -10
- package/packages/code-generation/tsconfig.json +0 -33
- package/packages/code-generation/tsconfig.tsbuildinfo +0 -1
- package/packages/code-review/tsconfig.json +0 -33
- package/packages/code-review/tsconfig.tsbuildinfo +0 -1
- package/packages/codex-adapter/tsconfig.json +0 -5
- package/packages/context-compiler/tsconfig.json +0 -17
- package/packages/context-discovery/dist/src/discover.d.ts +0 -3
- package/packages/context-discovery/dist/src/discover.d.ts.map +0 -1
- package/packages/context-discovery/dist/src/discover.js +0 -42
- package/packages/context-discovery/dist/src/discover.js.map +0 -1
- package/packages/context-discovery/dist/src/discovery.d.ts +0 -28
- package/packages/context-discovery/dist/src/discovery.d.ts.map +0 -1
- package/packages/context-discovery/dist/src/discovery.js +0 -21
- package/packages/context-discovery/dist/src/discovery.js.map +0 -1
- package/packages/context-discovery/dist/src/index.d.ts +0 -3
- package/packages/context-discovery/dist/src/index.d.ts.map +0 -1
- package/packages/context-discovery/dist/src/index.js +0 -2
- package/packages/context-discovery/dist/src/index.js.map +0 -1
- package/packages/context-discovery/dist/src/types.d.ts +0 -16
- package/packages/context-discovery/dist/src/types.d.ts.map +0 -1
- package/packages/context-discovery/dist/src/types.js +0 -2
- package/packages/context-discovery/dist/src/types.js.map +0 -1
- package/packages/context-discovery/tsconfig.json +0 -10
- package/packages/context-manager/tsconfig.json +0 -6
- package/packages/cookie-sanitizer/tsconfig.json +0 -8
- package/packages/cost-optimizer/tsconfig.json +0 -22
- package/packages/dependency-analyzer/dist/src/analyzer.d.ts +0 -17
- package/packages/dependency-analyzer/dist/src/analyzer.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/src/analyzer.js +0 -119
- package/packages/dependency-analyzer/dist/src/analyzer.js.map +0 -1
- package/packages/dependency-analyzer/dist/src/imports.d.ts +0 -12
- package/packages/dependency-analyzer/dist/src/imports.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/src/imports.js +0 -73
- package/packages/dependency-analyzer/dist/src/imports.js.map +0 -1
- package/packages/dependency-analyzer/dist/src/index.d.ts +0 -4
- package/packages/dependency-analyzer/dist/src/index.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/src/index.js +0 -3
- package/packages/dependency-analyzer/dist/src/index.js.map +0 -1
- package/packages/dependency-analyzer/dist/src/types.d.ts +0 -28
- package/packages/dependency-analyzer/dist/src/types.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/src/types.js +0 -5
- package/packages/dependency-analyzer/dist/src/types.js.map +0 -1
- package/packages/dependency-analyzer/test/analyzer.test.js +0 -37
- package/packages/dependency-analyzer/tsconfig.json +0 -10
- package/packages/django-plugin/tsconfig.json +0 -12
- package/packages/doc-generator/tsconfig.json +0 -6
- package/packages/evaluation-engine/tsconfig.json +0 -8
- package/packages/evaluation-runner/tsconfig.json +0 -5
- package/packages/event-bus/dist/src/bus.d.ts +0 -15
- package/packages/event-bus/dist/src/bus.d.ts.map +0 -1
- package/packages/event-bus/dist/src/bus.js +0 -98
- package/packages/event-bus/dist/src/bus.js.map +0 -1
- package/packages/event-bus/dist/src/herdr-bus.d.ts +0 -121
- package/packages/event-bus/dist/src/herdr-bus.d.ts.map +0 -1
- package/packages/event-bus/dist/src/herdr-bus.js +0 -322
- package/packages/event-bus/dist/src/herdr-bus.js.map +0 -1
- package/packages/event-bus/dist/src/index.d.ts +0 -6
- package/packages/event-bus/dist/src/index.d.ts.map +0 -1
- package/packages/event-bus/dist/src/index.js +0 -4
- package/packages/event-bus/dist/src/index.js.map +0 -1
- package/packages/event-bus/dist/src/types.d.ts +0 -27
- package/packages/event-bus/dist/src/types.d.ts.map +0 -1
- package/packages/event-bus/dist/src/types.js +0 -10
- package/packages/event-bus/dist/src/types.js.map +0 -1
- package/packages/event-bus/tsconfig.json +0 -10
- package/packages/event-store/dist/src/index.d.ts +0 -3
- package/packages/event-store/dist/src/index.d.ts.map +0 -1
- package/packages/event-store/dist/src/index.js +0 -2
- package/packages/event-store/dist/src/index.js.map +0 -1
- package/packages/event-store/dist/src/store.d.ts +0 -15
- package/packages/event-store/dist/src/store.d.ts.map +0 -1
- package/packages/event-store/dist/src/store.js +0 -139
- package/packages/event-store/dist/src/store.js.map +0 -1
- package/packages/event-store/dist/src/types.d.ts +0 -48
- package/packages/event-store/dist/src/types.d.ts.map +0 -1
- package/packages/event-store/dist/src/types.js +0 -5
- package/packages/event-store/dist/src/types.js.map +0 -1
- package/packages/event-store/src/types.d.ts.map +0 -1
- package/packages/event-store/src/types.js +0 -5
- package/packages/event-store/src/types.js.map +0 -1
- package/packages/event-store/tsconfig.json +0 -10
- package/packages/experience-replay/tsconfig.json +0 -8
- package/packages/feedback-collector/tsconfig.json +0 -5
- package/packages/framework-detector/tsconfig.json +0 -33
- package/packages/framework-detector/tsconfig.tsbuildinfo +0 -1
- package/packages/framework-plugin-sdk/tsconfig.json +0 -33
- package/packages/framework-plugin-sdk/tsconfig.tsbuildinfo +0 -1
- package/packages/frappe-plugin/tsconfig.json +0 -12
- package/packages/generic-web-plugin/tsconfig.json +0 -12
- package/packages/health-monitor/tsconfig.json +0 -5
- package/packages/intent-analyzer/dist/src/analyzer.d.ts +0 -13
- package/packages/intent-analyzer/dist/src/analyzer.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/src/analyzer.js +0 -239
- package/packages/intent-analyzer/dist/src/analyzer.js.map +0 -1
- package/packages/intent-analyzer/dist/src/index.d.ts +0 -3
- package/packages/intent-analyzer/dist/src/index.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/src/index.js +0 -2
- package/packages/intent-analyzer/dist/src/index.js.map +0 -1
- package/packages/intent-analyzer/dist/src/types.d.ts +0 -26
- package/packages/intent-analyzer/dist/src/types.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/src/types.js +0 -7
- package/packages/intent-analyzer/dist/src/types.js.map +0 -1
- package/packages/intent-analyzer/tsconfig.json +0 -10
- package/packages/laravel-plugin/tsconfig.json +0 -12
- package/packages/learning-engine/tsconfig.json +0 -8
- package/packages/mcp-adapter/tsconfig.json +0 -8
- package/packages/memory-engine/tsconfig.json +0 -8
- package/packages/model-registry/src/types.d.ts.map +0 -1
- package/packages/model-registry/src/types.js +0 -5
- package/packages/model-registry/src/types.js.map +0 -1
- package/packages/model-registry/tsconfig.json +0 -22
- package/packages/nextjs-plugin/tsconfig.json +0 -12
- package/packages/notification/dist/adapters/email-adapter.d.ts +0 -17
- package/packages/notification/dist/adapters/email-adapter.d.ts.map +0 -1
- package/packages/notification/dist/adapters/email-adapter.js +0 -89
- package/packages/notification/dist/adapters/email-adapter.js.map +0 -1
- package/packages/notification/dist/adapters/ntfy-adapter.d.ts +0 -17
- package/packages/notification/dist/adapters/ntfy-adapter.d.ts.map +0 -1
- package/packages/notification/dist/adapters/ntfy-adapter.js +0 -84
- package/packages/notification/dist/adapters/ntfy-adapter.js.map +0 -1
- package/packages/notification/dist/adapters/telegram-adapter.d.ts +0 -17
- package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +0 -1
- package/packages/notification/dist/adapters/telegram-adapter.js +0 -88
- package/packages/notification/dist/adapters/telegram-adapter.js.map +0 -1
- package/packages/notification/dist/adapters/webhook-adapter.d.ts +0 -15
- package/packages/notification/dist/adapters/webhook-adapter.d.ts.map +0 -1
- package/packages/notification/dist/adapters/webhook-adapter.js +0 -64
- package/packages/notification/dist/adapters/webhook-adapter.js.map +0 -1
- package/packages/notification/dist/base-adapter.d.ts +0 -36
- package/packages/notification/dist/base-adapter.d.ts.map +0 -1
- package/packages/notification/dist/base-adapter.js +0 -39
- package/packages/notification/dist/base-adapter.js.map +0 -1
- package/packages/notification/dist/index.d.ts +0 -9
- package/packages/notification/dist/index.d.ts.map +0 -1
- package/packages/notification/dist/index.js +0 -9
- package/packages/notification/dist/index.js.map +0 -1
- package/packages/notification/dist/notification-center.d.ts +0 -46
- package/packages/notification/dist/notification-center.d.ts.map +0 -1
- package/packages/notification/dist/notification-center.js +0 -228
- package/packages/notification/dist/notification-center.js.map +0 -1
- package/packages/notification/dist/types.d.ts +0 -65
- package/packages/notification/dist/types.d.ts.map +0 -1
- package/packages/notification/dist/types.js +0 -7
- package/packages/notification/dist/types.js.map +0 -1
- package/packages/notification/tsconfig.json +0 -8
- package/packages/observability/tsconfig.json +0 -33
- package/packages/observability/tsconfig.tsbuildinfo +0 -1
- package/packages/performance-optimizer/tsconfig.json +0 -8
- package/packages/privilege-broker/config/privileges.yaml.example +0 -172
- package/packages/privilege-broker/tsconfig.json +0 -22
- package/packages/privilege-broker/tsconfig.tsbuildinfo +0 -1
- package/packages/project-analyzer/tsconfig.json +0 -33
- package/packages/project-analyzer/tsconfig.tsbuildinfo +0 -1
- package/packages/projection-engine/dist/src/engine.d.ts +0 -61
- package/packages/projection-engine/dist/src/engine.d.ts.map +0 -1
- package/packages/projection-engine/dist/src/engine.js +0 -87
- package/packages/projection-engine/dist/src/engine.js.map +0 -1
- package/packages/projection-engine/dist/src/index.d.ts +0 -2
- package/packages/projection-engine/dist/src/index.d.ts.map +0 -1
- package/packages/projection-engine/dist/src/index.js +0 -2
- package/packages/projection-engine/dist/src/index.js.map +0 -1
- package/packages/projection-engine/dist/src/project.d.ts +0 -3
- package/packages/projection-engine/dist/src/project.d.ts.map +0 -1
- package/packages/projection-engine/dist/src/project.js +0 -24
- package/packages/projection-engine/dist/src/project.js.map +0 -1
- package/packages/projection-engine/dist/src/types.d.ts +0 -55
- package/packages/projection-engine/dist/src/types.d.ts.map +0 -1
- package/packages/projection-engine/dist/src/types.js +0 -5
- package/packages/projection-engine/dist/src/types.js.map +0 -1
- package/packages/projection-engine/src/types.d.ts.map +0 -1
- package/packages/projection-engine/src/types.js +0 -5
- package/packages/projection-engine/src/types.js.map +0 -1
- package/packages/projection-engine/tsconfig.json +0 -10
- package/packages/prompt-compiler/tsconfig.json +0 -19
- package/packages/prompt-versioning/tsconfig.json +0 -5
- package/packages/provider-adapter-sdk/dist/tsconfig.tsbuildinfo +0 -1
- package/packages/provider-adapter-sdk/tsconfig.json +0 -34
- package/packages/provider-adapter-sdk/tsconfig.tsbuildinfo +0 -1
- package/packages/provider-router/tsconfig.json +0 -20
- package/packages/provider-selector/tsconfig.json +0 -6
- package/packages/providers/dist/adapters.d.ts +0 -133
- package/packages/providers/dist/adapters.d.ts.map +0 -1
- package/packages/providers/dist/adapters.js +0 -236
- package/packages/providers/dist/adapters.js.map +0 -1
- package/packages/providers/dist/deepagents-adapter.d.ts +0 -78
- package/packages/providers/dist/deepagents-adapter.d.ts.map +0 -1
- package/packages/providers/dist/deepagents-adapter.js +0 -323
- package/packages/providers/dist/deepagents-adapter.js.map +0 -1
- package/packages/providers/dist/glm-usage.d.ts +0 -102
- package/packages/providers/dist/glm-usage.d.ts.map +0 -1
- package/packages/providers/dist/glm-usage.js +0 -197
- package/packages/providers/dist/glm-usage.js.map +0 -1
- package/packages/providers/dist/index.d.ts +0 -11
- package/packages/providers/dist/index.d.ts.map +0 -1
- package/packages/providers/dist/index.js +0 -11
- package/packages/providers/dist/index.js.map +0 -1
- package/packages/providers/dist/openai-usage.d.ts +0 -103
- package/packages/providers/dist/openai-usage.d.ts.map +0 -1
- package/packages/providers/dist/openai-usage.js +0 -208
- package/packages/providers/dist/openai-usage.js.map +0 -1
- package/packages/providers/dist/provider-id.d.ts +0 -46
- package/packages/providers/dist/provider-id.d.ts.map +0 -1
- package/packages/providers/dist/provider-id.js +0 -113
- package/packages/providers/dist/provider-id.js.map +0 -1
- package/packages/providers/tsconfig.json +0 -8
- package/packages/quota-manager/dist/examples/tui-usage-integration.d.ts +0 -35
- package/packages/quota-manager/dist/examples/tui-usage-integration.d.ts.map +0 -1
- package/packages/quota-manager/dist/examples/tui-usage-integration.js +0 -73
- package/packages/quota-manager/dist/examples/tui-usage-integration.js.map +0 -1
- package/packages/quota-manager/dist/index.d.ts +0 -8
- package/packages/quota-manager/dist/index.d.ts.map +0 -1
- package/packages/quota-manager/dist/index.js +0 -8
- package/packages/quota-manager/dist/index.js.map +0 -1
- package/packages/quota-manager/dist/quota-manager.d.ts +0 -70
- package/packages/quota-manager/dist/quota-manager.d.ts.map +0 -1
- package/packages/quota-manager/dist/quota-manager.js +0 -260
- package/packages/quota-manager/dist/quota-manager.js.map +0 -1
- package/packages/quota-manager/dist/tui-usage-monitor.d.ts +0 -96
- package/packages/quota-manager/dist/tui-usage-monitor.d.ts.map +0 -1
- package/packages/quota-manager/dist/tui-usage-monitor.js +0 -268
- package/packages/quota-manager/dist/tui-usage-monitor.js.map +0 -1
- package/packages/quota-manager/tsconfig.json +0 -8
- package/packages/rate-limiter/tsconfig.json +0 -5
- package/packages/react-vite-plugin/tsconfig.json +0 -12
- package/packages/release-manager/tsconfig.json +0 -5
- package/packages/requirement-compiler/tsconfig.json +0 -22
- package/packages/runtime/dist/command-executor.d.ts +0 -129
- package/packages/runtime/dist/command-executor.d.ts.map +0 -1
- package/packages/runtime/dist/command-executor.js +0 -383
- package/packages/runtime/dist/command-executor.js.map +0 -1
- package/packages/runtime/dist/index.d.ts +0 -11
- package/packages/runtime/dist/index.d.ts.map +0 -1
- package/packages/runtime/dist/index.js +0 -11
- package/packages/runtime/dist/index.js.map +0 -1
- package/packages/runtime/dist/local-runtime-agent.d.ts +0 -111
- package/packages/runtime/dist/local-runtime-agent.d.ts.map +0 -1
- package/packages/runtime/dist/local-runtime-agent.js +0 -356
- package/packages/runtime/dist/local-runtime-agent.js.map +0 -1
- package/packages/runtime/dist/policy-engine.d.ts +0 -203
- package/packages/runtime/dist/policy-engine.d.ts.map +0 -1
- package/packages/runtime/dist/policy-engine.js +0 -592
- package/packages/runtime/dist/policy-engine.js.map +0 -1
- package/packages/runtime/dist/runtime-api.d.ts +0 -137
- package/packages/runtime/dist/runtime-api.d.ts.map +0 -1
- package/packages/runtime/dist/runtime-api.js +0 -454
- package/packages/runtime/dist/runtime-api.js.map +0 -1
- package/packages/runtime/dist/workspace-manager.d.ts +0 -162
- package/packages/runtime/dist/workspace-manager.d.ts.map +0 -1
- package/packages/runtime/dist/workspace-manager.js +0 -451
- package/packages/runtime/dist/workspace-manager.js.map +0 -1
- package/packages/runtime/tsconfig.json +0 -8
- package/packages/scheduler-adapter/tsconfig.json +0 -22
- package/packages/scheduler-adapter/tsconfig.tsbuildinfo +0 -1
- package/packages/session/tsconfig.json +0 -33
- package/packages/session/tsconfig.tsbuildinfo +0 -1
- package/packages/session-api/dist/src/api.d.ts +0 -83
- package/packages/session-api/dist/src/api.d.ts.map +0 -1
- package/packages/session-api/dist/src/api.js +0 -49
- package/packages/session-api/dist/src/api.js.map +0 -1
- package/packages/session-api/dist/src/index.d.ts +0 -2
- package/packages/session-api/dist/src/index.d.ts.map +0 -1
- package/packages/session-api/dist/src/index.js +0 -2
- package/packages/session-api/dist/src/index.js.map +0 -1
- package/packages/session-api/dist/src/types.d.ts +0 -22
- package/packages/session-api/dist/src/types.d.ts.map +0 -1
- package/packages/session-api/dist/src/types.js +0 -5
- package/packages/session-api/dist/src/types.js.map +0 -1
- package/packages/session-api/tsconfig.json +0 -10
- package/packages/session-export/dist/src/exporter.d.ts +0 -28
- package/packages/session-export/dist/src/exporter.d.ts.map +0 -1
- package/packages/session-export/dist/src/exporter.js +0 -42
- package/packages/session-export/dist/src/exporter.js.map +0 -1
- package/packages/session-export/dist/src/index.d.ts +0 -2
- package/packages/session-export/dist/src/index.d.ts.map +0 -1
- package/packages/session-export/dist/src/index.js +0 -2
- package/packages/session-export/dist/src/index.js.map +0 -1
- package/packages/session-export/dist/src/types.d.ts +0 -20
- package/packages/session-export/dist/src/types.d.ts.map +0 -1
- package/packages/session-export/dist/src/types.js +0 -5
- package/packages/session-export/dist/src/types.js.map +0 -1
- package/packages/session-export/tsconfig.json +0 -10
- package/packages/skill-registry/tsconfig.json +0 -22
- package/packages/sprint-planner/tsconfig.json +0 -5
- package/packages/subscription-engine/dist/src/engine.d.ts +0 -13
- package/packages/subscription-engine/dist/src/engine.d.ts.map +0 -1
- package/packages/subscription-engine/dist/src/engine.js +0 -40
- package/packages/subscription-engine/dist/src/engine.js.map +0 -1
- package/packages/subscription-engine/dist/src/index.d.ts +0 -2
- package/packages/subscription-engine/dist/src/index.d.ts.map +0 -1
- package/packages/subscription-engine/dist/src/index.js +0 -2
- package/packages/subscription-engine/dist/src/index.js.map +0 -1
- package/packages/subscription-engine/dist/src/subscriptions.d.ts +0 -19
- package/packages/subscription-engine/dist/src/subscriptions.d.ts.map +0 -1
- package/packages/subscription-engine/dist/src/subscriptions.js +0 -39
- package/packages/subscription-engine/dist/src/subscriptions.js.map +0 -1
- package/packages/subscription-engine/dist/src/types.d.ts +0 -24
- package/packages/subscription-engine/dist/src/types.d.ts.map +0 -1
- package/packages/subscription-engine/dist/src/types.js +0 -5
- package/packages/subscription-engine/dist/src/types.js.map +0 -1
- package/packages/subscription-engine/tsconfig.json +0 -10
- package/packages/task-compiler/tsconfig.json +0 -24
- package/packages/test-data-generator/tsconfig.json +0 -33
- package/packages/test-data-generator/tsconfig.tsbuildinfo +0 -1
- package/packages/test-generator/tsconfig.json +0 -6
- package/packages/token-optimizer/tsconfig.json +0 -6
- package/packages/tui/tsconfig.json +0 -8
- package/packages/types/src/runtime-types.d.ts.map +0 -1
- package/packages/types/src/runtime-types.js +0 -2
- package/packages/types/src/runtime-types.js.map +0 -1
- package/packages/types/tsconfig.json +0 -21
- package/packages/types/tsconfig.tsbuildinfo +0 -1
- package/packages/workflow-events/dist/src/events.d.ts +0 -38
- package/packages/workflow-events/dist/src/events.d.ts.map +0 -1
- package/packages/workflow-events/dist/src/events.js +0 -55
- package/packages/workflow-events/dist/src/events.js.map +0 -1
- package/packages/workflow-events/dist/src/index.d.ts +0 -2
- package/packages/workflow-events/dist/src/index.d.ts.map +0 -1
- package/packages/workflow-events/dist/src/index.js +0 -2
- package/packages/workflow-events/dist/src/index.js.map +0 -1
- package/packages/workflow-events/dist/src/pipeline.d.ts +0 -21
- package/packages/workflow-events/dist/src/pipeline.d.ts.map +0 -1
- package/packages/workflow-events/dist/src/pipeline.js +0 -36
- package/packages/workflow-events/dist/src/pipeline.js.map +0 -1
- package/packages/workflow-events/dist/src/types.d.ts +0 -110
- package/packages/workflow-events/dist/src/types.d.ts.map +0 -1
- package/packages/workflow-events/dist/src/types.js +0 -5
- package/packages/workflow-events/dist/src/types.js.map +0 -1
- package/packages/workflow-events/src/types.d.ts.map +0 -1
- package/packages/workflow-events/src/types.js +0 -5
- package/packages/workflow-events/src/types.js.map +0 -1
- package/packages/workflow-events/tsconfig.json +0 -10
- package/packages/workspace-scanner/dist/src/detect.d.ts +0 -3
- package/packages/workspace-scanner/dist/src/detect.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/src/detect.js +0 -60
- package/packages/workspace-scanner/dist/src/detect.js.map +0 -1
- package/packages/workspace-scanner/dist/src/git.d.ts +0 -7
- package/packages/workspace-scanner/dist/src/git.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/src/git.js +0 -75
- package/packages/workspace-scanner/dist/src/git.js.map +0 -1
- package/packages/workspace-scanner/dist/src/index.d.ts +0 -5
- package/packages/workspace-scanner/dist/src/index.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/src/index.js +0 -4
- package/packages/workspace-scanner/dist/src/index.js.map +0 -1
- package/packages/workspace-scanner/dist/src/scanner.d.ts +0 -11
- package/packages/workspace-scanner/dist/src/scanner.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/src/scanner.js +0 -59
- package/packages/workspace-scanner/dist/src/scanner.js.map +0 -1
- package/packages/workspace-scanner/dist/src/types.d.ts +0 -35
- package/packages/workspace-scanner/dist/src/types.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/src/types.js +0 -5
- package/packages/workspace-scanner/dist/src/types.js.map +0 -1
- package/packages/workspace-scanner/test/scanner.test.js +0 -31
- package/packages/workspace-scanner/tsconfig.json +0 -10
- package/packages/worktree/dist/index.d.ts +0 -7
- package/packages/worktree/dist/index.d.ts.map +0 -1
- package/packages/worktree/dist/index.js +0 -7
- package/packages/worktree/dist/index.js.map +0 -1
- package/packages/worktree/dist/worktree.d.ts +0 -88
- package/packages/worktree/dist/worktree.d.ts.map +0 -1
- package/packages/worktree/dist/worktree.js +0 -242
- package/packages/worktree/dist/worktree.js.map +0 -1
- package/packages/worktree/tsconfig.json +0 -8
package/index.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { UsageTracker } from "./tracker.ts";
|
|
|
24
24
|
import { MirrorStore, type MirrorRecord } from "./mirror.ts";
|
|
25
25
|
import { MiniMaxQuotaScraper } from "./harness/e2e/minimax-quota-scraper.js";
|
|
26
26
|
import { OpenAIQuotaScraper } from "./harness/e2e/openai-quota-scraper.js";
|
|
27
|
+
import { GLMQuotaScraper } from "./harness/e2e/glm-quota-scraper.js";
|
|
28
|
+
import { ChatGPTQuotaScraper } from "./harness/e2e/chatgpt-quota-scraper.js";
|
|
27
29
|
import { parseMiniMaxQuotaText } from "./harness/e2e/minimax-quota-parser.js";
|
|
28
30
|
import {
|
|
29
31
|
CookieWatcher,
|
|
@@ -73,11 +75,44 @@ import { scheduleAutoResume, cancelAutoResume } from "./harness/index.js";
|
|
|
73
75
|
async function initTodoBdSync(pi: ExtensionAPI): Promise<void> {
|
|
74
76
|
try {
|
|
75
77
|
const mod = await import("./packages/todo-bd-sync/src/extension.js");
|
|
76
|
-
mod.registerTodoBdSync(pi
|
|
78
|
+
mod.registerTodoBdSync(pi);
|
|
77
79
|
} catch {
|
|
78
80
|
// todo-bd-sync not available
|
|
79
81
|
}
|
|
80
82
|
}
|
|
83
|
+
|
|
84
|
+
// --- config-capture: Auto-detect and document API configuration -------------
|
|
85
|
+
// Lazy import - only loads when packages/config-capture exists
|
|
86
|
+
async function initConfigCapture(pi: ExtensionAPI): Promise<void> {
|
|
87
|
+
try {
|
|
88
|
+
const mod = await import("./packages/config-capture/src/index.js");
|
|
89
|
+
mod.registerConfigCapture(pi, { debug: false });
|
|
90
|
+
} catch {
|
|
91
|
+
// config-capture not available
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// --- write-review: Two-agent write with review loop --------------------------
|
|
96
|
+
// Lazy import - only loads when packages/write-review exists
|
|
97
|
+
async function initWriteReview(pi: ExtensionAPI): Promise<void> {
|
|
98
|
+
try {
|
|
99
|
+
const mod = await import("./packages/write-review/src/index.js");
|
|
100
|
+
mod.injectWriterInstructions(pi);
|
|
101
|
+
} catch {
|
|
102
|
+
// write-review not available
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// --- file-copy-helper: Inject cp rule when mimicking files --------------------
|
|
107
|
+
// Lazy import - only loads when packages/file-copy-helper exists
|
|
108
|
+
async function initFileCopyHelper(pi: ExtensionAPI): Promise<void> {
|
|
109
|
+
try {
|
|
110
|
+
const mod = await import("./packages/file-copy-helper/src/extension.js");
|
|
111
|
+
mod.registerFileCopyHelper(pi);
|
|
112
|
+
} catch {
|
|
113
|
+
// file-copy-helper not available
|
|
114
|
+
}
|
|
115
|
+
}
|
|
81
116
|
import { homedir } from "node:os";
|
|
82
117
|
import { appendFileSync, existsSync, mkdirSync } from "node:fs";
|
|
83
118
|
import { join } from "node:path";
|
|
@@ -229,6 +264,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
229
264
|
// Start async init but don't await - runs in background
|
|
230
265
|
void initTodoBdSync(pi);
|
|
231
266
|
|
|
267
|
+
// --- config-capture: Auto-detect API config and document it -----------
|
|
268
|
+
void initConfigCapture(pi);
|
|
269
|
+
|
|
270
|
+
// --- write-review: Two-agent write with review loop ----------------------
|
|
271
|
+
void initWriteReview(pi);
|
|
272
|
+
|
|
273
|
+
// --- file-copy-helper: Inject cp rule when mimicking files -------------
|
|
274
|
+
void initFileCopyHelper(pi);
|
|
275
|
+
|
|
232
276
|
// --- Auto-Invoke rpiv-todo via System Prompt ------------------------
|
|
233
277
|
// This makes the todo overlay ALWAYS activate at session start
|
|
234
278
|
const AUTO_TODO_INVOKE_HINT = `
|
|
@@ -241,15 +285,113 @@ When the user gives you a multi-step task:
|
|
|
241
285
|
3. When a task is completed, continue to the next or ask the user
|
|
242
286
|
|
|
243
287
|
The todo overlay persists and helps track progress across your conversation.
|
|
288
|
+
`;
|
|
289
|
+
|
|
290
|
+
const COMMIT_BUILD_CHECKLIST = `
|
|
291
|
+
|
|
292
|
+
BEFORE committing code or triggering builds, ALWAYS check:
|
|
293
|
+
1. Run 'bd ready' to see pending tasks
|
|
294
|
+
2. Mark completed tasks with 'bd close <id> --reason "Done"'
|
|
295
|
+
3. Acknowledge pending tasks before proceeding
|
|
296
|
+
4. Never commit/build without acknowledging pending todos
|
|
297
|
+
`;
|
|
298
|
+
|
|
299
|
+
const WRITE_REVIEW_HINT = `
|
|
300
|
+
|
|
301
|
+
WRITER-REVIEWER WORKFLOW:
|
|
302
|
+
When working on a feature from {project}/wiki/* or {project}/.write-review/:
|
|
303
|
+
1. Read the prompt/task file to understand requirements
|
|
304
|
+
2. Write clean, complete code
|
|
305
|
+
3. Mark task "in_progress" in todos
|
|
306
|
+
4. When code is ready, trigger review with \`{done} bd create "Review: <task>" -t review -p 1 && bd close <id> --reason "Approved"\`
|
|
307
|
+
5. If reviewer requests changes, update code and re-review
|
|
308
|
+
6. Never skip review on non-trivial features
|
|
309
|
+
`;
|
|
310
|
+
|
|
311
|
+
const DOCKER_CLEANUP_HINT = `
|
|
312
|
+
|
|
313
|
+
DOCKER CLEANUP WORKFLOW:
|
|
314
|
+
AFTER running any Docker build command (docker build, docker compose build, docker compose up --build):
|
|
315
|
+
1. ALWAYS run \`docker builder prune -f\` to clean up build cache
|
|
316
|
+
2. This saves disk space - Docker build cache grows fast
|
|
317
|
+
3. Example: After \`docker compose up --build\`, run \`docker builder prune -f\`
|
|
318
|
+
4. For aggressive cleanup: \`docker builder prune -a -f\` (removes ALL unused cache)
|
|
244
319
|
`;
|
|
245
320
|
let firstAgentStart = true;
|
|
246
321
|
pi.on("before_agent_start", async (event) => {
|
|
247
322
|
if (firstAgentStart) {
|
|
248
323
|
event.systemPrompt += AUTO_TODO_INVOKE_HINT;
|
|
324
|
+
event.systemPrompt += COMMIT_BUILD_CHECKLIST;
|
|
325
|
+
event.systemPrompt += WRITE_REVIEW_HINT;
|
|
326
|
+
event.systemPrompt += DOCKER_CLEANUP_HINT;
|
|
249
327
|
firstAgentStart = false;
|
|
250
328
|
}
|
|
251
329
|
});
|
|
252
330
|
|
|
331
|
+
// --- Auto-Todo Reminder on Build Commands ---------------------------
|
|
332
|
+
// Detect build commands and remind agent to update todos
|
|
333
|
+
const BUILD_COMMANDS = [
|
|
334
|
+
"docker build",
|
|
335
|
+
"docker compose build",
|
|
336
|
+
"docker compose up",
|
|
337
|
+
"npm run build",
|
|
338
|
+
"yarn build",
|
|
339
|
+
"pnpm build",
|
|
340
|
+
"bun run build",
|
|
341
|
+
"make build",
|
|
342
|
+
"gradle build",
|
|
343
|
+
"dotnet build",
|
|
344
|
+
"cargo build",
|
|
345
|
+
"go build",
|
|
346
|
+
"bench build",
|
|
347
|
+
];
|
|
348
|
+
|
|
349
|
+
const TODO_BUILD_REMINDER = `
|
|
350
|
+
|
|
351
|
+
IMPORTANT - TODO UPDATE REMINDER:
|
|
352
|
+
Before running a build, ensure you update the current task status:
|
|
353
|
+
1. Mark the task as in_progress with bd update <id> --status in_progress
|
|
354
|
+
2. After build succeeds, update the task: bd close <id> --reason "Done" or bd update <id> --status pending
|
|
355
|
+
|
|
356
|
+
Run \`bd ready\` to see current tasks.
|
|
357
|
+
`;
|
|
358
|
+
|
|
359
|
+
// Detect build commands and append todo reminder to their output
|
|
360
|
+
pi.on("tool_execution_end", async (event) => {
|
|
361
|
+
const toolName = (event as { toolName?: string }).toolName;
|
|
362
|
+
if (toolName !== "bash") return;
|
|
363
|
+
|
|
364
|
+
const result = (event as { result?: { content?: string } }).result;
|
|
365
|
+
if (!result) return;
|
|
366
|
+
|
|
367
|
+
// Handle content that might be an array or object
|
|
368
|
+
const rawContent = result.content;
|
|
369
|
+
let content: string;
|
|
370
|
+
if (typeof rawContent === "string") {
|
|
371
|
+
content = rawContent;
|
|
372
|
+
} else if (Array.isArray(rawContent)) {
|
|
373
|
+
content = rawContent
|
|
374
|
+
.map((c) => (typeof c === "string" ? c : JSON.stringify(c)))
|
|
375
|
+
.join("\n");
|
|
376
|
+
} else {
|
|
377
|
+
content = JSON.stringify(rawContent ?? "");
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// Check if this is a build command
|
|
381
|
+
const isBuildCommand = BUILD_COMMANDS.some((cmd) =>
|
|
382
|
+
content.toLowerCase().includes(cmd.toLowerCase()),
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
if (
|
|
386
|
+
isBuildCommand &&
|
|
387
|
+
!content.includes("bd ready") &&
|
|
388
|
+
!content.includes("TODO UPDATE")
|
|
389
|
+
) {
|
|
390
|
+
// Append todo reminder to build output
|
|
391
|
+
result.content = content + TODO_BUILD_REMINDER;
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
|
|
253
395
|
// --- Auto-track every assistant message ------------------------------
|
|
254
396
|
pi.on("message_end", async (event, ctx) => {
|
|
255
397
|
if (isOutputLimitResumePromptMessage(event.message)) {
|
|
@@ -906,7 +1048,10 @@ The todo overlay persists and helps track progress across your conversation.
|
|
|
906
1048
|
registerGithubLoginCommand(pi);
|
|
907
1049
|
|
|
908
1050
|
// --- Ctrl+Shift+C — Copy to clipboard + sync to Gist ------------
|
|
909
|
-
|
|
1051
|
+
// NOTE: Shortcut disabled to avoid conflict with pi-usage-status extension
|
|
1052
|
+
// which also registers ctrl+shift+c for clipboard sync.
|
|
1053
|
+
// The copyAndSync function is still exported and can be called manually.
|
|
1054
|
+
// registerCopySyncShortcut(pi, Key);
|
|
910
1055
|
|
|
911
1056
|
// --- /harness start — Start a new harness job ----------------------
|
|
912
1057
|
pi.registerCommand("harness-start", {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-harness-runtime",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "[BETA] Codex-style /usage status + autonomous coding harness for pi. Not production ready — expect breaking changes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "node --test",
|
|
8
|
-
"postinstall": "mkdir -p ~/.pi-harness-runtime/cookies",
|
|
8
|
+
"postinstall": "mkdir -p ~/.pi-harness-runtime/cookies && node scripts/copy-plugins.js && ([ -f ~/.config/herdr/config.toml ] || mkdir -p ~/.config/herdr && cp config.toml.example ~/.config/herdr/config.toml)",
|
|
9
9
|
"release": "bun scripts/release-all.ts",
|
|
10
10
|
"release:patch": "bun scripts/release-all.ts --release-as patch",
|
|
11
11
|
"release:minor": "bun scripts/release-all.ts --release-as minor",
|
|
@@ -16,28 +16,26 @@
|
|
|
16
16
|
"auth:minimax:scrape": "bun packages/auth/src/run-minimax-auth.ts scrape",
|
|
17
17
|
"skills:sync": "bun scripts/skills-sync.ts",
|
|
18
18
|
"skills:sync:check": "bun scripts/skills-sync.ts --check-only",
|
|
19
|
-
"build": "for pkg in packages/*/; do [ -f \"${pkg}tsconfig.json\" ] && [ \"$pkg\" != \"packages/provider-router/\" ] && node_modules/.bin/tsc -p \"${pkg}tsconfig.json\" --skipLibCheck || true; done"
|
|
19
|
+
"build": "for pkg in packages/*/; do [ -f \"${pkg}tsconfig.json\" ] && [ \"$pkg\" != \"packages/provider-router/\" ] && node_modules/.bin/tsc -p \"${pkg}tsconfig.json\" --skipLibCheck > /dev/null 2>&1 || true; done",
|
|
20
|
+
"prepublishOnly": "bun run build"
|
|
20
21
|
},
|
|
21
22
|
"bin": {
|
|
22
23
|
"harness-auth": "packages/auth/src/run-minimax-auth.ts"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
|
-
"
|
|
26
|
-
"footer-status.ts",
|
|
27
|
-
"proactive-compact.ts",
|
|
28
|
-
"tracker.ts",
|
|
29
|
-
"mirror.ts",
|
|
30
|
-
"windows.ts",
|
|
31
|
-
"renderer.ts",
|
|
32
|
-
"cli.ts",
|
|
26
|
+
"*.ts",
|
|
33
27
|
"harness/**/*.ts",
|
|
34
|
-
"packages",
|
|
35
|
-
"
|
|
28
|
+
"packages/**/src/**/*.{ts,js}",
|
|
29
|
+
"packages/**/dist/**/*.{js,d.ts,js.map,d.ts.map}",
|
|
30
|
+
"skills/**/*",
|
|
31
|
+
"prompts/**/*",
|
|
32
|
+
"scripts/**/*",
|
|
33
|
+
".pi/plugins/**/*",
|
|
36
34
|
"package.json",
|
|
37
|
-
"status-parsers.ts",
|
|
38
35
|
"README.md",
|
|
39
36
|
"CHANGELOG.md",
|
|
40
|
-
"LICENSE"
|
|
37
|
+
"LICENSE",
|
|
38
|
+
"config.toml.example"
|
|
41
39
|
],
|
|
42
40
|
"keywords": [
|
|
43
41
|
"pi-package",
|
|
@@ -65,6 +63,9 @@
|
|
|
65
63
|
],
|
|
66
64
|
"skills": [
|
|
67
65
|
"./skills"
|
|
66
|
+
],
|
|
67
|
+
"prompts": [
|
|
68
|
+
"./prompts"
|
|
68
69
|
]
|
|
69
70
|
},
|
|
70
71
|
"peerDependencies": {
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
"devDependencies": {
|
|
77
78
|
"@biomejs/biome": "^2.4.7",
|
|
78
79
|
"@commitlint/cli": "^20.3.1",
|
|
79
|
-
"@commitlint/config-conventional": "^
|
|
80
|
+
"@commitlint/config-conventional": "^21.2.0",
|
|
80
81
|
"@types/node": "^26.1.0",
|
|
81
82
|
"@types/ws": "^8.18.1",
|
|
82
83
|
"husky": "^9.1.7",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* A2A Adapter — Main Entry (RFC-0069)
|
|
3
3
|
*/
|
|
4
4
|
export { A2AClient, type AgentSearchCriteria } from "./client.js";
|
|
5
|
+
export { startDiscoveryAgent, DiscoveryAgent, AgentRegistry, loadAgentCard, discoverAgents, type A2ADiscoveryConfig, } from "./discovery.js";
|
|
5
6
|
export { A2ATransport } from "./transport.js";
|
|
6
7
|
export { createAgentCard, routeTask, getTask, cancelTask, taskStatusUpdateSSE, } from "./agent.js";
|
|
7
8
|
export type { AgentCard, AgentCapabilities, Skill, Authentication, Task, TaskStatus, TaskStatusUpdateEvent, TaskMessage, Artifact, A2ARequest, A2AResponse, A2AClientConfig, TaskHandle, A2AAgentConfig, } from "./types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EACX,SAAS,EACT,iBAAiB,EACjB,KAAK,EACL,cAAc,EACd,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAK,kBAAkB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,GACnB,MAAM,YAAY,CAAC;AACpB,YAAY,EACX,SAAS,EACT,iBAAiB,EACjB,KAAK,EACL,cAAc,EACd,IAAI,EACJ,UAAU,EACV,qBAAqB,EACrB,WAAW,EACX,QAAQ,EACR,UAAU,EACV,WAAW,EACX,eAAe,EACf,UAAU,EACV,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* A2A Adapter — Main Entry (RFC-0069)
|
|
3
3
|
*/
|
|
4
4
|
export { A2AClient } from "./client.js";
|
|
5
|
+
export { startDiscoveryAgent, DiscoveryAgent, AgentRegistry, loadAgentCard, discoverAgents, } from "./discovery.js";
|
|
5
6
|
export { A2ATransport } from "./transport.js";
|
|
6
7
|
export { createAgentCard, routeTask, getTask, cancelTask, taskStatusUpdateSSE, } from "./agent.js";
|
|
7
8
|
export { A2A_PROTOCOL_VERSION, WELL_KNOWN_AGENT_PATH } from "./protocol.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,GACnB,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAA4B,MAAM,aAAa,CAAC;AAClE,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,GAEd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EACN,eAAe,EACf,SAAS,EACT,OAAO,EACP,UAAU,EACV,mBAAmB,GACnB,MAAM,YAAY,CAAC;AAiBpB,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2A Discovery Server (RFC-0104)
|
|
3
|
+
*
|
|
4
|
+
* Advertises agent capabilities and handles agent registry.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { fetch } from "undici";
|
|
8
|
+
import type { AgentSearchCriteria } from "./client.js";
|
|
9
|
+
import { createAgentCard } from "./agent.js";
|
|
10
|
+
import type { AgentCard, AgentCapabilities, Skill, Authentication } from "./types.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Discovery configuration
|
|
14
|
+
*/
|
|
15
|
+
export interface A2ADiscoveryConfig {
|
|
16
|
+
/** Agent ID */
|
|
17
|
+
agentId: string;
|
|
18
|
+
/** Agent URL */
|
|
19
|
+
url: string;
|
|
20
|
+
/** Capabilities */
|
|
21
|
+
capabilities: AgentCapabilities;
|
|
22
|
+
/** Skills this agent provides */
|
|
23
|
+
skills: Skill[];
|
|
24
|
+
/** Authentication */
|
|
25
|
+
authentication?: Authentication;
|
|
26
|
+
/** Metadata */
|
|
27
|
+
metadata?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Start a local A2A discovery agent
|
|
32
|
+
*/
|
|
33
|
+
export function startDiscoveryAgent(config: A2ADiscoveryConfig): DiscoveryAgent {
|
|
34
|
+
return new DiscoveryAgent(config);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class DiscoveryAgent {
|
|
38
|
+
private card: AgentCard;
|
|
39
|
+
|
|
40
|
+
constructor(config: A2ADiscoveryConfig) {
|
|
41
|
+
this.card = createAgentCard({
|
|
42
|
+
name: config.agentId,
|
|
43
|
+
description: config.skills[0]?.description ?? "Harness Agent",
|
|
44
|
+
url: config.url,
|
|
45
|
+
version: "1.0.0",
|
|
46
|
+
capabilities: config.capabilities,
|
|
47
|
+
skills: config.skills,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
getAgentCard(): AgentCard {
|
|
52
|
+
return this.card;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Registry of known agents
|
|
58
|
+
*/
|
|
59
|
+
export class AgentRegistry {
|
|
60
|
+
private agents = new Map<string, AgentCard>();
|
|
61
|
+
|
|
62
|
+
register(card: AgentCard): void {
|
|
63
|
+
this.agents.set(card.name, card);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
unregister(name: string): void {
|
|
67
|
+
this.agents.delete(name);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
list(): AgentCard[] {
|
|
71
|
+
return Array.from(this.agents.values());
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
find(criteria: AgentSearchCriteria): AgentCard[] {
|
|
75
|
+
return this.list().filter((agent) => {
|
|
76
|
+
if (criteria.skill && !agent.skills.some((s) => s.id === criteria.skill)) return false;
|
|
77
|
+
return true;
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Load agent card from URL
|
|
84
|
+
*/
|
|
85
|
+
export async function loadAgentCard(url: string): Promise<AgentCard | null> {
|
|
86
|
+
try {
|
|
87
|
+
const response = await fetch(`${url}/.well-known/agent.json`);
|
|
88
|
+
if (!response.ok) return null;
|
|
89
|
+
return response.json() as Promise<AgentCard>;
|
|
90
|
+
} catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Discover agents via seed URLs
|
|
97
|
+
*/
|
|
98
|
+
export async function discoverAgents(seedUrls: string[]): Promise<AgentCard[]> {
|
|
99
|
+
const results = await Promise.all(
|
|
100
|
+
seedUrls.map(async (url): Promise<AgentCard | null> => {
|
|
101
|
+
const card = await loadAgentCard(url);
|
|
102
|
+
return card;
|
|
103
|
+
}),
|
|
104
|
+
);
|
|
105
|
+
return results.filter((c): c is AgentCard => c !== null);
|
|
106
|
+
}
|
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
export { A2AClient, type AgentSearchCriteria } from "./client.js";
|
|
6
|
+
export {
|
|
7
|
+
startDiscoveryAgent,
|
|
8
|
+
DiscoveryAgent,
|
|
9
|
+
AgentRegistry,
|
|
10
|
+
loadAgentCard,
|
|
11
|
+
discoverAgents,
|
|
12
|
+
type A2ADiscoveryConfig,
|
|
13
|
+
} from "./discovery.js";
|
|
6
14
|
export { A2ATransport } from "./transport.js";
|
|
7
15
|
export {
|
|
8
16
|
createAgentCard,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-harness/architecture-generator",
|
|
3
|
+
"version": "0.10.30",
|
|
4
|
+
"description": "Generate ADR and Mermaid diagrams from project analysis",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"test": "echo \"Tests not configured\""
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.4.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Generator - RFC-0073
|
|
3
|
+
*
|
|
4
|
+
* Generate Architecture Decision Records.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { ADR } from './types.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Generate an ADR file
|
|
11
|
+
*/
|
|
12
|
+
export function generateADR(adr: ADR): string {
|
|
13
|
+
return `# ${adr.id}: ${adr.title}
|
|
14
|
+
|
|
15
|
+
## Status
|
|
16
|
+
${adr.status}
|
|
17
|
+
|
|
18
|
+
## Context
|
|
19
|
+
${adr.context}
|
|
20
|
+
|
|
21
|
+
## Decision
|
|
22
|
+
${adr.decision}
|
|
23
|
+
|
|
24
|
+
## Consequences
|
|
25
|
+
${adr.consequences}
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
*Created: ${adr.createdAt}*
|
|
29
|
+
`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Create a new ADR
|
|
34
|
+
*/
|
|
35
|
+
export function createADR(
|
|
36
|
+
id: string,
|
|
37
|
+
title: string,
|
|
38
|
+
context: string,
|
|
39
|
+
decision: string,
|
|
40
|
+
consequences: string
|
|
41
|
+
): ADR {
|
|
42
|
+
return {
|
|
43
|
+
id,
|
|
44
|
+
title,
|
|
45
|
+
status: 'proposed',
|
|
46
|
+
context,
|
|
47
|
+
decision,
|
|
48
|
+
consequences,
|
|
49
|
+
createdAt: new Date().toISOString().split('T')[0],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Generator - RFC-0073
|
|
3
|
+
*
|
|
4
|
+
* Generate Mermaid diagrams.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { ArchitectureDiagram, DiagramType, ArchitectureAnalysis } from './types.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Generate component diagram
|
|
11
|
+
*/
|
|
12
|
+
export function generateComponentDiagram(analysis: ArchitectureAnalysis): ArchitectureDiagram {
|
|
13
|
+
const mermaid = [
|
|
14
|
+
'graph TB',
|
|
15
|
+
' subgraph Layers',
|
|
16
|
+
...analysis.layers.map((layer, i) => {
|
|
17
|
+
const nodes = analysis.components.filter((_, j) => j % analysis.layers.length === i);
|
|
18
|
+
return ` ${nodes.join(' --> ')}`;
|
|
19
|
+
}),
|
|
20
|
+
' end',
|
|
21
|
+
...analysis.dependencies.map(d => ` ${d.from} --> ${d.to}`),
|
|
22
|
+
].join('\n');
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
type: 'component',
|
|
26
|
+
title: 'Architecture Components',
|
|
27
|
+
mermaid,
|
|
28
|
+
description: 'Component diagram showing layers and dependencies',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Generate sequence diagram
|
|
34
|
+
*/
|
|
35
|
+
export function generateSequenceDiagram(
|
|
36
|
+
title: string,
|
|
37
|
+
steps: { actor: string; action: string; target: string }[]
|
|
38
|
+
): ArchitectureDiagram {
|
|
39
|
+
const mermaid = [
|
|
40
|
+
'sequenceDiagram',
|
|
41
|
+
...steps.map(
|
|
42
|
+
s => ` ${s.actor}->>+${s.target}: ${s.action}`
|
|
43
|
+
),
|
|
44
|
+
].join('\n');
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
type: 'sequence',
|
|
48
|
+
title,
|
|
49
|
+
mermaid,
|
|
50
|
+
description: 'Sequence diagram showing interaction flow',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Generate flow diagram
|
|
56
|
+
*/
|
|
57
|
+
export function generateFlowDiagram(
|
|
58
|
+
title: string,
|
|
59
|
+
nodes: { id: string; label: string }[],
|
|
60
|
+
edges: { from: string; to: string; label?: string }[]
|
|
61
|
+
): ArchitectureDiagram {
|
|
62
|
+
const mermaid = [
|
|
63
|
+
'flowchart LR',
|
|
64
|
+
...nodes.map(n => ` ${n.id}[${n.label}]`),
|
|
65
|
+
...edges.map(
|
|
66
|
+
e => ` ${e.from}${e.label ? `-->|"${e.label}"|` : '->>'}${e.to}`
|
|
67
|
+
),
|
|
68
|
+
].join('\n');
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
type: 'flow',
|
|
72
|
+
title,
|
|
73
|
+
mermaid,
|
|
74
|
+
description: 'Flow diagram showing process flow',
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Generator - RFC-0073
|
|
3
|
+
*
|
|
4
|
+
* Generate ADR and Mermaid diagrams from project analysis.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export type DiagramType = 'component' | 'flow' | 'sequence' | 'er' | 'class';
|
|
8
|
+
|
|
9
|
+
export interface ArchitectureDiagram {
|
|
10
|
+
type: DiagramType;
|
|
11
|
+
title: string;
|
|
12
|
+
mermaid: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ADR {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
status: 'proposed' | 'accepted' | 'deprecated';
|
|
20
|
+
context: string;
|
|
21
|
+
decision: string;
|
|
22
|
+
consequences: string;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ArchitectureAnalysis {
|
|
27
|
+
components: string[];
|
|
28
|
+
dependencies: { from: string; to: string }[];
|
|
29
|
+
layers: string[];
|
|
30
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-harness/capability-registry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "0.10.30",
|
|
4
4
|
"description": "Capability Registry for pi-harness-runtime — tracks model capabilities and enables capability-based routing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|