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,564 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram API transport helpers
|
|
3
|
+
* Zones: telegram transport, filesystem, runtime diagnostics
|
|
4
|
+
*
|
|
5
|
+
* Wraps bot API calls, file uploads/downloads (including voice messages),
|
|
6
|
+
* multipart sending, runtime transport binding, and Telegram temp-file lifecycle.
|
|
7
|
+
*/
|
|
8
|
+
import type { TelegramAttachmentSource } from "./media.ts";
|
|
9
|
+
export declare const TELEGRAM_FILE_MAX_BYTES: number;
|
|
10
|
+
/** First positive safe-integer byte limit among ordered env names, else the caller's default. */
|
|
11
|
+
export declare function getTelegramByteLimitFromEnv(env: NodeJS.ProcessEnv, names: readonly string[], defaultValue: number): number;
|
|
12
|
+
export type TelegramNetworkFamilyPolicy = "auto" | "ipv4" | "ipv6" | "ipv4-fallback";
|
|
13
|
+
type TelegramNetworkFamily = 4 | 6;
|
|
14
|
+
export interface TelegramUser {
|
|
15
|
+
id: number;
|
|
16
|
+
is_bot: boolean;
|
|
17
|
+
first_name: string;
|
|
18
|
+
username?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface TelegramChat {
|
|
21
|
+
id: number;
|
|
22
|
+
type: string;
|
|
23
|
+
}
|
|
24
|
+
export interface TelegramPhotoSize {
|
|
25
|
+
file_id: string;
|
|
26
|
+
file_size?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface TelegramDocument {
|
|
29
|
+
file_id: string;
|
|
30
|
+
file_name?: string;
|
|
31
|
+
mime_type?: string;
|
|
32
|
+
file_size?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface TelegramVideo {
|
|
35
|
+
file_id: string;
|
|
36
|
+
file_name?: string;
|
|
37
|
+
mime_type?: string;
|
|
38
|
+
file_size?: number;
|
|
39
|
+
}
|
|
40
|
+
export interface TelegramAudio {
|
|
41
|
+
file_id: string;
|
|
42
|
+
file_name?: string;
|
|
43
|
+
mime_type?: string;
|
|
44
|
+
file_size?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface TelegramVoice {
|
|
47
|
+
file_id: string;
|
|
48
|
+
mime_type?: string;
|
|
49
|
+
file_size?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface TelegramAnimation {
|
|
52
|
+
file_id: string;
|
|
53
|
+
file_name?: string;
|
|
54
|
+
mime_type?: string;
|
|
55
|
+
file_size?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface TelegramSticker {
|
|
58
|
+
file_id: string;
|
|
59
|
+
emoji?: string;
|
|
60
|
+
}
|
|
61
|
+
export interface TelegramRichMessage {
|
|
62
|
+
blocks?: unknown[];
|
|
63
|
+
is_rtl?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface TelegramMessage {
|
|
66
|
+
message_id: number;
|
|
67
|
+
chat: TelegramChat;
|
|
68
|
+
from?: TelegramUser;
|
|
69
|
+
text?: string;
|
|
70
|
+
caption?: string;
|
|
71
|
+
rich_message?: TelegramRichMessage;
|
|
72
|
+
media_group_id?: string;
|
|
73
|
+
photo?: TelegramPhotoSize[];
|
|
74
|
+
document?: TelegramDocument;
|
|
75
|
+
video?: TelegramVideo;
|
|
76
|
+
audio?: TelegramAudio;
|
|
77
|
+
voice?: TelegramVoice;
|
|
78
|
+
animation?: TelegramAnimation;
|
|
79
|
+
sticker?: TelegramSticker;
|
|
80
|
+
}
|
|
81
|
+
export interface TelegramCallbackQuery {
|
|
82
|
+
id: string;
|
|
83
|
+
from: TelegramUser;
|
|
84
|
+
message?: TelegramMessage;
|
|
85
|
+
data?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface TelegramReactionTypeEmoji {
|
|
88
|
+
type: "emoji";
|
|
89
|
+
emoji: string;
|
|
90
|
+
}
|
|
91
|
+
export interface TelegramReactionTypeCustomEmoji {
|
|
92
|
+
type: "custom_emoji";
|
|
93
|
+
custom_emoji_id: string;
|
|
94
|
+
}
|
|
95
|
+
export interface TelegramReactionTypePaid {
|
|
96
|
+
type: "paid";
|
|
97
|
+
}
|
|
98
|
+
export type TelegramReactionType = TelegramReactionTypeEmoji | TelegramReactionTypeCustomEmoji | TelegramReactionTypePaid;
|
|
99
|
+
export interface TelegramMessageReactionUpdated {
|
|
100
|
+
chat: TelegramChat;
|
|
101
|
+
message_id: number;
|
|
102
|
+
user?: TelegramUser;
|
|
103
|
+
actor_chat?: TelegramChat;
|
|
104
|
+
old_reaction: TelegramReactionType[];
|
|
105
|
+
new_reaction: TelegramReactionType[];
|
|
106
|
+
date: number;
|
|
107
|
+
}
|
|
108
|
+
export interface TelegramGuestMessage {
|
|
109
|
+
message_id: number;
|
|
110
|
+
from?: TelegramUser;
|
|
111
|
+
chat: TelegramChat;
|
|
112
|
+
date: number;
|
|
113
|
+
text?: string;
|
|
114
|
+
caption?: string;
|
|
115
|
+
rich_message?: TelegramRichMessage;
|
|
116
|
+
guest_query_id: string;
|
|
117
|
+
guest_bot_caller_user?: TelegramUser;
|
|
118
|
+
guest_bot_caller_chat?: TelegramChat;
|
|
119
|
+
reply_to_message?: TelegramMessage;
|
|
120
|
+
}
|
|
121
|
+
export interface TelegramUpdate {
|
|
122
|
+
update_id: number;
|
|
123
|
+
message?: TelegramMessage;
|
|
124
|
+
edited_message?: TelegramMessage;
|
|
125
|
+
callback_query?: TelegramCallbackQuery;
|
|
126
|
+
message_reaction?: TelegramMessageReactionUpdated;
|
|
127
|
+
guest_message?: TelegramGuestMessage;
|
|
128
|
+
deleted_business_messages?: {
|
|
129
|
+
message_ids?: unknown;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface TelegramSentMessage {
|
|
133
|
+
message_id: number;
|
|
134
|
+
}
|
|
135
|
+
export interface TelegramSentGuestMessage {
|
|
136
|
+
inline_message_id?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface TelegramReplyParameters {
|
|
139
|
+
message_id: number;
|
|
140
|
+
allow_sending_without_reply?: boolean;
|
|
141
|
+
chat_id?: number;
|
|
142
|
+
message_thread_id?: number;
|
|
143
|
+
}
|
|
144
|
+
export interface TelegramLinkPreviewOptions {
|
|
145
|
+
is_disabled?: boolean;
|
|
146
|
+
}
|
|
147
|
+
export type TelegramSendMessageBody = Record<string, unknown> & {
|
|
148
|
+
chat_id: number;
|
|
149
|
+
text: string;
|
|
150
|
+
parse_mode?: "HTML";
|
|
151
|
+
link_preview_options?: TelegramLinkPreviewOptions;
|
|
152
|
+
reply_markup?: unknown;
|
|
153
|
+
reply_parameters?: TelegramReplyParameters;
|
|
154
|
+
};
|
|
155
|
+
export interface TelegramInputMediaPhoto extends Record<string, unknown> {
|
|
156
|
+
type: "photo";
|
|
157
|
+
media: string;
|
|
158
|
+
has_spoiler?: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface TelegramInputMediaVideo extends Record<string, unknown> {
|
|
161
|
+
type: "video";
|
|
162
|
+
media: string;
|
|
163
|
+
thumbnail?: string;
|
|
164
|
+
width?: number;
|
|
165
|
+
height?: number;
|
|
166
|
+
duration?: number;
|
|
167
|
+
supports_streaming?: boolean;
|
|
168
|
+
has_spoiler?: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface TelegramInputMediaAnimation extends Record<string, unknown> {
|
|
171
|
+
type: "animation";
|
|
172
|
+
media: string;
|
|
173
|
+
thumbnail?: string;
|
|
174
|
+
width?: number;
|
|
175
|
+
height?: number;
|
|
176
|
+
duration?: number;
|
|
177
|
+
has_spoiler?: boolean;
|
|
178
|
+
}
|
|
179
|
+
export interface TelegramInputMediaAudio extends Record<string, unknown> {
|
|
180
|
+
type: "audio";
|
|
181
|
+
media: string;
|
|
182
|
+
thumbnail?: string;
|
|
183
|
+
duration?: number;
|
|
184
|
+
performer?: string;
|
|
185
|
+
title?: string;
|
|
186
|
+
}
|
|
187
|
+
export interface TelegramInputMediaVoiceNote extends Record<string, unknown> {
|
|
188
|
+
type: "voice_note";
|
|
189
|
+
media: string;
|
|
190
|
+
caption?: string;
|
|
191
|
+
parse_mode?: string;
|
|
192
|
+
caption_entities?: unknown[];
|
|
193
|
+
duration?: number;
|
|
194
|
+
}
|
|
195
|
+
export type TelegramInputRichMessageMediaValue = TelegramInputMediaAnimation | TelegramInputMediaAudio | TelegramInputMediaPhoto | TelegramInputMediaVideo | TelegramInputMediaVoiceNote;
|
|
196
|
+
export interface TelegramInputRichMessageMedia {
|
|
197
|
+
id: string;
|
|
198
|
+
media: TelegramInputRichMessageMediaValue;
|
|
199
|
+
}
|
|
200
|
+
type TelegramInputRichMessageCommon = {
|
|
201
|
+
is_rtl?: boolean;
|
|
202
|
+
skip_entity_detection?: boolean;
|
|
203
|
+
};
|
|
204
|
+
export type TelegramRichText = string | TelegramRichText[] | {
|
|
205
|
+
type: "bold" | "code";
|
|
206
|
+
text: TelegramRichText;
|
|
207
|
+
};
|
|
208
|
+
export type TelegramInputRichBlock = {
|
|
209
|
+
type: "heading";
|
|
210
|
+
text: TelegramRichText;
|
|
211
|
+
size?: 1 | 2 | 3;
|
|
212
|
+
} | {
|
|
213
|
+
type: "pre";
|
|
214
|
+
text: TelegramRichText;
|
|
215
|
+
language?: string;
|
|
216
|
+
} | {
|
|
217
|
+
type: "details";
|
|
218
|
+
summary: TelegramRichText;
|
|
219
|
+
blocks: TelegramInputRichBlock[];
|
|
220
|
+
is_open?: true;
|
|
221
|
+
};
|
|
222
|
+
export type TelegramInputRichDraftBlock = TelegramInputRichBlock | {
|
|
223
|
+
type: "thinking";
|
|
224
|
+
text: TelegramRichText;
|
|
225
|
+
};
|
|
226
|
+
export type TelegramInputRichMessage = TelegramInputRichMessageCommon & ({
|
|
227
|
+
markdown: string;
|
|
228
|
+
html?: never;
|
|
229
|
+
blocks?: never;
|
|
230
|
+
media?: TelegramInputRichMessageMedia[];
|
|
231
|
+
} | {
|
|
232
|
+
html: string;
|
|
233
|
+
markdown?: never;
|
|
234
|
+
blocks?: never;
|
|
235
|
+
media?: TelegramInputRichMessageMedia[];
|
|
236
|
+
} | {
|
|
237
|
+
blocks: TelegramInputRichBlock[];
|
|
238
|
+
markdown?: never;
|
|
239
|
+
html?: never;
|
|
240
|
+
media?: never;
|
|
241
|
+
});
|
|
242
|
+
export type TelegramSendRichMessageBody = Record<string, unknown> & {
|
|
243
|
+
chat_id: number;
|
|
244
|
+
rich_message: TelegramInputRichMessage;
|
|
245
|
+
reply_markup?: unknown;
|
|
246
|
+
reply_parameters?: TelegramReplyParameters;
|
|
247
|
+
};
|
|
248
|
+
export type TelegramEditMessageTextBody = Record<string, unknown> & {
|
|
249
|
+
chat_id: number;
|
|
250
|
+
message_id: number;
|
|
251
|
+
text?: string;
|
|
252
|
+
rich_message?: TelegramInputRichMessage;
|
|
253
|
+
parse_mode?: "HTML";
|
|
254
|
+
link_preview_options?: TelegramLinkPreviewOptions;
|
|
255
|
+
reply_markup?: unknown;
|
|
256
|
+
};
|
|
257
|
+
export type TelegramSendMessageDraftBody = Record<string, unknown> & {
|
|
258
|
+
chat_id: number;
|
|
259
|
+
draft_id: number;
|
|
260
|
+
text?: string;
|
|
261
|
+
parse_mode?: string;
|
|
262
|
+
entities?: unknown[];
|
|
263
|
+
message_thread_id?: number;
|
|
264
|
+
};
|
|
265
|
+
export type TelegramSendRichMessageDraftBody = Record<string, unknown> & {
|
|
266
|
+
chat_id: number;
|
|
267
|
+
draft_id: number;
|
|
268
|
+
rich_message: TelegramInputRichMessage | (TelegramInputRichMessageCommon & {
|
|
269
|
+
blocks: TelegramInputRichDraftBlock[];
|
|
270
|
+
markdown?: never;
|
|
271
|
+
html?: never;
|
|
272
|
+
media?: never;
|
|
273
|
+
});
|
|
274
|
+
message_thread_id?: number;
|
|
275
|
+
};
|
|
276
|
+
interface TelegramApiResponse<T> {
|
|
277
|
+
ok: boolean;
|
|
278
|
+
result?: T;
|
|
279
|
+
description?: string;
|
|
280
|
+
error_code?: number;
|
|
281
|
+
parameters?: {
|
|
282
|
+
retry_after?: number;
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
export interface TelegramApiRetryWait {
|
|
286
|
+
method: string;
|
|
287
|
+
delayMs: number;
|
|
288
|
+
attempt: number;
|
|
289
|
+
retryAfterSeconds?: number;
|
|
290
|
+
}
|
|
291
|
+
export interface TelegramApiCallOptions {
|
|
292
|
+
/** Local per-call effect authority; independent of source completion and transport ownership. */
|
|
293
|
+
assertAuthority?: () => void;
|
|
294
|
+
signal?: AbortSignal;
|
|
295
|
+
maxAttempts?: number;
|
|
296
|
+
retryRateLimit?: boolean;
|
|
297
|
+
retrySafety?: "safe" | "non-idempotent";
|
|
298
|
+
retryBaseDelayMs?: number;
|
|
299
|
+
sleep?: (ms: number) => Promise<void>;
|
|
300
|
+
/** Observability hook fired before a 429 retry wait, never for 5xx waits. */
|
|
301
|
+
onRetryWait?: (wait: TelegramApiRetryWait) => void;
|
|
302
|
+
}
|
|
303
|
+
export declare class TelegramApiAuthorityError extends Error {
|
|
304
|
+
readonly requestIssued: boolean;
|
|
305
|
+
constructor(requestIssued: boolean);
|
|
306
|
+
}
|
|
307
|
+
/** Recheck caller authority, classifying refusal by whether a Bot API request was already issued. */
|
|
308
|
+
export declare function assertTelegramApiCallAuthority(assertAuthority: (() => void) | undefined, requestIssued: boolean): void;
|
|
309
|
+
export interface TelegramFileDownloadOptions {
|
|
310
|
+
signal?: AbortSignal;
|
|
311
|
+
maxFileSizeBytes?: number;
|
|
312
|
+
}
|
|
313
|
+
export type TelegramGuestCachedMediaResult = {
|
|
314
|
+
type: "document";
|
|
315
|
+
id: string;
|
|
316
|
+
title: string;
|
|
317
|
+
document_file_id: string;
|
|
318
|
+
caption?: string;
|
|
319
|
+
parse_mode?: string;
|
|
320
|
+
} | {
|
|
321
|
+
type: "photo";
|
|
322
|
+
id: string;
|
|
323
|
+
photo_file_id: string;
|
|
324
|
+
caption?: string;
|
|
325
|
+
parse_mode?: string;
|
|
326
|
+
} | {
|
|
327
|
+
type: "audio";
|
|
328
|
+
id: string;
|
|
329
|
+
audio_file_id: string;
|
|
330
|
+
caption?: string;
|
|
331
|
+
parse_mode?: string;
|
|
332
|
+
} | {
|
|
333
|
+
type: "voice";
|
|
334
|
+
id: string;
|
|
335
|
+
voice_file_id: string;
|
|
336
|
+
title: string;
|
|
337
|
+
caption?: string;
|
|
338
|
+
parse_mode?: string;
|
|
339
|
+
};
|
|
340
|
+
export interface TelegramAnswerGuestQueryOptions {
|
|
341
|
+
parseMode?: string;
|
|
342
|
+
richMessage?: TelegramInputRichMessage;
|
|
343
|
+
result?: TelegramGuestCachedMediaResult;
|
|
344
|
+
}
|
|
345
|
+
export interface TelegramEditGuestInlineMessageContent {
|
|
346
|
+
text?: string;
|
|
347
|
+
richMessage?: TelegramInputRichMessage;
|
|
348
|
+
parseMode?: "HTML";
|
|
349
|
+
}
|
|
350
|
+
export interface TelegramAnswerCallbackQueryOptions extends Pick<TelegramApiCallOptions, "assertAuthority"> {
|
|
351
|
+
recordRuntimeEvent?: (kind: "api", error: unknown, details?: Record<string, unknown>) => void;
|
|
352
|
+
}
|
|
353
|
+
export interface TelegramApiClient {
|
|
354
|
+
call: <TResponse>(method: string, body: Record<string, unknown>, options?: TelegramApiCallOptions) => Promise<TResponse>;
|
|
355
|
+
callMultipart: <TResponse>(method: string, fields: Record<string, string>, fileField: string, filePath: string, fileName: string, options?: TelegramApiCallOptions) => Promise<TResponse>;
|
|
356
|
+
downloadFile: (fileId: string, suggestedName: string, tempDir: string, options?: TelegramFileDownloadOptions) => Promise<string>;
|
|
357
|
+
answerCallbackQuery: (callbackQueryId: string, text?: string, options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<void>;
|
|
358
|
+
answerGuestQuery?: (guestQueryId: string, text?: string, options?: TelegramAnswerGuestQueryOptions) => Promise<void>;
|
|
359
|
+
}
|
|
360
|
+
export interface TelegramApiTargetActivityRuntime {
|
|
361
|
+
begin: (method: string, body: Record<string, unknown>) => () => void;
|
|
362
|
+
hasPendingTarget: (target: {
|
|
363
|
+
chatId: number;
|
|
364
|
+
threadId?: number;
|
|
365
|
+
}) => boolean;
|
|
366
|
+
listPendingTargets: () => {
|
|
367
|
+
chatId: number;
|
|
368
|
+
threadId: number;
|
|
369
|
+
}[];
|
|
370
|
+
listPendingChats: () => number[];
|
|
371
|
+
}
|
|
372
|
+
export declare function createTelegramApiTargetActivityRuntime(): TelegramApiTargetActivityRuntime;
|
|
373
|
+
export declare function createTelegramApiTargetTrackingClient(client: TelegramApiClient, activity: TelegramApiTargetActivityRuntime): TelegramApiClient;
|
|
374
|
+
export type TelegramApiWorkspaceAdmissionScopeLike = {
|
|
375
|
+
kind: "target";
|
|
376
|
+
target: {
|
|
377
|
+
chatId: number;
|
|
378
|
+
threadId: number;
|
|
379
|
+
};
|
|
380
|
+
} | {
|
|
381
|
+
kind: "chat";
|
|
382
|
+
chatId: number;
|
|
383
|
+
} | {
|
|
384
|
+
kind: "profile";
|
|
385
|
+
};
|
|
386
|
+
export interface TelegramApiWorkspaceAdmissionLeaseLike {
|
|
387
|
+
operationId: string;
|
|
388
|
+
operationKind: string;
|
|
389
|
+
profileKey: string;
|
|
390
|
+
scope: TelegramApiWorkspaceAdmissionScopeLike;
|
|
391
|
+
owner: {
|
|
392
|
+
processId: number;
|
|
393
|
+
processBirthId: string;
|
|
394
|
+
};
|
|
395
|
+
acquiredAtMs: number;
|
|
396
|
+
}
|
|
397
|
+
export interface TelegramApiWorkspaceAdmissionPort {
|
|
398
|
+
acquireAdmission: (input: {
|
|
399
|
+
operationId: string;
|
|
400
|
+
operationKind: string;
|
|
401
|
+
scope: TelegramApiWorkspaceAdmissionScopeLike;
|
|
402
|
+
}) => {
|
|
403
|
+
kind: "acquired";
|
|
404
|
+
lease: TelegramApiWorkspaceAdmissionLeaseLike;
|
|
405
|
+
resumed: boolean;
|
|
406
|
+
} | {
|
|
407
|
+
kind: "blocked";
|
|
408
|
+
reason: "retirement-fenced";
|
|
409
|
+
};
|
|
410
|
+
releaseAdmission: (expected: TelegramApiWorkspaceAdmissionLeaseLike) => boolean;
|
|
411
|
+
}
|
|
412
|
+
export declare class TelegramApiWorkspaceAdmissionError extends Error {
|
|
413
|
+
readonly code: "blocked" | "unavailable" | "release-lost" | "duplicate-operation";
|
|
414
|
+
constructor(code: TelegramApiWorkspaceAdmissionError["code"], message: string);
|
|
415
|
+
}
|
|
416
|
+
export declare function getTelegramApiWorkspaceAdmissionScope(body: Record<string, unknown>): TelegramApiWorkspaceAdmissionScopeLike | undefined;
|
|
417
|
+
export declare function createTelegramApiWorkspaceAdmissionClient(client: TelegramApiClient, admission: TelegramApiWorkspaceAdmissionPort | (() => TelegramApiWorkspaceAdmissionPort | undefined), options?: {
|
|
418
|
+
onReleaseError?: (error: unknown, method: string) => void;
|
|
419
|
+
createOperationId?: () => string;
|
|
420
|
+
}): TelegramApiClient;
|
|
421
|
+
export interface TelegramBridgeApiRuntimeDeps {
|
|
422
|
+
captureRequestErrorHandler?: (body: Record<string, unknown>) => ((error: unknown) => Promise<void>) | undefined;
|
|
423
|
+
client: TelegramApiClient;
|
|
424
|
+
tempDir: string;
|
|
425
|
+
maxFileSizeBytes: number;
|
|
426
|
+
tempFileMaxAgeMs: number;
|
|
427
|
+
/** Bot `@username` (or numeric id) naming private-chat attachments. */
|
|
428
|
+
getBotScope?: () => string | undefined;
|
|
429
|
+
recordRuntimeEvent: (kind: "api" | "multipart" | "download", error: unknown, details?: Record<string, unknown>) => void;
|
|
430
|
+
now?: () => number;
|
|
431
|
+
chatActionMinIntervalMs?: number;
|
|
432
|
+
chatActionMaxGates?: number;
|
|
433
|
+
}
|
|
434
|
+
export interface TelegramBridgeApiRuntime extends Pick<TelegramApiClient, "call" | "callMultipart"> {
|
|
435
|
+
downloadFile: (fileId: string, suggestedName: string, source?: TelegramAttachmentSource) => Promise<string>;
|
|
436
|
+
deleteWebhook: (signal?: AbortSignal) => Promise<boolean>;
|
|
437
|
+
getUpdates: (body: Record<string, unknown>, signal?: AbortSignal) => Promise<TelegramUpdate[]>;
|
|
438
|
+
setMyCommands: (commands: readonly {
|
|
439
|
+
command: string;
|
|
440
|
+
description: string;
|
|
441
|
+
}[], options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<boolean>;
|
|
442
|
+
sendChatAction: (chatId: number, action: string, options?: {
|
|
443
|
+
message_thread_id?: number;
|
|
444
|
+
}) => Promise<boolean>;
|
|
445
|
+
sendTypingAction: (chatId: number, options?: {
|
|
446
|
+
message_thread_id?: number;
|
|
447
|
+
}) => Promise<unknown>;
|
|
448
|
+
sendRecordVoiceAction: (chatId: number, options?: {
|
|
449
|
+
message_thread_id?: number;
|
|
450
|
+
}) => Promise<unknown>;
|
|
451
|
+
sendMessageDraft: (chatId: number, draftId: number, text?: string, options?: {
|
|
452
|
+
parse_mode?: string;
|
|
453
|
+
entities?: unknown[];
|
|
454
|
+
message_thread_id?: number;
|
|
455
|
+
}) => Promise<boolean>;
|
|
456
|
+
sendMessage: (body: TelegramSendMessageBody, options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<TelegramSentMessage>;
|
|
457
|
+
sendRichMessage: (body: TelegramSendRichMessageBody, options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<TelegramSentMessage>;
|
|
458
|
+
sendRichMessageDraft: (body: TelegramSendRichMessageDraftBody) => Promise<boolean>;
|
|
459
|
+
editMessageText: (body: TelegramEditMessageTextBody, options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<"edited" | "unchanged">;
|
|
460
|
+
editMessageReplyMarkup: (chatId: number, messageId: number, replyMarkup: unknown) => Promise<void>;
|
|
461
|
+
answerCallbackQuery: (callbackQueryId: string, text?: string, options?: Pick<TelegramApiCallOptions, "assertAuthority">) => Promise<void>;
|
|
462
|
+
answerGuestQuery: (guestQueryId: string, text?: string, options?: TelegramAnswerGuestQueryOptions) => Promise<void>;
|
|
463
|
+
/**
|
|
464
|
+
* Temporary Guest Mode ACK experiment: answers the guest query and returns
|
|
465
|
+
* the sent inline message id so the final answer can edit that early reply.
|
|
466
|
+
* Requires direct transport ownership; Telegram does not document editing
|
|
467
|
+
* guest answers, so this exists only to falsify that behavior live.
|
|
468
|
+
*/
|
|
469
|
+
answerGuestQueryForInlineMessage: (guestQueryId: string, text?: string, options?: TelegramAnswerGuestQueryOptions) => Promise<string | undefined>;
|
|
470
|
+
editGuestInlineMessage: (inlineMessageId: string, content: TelegramEditGuestInlineMessageContent) => Promise<void>;
|
|
471
|
+
deleteMessage: (chatId: number, messageId: number) => Promise<void>;
|
|
472
|
+
prepareTempDir: () => Promise<number>;
|
|
473
|
+
}
|
|
474
|
+
/** Names follow `<kind>-<scope>-<messageId>[-<index>][-<name>|.<ext>]`. */
|
|
475
|
+
/**
|
|
476
|
+
* `scope` is the bot `@username` (id fallback) in a private chat and the public chat `@username` (id fallback) elsewhere.
|
|
477
|
+
* A negative chat id loses its sign, so the name never contains two adjacent dashes.
|
|
478
|
+
*/
|
|
479
|
+
export declare function createTelegramAttachmentFileName(source: TelegramAttachmentSource, generatedName: string, botScope?: string): string;
|
|
480
|
+
export declare class TelegramApiCommitUnknownError extends Error {
|
|
481
|
+
readonly kind: "commit-unknown";
|
|
482
|
+
readonly method: string;
|
|
483
|
+
readonly cause: unknown;
|
|
484
|
+
constructor(method: string, cause: unknown);
|
|
485
|
+
}
|
|
486
|
+
export declare function isTelegramApiCommitUnknownError(error: unknown): error is TelegramApiCommitUnknownError;
|
|
487
|
+
export declare class TelegramApiStaleTargetError extends Error {
|
|
488
|
+
readonly requestTarget: {
|
|
489
|
+
chatId: number;
|
|
490
|
+
threadId: number;
|
|
491
|
+
};
|
|
492
|
+
constructor(message: string, requestTarget: {
|
|
493
|
+
chatId: number;
|
|
494
|
+
threadId: number;
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
export declare function getTelegramApiErrorRequestTarget(error: unknown): {
|
|
498
|
+
chatId: number;
|
|
499
|
+
threadId: number;
|
|
500
|
+
} | undefined;
|
|
501
|
+
export declare function isTelegramStaleTargetHttpError(error: unknown): boolean;
|
|
502
|
+
/** Only a parsed Telegram rejection of this method proves a request had no effect. */
|
|
503
|
+
export declare function isTelegramApiRequestRejected(error: unknown, method: string): boolean;
|
|
504
|
+
export declare function isTelegramMessageNotModifiedError(error: unknown): boolean;
|
|
505
|
+
export declare function isTelegramApiMethodRetrySafe(method: string): boolean;
|
|
506
|
+
export declare function isRetryableTelegramApiError(error: unknown): boolean;
|
|
507
|
+
export declare function getTelegramApiRetryAfterMs(error: unknown): number | undefined;
|
|
508
|
+
export declare function isTelegramMessageUnavailableError(error: unknown): boolean;
|
|
509
|
+
declare function telegramHttpsFetch(input: string | URL | Request, init: RequestInit, family: TelegramNetworkFamily): Promise<Response>;
|
|
510
|
+
export declare function setTelegramApiHttpsFetchForTesting(fetchImpl: typeof telegramHttpsFetch | undefined): () => void;
|
|
511
|
+
export declare function cleanupTelegramTempFiles(tempDir: string, maxAgeMs: number, now?: number): Promise<number>;
|
|
512
|
+
export declare function prepareTelegramTempDir(tempDir: string, maxAgeMs: number): Promise<number>;
|
|
513
|
+
export declare function callTelegram<TResponse>(botToken: string | undefined, method: string, body: Record<string, unknown>, options?: TelegramApiCallOptions): Promise<TResponse>;
|
|
514
|
+
export type TelegramBotIdentityResponse = Pick<TelegramApiResponse<TelegramUser>, "ok" | "result" | "description">;
|
|
515
|
+
export declare function fetchTelegramBotIdentity(botToken: string, fetchImpl?: typeof fetch): Promise<TelegramBotIdentityResponse>;
|
|
516
|
+
/**
|
|
517
|
+
* Low-level helper to send a multipart/form-data request to the Telegram Bot API.
|
|
518
|
+
* This is the core implementation used for uploading voice messages, photos,
|
|
519
|
+
* documents, animations, etc. It handles FormData construction, retry logic
|
|
520
|
+
* (via callTelegramWithRetry), and error recording under the "multipart" category.
|
|
521
|
+
*/
|
|
522
|
+
export declare function callTelegramMultipart<TResponse>(botToken: string | undefined, method: string, fields: Record<string, string>, fileField: string, filePath: string, fileName: string, options?: TelegramApiCallOptions): Promise<TResponse>;
|
|
523
|
+
export declare function downloadTelegramFile(botToken: string | undefined, fileId: string, suggestedName: string, tempDir: string, options?: TelegramFileDownloadOptions): Promise<string>;
|
|
524
|
+
export declare function answerTelegramCallbackQuery(botToken: string | undefined, callbackQueryId: string, text?: string, options?: TelegramAnswerCallbackQueryOptions): Promise<void>;
|
|
525
|
+
export declare function createTelegramChatActionSender<TAction extends string>(sendChatAction: (chatId: number, action: TAction, options?: {
|
|
526
|
+
message_thread_id?: number;
|
|
527
|
+
}) => Promise<unknown>, action: TAction): (chatId: number, options?: {
|
|
528
|
+
message_thread_id?: number;
|
|
529
|
+
}) => Promise<unknown>;
|
|
530
|
+
export declare function createTelegramNativeMarkdownDraftSender(deps: {
|
|
531
|
+
sendMessageDraft: TelegramBridgeApiRuntime["sendMessageDraft"];
|
|
532
|
+
sendRichMessageDraft: TelegramBridgeApiRuntime["sendRichMessageDraft"];
|
|
533
|
+
}): TelegramBridgeApiRuntime["sendMessageDraft"];
|
|
534
|
+
export declare function createTelegramAssistantDraftSender(deps: {
|
|
535
|
+
getAssistantRenderingMode: () => "rich" | "html";
|
|
536
|
+
renderMarkdownToHtmlDraft: (markdown: string) => string;
|
|
537
|
+
sendMessageDraft: TelegramBridgeApiRuntime["sendMessageDraft"];
|
|
538
|
+
sendRichMessageDraft: TelegramBridgeApiRuntime["sendRichMessageDraft"];
|
|
539
|
+
}): TelegramBridgeApiRuntime["sendMessageDraft"];
|
|
540
|
+
export declare function buildTelegramAnswerGuestQueryBody(guestQueryId: string, text?: string, options?: TelegramAnswerGuestQueryOptions): Record<string, unknown>;
|
|
541
|
+
export type TelegramWorkspaceThreadDeletionTransport = (authorize: () => {
|
|
542
|
+
chatId: number;
|
|
543
|
+
threadId: number;
|
|
544
|
+
}) => Promise<void>;
|
|
545
|
+
export declare function createDefaultTelegramBridgeApiRuntime(deps: {
|
|
546
|
+
getBotToken: () => string | undefined;
|
|
547
|
+
getBotScope?: () => string | undefined;
|
|
548
|
+
recordRuntimeEvent: TelegramBridgeApiRuntimeDeps["recordRuntimeEvent"];
|
|
549
|
+
captureRequestErrorHandler?: TelegramBridgeApiRuntimeDeps["captureRequestErrorHandler"];
|
|
550
|
+
targetActivity?: TelegramApiTargetActivityRuntime;
|
|
551
|
+
workspaceAdmission?: TelegramApiWorkspaceAdmissionPort | (() => TelegramApiWorkspaceAdmissionPort | undefined);
|
|
552
|
+
}): TelegramBridgeApiRuntime & {
|
|
553
|
+
deleteWorkspaceThread: TelegramWorkspaceThreadDeletionTransport;
|
|
554
|
+
};
|
|
555
|
+
export declare function createTelegramBridgeApiRuntime(deps: TelegramBridgeApiRuntimeDeps): TelegramBridgeApiRuntime;
|
|
556
|
+
/**
|
|
557
|
+
* Creates a low-level Telegram Bot API client.
|
|
558
|
+
* This is the main entry point for all direct Bot API communication
|
|
559
|
+
* (both JSON calls and multipart uploads for files/voice).
|
|
560
|
+
*/
|
|
561
|
+
export declare function createTelegramApiClient(getBotToken: () => string | undefined, options?: TelegramAnswerCallbackQueryOptions & {
|
|
562
|
+
now?: () => number;
|
|
563
|
+
}): TelegramApiClient;
|
|
564
|
+
export {};
|