pi-harness-runtime 0.10.43 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness/e2e/chatgpt-quota-scraper.ts +478 -0
- package/harness/e2e/glm-quota-scraper.ts +449 -0
- package/index.ts +2 -0
- package/package.json +1 -1
- package/packages/a2a-adapter/README.md +35 -0
- package/packages/a2a-adapter/package.json +21 -0
- package/packages/a2a-adapter/test/a2a.test.ts +151 -0
- package/packages/architecture-generator/package.json +21 -0
- package/packages/auth/README.md +60 -0
- package/packages/auth/package.json +22 -0
- package/packages/auth/test/auth.test.ts +238 -0
- package/packages/autonomous-refactor/package.json +21 -0
- package/packages/autonomous-refactor/test/refactor.test.ts +202 -0
- package/packages/autonomous-runtime/README.md +48 -0
- package/packages/autonomous-runtime/package.json +34 -0
- package/packages/autonomous-runtime/test/autonomous-runtime.test.ts +194 -0
- package/packages/autonomous-runtime/test/inbox.test.ts +80 -0
- package/packages/autonomous-runtime/test/types.test.ts +68 -0
- package/packages/cache-strategy/package.json +21 -0
- package/packages/cache-strategy/test/cache.test.ts +137 -0
- package/packages/capability-registry/package.json +41 -0
- package/packages/capability-registry/test/registry.test.ts +204 -0
- package/packages/checkpoint/README.md +206 -0
- package/packages/checkpoint/package.json +33 -0
- package/packages/checkpoint/test/engine.test.ts +265 -0
- package/packages/cli-plugin-sdk/README.md +48 -0
- package/packages/cli-plugin-sdk/package.json +24 -0
- package/packages/cli-plugin-sdk/test/cli.test.ts +45 -0
- package/packages/clipboard/package.json +12 -0
- package/packages/clipboard-plugin/package.json +17 -0
- package/packages/code-generation/README.md +302 -0
- package/packages/code-generation/package.json +38 -0
- package/packages/code-generation/test/generator.test.ts +238 -0
- package/packages/code-review/README.md +312 -0
- package/packages/code-review/package.json +38 -0
- package/packages/code-review/test/engine.test.ts +302 -0
- package/packages/codex-adapter/package.json +24 -0
- package/packages/codex-adapter/test/provider.test.ts +142 -0
- package/packages/config-capture/package.json +23 -0
- package/packages/context-compiler/package.json +28 -0
- package/packages/context-compiler/test/context-compiler.test.ts +746 -0
- package/packages/context-discovery/package.json +12 -0
- package/packages/context-manager/package.json +21 -0
- package/packages/context-manager/test/context.test.ts +198 -0
- package/packages/cookie-sanitizer/README.md +141 -0
- package/packages/cookie-sanitizer/package.json +27 -0
- package/packages/cookie-sanitizer/test/infer.test.ts +110 -0
- package/packages/cookie-sanitizer/test/normalize.test.ts +113 -0
- package/packages/cookie-sanitizer/test/parse.test.ts +204 -0
- package/packages/cookie-sanitizer/test/sync.test.ts +231 -0
- package/packages/cookie-sanitizer/test/watcher.test.ts +27 -0
- package/packages/cost-optimizer/package.json +41 -0
- package/packages/cost-optimizer/test/cost-optimizer.test.ts +438 -0
- package/packages/dependency-analyzer/package.json +12 -0
- package/packages/dependency-analyzer/test/analyzer.test.ts +48 -0
- package/packages/django-plugin/README.md +1 -0
- package/packages/django-plugin/package.json +20 -0
- package/packages/django-plugin/test/analyzer.test.ts +195 -0
- package/packages/doc-generator/package.json +21 -0
- package/packages/doc-generator/test/docs.test.ts +168 -0
- package/packages/evaluation-engine/package.json +23 -0
- package/packages/evaluation-engine/test/engine.test.ts +277 -0
- package/packages/evaluation-runner/package.json +21 -0
- package/packages/evaluation-runner/test/runner.test.ts +168 -0
- package/packages/event-bus/package.json +12 -0
- package/packages/event-bus/test/bus.test.ts +88 -0
- package/packages/event-store/package.json +12 -0
- package/packages/event-store/test/store.test.ts +115 -0
- package/packages/experience-replay/package.json +23 -0
- package/packages/experience-replay/test/replay.test.ts +267 -0
- package/packages/feedback-collector/package.json +21 -0
- package/packages/feedback-collector/test/collector.test.ts +142 -0
- package/packages/file-copy-helper/package.json +17 -0
- package/packages/framework-detector/README.md +283 -0
- package/packages/framework-detector/package.json +38 -0
- package/packages/framework-detector/test/detector.test.ts +75 -0
- package/packages/framework-plugin-sdk/README.md +399 -0
- package/packages/framework-plugin-sdk/package.json +39 -0
- package/packages/framework-plugin-sdk/test/manager.test.ts +320 -0
- package/packages/frappe-plugin/package.json +20 -0
- package/packages/frappe-plugin/test/analyzer.test.ts +250 -0
- package/packages/generic-web-plugin/package.json +20 -0
- package/packages/generic-web-plugin/test/analyzer.test.ts +134 -0
- package/packages/health-monitor/package.json +21 -0
- package/packages/health-monitor/test/health.test.ts +231 -0
- package/packages/intent-analyzer/package.json +12 -0
- package/packages/intent-analyzer/test/analyzer.test.ts +72 -0
- package/packages/knowledge-graph/package.json +24 -0
- package/packages/knowledge-retrieval/package.json +25 -0
- package/packages/laravel-plugin/README.md +1 -0
- package/packages/laravel-plugin/package.json +20 -0
- package/packages/laravel-plugin/test/analyzer.test.ts +220 -0
- package/packages/learning-engine/package.json +23 -0
- package/packages/learning-engine/test/engine.test.ts +331 -0
- package/packages/mcp-adapter/README.md +47 -0
- package/packages/mcp-adapter/package.json +21 -0
- package/packages/mcp-adapter/test/server.test.ts +91 -0
- package/packages/memory-engine/package.json +23 -0
- package/packages/memory-engine/test/engine.test.ts +456 -0
- package/packages/milestone-manager/package.json +21 -0
- package/packages/model-registry/package.json +41 -0
- package/packages/model-registry/test/registry.test.ts +342 -0
- package/packages/nextjs-plugin/README.md +1 -0
- package/packages/nextjs-plugin/package.json +30 -0
- package/packages/nextjs-plugin/test/analyzer.test.ts +149 -0
- package/packages/notification/adapters/email-adapter.ts +126 -0
- package/packages/notification/adapters/ntfy-adapter.ts +100 -0
- package/packages/notification/adapters/telegram-adapter.ts +107 -0
- package/packages/notification/adapters/webhook-adapter.ts +75 -0
- package/packages/notification/base-adapter.ts +75 -0
- package/packages/notification/index.ts +51 -0
- package/packages/notification/notification-center.ts +286 -0
- package/packages/notification/package.json +22 -0
- package/packages/notification/test/notification.test.ts +372 -0
- package/packages/notification/types.ts +89 -0
- package/packages/observability/README.md +241 -0
- package/packages/observability/package.json +34 -0
- package/packages/observability/test/observability.test.ts +1350 -0
- package/packages/okf-indexer/package.json +12 -0
- package/packages/performance-optimizer/package.json +23 -0
- package/packages/performance-optimizer/test/optimizer.test.ts +267 -0
- package/packages/privilege-broker/README.md +45 -0
- package/packages/privilege-broker/package.json +35 -0
- package/packages/project-analyzer/package.json +43 -0
- package/packages/project-analyzer/test/index.test.ts +1719 -0
- package/packages/project-bootstrap/package.json +24 -0
- package/packages/projection-engine/package.json +12 -0
- package/packages/prompt-compiler/package.json +28 -0
- package/packages/prompt-compiler/test/prompt-compiler.test.ts +813 -0
- package/packages/prompt-versioning/package.json +21 -0
- package/packages/prompt-versioning/test/versioning.test.ts +112 -0
- package/packages/provider-adapter-sdk/README.md +221 -0
- package/packages/provider-adapter-sdk/examples/custom-adapter.ts +353 -0
- package/packages/provider-adapter-sdk/package.json +36 -0
- package/packages/provider-adapter-sdk/test/sdk.test.ts +220 -0
- package/packages/provider-router/package.json +41 -0
- package/packages/provider-router/test/provider-router.test.ts +405 -0
- package/packages/provider-selector/package.json +21 -0
- package/packages/provider-selector/test/selector.test.ts +192 -0
- package/packages/providers/README.md +3 -0
- package/packages/providers/adapters.ts +362 -0
- package/packages/providers/deepagents-adapter.ts +458 -0
- package/packages/providers/glm-usage.ts +248 -0
- package/packages/providers/index.ts +85 -0
- package/packages/providers/openai-usage.ts +263 -0
- package/packages/providers/package.json +22 -0
- package/packages/providers/test/providers.test.ts +225 -0
- package/packages/quota-manager/README.md +3 -0
- package/packages/quota-manager/{dist/examples/tui-usage-integration.js → examples/tui-usage-integration.ts} +16 -17
- package/packages/quota-manager/index.ts +28 -0
- package/packages/quota-manager/package.json +22 -0
- package/packages/quota-manager/quota-manager.ts +339 -0
- package/packages/quota-manager/test/quota.test.ts +432 -0
- package/packages/quota-manager/tui-usage-monitor.ts +355 -0
- package/packages/rate-limiter/package.json +21 -0
- package/packages/rate-limiter/test/limiter.test.ts +128 -0
- package/packages/react-vite-plugin/README.md +1 -0
- package/packages/react-vite-plugin/package.json +20 -0
- package/packages/react-vite-plugin/test/analyzer.test.ts +139 -0
- package/packages/release-manager/package.json +21 -0
- package/packages/release-manager/test/release.test.ts +215 -0
- package/packages/requirement-compiler/package.json +25 -0
- package/packages/requirement-compiler/test/requirement-compiler.test.ts +743 -0
- package/packages/runtime/README.md +3 -0
- package/packages/runtime/command-executor.ts +523 -0
- package/packages/runtime/index.ts +50 -0
- package/packages/runtime/local-runtime-agent.ts +480 -0
- package/packages/runtime/package.json +22 -0
- package/packages/runtime/policy-engine.ts +813 -0
- package/packages/runtime/runtime-api.ts +665 -0
- package/packages/runtime/test/runtime.test.ts +297 -0
- package/packages/runtime/workspace-manager.ts +591 -0
- package/packages/scheduler/README.md +3 -0
- package/packages/scheduler/package.json +22 -0
- package/packages/scheduler/test/scheduler.test.ts +125 -0
- package/packages/scheduler-adapter/README.md +36 -0
- package/packages/scheduler-adapter/package.json +32 -0
- package/packages/session/README.md +273 -0
- package/packages/session/package.json +38 -0
- package/packages/session/test/manager.test.ts +233 -0
- package/packages/session-api/package.json +12 -0
- package/packages/session-export/package.json +12 -0
- package/packages/shared-context/README.md +3 -0
- package/packages/shared-context/package.json +22 -0
- package/packages/shared-context/test/shared-context.test.ts +114 -0
- package/packages/skill-registry/package.json +41 -0
- package/packages/skill-registry/test/registry.test.ts +508 -0
- package/packages/sprint-planner/package.json +21 -0
- package/packages/sprint-planner/test/planner.test.ts +187 -0
- package/packages/subscription-engine/package.json +12 -0
- package/packages/task-compiler/package.json +43 -0
- package/packages/task-compiler/test/task-compiler.test.ts +628 -0
- package/packages/tencentdb-memory/package.json +23 -0
- package/packages/tencentdb-sync/package.json +26 -0
- package/packages/test-data-generator/README.md +365 -0
- package/packages/test-data-generator/package.json +39 -0
- package/packages/test-data-generator/test/generator.test.ts +265 -0
- package/packages/test-generator/package.json +21 -0
- package/packages/test-generator/test/generator.test.ts +156 -0
- package/packages/todo-bd-sync/package.json +22 -0
- package/packages/token-estimation/package.json +22 -0
- package/packages/token-estimation/test/token-estimation.test.ts +207 -0
- package/packages/token-optimizer/package.json +21 -0
- package/packages/token-optimizer/test/optimizer.test.ts +141 -0
- package/packages/tui/README.md +3 -0
- package/packages/tui/package.json +22 -0
- package/packages/types/package.json +25 -0
- package/packages/workflow-events/package.json +12 -0
- package/packages/workspace-scanner/package.json +12 -0
- package/packages/workspace-scanner/test/scanner.test.ts +42 -0
- package/packages/worktree/README.md +3 -0
- package/packages/worktree/package.json +22 -0
- package/packages/worktree/test/worktree.test.ts +163 -0
- package/packages/worktree/worktree.ts +293 -0
- package/packages/write-review/package.json +22 -0
- package/packages/a2a-adapter/dist/discovery.d.ts +0 -52
- package/packages/a2a-adapter/dist/discovery.d.ts.map +0 -1
- package/packages/a2a-adapter/dist/discovery.js +0 -76
- package/packages/a2a-adapter/dist/discovery.js.map +0 -1
- package/packages/architecture-generator/dist/adr.d.ts +0 -15
- package/packages/architecture-generator/dist/adr.d.ts.map +0 -1
- package/packages/architecture-generator/dist/adr.js +0 -42
- package/packages/architecture-generator/dist/adr.js.map +0 -1
- package/packages/architecture-generator/dist/index.d.ts +0 -9
- package/packages/architecture-generator/dist/index.d.ts.map +0 -1
- package/packages/architecture-generator/dist/index.js +0 -9
- package/packages/architecture-generator/dist/index.js.map +0 -1
- package/packages/architecture-generator/dist/mermaid.d.ts +0 -30
- package/packages/architecture-generator/dist/mermaid.d.ts.map +0 -1
- package/packages/architecture-generator/dist/mermaid.js +0 -58
- package/packages/architecture-generator/dist/mermaid.js.map +0 -1
- package/packages/architecture-generator/dist/types.d.ts +0 -30
- package/packages/architecture-generator/dist/types.d.ts.map +0 -1
- package/packages/architecture-generator/dist/types.js +0 -7
- package/packages/architecture-generator/dist/types.js.map +0 -1
- 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/capability-registry/src/types.js +0 -10
- 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 -212
- 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 -5
- package/packages/clipboard/dist/src/index.d.ts.map +0 -1
- package/packages/clipboard/dist/src/index.js +0 -4
- package/packages/clipboard/dist/src/index.js.map +0 -1
- package/packages/clipboard/dist/src/paste-bridge.d.ts +0 -19
- package/packages/clipboard/dist/src/paste-bridge.d.ts.map +0 -1
- package/packages/clipboard/dist/src/paste-bridge.js +0 -78
- package/packages/clipboard/dist/src/paste-bridge.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-plugin/dist/index.d.ts +0 -28
- package/packages/clipboard-plugin/dist/index.d.ts.map +0 -1
- package/packages/clipboard-plugin/dist/index.js +0 -64
- package/packages/clipboard-plugin/dist/index.js.map +0 -1
- package/packages/clipboard-plugin/dist/types.d.ts +0 -30
- package/packages/clipboard-plugin/dist/types.d.ts.map +0 -1
- package/packages/clipboard-plugin/dist/types.js +0 -5
- package/packages/clipboard-plugin/dist/types.js.map +0 -1
- 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/dependency-analyzer/dist/analyzer.d.ts +0 -17
- package/packages/dependency-analyzer/dist/analyzer.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/analyzer.js +0 -106
- package/packages/dependency-analyzer/dist/analyzer.js.map +0 -1
- package/packages/dependency-analyzer/dist/imports.d.ts +0 -12
- package/packages/dependency-analyzer/dist/imports.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/imports.js +0 -73
- package/packages/dependency-analyzer/dist/imports.js.map +0 -1
- package/packages/dependency-analyzer/dist/index.d.ts +0 -4
- package/packages/dependency-analyzer/dist/index.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/index.js +0 -3
- package/packages/dependency-analyzer/dist/index.js.map +0 -1
- 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/dist/test/analyzer.test.js +0 -37
- package/packages/dependency-analyzer/dist/types.d.ts +0 -28
- package/packages/dependency-analyzer/dist/types.d.ts.map +0 -1
- package/packages/dependency-analyzer/dist/types.js +0 -5
- package/packages/dependency-analyzer/dist/types.js.map +0 -1
- 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 -324
- 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-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/file-copy-helper/dist/src/extension.js +0 -121
- package/packages/file-copy-helper/src/extension.js +0 -149
- package/packages/intent-analyzer/dist/analyzer.d.ts +0 -13
- package/packages/intent-analyzer/dist/analyzer.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/analyzer.js +0 -72
- package/packages/intent-analyzer/dist/analyzer.js.map +0 -1
- package/packages/intent-analyzer/dist/index.d.ts +0 -3
- package/packages/intent-analyzer/dist/index.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/index.js +0 -2
- package/packages/intent-analyzer/dist/index.js.map +0 -1
- 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/dist/test/analyzer.test.js +0 -56
- package/packages/intent-analyzer/dist/types.d.ts +0 -26
- package/packages/intent-analyzer/dist/types.d.ts.map +0 -1
- package/packages/intent-analyzer/dist/types.js +0 -7
- package/packages/intent-analyzer/dist/types.js.map +0 -1
- package/packages/knowledge-graph/dist/graph-extractor.d.ts +0 -27
- package/packages/knowledge-graph/dist/graph-extractor.d.ts.map +0 -1
- package/packages/knowledge-graph/dist/graph-extractor.js +0 -276
- package/packages/knowledge-graph/dist/graph-extractor.js.map +0 -1
- package/packages/knowledge-graph/dist/index.d.ts +0 -27
- package/packages/knowledge-graph/dist/index.d.ts.map +0 -1
- package/packages/knowledge-graph/dist/index.js +0 -27
- package/packages/knowledge-graph/dist/index.js.map +0 -1
- package/packages/knowledge-graph/dist/mcp-client.d.ts +0 -38
- package/packages/knowledge-graph/dist/mcp-client.d.ts.map +0 -1
- package/packages/knowledge-graph/dist/mcp-client.js +0 -157
- package/packages/knowledge-graph/dist/mcp-client.js.map +0 -1
- package/packages/knowledge-graph/dist/provenance-linker.d.ts +0 -19
- package/packages/knowledge-graph/dist/provenance-linker.d.ts.map +0 -1
- package/packages/knowledge-graph/dist/provenance-linker.js +0 -91
- package/packages/knowledge-graph/dist/provenance-linker.js.map +0 -1
- package/packages/knowledge-graph/dist/types.d.ts +0 -53
- package/packages/knowledge-graph/dist/types.d.ts.map +0 -1
- package/packages/knowledge-graph/dist/types.js +0 -7
- package/packages/knowledge-graph/dist/types.js.map +0 -1
- package/packages/knowledge-retrieval/dist/index.d.ts +0 -8
- package/packages/knowledge-retrieval/dist/index.d.ts.map +0 -1
- package/packages/knowledge-retrieval/dist/index.js +0 -7
- package/packages/knowledge-retrieval/dist/index.js.map +0 -1
- package/packages/knowledge-retrieval/dist/mcp-client.d.ts +0 -61
- package/packages/knowledge-retrieval/dist/mcp-client.d.ts.map +0 -1
- package/packages/knowledge-retrieval/dist/mcp-client.js +0 -132
- package/packages/knowledge-retrieval/dist/mcp-client.js.map +0 -1
- package/packages/knowledge-retrieval/dist/types.d.ts +0 -105
- package/packages/knowledge-retrieval/dist/types.d.ts.map +0 -1
- package/packages/knowledge-retrieval/dist/types.js +0 -7
- package/packages/knowledge-retrieval/dist/types.js.map +0 -1
- package/packages/milestone-manager/dist/engine.d.ts +0 -27
- package/packages/milestone-manager/dist/engine.d.ts.map +0 -1
- package/packages/milestone-manager/dist/engine.js +0 -78
- package/packages/milestone-manager/dist/engine.js.map +0 -1
- package/packages/milestone-manager/dist/index.d.ts +0 -6
- package/packages/milestone-manager/dist/index.d.ts.map +0 -1
- package/packages/milestone-manager/dist/index.js +0 -6
- package/packages/milestone-manager/dist/index.js.map +0 -1
- package/packages/milestone-manager/dist/types.d.ts +0 -25
- package/packages/milestone-manager/dist/types.d.ts.map +0 -1
- package/packages/milestone-manager/dist/types.js +0 -7
- package/packages/milestone-manager/dist/types.js.map +0 -1
- 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/line-adapter.d.ts +0 -17
- package/packages/notification/dist/adapters/line-adapter.d.ts.map +0 -1
- package/packages/notification/dist/adapters/line-adapter.js +0 -99
- package/packages/notification/dist/adapters/line-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 -10
- package/packages/notification/dist/index.d.ts.map +0 -1
- package/packages/notification/dist/index.js +0 -10
- 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 -232
- package/packages/notification/dist/notification-center.js.map +0 -1
- package/packages/notification/dist/types.d.ts +0 -69
- 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/okf-indexer/dist/cli.d.ts +0 -8
- package/packages/okf-indexer/dist/cli.d.ts.map +0 -1
- package/packages/okf-indexer/dist/cli.js +0 -23
- package/packages/okf-indexer/dist/cli.js.map +0 -1
- package/packages/okf-indexer/dist/indexer.d.ts +0 -55
- package/packages/okf-indexer/dist/indexer.d.ts.map +0 -1
- package/packages/okf-indexer/dist/indexer.js +0 -147
- package/packages/okf-indexer/dist/indexer.js.map +0 -1
- package/packages/project-bootstrap/dist/bootstrap.d.ts +0 -23
- package/packages/project-bootstrap/dist/bootstrap.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/bootstrap.js +0 -128
- package/packages/project-bootstrap/dist/bootstrap.js.map +0 -1
- package/packages/project-bootstrap/dist/frappe.d.ts +0 -8
- package/packages/project-bootstrap/dist/frappe.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/frappe.js +0 -82
- package/packages/project-bootstrap/dist/frappe.js.map +0 -1
- package/packages/project-bootstrap/dist/index.d.ts +0 -27
- package/packages/project-bootstrap/dist/index.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/index.js +0 -27
- package/packages/project-bootstrap/dist/index.js.map +0 -1
- package/packages/project-bootstrap/dist/minimal.d.ts +0 -8
- package/packages/project-bootstrap/dist/minimal.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/minimal.js +0 -35
- package/packages/project-bootstrap/dist/minimal.js.map +0 -1
- package/packages/project-bootstrap/dist/types.d.ts +0 -61
- package/packages/project-bootstrap/dist/types.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/types.js +0 -7
- package/packages/project-bootstrap/dist/types.js.map +0 -1
- package/packages/project-bootstrap/dist/typescript.d.ts +0 -8
- package/packages/project-bootstrap/dist/typescript.d.ts.map +0 -1
- package/packages/project-bootstrap/dist/typescript.js +0 -103
- package/packages/project-bootstrap/dist/typescript.js.map +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/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/dist/src/adapters.d.ts +0 -133
- package/packages/providers/dist/src/adapters.d.ts.map +0 -1
- package/packages/providers/dist/src/adapters.js +0 -236
- package/packages/providers/dist/src/adapters.js.map +0 -1
- package/packages/providers/dist/src/deepagents-adapter.d.ts +0 -78
- package/packages/providers/dist/src/deepagents-adapter.d.ts.map +0 -1
- package/packages/providers/dist/src/deepagents-adapter.js +0 -323
- package/packages/providers/dist/src/deepagents-adapter.js.map +0 -1
- package/packages/providers/dist/src/glm-usage.d.ts +0 -102
- package/packages/providers/dist/src/glm-usage.d.ts.map +0 -1
- package/packages/providers/dist/src/glm-usage.js +0 -197
- package/packages/providers/dist/src/glm-usage.js.map +0 -1
- package/packages/providers/dist/src/index.d.ts +0 -11
- package/packages/providers/dist/src/index.d.ts.map +0 -1
- package/packages/providers/dist/src/index.js +0 -11
- package/packages/providers/dist/src/index.js.map +0 -1
- package/packages/providers/dist/src/openai-usage.d.ts +0 -103
- package/packages/providers/dist/src/openai-usage.d.ts.map +0 -1
- package/packages/providers/dist/src/openai-usage.js +0 -208
- package/packages/providers/dist/src/openai-usage.js.map +0 -1
- package/packages/providers/dist/src/provider-id.d.ts +0 -46
- package/packages/providers/dist/src/provider-id.d.ts.map +0 -1
- package/packages/providers/dist/src/provider-id.js +0 -113
- package/packages/providers/dist/src/provider-id.js.map +0 -1
- 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.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/src/examples/tui-usage-integration.d.ts +0 -35
- package/packages/quota-manager/dist/src/examples/tui-usage-integration.d.ts.map +0 -1
- package/packages/quota-manager/dist/src/examples/tui-usage-integration.js +0 -73
- package/packages/quota-manager/dist/src/examples/tui-usage-integration.js.map +0 -1
- package/packages/quota-manager/dist/src/index.d.ts +0 -8
- package/packages/quota-manager/dist/src/index.d.ts.map +0 -1
- package/packages/quota-manager/dist/src/index.js +0 -8
- package/packages/quota-manager/dist/src/index.js.map +0 -1
- package/packages/quota-manager/dist/src/quota-manager.d.ts +0 -70
- package/packages/quota-manager/dist/src/quota-manager.d.ts.map +0 -1
- package/packages/quota-manager/dist/src/quota-manager.js +0 -260
- package/packages/quota-manager/dist/src/quota-manager.js.map +0 -1
- package/packages/quota-manager/dist/src/tui-usage-monitor.d.ts +0 -96
- package/packages/quota-manager/dist/src/tui-usage-monitor.d.ts.map +0 -1
- package/packages/quota-manager/dist/src/tui-usage-monitor.js +0 -268
- package/packages/quota-manager/dist/src/tui-usage-monitor.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/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/src/command-executor.d.ts +0 -129
- package/packages/runtime/dist/src/command-executor.d.ts.map +0 -1
- package/packages/runtime/dist/src/command-executor.js +0 -383
- package/packages/runtime/dist/src/command-executor.js.map +0 -1
- package/packages/runtime/dist/src/index.d.ts +0 -11
- package/packages/runtime/dist/src/index.d.ts.map +0 -1
- package/packages/runtime/dist/src/index.js +0 -11
- package/packages/runtime/dist/src/index.js.map +0 -1
- package/packages/runtime/dist/src/local-runtime-agent.d.ts +0 -111
- package/packages/runtime/dist/src/local-runtime-agent.d.ts.map +0 -1
- package/packages/runtime/dist/src/local-runtime-agent.js +0 -356
- package/packages/runtime/dist/src/local-runtime-agent.js.map +0 -1
- package/packages/runtime/dist/src/policy-engine.d.ts +0 -203
- package/packages/runtime/dist/src/policy-engine.d.ts.map +0 -1
- package/packages/runtime/dist/src/policy-engine.js +0 -592
- package/packages/runtime/dist/src/policy-engine.js.map +0 -1
- package/packages/runtime/dist/src/runtime-api.d.ts +0 -137
- package/packages/runtime/dist/src/runtime-api.d.ts.map +0 -1
- package/packages/runtime/dist/src/runtime-api.js +0 -454
- package/packages/runtime/dist/src/runtime-api.js.map +0 -1
- package/packages/runtime/dist/src/workspace-manager.d.ts +0 -162
- package/packages/runtime/dist/src/workspace-manager.d.ts.map +0 -1
- package/packages/runtime/dist/src/workspace-manager.js +0 -451
- package/packages/runtime/dist/src/workspace-manager.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/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-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/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/tencentdb-sync/dist/cli.d.ts +0 -7
- package/packages/tencentdb-sync/dist/cli.d.ts.map +0 -1
- package/packages/tencentdb-sync/dist/cli.js +0 -311
- package/packages/tencentdb-sync/dist/cli.js.map +0 -1
- package/packages/tencentdb-sync/dist/client.d.ts +0 -141
- package/packages/tencentdb-sync/dist/client.d.ts.map +0 -1
- package/packages/tencentdb-sync/dist/client.js +0 -166
- package/packages/tencentdb-sync/dist/client.js.map +0 -1
- package/packages/tencentdb-sync/dist/config.d.ts +0 -32
- package/packages/tencentdb-sync/dist/config.d.ts.map +0 -1
- package/packages/tencentdb-sync/dist/config.js +0 -102
- package/packages/tencentdb-sync/dist/config.js.map +0 -1
- package/packages/tencentdb-sync/dist/index.d.ts +0 -9
- package/packages/tencentdb-sync/dist/index.d.ts.map +0 -1
- package/packages/tencentdb-sync/dist/index.js +0 -8
- package/packages/tencentdb-sync/dist/index.js.map +0 -1
- package/packages/todo-bd-sync/dist/src/detector.js +0 -108
- package/packages/todo-bd-sync/dist/src/extension.js +0 -9
- package/packages/types/dist/ai-providers.d.ts +0 -36
- package/packages/types/dist/ai-providers.d.ts.map +0 -1
- package/packages/types/dist/ai-providers.js +0 -66
- package/packages/types/dist/ai-providers.js.map +0 -1
- package/packages/types/src/agent-worker-types.js +0 -41
- package/packages/types/src/ai-providers.js +0 -66
- package/packages/types/src/runtime-types.js +0 -3
- 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/workspace-scanner/dist/detect.d.ts +0 -3
- package/packages/workspace-scanner/dist/detect.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/detect.js +0 -58
- package/packages/workspace-scanner/dist/detect.js.map +0 -1
- package/packages/workspace-scanner/dist/git.d.ts +0 -7
- package/packages/workspace-scanner/dist/git.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/git.js +0 -75
- package/packages/workspace-scanner/dist/git.js.map +0 -1
- package/packages/workspace-scanner/dist/index.d.ts +0 -5
- package/packages/workspace-scanner/dist/index.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/index.js +0 -4
- package/packages/workspace-scanner/dist/index.js.map +0 -1
- package/packages/workspace-scanner/dist/scanner.d.ts +0 -11
- package/packages/workspace-scanner/dist/scanner.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/scanner.js +0 -46
- package/packages/workspace-scanner/dist/scanner.js.map +0 -1
- 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/dist/test/scanner.test.js +0 -34
- package/packages/workspace-scanner/dist/types.d.ts +0 -35
- package/packages/workspace-scanner/dist/types.d.ts.map +0 -1
- package/packages/workspace-scanner/dist/types.js +0 -5
- package/packages/workspace-scanner/dist/types.js.map +0 -1
- 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/src/index.d.ts +0 -7
- package/packages/worktree/dist/src/index.d.ts.map +0 -1
- package/packages/worktree/dist/src/index.js +0 -7
- package/packages/worktree/dist/src/index.js.map +0 -1
- package/packages/worktree/dist/src/worktree.d.ts +0 -88
- package/packages/worktree/dist/src/worktree.d.ts.map +0 -1
- package/packages/worktree/dist/src/worktree.js +0 -239
- package/packages/worktree/dist/src/worktree.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 -239
- package/packages/worktree/dist/worktree.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Auth Package
|
|
2
|
+
|
|
3
|
+
Safe browser authentication for pi-harness-runtime.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Provides a secure way to authenticate with provider websites (like MiniMax) using a Playwright-managed browser profile. The human owns the authentication - the agent never sees credentials.
|
|
8
|
+
|
|
9
|
+
## Security Rules
|
|
10
|
+
|
|
11
|
+
- Human logs in manually in the browser
|
|
12
|
+
- No username, password, raw cookies, or session tokens stored
|
|
13
|
+
- Only a safe status file is written
|
|
14
|
+
- Agent can only check if authentication succeeded
|
|
15
|
+
|
|
16
|
+
## Files
|
|
17
|
+
|
|
18
|
+
- `src/minimax-browser-auth.ts` - Main auth module
|
|
19
|
+
- `src/run-minimax-auth.ts` - CLI runner
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Authenticate (opens browser for manual login)
|
|
25
|
+
bun packages/auth/src/run-minimax-auth.ts auth
|
|
26
|
+
|
|
27
|
+
# Check authentication status
|
|
28
|
+
bun packages/auth/src/run-minimax-auth.ts check
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Storage
|
|
32
|
+
|
|
33
|
+
- **Browser profile**: `~/.pi-harness-runtime/browser-profiles/minimax/`
|
|
34
|
+
- **Status file**: `~/.pi-harness-runtime/auth/minimax-auth-status.json`
|
|
35
|
+
|
|
36
|
+
## Status File Format
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"provider": "minimax",
|
|
41
|
+
"authenticated": true,
|
|
42
|
+
"checked_at": "2026-07-04T08:00:00.000Z",
|
|
43
|
+
"page_url": "https://platform.minimax.io/console/usage",
|
|
44
|
+
"detected_text_sample": "Usage Plan Credits Reset"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## What is NOT stored
|
|
49
|
+
|
|
50
|
+
- Passwords
|
|
51
|
+
- Raw cookies
|
|
52
|
+
- Session tokens
|
|
53
|
+
- LocalStorage values
|
|
54
|
+
- API keys
|
|
55
|
+
|
|
56
|
+
## Limitations
|
|
57
|
+
|
|
58
|
+
- Requires a display (headed browser mode)
|
|
59
|
+
- Works on Mac/Linux with display
|
|
60
|
+
- Cannot run in truly headless environments without Xvfb
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi-harness/auth",
|
|
3
|
+
"version": "0.10.30",
|
|
4
|
+
"description": "pi-harness-runtime — auth",
|
|
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
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"test": "bun test"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {}
|
|
22
|
+
}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Tests — Filesystem helpers and pure functions (no browser required)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { describe, it, expect, beforeEach } from "bun:test";
|
|
6
|
+
import {
|
|
7
|
+
detectUsagePage,
|
|
8
|
+
extractUsageLines,
|
|
9
|
+
getRuntimeDir,
|
|
10
|
+
getProfileDir,
|
|
11
|
+
getStatusPath,
|
|
12
|
+
getLiveSessionPath,
|
|
13
|
+
saveAuthStatus,
|
|
14
|
+
loadLiveBrowserSession,
|
|
15
|
+
} from "../src/minimax-browser-auth";
|
|
16
|
+
import {
|
|
17
|
+
existsSync,
|
|
18
|
+
mkdirSync,
|
|
19
|
+
rmSync,
|
|
20
|
+
writeFileSync,
|
|
21
|
+
readFileSync,
|
|
22
|
+
} from "node:fs";
|
|
23
|
+
import { join } from "node:path";
|
|
24
|
+
|
|
25
|
+
const TMP = join(process.cwd(), ".test-auth-tmp");
|
|
26
|
+
|
|
27
|
+
function tmpStatus() {
|
|
28
|
+
return join(TMP, "auth-status.json");
|
|
29
|
+
}
|
|
30
|
+
function tmpLiveSession() {
|
|
31
|
+
return join(TMP, "live-session.json");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
rmSync(TMP, { force: true, recursive: true });
|
|
36
|
+
mkdirSync(TMP, { recursive: true });
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
describe("path helpers", () => {
|
|
40
|
+
it("getRuntimeDir returns a path with pi-harness-runtime", () => {
|
|
41
|
+
expect(getRuntimeDir()).toContain(".pi-harness-runtime");
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it("getProfileDir is under runtime dir", () => {
|
|
45
|
+
expect(getProfileDir()).toStartWith(getRuntimeDir());
|
|
46
|
+
expect(getProfileDir()).toContain("minimax");
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("getStatusPath is under runtime dir", () => {
|
|
50
|
+
expect(getStatusPath()).toStartWith(getRuntimeDir());
|
|
51
|
+
expect(getStatusPath()).toContain("auth");
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("getLiveSessionPath contains session file name", () => {
|
|
55
|
+
expect(getLiveSessionPath()).toContain("minimax-live-browser");
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("saveAuthStatus", () => {
|
|
60
|
+
beforeEach(() => {
|
|
61
|
+
rmSync(TMP, { force: true, recursive: true });
|
|
62
|
+
mkdirSync(TMP, { recursive: true });
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it("writes a status file", () => {
|
|
66
|
+
const status = {
|
|
67
|
+
provider: "minimax" as const,
|
|
68
|
+
authenticated: true,
|
|
69
|
+
checked_at: "2025-01-15T10:00:00Z",
|
|
70
|
+
page_url: "https://platform.minimax.io/console/usage",
|
|
71
|
+
detected_text_sample: "Usage details",
|
|
72
|
+
profile_path: "/fake/profile",
|
|
73
|
+
usage_lines: ["Token Plan", "Monthly Plus", "Used 71%"],
|
|
74
|
+
};
|
|
75
|
+
saveAuthStatus(status, { statusPath: tmpStatus() });
|
|
76
|
+
expect(existsSync(tmpStatus())).toBe(true);
|
|
77
|
+
let loaded: any;
|
|
78
|
+
try {
|
|
79
|
+
loaded = JSON.parse(readFileSync(tmpStatus(), "utf-8"));
|
|
80
|
+
} catch {
|
|
81
|
+
throw new Error("saveAuthStatus did not write valid JSON");
|
|
82
|
+
}
|
|
83
|
+
expect(loaded.authenticated).toBe(true);
|
|
84
|
+
expect(loaded.provider).toBe("minimax");
|
|
85
|
+
expect(loaded.usage_lines).toHaveLength(3);
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
it("round-trips an unauthenticated status", () => {
|
|
89
|
+
const status = {
|
|
90
|
+
provider: "minimax" as const,
|
|
91
|
+
authenticated: false,
|
|
92
|
+
checked_at: "2025-01-15T10:00:00Z",
|
|
93
|
+
page_url: "",
|
|
94
|
+
detected_text_sample: null,
|
|
95
|
+
profile_path: "/fake/profile",
|
|
96
|
+
error_message: "Session expired",
|
|
97
|
+
};
|
|
98
|
+
saveAuthStatus(status, { statusPath: tmpStatus() });
|
|
99
|
+
let loaded: any;
|
|
100
|
+
try {
|
|
101
|
+
loaded = JSON.parse(readFileSync(tmpStatus(), "utf-8"));
|
|
102
|
+
} catch {
|
|
103
|
+
throw new Error("saveAuthStatus did not write valid JSON");
|
|
104
|
+
}
|
|
105
|
+
expect(loaded.authenticated).toBe(false);
|
|
106
|
+
expect(loaded.error_message).toBe("Session expired");
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it("creates parent directories", () => {
|
|
110
|
+
const nestedPath = join(TMP, "deeply", "nested", "status.json");
|
|
111
|
+
saveAuthStatus(
|
|
112
|
+
{
|
|
113
|
+
provider: "minimax" as const,
|
|
114
|
+
authenticated: false,
|
|
115
|
+
checked_at: "",
|
|
116
|
+
page_url: "",
|
|
117
|
+
detected_text_sample: null,
|
|
118
|
+
profile_path: "/",
|
|
119
|
+
} as any,
|
|
120
|
+
{ statusPath: nestedPath },
|
|
121
|
+
);
|
|
122
|
+
expect(existsSync(nestedPath)).toBe(true);
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
describe("loadLiveBrowserSession", () => {
|
|
127
|
+
beforeEach(() => {
|
|
128
|
+
rmSync(TMP, { force: true, recursive: true });
|
|
129
|
+
mkdirSync(TMP, { recursive: true });
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it("loads a saved session", () => {
|
|
133
|
+
const session = {
|
|
134
|
+
profile_path: "/tmp/chrome-profile",
|
|
135
|
+
target_url: "https://platform.minimax.io/console/usage",
|
|
136
|
+
chrome_path: "/usr/bin/google-chrome",
|
|
137
|
+
debugging_port: 9222,
|
|
138
|
+
pid: 12345,
|
|
139
|
+
started_at: "2025-01-15T10:00:00Z",
|
|
140
|
+
};
|
|
141
|
+
writeFileSync(tmpLiveSession(), JSON.stringify(session));
|
|
142
|
+
const loaded = loadLiveBrowserSession(tmpLiveSession());
|
|
143
|
+
expect(loaded?.debugging_port).toBe(9222);
|
|
144
|
+
expect(loaded?.pid).toBe(12345);
|
|
145
|
+
expect(loaded?.profile_path).toBe("/tmp/chrome-profile");
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
it("returns null for missing file", () => {
|
|
149
|
+
const loaded = loadLiveBrowserSession(join(TMP, "not-found.json"));
|
|
150
|
+
expect(loaded).toBeNull();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
it("returns null for corrupted JSON", () => {
|
|
154
|
+
writeFileSync(tmpLiveSession(), "not json {");
|
|
155
|
+
const loaded = loadLiveBrowserSession(tmpLiveSession());
|
|
156
|
+
expect(loaded).toBeNull();
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
describe("detectUsagePage", () => {
|
|
161
|
+
it("detects page with usage keywords", () => {
|
|
162
|
+
const body =
|
|
163
|
+
"Your Usage: 5h limit, resets in 1 hour. Weekly limit used 71%. Token Plan · Monthly Plus";
|
|
164
|
+
const result = detectUsagePage(body);
|
|
165
|
+
expect(result.detected).toBe(true);
|
|
166
|
+
expect(result.sample).not.toBeNull();
|
|
167
|
+
expect(result.sample!.length).toBeGreaterThan(0);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("does not detect page with few keywords", () => {
|
|
171
|
+
const body =
|
|
172
|
+
"Welcome to our website. This is a generic page with no usage information.";
|
|
173
|
+
const result = detectUsagePage(body);
|
|
174
|
+
expect(result.detected).toBe(false);
|
|
175
|
+
expect(result.sample).toBeNull();
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it("triggers on 2+ matching keywords", () => {
|
|
179
|
+
const body = "Usage Quota limit exceeded";
|
|
180
|
+
const result = detectUsagePage(body);
|
|
181
|
+
expect(result.detected).toBe(true);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it("sample is truncated to 200 chars", () => {
|
|
185
|
+
const body =
|
|
186
|
+
"A".repeat(300) + " special_usage_keyword_here and another_token";
|
|
187
|
+
const result = detectUsagePage(body);
|
|
188
|
+
expect(result.detected).toBe(true);
|
|
189
|
+
expect(result.sample!.length).toBeLessThanOrEqual(200);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it("case insensitive matching", () => {
|
|
193
|
+
const body = "USAGE QUOTA TOKEN PLAN CREDITS";
|
|
194
|
+
const result = detectUsagePage(body);
|
|
195
|
+
expect(result.detected).toBe(true);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it("empty body returns not detected", () => {
|
|
199
|
+
const result = detectUsagePage("");
|
|
200
|
+
expect(result.detected).toBe(false);
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
describe("extractUsageLines", () => {
|
|
205
|
+
it("extracts lines with usage keywords", () => {
|
|
206
|
+
const body =
|
|
207
|
+
"<div>Your Token Plan</div><span>Monthly Plus</span><p>Used 71%</p>";
|
|
208
|
+
const lines = extractUsageLines(body);
|
|
209
|
+
expect(lines.length).toBeGreaterThan(0);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
it("strips script and style tags", () => {
|
|
213
|
+
const body =
|
|
214
|
+
'<script>{"secret": true}</script><style>body{}</style>Visible content usage quota 71%';
|
|
215
|
+
const lines = extractUsageLines(body);
|
|
216
|
+
expect(lines.some((l) => l.includes("secret"))).toBe(false);
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
it("filters out overly short parts", () => {
|
|
220
|
+
const body = "ab cd ef gh ij usage token";
|
|
221
|
+
const lines = extractUsageLines(body);
|
|
222
|
+
for (const l of lines) {
|
|
223
|
+
expect(l.length).toBeGreaterThanOrEqual(3);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("returns array for content-free input", () => {
|
|
228
|
+
const lines = extractUsageLines("<html><body></body></html>");
|
|
229
|
+
expect(Array.isArray(lines)).toBe(true);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
it("deduplicates results", () => {
|
|
233
|
+
const body = "usage token 71% usage token 71%";
|
|
234
|
+
const lines = extractUsageLines(body);
|
|
235
|
+
const unique = [...new Set(lines)];
|
|
236
|
+
expect(lines.length).toBe(unique.length);
|
|
237
|
+
});
|
|
238
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi/autonomous-refactor",
|
|
3
|
+
"version": "0.10.30",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Autonomous refactoring engine",
|
|
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 --noEmit",
|
|
16
|
+
"test": "bun test"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"bun-types": "^1.0.0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Autonomous Refactor Tests (RFC-0092)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { describe, it, expect } from "bun:test";
|
|
6
|
+
import {
|
|
7
|
+
detectRefactorings,
|
|
8
|
+
assessRisk,
|
|
9
|
+
calculatePriority,
|
|
10
|
+
createPlan,
|
|
11
|
+
filterByRisk,
|
|
12
|
+
groupByFile,
|
|
13
|
+
groupByType,
|
|
14
|
+
} from "../src/index.js";
|
|
15
|
+
import type { RefactorFinding } from "../src/index.js";
|
|
16
|
+
|
|
17
|
+
const makeFinding = (
|
|
18
|
+
overrides?: Partial<RefactorFinding>,
|
|
19
|
+
): RefactorFinding => ({
|
|
20
|
+
id: `f${Math.random().toString(36).slice(2)}`,
|
|
21
|
+
type: "extract-method",
|
|
22
|
+
file: "src/test.ts",
|
|
23
|
+
location: { line: 10, column: 1 },
|
|
24
|
+
description: "Test finding",
|
|
25
|
+
risk: "low",
|
|
26
|
+
confidence: 0.7,
|
|
27
|
+
...overrides,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
describe("detectRefactorings", () => {
|
|
31
|
+
it("detects magic literals", () => {
|
|
32
|
+
const files = [{ path: "src/test.ts", content: "const timeout = 5000;" }];
|
|
33
|
+
const findings = detectRefactorings(files);
|
|
34
|
+
expect(findings.some((f) => f.type === "replace-magic-literal")).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("detects long functions", () => {
|
|
38
|
+
const lines = ["function longFunc() {"];
|
|
39
|
+
for (let i = 0; i < 38; i++) lines.push(" const x = " + i + ";");
|
|
40
|
+
lines.push("}");
|
|
41
|
+
const files = [{ path: "src/test.ts", content: lines.join("\n") }];
|
|
42
|
+
const findings = detectRefactorings(files);
|
|
43
|
+
expect(findings.some((f) => f.type === "extract-method")).toBe(true);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("detects nested conditionals", () => {
|
|
47
|
+
const content = [
|
|
48
|
+
"if (a) {",
|
|
49
|
+
" if (b) {",
|
|
50
|
+
" if (c) {",
|
|
51
|
+
" if (d) { console.log(1); }",
|
|
52
|
+
" }",
|
|
53
|
+
" }",
|
|
54
|
+
"}",
|
|
55
|
+
].join("\n");
|
|
56
|
+
const files = [{ path: "src/test.ts", content }];
|
|
57
|
+
const findings = detectRefactorings(files);
|
|
58
|
+
expect(findings.some((f) => f.type === "simplify-conditional")).toBe(true);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it("returns empty for clean code", () => {
|
|
62
|
+
const files = [
|
|
63
|
+
{
|
|
64
|
+
path: "src/test.ts",
|
|
65
|
+
content: "const x = 1;\nconst y = 2;\nconst sum = x + y;",
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
const findings = detectRefactorings(files);
|
|
69
|
+
expect(findings.length).toBeLessThanOrEqual(3);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it("limits magic literal findings per file", () => {
|
|
73
|
+
const lines = Array.from({ length: 20 }, (_, i) => `const val${i} = 999;`);
|
|
74
|
+
const files = [{ path: "src/test.ts", content: lines.join("\n") }];
|
|
75
|
+
const findings = detectRefactorings(files);
|
|
76
|
+
expect(
|
|
77
|
+
findings.filter((f) => f.type === "replace-magic-literal").length,
|
|
78
|
+
).toBeLessThanOrEqual(5);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("assessRisk", () => {
|
|
83
|
+
it("returns finding risk", () => {
|
|
84
|
+
expect(assessRisk(makeFinding({ risk: "high" }))).toBe("high");
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
describe("calculatePriority", () => {
|
|
89
|
+
it("higher for high-confidence", () => {
|
|
90
|
+
const high = makeFinding({ confidence: 0.9, risk: "low" });
|
|
91
|
+
const low = makeFinding({ confidence: 0.3, risk: "low" });
|
|
92
|
+
expect(calculatePriority(high)).toBeGreaterThan(calculatePriority(low));
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("higher for high-risk at same confidence", () => {
|
|
96
|
+
const critical = makeFinding({ confidence: 0.5, risk: "critical" });
|
|
97
|
+
const low = makeFinding({ confidence: 0.5, risk: "low" });
|
|
98
|
+
expect(calculatePriority(critical)).toBeGreaterThan(calculatePriority(low));
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it("returns value between 0 and 1", () => {
|
|
102
|
+
const p = calculatePriority(
|
|
103
|
+
makeFinding({ confidence: 0.7, risk: "medium" }),
|
|
104
|
+
);
|
|
105
|
+
expect(p).toBeGreaterThanOrEqual(0);
|
|
106
|
+
expect(p).toBeLessThanOrEqual(1);
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
describe("createPlan", () => {
|
|
111
|
+
it("creates plan with findings", () => {
|
|
112
|
+
const findings = [makeFinding({ id: "f1" }), makeFinding({ id: "f2" })];
|
|
113
|
+
const plan = createPlan(findings);
|
|
114
|
+
expect(plan.findings).toHaveLength(2);
|
|
115
|
+
expect(plan.priorityOrder).toContain("f1");
|
|
116
|
+
expect(plan.priorityOrder).toContain("f2");
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
it("limits to maxFindings", () => {
|
|
120
|
+
const findings = Array.from({ length: 100 }, (_, i) =>
|
|
121
|
+
makeFinding({ id: `f${i}`, confidence: 1 - i / 100 }),
|
|
122
|
+
);
|
|
123
|
+
const plan = createPlan(findings, { maxFindings: 20 });
|
|
124
|
+
expect(plan.findings.length).toBeLessThanOrEqual(20);
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it("filters by risk threshold", () => {
|
|
128
|
+
const findings = [
|
|
129
|
+
makeFinding({ id: "low", risk: "low" }),
|
|
130
|
+
makeFinding({ id: "high", risk: "high" }),
|
|
131
|
+
makeFinding({ id: "critical", risk: "critical" }),
|
|
132
|
+
];
|
|
133
|
+
const plan = createPlan(findings, { riskThreshold: "medium" });
|
|
134
|
+
expect(plan.findings.some((f) => f.id === "low")).toBe(true);
|
|
135
|
+
expect(plan.findings.some((f) => f.id === "high")).toBe(false);
|
|
136
|
+
expect(plan.findings.some((f) => f.id === "critical")).toBe(false);
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it("includes blockers when preserveBehavior", () => {
|
|
140
|
+
const plan = createPlan([], { preserveBehavior: true });
|
|
141
|
+
expect(plan.blockers.length).toBeGreaterThan(0);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it("estimates positive impact", () => {
|
|
145
|
+
const findings = [
|
|
146
|
+
makeFinding({ risk: "medium" }),
|
|
147
|
+
makeFinding({ risk: "high" }),
|
|
148
|
+
];
|
|
149
|
+
const plan = createPlan(findings);
|
|
150
|
+
expect(plan.estimatedImpact.complexityReduction).toBeGreaterThan(0);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
describe("filterByRisk", () => {
|
|
155
|
+
it("keeps low and medium when threshold is medium", () => {
|
|
156
|
+
const findings = [
|
|
157
|
+
makeFinding({ id: "low", risk: "low" }),
|
|
158
|
+
makeFinding({ id: "medium", risk: "medium" }),
|
|
159
|
+
makeFinding({ id: "high", risk: "high" }),
|
|
160
|
+
];
|
|
161
|
+
const filtered = filterByRisk(findings, "medium");
|
|
162
|
+
expect(filtered.map((f) => f.id)).toEqual(["low", "medium"]);
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it("returns all when threshold is critical", () => {
|
|
166
|
+
const findings = [
|
|
167
|
+
makeFinding({ risk: "low" }),
|
|
168
|
+
makeFinding({ risk: "critical" }),
|
|
169
|
+
];
|
|
170
|
+
expect(filterByRisk(findings, "critical")).toHaveLength(2);
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe("groupByFile", () => {
|
|
175
|
+
it("groups findings by file", () => {
|
|
176
|
+
const findings = [
|
|
177
|
+
makeFinding({ id: "f1", file: "src/a.ts" }),
|
|
178
|
+
makeFinding({ id: "f2", file: "src/a.ts" }),
|
|
179
|
+
makeFinding({ id: "f3", file: "src/b.ts" }),
|
|
180
|
+
];
|
|
181
|
+
const groups = groupByFile(findings);
|
|
182
|
+
expect(groups.get("src/a.ts")).toHaveLength(2);
|
|
183
|
+
expect(groups.get("src/b.ts")).toHaveLength(1);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it("handles empty array", () => {
|
|
187
|
+
expect(groupByFile([]).size).toBe(0);
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
describe("groupByType", () => {
|
|
192
|
+
it("groups by type", () => {
|
|
193
|
+
const findings = [
|
|
194
|
+
makeFinding({ id: "f1", type: "extract-method" }),
|
|
195
|
+
makeFinding({ id: "f2", type: "extract-method" }),
|
|
196
|
+
makeFinding({ id: "f3", type: "rename-variable" }),
|
|
197
|
+
];
|
|
198
|
+
const groups = groupByType(findings);
|
|
199
|
+
expect(groups.get("extract-method")).toHaveLength(2);
|
|
200
|
+
expect(groups.get("rename-variable")).toHaveLength(1);
|
|
201
|
+
});
|
|
202
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Autonomous Runtime — RFC-0101
|
|
2
|
+
|
|
3
|
+
Task Inbox, Task Lease, and worker supervision for autonomous post-session execution.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
`@pi-harness/autonomous-runtime`
|
|
8
|
+
|
|
9
|
+
## Concepts
|
|
10
|
+
|
|
11
|
+
### Task Inbox
|
|
12
|
+
|
|
13
|
+
Durable queue of tasks submitted by the harness master planner. Survives worker crashes, host reboots, and provider quota exhaustion.
|
|
14
|
+
|
|
15
|
+
### Task Lease
|
|
16
|
+
|
|
17
|
+
Atomic exclusive claim on a task. Guarantees **single-execution** under crash recovery. Other workers skip a leased task.
|
|
18
|
+
|
|
19
|
+
### Worker
|
|
20
|
+
|
|
21
|
+
Supervised process that reads from the inbox, claims tasks via leases, executes, and reports results.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { TaskInbox, TaskLeaseManager, WORKER_ROOT } from "@pi-harness/autonomous-runtime";
|
|
27
|
+
|
|
28
|
+
const inbox = new TaskInbox();
|
|
29
|
+
const leaseMgr = new TaskLeaseManager();
|
|
30
|
+
|
|
31
|
+
// Submit a task
|
|
32
|
+
await inbox.submit({
|
|
33
|
+
title: "Fix login bug",
|
|
34
|
+
description: "Users cannot log in with SSO",
|
|
35
|
+
capability: "write",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Worker: claim and work
|
|
39
|
+
const task = await inbox.claimNext("worker-1", leaseMgr);
|
|
40
|
+
if (task) {
|
|
41
|
+
// ... do work ...
|
|
42
|
+
await inbox.complete(task.id, { success: true });
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Status
|
|
47
|
+
|
|
48
|
+
**Phase 1 done.** Phases 2–10 pending implementation.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pi/autonomous-runtime",
|
|
3
|
+
"version": "0.10.30",
|
|
4
|
+
"description": "Autonomous Operations Runtime — task inbox, lease management, and worker lifecycle (RFC-0101)",
|
|
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": "bun test",
|
|
17
|
+
"test:watch": "bun test --watch",
|
|
18
|
+
"clean": "rm -rf dist"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"autonomous",
|
|
22
|
+
"runtime",
|
|
23
|
+
"task-queue",
|
|
24
|
+
"lease",
|
|
25
|
+
"worker",
|
|
26
|
+
"rfc-0101"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^20.11.0",
|
|
32
|
+
"typescript": "^7.0.2"
|
|
33
|
+
}
|
|
34
|
+
}
|