pi-harness-runtime 1.1.398 → 1.1.402
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/AGENTS.md +44 -2
- package/CHANGELOG.md +21 -0
- package/RULES.md +28 -0
- package/harness/agent-handoff.ts +2 -3
- package/harness/autonomous-review.ts +1 -1
- package/harness/blackboard.ts +2 -3
- package/harness/context-compact-orchestrator.ts +1 -1
- package/harness/context-window-manager.ts +2 -2
- package/harness/e2e/playwright-runner.ts +6 -4
- package/harness/herdr-agents.ts +1 -1
- package/harness/job-state-machine.ts +1 -1
- package/harness/langchain/daemon.ts +3 -3
- package/harness/langchain/graph.ts +2 -2
- package/harness/langchain/ping-pong-middleware.ts +2 -2
- package/harness/loop-code-agent.ts +6 -4
- package/harness/loop-controller.ts +1 -1
- package/harness/loop-review-agent.ts +1 -1
- package/harness/loop-types.ts +1 -1
- package/harness/master-planner.ts +1 -1
- package/harness/project-detector/detector.ts +1 -2
- package/harness/repair-engine.ts +2 -4
- package/harness/service-diagnostics.ts +1 -1
- package/harness/skill-sync.ts +3 -3
- package/index.ts +276 -55
- package/mirror.ts +1 -1
- package/package.json +5 -3
- package/packages/a2a-adapter/dist/discovery.d.ts.map +1 -1
- package/packages/a2a-adapter/dist/discovery.js +0 -1
- package/packages/a2a-adapter/dist/discovery.js.map +1 -1
- package/packages/a2a-adapter/package.json +1 -1
- package/packages/a2a-adapter/src/discovery.ts +0 -1
- package/packages/agent-policy/package.json +1 -1
- package/packages/architecture-generator/package.json +1 -1
- package/packages/auth/dist/index.d.ts +9 -0
- package/packages/auth/dist/index.d.ts.map +1 -0
- package/packages/auth/dist/index.js +9 -0
- package/packages/auth/dist/index.js.map +1 -0
- package/packages/auth/package.json +1 -1
- package/packages/auth/src/index.ts +9 -0
- 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 +1 -1
- package/packages/clipboard/package.json +1 -1
- package/packages/clipboard-plugin/package.json +1 -1
- package/packages/code-generation/package.json +1 -1
- package/packages/code-review/package.json +1 -1
- package/packages/codex-adapter/package.json +1 -1
- package/packages/codex-watcher/package.json +1 -1
- package/packages/config-capture/dist/index.d.ts +52 -0
- package/packages/config-capture/dist/index.d.ts.map +1 -0
- package/packages/config-capture/dist/index.js +261 -0
- package/packages/config-capture/dist/index.js.map +1 -0
- package/packages/config-capture/package.json +1 -1
- package/packages/connection-runtime/package.json +1 -1
- 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/contracts/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/durable-review/package.json +1 -1
- package/packages/e2e-tester/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-sink/package.json +1 -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/dist/extension.d.ts +15 -0
- package/packages/file-copy-helper/dist/extension.d.ts.map +1 -0
- package/packages/file-copy-helper/dist/extension.debug.d.ts +15 -0
- package/packages/file-copy-helper/dist/extension.debug.d.ts.map +1 -0
- package/packages/file-copy-helper/dist/extension.debug.js +215 -0
- package/packages/file-copy-helper/dist/extension.debug.js.map +1 -0
- package/packages/file-copy-helper/dist/extension.js +222 -0
- package/packages/file-copy-helper/dist/extension.js.map +1 -0
- package/packages/file-copy-helper/dist/index.d.ts +3 -0
- package/packages/file-copy-helper/dist/index.d.ts.map +1 -0
- package/packages/file-copy-helper/dist/index.js +3 -0
- package/packages/file-copy-helper/dist/index.js.map +1 -0
- package/packages/file-copy-helper/dist/intent-detector.d.ts +21 -0
- package/packages/file-copy-helper/dist/intent-detector.d.ts.map +1 -0
- package/packages/file-copy-helper/dist/intent-detector.js +348 -0
- package/packages/file-copy-helper/dist/intent-detector.js.map +1 -0
- package/packages/file-copy-helper/package.json +1 -1
- 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/jev-judge/dist/auto-continue.d.ts +161 -2
- package/packages/jev-judge/dist/auto-continue.d.ts.map +1 -1
- package/packages/jev-judge/dist/auto-continue.js +267 -22
- package/packages/jev-judge/dist/auto-continue.js.map +1 -1
- package/packages/jev-judge/dist/index.d.ts +2 -0
- package/packages/jev-judge/dist/index.d.ts.map +1 -1
- package/packages/jev-judge/dist/index.js +2 -0
- package/packages/jev-judge/dist/index.js.map +1 -1
- package/packages/jev-judge/dist/question-risk.d.ts +50 -0
- package/packages/jev-judge/dist/question-risk.d.ts.map +1 -0
- package/packages/jev-judge/dist/question-risk.js +100 -0
- package/packages/jev-judge/dist/question-risk.js.map +1 -0
- package/packages/jev-judge/package.json +1 -1
- package/packages/jev-judge/src/auto-continue.ts +426 -29
- package/packages/jev-judge/src/index.ts +4 -0
- package/packages/jev-judge/src/question-risk.ts +151 -0
- package/packages/jev-judge/tests/auto-continue-context.test.ts +221 -0
- package/packages/jev-judge/tests/outcome-application.test.ts +132 -0
- package/packages/jev-judge/tests/question-risk.test.ts +116 -0
- package/packages/knowledge-graph/package.json +1 -1
- package/packages/knowledge-retrieval/package.json +1 -1
- package/packages/laravel-plugin/package.json +1 -1
- package/packages/learning-engine/package.json +1 -1
- package/packages/logging/README.md +36 -3
- package/packages/logging/dist/config.d.ts +7 -0
- package/packages/logging/dist/config.d.ts.map +1 -1
- package/packages/logging/dist/config.js +14 -0
- package/packages/logging/dist/config.js.map +1 -1
- package/packages/logging/dist/incidents/schema.d.ts +111 -0
- package/packages/logging/dist/incidents/schema.d.ts.map +1 -0
- package/packages/logging/dist/incidents/schema.js +0 -0
- package/packages/logging/dist/incidents/schema.js.map +1 -0
- package/packages/logging/dist/index.d.ts +2 -0
- package/packages/logging/dist/index.d.ts.map +1 -1
- package/packages/logging/dist/index.js +2 -0
- package/packages/logging/dist/index.js.map +1 -1
- package/packages/logging/dist/server/http.d.ts +4 -3
- package/packages/logging/dist/server/http.d.ts.map +1 -1
- package/packages/logging/dist/server/http.js +35 -3
- package/packages/logging/dist/server/http.js.map +1 -1
- package/packages/logging/dist/server/incident-qdrant.d.ts +83 -0
- package/packages/logging/dist/server/incident-qdrant.d.ts.map +1 -0
- package/packages/logging/dist/server/incident-qdrant.js +129 -0
- package/packages/logging/dist/server/incident-qdrant.js.map +1 -0
- package/packages/logging/dist/server/incident-store.d.ts +76 -0
- package/packages/logging/dist/server/incident-store.d.ts.map +1 -0
- package/packages/logging/dist/server/incident-store.js +157 -0
- package/packages/logging/dist/server/incident-store.js.map +1 -0
- package/packages/logging/dist/server/index.d.ts +4 -0
- package/packages/logging/dist/server/index.d.ts.map +1 -1
- package/packages/logging/dist/server/index.js +2 -0
- package/packages/logging/dist/server/index.js.map +1 -1
- package/packages/logging/dist/server/service.d.ts +33 -0
- package/packages/logging/dist/server/service.d.ts.map +1 -1
- package/packages/logging/dist/server/service.js +63 -0
- package/packages/logging/dist/server/service.js.map +1 -1
- package/packages/logging/dist/shipper.d.ts +74 -3
- package/packages/logging/dist/shipper.d.ts.map +1 -1
- package/packages/logging/dist/shipper.js +88 -5
- package/packages/logging/dist/shipper.js.map +1 -1
- package/packages/logging/dist/singleton.d.ts.map +1 -1
- package/packages/logging/dist/singleton.js +1 -0
- package/packages/logging/dist/singleton.js.map +1 -1
- package/packages/logging/package.json +1 -1
- package/packages/logging/src/config.ts +22 -0
- package/packages/logging/src/incidents/schema.ts +0 -0
- package/packages/logging/src/index.ts +17 -0
- package/packages/logging/src/server/http.ts +42 -3
- package/packages/logging/src/server/incident-qdrant.ts +177 -0
- package/packages/logging/src/server/incident-store.ts +192 -0
- package/packages/logging/src/server/index.ts +21 -0
- package/packages/logging/src/server/service.ts +79 -0
- package/packages/logging/src/shipper.ts +120 -5
- package/packages/logging/src/singleton.ts +1 -0
- package/packages/logging/test/fanout.test.ts +186 -0
- package/packages/logging/test/incidents.test.ts +404 -0
- package/packages/mcp-adapter/package.json +1 -1
- package/packages/memory-engine/package.json +1 -1
- package/packages/milestone-manager/package.json +1 -1
- package/packages/model-registry/package.json +1 -1
- package/packages/nextjs-plugin/package.json +1 -1
- package/packages/notification/dist/adapters/detail-format.d.ts +10 -2
- package/packages/notification/dist/adapters/detail-format.d.ts.map +1 -1
- package/packages/notification/dist/adapters/detail-format.js +39 -0
- package/packages/notification/dist/adapters/detail-format.js.map +1 -1
- package/packages/notification/dist/adapters/line-adapter.d.ts +33 -0
- package/packages/notification/dist/adapters/line-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/line-adapter.js +84 -7
- package/packages/notification/dist/adapters/line-adapter.js.map +1 -1
- package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/telegram-adapter.js +6 -2
- package/packages/notification/dist/adapters/telegram-adapter.js.map +1 -1
- package/packages/notification/dist/notification-center.d.ts.map +1 -1
- package/packages/notification/dist/notification-center.js +59 -7
- package/packages/notification/dist/notification-center.js.map +1 -1
- package/packages/notification/dist/pending-question.d.ts +69 -2
- package/packages/notification/dist/pending-question.d.ts.map +1 -1
- package/packages/notification/dist/pending-question.js +88 -2
- package/packages/notification/dist/pending-question.js.map +1 -1
- package/packages/notification/dist/types.d.ts +18 -0
- package/packages/notification/dist/types.d.ts.map +1 -1
- package/packages/notification/package.json +1 -1
- package/packages/notification/src/adapters/detail-format.ts +42 -2
- package/packages/notification/src/adapters/line-adapter.ts +94 -7
- package/packages/notification/src/adapters/telegram-adapter.ts +6 -2
- package/packages/notification/src/notification-center.ts +65 -8
- package/packages/notification/src/pending-question.ts +160 -8
- package/packages/notification/src/types.ts +18 -0
- package/packages/notification/test/approval-payload.test.ts +269 -0
- package/packages/notification/test/pending-question-lifecycle.test.ts +195 -0
- package/packages/observability/package.json +1 -1
- package/packages/okf-indexer/dist/index.d.ts +9 -0
- package/packages/okf-indexer/dist/index.d.ts.map +1 -0
- package/packages/okf-indexer/dist/index.js +9 -0
- package/packages/okf-indexer/dist/index.js.map +1 -0
- package/packages/okf-indexer/package.json +1 -1
- package/packages/okf-indexer/src/index.ts +9 -0
- package/packages/paperclip-integration/package.json +1 -1
- package/packages/performance-optimizer/package.json +1 -1
- package/packages/permission-mode/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 +1 -1
- 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/provider-router.d.ts.map +1 -1
- package/packages/provider-router/dist/types.d.ts +2 -2
- package/packages/provider-router/dist/types.d.ts.map +1 -1
- package/packages/provider-router/dist/types.js +1 -1
- package/packages/provider-router/package.json +1 -1
- package/packages/provider-router/src/types.ts +2 -2
- package/packages/provider-selector/package.json +1 -1
- package/packages/providers/package.json +1 -1
- package/packages/qdrant-skills/package.json +1 -1
- package/packages/quota-manager/package.json +1 -1
- package/packages/rate-limiter/package.json +1 -1
- package/packages/react-vite-plugin/package.json +1 -1
- package/packages/relay/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/scheduler/dist/index.d.ts +9 -0
- package/packages/scheduler/dist/index.d.ts.map +1 -0
- package/packages/scheduler/dist/index.js +9 -0
- package/packages/scheduler/dist/index.js.map +1 -0
- package/packages/scheduler/dist/scheduler.d.ts +17 -0
- package/packages/scheduler/dist/scheduler.d.ts.map +1 -0
- package/packages/scheduler/dist/scheduler.js +41 -0
- package/packages/scheduler/dist/scheduler.js.map +1 -0
- package/packages/scheduler/package.json +1 -1
- package/packages/scheduler/src/index.ts +9 -0
- package/packages/scheduler-adapter/package.json +1 -1
- package/packages/session/package.json +1 -1
- package/packages/session-api/package.json +1 -1
- package/packages/session-export/package.json +1 -1
- package/packages/shared-context/dist/index.d.ts +7 -0
- package/packages/shared-context/dist/index.d.ts.map +1 -0
- package/packages/shared-context/dist/index.js +7 -0
- package/packages/shared-context/dist/index.js.map +1 -0
- package/packages/shared-context/dist/shared-context.d.ts +12 -0
- package/packages/shared-context/dist/shared-context.d.ts.map +1 -0
- package/packages/shared-context/dist/shared-context.js +39 -0
- package/packages/shared-context/dist/shared-context.js.map +1 -0
- package/packages/shared-context/package.json +1 -1
- package/packages/skill-mcp-client/dist/client.d.ts +56 -0
- package/packages/skill-mcp-client/dist/client.d.ts.map +1 -0
- package/packages/skill-mcp-client/dist/client.js +101 -0
- package/packages/skill-mcp-client/dist/client.js.map +1 -0
- package/packages/skill-mcp-client/dist/errors.d.ts +44 -0
- package/packages/skill-mcp-client/dist/errors.d.ts.map +1 -0
- package/packages/skill-mcp-client/dist/errors.js +68 -0
- package/packages/skill-mcp-client/dist/errors.js.map +1 -0
- package/packages/skill-mcp-client/dist/index.d.ts +9 -0
- package/packages/skill-mcp-client/dist/index.d.ts.map +1 -0
- package/packages/skill-mcp-client/dist/index.js +9 -0
- package/packages/skill-mcp-client/dist/index.js.map +1 -0
- package/packages/skill-mcp-client/dist/types.d.ts +106 -0
- package/packages/skill-mcp-client/dist/types.d.ts.map +1 -0
- package/packages/skill-mcp-client/dist/types.js +14 -0
- package/packages/skill-mcp-client/dist/types.js.map +1 -0
- package/packages/skill-mcp-client/package.json +1 -1
- package/packages/skill-registry/package.json +1 -1
- package/packages/skills/package.json +1 -5
- 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/telegram/package.json +1 -1
- package/packages/telegram/src/agent-messages.d.ts +28 -0
- package/packages/telegram/src/agent-messages.js +90 -0
- package/packages/telegram/src/bindings.d.ts +296 -0
- package/packages/telegram/src/bindings.js +1086 -0
- package/packages/telegram/src/bus.d.ts +759 -0
- package/packages/telegram/src/bus.js +2732 -0
- package/packages/telegram/src/commands.d.ts +761 -0
- package/packages/telegram/src/commands.js +2622 -0
- package/packages/telegram/src/config.d.ts +222 -0
- package/packages/telegram/src/config.js +844 -0
- package/packages/telegram/src/delivery.d.ts +161 -0
- package/packages/telegram/src/delivery.js +550 -0
- package/packages/telegram/src/extension.d.ts +7 -0
- package/packages/telegram/src/extension.js +2444 -0
- package/packages/telegram/src/inbound.d.ts +94 -0
- package/packages/telegram/src/inbound.js +478 -0
- package/packages/telegram/src/index.d.ts +6 -0
- package/packages/telegram/src/index.js +6 -0
- package/packages/telegram/src/keyboard.d.ts +21 -0
- package/packages/telegram/src/keyboard.js +37 -0
- package/packages/telegram/src/lifecycle.d.ts +210 -0
- package/packages/telegram/src/lifecycle.js +538 -0
- package/packages/telegram/src/pi.d.ts +76 -0
- package/packages/telegram/src/pi.js +130 -0
- package/packages/telegram/src/polling.d.ts +332 -0
- package/packages/telegram/src/polling.js +1219 -0
- package/packages/telegram/src/replies.d.ts +210 -0
- package/packages/telegram/src/replies.js +752 -0
- package/packages/telegram/src/routing.d.ts +388 -0
- package/packages/telegram/src/routing.js +7886 -0
- package/packages/telegram/src/runtime.d.ts +159 -0
- package/packages/telegram/src/runtime.js +351 -0
- package/packages/telegram/src/telegram-api.d.ts +564 -0
- package/packages/telegram/src/telegram-api.js +1332 -0
- package/packages/telegram/src/turns.d.ts +108 -0
- package/packages/telegram/src/turns.js +482 -0
- package/packages/telegram/src/updates.d.ts +1545 -0
- package/packages/telegram/src/updates.js +6420 -0
- package/packages/tencentdb-memory/package.json +1 -1
- package/packages/tencentdb-sync/package.json +1 -1
- package/packages/test-data-generator/package.json +1 -1
- package/packages/test-generator/package.json +1 -1
- package/packages/todo-bd-sync/dist/detector.d.ts +54 -0
- package/packages/todo-bd-sync/dist/detector.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/detector.js +132 -0
- package/packages/todo-bd-sync/dist/detector.js.map +1 -0
- package/packages/todo-bd-sync/dist/extension.d.ts +30 -0
- package/packages/todo-bd-sync/dist/extension.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/extension.js +35 -0
- package/packages/todo-bd-sync/dist/extension.js.map +1 -0
- package/packages/todo-bd-sync/dist/index.d.ts +87 -0
- package/packages/todo-bd-sync/dist/index.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/index.js +296 -0
- package/packages/todo-bd-sync/dist/index.js.map +1 -0
- package/packages/todo-bd-sync/dist/sync.d.ts +72 -0
- package/packages/todo-bd-sync/dist/sync.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/sync.js +290 -0
- package/packages/todo-bd-sync/dist/sync.js.map +1 -0
- package/packages/todo-bd-sync/dist/task-analyzer.d.ts +49 -0
- package/packages/todo-bd-sync/dist/task-analyzer.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/task-analyzer.js +240 -0
- package/packages/todo-bd-sync/dist/task-analyzer.js.map +1 -0
- package/packages/todo-bd-sync/dist/todo-reminder.d.ts +126 -0
- package/packages/todo-bd-sync/dist/todo-reminder.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/todo-reminder.js +329 -0
- package/packages/todo-bd-sync/dist/todo-reminder.js.map +1 -0
- package/packages/todo-bd-sync/dist/types.d.ts +65 -0
- package/packages/todo-bd-sync/dist/types.d.ts.map +1 -0
- package/packages/todo-bd-sync/dist/types.js +67 -0
- package/packages/todo-bd-sync/dist/types.js.map +1 -0
- package/packages/todo-bd-sync/package.json +1 -1
- package/packages/token-estimation/dist/index.d.ts +94 -0
- package/packages/token-estimation/dist/index.d.ts.map +1 -0
- package/packages/token-estimation/dist/index.js +115 -0
- package/packages/token-estimation/dist/index.js.map +1 -0
- package/packages/token-estimation/package.json +1 -1
- package/packages/token-optimizer/package.json +1 -1
- package/packages/trajectory/package.json +1 -1
- package/packages/tui/package.json +1 -1
- package/packages/types/dist/ai-providers.d.ts +36 -0
- package/packages/types/dist/ai-providers.d.ts.map +1 -0
- package/packages/types/dist/ai-providers.js +66 -0
- package/packages/types/dist/ai-providers.js.map +1 -0
- package/packages/types/dist/index.d.ts +12 -0
- package/packages/types/dist/index.d.ts.map +1 -0
- package/packages/types/dist/index.js +12 -0
- package/packages/types/dist/index.js.map +1 -0
- package/packages/types/package.json +5 -5
- package/packages/types/src/index.ts +12 -0
- package/packages/voice-api/package.json +1 -1
- package/packages/webmcp-tester/package.json +1 -1
- package/packages/wiki/package.json +1 -1
- 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/worktree.ts +1 -1
- package/packages/write-review/package.json +1 -1
- package/renderer.ts +1 -1
- package/scripts/build-packages.ts +162 -0
- package/scripts/relay-client.ts +2 -2
- package/scripts/typecheck-packages.mjs +3 -3
- package/scripts/unified-webhook-server.ts +22 -10
- package/scripts/verify-package-contents.ts +345 -0
- package/scripts/ws-server.ts +1 -1
- package/tracker.ts +1 -1
- package/harness/browser-scrapers/base-browser-scraper.d.ts +0 -91
- package/harness/browser-scrapers/chrome-profile-manager.d.ts +0 -80
- package/harness/browser-scrapers/codex-browser-scraper.d.ts +0 -60
- package/harness/browser-scrapers/index.d.ts +0 -29
- package/harness/browser-scrapers/zai-browser-scraper.d.ts +0 -79
- package/harness/e2e/browser-scrapers/base-browser-scraper.d.ts +0 -92
- package/harness/e2e/browser-scrapers/chrome-profile-manager.d.ts +0 -81
- package/harness/e2e/browser-scrapers/codex-browser-scraper.d.ts +0 -61
- package/harness/e2e/browser-scrapers/index.d.ts +0 -30
- package/harness/e2e/browser-scrapers/zai-browser-scraper.d.ts +0 -80
- package/harness/langchain/agents.d.ts +0 -143
- package/harness/langchain/agents.test.d.ts +0 -2
- package/harness/langchain/checkpointer.d.ts +0 -48
- package/harness/langchain/checkpointer.test.d.ts +0 -8
- package/harness/langchain/cron-cli.d.ts +0 -12
- package/harness/langchain/daemon.d.ts +0 -161
- package/harness/langchain/daemon.test.d.ts +0 -11
- package/harness/langchain/file-tools.d.ts +0 -97
- package/harness/langchain/graph.d.ts +0 -706
- package/harness/langchain/model-router.d.ts +0 -63
- package/harness/langchain/model-router.test.d.ts +0 -2
- package/harness/langchain/models.d.ts +0 -72
- package/harness/langchain/ping-pong-middleware.d.ts +0 -28
- package/harness/langchain/ping-pong-middleware.test.d.ts +0 -2
- package/harness/langchain/run.d.ts +0 -15
- package/harness/langchain/scoreboard.test.d.ts +0 -13
- package/harness/langchain/status-line.d.ts +0 -91
- package/harness/langchain/status-line.test.d.ts +0 -8
- package/harness/langchain/surge.d.ts +0 -111
- package/harness/langchain/surge.test.d.ts +0 -10
- package/harness/langchain/widget.d.ts +0 -105
- package/harness/langchain/widget.test.d.ts +0 -8
- package/packages/autonomous-runtime/dist/worker.d.ts +0 -63
- package/packages/autonomous-runtime/dist/worker.js +0 -133
- package/packages/capability-registry/src/types.d.ts +0 -47
- package/packages/clipboard/dist/clipboard.d.ts +0 -11
- package/packages/clipboard/dist/clipboard.js +0 -40
- package/packages/clipboard/dist/index.d.ts +0 -2
- package/packages/clipboard/dist/index.js +0 -2
- package/packages/clipboard/dist/types.d.ts +0 -13
- package/packages/clipboard/dist/types.js +0 -5
- package/packages/context-discovery/dist/discover.d.ts +0 -3
- package/packages/context-discovery/dist/discover.js +0 -42
- package/packages/context-discovery/dist/discovery.d.ts +0 -28
- package/packages/context-discovery/dist/discovery.js +0 -21
- package/packages/context-discovery/dist/index.d.ts +0 -3
- package/packages/context-discovery/dist/index.js +0 -2
- package/packages/context-discovery/dist/types.d.ts +0 -16
- package/packages/context-discovery/dist/types.js +0 -2
- package/packages/event-bus/dist/bus.d.ts +0 -15
- package/packages/event-bus/dist/bus.js +0 -90
- package/packages/event-bus/dist/index.d.ts +0 -4
- package/packages/event-bus/dist/index.js +0 -3
- package/packages/event-bus/dist/test/bus.test.js +0 -52
- package/packages/event-bus/dist/types.d.ts +0 -27
- package/packages/event-bus/dist/types.js +0 -10
- package/packages/event-store/dist/index.d.ts +0 -3
- package/packages/event-store/dist/index.js +0 -2
- package/packages/event-store/dist/store.d.ts +0 -15
- package/packages/event-store/dist/store.js +0 -131
- package/packages/event-store/dist/test/store.test.js +0 -57
- package/packages/event-store/dist/types.d.ts +0 -48
- package/packages/event-store/dist/types.js +0 -5
- package/packages/event-store/src/types.d.ts +0 -48
- package/packages/file-copy-helper/dist/src/extension.js +0 -186
- package/packages/model-registry/src/types.d.ts +0 -63
- package/packages/notification/dist/src/adapters/email-adapter.d.ts +0 -17
- package/packages/notification/dist/src/adapters/email-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/adapters/email-adapter.js +0 -89
- package/packages/notification/dist/src/adapters/email-adapter.js.map +0 -1
- package/packages/notification/dist/src/adapters/line-adapter.d.ts +0 -17
- package/packages/notification/dist/src/adapters/line-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/adapters/line-adapter.js +0 -99
- package/packages/notification/dist/src/adapters/line-adapter.js.map +0 -1
- package/packages/notification/dist/src/adapters/ntfy-adapter.d.ts +0 -17
- package/packages/notification/dist/src/adapters/ntfy-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/adapters/ntfy-adapter.js +0 -84
- package/packages/notification/dist/src/adapters/ntfy-adapter.js.map +0 -1
- package/packages/notification/dist/src/adapters/telegram-adapter.d.ts +0 -56
- package/packages/notification/dist/src/adapters/telegram-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/adapters/telegram-adapter.js +0 -251
- package/packages/notification/dist/src/adapters/telegram-adapter.js.map +0 -1
- package/packages/notification/dist/src/adapters/webhook-adapter.d.ts +0 -15
- package/packages/notification/dist/src/adapters/webhook-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/adapters/webhook-adapter.js +0 -64
- package/packages/notification/dist/src/adapters/webhook-adapter.js.map +0 -1
- package/packages/notification/dist/src/base-adapter.d.ts +0 -36
- package/packages/notification/dist/src/base-adapter.d.ts.map +0 -1
- package/packages/notification/dist/src/base-adapter.js +0 -39
- package/packages/notification/dist/src/base-adapter.js.map +0 -1
- package/packages/notification/dist/src/index.d.ts +0 -12
- package/packages/notification/dist/src/index.d.ts.map +0 -1
- package/packages/notification/dist/src/index.js +0 -12
- package/packages/notification/dist/src/index.js.map +0 -1
- package/packages/notification/dist/src/notification-center.d.ts +0 -89
- package/packages/notification/dist/src/notification-center.d.ts.map +0 -1
- package/packages/notification/dist/src/notification-center.js +0 -356
- package/packages/notification/dist/src/notification-center.js.map +0 -1
- package/packages/notification/dist/src/notification-policy.d.ts +0 -66
- package/packages/notification/dist/src/notification-policy.d.ts.map +0 -1
- package/packages/notification/dist/src/notification-policy.js +0 -153
- package/packages/notification/dist/src/notification-policy.js.map +0 -1
- package/packages/notification/dist/src/telegram-webhook-handler.d.ts +0 -86
- package/packages/notification/dist/src/telegram-webhook-handler.d.ts.map +0 -1
- package/packages/notification/dist/src/telegram-webhook-handler.js +0 -149
- package/packages/notification/dist/src/telegram-webhook-handler.js.map +0 -1
- package/packages/notification/dist/src/types.d.ts +0 -106
- package/packages/notification/dist/src/types.d.ts.map +0 -1
- package/packages/notification/dist/src/types.js +0 -7
- package/packages/notification/dist/src/types.js.map +0 -1
- package/packages/projection-engine/dist/engine.d.ts +0 -61
- package/packages/projection-engine/dist/engine.js +0 -76
- package/packages/projection-engine/dist/index.d.ts +0 -2
- package/packages/projection-engine/dist/index.js +0 -2
- package/packages/projection-engine/dist/project.d.ts +0 -3
- package/packages/projection-engine/dist/project.js +0 -24
- package/packages/projection-engine/dist/types.d.ts +0 -55
- package/packages/projection-engine/dist/types.js +0 -5
- package/packages/projection-engine/src/types.d.ts +0 -55
- package/packages/provider-adapter-sdk/dist/src/builder.d.ts +0 -140
- package/packages/provider-adapter-sdk/dist/src/builder.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/builder.js +0 -332
- package/packages/provider-adapter-sdk/dist/src/builder.js.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/errors.d.ts +0 -71
- package/packages/provider-adapter-sdk/dist/src/errors.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/errors.js +0 -111
- package/packages/provider-adapter-sdk/dist/src/errors.js.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/index.d.ts +0 -15
- package/packages/provider-adapter-sdk/dist/src/index.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/index.js +0 -19
- package/packages/provider-adapter-sdk/dist/src/index.js.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/registry.d.ts +0 -108
- package/packages/provider-adapter-sdk/dist/src/registry.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/registry.js +0 -301
- package/packages/provider-adapter-sdk/dist/src/registry.js.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/tester.d.ts +0 -71
- package/packages/provider-adapter-sdk/dist/src/tester.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/tester.js +0 -392
- package/packages/provider-adapter-sdk/dist/src/tester.js.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/types.d.ts +0 -182
- package/packages/provider-adapter-sdk/dist/src/types.d.ts.map +0 -1
- package/packages/provider-adapter-sdk/dist/src/types.js +0 -11
- package/packages/provider-adapter-sdk/dist/src/types.js.map +0 -1
- package/packages/provider-router/dist/capability-registry/src/types.d.ts +0 -47
- package/packages/provider-router/dist/capability-registry/src/types.d.ts.map +0 -1
- package/packages/provider-router/dist/capability-registry/src/types.js +0 -10
- package/packages/provider-router/dist/capability-registry/src/types.js.map +0 -1
- package/packages/provider-router/dist/provider-router/src/index.d.ts +0 -23
- package/packages/provider-router/dist/provider-router/src/index.d.ts.map +0 -1
- package/packages/provider-router/dist/provider-router/src/index.js +0 -25
- package/packages/provider-router/dist/provider-router/src/index.js.map +0 -1
- package/packages/provider-router/dist/provider-router/src/policy.d.ts +0 -10
- package/packages/provider-router/dist/provider-router/src/policy.d.ts.map +0 -1
- package/packages/provider-router/dist/provider-router/src/policy.js +0 -45
- package/packages/provider-router/dist/provider-router/src/policy.js.map +0 -1
- package/packages/provider-router/dist/provider-router/src/provider-router.d.ts +0 -56
- package/packages/provider-router/dist/provider-router/src/provider-router.d.ts.map +0 -1
- package/packages/provider-router/dist/provider-router/src/provider-router.js +0 -222
- package/packages/provider-router/dist/provider-router/src/provider-router.js.map +0 -1
- package/packages/provider-router/dist/provider-router/src/strategies.d.ts +0 -19
- package/packages/provider-router/dist/provider-router/src/strategies.d.ts.map +0 -1
- package/packages/provider-router/dist/provider-router/src/strategies.js +0 -110
- package/packages/provider-router/dist/provider-router/src/strategies.js.map +0 -1
- package/packages/provider-router/dist/provider-router/src/types.d.ts +0 -91
- package/packages/provider-router/dist/provider-router/src/types.d.ts.map +0 -1
- package/packages/provider-router/dist/provider-router/src/types.js +0 -10
- package/packages/provider-router/dist/provider-router/src/types.js.map +0 -1
- package/packages/provider-router/dist/src/index.d.ts +0 -23
- package/packages/provider-router/dist/src/index.d.ts.map +0 -1
- package/packages/provider-router/dist/src/index.js +0 -25
- package/packages/provider-router/dist/src/index.js.map +0 -1
- package/packages/provider-router/dist/src/policy.d.ts +0 -10
- package/packages/provider-router/dist/src/policy.d.ts.map +0 -1
- package/packages/provider-router/dist/src/policy.js +0 -45
- package/packages/provider-router/dist/src/policy.js.map +0 -1
- package/packages/provider-router/dist/src/provider-router.d.ts +0 -56
- package/packages/provider-router/dist/src/provider-router.d.ts.map +0 -1
- package/packages/provider-router/dist/src/provider-router.js +0 -222
- package/packages/provider-router/dist/src/provider-router.js.map +0 -1
- package/packages/provider-router/dist/src/strategies.d.ts +0 -19
- package/packages/provider-router/dist/src/strategies.d.ts.map +0 -1
- package/packages/provider-router/dist/src/strategies.js +0 -110
- package/packages/provider-router/dist/src/strategies.js.map +0 -1
- package/packages/provider-router/dist/src/types.d.ts +0 -91
- package/packages/provider-router/dist/src/types.d.ts.map +0 -1
- package/packages/provider-router/dist/src/types.js +0 -10
- package/packages/provider-router/dist/src/types.js.map +0 -1
- package/packages/provider-router/dist/types/src/runtime-types.d.ts +0 -412
- package/packages/provider-router/dist/types/src/runtime-types.d.ts.map +0 -1
- package/packages/provider-router/dist/types/src/runtime-types.js +0 -2
- package/packages/provider-router/dist/types/src/runtime-types.js.map +0 -1
- package/packages/session-api/dist/api.d.ts +0 -83
- package/packages/session-api/dist/api.js +0 -35
- package/packages/session-api/dist/index.d.ts +0 -2
- package/packages/session-api/dist/index.js +0 -2
- package/packages/session-api/dist/types.d.ts +0 -22
- package/packages/session-api/dist/types.js +0 -5
- package/packages/session-export/dist/exporter.d.ts +0 -28
- package/packages/session-export/dist/exporter.js +0 -38
- package/packages/session-export/dist/index.d.ts +0 -2
- package/packages/session-export/dist/index.js +0 -2
- package/packages/session-export/dist/types.d.ts +0 -20
- package/packages/session-export/dist/types.js +0 -5
- package/packages/subscription-engine/dist/engine.d.ts +0 -13
- package/packages/subscription-engine/dist/engine.js +0 -40
- package/packages/subscription-engine/dist/index.d.ts +0 -2
- package/packages/subscription-engine/dist/index.js +0 -2
- package/packages/subscription-engine/dist/subscriptions.d.ts +0 -19
- package/packages/subscription-engine/dist/subscriptions.js +0 -32
- package/packages/subscription-engine/dist/types.d.ts +0 -24
- package/packages/subscription-engine/dist/types.js +0 -5
- package/packages/trajectory/test/store.test.d.ts +0 -2
- package/packages/workflow-events/dist/events.d.ts +0 -38
- package/packages/workflow-events/dist/events.js +0 -46
- package/packages/workflow-events/dist/index.d.ts +0 -2
- package/packages/workflow-events/dist/index.js +0 -2
- package/packages/workflow-events/dist/pipeline.d.ts +0 -21
- package/packages/workflow-events/dist/pipeline.js +0 -27
- package/packages/workflow-events/dist/types.d.ts +0 -110
- package/packages/workflow-events/dist/types.js +0 -5
- package/packages/workflow-events/src/types.d.ts +0 -110
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Worker Stub — RFC-0101 §4
|
|
3
|
-
*
|
|
4
|
-
* A worker is a pi session that owns tasks from the inbox.
|
|
5
|
-
* This is the lightweight worker-side of the lease protocol.
|
|
6
|
-
*
|
|
7
|
-
* The worker picks up work via the inbox's `claim()` method
|
|
8
|
-
* and reports results via `complete()`.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Worker — picks up tasks from the inbox and processes them.
|
|
12
|
-
*
|
|
13
|
-
* Lifecycle:
|
|
14
|
-
* 1. Construct with inbox + workerId
|
|
15
|
-
* 2. `start()` — begins polling/claiming tasks
|
|
16
|
-
* 3. `stop()` — stops claiming, expires held leases
|
|
17
|
-
*
|
|
18
|
-
* The worker does NOT run tasks itself — it delegates to the harness
|
|
19
|
-
* loop runtime. It just manages the lease lifecycle.
|
|
20
|
-
*/
|
|
21
|
-
export class Worker {
|
|
22
|
-
config;
|
|
23
|
-
events = {};
|
|
24
|
-
running = false;
|
|
25
|
-
heartbeatTimer = null;
|
|
26
|
-
constructor(config) {
|
|
27
|
-
this.config = {
|
|
28
|
-
heartbeatIntervalMs: 30_000,
|
|
29
|
-
...config,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
on(event, handler) {
|
|
33
|
-
this.events[event] = handler;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Start the worker — begins polling for available tasks.
|
|
37
|
-
*/
|
|
38
|
-
async start() {
|
|
39
|
-
if (this.running)
|
|
40
|
-
return;
|
|
41
|
-
this.running = true;
|
|
42
|
-
// Start heartbeat
|
|
43
|
-
this.heartbeatTimer = setInterval(() => this._heartbeat(), this.config.heartbeatIntervalMs);
|
|
44
|
-
// Claim any immediately available tasks
|
|
45
|
-
await this._poll();
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Stop the worker — stops polling and expires any held leases.
|
|
49
|
-
*/
|
|
50
|
-
async stop() {
|
|
51
|
-
if (!this.running)
|
|
52
|
-
return;
|
|
53
|
-
this.running = false;
|
|
54
|
-
if (this.heartbeatTimer) {
|
|
55
|
-
clearInterval(this.heartbeatTimer);
|
|
56
|
-
this.heartbeatTimer = null;
|
|
57
|
-
}
|
|
58
|
-
// Expire all leases held by this worker
|
|
59
|
-
// (inbox.expireLease is idempotent — safe to call repeatedly)
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Status of this worker.
|
|
63
|
-
*/
|
|
64
|
-
status() {
|
|
65
|
-
return {
|
|
66
|
-
workerId: this.config.workerId,
|
|
67
|
-
running: this.running,
|
|
68
|
-
heartbeatIntervalMs: this.config.heartbeatIntervalMs ?? 30_000,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
async _poll() {
|
|
72
|
-
if (!this.running)
|
|
73
|
-
return;
|
|
74
|
-
try {
|
|
75
|
-
// Try to claim one task
|
|
76
|
-
const lease = await this.config.inbox.claim({
|
|
77
|
-
workerId: this.config.workerId,
|
|
78
|
-
heartbeatIntervalMs: this.config.heartbeatIntervalMs ?? 30_000,
|
|
79
|
-
});
|
|
80
|
-
if (lease) {
|
|
81
|
-
this.events.onLease?.(lease);
|
|
82
|
-
await this._processTask(lease);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
catch (err) {
|
|
86
|
-
this.config.onError?.("__poll__", err);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
async _processTask(lease) {
|
|
90
|
-
const task = lease.task;
|
|
91
|
-
try {
|
|
92
|
-
// Delegate to harness loop runtime (stub — will be wired in Phase 2)
|
|
93
|
-
const result = await this._runTask(task);
|
|
94
|
-
// Report completion
|
|
95
|
-
await this.config.inbox.complete(lease.taskId, result);
|
|
96
|
-
this.events.onComplete?.(lease.taskId, result);
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
this.events.onError?.(lease.taskId, err);
|
|
100
|
-
await this.config.inbox.complete(lease.taskId, {
|
|
101
|
-
ok: false,
|
|
102
|
-
error: String(err),
|
|
103
|
-
completedAt: new Date().toISOString(),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
// Continue polling for more work
|
|
107
|
-
if (this.running)
|
|
108
|
-
void this._poll();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Run a single task. Stub — replaces with actual harness loop integration.
|
|
112
|
-
*/
|
|
113
|
-
async _runTask(task) {
|
|
114
|
-
// TODO(Phase 2): Wire to harness loop runtime
|
|
115
|
-
// For now, return a stub result so the lease protocol works end-to-end.
|
|
116
|
-
return {
|
|
117
|
-
ok: true,
|
|
118
|
-
summary: `[stub] Processed ${task.id}`,
|
|
119
|
-
completedAt: new Date().toISOString(),
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
async _heartbeat() {
|
|
123
|
-
// Refresh leases held by this worker
|
|
124
|
-
// The inbox tracks which leases this worker holds and refreshes them.
|
|
125
|
-
try {
|
|
126
|
-
await this.config.inbox.refreshLeases(this.config.workerId);
|
|
127
|
-
}
|
|
128
|
-
catch {
|
|
129
|
-
// Non-fatal — lease will expire naturally
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=worker.js.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capability Registry Types (RFC-0051)
|
|
3
|
-
*/
|
|
4
|
-
export type Capability = "code_generation" | "code_review" | "planning" | "test_generation" | "e2e_testing" | "refactoring" | "analysis" | "debugging" | "documentation" | "vision" | "function_calling" | "json_mode" | "streaming";
|
|
5
|
-
export type Latency = "fast" | "medium" | "slow";
|
|
6
|
-
export interface CapabilityProfile {
|
|
7
|
-
capability: Capability;
|
|
8
|
-
score: number;
|
|
9
|
-
latency: Latency;
|
|
10
|
-
contextWindow: number;
|
|
11
|
-
maxOutputTokens: number;
|
|
12
|
-
}
|
|
13
|
-
export interface CapabilityQuery {
|
|
14
|
-
minScore?: number;
|
|
15
|
-
maxLatency?: Latency;
|
|
16
|
-
requiresContextWindow?: number;
|
|
17
|
-
requiresMaxOutput?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface ModelWithCapability {
|
|
20
|
-
providerId: string;
|
|
21
|
-
modelId: string;
|
|
22
|
-
profile: CapabilityProfile;
|
|
23
|
-
}
|
|
24
|
-
export interface CapabilityRegistry {
|
|
25
|
-
register(providerId: string, modelId: string, capabilities: CapabilityProfile[]): void;
|
|
26
|
-
unregister(providerId: string, modelId: string): void;
|
|
27
|
-
getCapabilities(providerId: string, modelId: string): CapabilityProfile[];
|
|
28
|
-
query(capability: Capability, requirements?: CapabilityQuery): ModelWithCapability[];
|
|
29
|
-
listProviders(): string[];
|
|
30
|
-
listModels(providerId: string): string[];
|
|
31
|
-
}
|
|
32
|
-
export type CapabilityRegistryEvent = {
|
|
33
|
-
type: "capability.registered";
|
|
34
|
-
providerId: string;
|
|
35
|
-
modelId: string;
|
|
36
|
-
count: number;
|
|
37
|
-
} | {
|
|
38
|
-
type: "capability.unregistered";
|
|
39
|
-
providerId: string;
|
|
40
|
-
modelId: string;
|
|
41
|
-
} | {
|
|
42
|
-
type: "capability.queried";
|
|
43
|
-
capability: Capability;
|
|
44
|
-
results: number;
|
|
45
|
-
};
|
|
46
|
-
export declare const LATENCY_RANK: Record<Latency, number>;
|
|
47
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clipboard — System clipboard integration
|
|
3
|
-
*/
|
|
4
|
-
import type { ClipboardOptions } from "./types.js";
|
|
5
|
-
/** Write text to system clipboard. */
|
|
6
|
-
export declare function copy(text: string, _options?: ClipboardOptions): Promise<void>;
|
|
7
|
-
/** Read text from system clipboard. */
|
|
8
|
-
export declare function read(): Promise<string>;
|
|
9
|
-
/** Copy the last assistant message from session service. */
|
|
10
|
-
export declare function copyLastResponse(_sessionApi: unknown, _options?: ClipboardOptions): Promise<void>;
|
|
11
|
-
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clipboard — System clipboard integration
|
|
3
|
-
*/
|
|
4
|
-
import { writeFileSync, readFileSync } from "node:fs";
|
|
5
|
-
/** Write text to system clipboard. */
|
|
6
|
-
export async function copy(text, _options) {
|
|
7
|
-
try {
|
|
8
|
-
// Linux: prefer xclip, fall back to /dev/clipboard
|
|
9
|
-
const { execSync } = require("node:child_process");
|
|
10
|
-
try {
|
|
11
|
-
execSync(`echo '${text.replace(/'/g, "'\"'\"'")}' | xclip -selection clipboard`, { stdio: "ignore" });
|
|
12
|
-
}
|
|
13
|
-
catch {
|
|
14
|
-
writeFileSync("/dev/clipboard", text);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
catch {
|
|
18
|
-
// Silently fail if clipboard unavailable
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/** Read text from system clipboard. */
|
|
22
|
-
export async function read() {
|
|
23
|
-
try {
|
|
24
|
-
const { execSync } = require("node:child_process");
|
|
25
|
-
return execSync("xclip -selection clipboard -o", { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
try {
|
|
29
|
-
return readFileSync("/dev/clipboard", "utf8");
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return "";
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/** Copy the last assistant message from session service. */
|
|
37
|
-
export async function copyLastResponse(_sessionApi, _options) {
|
|
38
|
-
await copy("[session-api not yet integrated]", _options);
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=clipboard.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clipboard — Types
|
|
3
|
-
*/
|
|
4
|
-
export interface ClipboardContent {
|
|
5
|
-
text: string;
|
|
6
|
-
html?: string;
|
|
7
|
-
source?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ClipboardOptions {
|
|
10
|
-
notify?: boolean;
|
|
11
|
-
format?: "text" | "html";
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { readdirSync, readFileSync } from "node:fs";
|
|
2
|
-
import { join, extname } from "node:path";
|
|
3
|
-
const CODE_EXTS = new Set([".ts", ".tsx", ".js", ".jsx", ".py", ".go", ".rs", ".java"]);
|
|
4
|
-
function estimateTokens(text) {
|
|
5
|
-
return Math.ceil(text.length / 4);
|
|
6
|
-
}
|
|
7
|
-
function scanDir(dir, limit) {
|
|
8
|
-
const results = [];
|
|
9
|
-
try {
|
|
10
|
-
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
11
|
-
if (results.length >= limit)
|
|
12
|
-
break;
|
|
13
|
-
const full = join(dir, entry.name);
|
|
14
|
-
if (entry.isDirectory() && !entry.name.startsWith(".") && entry.name !== "node_modules") {
|
|
15
|
-
results.push(...scanDir(full, limit - results.length));
|
|
16
|
-
}
|
|
17
|
-
else if (entry.isFile() && CODE_EXTS.has(extname(entry.name))) {
|
|
18
|
-
try {
|
|
19
|
-
const content = readFileSync(full, "utf8").slice(0, 8000);
|
|
20
|
-
results.push({
|
|
21
|
-
id: full,
|
|
22
|
-
kind: "source",
|
|
23
|
-
path: full,
|
|
24
|
-
title: entry.name,
|
|
25
|
-
content,
|
|
26
|
-
tokens: estimateTokens(content),
|
|
27
|
-
trust: "high",
|
|
28
|
-
tags: [extname(entry.name).replace(".", "")],
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
catch { /* skip unreadable */ }
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
catch { /* skip inaccessible */ }
|
|
36
|
-
return results;
|
|
37
|
-
}
|
|
38
|
-
export function discoverContext(root, options = {}) {
|
|
39
|
-
const limit = options.limit ?? 50;
|
|
40
|
-
return scanDir(root, limit);
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=discover.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Discovery — Orchestrates context collection
|
|
3
|
-
*/
|
|
4
|
-
interface DiscoveredContext {
|
|
5
|
-
intent: unknown;
|
|
6
|
-
workspace: unknown;
|
|
7
|
-
dependencies: unknown;
|
|
8
|
-
knowledge: unknown;
|
|
9
|
-
files: string[];
|
|
10
|
-
estimatedTokens: number;
|
|
11
|
-
}
|
|
12
|
-
interface DiscoveryOptions {
|
|
13
|
-
rootPath: string;
|
|
14
|
-
task: string;
|
|
15
|
-
intent?: unknown;
|
|
16
|
-
maximumTokens?: number;
|
|
17
|
-
}
|
|
18
|
-
interface DiscoveryResult {
|
|
19
|
-
context: DiscoveredContext;
|
|
20
|
-
discovered: unknown[];
|
|
21
|
-
omitted: unknown[];
|
|
22
|
-
estimatedTokens: number;
|
|
23
|
-
}
|
|
24
|
-
export declare class ContextDiscovery {
|
|
25
|
-
discover(options: DiscoveryOptions): Promise<DiscoveryResult>;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context Discovery — Orchestrates context collection
|
|
3
|
-
*/
|
|
4
|
-
export class ContextDiscovery {
|
|
5
|
-
async discover(options) {
|
|
6
|
-
return {
|
|
7
|
-
context: {
|
|
8
|
-
intent: options.intent ?? null,
|
|
9
|
-
workspace: null,
|
|
10
|
-
dependencies: null,
|
|
11
|
-
knowledge: null,
|
|
12
|
-
files: [],
|
|
13
|
-
estimatedTokens: 0,
|
|
14
|
-
},
|
|
15
|
-
discovered: [],
|
|
16
|
-
omitted: [],
|
|
17
|
-
estimatedTokens: 0,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=discovery.js.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ContextCandidate {
|
|
2
|
-
id: string;
|
|
3
|
-
kind: "source" | "doc" | "okf" | "skill" | "test" | "config";
|
|
4
|
-
path: string;
|
|
5
|
-
title: string;
|
|
6
|
-
content: string;
|
|
7
|
-
tokens: number;
|
|
8
|
-
trust: "high" | "medium" | "low";
|
|
9
|
-
tags: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface DiscoveryOptions {
|
|
12
|
-
root: string;
|
|
13
|
-
task?: string;
|
|
14
|
-
limit?: number;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Bus — pub/sub implementation
|
|
3
|
-
*/
|
|
4
|
-
import type { Subscriber, Subscription, EventPayload } from "./types.js";
|
|
5
|
-
export declare class EventBus {
|
|
6
|
-
private readonly subs;
|
|
7
|
-
private readonly byTopic;
|
|
8
|
-
publish<T>(topic: string, data: T, source?: string): string;
|
|
9
|
-
subscribe<T>(topic: string, subscriber: Subscriber<T>, filter?: (data: T) => boolean, priority?: number): string;
|
|
10
|
-
unsubscribe(subscriptionId: string): void;
|
|
11
|
-
unsubscribeAll(topic?: string): void;
|
|
12
|
-
replay(topic: string, events: EventPayload<unknown>[]): void;
|
|
13
|
-
getSubscribers(topic?: string): Subscription[];
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=bus.d.ts.map
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Bus — pub/sub implementation
|
|
3
|
-
*/
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
export class EventBus {
|
|
6
|
-
subs = new Map();
|
|
7
|
-
byTopic = new Map();
|
|
8
|
-
publish(topic, data, source = "system") {
|
|
9
|
-
const eventId = randomUUID();
|
|
10
|
-
const timestamp = new Date().toISOString();
|
|
11
|
-
const payload = { topic, data, timestamp, eventId, source };
|
|
12
|
-
const topicIds = this.byTopic.get(topic) ?? new Set();
|
|
13
|
-
const wildcardIds = this.byTopic.get("*") ?? new Set();
|
|
14
|
-
const matches = [];
|
|
15
|
-
for (const sid of [...topicIds, ...wildcardIds]) {
|
|
16
|
-
const sub = this.subs.get(sid);
|
|
17
|
-
if (!sub || !sub.active)
|
|
18
|
-
continue;
|
|
19
|
-
if (sub.filter && !sub.filter(data))
|
|
20
|
-
continue;
|
|
21
|
-
matches.push({ sub, payload });
|
|
22
|
-
}
|
|
23
|
-
matches.sort((a, b) => b.sub.priority - a.sub.priority);
|
|
24
|
-
for (const { sub } of matches) {
|
|
25
|
-
try {
|
|
26
|
-
sub.subscriber(payload);
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
sub.active = false;
|
|
30
|
-
this.subs.delete(sub.id);
|
|
31
|
-
this.byTopic.get(sub.topic)?.delete(sub.id);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return eventId;
|
|
35
|
-
}
|
|
36
|
-
subscribe(topic, subscriber, filter, priority = 0) {
|
|
37
|
-
const id = randomUUID();
|
|
38
|
-
const sub = {
|
|
39
|
-
id,
|
|
40
|
-
topic,
|
|
41
|
-
subscriber: subscriber,
|
|
42
|
-
filter: filter,
|
|
43
|
-
priority,
|
|
44
|
-
active: true,
|
|
45
|
-
};
|
|
46
|
-
this.subs.set(id, sub);
|
|
47
|
-
if (!this.byTopic.has(topic))
|
|
48
|
-
this.byTopic.set(topic, new Set());
|
|
49
|
-
this.byTopic.get(topic).add(id);
|
|
50
|
-
return id;
|
|
51
|
-
}
|
|
52
|
-
unsubscribe(subscriptionId) {
|
|
53
|
-
const sub = this.subs.get(subscriptionId);
|
|
54
|
-
if (!sub)
|
|
55
|
-
return;
|
|
56
|
-
sub.active = false;
|
|
57
|
-
this.subs.delete(subscriptionId);
|
|
58
|
-
this.byTopic.get(sub.topic)?.delete(subscriptionId);
|
|
59
|
-
}
|
|
60
|
-
unsubscribeAll(topic) {
|
|
61
|
-
if (topic) {
|
|
62
|
-
const ids = this.byTopic.get(topic);
|
|
63
|
-
if (ids) {
|
|
64
|
-
for (const id of ids)
|
|
65
|
-
this.unsubscribe(id);
|
|
66
|
-
this.byTopic.delete(topic);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
for (const id of this.subs.keys())
|
|
71
|
-
this.unsubscribe(id);
|
|
72
|
-
this.byTopic.clear();
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
replay(topic, events) {
|
|
76
|
-
for (const event of events) {
|
|
77
|
-
if (event.topic === topic || topic === "*") {
|
|
78
|
-
this.publish(event.topic, event.data, event.source);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
getSubscribers(topic) {
|
|
83
|
-
if (topic) {
|
|
84
|
-
const ids = this.byTopic.get(topic) ?? new Set();
|
|
85
|
-
return [...ids].map((id) => this.subs.get(id)).filter((s) => s !== undefined);
|
|
86
|
-
}
|
|
87
|
-
return [...this.subs.values()].filter((s) => s.active);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
//# sourceMappingURL=bus.js.map
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { describe, it } from "node:test";
|
|
2
|
-
import { equal, deepEqual } from "node:assert";
|
|
3
|
-
import { EventBus } from "../src/bus.js";
|
|
4
|
-
describe("EventBus", () => {
|
|
5
|
-
const bus = new EventBus();
|
|
6
|
-
it("publish returns eventId", () => {
|
|
7
|
-
const id = bus.publish("test.topic", { msg: "hello" });
|
|
8
|
-
equal(typeof id, "string");
|
|
9
|
-
equal(id.length > 0, true);
|
|
10
|
-
});
|
|
11
|
-
it("subscriber receives event", () => {
|
|
12
|
-
let received = null;
|
|
13
|
-
bus.subscribe("test.1", (p) => { received = p; });
|
|
14
|
-
bus.publish("test.1", { data: "hello" });
|
|
15
|
-
equal(received.data, "hello");
|
|
16
|
-
});
|
|
17
|
-
it("multiple subscribers all called", () => {
|
|
18
|
-
const calls = [];
|
|
19
|
-
bus.subscribe("test.2", () => { calls.push(1); });
|
|
20
|
-
bus.subscribe("test.2", () => { calls.push(2); });
|
|
21
|
-
bus.publish("test.2", { x: 1 });
|
|
22
|
-
deepEqual(calls, [1, 2]);
|
|
23
|
-
});
|
|
24
|
-
it("unsubscribe stops notifications", () => {
|
|
25
|
-
let called = false;
|
|
26
|
-
const id = bus.subscribe("test.3", () => { called = true; });
|
|
27
|
-
bus.unsubscribe(id);
|
|
28
|
-
bus.publish("test.3", {});
|
|
29
|
-
equal(called, false);
|
|
30
|
-
});
|
|
31
|
-
it("filter predicates work", () => {
|
|
32
|
-
let called = false;
|
|
33
|
-
bus.subscribe("test.4", () => { called = true; }, (d) => d.ok === true);
|
|
34
|
-
bus.publish("test.4", { ok: false });
|
|
35
|
-
equal(called, false);
|
|
36
|
-
bus.publish("test.4", { ok: true });
|
|
37
|
-
equal(called, true);
|
|
38
|
-
});
|
|
39
|
-
it("priority ordering respected", () => {
|
|
40
|
-
const order = [];
|
|
41
|
-
bus.subscribe("test.5", () => { order.push(1); }, undefined, 1);
|
|
42
|
-
bus.subscribe("test.5", () => { order.push(2); }, undefined, 2);
|
|
43
|
-
bus.publish("test.5", {});
|
|
44
|
-
deepEqual(order, [2, 1]); // higher priority first
|
|
45
|
-
});
|
|
46
|
-
it("unsubscribeAll(topic) removes all for topic", () => {
|
|
47
|
-
bus.subscribe("test.6", () => { });
|
|
48
|
-
bus.subscribe("test.6", () => { });
|
|
49
|
-
bus.unsubscribeAll("test.6");
|
|
50
|
-
equal(bus.getSubscribers("test.6").length, 0);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Bus — Types
|
|
3
|
-
*/
|
|
4
|
-
export type Topic = "session.message" | "session.assistant_start" | "session.assistant_end" | "session.tool_start" | "session.tool_end" | "session.checkpoint" | "session.compact" | "task.assigned" | "task.started" | "task.completed" | "task.failed" | "review.requested" | "review.completed" | "decision.made" | "approval.requested" | "approval.granted" | "workflow.started" | "workflow.finished" | "knowledge.extracted" | "system.quota_exceeded" | "system.checkpoint_saved" | "system.error";
|
|
5
|
-
export interface EventPayload<T = unknown> {
|
|
6
|
-
topic: string;
|
|
7
|
-
data: T;
|
|
8
|
-
timestamp: string;
|
|
9
|
-
eventId: string;
|
|
10
|
-
source: string;
|
|
11
|
-
}
|
|
12
|
-
export type Subscriber<T = unknown> = (payload: EventPayload<T>) => void | Promise<void>;
|
|
13
|
-
export interface Subscription {
|
|
14
|
-
id: string;
|
|
15
|
-
topic: string;
|
|
16
|
-
subscriber: Subscriber<unknown>;
|
|
17
|
-
filter?: (data: unknown) => boolean;
|
|
18
|
-
priority: number;
|
|
19
|
-
active: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface BusOptions {
|
|
22
|
-
deliveryGuarantee?: "at_least_once" | "at_most_once" | "exactly_once";
|
|
23
|
-
}
|
|
24
|
-
export declare class EventBusError extends Error {
|
|
25
|
-
constructor(message: string);
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Event Store — JSONL-backed immutable event store
|
|
3
|
-
*/
|
|
4
|
-
import type { SessionEvent, WriteResult, ReadOptions, SearchOptions, StoreOptions, StoreStats } from "./types.js";
|
|
5
|
-
export declare class EventStore {
|
|
6
|
-
private readonly sessionsDir;
|
|
7
|
-
constructor(opts?: StoreOptions);
|
|
8
|
-
getPath(sessionId: string): string;
|
|
9
|
-
append(event: Omit<SessionEvent, "id" | "timestamp">): Promise<WriteResult>;
|
|
10
|
-
read(opts?: ReadOptions): Promise<SessionEvent[]>;
|
|
11
|
-
search(opts: SearchOptions): Promise<SessionEvent[]>;
|
|
12
|
-
stats(sessionId: string): StoreStats;
|
|
13
|
-
list(): string[];
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=store.d.ts.map
|