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
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The delivery semantics of the shipper.
|
|
3
|
+
*
|
|
4
|
+
* Two modes:
|
|
5
|
+
* - `fallback` (the default): the transports form a chain, the first one
|
|
6
|
+
* that accepts the batch wins and the later ones are not called.
|
|
7
|
+
* - `fanout` (explicit opt-in): every transport receives the batch, each
|
|
8
|
+
* one tracks its own success, and the batch is only spooled when EVERY
|
|
9
|
+
* transport failed.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { afterEach, describe, expect, test } from "bun:test";
|
|
13
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
14
|
+
import { tmpdir } from "node:os";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import { LogShipper } from "../src/shipper.js";
|
|
17
|
+
import { LogSpool } from "../src/spool.js";
|
|
18
|
+
import type { LogBatch, LogTransport } from "../src/types.js";
|
|
19
|
+
|
|
20
|
+
const created: string[] = [];
|
|
21
|
+
|
|
22
|
+
function tempDir(): string {
|
|
23
|
+
const dir = mkdtempSync(join(tmpdir(), "log-fanout-"));
|
|
24
|
+
created.push(dir);
|
|
25
|
+
return dir;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
afterEach(() => {
|
|
29
|
+
while (created.length > 0) {
|
|
30
|
+
rmSync(created.pop() as string, { recursive: true, force: true });
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
interface RecordingTransport extends LogTransport {
|
|
35
|
+
batches: LogBatch[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function transport(name: string, fail = false): RecordingTransport {
|
|
39
|
+
const batches: LogBatch[] = [];
|
|
40
|
+
return {
|
|
41
|
+
name,
|
|
42
|
+
batches,
|
|
43
|
+
async send(batch: LogBatch): Promise<void> {
|
|
44
|
+
if (fail) throw new Error(`${name} is down`);
|
|
45
|
+
batches.push(batch);
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** A shipper that delivers one record per flush. */
|
|
51
|
+
function buildShipper(options: {
|
|
52
|
+
transports: LogTransport[];
|
|
53
|
+
delivery?: "fallback" | "fanout";
|
|
54
|
+
spoolDir?: string;
|
|
55
|
+
}): LogShipper {
|
|
56
|
+
return new LogShipper({
|
|
57
|
+
app: "pi-harness",
|
|
58
|
+
installationId: "install-1",
|
|
59
|
+
transports: options.transports,
|
|
60
|
+
delivery: options.delivery,
|
|
61
|
+
spool: options.spoolDir ? new LogSpool({ dir: options.spoolDir }) : undefined,
|
|
62
|
+
buffer: { maxSize: 10, maxBatchSize: 1 },
|
|
63
|
+
flushIntervalMs: 0,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
describe("the fallback delivery", () => {
|
|
68
|
+
test("the first transport that accepts the batch wins", async () => {
|
|
69
|
+
const first = transport("r2");
|
|
70
|
+
const second = transport("webhook");
|
|
71
|
+
const shipper = buildShipper({ transports: [first, second] });
|
|
72
|
+
|
|
73
|
+
shipper.info("unit", "service.started", "boom");
|
|
74
|
+
await shipper.flush();
|
|
75
|
+
|
|
76
|
+
expect(first.batches).toHaveLength(1);
|
|
77
|
+
expect(second.batches).toHaveLength(0);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test("a failing transport hands over to the next one", async () => {
|
|
81
|
+
const first = transport("r2", true);
|
|
82
|
+
const second = transport("webhook");
|
|
83
|
+
const shipper = buildShipper({ transports: [first, second] });
|
|
84
|
+
|
|
85
|
+
shipper.info("unit", "service.started", "boom");
|
|
86
|
+
await shipper.flush();
|
|
87
|
+
|
|
88
|
+
expect(first.batches).toHaveLength(0);
|
|
89
|
+
expect(second.batches).toHaveLength(1);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
test("the batch is spooled when every transport failed", async () => {
|
|
93
|
+
const dir = tempDir();
|
|
94
|
+
const spool = new LogSpool({ dir });
|
|
95
|
+
const shipper = buildShipper({
|
|
96
|
+
transports: [transport("r2", true), transport("webhook", true)],
|
|
97
|
+
spoolDir: dir,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
shipper.info("unit", "service.started", "boom");
|
|
101
|
+
await shipper.flush();
|
|
102
|
+
|
|
103
|
+
expect(spool.list().length).toBe(1);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
describe("the fanout delivery", () => {
|
|
108
|
+
test("every transport receives the batch", async () => {
|
|
109
|
+
const first = transport("r2");
|
|
110
|
+
const second = transport("webhook");
|
|
111
|
+
const shipper = buildShipper({ transports: [first, second], delivery: "fanout" });
|
|
112
|
+
|
|
113
|
+
shipper.info("unit", "service.started", "boom");
|
|
114
|
+
await shipper.flush();
|
|
115
|
+
|
|
116
|
+
expect(first.batches).toHaveLength(1);
|
|
117
|
+
expect(second.batches).toHaveLength(1);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test("a failing transport does not stop the others", async () => {
|
|
121
|
+
const first = transport("r2", true);
|
|
122
|
+
const second = transport("webhook");
|
|
123
|
+
const shipper = buildShipper({ transports: [first, second], delivery: "fanout" });
|
|
124
|
+
|
|
125
|
+
shipper.info("unit", "service.started", "boom");
|
|
126
|
+
await shipper.flush();
|
|
127
|
+
|
|
128
|
+
expect(first.batches).toHaveLength(0);
|
|
129
|
+
expect(second.batches).toHaveLength(1);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
test("the batch is not spooled when one transport accepted it", async () => {
|
|
133
|
+
const dir = tempDir();
|
|
134
|
+
const spool = new LogSpool({ dir });
|
|
135
|
+
const shipper = buildShipper({
|
|
136
|
+
transports: [transport("r2", true), transport("webhook")],
|
|
137
|
+
delivery: "fanout",
|
|
138
|
+
spoolDir: dir,
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
shipper.info("unit", "service.started", "boom");
|
|
142
|
+
await shipper.flush();
|
|
143
|
+
|
|
144
|
+
expect(spool.list()).toHaveLength(0);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
test("the batch is spooled when every transport failed", async () => {
|
|
148
|
+
const dir = tempDir();
|
|
149
|
+
const spool = new LogSpool({ dir });
|
|
150
|
+
const shipper = buildShipper({
|
|
151
|
+
transports: [transport("r2", true), transport("webhook", true)],
|
|
152
|
+
delivery: "fanout",
|
|
153
|
+
spoolDir: dir,
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
shipper.info("unit", "service.started", "boom");
|
|
157
|
+
await shipper.flush();
|
|
158
|
+
|
|
159
|
+
expect(spool.list()).toHaveLength(1);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test("every transport tracks its own delivery state", async () => {
|
|
163
|
+
const first = transport("r2", true);
|
|
164
|
+
const second = transport("webhook");
|
|
165
|
+
const shipper = buildShipper({ transports: [first, second], delivery: "fanout" });
|
|
166
|
+
|
|
167
|
+
shipper.info("unit", "service.started", "boom");
|
|
168
|
+
await shipper.flush();
|
|
169
|
+
|
|
170
|
+
const status = shipper.getTransportStatus();
|
|
171
|
+
expect(status).toHaveLength(2);
|
|
172
|
+
const r2 = status.find((entry) => entry.name === "r2");
|
|
173
|
+
const webhook = status.find((entry) => entry.name === "webhook");
|
|
174
|
+
expect(r2?.failed).toBe(1);
|
|
175
|
+
expect(r2?.delivered).toBe(0);
|
|
176
|
+
expect(r2?.lastError).toContain("r2 is down");
|
|
177
|
+
expect(webhook?.delivered).toBe(1);
|
|
178
|
+
expect(webhook?.failed).toBe(0);
|
|
179
|
+
expect(webhook?.lastSuccessAt).toBeDefined();
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
test("the fallback is the default", () => {
|
|
183
|
+
const shipper = buildShipper({ transports: [transport("r2")] });
|
|
184
|
+
expect(shipper.deliveryMode).toBe("fallback");
|
|
185
|
+
});
|
|
186
|
+
});
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The versioned incident schema, the durable incident store and the Qdrant
|
|
3
|
+
* writer.
|
|
4
|
+
*
|
|
5
|
+
* The three properties that matter:
|
|
6
|
+
* - the fingerprint is stable across volatile parts of a message,
|
|
7
|
+
* - the tenant is server derived, so a caller can never see another
|
|
8
|
+
* tenant's incidents,
|
|
9
|
+
* - the schema version is explicit on every incident.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { afterEach, describe, expect, test } from "bun:test";
|
|
13
|
+
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
14
|
+
import { tmpdir } from "node:os";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import {
|
|
17
|
+
INCIDENT_COLLECTION,
|
|
18
|
+
INCIDENT_SCHEMA_VERSION,
|
|
19
|
+
extractIncidents,
|
|
20
|
+
incidentFingerprint,
|
|
21
|
+
isKnownIncidentSchema,
|
|
22
|
+
mergeIncident,
|
|
23
|
+
normalizeForFingerprint,
|
|
24
|
+
} from "../src/incidents/schema.js";
|
|
25
|
+
import {
|
|
26
|
+
IncidentStore,
|
|
27
|
+
type IncidentQueryParams,
|
|
28
|
+
} from "../src/server/incident-store.js";
|
|
29
|
+
import {
|
|
30
|
+
IncidentQdrantWriter,
|
|
31
|
+
incidentPointId,
|
|
32
|
+
tenantFilter,
|
|
33
|
+
type IncidentPoint,
|
|
34
|
+
type IncidentPayload,
|
|
35
|
+
} from "../src/server/incident-qdrant.js";
|
|
36
|
+
import {
|
|
37
|
+
LogCredentialStore,
|
|
38
|
+
LogIngestService,
|
|
39
|
+
LogIndexStore,
|
|
40
|
+
LogOutbox,
|
|
41
|
+
hashToken,
|
|
42
|
+
} from "../src/server/index.js";
|
|
43
|
+
|
|
44
|
+
const created: string[] = [];
|
|
45
|
+
|
|
46
|
+
function tempDir(): string {
|
|
47
|
+
const dir = mkdtempSync(join(tmpdir(), "log-incidents-"));
|
|
48
|
+
created.push(dir);
|
|
49
|
+
return dir;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
afterEach(() => {
|
|
53
|
+
while (created.length > 0) {
|
|
54
|
+
rmSync(created.pop() as string, { recursive: true, force: true });
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const TOKEN = "install-token-1";
|
|
59
|
+
|
|
60
|
+
describe("the incident fingerprint", () => {
|
|
61
|
+
test("is stable when only volatile parts change", () => {
|
|
62
|
+
const a = incidentFingerprint({
|
|
63
|
+
source: "harness",
|
|
64
|
+
event: "run.failed",
|
|
65
|
+
errorKind: "TypeError",
|
|
66
|
+
message: "cannot read property id of undefined at 12:00:01 in /tmp/run-1234.ts",
|
|
67
|
+
});
|
|
68
|
+
const b = incidentFingerprint({
|
|
69
|
+
source: "harness",
|
|
70
|
+
event: "run.failed",
|
|
71
|
+
errorKind: "TypeError",
|
|
72
|
+
message: "cannot read property id of undefined at 13:45:59 in /tmp/run-9876.ts",
|
|
73
|
+
});
|
|
74
|
+
expect(a).toBe(b);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test("differs when the failure itself differs", () => {
|
|
78
|
+
const a = incidentFingerprint({
|
|
79
|
+
source: "harness",
|
|
80
|
+
event: "run.failed",
|
|
81
|
+
errorKind: "TypeError",
|
|
82
|
+
message: "cannot read property id of undefined",
|
|
83
|
+
});
|
|
84
|
+
const b = incidentFingerprint({
|
|
85
|
+
source: "harness",
|
|
86
|
+
event: "run.failed",
|
|
87
|
+
errorKind: "RangeError",
|
|
88
|
+
message: "cannot read property id of undefined",
|
|
89
|
+
});
|
|
90
|
+
expect(a).not.toBe(b);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
test("normalizes ids, paths and numbers", () => {
|
|
94
|
+
expect(normalizeForFingerprint("id 550e8400-e29b-41d4-a716-446655440000")).toContain(
|
|
95
|
+
"<uuid>",
|
|
96
|
+
);
|
|
97
|
+
expect(normalizeForFingerprint("failed after 42 retries")).toContain("<n>");
|
|
98
|
+
expect(normalizeForFingerprint("read /var/lib/app/config.json")).toContain("<path>");
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
describe("the incident extraction", () => {
|
|
103
|
+
const record = (over: Partial<Parameters<typeof extractIncidents>[0][number]> = {}) => ({
|
|
104
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
105
|
+
level: "error",
|
|
106
|
+
source: "harness",
|
|
107
|
+
event: "run.failed",
|
|
108
|
+
error: { name: "TypeError", message: "boom" },
|
|
109
|
+
...over,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test("groups the same failure into one incident with a count", () => {
|
|
113
|
+
const incidents = extractIncidents(
|
|
114
|
+
[record(), record({ ts: "2026-10-24T09:05:00.000Z" })],
|
|
115
|
+
"tenant-a",
|
|
116
|
+
"install-1",
|
|
117
|
+
);
|
|
118
|
+
expect(incidents).toHaveLength(1);
|
|
119
|
+
expect(incidents[0].count).toBe(2);
|
|
120
|
+
expect(incidents[0].firstSeen).toBe("2026-10-24T09:00:00.000Z");
|
|
121
|
+
expect(incidents[0].lastSeen).toBe("2026-10-24T09:05:00.000Z");
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
test("ignores records that are not a problem", () => {
|
|
125
|
+
expect(extractIncidents([record({ level: "info" })], "tenant-a")).toHaveLength(0);
|
|
126
|
+
expect(extractIncidents([record({ level: "debug" })], "tenant-a")).toHaveLength(0);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test("takes the tenant from the caller, not from the record", () => {
|
|
130
|
+
const incidents = extractIncidents([record()], "tenant-b");
|
|
131
|
+
expect(incidents[0].tenantId).toBe("tenant-b");
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
test("carries the schema version", () => {
|
|
135
|
+
const incidents = extractIncidents([record()], "tenant-a");
|
|
136
|
+
expect(incidents[0].schemaVersion).toBe(INCIDENT_SCHEMA_VERSION);
|
|
137
|
+
expect(isKnownIncidentSchema(incidents[0].schemaVersion)).toBe(true);
|
|
138
|
+
expect(isKnownIncidentSchema(999)).toBe(false);
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
test("merges an incident into the stored one", () => {
|
|
142
|
+
const first = extractIncidents([record()], "tenant-a")[0];
|
|
143
|
+
const second = extractIncidents(
|
|
144
|
+
[record({ ts: "2026-10-25T09:00:00.000Z" })],
|
|
145
|
+
"tenant-a",
|
|
146
|
+
)[0];
|
|
147
|
+
const merged = mergeIncident(first, second);
|
|
148
|
+
expect(merged.count).toBe(2);
|
|
149
|
+
expect(merged.firstSeen).toBe(first.firstSeen);
|
|
150
|
+
expect(merged.lastSeen).toBe("2026-10-25T09:00:00.000Z");
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
describe("the incident store", () => {
|
|
155
|
+
test("stores and reads the incidents of a tenant", () => {
|
|
156
|
+
const dir = tempDir();
|
|
157
|
+
const store = new IncidentStore({ dir });
|
|
158
|
+
const incidents = extractIncidents(
|
|
159
|
+
[
|
|
160
|
+
{
|
|
161
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
162
|
+
level: "error",
|
|
163
|
+
source: "harness",
|
|
164
|
+
event: "run.failed",
|
|
165
|
+
error: { name: "TypeError", message: "boom" },
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
"tenant-a",
|
|
169
|
+
);
|
|
170
|
+
expect(store.append(incidents)).toBe(1);
|
|
171
|
+
|
|
172
|
+
const result = store.query({ tenantId: "tenant-a" });
|
|
173
|
+
expect(result.incidents).toHaveLength(1);
|
|
174
|
+
expect(result.incidents[0].fingerprint).toBe(incidents[0].fingerprint);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test("never returns the incidents of another tenant", () => {
|
|
178
|
+
const dir = tempDir();
|
|
179
|
+
const store = new IncidentStore({ dir });
|
|
180
|
+
store.append(
|
|
181
|
+
extractIncidents(
|
|
182
|
+
[
|
|
183
|
+
{
|
|
184
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
185
|
+
level: "error",
|
|
186
|
+
source: "harness",
|
|
187
|
+
event: "run.failed",
|
|
188
|
+
error: { name: "TypeError", message: "boom" },
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
"tenant-a",
|
|
192
|
+
),
|
|
193
|
+
);
|
|
194
|
+
expect(store.query({ tenantId: "tenant-b" }).incidents).toHaveLength(0);
|
|
195
|
+
expect(store.query({ tenantId: "tenant-a" }).incidents).toHaveLength(1);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
test("filters by severity and source", () => {
|
|
199
|
+
const dir = tempDir();
|
|
200
|
+
const store = new IncidentStore({ dir });
|
|
201
|
+
const base = {
|
|
202
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
203
|
+
level: "error" as const,
|
|
204
|
+
source: "harness",
|
|
205
|
+
event: "run.failed",
|
|
206
|
+
error: { name: "TypeError", message: "boom" },
|
|
207
|
+
};
|
|
208
|
+
store.append(extractIncidents([base], "tenant-a"));
|
|
209
|
+
store.append(
|
|
210
|
+
extractIncidents([{ ...base, level: "warn", event: "run.slow" }], "tenant-a"),
|
|
211
|
+
);
|
|
212
|
+
expect(store.query({ tenantId: "tenant-a" }).incidents).toHaveLength(2);
|
|
213
|
+
expect(store.query({ tenantId: "tenant-a", severity: "error" }).incidents).toHaveLength(1);
|
|
214
|
+
expect(store.query({ tenantId: "tenant-a", source: "other" }).incidents).toHaveLength(0);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
describe("the Qdrant incident writer", () => {
|
|
219
|
+
class FakeQdrant {
|
|
220
|
+
upserts: { collection: string; points: IncidentPoint[] }[] = [];
|
|
221
|
+
searches: { collection: string; filter: Record<string, unknown>; limit: number }[] = [];
|
|
222
|
+
points: IncidentPoint[] = [];
|
|
223
|
+
fail = false;
|
|
224
|
+
|
|
225
|
+
async upsert(collection: string, points: IncidentPoint[]): Promise<void> {
|
|
226
|
+
if (this.fail) throw new Error("qdrant is down");
|
|
227
|
+
this.upserts.push({ collection, points });
|
|
228
|
+
this.points.push(...points);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
async search(
|
|
232
|
+
collection: string,
|
|
233
|
+
filter: Record<string, unknown>,
|
|
234
|
+
limit: number,
|
|
235
|
+
): Promise<IncidentPayload[]> {
|
|
236
|
+
this.searches.push({ collection, filter, limit });
|
|
237
|
+
return this.points.slice(0, limit).map((point) => point.payload);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
const incident = () =>
|
|
242
|
+
extractIncidents(
|
|
243
|
+
[
|
|
244
|
+
{
|
|
245
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
246
|
+
level: "error",
|
|
247
|
+
source: "harness",
|
|
248
|
+
event: "run.failed",
|
|
249
|
+
error: { name: "TypeError", message: "boom" },
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
"tenant-a",
|
|
253
|
+
)[0];
|
|
254
|
+
|
|
255
|
+
test("writes into the versioned collection with the tenant in the payload", async () => {
|
|
256
|
+
const qdrant = new FakeQdrant();
|
|
257
|
+
const writer = new IncidentQdrantWriter(qdrant);
|
|
258
|
+
expect(await writer.upsert([incident()])).toBe(1);
|
|
259
|
+
expect(qdrant.upserts[0].collection).toBe(INCIDENT_COLLECTION);
|
|
260
|
+
expect(qdrant.upserts[0].points[0].payload.tenant_id).toBe("tenant-a");
|
|
261
|
+
expect(qdrant.upserts[0].points[0].payload.schema_version).toBe(
|
|
262
|
+
INCIDENT_SCHEMA_VERSION,
|
|
263
|
+
);
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
test("scopes a search to the tenant", async () => {
|
|
267
|
+
const qdrant = new FakeQdrant();
|
|
268
|
+
const writer = new IncidentQdrantWriter(qdrant);
|
|
269
|
+
await writer.upsert([incident()]);
|
|
270
|
+
await writer.search("tenant-a", 10);
|
|
271
|
+
expect(qdrant.searches[0].filter).toEqual(tenantFilter("tenant-a"));
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
test("never returns the incidents of another tenant", async () => {
|
|
275
|
+
const qdrant = new FakeQdrant();
|
|
276
|
+
const writer = new IncidentQdrantWriter(qdrant);
|
|
277
|
+
await writer.upsert([incident()]);
|
|
278
|
+
const results = await writer.search("tenant-b", 10);
|
|
279
|
+
expect(results).toHaveLength(0);
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
test("a failing Qdrant never throws", async () => {
|
|
283
|
+
const qdrant = new FakeQdrant();
|
|
284
|
+
qdrant.fail = true;
|
|
285
|
+
const writer = new IncidentQdrantWriter(qdrant);
|
|
286
|
+
expect(await writer.upsert([incident()])).toBe(0);
|
|
287
|
+
expect(writer.error).toContain("qdrant is down");
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
test("the point id is stable per tenant and fingerprint", () => {
|
|
291
|
+
const one = incidentPointId("tenant-a", "abc123");
|
|
292
|
+
expect(one).toBe(incidentPointId("tenant-a", "abc123"));
|
|
293
|
+
expect(one).not.toBe(incidentPointId("tenant-b", "abc123"));
|
|
294
|
+
});
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
describe("the incident query of the service", () => {
|
|
298
|
+
function service(dir: string) {
|
|
299
|
+
const credentialPath = join(dir, "log-ingest-credentials.json");
|
|
300
|
+
writeFileSync(
|
|
301
|
+
credentialPath,
|
|
302
|
+
JSON.stringify({
|
|
303
|
+
credentials: [
|
|
304
|
+
{
|
|
305
|
+
id: "laptop",
|
|
306
|
+
tenantId: "tenant-a",
|
|
307
|
+
label: "laptop",
|
|
308
|
+
scopes: ["logs:write", "logs:read"],
|
|
309
|
+
tokenHash: hashToken(TOKEN),
|
|
310
|
+
createdAt: "2026-01-01T00:00:00.000Z",
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
}),
|
|
314
|
+
);
|
|
315
|
+
const credentials = LogCredentialStore.load({ path: credentialPath, env: {} });
|
|
316
|
+
const store = new IncidentStore({ dir: join(dir, "incidents") });
|
|
317
|
+
const ingest = new LogIngestService({
|
|
318
|
+
credentials,
|
|
319
|
+
outbox: new LogOutbox({ dir: join(dir, "outbox") }),
|
|
320
|
+
index: new LogIndexStore({ dir: join(dir, "index") }),
|
|
321
|
+
incidents: store,
|
|
322
|
+
});
|
|
323
|
+
return { ingest, store };
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
const batch = (records: unknown[]) => ({
|
|
327
|
+
schemaVersion: 2,
|
|
328
|
+
batchId: "batch-1",
|
|
329
|
+
app: "pi-harness",
|
|
330
|
+
installationId: "install-1",
|
|
331
|
+
sentAt: "2026-10-24T09:00:00.000Z",
|
|
332
|
+
records,
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
test("derives the incidents of an accepted batch", () => {
|
|
336
|
+
const dir = tempDir();
|
|
337
|
+
const { ingest, store } = service(dir);
|
|
338
|
+
const result = ingest.ingest(
|
|
339
|
+
batch([
|
|
340
|
+
{
|
|
341
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
342
|
+
level: "error",
|
|
343
|
+
source: "harness",
|
|
344
|
+
event: "run.failed",
|
|
345
|
+
message: "boom",
|
|
346
|
+
},
|
|
347
|
+
]),
|
|
348
|
+
TOKEN,
|
|
349
|
+
);
|
|
350
|
+
expect(result.status).toBe(202);
|
|
351
|
+
expect(store.query({ tenantId: "tenant-a" }).incidents).toHaveLength(1);
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
test("the tenant of the request body is ignored", () => {
|
|
355
|
+
const dir = tempDir();
|
|
356
|
+
const { ingest, store } = service(dir);
|
|
357
|
+
ingest.ingest(
|
|
358
|
+
{
|
|
359
|
+
...batch([
|
|
360
|
+
{
|
|
361
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
362
|
+
level: "error",
|
|
363
|
+
source: "harness",
|
|
364
|
+
event: "run.failed",
|
|
365
|
+
message: "boom",
|
|
366
|
+
},
|
|
367
|
+
]),
|
|
368
|
+
tenantId: "tenant-b",
|
|
369
|
+
},
|
|
370
|
+
TOKEN,
|
|
371
|
+
);
|
|
372
|
+
expect(store.query({ tenantId: "tenant-a" }).incidents).toHaveLength(1);
|
|
373
|
+
expect(store.query({ tenantId: "tenant-b" }).incidents).toHaveLength(0);
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
test("the query needs a credential", () => {
|
|
377
|
+
const dir = tempDir();
|
|
378
|
+
const { ingest } = service(dir);
|
|
379
|
+
const result = ingest.queryIncidents({} as Omit<IncidentQueryParams, "tenantId">, undefined);
|
|
380
|
+
expect(result.status).toBe(401);
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
test("the query is scoped to the tenant of the credential", () => {
|
|
384
|
+
const dir = tempDir();
|
|
385
|
+
const { ingest, store } = service(dir);
|
|
386
|
+
store.append(
|
|
387
|
+
extractIncidents(
|
|
388
|
+
[
|
|
389
|
+
{
|
|
390
|
+
ts: "2026-10-24T09:00:00.000Z",
|
|
391
|
+
level: "error",
|
|
392
|
+
source: "harness",
|
|
393
|
+
event: "run.failed",
|
|
394
|
+
message: "boom",
|
|
395
|
+
},
|
|
396
|
+
],
|
|
397
|
+
"tenant-b",
|
|
398
|
+
),
|
|
399
|
+
);
|
|
400
|
+
const result = ingest.queryIncidents({}, TOKEN);
|
|
401
|
+
expect(result.status).toBe(200);
|
|
402
|
+
expect((result.body as { incidents: unknown[] }).incidents).toHaveLength(0);
|
|
403
|
+
});
|
|
404
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared rendering of the notification detail fields.
|
|
3
|
+
*
|
|
4
|
+
* `details.error` is reserved for events that represent an actual failure. A
|
|
5
|
+
* resume trigger ("provider-overload", "post-compact") or a quota detail is a
|
|
6
|
+
* reason, not an error, and must never be rendered under the "Error:" footer.
|
|
7
|
+
*
|
|
8
|
+
* Every adapter renders the detail fields through this module so the labels
|
|
9
|
+
* stay consistent across Telegram, LINE, ntfy and email.
|
|
10
|
+
*/
|
|
11
|
+
import type { NotificationEvent, NotificationPayload } from "../types.js";
|
|
12
|
+
/** Events whose `details.error` really is an error. */
|
|
13
|
+
export declare const ERROR_EVENTS: ReadonlySet<NotificationEvent>;
|
|
14
|
+
export declare function isErrorEvent(event: NotificationEvent): boolean;
|
|
15
|
+
export interface DetailLine {
|
|
16
|
+
/** "Error" for a real failure, "Trigger" for a resume trigger, "Reason" for a detail. */
|
|
17
|
+
label: "Error" | "Reason" | "Trigger";
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Turn a trigger code into a human wording.
|
|
22
|
+
*
|
|
23
|
+
* "provider-overload" becomes "Provider overload". An unknown code keeps its
|
|
24
|
+
* words, only the separators and the capitalisation are cleaned up.
|
|
25
|
+
*/
|
|
26
|
+
export declare function formatTriggerValue(value: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Render the detail fields of a payload as footer lines.
|
|
29
|
+
*
|
|
30
|
+
* - `details.trigger` becomes "Trigger: ..." in a human wording.
|
|
31
|
+
* - `details.reason` becomes "Reason: ..." for every event.
|
|
32
|
+
* - `details.error` becomes "Error: ..." for the error events only.
|
|
33
|
+
* - A legacy `details.error` on a non-error event becomes "Reason: ..." so the
|
|
34
|
+
* information survives when a producer still uses the old field.
|
|
35
|
+
*/
|
|
36
|
+
export declare function formatDetailLines(details: NotificationPayload["details"], event: NotificationEvent): DetailLine[];
|
|
37
|
+
/**
|
|
38
|
+
* The same lines as a plain text block, one per line.
|
|
39
|
+
* An empty string when there is nothing to render.
|
|
40
|
+
*/
|
|
41
|
+
export declare function formatDetailText(details: NotificationPayload["details"], event: NotificationEvent): string;
|
|
42
|
+
//# sourceMappingURL=detail-format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detail-format.d.ts","sourceRoot":"","sources":["../../src/adapters/detail-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAE1E,uDAAuD;AACvD,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,iBAAiB,CAItD,CAAC;AAEH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAE9D;AAED,MAAM,WAAW,UAAU;IAC1B,yFAAyF;IACzF,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;CACd;AAmBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUxD;AAQD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,EACvC,KAAK,EAAE,iBAAiB,GACtB,UAAU,EAAE,CAiBd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,EACvC,KAAK,EAAE,iBAAiB,GACtB,MAAM,CAIR"}
|