pi-harness-runtime 1.1.397 → 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/notification-events.ts +6 -6
- 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 +42 -0
- package/packages/notification/dist/adapters/detail-format.d.ts.map +1 -0
- package/packages/notification/dist/adapters/detail-format.js +94 -0
- package/packages/notification/dist/adapters/detail-format.js.map +1 -0
- package/packages/notification/dist/adapters/email-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/email-adapter.js +3 -2
- package/packages/notification/dist/adapters/email-adapter.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 +87 -9
- package/packages/notification/dist/adapters/line-adapter.js.map +1 -1
- package/packages/notification/dist/adapters/ntfy-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/ntfy-adapter.js +3 -2
- package/packages/notification/dist/adapters/ntfy-adapter.js.map +1 -1
- package/packages/notification/dist/adapters/telegram-adapter.d.ts +14 -0
- package/packages/notification/dist/adapters/telegram-adapter.d.ts.map +1 -1
- package/packages/notification/dist/adapters/telegram-adapter.js +89 -69
- 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 +60 -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 +21 -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 +114 -0
- package/packages/notification/src/adapters/email-adapter.ts +3 -2
- package/packages/notification/src/adapters/line-adapter.ts +97 -9
- package/packages/notification/src/adapters/ntfy-adapter.ts +3 -2
- package/packages/notification/src/adapters/telegram-adapter.ts +98 -76
- package/packages/notification/src/notification-center.ts +66 -8
- package/packages/notification/src/pending-question.ts +160 -8
- package/packages/notification/src/types.ts +21 -0
- package/packages/notification/test/approval-payload.test.ts +269 -0
- package/packages/notification/test/detail-format.test.ts +106 -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
package/AGENTS.md
CHANGED
|
@@ -646,6 +646,25 @@ Production detection ≠ deployment authorization
|
|
|
646
646
|
~/.pi-harness-runtime/workspace-env.sqlite
|
|
647
647
|
```
|
|
648
648
|
|
|
649
|
+
## Single Published App
|
|
650
|
+
|
|
651
|
+
**`pi-harness-runtime` is the only npm package a user installs.** Every internal app
|
|
652
|
+
(logging, jev-judge, contracts, relay, skills, todo-bd-sync, ...) lives in
|
|
653
|
+
`packages/<name>/`, is compiled into `packages/<name>/dist/` and ships inside that one
|
|
654
|
+
tarball. A user never runs `npm install @pi-harness/<anything>`.
|
|
655
|
+
|
|
656
|
+
- A runtime **value** import may only point at a built artifact
|
|
657
|
+
(`../packages/<name>/dist/...`). A `packages/<name>/src/<file>.js` specifier only
|
|
658
|
+
exists when somebody compiled a package in place and is never valid in shipped code.
|
|
659
|
+
- A package manifest points at the built output (`main`/`exports` -> `./dist/...`).
|
|
660
|
+
The exception is the vendored `packages/telegram` app: it ships compiled JavaScript
|
|
661
|
+
upstream, so its entry point stays in `src/` and the files are committed.
|
|
662
|
+
- Compiled JavaScript never lives next to a TypeScript source: Bun resolves the
|
|
663
|
+
literal `.js` file first, so a stale artifact silently shadows the current source.
|
|
664
|
+
- `npm run build` (`scripts/build-packages.ts`) builds every package and fails when a
|
|
665
|
+
published entry point is missing. `npm run build:verify:pack` proves the npm
|
|
666
|
+
tarball contains every runtime import target. Both run in CI and before a publish.
|
|
667
|
+
|
|
649
668
|
## Centralized Application Logging
|
|
650
669
|
|
|
651
670
|
All application logs can be shipped to the **unified webhook server** (ingest path),
|
|
@@ -653,13 +672,19 @@ which is the only component that writes to **Cloudflare R2** (durable archive).
|
|
|
653
672
|
pipeline lives in `packages/logging` (`@pi-harness/logging`); the harness uses the
|
|
654
673
|
process-wide singleton from it.
|
|
655
674
|
|
|
656
|
-
**Client side** (first success wins, the rest are skipped - a fallback chain
|
|
657
|
-
a broadcast):
|
|
675
|
+
**Client side** (first success wins, the rest are skipped - a fallback chain by
|
|
676
|
+
default, never a broadcast):
|
|
658
677
|
|
|
659
678
|
```text
|
|
660
679
|
producer -> classify -> redact -> sample -> buffer -> webhook -> local spool (~/.pi-harness-runtime/logs/spool)
|
|
661
680
|
```
|
|
662
681
|
|
|
682
|
+
`PI_LOG_DELIVERY=fanout` switches to **broadcast** semantics: every configured
|
|
683
|
+
transport receives every batch, each transport tracks its own success, and the batch
|
|
684
|
+
is spooled only when *every* transport failed. Fallback stays the default because it
|
|
685
|
+
never stores the same batch twice; fanout is the explicit opt-in for "the archive and
|
|
686
|
+
the live path must both have it".
|
|
687
|
+
|
|
663
688
|
**Server side** (durable hand-off, then an independent upload):
|
|
664
689
|
|
|
665
690
|
```text
|
|
@@ -689,6 +714,7 @@ for a user who explicitly asked for more - it never widens the event allowlist.
|
|
|
689
714
|
| Variable | Meaning | Default |
|
|
690
715
|
|----------|---------|---------|
|
|
691
716
|
| `PI_LOG_SINK` | `off` \| `auto` \| `r2` \| `webhook` \| `r2+webhook` | `auto` |
|
|
717
|
+
| `PI_LOG_DELIVERY` | `fallback` (first transport wins) \| `fanout` (every transport gets the batch) | `fallback` |
|
|
692
718
|
| `PI_LOG_LEVEL` | Minimum level that is shipped | `info` |
|
|
693
719
|
| `PI_LOG_SAMPLE_RATE` | Share of `debug` records kept (0..1) | `0.1` |
|
|
694
720
|
| `PI_LOG_RATE_LIMIT` | Max records per source+event per minute | `60` |
|
|
@@ -727,8 +753,24 @@ R2 credentials are read from the key files `r2-bucket-name.txt`, `r2-endpoint.tx
|
|
|
727
753
|
|-------|--------|---------|
|
|
728
754
|
| `/api/logs` | POST | Accept a batch. `202` only after the durable write, `503` when the endpoint is not configured or the queue is unavailable (the client keeps its spool). |
|
|
729
755
|
| `/api/logs/query` | POST | Read-only, tenant-scoped metadata query (installation, session, time range, level, source, event). Bounded and paginated; never returns message text. |
|
|
756
|
+
| `/api/logs/incidents` | POST | Read-only, tenant-scoped query of the derived incidents (severity, source, event, time range). Bounded. |
|
|
730
757
|
| `/api/logs/health` | GET | Queue depth, oldest pending age, failure count, last error. |
|
|
731
758
|
|
|
759
|
+
**Incidents** (server side, versioned):
|
|
760
|
+
|
|
761
|
+
A log record is a moment, an incident is a recurring problem. The server derives
|
|
762
|
+
the incidents from the records it accepts:
|
|
763
|
+
|
|
764
|
+
- The schema is versioned (`schemaVersion: 1`). The collection is `log_incidents_v1`,
|
|
765
|
+
so a schema change means a new collection and a reader always knows the shape.
|
|
766
|
+
- The `fingerprint` is stable: the same failure produces the same fingerprint even
|
|
767
|
+
when the message carries a changing timestamp, id, path or number.
|
|
768
|
+
- The `tenant_id` is **server derived** from the ingest credential, never from the
|
|
769
|
+
request body, and it is the filter of every query.
|
|
770
|
+
- The durable source of truth is plain NDJSON
|
|
771
|
+
(`~/.pi-harness-runtime/logs/incidents/<tenant>/incidents-<day>.ndjson`); Qdrant
|
|
772
|
+
holds the searchable view (`IncidentQdrantWriter`).
|
|
773
|
+
|
|
732
774
|
**Ingest credentials** (server side):
|
|
733
775
|
|
|
734
776
|
- The endpoint **fails closed**: without a credential every write is refused with `503`.
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.188](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.401...v1.1.188) (2026-10-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **packaging:** restore the copy-plugins script of the install step ([bf838f1](https://github.com/ManotLuijiu/pi-harness-runtime/commit/bf838f12efcf43d90b9b1b64608b2f46831bc896))
|
|
11
|
+
|
|
12
|
+
### [1.1.187](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.400...v1.1.187) (2026-10-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **jev:** give the autonomous decision the facts it rests on ([7a2707c](https://github.com/ManotLuijiu/pi-harness-runtime/commit/7a2707ceccdd21b8deabb881989f4226177f7238))
|
|
18
|
+
|
|
19
|
+
### [1.1.186](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.399...v1.1.186) (2026-10-24)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **notification:** multi-channel pending questions with a typed Jev decision ([cef012e](https://github.com/ManotLuijiu/pi-harness-runtime/commit/cef012e8ef88053979ec3a68e3285eeefc59c673))
|
|
25
|
+
|
|
5
26
|
### [1.1.140](https://github.com/ManotLuijiu/pi-harness-runtime/compare/v1.1.184...v1.1.140) (2026-10-10)
|
|
6
27
|
|
|
7
28
|
|
package/RULES.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# Development Rules
|
|
2
2
|
|
|
3
|
+
## Single Published App (CRITICAL)
|
|
4
|
+
|
|
5
|
+
**`pi-harness-runtime` is the ONLY npm package a user installs.** Every internal
|
|
6
|
+
app (logging, jev-judge, contracts, relay, skills, todo-bd-sync, ...) ships
|
|
7
|
+
INSIDE that one tarball - it is never published on its own and a user never
|
|
8
|
+
runs `npm install @pi-harness/<anything>`.
|
|
9
|
+
|
|
10
|
+
**Rules:**
|
|
11
|
+
|
|
12
|
+
1. Every workspace lives in `packages/<name>/` and is compiled into
|
|
13
|
+
`packages/<name>/dist/`.
|
|
14
|
+
2. A runtime **value** import may only point at a built artifact
|
|
15
|
+
(`../packages/<name>/dist/...`). A `packages/<name>/src/<file>.js` specifier
|
|
16
|
+
only exists when somebody compiled the package in place - it is never a
|
|
17
|
+
valid import in shipped code.
|
|
18
|
+
3. The package manifest points at the built output (`main`/`exports` →
|
|
19
|
+
`./dist/...`). The single exception is the vendored `packages/telegram`
|
|
20
|
+
app: it ships compiled JavaScript upstream, so its entry point stays in
|
|
21
|
+
`src/` and the files are committed.
|
|
22
|
+
4. Compiled JavaScript never lives next to a TypeScript source. Bun resolves
|
|
23
|
+
the literal `.js` file first, so a stale artifact silently shadows the
|
|
24
|
+
current source.
|
|
25
|
+
5. `npm run build` (scripts/build-packages.ts) builds every package and fails
|
|
26
|
+
when a published entry point is missing. `npm run build:verify:pack`
|
|
27
|
+
proves the npm tarball contains every runtime import target.
|
|
28
|
+
6. Both run in CI, so a release can never publish a tarball with a missing
|
|
29
|
+
internal app.
|
|
30
|
+
|
|
3
31
|
## Version Management
|
|
4
32
|
|
|
5
33
|
### NPM Publishing via GitHub Actions + OIDC
|
package/harness/agent-handoff.ts
CHANGED
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
import type {
|
|
9
9
|
HandoffContext,
|
|
10
10
|
HandoffEvent,
|
|
11
|
-
} from "../packages/types/
|
|
12
|
-
import { writeJson, readJson } from "../cli.
|
|
13
|
-
// @ts-expect-error - Bun has built-in Node.js types
|
|
11
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
12
|
+
import { writeJson, readJson } from "../cli.js";
|
|
14
13
|
import { join } from "node:path";
|
|
15
14
|
|
|
16
15
|
export interface HandoffData {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ensureHerdrWorkspace,
|
|
10
10
|
publishReviewCompletedSimple,
|
|
11
11
|
publishReviewRequestedSimple,
|
|
12
|
-
} from "../packages/event-bus/src/herdr-bus.js";
|
|
12
|
+
} from "../packages/event-bus/dist/src/herdr-bus.js";
|
|
13
13
|
|
|
14
14
|
const AGENT_ID = "review-agent";
|
|
15
15
|
const REVIEW_TIMEOUT_MS = 5 * 60 * 1000;
|
package/harness/blackboard.ts
CHANGED
|
@@ -24,9 +24,8 @@ import type {
|
|
|
24
24
|
LockInfo,
|
|
25
25
|
RuntimeEvent,
|
|
26
26
|
TaskGraph,
|
|
27
|
-
} from "../packages/types/
|
|
28
|
-
import { writeJson, readJson, appendJsonl, ensureUsageDir } from "../cli.
|
|
29
|
-
// @ts-expect-error - Bun has built-in Node.js types
|
|
27
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
28
|
+
import { writeJson, readJson, appendJsonl, ensureUsageDir } from "../cli.js";
|
|
30
29
|
import { join, dirname } from "node:path";
|
|
31
30
|
|
|
32
31
|
export class SharedBlackboard {
|
|
@@ -16,11 +16,11 @@ import type {
|
|
|
16
16
|
ContextWindowConfig,
|
|
17
17
|
ProviderMessage,
|
|
18
18
|
CompactableMessage,
|
|
19
|
-
} from "../packages/types/
|
|
19
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
20
20
|
import {
|
|
21
21
|
roughTokenCount,
|
|
22
22
|
roughMessagesTokens,
|
|
23
|
-
} from "../packages/token-estimation/
|
|
23
|
+
} from "../packages/token-estimation/dist/index.js";
|
|
24
24
|
|
|
25
25
|
// --- Constants ----------------------------------------------------------------
|
|
26
26
|
|
|
@@ -161,14 +161,16 @@ export class PlaywrightE2ERunner implements E2ERunner {
|
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* Assert a condition
|
|
164
|
+
*
|
|
165
|
+
* The condition is a JavaScript expression that is evaluated INSIDE the
|
|
166
|
+
* page. Playwright evaluates a string expression in the page context on
|
|
167
|
+
* its own, so the runner never has to build a function from a string
|
|
168
|
+
* (which would be dynamic code execution in this process).
|
|
164
169
|
*/
|
|
165
170
|
async assert(condition: string, message?: string): Promise<boolean> {
|
|
166
171
|
if (!this.page) throw new Error("Browser not started");
|
|
167
172
|
|
|
168
|
-
const result = await this.page.evaluate(
|
|
169
|
-
// eslint-disable-next-line no-eval
|
|
170
|
-
return eval(String(cond)) as boolean; // eslint-disable-line
|
|
171
|
-
}, condition);
|
|
173
|
+
const result = await this.page.evaluate(condition);
|
|
172
174
|
|
|
173
175
|
if (!result && message) {
|
|
174
176
|
throw new Error(message);
|
package/harness/herdr-agents.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createHerdrBus,
|
|
8
8
|
getHerdrWorkspacePaths,
|
|
9
9
|
ensureHerdrWorkspace,
|
|
10
|
-
} from "../packages/event-bus/src/herdr-bus.js";
|
|
10
|
+
} from "../packages/event-bus/dist/src/herdr-bus.js";
|
|
11
11
|
|
|
12
12
|
// Suppress stack traces — only show error message to keep TUI clean
|
|
13
13
|
const logError = (err: unknown) =>
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import { homedir } from "node:os";
|
|
39
39
|
import { join } from "node:path";
|
|
40
40
|
|
|
41
|
-
import { LeaseManager } from "../../packages/autonomous-runtime/
|
|
41
|
+
import { LeaseManager } from "../../packages/autonomous-runtime/dist/lease.js";
|
|
42
42
|
import type { ApprovalClass } from "../../packages/autonomous-runtime/src/types.js";
|
|
43
43
|
import {
|
|
44
44
|
type CodexSession,
|
|
@@ -56,12 +56,12 @@ import {
|
|
|
56
56
|
publishLoopFinished,
|
|
57
57
|
publishLoopStarted,
|
|
58
58
|
publishReviewCompleted,
|
|
59
|
-
} from "../../packages/event-bus/src/herdr-bus.js";
|
|
59
|
+
} from "../../packages/event-bus/dist/src/herdr-bus.js";
|
|
60
60
|
import { NotificationCenter } from "../../packages/notification/dist/notification-center.js";
|
|
61
61
|
import {
|
|
62
62
|
getApprovedPatternStore,
|
|
63
63
|
getTrajectoryStore,
|
|
64
|
-
} from "../../packages/trajectory/src/index.js";
|
|
64
|
+
} from "../../packages/trajectory/dist/src/index.js";
|
|
65
65
|
import { createLoopCheckpointer } from "./checkpointer.js";
|
|
66
66
|
import {
|
|
67
67
|
buildDryRunDeps,
|
|
@@ -38,8 +38,8 @@ export function getJevProvider(): "minimax" | "gpt" {
|
|
|
38
38
|
return _currentProvider;
|
|
39
39
|
}
|
|
40
40
|
import { readFileSync } from "node:fs";
|
|
41
|
-
import { WriteReviewBlackboard } from "../../packages/write-review/
|
|
42
|
-
import { getApprovedPatternStore } from "../../packages/trajectory/src/index.js";
|
|
41
|
+
import { WriteReviewBlackboard } from "../../packages/write-review/dist/blackboard.js";
|
|
42
|
+
import { getApprovedPatternStore } from "../../packages/trajectory/dist/src/index.js";
|
|
43
43
|
import type { Verdict } from "../../packages/write-review/src/types.js";
|
|
44
44
|
import type { LoopWidget } from "./widget.js";
|
|
45
45
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { randomUUID, createHash } from "node:crypto";
|
|
2
2
|
import { appendFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
-
import { getHerdrWorkspace } from "../../packages/event-bus/src/herdr-bus.js";
|
|
4
|
+
import { getHerdrWorkspace } from "../../packages/event-bus/dist/src/herdr-bus.js";
|
|
5
5
|
import {
|
|
6
6
|
PingPongDecisionEngine,
|
|
7
7
|
scanCodebaseComplexity,
|
|
8
8
|
type PingPongDecisionOptions,
|
|
9
9
|
type PingPongDecisionResult,
|
|
10
|
-
} from "../../packages/intent-analyzer/src/index.js";
|
|
10
|
+
} from "../../packages/intent-analyzer/dist/src/index.js";
|
|
11
11
|
|
|
12
12
|
export interface PingPongMiddlewareOptions extends PingPongDecisionOptions {
|
|
13
13
|
/** Shared directory watched by LoopDaemon. Defaults to /tmp/herdr-workspace. */
|
|
@@ -12,9 +12,9 @@ import { join } from "path";
|
|
|
12
12
|
import {
|
|
13
13
|
createHerdrBus,
|
|
14
14
|
ensureHerdrWorkspace,
|
|
15
|
-
} from "../packages/event-bus/src/herdr-bus.js";
|
|
15
|
+
} from "../packages/event-bus/dist/src/herdr-bus.js";
|
|
16
16
|
import { SharedBlackboard } from "./blackboard.js";
|
|
17
|
-
import type { LoopNextAction
|
|
17
|
+
import type { LoopNextAction } from "./loop-types.js";
|
|
18
18
|
import type { BlackboardRecord } from "../packages/types/src/runtime-types.js";
|
|
19
19
|
|
|
20
20
|
const AGENT_ID = "code-agent";
|
|
@@ -121,8 +121,10 @@ async function main(): Promise<void> {
|
|
|
121
121
|
agentId: AGENT_ID,
|
|
122
122
|
taskId: action.taskId,
|
|
123
123
|
status: "success",
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
summary: `wrote ${result.files.length} file(s)`,
|
|
125
|
+
filesChanged: result.files,
|
|
126
|
+
createdAt: new Date().toISOString(),
|
|
127
|
+
});
|
|
126
128
|
blackboard.updateAgentStatus(AGENT_ID, "idle");
|
|
127
129
|
}
|
|
128
130
|
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ensureHerdrWorkspace,
|
|
14
14
|
publishLoopStarted,
|
|
15
15
|
type LoopConfig,
|
|
16
|
-
} from "../packages/event-bus/src/index.js";
|
|
16
|
+
} from "../packages/event-bus/dist/src/index.js";
|
|
17
17
|
import { createBlackboard } from "./blackboard.js";
|
|
18
18
|
import { buildLoopTaskGraph } from "./loop-types.js";
|
|
19
19
|
import type { SharedBlackboard } from "./blackboard.js";
|
|
@@ -12,7 +12,7 @@ import { join } from "path";
|
|
|
12
12
|
import {
|
|
13
13
|
ensureHerdrWorkspace,
|
|
14
14
|
parseVerdict,
|
|
15
|
-
} from "../packages/event-bus/src/herdr-bus.js";
|
|
15
|
+
} from "../packages/event-bus/dist/src/herdr-bus.js";
|
|
16
16
|
import { SharedBlackboard } from "./blackboard.js";
|
|
17
17
|
import type {
|
|
18
18
|
LoopNextAction,
|
package/harness/loop-types.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type {
|
|
6
6
|
TaskGraph,
|
|
7
7
|
TaskNode,
|
|
8
|
-
} from "../packages/types/
|
|
8
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
9
9
|
|
|
10
10
|
export type LoopVerdict = "approved" | "changes_requested" | "blocked";
|
|
11
11
|
export type LoopNodeType = "write" | "review" | "decide" | "report";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses a planning LLM to decompose the requirement into tasks with dependencies.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { TaskGraph } from "../packages/types/
|
|
8
|
+
import type { TaskGraph } from "../packages/types/dist/runtime-types.js";
|
|
9
9
|
import type { TaskGraphManager } from "./task-graph.ts";
|
|
10
10
|
|
|
11
11
|
export interface PlanResult {
|
|
@@ -105,7 +105,7 @@ export class HarnessNotificationEvents {
|
|
|
105
105
|
*/
|
|
106
106
|
async emitQuotaPaused(resumeAt?: string): Promise<void> {
|
|
107
107
|
await this.emit("QuotaPaused", {
|
|
108
|
-
|
|
108
|
+
reason: resumeAt ? `Resumes at ${resumeAt}` : undefined,
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -113,7 +113,7 @@ export class HarnessNotificationEvents {
|
|
|
113
113
|
* Emit ResumeScheduled event
|
|
114
114
|
*/
|
|
115
115
|
async emitResumeScheduled(resumeAt: string): Promise<void> {
|
|
116
|
-
await this.emit("ResumeScheduled", {
|
|
116
|
+
await this.emit("ResumeScheduled", { reason: resumeAt });
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/**
|
|
@@ -121,7 +121,7 @@ export class HarnessNotificationEvents {
|
|
|
121
121
|
*/
|
|
122
122
|
async emitContextCompacted(tokensCompacted?: number): Promise<void> {
|
|
123
123
|
await this.emit("ContextCompacted", {
|
|
124
|
-
|
|
124
|
+
reason: tokensCompacted
|
|
125
125
|
? `Compacted ${tokensCompacted.toLocaleString()} tokens`
|
|
126
126
|
: undefined,
|
|
127
127
|
});
|
|
@@ -132,7 +132,7 @@ export class HarnessNotificationEvents {
|
|
|
132
132
|
*/
|
|
133
133
|
async emitOutputLimitContinued(attempt: number): Promise<void> {
|
|
134
134
|
await this.emit("OutputLimitContinued", {
|
|
135
|
-
|
|
135
|
+
reason: `Attempt ${attempt}`,
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
|
|
@@ -149,7 +149,7 @@ export class HarnessNotificationEvents {
|
|
|
149
149
|
* Emit HumanReviewNeeded event
|
|
150
150
|
*/
|
|
151
151
|
async emitHumanReviewNeeded(taskId: string, reason: string): Promise<void> {
|
|
152
|
-
await this.emit("HumanReviewNeeded", { taskId,
|
|
152
|
+
await this.emit("HumanReviewNeeded", { taskId, reason });
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -163,7 +163,7 @@ export class HarnessNotificationEvents {
|
|
|
163
163
|
* Emit JobCancelled event
|
|
164
164
|
*/
|
|
165
165
|
async emitJobCancelled(reason?: string): Promise<void> {
|
|
166
|
-
await this.emit("JobCancelled", {
|
|
166
|
+
await this.emit("JobCancelled", { reason });
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
/**
|
|
@@ -10,9 +10,8 @@ import type {
|
|
|
10
10
|
ProjectDetection,
|
|
11
11
|
SeedStrategy,
|
|
12
12
|
E2EStrategy,
|
|
13
|
-
} from "
|
|
13
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
14
14
|
import { readJson } from "../../cli.ts";
|
|
15
|
-
// @ts-expect-error - Bun has built-in Node.js types
|
|
16
15
|
import { join } from "node:path";
|
|
17
16
|
|
|
18
17
|
export interface DetectionSignal {
|
package/harness/repair-engine.ts
CHANGED
|
@@ -9,11 +9,9 @@ import type {
|
|
|
9
9
|
FailureType,
|
|
10
10
|
AttemptedFix,
|
|
11
11
|
RetryPolicy,
|
|
12
|
-
} from "../packages/types/
|
|
13
|
-
import { appendJsonl } from "../cli.
|
|
14
|
-
// @ts-expect-error - Bun has built-in Node.js types
|
|
12
|
+
} from "../packages/types/dist/runtime-types.js";
|
|
13
|
+
import { appendJsonl } from "../cli.js";
|
|
15
14
|
import { join, dirname } from "node:path";
|
|
16
|
-
// @ts-expect-error - Bun has built-in Node.js types
|
|
17
15
|
import { mkdirSync } from "node:fs";
|
|
18
16
|
|
|
19
17
|
const DEFAULT_RETRY_POLICY: RetryPolicy = {
|
|
@@ -13,7 +13,7 @@ import { homedir } from "node:os";
|
|
|
13
13
|
import { centralError, centralInfo, centralWarn } from "../packages/logging/dist/index.js";
|
|
14
14
|
|
|
15
15
|
export type ServiceLevel = "info" | "warn" | "error" | "debug";
|
|
16
|
-
export type ServiceName = "jev" | "honcho" | "qdrant";
|
|
16
|
+
export type ServiceName = "jev" | "honcho" | "qdrant" | "infisical";
|
|
17
17
|
|
|
18
18
|
export interface ServiceEvent {
|
|
19
19
|
ts: string;
|
package/harness/skill-sync.ts
CHANGED
|
@@ -12,10 +12,10 @@ import type {
|
|
|
12
12
|
SkillInfo,
|
|
13
13
|
GetSkillResult,
|
|
14
14
|
} from "../packages/skill-mcp-client/src/types.js";
|
|
15
|
-
import { SkillAPIError } from "../packages/skill-mcp-client/
|
|
15
|
+
import { SkillAPIError } from "../packages/skill-mcp-client/dist/errors.js";
|
|
16
16
|
|
|
17
17
|
type SkillMCPClient = InstanceType<
|
|
18
|
-
typeof import("../packages/skill-mcp-client/
|
|
18
|
+
typeof import("../packages/skill-mcp-client/dist/client.js").SkillMCPClient
|
|
19
19
|
>;
|
|
20
20
|
|
|
21
21
|
// Lazy import to avoid errors if package not built yet
|
|
@@ -31,7 +31,7 @@ async function getClient(): Promise<SkillMCPClient | null> {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
try {
|
|
34
|
-
const mod = await import("../packages/skill-mcp-client/
|
|
34
|
+
const mod = await import("../packages/skill-mcp-client/dist/client.js");
|
|
35
35
|
const SkillMCPClientClass = mod.SkillMCPClient;
|
|
36
36
|
const serverUrl = await getSkillsSaasUrl();
|
|
37
37
|
|