charness 0.0.0-stage → 3.0.0
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/.env.example +88 -0
- package/DEVELOPMENT.md +110 -0
- package/LICENSE +21 -0
- package/MIGRATION_1_TO_2.md +24 -0
- package/README.md +1024 -2
- package/dist/accessControl.d.ts +71 -0
- package/dist/accessControl.d.ts.map +1 -0
- package/dist/accessControl.js +108 -0
- package/dist/accessControl.js.map +1 -0
- package/dist/adapters/adapterEventRouting.d.ts +51 -0
- package/dist/adapters/adapterEventRouting.d.ts.map +1 -0
- package/dist/adapters/adapterEventRouting.js +74 -0
- package/dist/adapters/adapterEventRouting.js.map +1 -0
- package/dist/adapters/adapterNames.d.ts +19 -0
- package/dist/adapters/adapterNames.d.ts.map +1 -0
- package/dist/adapters/adapterNames.js +25 -0
- package/dist/adapters/adapterNames.js.map +1 -0
- package/dist/adapters/claudeCliAdapter.d.ts +1336 -0
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -0
- package/dist/adapters/claudeCliAdapter.js +4204 -0
- package/dist/adapters/claudeCliAdapter.js.map +1 -0
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +548 -0
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -0
- package/dist/adapters/claudeJsonStreamAdapter.js +1810 -0
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -0
- package/dist/adapters/claudePlatformFlags.d.ts +35 -0
- package/dist/adapters/claudePlatformFlags.d.ts.map +1 -0
- package/dist/adapters/claudePlatformFlags.js +46 -0
- package/dist/adapters/claudePlatformFlags.js.map +1 -0
- package/dist/adapters/createAdapter.d.ts +252 -0
- package/dist/adapters/createAdapter.d.ts.map +1 -0
- package/dist/adapters/createAdapter.js +475 -0
- package/dist/adapters/createAdapter.js.map +1 -0
- package/dist/adapters/openCodeAdapter.d.ts +1446 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -0
- package/dist/adapters/openCodeAdapter.js +4540 -0
- package/dist/adapters/openCodeAdapter.js.map +1 -0
- package/dist/adapters/sessionLaunchDefaults.d.ts +28 -0
- package/dist/adapters/sessionLaunchDefaults.d.ts.map +1 -0
- package/dist/adapters/sessionLaunchDefaults.js +15 -0
- package/dist/adapters/sessionLaunchDefaults.js.map +1 -0
- package/dist/adapters/terminalAdapter.d.ts +68 -0
- package/dist/adapters/terminalAdapter.d.ts.map +1 -0
- package/dist/adapters/terminalAdapter.js +371 -0
- package/dist/adapters/terminalAdapter.js.map +1 -0
- package/dist/agentLogin/agentLogin.d.ts +31 -0
- package/dist/agentLogin/agentLogin.d.ts.map +1 -0
- package/dist/agentLogin/agentLogin.js +493 -0
- package/dist/agentLogin/agentLogin.js.map +1 -0
- package/dist/agentTrigger.d.ts +28 -0
- package/dist/agentTrigger.d.ts.map +1 -0
- package/dist/agentTrigger.js +53 -0
- package/dist/agentTrigger.js.map +1 -0
- package/dist/apiErrorRetry.d.ts +209 -0
- package/dist/apiErrorRetry.d.ts.map +1 -0
- package/dist/apiErrorRetry.js +351 -0
- package/dist/apiErrorRetry.js.map +1 -0
- package/dist/apiRetryKick.d.ts +148 -0
- package/dist/apiRetryKick.d.ts.map +1 -0
- package/dist/apiRetryKick.js +158 -0
- package/dist/apiRetryKick.js.map +1 -0
- package/dist/bootClassifier.d.ts +46 -0
- package/dist/bootClassifier.d.ts.map +1 -0
- package/dist/bootClassifier.js +43 -0
- package/dist/bootClassifier.js.map +1 -0
- package/dist/bot.d.ts +207 -0
- package/dist/bot.d.ts.map +1 -0
- package/dist/bot.js +10611 -0
- package/dist/bot.js.map +1 -0
- package/dist/botFileStorage.d.ts +60 -0
- package/dist/botFileStorage.d.ts.map +1 -0
- package/dist/botFileStorage.js +205 -0
- package/dist/botFileStorage.js.map +1 -0
- package/dist/cli/applyDnsFix.d.ts +7 -0
- package/dist/cli/applyDnsFix.d.ts.map +1 -0
- package/dist/cli/applyDnsFix.js +46 -0
- package/dist/cli/applyDnsFix.js.map +1 -0
- package/dist/cli/bot.d.ts +27 -0
- package/dist/cli/bot.d.ts.map +1 -0
- package/dist/cli/bot.js +98 -0
- package/dist/cli/bot.js.map +1 -0
- package/dist/cli/botEntry.d.ts +3 -0
- package/dist/cli/botEntry.d.ts.map +1 -0
- package/dist/cli/botEntry.js +11 -0
- package/dist/cli/botEntry.js.map +1 -0
- package/dist/cli/connectorGuards.d.ts +31 -0
- package/dist/cli/connectorGuards.d.ts.map +1 -0
- package/dist/cli/connectorGuards.js +159 -0
- package/dist/cli/connectorGuards.js.map +1 -0
- package/dist/cli/envLoader.d.ts +34 -0
- package/dist/cli/envLoader.d.ts.map +1 -0
- package/dist/cli/envLoader.js +132 -0
- package/dist/cli/envLoader.js.map +1 -0
- package/dist/cli/hot.d.ts +82 -0
- package/dist/cli/hot.d.ts.map +1 -0
- package/dist/cli/hot.js +323 -0
- package/dist/cli/hot.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +130 -0
- package/dist/cli.js.map +1 -0
- package/dist/connectors/jira/adf.d.ts +72 -0
- package/dist/connectors/jira/adf.d.ts.map +1 -0
- package/dist/connectors/jira/adf.js +407 -0
- package/dist/connectors/jira/adf.js.map +1 -0
- package/dist/connectors/jira/agentBinaries.d.ts +14 -0
- package/dist/connectors/jira/agentBinaries.d.ts.map +1 -0
- package/dist/connectors/jira/agentBinaries.js +75 -0
- package/dist/connectors/jira/agentBinaries.js.map +1 -0
- package/dist/connectors/jira/answerSink.d.ts +52 -0
- package/dist/connectors/jira/answerSink.d.ts.map +1 -0
- package/dist/connectors/jira/answerSink.js +220 -0
- package/dist/connectors/jira/answerSink.js.map +1 -0
- package/dist/connectors/jira/attachmentDownload.d.ts +41 -0
- package/dist/connectors/jira/attachmentDownload.d.ts.map +1 -0
- package/dist/connectors/jira/attachmentDownload.js +92 -0
- package/dist/connectors/jira/attachmentDownload.js.map +1 -0
- package/dist/connectors/jira/attachmentTool.d.ts +43 -0
- package/dist/connectors/jira/attachmentTool.d.ts.map +1 -0
- package/dist/connectors/jira/attachmentTool.js +150 -0
- package/dist/connectors/jira/attachmentTool.js.map +1 -0
- package/dist/connectors/jira/client.d.ts +490 -0
- package/dist/connectors/jira/client.d.ts.map +1 -0
- package/dist/connectors/jira/client.js +453 -0
- package/dist/connectors/jira/client.js.map +1 -0
- package/dist/connectors/jira/config.d.ts +117 -0
- package/dist/connectors/jira/config.d.ts.map +1 -0
- package/dist/connectors/jira/config.js +350 -0
- package/dist/connectors/jira/config.js.map +1 -0
- package/dist/connectors/jira/configFile.d.ts +10 -0
- package/dist/connectors/jira/configFile.d.ts.map +1 -0
- package/dist/connectors/jira/configFile.js +50 -0
- package/dist/connectors/jira/configFile.js.map +1 -0
- package/dist/connectors/jira/connector.d.ts +68 -0
- package/dist/connectors/jira/connector.d.ts.map +1 -0
- package/dist/connectors/jira/connector.js +257 -0
- package/dist/connectors/jira/connector.js.map +1 -0
- package/dist/connectors/jira/contextLedger.d.ts +59 -0
- package/dist/connectors/jira/contextLedger.d.ts.map +1 -0
- package/dist/connectors/jira/contextLedger.js +194 -0
- package/dist/connectors/jira/contextLedger.js.map +1 -0
- package/dist/connectors/jira/contextPreamble.d.ts +18 -0
- package/dist/connectors/jira/contextPreamble.d.ts.map +1 -0
- package/dist/connectors/jira/contextPreamble.js +31 -0
- package/dist/connectors/jira/contextPreamble.js.map +1 -0
- package/dist/connectors/jira/inbound.d.ts +132 -0
- package/dist/connectors/jira/inbound.d.ts.map +1 -0
- package/dist/connectors/jira/inbound.js +316 -0
- package/dist/connectors/jira/inbound.js.map +1 -0
- package/dist/connectors/jira/issueBlocks.d.ts +51 -0
- package/dist/connectors/jira/issueBlocks.d.ts.map +1 -0
- package/dist/connectors/jira/issueBlocks.js +182 -0
- package/dist/connectors/jira/issueBlocks.js.map +1 -0
- package/dist/connectors/jira/issueContext.d.ts +25 -0
- package/dist/connectors/jira/issueContext.d.ts.map +1 -0
- package/dist/connectors/jira/issueContext.js +53 -0
- package/dist/connectors/jira/issueContext.js.map +1 -0
- package/dist/connectors/jira/issueDelta.d.ts +35 -0
- package/dist/connectors/jira/issueDelta.d.ts.map +1 -0
- package/dist/connectors/jira/issueDelta.js +50 -0
- package/dist/connectors/jira/issueDelta.js.map +1 -0
- package/dist/connectors/jira/mediaPlaceholders.d.ts +20 -0
- package/dist/connectors/jira/mediaPlaceholders.d.ts.map +1 -0
- package/dist/connectors/jira/mediaPlaceholders.js +92 -0
- package/dist/connectors/jira/mediaPlaceholders.js.map +1 -0
- package/dist/connectors/jira/outbound.d.ts +6 -0
- package/dist/connectors/jira/outbound.d.ts.map +1 -0
- package/dist/connectors/jira/outbound.js +38 -0
- package/dist/connectors/jira/outbound.js.map +1 -0
- package/dist/connectors/jira/prompt.d.ts +37 -0
- package/dist/connectors/jira/prompt.d.ts.map +1 -0
- package/dist/connectors/jira/prompt.js +99 -0
- package/dist/connectors/jira/prompt.js.map +1 -0
- package/dist/connectors/jira/promptSpill.d.ts +50 -0
- package/dist/connectors/jira/promptSpill.d.ts.map +1 -0
- package/dist/connectors/jira/promptSpill.js +157 -0
- package/dist/connectors/jira/promptSpill.js.map +1 -0
- package/dist/connectors/jira/promptText.d.ts +7 -0
- package/dist/connectors/jira/promptText.d.ts.map +1 -0
- package/dist/connectors/jira/promptText.js +26 -0
- package/dist/connectors/jira/promptText.js.map +1 -0
- package/dist/connectors/jira/sessionKeyCodec.d.ts +16 -0
- package/dist/connectors/jira/sessionKeyCodec.d.ts.map +1 -0
- package/dist/connectors/jira/sessionKeyCodec.js +101 -0
- package/dist/connectors/jira/sessionKeyCodec.js.map +1 -0
- package/dist/connectors/jira/trigger.d.ts +50 -0
- package/dist/connectors/jira/trigger.d.ts.map +1 -0
- package/dist/connectors/jira/trigger.js +93 -0
- package/dist/connectors/jira/trigger.js.map +1 -0
- package/dist/connectors/jira/triggerLog.d.ts +51 -0
- package/dist/connectors/jira/triggerLog.d.ts.map +1 -0
- package/dist/connectors/jira/triggerLog.js +78 -0
- package/dist/connectors/jira/triggerLog.js.map +1 -0
- package/dist/connectors/jira/unconfirmedPosts.d.ts +58 -0
- package/dist/connectors/jira/unconfirmedPosts.d.ts.map +1 -0
- package/dist/connectors/jira/unconfirmedPosts.js +105 -0
- package/dist/connectors/jira/unconfirmedPosts.js.map +1 -0
- package/dist/connectors/telegram/answerSink.d.ts +46 -0
- package/dist/connectors/telegram/answerSink.d.ts.map +1 -0
- package/dist/connectors/telegram/answerSink.js +71 -0
- package/dist/connectors/telegram/answerSink.js.map +1 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.d.ts +31 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.js +142 -0
- package/dist/connectors/telegram/commands/autoContinueLimits.js.map +1 -0
- package/dist/connectors/telegram/commands/botCore.d.ts +46 -0
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/botCore.js +3 -0
- package/dist/connectors/telegram/commands/botCore.js.map +1 -0
- package/dist/connectors/telegram/commands/callbackMessage.d.ts +12 -0
- package/dist/connectors/telegram/commands/callbackMessage.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/callbackMessage.js +13 -0
- package/dist/connectors/telegram/commands/callbackMessage.js.map +1 -0
- package/dist/connectors/telegram/commands/compaction.d.ts +47 -0
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/compaction.js +868 -0
- package/dist/connectors/telegram/commands/compaction.js.map +1 -0
- package/dist/connectors/telegram/commands/displayModes.d.ts +13 -0
- package/dist/connectors/telegram/commands/displayModes.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/displayModes.js +335 -0
- package/dist/connectors/telegram/commands/displayModes.js.map +1 -0
- package/dist/connectors/telegram/commands/modelProviders.d.ts +95 -0
- package/dist/connectors/telegram/commands/modelProviders.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/modelProviders.js +841 -0
- package/dist/connectors/telegram/commands/modelProviders.js.map +1 -0
- package/dist/connectors/telegram/commands/reminders.d.ts +54 -0
- package/dist/connectors/telegram/commands/reminders.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/reminders.js +624 -0
- package/dist/connectors/telegram/commands/reminders.js.map +1 -0
- package/dist/connectors/telegram/fileIntake.d.ts +166 -0
- package/dist/connectors/telegram/fileIntake.d.ts.map +1 -0
- package/dist/connectors/telegram/fileIntake.js +304 -0
- package/dist/connectors/telegram/fileIntake.js.map +1 -0
- package/dist/connectors/telegram/fileSendGateway.d.ts +57 -0
- package/dist/connectors/telegram/fileSendGateway.d.ts.map +1 -0
- package/dist/connectors/telegram/fileSendGateway.js +221 -0
- package/dist/connectors/telegram/fileSendGateway.js.map +1 -0
- package/dist/connectors/telegram/foreignKeyFallbacks.d.ts +52 -0
- package/dist/connectors/telegram/foreignKeyFallbacks.d.ts.map +1 -0
- package/dist/connectors/telegram/foreignKeyFallbacks.js +71 -0
- package/dist/connectors/telegram/foreignKeyFallbacks.js.map +1 -0
- package/dist/connectors/telegram/inbound.d.ts +131 -0
- package/dist/connectors/telegram/inbound.d.ts.map +1 -0
- package/dist/connectors/telegram/inbound.js +278 -0
- package/dist/connectors/telegram/inbound.js.map +1 -0
- package/dist/connectors/telegram/languagePicker.d.ts +32 -0
- package/dist/connectors/telegram/languagePicker.d.ts.map +1 -0
- package/dist/connectors/telegram/languagePicker.js +55 -0
- package/dist/connectors/telegram/languagePicker.js.map +1 -0
- package/dist/connectors/telegram/messageSplit.d.ts +62 -0
- package/dist/connectors/telegram/messageSplit.d.ts.map +1 -0
- package/dist/connectors/telegram/messageSplit.js +119 -0
- package/dist/connectors/telegram/messageSplit.js.map +1 -0
- package/dist/connectors/telegram/outbound.d.ts +62 -0
- package/dist/connectors/telegram/outbound.d.ts.map +1 -0
- package/dist/connectors/telegram/outbound.js +116 -0
- package/dist/connectors/telegram/outbound.js.map +1 -0
- package/dist/connectors/telegram/output/createOutputTransport.d.ts +34 -0
- package/dist/connectors/telegram/output/createOutputTransport.d.ts.map +1 -0
- package/dist/connectors/telegram/output/createOutputTransport.js +77 -0
- package/dist/connectors/telegram/output/createOutputTransport.js.map +1 -0
- package/dist/connectors/telegram/output/dmOutputTransport.d.ts +47 -0
- package/dist/connectors/telegram/output/dmOutputTransport.d.ts.map +1 -0
- package/dist/connectors/telegram/output/dmOutputTransport.js +412 -0
- package/dist/connectors/telegram/output/dmOutputTransport.js.map +1 -0
- package/dist/connectors/telegram/outputBacklogGlue.d.ts +38 -0
- package/dist/connectors/telegram/outputBacklogGlue.d.ts.map +1 -0
- package/dist/connectors/telegram/outputBacklogGlue.js +49 -0
- package/dist/connectors/telegram/outputBacklogGlue.js.map +1 -0
- package/dist/connectors/telegram/outputFlushPlan.d.ts +93 -0
- package/dist/connectors/telegram/outputFlushPlan.d.ts.map +1 -0
- package/dist/connectors/telegram/outputFlushPlan.js +120 -0
- package/dist/connectors/telegram/outputFlushPlan.js.map +1 -0
- package/dist/connectors/telegram/questionKeyboards.d.ts +30 -0
- package/dist/connectors/telegram/questionKeyboards.d.ts.map +1 -0
- package/dist/connectors/telegram/questionKeyboards.js +37 -0
- package/dist/connectors/telegram/questionKeyboards.js.map +1 -0
- package/dist/connectors/telegram/renderAgentHtml.d.ts +27 -0
- package/dist/connectors/telegram/renderAgentHtml.d.ts.map +1 -0
- package/dist/connectors/telegram/renderAgentHtml.js +97 -0
- package/dist/connectors/telegram/renderAgentHtml.js.map +1 -0
- package/dist/connectors/telegram/sessionKeyCodec.d.ts +28 -0
- package/dist/connectors/telegram/sessionKeyCodec.d.ts.map +1 -0
- package/dist/connectors/telegram/sessionKeyCodec.js +107 -0
- package/dist/connectors/telegram/sessionKeyCodec.js.map +1 -0
- package/dist/connectors/telegram/telegramCallGuard.d.ts +19 -0
- package/dist/connectors/telegram/telegramCallGuard.d.ts.map +1 -0
- package/dist/connectors/telegram/telegramCallGuard.js +35 -0
- package/dist/connectors/telegram/telegramCallGuard.js.map +1 -0
- package/dist/connectors/telegram/timezonePicker.d.ts +85 -0
- package/dist/connectors/telegram/timezonePicker.d.ts.map +1 -0
- package/dist/connectors/telegram/timezonePicker.js +142 -0
- package/dist/connectors/telegram/timezonePicker.js.map +1 -0
- package/dist/connectors/telegram/updateDispatcher.d.ts +85 -0
- package/dist/connectors/telegram/updateDispatcher.d.ts.map +1 -0
- package/dist/connectors/telegram/updateDispatcher.js +159 -0
- package/dist/connectors/telegram/updateDispatcher.js.map +1 -0
- package/dist/connectors/test/connector.d.ts +52 -0
- package/dist/connectors/test/connector.d.ts.map +1 -0
- package/dist/connectors/test/connector.js +143 -0
- package/dist/connectors/test/connector.js.map +1 -0
- package/dist/connectors/test/sessionKeyCodec.d.ts +25 -0
- package/dist/connectors/test/sessionKeyCodec.d.ts.map +1 -0
- package/dist/connectors/test/sessionKeyCodec.js +50 -0
- package/dist/connectors/test/sessionKeyCodec.js.map +1 -0
- package/dist/diagLog.d.ts +6 -0
- package/dist/diagLog.d.ts.map +1 -0
- package/dist/diagLog.js +58 -0
- package/dist/diagLog.js.map +1 -0
- package/dist/effortLevels.d.ts +68 -0
- package/dist/effortLevels.d.ts.map +1 -0
- package/dist/effortLevels.js +114 -0
- package/dist/effortLevels.js.map +1 -0
- package/dist/folderName.d.ts +42 -0
- package/dist/folderName.d.ts.map +1 -0
- package/dist/folderName.js +51 -0
- package/dist/folderName.js.map +1 -0
- package/dist/i18n/de.d.ts +2 -0
- package/dist/i18n/de.d.ts.map +1 -0
- package/dist/i18n/de.js +537 -0
- package/dist/i18n/de.js.map +1 -0
- package/dist/i18n/en.d.ts +7 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +566 -0
- package/dist/i18n/en.js.map +1 -0
- package/dist/i18n/es.d.ts +2 -0
- package/dist/i18n/es.d.ts.map +1 -0
- package/dist/i18n/es.js +537 -0
- package/dist/i18n/es.js.map +1 -0
- package/dist/i18n/fr.d.ts +2 -0
- package/dist/i18n/fr.d.ts.map +1 -0
- package/dist/i18n/fr.js +537 -0
- package/dist/i18n/fr.js.map +1 -0
- package/dist/i18n/hi.d.ts +2 -0
- package/dist/i18n/hi.d.ts.map +1 -0
- package/dist/i18n/hi.js +537 -0
- package/dist/i18n/hi.js.map +1 -0
- package/dist/i18n/ja.d.ts +2 -0
- package/dist/i18n/ja.d.ts.map +1 -0
- package/dist/i18n/ja.js +537 -0
- package/dist/i18n/ja.js.map +1 -0
- package/dist/i18n/ka.d.ts +2 -0
- package/dist/i18n/ka.d.ts.map +1 -0
- package/dist/i18n/ka.js +537 -0
- package/dist/i18n/ka.js.map +1 -0
- package/dist/i18n/pt.d.ts +2 -0
- package/dist/i18n/pt.d.ts.map +1 -0
- package/dist/i18n/pt.js +537 -0
- package/dist/i18n/pt.js.map +1 -0
- package/dist/i18n/ru.d.ts +6 -0
- package/dist/i18n/ru.d.ts.map +1 -0
- package/dist/i18n/ru.js +540 -0
- package/dist/i18n/ru.js.map +1 -0
- package/dist/i18n/uk.d.ts +8 -0
- package/dist/i18n/uk.d.ts.map +1 -0
- package/dist/i18n/uk.js +542 -0
- package/dist/i18n/uk.js.map +1 -0
- package/dist/i18n/uz.d.ts +2 -0
- package/dist/i18n/uz.d.ts.map +1 -0
- package/dist/i18n/uz.js +537 -0
- package/dist/i18n/uz.js.map +1 -0
- package/dist/i18n/zh.d.ts +2 -0
- package/dist/i18n/zh.d.ts.map +1 -0
- package/dist/i18n/zh.js +537 -0
- package/dist/i18n/zh.js.map +1 -0
- package/dist/i18n.d.ts +115 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +233 -0
- package/dist/i18n.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/installManager.d.ts +99 -0
- package/dist/installManager.d.ts.map +1 -0
- package/dist/installManager.js +943 -0
- package/dist/installManager.js.map +1 -0
- package/dist/instanceLock.d.ts +161 -0
- package/dist/instanceLock.d.ts.map +1 -0
- package/dist/instanceLock.js +388 -0
- package/dist/instanceLock.js.map +1 -0
- package/dist/mcpConfig.d.ts +76 -0
- package/dist/mcpConfig.d.ts.map +1 -0
- package/dist/mcpConfig.js +270 -0
- package/dist/mcpConfig.js.map +1 -0
- package/dist/openCodeOpenQuestion.d.ts +44 -0
- package/dist/openCodeOpenQuestion.d.ts.map +1 -0
- package/dist/openCodeOpenQuestion.js +64 -0
- package/dist/openCodeOpenQuestion.js.map +1 -0
- package/dist/openCodeQuestionFlow.d.ts +105 -0
- package/dist/openCodeQuestionFlow.d.ts.map +1 -0
- package/dist/openCodeQuestionFlow.js +143 -0
- package/dist/openCodeQuestionFlow.js.map +1 -0
- package/dist/openCodeSessionRouting.d.ts +133 -0
- package/dist/openCodeSessionRouting.d.ts.map +1 -0
- package/dist/openCodeSessionRouting.js +253 -0
- package/dist/openCodeSessionRouting.js.map +1 -0
- package/dist/openCodeSessionTitle.d.ts +50 -0
- package/dist/openCodeSessionTitle.d.ts.map +1 -0
- package/dist/openCodeSessionTitle.js +84 -0
- package/dist/openCodeSessionTitle.js.map +1 -0
- package/dist/outputTrace.d.ts +108 -0
- package/dist/outputTrace.d.ts.map +1 -0
- package/dist/outputTrace.js +430 -0
- package/dist/outputTrace.js.map +1 -0
- package/dist/pendingQuestionRepost.d.ts +47 -0
- package/dist/pendingQuestionRepost.d.ts.map +1 -0
- package/dist/pendingQuestionRepost.js +29 -0
- package/dist/pendingQuestionRepost.js.map +1 -0
- package/dist/pinnedStatus.d.ts +52 -0
- package/dist/pinnedStatus.d.ts.map +1 -0
- package/dist/pinnedStatus.js +36 -0
- package/dist/pinnedStatus.js.map +1 -0
- package/dist/platform/answerSink.d.ts +93 -0
- package/dist/platform/answerSink.d.ts.map +1 -0
- package/dist/platform/answerSink.js +31 -0
- package/dist/platform/answerSink.js.map +1 -0
- package/dist/platform/capabilityFallback.d.ts +39 -0
- package/dist/platform/capabilityFallback.d.ts.map +1 -0
- package/dist/platform/capabilityFallback.js +55 -0
- package/dist/platform/capabilityFallback.js.map +1 -0
- package/dist/platform/commandRouter.d.ts +51 -0
- package/dist/platform/commandRouter.d.ts.map +1 -0
- package/dist/platform/commandRouter.js +53 -0
- package/dist/platform/commandRouter.js.map +1 -0
- package/dist/platform/connectorSet.d.ts +39 -0
- package/dist/platform/connectorSet.d.ts.map +1 -0
- package/dist/platform/connectorSet.js +55 -0
- package/dist/platform/connectorSet.js.map +1 -0
- package/dist/platform/inbound.d.ts +147 -0
- package/dist/platform/inbound.d.ts.map +1 -0
- package/dist/platform/inbound.js +18 -0
- package/dist/platform/inbound.js.map +1 -0
- package/dist/platform/outbound.d.ts +225 -0
- package/dist/platform/outbound.d.ts.map +1 -0
- package/dist/platform/outbound.js +30 -0
- package/dist/platform/outbound.js.map +1 -0
- package/dist/platform/unservedStateGuard.d.ts +27 -0
- package/dist/platform/unservedStateGuard.d.ts.map +1 -0
- package/dist/platform/unservedStateGuard.js +42 -0
- package/dist/platform/unservedStateGuard.js.map +1 -0
- package/dist/postToSession.d.ts +94 -0
- package/dist/postToSession.d.ts.map +1 -0
- package/dist/postToSession.js +56 -0
- package/dist/postToSession.js.map +1 -0
- package/dist/progressLine.d.ts +180 -0
- package/dist/progressLine.d.ts.map +1 -0
- package/dist/progressLine.js +293 -0
- package/dist/progressLine.js.map +1 -0
- package/dist/rateLimiter.d.ts +246 -0
- package/dist/rateLimiter.d.ts.map +1 -0
- package/dist/rateLimiter.js +555 -0
- package/dist/rateLimiter.js.map +1 -0
- package/dist/requests/answerRequest.d.ts +57 -0
- package/dist/requests/answerRequest.d.ts.map +1 -0
- package/dist/requests/answerRequest.js +96 -0
- package/dist/requests/answerRequest.js.map +1 -0
- package/dist/requests/answerTail.d.ts +83 -0
- package/dist/requests/answerTail.d.ts.map +1 -0
- package/dist/requests/answerTail.js +102 -0
- package/dist/requests/answerTail.js.map +1 -0
- package/dist/requests/limitWaitAnswer.d.ts +87 -0
- package/dist/requests/limitWaitAnswer.d.ts.map +1 -0
- package/dist/requests/limitWaitAnswer.js +83 -0
- package/dist/requests/limitWaitAnswer.js.map +1 -0
- package/dist/requests/requestGroup.d.ts +44 -0
- package/dist/requests/requestGroup.d.ts.map +1 -0
- package/dist/requests/requestGroup.js +63 -0
- package/dist/requests/requestGroup.js.map +1 -0
- package/dist/requests/requestHeader.d.ts +70 -0
- package/dist/requests/requestHeader.d.ts.map +1 -0
- package/dist/requests/requestHeader.js +83 -0
- package/dist/requests/requestHeader.js.map +1 -0
- package/dist/requests/requestLedger.d.ts +217 -0
- package/dist/requests/requestLedger.d.ts.map +1 -0
- package/dist/requests/requestLedger.js +468 -0
- package/dist/requests/requestLedger.js.map +1 -0
- package/dist/requests/sessionTurnProbe.d.ts +52 -0
- package/dist/requests/sessionTurnProbe.d.ts.map +1 -0
- package/dist/requests/sessionTurnProbe.js +29 -0
- package/dist/requests/sessionTurnProbe.js.map +1 -0
- package/dist/requests/types.d.ts +181 -0
- package/dist/requests/types.d.ts.map +1 -0
- package/dist/requests/types.js +9 -0
- package/dist/requests/types.js.map +1 -0
- package/dist/requests/wakeUpEngine.d.ts +160 -0
- package/dist/requests/wakeUpEngine.d.ts.map +1 -0
- package/dist/requests/wakeUpEngine.js +399 -0
- package/dist/requests/wakeUpEngine.js.map +1 -0
- package/dist/requests/wakeUpRules.d.ts +151 -0
- package/dist/requests/wakeUpRules.d.ts.map +1 -0
- package/dist/requests/wakeUpRules.js +167 -0
- package/dist/requests/wakeUpRules.js.map +1 -0
- package/dist/resumeContext.d.ts +87 -0
- package/dist/resumeContext.d.ts.map +1 -0
- package/dist/resumeContext.js +114 -0
- package/dist/resumeContext.js.map +1 -0
- package/dist/scheduler/checkRun.d.ts +95 -0
- package/dist/scheduler/checkRun.d.ts.map +1 -0
- package/dist/scheduler/checkRun.js +172 -0
- package/dist/scheduler/checkRun.js.map +1 -0
- package/dist/scheduler/delivery.d.ts +99 -0
- package/dist/scheduler/delivery.d.ts.map +1 -0
- package/dist/scheduler/delivery.js +212 -0
- package/dist/scheduler/delivery.js.map +1 -0
- package/dist/scheduler/deliveryKind.d.ts +29 -0
- package/dist/scheduler/deliveryKind.d.ts.map +1 -0
- package/dist/scheduler/deliveryKind.js +39 -0
- package/dist/scheduler/deliveryKind.js.map +1 -0
- package/dist/scheduler/directoryThreads.d.ts +19 -0
- package/dist/scheduler/directoryThreads.d.ts.map +1 -0
- package/dist/scheduler/directoryThreads.js +28 -0
- package/dist/scheduler/directoryThreads.js.map +1 -0
- package/dist/scheduler/engine.d.ts +77 -0
- package/dist/scheduler/engine.d.ts.map +1 -0
- package/dist/scheduler/engine.js +337 -0
- package/dist/scheduler/engine.js.map +1 -0
- package/dist/scheduler/injection.d.ts +102 -0
- package/dist/scheduler/injection.d.ts.map +1 -0
- package/dist/scheduler/injection.js +122 -0
- package/dist/scheduler/injection.js.map +1 -0
- package/dist/scheduler/mcpBoot.d.ts +65 -0
- package/dist/scheduler/mcpBoot.d.ts.map +1 -0
- package/dist/scheduler/mcpBoot.js +60 -0
- package/dist/scheduler/mcpBoot.js.map +1 -0
- package/dist/scheduler/mcpSurface.d.ts +355 -0
- package/dist/scheduler/mcpSurface.d.ts.map +1 -0
- package/dist/scheduler/mcpSurface.js +1257 -0
- package/dist/scheduler/mcpSurface.js.map +1 -0
- package/dist/scheduler/rebindResume.d.ts +27 -0
- package/dist/scheduler/rebindResume.d.ts.map +1 -0
- package/dist/scheduler/rebindResume.js +17 -0
- package/dist/scheduler/rebindResume.js.map +1 -0
- package/dist/scheduler/recurrence.d.ts +58 -0
- package/dist/scheduler/recurrence.d.ts.map +1 -0
- package/dist/scheduler/recurrence.js +210 -0
- package/dist/scheduler/recurrence.js.map +1 -0
- package/dist/scheduler/runLedger.d.ts +59 -0
- package/dist/scheduler/runLedger.d.ts.map +1 -0
- package/dist/scheduler/runLedger.js +54 -0
- package/dist/scheduler/runLedger.js.map +1 -0
- package/dist/scheduler/store.d.ts +97 -0
- package/dist/scheduler/store.d.ts.map +1 -0
- package/dist/scheduler/store.js +124 -0
- package/dist/scheduler/store.js.map +1 -0
- package/dist/scheduler/timezoneRecompute.d.ts +61 -0
- package/dist/scheduler/timezoneRecompute.d.ts.map +1 -0
- package/dist/scheduler/timezoneRecompute.js +46 -0
- package/dist/scheduler/timezoneRecompute.js.map +1 -0
- package/dist/scheduler/types.d.ts +139 -0
- package/dist/scheduler/types.d.ts.map +1 -0
- package/dist/scheduler/types.js +8 -0
- package/dist/scheduler/types.js.map +1 -0
- package/dist/sendErrorClassifier.d.ts +45 -0
- package/dist/sendErrorClassifier.d.ts.map +1 -0
- package/dist/sendErrorClassifier.js +65 -0
- package/dist/sendErrorClassifier.js.map +1 -0
- package/dist/sessionKey.d.ts +136 -0
- package/dist/sessionKey.d.ts.map +1 -0
- package/dist/sessionKey.js +153 -0
- package/dist/sessionKey.js.map +1 -0
- package/dist/sessionPick.d.ts +42 -0
- package/dist/sessionPick.d.ts.map +1 -0
- package/dist/sessionPick.js +39 -0
- package/dist/sessionPick.js.map +1 -0
- package/dist/shutdown.d.ts +126 -0
- package/dist/shutdown.d.ts.map +1 -0
- package/dist/shutdown.js +164 -0
- package/dist/shutdown.js.map +1 -0
- package/dist/startupPromptBuffer.d.ts +85 -0
- package/dist/startupPromptBuffer.d.ts.map +1 -0
- package/dist/startupPromptBuffer.js +123 -0
- package/dist/startupPromptBuffer.js.map +1 -0
- package/dist/state.d.ts +1245 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +1830 -0
- package/dist/state.js.map +1 -0
- package/dist/threadContextPreamble.d.ts +89 -0
- package/dist/threadContextPreamble.d.ts.map +1 -0
- package/dist/threadContextPreamble.js +102 -0
- package/dist/threadContextPreamble.js.map +1 -0
- package/dist/threadRouting.d.ts +164 -0
- package/dist/threadRouting.d.ts.map +1 -0
- package/dist/threadRouting.js +182 -0
- package/dist/threadRouting.js.map +1 -0
- package/dist/types.d.ts +1015 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/abortableFifo.d.ts +10 -0
- package/dist/utils/abortableFifo.d.ts.map +1 -0
- package/dist/utils/abortableFifo.js +55 -0
- package/dist/utils/abortableFifo.js.map +1 -0
- package/dist/utils/adoptedToolList.d.ts +27 -0
- package/dist/utils/adoptedToolList.d.ts.map +1 -0
- package/dist/utils/adoptedToolList.js +22 -0
- package/dist/utils/adoptedToolList.js.map +1 -0
- package/dist/utils/agentEnvironment.d.ts +42 -0
- package/dist/utils/agentEnvironment.d.ts.map +1 -0
- package/dist/utils/agentEnvironment.js +122 -0
- package/dist/utils/agentEnvironment.js.map +1 -0
- package/dist/utils/ansiClean.d.ts +11 -0
- package/dist/utils/ansiClean.d.ts.map +1 -0
- package/dist/utils/ansiClean.js +139 -0
- package/dist/utils/ansiClean.js.map +1 -0
- package/dist/utils/autoContinueOnLimit.d.ts +49 -0
- package/dist/utils/autoContinueOnLimit.d.ts.map +1 -0
- package/dist/utils/autoContinueOnLimit.js +69 -0
- package/dist/utils/autoContinueOnLimit.js.map +1 -0
- package/dist/utils/canonicalPathContainment.d.ts +7 -0
- package/dist/utils/canonicalPathContainment.d.ts.map +1 -0
- package/dist/utils/canonicalPathContainment.js +48 -0
- package/dist/utils/canonicalPathContainment.js.map +1 -0
- package/dist/utils/claudeAuthLogin.d.ts +71 -0
- package/dist/utils/claudeAuthLogin.d.ts.map +1 -0
- package/dist/utils/claudeAuthLogin.js +93 -0
- package/dist/utils/claudeAuthLogin.js.map +1 -0
- package/dist/utils/claudeChunkClassifier.d.ts +97 -0
- package/dist/utils/claudeChunkClassifier.d.ts.map +1 -0
- package/dist/utils/claudeChunkClassifier.js +254 -0
- package/dist/utils/claudeChunkClassifier.js.map +1 -0
- package/dist/utils/claudeCodeVersion.d.ts +31 -0
- package/dist/utils/claudeCodeVersion.d.ts.map +1 -0
- package/dist/utils/claudeCodeVersion.js +62 -0
- package/dist/utils/claudeCodeVersion.js.map +1 -0
- package/dist/utils/claudeCompactHook.d.ts +64 -0
- package/dist/utils/claudeCompactHook.d.ts.map +1 -0
- package/dist/utils/claudeCompactHook.js +98 -0
- package/dist/utils/claudeCompactHook.js.map +1 -0
- package/dist/utils/claudeLivenessAction.d.ts +208 -0
- package/dist/utils/claudeLivenessAction.d.ts.map +1 -0
- package/dist/utils/claudeLivenessAction.js +135 -0
- package/dist/utils/claudeLivenessAction.js.map +1 -0
- package/dist/utils/claudeMcpHeal.d.ts +92 -0
- package/dist/utils/claudeMcpHeal.d.ts.map +1 -0
- package/dist/utils/claudeMcpHeal.js +91 -0
- package/dist/utils/claudeMcpHeal.js.map +1 -0
- package/dist/utils/claudeRelayRouting.d.ts +86 -0
- package/dist/utils/claudeRelayRouting.d.ts.map +1 -0
- package/dist/utils/claudeRelayRouting.js +159 -0
- package/dist/utils/claudeRelayRouting.js.map +1 -0
- package/dist/utils/claudeRuntimeInfo.d.ts +26 -0
- package/dist/utils/claudeRuntimeInfo.d.ts.map +1 -0
- package/dist/utils/claudeRuntimeInfo.js +151 -0
- package/dist/utils/claudeRuntimeInfo.js.map +1 -0
- package/dist/utils/claudeScrapeShapes.d.ts +256 -0
- package/dist/utils/claudeScrapeShapes.d.ts.map +1 -0
- package/dist/utils/claudeScrapeShapes.js +290 -0
- package/dist/utils/claudeScrapeShapes.js.map +1 -0
- package/dist/utils/claudeSessionTitle.d.ts +27 -0
- package/dist/utils/claudeSessionTitle.d.ts.map +1 -0
- package/dist/utils/claudeSessionTitle.js +90 -0
- package/dist/utils/claudeSessionTitle.js.map +1 -0
- package/dist/utils/claudeStreamJson.d.ts +202 -0
- package/dist/utils/claudeStreamJson.d.ts.map +1 -0
- package/dist/utils/claudeStreamJson.js +351 -0
- package/dist/utils/claudeStreamJson.js.map +1 -0
- package/dist/utils/claudeSubagentTail.d.ts +93 -0
- package/dist/utils/claudeSubagentTail.d.ts.map +1 -0
- package/dist/utils/claudeSubagentTail.js +136 -0
- package/dist/utils/claudeSubagentTail.js.map +1 -0
- package/dist/utils/clearThreadOutputQueues.d.ts +43 -0
- package/dist/utils/clearThreadOutputQueues.d.ts.map +1 -0
- package/dist/utils/clearThreadOutputQueues.js +39 -0
- package/dist/utils/clearThreadOutputQueues.js.map +1 -0
- package/dist/utils/compactCommandRoute.d.ts +45 -0
- package/dist/utils/compactCommandRoute.d.ts.map +1 -0
- package/dist/utils/compactCommandRoute.js +36 -0
- package/dist/utils/compactCommandRoute.js.map +1 -0
- package/dist/utils/compactOnIdle.d.ts +329 -0
- package/dist/utils/compactOnIdle.d.ts.map +1 -0
- package/dist/utils/compactOnIdle.js +379 -0
- package/dist/utils/compactOnIdle.js.map +1 -0
- package/dist/utils/consoleFileTap.d.ts +51 -0
- package/dist/utils/consoleFileTap.d.ts.map +1 -0
- package/dist/utils/consoleFileTap.js +86 -0
- package/dist/utils/consoleFileTap.js.map +1 -0
- package/dist/utils/displayVerbosity.d.ts +44 -0
- package/dist/utils/displayVerbosity.d.ts.map +1 -0
- package/dist/utils/displayVerbosity.js +75 -0
- package/dist/utils/displayVerbosity.js.map +1 -0
- package/dist/utils/download.d.ts +72 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/download.js +216 -0
- package/dist/utils/download.js.map +1 -0
- package/dist/utils/draftFinalize.d.ts +110 -0
- package/dist/utils/draftFinalize.d.ts.map +1 -0
- package/dist/utils/draftFinalize.js +100 -0
- package/dist/utils/draftFinalize.js.map +1 -0
- package/dist/utils/draftId.d.ts +36 -0
- package/dist/utils/draftId.d.ts.map +1 -0
- package/dist/utils/draftId.js +46 -0
- package/dist/utils/draftId.js.map +1 -0
- package/dist/utils/draftPacer.d.ts +72 -0
- package/dist/utils/draftPacer.d.ts.map +1 -0
- package/dist/utils/draftPacer.js +53 -0
- package/dist/utils/draftPacer.js.map +1 -0
- package/dist/utils/effortStartupKeystroke.d.ts +20 -0
- package/dist/utils/effortStartupKeystroke.d.ts.map +1 -0
- package/dist/utils/effortStartupKeystroke.js +28 -0
- package/dist/utils/effortStartupKeystroke.js.map +1 -0
- package/dist/utils/ensureSessionPlan.d.ts +70 -0
- package/dist/utils/ensureSessionPlan.d.ts.map +1 -0
- package/dist/utils/ensureSessionPlan.js +54 -0
- package/dist/utils/ensureSessionPlan.js.map +1 -0
- package/dist/utils/fileSendPlan.d.ts +217 -0
- package/dist/utils/fileSendPlan.d.ts.map +1 -0
- package/dist/utils/fileSendPlan.js +291 -0
- package/dist/utils/fileSendPlan.js.map +1 -0
- package/dist/utils/fileSendService.d.ts +94 -0
- package/dist/utils/fileSendService.d.ts.map +1 -0
- package/dist/utils/fileSendService.js +387 -0
- package/dist/utils/fileSendService.js.map +1 -0
- package/dist/utils/groupFinalizePlan.d.ts +38 -0
- package/dist/utils/groupFinalizePlan.d.ts.map +1 -0
- package/dist/utils/groupFinalizePlan.js +35 -0
- package/dist/utils/groupFinalizePlan.js.map +1 -0
- package/dist/utils/identicalOutputGuard.d.ts +83 -0
- package/dist/utils/identicalOutputGuard.d.ts.map +1 -0
- package/dist/utils/identicalOutputGuard.js +99 -0
- package/dist/utils/identicalOutputGuard.js.map +1 -0
- package/dist/utils/isoTimestamp.d.ts +16 -0
- package/dist/utils/isoTimestamp.d.ts.map +1 -0
- package/dist/utils/isoTimestamp.js +34 -0
- package/dist/utils/isoTimestamp.js.map +1 -0
- package/dist/utils/jsonStreamBusyWatchdog.d.ts +130 -0
- package/dist/utils/jsonStreamBusyWatchdog.d.ts.map +1 -0
- package/dist/utils/jsonStreamBusyWatchdog.js +122 -0
- package/dist/utils/jsonStreamBusyWatchdog.js.map +1 -0
- package/dist/utils/jsonStreamHost.d.ts +227 -0
- package/dist/utils/jsonStreamHost.d.ts.map +1 -0
- package/dist/utils/jsonStreamHost.js +417 -0
- package/dist/utils/jsonStreamHost.js.map +1 -0
- package/dist/utils/keyedTransitionQueue.d.ts +18 -0
- package/dist/utils/keyedTransitionQueue.d.ts.map +1 -0
- package/dist/utils/keyedTransitionQueue.js +34 -0
- package/dist/utils/keyedTransitionQueue.js.map +1 -0
- package/dist/utils/limitEpisodeRecovery.d.ts +92 -0
- package/dist/utils/limitEpisodeRecovery.d.ts.map +1 -0
- package/dist/utils/limitEpisodeRecovery.js +133 -0
- package/dist/utils/limitEpisodeRecovery.js.map +1 -0
- package/dist/utils/limitHeldPromptQueue.d.ts +48 -0
- package/dist/utils/limitHeldPromptQueue.d.ts.map +1 -0
- package/dist/utils/limitHeldPromptQueue.js +59 -0
- package/dist/utils/limitHeldPromptQueue.js.map +1 -0
- package/dist/utils/limitHeldPrompts.d.ts +58 -0
- package/dist/utils/limitHeldPrompts.d.ts.map +1 -0
- package/dist/utils/limitHeldPrompts.js +65 -0
- package/dist/utils/limitHeldPrompts.js.map +1 -0
- package/dist/utils/linkPreviewSuppression.d.ts +18 -0
- package/dist/utils/linkPreviewSuppression.d.ts.map +1 -0
- package/dist/utils/linkPreviewSuppression.js +37 -0
- package/dist/utils/linkPreviewSuppression.js.map +1 -0
- package/dist/utils/localClock.d.ts +15 -0
- package/dist/utils/localClock.d.ts.map +1 -0
- package/dist/utils/localClock.js +29 -0
- package/dist/utils/localClock.js.map +1 -0
- package/dist/utils/markdownTableRender.d.ts +83 -0
- package/dist/utils/markdownTableRender.d.ts.map +1 -0
- package/dist/utils/markdownTableRender.js +298 -0
- package/dist/utils/markdownTableRender.js.map +1 -0
- package/dist/utils/mediaGroupCollector.d.ts +51 -0
- package/dist/utils/mediaGroupCollector.d.ts.map +1 -0
- package/dist/utils/mediaGroupCollector.js +90 -0
- package/dist/utils/mediaGroupCollector.js.map +1 -0
- package/dist/utils/messageSendService.d.ts +136 -0
- package/dist/utils/messageSendService.d.ts.map +1 -0
- package/dist/utils/messageSendService.js +165 -0
- package/dist/utils/messageSendService.js.map +1 -0
- package/dist/utils/minutesOverride.d.ts +7 -0
- package/dist/utils/minutesOverride.d.ts.map +1 -0
- package/dist/utils/minutesOverride.js +16 -0
- package/dist/utils/minutesOverride.js.map +1 -0
- package/dist/utils/modelPickerPlan.d.ts +119 -0
- package/dist/utils/modelPickerPlan.d.ts.map +1 -0
- package/dist/utils/modelPickerPlan.js +171 -0
- package/dist/utils/modelPickerPlan.js.map +1 -0
- package/dist/utils/modelSetReplyDecision.d.ts +67 -0
- package/dist/utils/modelSetReplyDecision.d.ts.map +1 -0
- package/dist/utils/modelSetReplyDecision.js +27 -0
- package/dist/utils/modelSetReplyDecision.js.map +1 -0
- package/dist/utils/openCodeAuthLogin.d.ts +181 -0
- package/dist/utils/openCodeAuthLogin.d.ts.map +1 -0
- package/dist/utils/openCodeAuthLogin.js +393 -0
- package/dist/utils/openCodeAuthLogin.js.map +1 -0
- package/dist/utils/openCodeCompactPlugin.d.ts +81 -0
- package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -0
- package/dist/utils/openCodeCompactPlugin.js +146 -0
- package/dist/utils/openCodeCompactPlugin.js.map +1 -0
- package/dist/utils/openCodeTurnActivity.d.ts +67 -0
- package/dist/utils/openCodeTurnActivity.d.ts.map +1 -0
- package/dist/utils/openCodeTurnActivity.js +27 -0
- package/dist/utils/openCodeTurnActivity.js.map +1 -0
- package/dist/utils/outputDebounce.d.ts +24 -0
- package/dist/utils/outputDebounce.d.ts.map +1 -0
- package/dist/utils/outputDebounce.js +30 -0
- package/dist/utils/outputDebounce.js.map +1 -0
- package/dist/utils/outputFlushTiming.d.ts +54 -0
- package/dist/utils/outputFlushTiming.d.ts.map +1 -0
- package/dist/utils/outputFlushTiming.js +48 -0
- package/dist/utils/outputFlushTiming.js.map +1 -0
- package/dist/utils/paginateList.d.ts +25 -0
- package/dist/utils/paginateList.d.ts.map +1 -0
- package/dist/utils/paginateList.js +32 -0
- package/dist/utils/paginateList.js.map +1 -0
- package/dist/utils/paneDiff.d.ts +55 -0
- package/dist/utils/paneDiff.d.ts.map +1 -0
- package/dist/utils/paneDiff.js +88 -0
- package/dist/utils/paneDiff.js.map +1 -0
- package/dist/utils/paneResizeGuard.d.ts +69 -0
- package/dist/utils/paneResizeGuard.d.ts.map +1 -0
- package/dist/utils/paneResizeGuard.js +91 -0
- package/dist/utils/paneResizeGuard.js.map +1 -0
- package/dist/utils/persistAdapterSessionIds.d.ts +39 -0
- package/dist/utils/persistAdapterSessionIds.d.ts.map +1 -0
- package/dist/utils/persistAdapterSessionIds.js +28 -0
- package/dist/utils/persistAdapterSessionIds.js.map +1 -0
- package/dist/utils/pinnedBannerSkipDecision.d.ts +44 -0
- package/dist/utils/pinnedBannerSkipDecision.d.ts.map +1 -0
- package/dist/utils/pinnedBannerSkipDecision.js +20 -0
- package/dist/utils/pinnedBannerSkipDecision.js.map +1 -0
- package/dist/utils/pollBackoff.d.ts +45 -0
- package/dist/utils/pollBackoff.d.ts.map +1 -0
- package/dist/utils/pollBackoff.js +44 -0
- package/dist/utils/pollBackoff.js.map +1 -0
- package/dist/utils/promptDelivery.d.ts +46 -0
- package/dist/utils/promptDelivery.d.ts.map +1 -0
- package/dist/utils/promptDelivery.js +49 -0
- package/dist/utils/promptDelivery.js.map +1 -0
- package/dist/utils/providerDisconnectPlan.d.ts +82 -0
- package/dist/utils/providerDisconnectPlan.d.ts.map +1 -0
- package/dist/utils/providerDisconnectPlan.js +110 -0
- package/dist/utils/providerDisconnectPlan.js.map +1 -0
- package/dist/utils/rateLimitLog.d.ts +48 -0
- package/dist/utils/rateLimitLog.d.ts.map +1 -0
- package/dist/utils/rateLimitLog.js +43 -0
- package/dist/utils/rateLimitLog.js.map +1 -0
- package/dist/utils/recentRelayWindow.d.ts +165 -0
- package/dist/utils/recentRelayWindow.d.ts.map +1 -0
- package/dist/utils/recentRelayWindow.js +284 -0
- package/dist/utils/recentRelayWindow.js.map +1 -0
- package/dist/utils/recvPreviewRedaction.d.ts +23 -0
- package/dist/utils/recvPreviewRedaction.d.ts.map +1 -0
- package/dist/utils/recvPreviewRedaction.js +39 -0
- package/dist/utils/recvPreviewRedaction.js.map +1 -0
- package/dist/utils/reminderFlow.d.ts +148 -0
- package/dist/utils/reminderFlow.d.ts.map +1 -0
- package/dist/utils/reminderFlow.js +122 -0
- package/dist/utils/reminderFlow.js.map +1 -0
- package/dist/utils/reminderScheduleText.d.ts +87 -0
- package/dist/utils/reminderScheduleText.d.ts.map +1 -0
- package/dist/utils/reminderScheduleText.js +135 -0
- package/dist/utils/reminderScheduleText.js.map +1 -0
- package/dist/utils/reminderWizard.d.ts +710 -0
- package/dist/utils/reminderWizard.d.ts.map +1 -0
- package/dist/utils/reminderWizard.js +1164 -0
- package/dist/utils/reminderWizard.js.map +1 -0
- package/dist/utils/replyQuote.d.ts +111 -0
- package/dist/utils/replyQuote.d.ts.map +1 -0
- package/dist/utils/replyQuote.js +122 -0
- package/dist/utils/replyQuote.js.map +1 -0
- package/dist/utils/resolveBinary.d.ts +25 -0
- package/dist/utils/resolveBinary.d.ts.map +1 -0
- package/dist/utils/resolveBinary.js +99 -0
- package/dist/utils/resolveBinary.js.map +1 -0
- package/dist/utils/retryAfterHeader.d.ts +7 -0
- package/dist/utils/retryAfterHeader.d.ts.map +1 -0
- package/dist/utils/retryAfterHeader.js +17 -0
- package/dist/utils/retryAfterHeader.js.map +1 -0
- package/dist/utils/rotatingJsonlFile.d.ts +40 -0
- package/dist/utils/rotatingJsonlFile.d.ts.map +1 -0
- package/dist/utils/rotatingJsonlFile.js +106 -0
- package/dist/utils/rotatingJsonlFile.js.map +1 -0
- package/dist/utils/rotatingLogFile.d.ts +25 -0
- package/dist/utils/rotatingLogFile.d.ts.map +1 -0
- package/dist/utils/rotatingLogFile.js +74 -0
- package/dist/utils/rotatingLogFile.js.map +1 -0
- package/dist/utils/sendRateTracker.d.ts +59 -0
- package/dist/utils/sendRateTracker.d.ts.map +1 -0
- package/dist/utils/sendRateTracker.js +144 -0
- package/dist/utils/sendRateTracker.js.map +1 -0
- package/dist/utils/serialQueue.d.ts +5 -0
- package/dist/utils/serialQueue.d.ts.map +1 -0
- package/dist/utils/serialQueue.js +14 -0
- package/dist/utils/serialQueue.js.map +1 -0
- package/dist/utils/sseStreamLifecycle.d.ts +32 -0
- package/dist/utils/sseStreamLifecycle.d.ts.map +1 -0
- package/dist/utils/sseStreamLifecycle.js +41 -0
- package/dist/utils/sseStreamLifecycle.js.map +1 -0
- package/dist/utils/startupReadiness.d.ts +119 -0
- package/dist/utils/startupReadiness.d.ts.map +1 -0
- package/dist/utils/startupReadiness.js +148 -0
- package/dist/utils/startupReadiness.js.map +1 -0
- package/dist/utils/statusFlushDecision.d.ts +18 -0
- package/dist/utils/statusFlushDecision.d.ts.map +1 -0
- package/dist/utils/statusFlushDecision.js +53 -0
- package/dist/utils/statusFlushDecision.js.map +1 -0
- package/dist/utils/subagentRender.d.ts +52 -0
- package/dist/utils/subagentRender.d.ts.map +1 -0
- package/dist/utils/subagentRender.js +66 -0
- package/dist/utils/subagentRender.js.map +1 -0
- package/dist/utils/subagentStatusRender.d.ts +90 -0
- package/dist/utils/subagentStatusRender.d.ts.map +1 -0
- package/dist/utils/subagentStatusRender.js +124 -0
- package/dist/utils/subagentStatusRender.js.map +1 -0
- package/dist/utils/telegramError.d.ts +2 -0
- package/dist/utils/telegramError.d.ts.map +1 -0
- package/dist/utils/telegramError.js +16 -0
- package/dist/utils/telegramError.js.map +1 -0
- package/dist/utils/terminalEmitPlan.d.ts +74 -0
- package/dist/utils/terminalEmitPlan.d.ts.map +1 -0
- package/dist/utils/terminalEmitPlan.js +86 -0
- package/dist/utils/terminalEmitPlan.js.map +1 -0
- package/dist/utils/thinkingRender.d.ts +74 -0
- package/dist/utils/thinkingRender.d.ts.map +1 -0
- package/dist/utils/thinkingRender.js +85 -0
- package/dist/utils/thinkingRender.js.map +1 -0
- package/dist/utils/threadStatusReport.d.ts +55 -0
- package/dist/utils/threadStatusReport.d.ts.map +1 -0
- package/dist/utils/threadStatusReport.js +65 -0
- package/dist/utils/threadStatusReport.js.map +1 -0
- package/dist/utils/threadToggle.d.ts +29 -0
- package/dist/utils/threadToggle.d.ts.map +1 -0
- package/dist/utils/threadToggle.js +39 -0
- package/dist/utils/threadToggle.js.map +1 -0
- package/dist/utils/timezone.d.ts +125 -0
- package/dist/utils/timezone.d.ts.map +1 -0
- package/dist/utils/timezone.js +278 -0
- package/dist/utils/timezone.js.map +1 -0
- package/dist/utils/tmuxExec.d.ts +61 -0
- package/dist/utils/tmuxExec.d.ts.map +1 -0
- package/dist/utils/tmuxExec.js +109 -0
- package/dist/utils/tmuxExec.js.map +1 -0
- package/dist/utils/tmuxSessionName.d.ts +34 -0
- package/dist/utils/tmuxSessionName.d.ts.map +1 -0
- package/dist/utils/tmuxSessionName.js +51 -0
- package/dist/utils/tmuxSessionName.js.map +1 -0
- package/dist/utils/toolResultRender.d.ts +61 -0
- package/dist/utils/toolResultRender.d.ts.map +1 -0
- package/dist/utils/toolResultRender.js +62 -0
- package/dist/utils/toolResultRender.js.map +1 -0
- package/dist/utils/topicRequest.d.ts +61 -0
- package/dist/utils/topicRequest.d.ts.map +1 -0
- package/dist/utils/topicRequest.js +68 -0
- package/dist/utils/topicRequest.js.map +1 -0
- package/dist/utils/topicView.d.ts +55 -0
- package/dist/utils/topicView.d.ts.map +1 -0
- package/dist/utils/topicView.js +56 -0
- package/dist/utils/topicView.js.map +1 -0
- package/dist/utils/transcribeAudio.d.ts +89 -0
- package/dist/utils/transcribeAudio.d.ts.map +1 -0
- package/dist/utils/transcribeAudio.js +249 -0
- package/dist/utils/transcribeAudio.js.map +1 -0
- package/dist/utils/transientFrames.d.ts +52 -0
- package/dist/utils/transientFrames.d.ts.map +1 -0
- package/dist/utils/transientFrames.js +41 -0
- package/dist/utils/transientFrames.js.map +1 -0
- package/dist/utils/typingActive.d.ts +35 -0
- package/dist/utils/typingActive.d.ts.map +1 -0
- package/dist/utils/typingActive.js +22 -0
- package/dist/utils/typingActive.js.map +1 -0
- package/dist/utils/typingLoopBackstop.d.ts +64 -0
- package/dist/utils/typingLoopBackstop.d.ts.map +1 -0
- package/dist/utils/typingLoopBackstop.js +68 -0
- package/dist/utils/typingLoopBackstop.js.map +1 -0
- package/dist/utils/verbosityRender.d.ts +18 -0
- package/dist/utils/verbosityRender.d.ts.map +1 -0
- package/dist/utils/verbosityRender.js +17 -0
- package/dist/utils/verbosityRender.js.map +1 -0
- package/dist/utils/wedgeRecovery.d.ts +57 -0
- package/dist/utils/wedgeRecovery.d.ts.map +1 -0
- package/dist/utils/wedgeRecovery.js +24 -0
- package/dist/utils/wedgeRecovery.js.map +1 -0
- package/dist/utils.d.ts +30 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +61 -0
- package/dist/utils.js.map +1 -0
- package/dist/validation.d.ts +113 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +226 -0
- package/dist/validation.js.map +1 -0
- package/dist/voiceQueue.d.ts +7 -0
- package/dist/voiceQueue.d.ts.map +1 -0
- package/dist/voiceQueue.js +33 -0
- package/dist/voiceQueue.js.map +1 -0
- package/examples/.env.example +17 -0
- package/examples/docker-compose.yml +36 -0
- package/package.json +83 -4
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Pure core of the `/reminders` wizard — the bot-LOCAL reminder
|
|
3
|
+
* feature: an inline-button flow that produces a {@link ScheduleSpec} with ZERO
|
|
4
|
+
* agent involvement (the `/schedule` path, by contrast, hands free text to the
|
|
5
|
+
* agent and lets it call the `schedule_*` MCP tools).
|
|
6
|
+
*
|
|
7
|
+
* Everything here is pure: no I/O, no `Date.now()` (every entry point takes the
|
|
8
|
+
* caller's `nowMs`), no telegraf, no `t()`. It returns STRUCTURED data —
|
|
9
|
+
* keyboard PLANS carrying i18n KEY names plus `callback_data`, and structured
|
|
10
|
+
* schedule descriptors — which `bot.ts` maps onto `Markup.inlineKeyboard` and
|
|
11
|
+
* `t(...)`. The split is mandatory rather than stylistic: user-facing text lives
|
|
12
|
+
* behind the ASYNC `t()` in 12 locales, so a pure layer that emitted prose could
|
|
13
|
+
* neither be localized nor unit-tested, and `bot.ts` itself cannot be imported
|
|
14
|
+
* by a test (its module-scope `parseEnv()` exits the process).
|
|
15
|
+
*
|
|
16
|
+
* Time math is HOST-LOCAL on purpose: the instance-wide `/timezone` setting is
|
|
17
|
+
* applied to `process.env.TZ` at boot, so plain `Date` arithmetic already IS the
|
|
18
|
+
* operator's clock and threading a zone through here would create a second
|
|
19
|
+
* source of truth.
|
|
20
|
+
*/
|
|
21
|
+
import type { ScheduleSpec } from '../scheduler/types';
|
|
22
|
+
/**
|
|
23
|
+
* @name ReminderRepeatKind
|
|
24
|
+
* @description How often a reminder fires. `once` is an absolute instant; the
|
|
25
|
+
* other four map onto the exactly four cron shapes `describeCron`
|
|
26
|
+
* (`scheduler/recurrence.ts`) renders as words — deliberate, so a
|
|
27
|
+
* wizard-created job never shows up as a raw cron expression anywhere.
|
|
28
|
+
*/
|
|
29
|
+
export declare const reminderRepeatKinds: readonly ["once", "daily", "weekdays", "weekly", "monthly"];
|
|
30
|
+
export type ReminderRepeatKind = (typeof reminderRepeatKinds)[number];
|
|
31
|
+
export declare function checkIsReminderRepeatKind(value: string): value is ReminderRepeatKind;
|
|
32
|
+
/**
|
|
33
|
+
* @name ReminderWizardStep
|
|
34
|
+
* @description Which screen the wizard is on. `dateGrid`, `dayOfMonthGrid`,
|
|
35
|
+
* `hour` and `minute` are the "other …" expansions of their quick-pick steps —
|
|
36
|
+
* separate steps rather than modes so `back` has one unambiguous meaning
|
|
37
|
+
* everywhere.
|
|
38
|
+
*/
|
|
39
|
+
export declare const reminderWizardSteps: readonly ["repeat", "date", "dateGrid", "weekday", "dayOfMonth", "dayOfMonthGrid", "time", "hour", "minute", "text"];
|
|
40
|
+
export type ReminderWizardStep = (typeof reminderWizardSteps)[number];
|
|
41
|
+
/** One wall-clock time of day, the wizard's time pick. */
|
|
42
|
+
export interface ReminderTimeOfDay {
|
|
43
|
+
hour: number;
|
|
44
|
+
minute: number;
|
|
45
|
+
}
|
|
46
|
+
/** Quick-pick times offered on the time step, in render order. */
|
|
47
|
+
export declare const reminderQuickTimes: readonly ReminderTimeOfDay[];
|
|
48
|
+
/**
|
|
49
|
+
* Granularity of the custom-minute grid. Five minutes keeps the grid at 12
|
|
50
|
+
* buttons (4 rows of 3) — a full 0–59 grid would need 60, which is past
|
|
51
|
+
* Telegram's comfortable keyboard size and unreadable on a phone.
|
|
52
|
+
*/
|
|
53
|
+
export declare const reminderMinuteStep = 5;
|
|
54
|
+
/** Cron `dow` values in Monday-first DISPLAY order (Sunday is `0` in cron). */
|
|
55
|
+
export declare const reminderWeekdayDisplayOrder: readonly number[];
|
|
56
|
+
/**
|
|
57
|
+
* @description i18n keys the keyboard plans reference. Collected in one object
|
|
58
|
+
* so the strings exist exactly once (and so the i18n scope has a single list to
|
|
59
|
+
* mirror into every locale); the pure layer never resolves them.
|
|
60
|
+
*/
|
|
61
|
+
export declare const reminderLabelKeys: {
|
|
62
|
+
readonly hubAdd: "reminders.addButton";
|
|
63
|
+
readonly hubList: "reminders.listButton";
|
|
64
|
+
readonly repeatOnce: "reminders.repeatOnceButton";
|
|
65
|
+
readonly repeatDaily: "reminders.repeatDailyButton";
|
|
66
|
+
readonly repeatWeekdays: "reminders.repeatWeekdaysButton";
|
|
67
|
+
readonly repeatWeekly: "reminders.repeatWeeklyButton";
|
|
68
|
+
readonly repeatMonthly: "reminders.repeatMonthlyButton";
|
|
69
|
+
readonly dateToday: "reminders.dateTodayButton";
|
|
70
|
+
readonly dateTomorrow: "reminders.dateTomorrowButton";
|
|
71
|
+
readonly dateOther: "reminders.dateOtherButton";
|
|
72
|
+
readonly dayOfMonthOther: "reminders.dayOfMonthOtherButton";
|
|
73
|
+
readonly timeOther: "reminders.timeOtherButton";
|
|
74
|
+
readonly back: "reminders.backButton";
|
|
75
|
+
readonly cancel: "reminders.cancelButton";
|
|
76
|
+
readonly listPrev: "reminders.listPrevButton";
|
|
77
|
+
readonly listNext: "reminders.listNextButton";
|
|
78
|
+
readonly listBackToHub: "reminders.listBackToHubButton";
|
|
79
|
+
readonly cardDelete: "reminders.cardDeleteButton";
|
|
80
|
+
readonly cardBackToList: "reminders.cardBackToListButton";
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Weekday button label keys, indexed by CRON `dow` value (Sunday = 0) so the
|
|
84
|
+
* display order and the stored value never drift apart.
|
|
85
|
+
*/
|
|
86
|
+
export declare const reminderWeekdayLabelKeys: readonly string[];
|
|
87
|
+
/**
|
|
88
|
+
* Repeat-kind → its button label key. Exported because the wizard's running
|
|
89
|
+
* summary ("Repeat: Every day") must name the pick with the SAME word its button
|
|
90
|
+
* carried — a second wording would read as a different option.
|
|
91
|
+
*/
|
|
92
|
+
export declare const reminderRepeatLabelKeys: Readonly<Record<ReminderRepeatKind, string>>;
|
|
93
|
+
/**
|
|
94
|
+
* @name ReminderButtonLabel
|
|
95
|
+
* @description A button's caption: either an i18n `key` (worded labels, which
|
|
96
|
+
* must be translated) or a locale-neutral `literal` (clock times, dates,
|
|
97
|
+
* numbers, a reminder's own name — translating those would be wrong).
|
|
98
|
+
*/
|
|
99
|
+
export type ReminderButtonLabel = {
|
|
100
|
+
kind: 'key';
|
|
101
|
+
key: string;
|
|
102
|
+
vars?: Readonly<Record<string, string | number>>;
|
|
103
|
+
} | {
|
|
104
|
+
kind: 'literal';
|
|
105
|
+
text: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* A list row — `🔔 <name> · <localized schedule>`. Carried as its PARTS rather
|
|
109
|
+
* than a `key` label because the schedule wording is itself a `t()` lookup, so
|
|
110
|
+
* the caption can only be composed where `t` lives; a `key` label's `vars` must
|
|
111
|
+
* already be resolved, which would force this layer to inline English.
|
|
112
|
+
*/
|
|
113
|
+
| {
|
|
114
|
+
kind: 'listRow';
|
|
115
|
+
name: string;
|
|
116
|
+
descriptor: ReminderScheduleDescriptor;
|
|
117
|
+
};
|
|
118
|
+
/** One inline button, as a plan `bot.ts` turns into `Markup.button.callback`. */
|
|
119
|
+
export interface ReminderButtonPlan {
|
|
120
|
+
label: ReminderButtonLabel;
|
|
121
|
+
callbackData: string;
|
|
122
|
+
}
|
|
123
|
+
/** Rows of buttons — the plan form of `Markup.inlineKeyboard`. */
|
|
124
|
+
export type ReminderKeyboardPlan = ReminderButtonPlan[][];
|
|
125
|
+
/**
|
|
126
|
+
* Wizard `callback_data` prefix. Every wizard button also bakes in the wizard
|
|
127
|
+
* id, because an inline keyboard stays tappable forever: without it a tap on a
|
|
128
|
+
* wizard the operator abandoned hours ago would feed picks into whatever wizard
|
|
129
|
+
* is live now (the same class of bug the `/disconnect` picker's per-message
|
|
130
|
+
* snapshot and `acl_skip_<fireAt>`'s baked instant guard against).
|
|
131
|
+
*/
|
|
132
|
+
export declare const reminderWizardCallbackPrefix = "rw_";
|
|
133
|
+
/**
|
|
134
|
+
* Max wizard-id length. Bounded so the longest producible `callback_data` is
|
|
135
|
+
* provably inside Telegram's 64-byte cap, and so a malformed id can never make
|
|
136
|
+
* the anchored matcher accept garbage.
|
|
137
|
+
*/
|
|
138
|
+
export declare const reminderWizardIdMaxLength = 12;
|
|
139
|
+
/**
|
|
140
|
+
* Anchored matcher for `bot.action(...)`. Built from the id-length constant so
|
|
141
|
+
* the wire format has exactly one definition. The id charset excludes `_`
|
|
142
|
+
* precisely because `_` is the field separator.
|
|
143
|
+
*/
|
|
144
|
+
export declare const reminderWizardCallbackRe: RegExp;
|
|
145
|
+
/**
|
|
146
|
+
* @name ReminderWizardAction
|
|
147
|
+
* @description A decoded wizard tap. `pick*` commits a value, `open*` descends
|
|
148
|
+
* into a custom grid, and `back`/`cancel` are valid on every step.
|
|
149
|
+
*/
|
|
150
|
+
export type ReminderWizardAction = {
|
|
151
|
+
kind: 'pickRepeat';
|
|
152
|
+
repeatKind: ReminderRepeatKind;
|
|
153
|
+
} | {
|
|
154
|
+
kind: 'openDateGrid';
|
|
155
|
+
} | {
|
|
156
|
+
kind: 'pickDate';
|
|
157
|
+
dateIso: string;
|
|
158
|
+
} | {
|
|
159
|
+
kind: 'pickWeekday';
|
|
160
|
+
weekday: number;
|
|
161
|
+
} | {
|
|
162
|
+
kind: 'openDayOfMonthGrid';
|
|
163
|
+
} | {
|
|
164
|
+
kind: 'pickDayOfMonth';
|
|
165
|
+
dayOfMonth: number;
|
|
166
|
+
} | {
|
|
167
|
+
kind: 'pickQuickTime';
|
|
168
|
+
hour: number;
|
|
169
|
+
minute: number;
|
|
170
|
+
} | {
|
|
171
|
+
kind: 'openHourGrid';
|
|
172
|
+
} | {
|
|
173
|
+
kind: 'pickHour';
|
|
174
|
+
hour: number;
|
|
175
|
+
} | {
|
|
176
|
+
kind: 'pickMinute';
|
|
177
|
+
minute: number;
|
|
178
|
+
} | {
|
|
179
|
+
kind: 'back';
|
|
180
|
+
} | {
|
|
181
|
+
kind: 'cancel';
|
|
182
|
+
};
|
|
183
|
+
/** A decoded wizard callback: which wizard it belongs to, and what it asks for. */
|
|
184
|
+
export interface ReminderWizardCallback {
|
|
185
|
+
wizardId: string;
|
|
186
|
+
action: ReminderWizardAction;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @description Mint a wizard id from the caller's clock: base36 of the epoch ms.
|
|
190
|
+
* Pure (the instant is an argument), 8–9 chars, and monotonically increasing —
|
|
191
|
+
* so a freshly opened wizard can never collide with the one it replaced, which
|
|
192
|
+
* is the whole point of the stale-tap guard.
|
|
193
|
+
*/
|
|
194
|
+
export declare function createReminderWizardId(nowMs: number): string;
|
|
195
|
+
export declare function buildReminderRepeatCallback(wizardId: string, repeatKind: ReminderRepeatKind): string;
|
|
196
|
+
export declare function buildReminderDateGridCallback(wizardId: string): string;
|
|
197
|
+
export declare function buildReminderDateCallback(wizardId: string, dateIso: string): string;
|
|
198
|
+
export declare function buildReminderWeekdayCallback(wizardId: string, weekday: number): string;
|
|
199
|
+
export declare function buildReminderDayOfMonthGridCallback(wizardId: string): string;
|
|
200
|
+
export declare function buildReminderDayOfMonthCallback(wizardId: string, dayOfMonth: number): string;
|
|
201
|
+
export declare function buildReminderQuickTimeCallback(wizardId: string, quickTimeIndex: number): string;
|
|
202
|
+
export declare function buildReminderHourGridCallback(wizardId: string): string;
|
|
203
|
+
export declare function buildReminderHourCallback(wizardId: string, hour: number): string;
|
|
204
|
+
export declare function buildReminderMinuteCallback(wizardId: string, minute: number): string;
|
|
205
|
+
export declare function buildReminderBackCallback(wizardId: string): string;
|
|
206
|
+
export declare function buildReminderCancelCallback(wizardId: string): string;
|
|
207
|
+
/**
|
|
208
|
+
* @description Decode one wizard `callback_data`, or `null` when it is not ours
|
|
209
|
+
* / malformed / carries an out-of-range argument.
|
|
210
|
+
*
|
|
211
|
+
* Range and calendar validation happens HERE rather than at apply time so an
|
|
212
|
+
* impossible value (weekday `9`, `2026-02-31`, a minute off the 5-minute grid)
|
|
213
|
+
* can never reach the spec assembler — a forged or truncated callback is
|
|
214
|
+
* indistinguishable from a stale one to the caller, and both must be inert.
|
|
215
|
+
*/
|
|
216
|
+
export declare function parseReminderWizardCallback(callbackData: string): ReminderWizardCallback | null;
|
|
217
|
+
/** Hub → open the add wizard. */
|
|
218
|
+
export declare const reminderAddCallback = "rmadd";
|
|
219
|
+
/** → the hub screen (from the list). */
|
|
220
|
+
export declare const reminderHubCallback = "rmhub";
|
|
221
|
+
/**
|
|
222
|
+
* Dismiss the reminders screen (hub / done card): the message is relabelled and
|
|
223
|
+
* its keyboard dropped. Declared here with the other flat `rm*` ids so the whole
|
|
224
|
+
* reminder callback namespace has ONE definition site and a future id cannot
|
|
225
|
+
* silently collide; the row it sits on is composed by the screen builder.
|
|
226
|
+
*/
|
|
227
|
+
export declare const reminderCloseCallback = "rmclose";
|
|
228
|
+
/** Anchored matchers for `bot.action(...)`, beside their builders. */
|
|
229
|
+
export declare const reminderListPageCallbackRe: RegExp;
|
|
230
|
+
export declare const reminderCardCallbackRe: RegExp;
|
|
231
|
+
/**
|
|
232
|
+
* The id charset mirrors `generateScheduleId` output — `slugify` lowercases and
|
|
233
|
+
* collapses everything else to hyphens, so lowercase alnum + `-` is the full
|
|
234
|
+
* alphabet a real reminder id can contain. A forged id still parses and simply
|
|
235
|
+
* resolves to `notFound` (see {@link getReminderDeleteTarget}).
|
|
236
|
+
*/
|
|
237
|
+
export declare const reminderDeleteCallbackRe: RegExp;
|
|
238
|
+
export declare function buildReminderListPageCallback(page: number): string;
|
|
239
|
+
/** A list row's button — the ABSOLUTE index into the thread's reminder list. */
|
|
240
|
+
export declare function buildReminderCardCallback(reminderIndex: number): string;
|
|
241
|
+
/**
|
|
242
|
+
* @description The card's delete button. Carries the reminder's OWN id, never a
|
|
243
|
+
* positional index: deletion is destructive and an old keyboard stays tappable,
|
|
244
|
+
* so an index resolved against a list that has since changed would delete a
|
|
245
|
+
* DIFFERENT reminder. A schedule id is `slugify(name)` (≤40) + `-` + a 6-char
|
|
246
|
+
* suffix, so prefix + id stays well inside the 64-byte cap.
|
|
247
|
+
*/
|
|
248
|
+
export declare function buildReminderDeleteCallback(reminderId: string): string;
|
|
249
|
+
export declare function parseReminderListPageCallback(callbackData: string): number | null;
|
|
250
|
+
export declare function parseReminderCardCallback(callbackData: string): number | null;
|
|
251
|
+
export declare function parseReminderDeleteCallback(callbackData: string): string | null;
|
|
252
|
+
/**
|
|
253
|
+
* @name ReminderWizardState
|
|
254
|
+
* @description Everything the wizard has collected. `bot.ts` keeps one of these
|
|
255
|
+
* per thread and re-renders the SAME message from it on every tap, so the whole
|
|
256
|
+
* flow occupies exactly one Telegram message.
|
|
257
|
+
*
|
|
258
|
+
* Only ONE of `dateIso` / `weekday` / `dayOfMonth` is ever set — which one is
|
|
259
|
+
* decided by `repeatKind` (`daily` and `weekdays` need none of them).
|
|
260
|
+
*/
|
|
261
|
+
export interface ReminderWizardState {
|
|
262
|
+
wizardId: string;
|
|
263
|
+
step: ReminderWizardStep;
|
|
264
|
+
repeatKind: ReminderRepeatKind | null;
|
|
265
|
+
/** Local calendar date `YYYY-MM-DD` for a `once` reminder. */
|
|
266
|
+
dateIso: string | null;
|
|
267
|
+
/** Cron `dow` (Sunday = 0) for a `weekly` reminder. */
|
|
268
|
+
weekday: number | null;
|
|
269
|
+
/** 1–31 for a `monthly` reminder. */
|
|
270
|
+
dayOfMonth: number | null;
|
|
271
|
+
/** Set on the `minute` step so its header can render `21:__`. */
|
|
272
|
+
hour: number | null;
|
|
273
|
+
minute: number | null;
|
|
274
|
+
/**
|
|
275
|
+
* The reminder text the operator already sent, retained so it is NEVER asked
|
|
276
|
+
* for twice. It is set only when a `once` instant went stale while they were
|
|
277
|
+
* typing: the wizard then re-asks the TIME alone (see
|
|
278
|
+
* {@link getReminderStateForRetime}), and the next time pick creates the
|
|
279
|
+
* reminder straight from this text.
|
|
280
|
+
*/
|
|
281
|
+
text: string | null;
|
|
282
|
+
}
|
|
283
|
+
/** A fresh wizard, parked on the repeat step with nothing picked. */
|
|
284
|
+
export declare function createReminderWizardState(wizardId: string): ReminderWizardState;
|
|
285
|
+
/**
|
|
286
|
+
* @description The step that follows the repeat pick. `daily` and `weekdays`
|
|
287
|
+
* need no second pick at all, so they SKIP straight to the time step — the one
|
|
288
|
+
* reason this is a function of the state rather than a fixed sequence.
|
|
289
|
+
*/
|
|
290
|
+
export declare function getReminderStepAfterRepeat(repeatKind: ReminderRepeatKind): ReminderWizardStep;
|
|
291
|
+
/**
|
|
292
|
+
* @description Where `back` lands, or `null` for "leave the wizard and show the
|
|
293
|
+
* hub" (which is what back means on the first step).
|
|
294
|
+
*
|
|
295
|
+
* Reads the repeat kind because the step BEFORE the time step differs per kind
|
|
296
|
+
* — and is the repeat step itself for `daily` / `weekdays`, which have no second
|
|
297
|
+
* step to return to.
|
|
298
|
+
*/
|
|
299
|
+
export declare function getReminderPreviousStep(state: ReminderWizardState): ReminderWizardStep | null;
|
|
300
|
+
/**
|
|
301
|
+
* @description The state as it must look when the wizard RE-ENTERS `step`: the
|
|
302
|
+
* picks owned by that step and by every later step are cleared, so stepping back
|
|
303
|
+
* into a screen never silently keeps the value the operator came to change.
|
|
304
|
+
*
|
|
305
|
+
* The three date/weekday/day-of-month fields are cleared together because they
|
|
306
|
+
* are mutually exclusive alternatives of the same (second) step.
|
|
307
|
+
*
|
|
308
|
+
* An already-captured `text` is the ONE thing no re-entry clears: the operator
|
|
309
|
+
* types it exactly once, and re-picking the schedule is not a reason to ask again.
|
|
310
|
+
*/
|
|
311
|
+
export declare function getReminderStateForStep(state: ReminderWizardState, step: ReminderWizardStep): ReminderWizardState;
|
|
312
|
+
/**
|
|
313
|
+
* @description The state to re-render when the reminder text is already in hand
|
|
314
|
+
* but the picked `once` instant has gone by while the operator was typing: back on
|
|
315
|
+
* the TIME step, with the text RETAINED.
|
|
316
|
+
*
|
|
317
|
+
* Retaining it is the whole point. The flow is buttons precisely so the operator
|
|
318
|
+
* types exactly once, and re-entering the text step to collect the same sentence
|
|
319
|
+
* again defeats that — so only the time is re-asked, and the next time pick creates
|
|
320
|
+
* the reminder outright (see {@link getReminderActionAfterTime}).
|
|
321
|
+
*/
|
|
322
|
+
export declare function getReminderStateForRetime(state: ReminderWizardState, text: string): ReminderWizardState;
|
|
323
|
+
/**
|
|
324
|
+
* @name ReminderWizardErrorCode
|
|
325
|
+
* @description Machine-readable reasons a step cannot be completed, so `bot.ts`
|
|
326
|
+
* picks the i18n key. `pastTime` is the load-bearing one: «today» plus a time
|
|
327
|
+
* that has already gone by must SAY so on the time step, never silently roll the
|
|
328
|
+
* reminder to tomorrow (a locked product decision — a silent roll means the
|
|
329
|
+
* operator is reminded 24h off what they asked for).
|
|
330
|
+
*
|
|
331
|
+
* `invalidDate` and `invalidTime` are deliberately separate: a date that does not
|
|
332
|
+
* exist sends the operator back to the DATE step, whereas a wall-clock time a DST
|
|
333
|
+
* spring-forward skips happens on a perfectly good date and must send them back to
|
|
334
|
+
* the TIME step — one code for both told them to re-pick a date that was fine.
|
|
335
|
+
*/
|
|
336
|
+
export declare const reminderWizardErrorCodes: readonly ["pastTime", "invalidDate", "invalidTime", "textTooLong"];
|
|
337
|
+
export type ReminderWizardErrorCode = (typeof reminderWizardErrorCodes)[number];
|
|
338
|
+
/**
|
|
339
|
+
* The subset a SPEC assembly can fail with. `textTooLong` is raised when the
|
|
340
|
+
* reminder text is captured, long after the spec is decidable, so it is excluded
|
|
341
|
+
* here rather than left representable in a result that can never carry it.
|
|
342
|
+
*/
|
|
343
|
+
export type ReminderSpecErrorCode = Exclude<ReminderWizardErrorCode, 'textTooLong'>;
|
|
344
|
+
/**
|
|
345
|
+
* @name ReminderWizardTransition
|
|
346
|
+
* @description What the caller must do after a tap.
|
|
347
|
+
* - `render` — re-render `state.step` into the same message.
|
|
348
|
+
* - `awaitText` — every pick is in; arm the "send me the reminder text" step
|
|
349
|
+
* (a typed message or a voice note).
|
|
350
|
+
* - `createNow` — every pick is in AND the text is already held (the operator
|
|
351
|
+
* sent it before the picked instant went stale): create the
|
|
352
|
+
* reminder immediately, without re-entering the text step.
|
|
353
|
+
* - `cancelled` — terminal; drop the wizard.
|
|
354
|
+
* - `backToHub` — leave the wizard, show the hub.
|
|
355
|
+
* - `error` — re-render `state.step` WITH the error; nothing was committed.
|
|
356
|
+
* - `expired` — a stale/foreign tap: answer "expired" and change NOTHING.
|
|
357
|
+
*/
|
|
358
|
+
export type ReminderWizardTransition = {
|
|
359
|
+
kind: 'render';
|
|
360
|
+
state: ReminderWizardState;
|
|
361
|
+
} | {
|
|
362
|
+
kind: 'awaitText';
|
|
363
|
+
state: ReminderWizardState;
|
|
364
|
+
} | {
|
|
365
|
+
kind: 'createNow';
|
|
366
|
+
state: ReminderWizardState;
|
|
367
|
+
spec: ScheduleSpec;
|
|
368
|
+
text: string;
|
|
369
|
+
} | {
|
|
370
|
+
kind: 'cancelled';
|
|
371
|
+
} | {
|
|
372
|
+
kind: 'backToHub';
|
|
373
|
+
} | {
|
|
374
|
+
kind: 'error';
|
|
375
|
+
code: ReminderWizardErrorCode;
|
|
376
|
+
state: ReminderWizardState;
|
|
377
|
+
} | {
|
|
378
|
+
kind: 'expired';
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* @name ReminderAfterTimeAction
|
|
382
|
+
* @description What the wizard does once a time pick has been validated: ASK for
|
|
383
|
+
* the reminder text (step 4, the normal first pass), or CREATE straight away
|
|
384
|
+
* because the state already carries it.
|
|
385
|
+
*/
|
|
386
|
+
export type ReminderAfterTimeAction = {
|
|
387
|
+
kind: 'askText';
|
|
388
|
+
} | {
|
|
389
|
+
kind: 'createNow';
|
|
390
|
+
text: string;
|
|
391
|
+
};
|
|
392
|
+
/**
|
|
393
|
+
* @description Decide whether the text step is still owed. A state that HOLDS the
|
|
394
|
+
* text is past it: the operator sent it, the picked `once` instant then went stale
|
|
395
|
+
* while they typed, and this is the replacement time pick — so the reminder is
|
|
396
|
+
* created from the text already in hand. Re-asking here would make them type the
|
|
397
|
+
* same note twice, which is exactly what the button flow exists to avoid.
|
|
398
|
+
*/
|
|
399
|
+
export declare function getReminderActionAfterTime(state: ReminderWizardState): ReminderAfterTimeAction;
|
|
400
|
+
/**
|
|
401
|
+
* @description Apply one tapped `callback_data` to a wizard state.
|
|
402
|
+
*
|
|
403
|
+
* Takes the RAW callback string (not a pre-parsed action) so the stale-tap guard
|
|
404
|
+
* cannot be forgotten at a call site: a tap whose baked wizard id is not this
|
|
405
|
+
* wizard's — or that belongs to a step this wizard has left — returns `expired`
|
|
406
|
+
* and mutates nothing.
|
|
407
|
+
*/
|
|
408
|
+
export declare function applyReminderWizardCallback(input: {
|
|
409
|
+
state: ReminderWizardState;
|
|
410
|
+
callbackData: string;
|
|
411
|
+
nowMs: number;
|
|
412
|
+
}): ReminderWizardTransition;
|
|
413
|
+
/**
|
|
414
|
+
* @description Build the keyboard plan for the wizard's CURRENT step.
|
|
415
|
+
*
|
|
416
|
+
* One dispatcher rather than a builder per step because `bot.ts` renders
|
|
417
|
+
* whatever `state.step` says after every transition — it never needs to know
|
|
418
|
+
* which screen it is drawing. `nowMs` is required because the date step's
|
|
419
|
+
* buttons are dated at RENDER time (see {@link buildReminderDateCallback}).
|
|
420
|
+
*/
|
|
421
|
+
export declare function buildReminderStepKeyboard(input: {
|
|
422
|
+
state: ReminderWizardState;
|
|
423
|
+
nowMs: number;
|
|
424
|
+
}): ReminderKeyboardPlan;
|
|
425
|
+
/**
|
|
426
|
+
* @name ReminderSchedulePicks
|
|
427
|
+
* @description A COMPLETE pick set — what the wizard state holds once every
|
|
428
|
+
* screen has been answered. A union discriminated by `repeatKind` rather than
|
|
429
|
+
* one shape with optional fields, so "weekly without a weekday" is not a
|
|
430
|
+
* representable state and the assembler needs no defensive branches.
|
|
431
|
+
*/
|
|
432
|
+
export type ReminderSchedulePicks = {
|
|
433
|
+
repeatKind: 'once';
|
|
434
|
+
dateIso: string;
|
|
435
|
+
hour: number;
|
|
436
|
+
minute: number;
|
|
437
|
+
} | {
|
|
438
|
+
repeatKind: 'daily';
|
|
439
|
+
hour: number;
|
|
440
|
+
minute: number;
|
|
441
|
+
} | {
|
|
442
|
+
repeatKind: 'weekdays';
|
|
443
|
+
hour: number;
|
|
444
|
+
minute: number;
|
|
445
|
+
}
|
|
446
|
+
/** `weekday` is a cron `dow` value (Sunday = 0). */
|
|
447
|
+
| {
|
|
448
|
+
repeatKind: 'weekly';
|
|
449
|
+
weekday: number;
|
|
450
|
+
hour: number;
|
|
451
|
+
minute: number;
|
|
452
|
+
} | {
|
|
453
|
+
repeatKind: 'monthly';
|
|
454
|
+
dayOfMonth: number;
|
|
455
|
+
hour: number;
|
|
456
|
+
minute: number;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* @description Lift a complete pick set out of a wizard state, or `null` when a
|
|
460
|
+
* pick the chosen repeat kind needs is still missing.
|
|
461
|
+
*/
|
|
462
|
+
export declare function getReminderPicksFromState(state: ReminderWizardState): ReminderSchedulePicks | null;
|
|
463
|
+
/** Outcome of {@link buildReminderSpec} — a typed result, never a throw. */
|
|
464
|
+
export type ReminderSpecResult = {
|
|
465
|
+
ok: true;
|
|
466
|
+
spec: ScheduleSpec;
|
|
467
|
+
} | {
|
|
468
|
+
ok: false;
|
|
469
|
+
code: ReminderSpecErrorCode;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* @description Turn a complete pick set into a {@link ScheduleSpec}.
|
|
473
|
+
*
|
|
474
|
+
* The four recurring kinds emit exactly the cron shapes `describeCron`
|
|
475
|
+
* (`scheduler/recurrence.ts`) renders as words — `m h * * *`, `m h * * 1-5`,
|
|
476
|
+
* `m h * * d`, `m h D * *`. That is why the wizard offers these five options and
|
|
477
|
+
* no others: any further shape would surface to the operator as a raw cron
|
|
478
|
+
* expression. None of them can fire more often than daily, so
|
|
479
|
+
* `minFireIntervalMs` is unreachable by construction.
|
|
480
|
+
*
|
|
481
|
+
* `once` is assembled in HOST-LOCAL time (the operator's `/timezone` is already
|
|
482
|
+
* applied to `process.env.TZ`) and stored as a UTC ISO instant, which
|
|
483
|
+
* `new Date(...)` round-trips exactly.
|
|
484
|
+
*/
|
|
485
|
+
export declare function buildReminderSpec(input: {
|
|
486
|
+
picks: ReminderSchedulePicks;
|
|
487
|
+
nowMs: number;
|
|
488
|
+
}): ReminderSpecResult;
|
|
489
|
+
/**
|
|
490
|
+
* @name ReminderScheduleDescriptor
|
|
491
|
+
* @description A persisted spec, decomposed into the parts a LOCALIZED
|
|
492
|
+
* rendering needs (list rows, the card). `describeSchedule` in
|
|
493
|
+
* `scheduler/recurrence.ts` cannot serve this UI: it is English-only by design
|
|
494
|
+
* (it is interpolated INTO i18n templates), while the reminder screens exist in
|
|
495
|
+
* 12 locales.
|
|
496
|
+
*
|
|
497
|
+
* `raw` is the honest fallback for anything the wizard cannot create — an
|
|
498
|
+
* agent-made `schedule_*` job may carry any cron shape, including an N-times
|
|
499
|
+
* budget this descriptor has no field for. Its `text` is the bare cron
|
|
500
|
+
* expression, rendered verbatim rather than mistranslated into a shape it is not.
|
|
501
|
+
*/
|
|
502
|
+
export type ReminderScheduleDescriptor = {
|
|
503
|
+
kind: 'daily';
|
|
504
|
+
time: string;
|
|
505
|
+
} | {
|
|
506
|
+
kind: 'weekdays';
|
|
507
|
+
time: string;
|
|
508
|
+
} | {
|
|
509
|
+
kind: 'weekly';
|
|
510
|
+
weekday: number;
|
|
511
|
+
time: string;
|
|
512
|
+
} | {
|
|
513
|
+
kind: 'monthly';
|
|
514
|
+
dayOfMonth: number;
|
|
515
|
+
time: string;
|
|
516
|
+
} | {
|
|
517
|
+
kind: 'once';
|
|
518
|
+
dateIso: string;
|
|
519
|
+
time: string;
|
|
520
|
+
} | {
|
|
521
|
+
kind: 'raw';
|
|
522
|
+
text: string;
|
|
523
|
+
};
|
|
524
|
+
/** Decompose a spec for localized rendering; see {@link ReminderScheduleDescriptor}. */
|
|
525
|
+
export declare function getReminderScheduleDescriptor(spec: ScheduleSpec): ReminderScheduleDescriptor;
|
|
526
|
+
/**
|
|
527
|
+
* Longest reminder TEXT accepted from the operator. The text is interpolated into
|
|
528
|
+
* the fire announcement and, alongside the schedule and next-run lines, into the
|
|
529
|
+
* card and the created-screen — all of which are single Telegram messages under the
|
|
530
|
+
* 4096-character cap. The bound therefore has to leave generous headroom for the
|
|
531
|
+
* surrounding template in ANY of the 12 locales, which is why it sits far below
|
|
532
|
+
* that cap rather than just under it. Past it the text is REJECTED, never
|
|
533
|
+
* truncated: it is the operator's own words, and this all-buttons flow exists so
|
|
534
|
+
* they type it exactly once.
|
|
535
|
+
*/
|
|
536
|
+
export declare const reminderTextMaxLength = 1000;
|
|
537
|
+
/**
|
|
538
|
+
* Longest reminder name kept, INCLUDING the ellipsis. Matches `slugify`'s
|
|
539
|
+
* `slugMaxLength` so the derived name and the id minted from it stay in step.
|
|
540
|
+
*/
|
|
541
|
+
export declare const reminderNameMaxLength = 40;
|
|
542
|
+
/**
|
|
543
|
+
* Name used when the body text carries no letter or digit (whitespace only,
|
|
544
|
+
* punctuation only, emoji only). A stable fallback rather than an empty row —
|
|
545
|
+
* mirrors `slugify`'s `'job'` guarantee, which the id generator relies on.
|
|
546
|
+
*/
|
|
547
|
+
export declare const reminderNameFallback = "reminder";
|
|
548
|
+
/**
|
|
549
|
+
* Longest reminder text echoed back in the wizard's running summary. The summary
|
|
550
|
+
* exists so the operator can SEE what was kept after a stale-instant retry — not to
|
|
551
|
+
* reprint the whole note, which would push the step's question off the screen.
|
|
552
|
+
*/
|
|
553
|
+
export declare const reminderSummaryTextMaxLength = 80;
|
|
554
|
+
/**
|
|
555
|
+
* @description `text` shortened to at most `maxLength` characters — the ellipsis
|
|
556
|
+
* counted INSIDE that budget — cut on a word boundary when there is one. `''` when
|
|
557
|
+
* the budget cannot even hold the ellipsis, leaving the caller to decide what an
|
|
558
|
+
* empty result means.
|
|
559
|
+
*
|
|
560
|
+
* Shared by the derived reminder name, the wizard's text summary and the list-row
|
|
561
|
+
* button caption, so they shorten identically instead of growing three slightly
|
|
562
|
+
* different cuts.
|
|
563
|
+
*/
|
|
564
|
+
export declare function getShortenedText(text: string, maxLength: number): string;
|
|
565
|
+
/**
|
|
566
|
+
* @description Derive a reminder's display name from its body text. The wizard
|
|
567
|
+
* deliberately never ASKS for a name — one less typing step — so the list rows
|
|
568
|
+
* and the card show the first words of the reminder itself.
|
|
569
|
+
*
|
|
570
|
+
* Whitespace is collapsed (a multi-line body must not render as a ragged row) and
|
|
571
|
+
* the result never exceeds {@link reminderNameMaxLength}.
|
|
572
|
+
*/
|
|
573
|
+
export declare function getReminderNameFromText(text: string): string;
|
|
574
|
+
/** Reminders listed per page. One row each, so the keyboard stays phone-sized. */
|
|
575
|
+
export declare const reminderListPageSize = 8;
|
|
576
|
+
/**
|
|
577
|
+
* @name ReminderListRow
|
|
578
|
+
* @description One reminder as the list/card screens consume it: its id (what a
|
|
579
|
+
* delete tap carries), its derived display name, and its schedule decomposed for
|
|
580
|
+
* localized rendering.
|
|
581
|
+
*/
|
|
582
|
+
export interface ReminderListRow {
|
|
583
|
+
id: string;
|
|
584
|
+
name: string;
|
|
585
|
+
descriptor: ReminderScheduleDescriptor;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* @description The hub keyboard: «add» and «list» SIDE BY SIDE on one row (the
|
|
589
|
+
* locked layout — «close» is a separate row the caller appends). «list» is drawn
|
|
590
|
+
* only when there is something to list; a list button that opens an empty screen is
|
|
591
|
+
* a dead end. The count rides as a label var so the caller can render "📋 List (3)".
|
|
592
|
+
*
|
|
593
|
+
* `isAddOffered` is the per-thread REMINDER cap (counted apart from the agent's
|
|
594
|
+
* schedule cap): at the cap there is nothing an «add» tap could create, so the
|
|
595
|
+
* button is not drawn (same dead-end reasoning as the list button). The caller
|
|
596
|
+
* owns that comparison — the cap lives in the scheduler store, not here — and it
|
|
597
|
+
* defaults to offering «add».
|
|
598
|
+
*/
|
|
599
|
+
export declare function buildReminderHubKeyboard(reminderCount: number, options?: {
|
|
600
|
+
isAddOffered?: boolean;
|
|
601
|
+
}): ReminderKeyboardPlan;
|
|
602
|
+
/**
|
|
603
|
+
* @name ReminderListPlan
|
|
604
|
+
* @description One rendered list page. `currentPage` is already CLAMPED by
|
|
605
|
+
* {@link paginateList}, so a stale page index lands on the last real page
|
|
606
|
+
* instead of rendering an empty body.
|
|
607
|
+
*/
|
|
608
|
+
export interface ReminderListPlan {
|
|
609
|
+
/** The reminders visible on this page, in list order. */
|
|
610
|
+
rows: ReminderListRow[];
|
|
611
|
+
/** Zero-based, clamped. */
|
|
612
|
+
currentPage: number;
|
|
613
|
+
totalPages: number;
|
|
614
|
+
hasPrev: boolean;
|
|
615
|
+
hasNext: boolean;
|
|
616
|
+
keyboard: ReminderKeyboardPlan;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* @description Build a list page: one row per reminder, then the prev/next
|
|
620
|
+
* navigation (only the arrows the page can actually use), then back-to-hub.
|
|
621
|
+
*
|
|
622
|
+
* A row's CAPTION is the reminder's name plus its schedule — planned as a `listRow`
|
|
623
|
+
* label, because the schedule has to be localized and only the caller holds `t`.
|
|
624
|
+
* The whole list therefore rides the buttons, and the message text stays a short
|
|
625
|
+
* header (the split the `/model` picker uses).
|
|
626
|
+
*
|
|
627
|
+
* Row buttons carry the ABSOLUTE index into `rows` — pagination is the one
|
|
628
|
+
* index-based thing here, and opening a card is non-destructive. The card's
|
|
629
|
+
* delete button carries the reminder's own id instead (see
|
|
630
|
+
* {@link buildReminderDeleteCallback}).
|
|
631
|
+
*/
|
|
632
|
+
export declare function buildReminderListPlan(rows: readonly ReminderListRow[], page: number): ReminderListPlan;
|
|
633
|
+
/**
|
|
634
|
+
* @description Resolve a tapped list row back to its reminder, or `null` when
|
|
635
|
+
* the index no longer resolves (the list shrank between render and tap). Stale
|
|
636
|
+
* keyboards stay tappable forever in Telegram, so an out-of-range index must
|
|
637
|
+
* answer "expired" rather than open a neighbour — same contract as
|
|
638
|
+
* `getTimezoneAt`.
|
|
639
|
+
*/
|
|
640
|
+
export declare function getReminderRowAt(rows: readonly ReminderListRow[], reminderIndex: number): ReminderListRow | null;
|
|
641
|
+
/**
|
|
642
|
+
* @description The list page a row at `reminderIndex` was rendered on — what the
|
|
643
|
+
* card's back button returns to. Derived from the index rather than carried in
|
|
644
|
+
* the callback, so the card needs no extra state to come back to where it was
|
|
645
|
+
* opened from.
|
|
646
|
+
*/
|
|
647
|
+
export declare function getReminderCardBackPage(reminderIndex: number): number;
|
|
648
|
+
/**
|
|
649
|
+
* @name ReminderCardPlan
|
|
650
|
+
* @description One reminder's card: the reminder itself plus a keyboard with
|
|
651
|
+
* delete (id-bound) and a back button that returns to the LIST PAGE the row was
|
|
652
|
+
* on — derived from its index, so no extra state has to be carried.
|
|
653
|
+
*/
|
|
654
|
+
export interface ReminderCardPlan {
|
|
655
|
+
row: ReminderListRow;
|
|
656
|
+
listPage: number;
|
|
657
|
+
keyboard: ReminderKeyboardPlan;
|
|
658
|
+
}
|
|
659
|
+
/** Build a reminder's card, or `null` for a stale row index. */
|
|
660
|
+
export declare function buildReminderCardPlan(rows: readonly ReminderListRow[], reminderIndex: number): ReminderCardPlan | null;
|
|
661
|
+
/**
|
|
662
|
+
* @name ReminderDeleteResolution
|
|
663
|
+
* @description Outcome of resolving a delete tap. `notFound` covers an already
|
|
664
|
+
* deleted reminder (a double tap, or an old card left open) — the caller says
|
|
665
|
+
* "gone" instead of deleting whatever now sits where it used to be.
|
|
666
|
+
*/
|
|
667
|
+
export type ReminderDeleteResolution = {
|
|
668
|
+
kind: 'found';
|
|
669
|
+
row: ReminderListRow;
|
|
670
|
+
} | {
|
|
671
|
+
kind: 'notFound';
|
|
672
|
+
};
|
|
673
|
+
/** Resolve a delete tap by the reminder ID baked into its `callback_data`. */
|
|
674
|
+
export declare function getReminderDeleteTarget(rows: readonly ReminderListRow[], reminderId: string): ReminderDeleteResolution;
|
|
675
|
+
/** `{hour: 9, minute: 0}` → `"09:00"`. Locale-neutral, hence a literal label. */
|
|
676
|
+
export declare function formatReminderTime(time: ReminderTimeOfDay): string;
|
|
677
|
+
/** A local `Date` → its calendar date as `YYYY-MM-DD` (never UTC-shifted). */
|
|
678
|
+
export declare function formatReminderDateIso(date: Date): string;
|
|
679
|
+
/** Date-grid button label: `DD.MM` — digits only, so no locale is implied. */
|
|
680
|
+
export declare function formatReminderDayMonth(date: Date): string;
|
|
681
|
+
/**
|
|
682
|
+
* @description The local calendar date `offsetDays` after the day containing
|
|
683
|
+
* `nowMs`. Built from the date PARTS rather than by adding 24h so a DST
|
|
684
|
+
* transition cannot shift the result into the neighbouring day.
|
|
685
|
+
*/
|
|
686
|
+
export declare function getLocalDateAtDayOffset(nowMs: number, offsetDays: number): Date;
|
|
687
|
+
/**
|
|
688
|
+
* @name ReminderInstantResult
|
|
689
|
+
* @description The resolved `once` instant, or WHICH of the two picks is at fault.
|
|
690
|
+
* Two failure codes rather than one because they send the operator to different
|
|
691
|
+
* screens (see {@link ReminderWizardErrorCode}).
|
|
692
|
+
*/
|
|
693
|
+
export type ReminderInstantResult = {
|
|
694
|
+
ok: true;
|
|
695
|
+
instant: Date;
|
|
696
|
+
} | {
|
|
697
|
+
ok: false;
|
|
698
|
+
code: 'invalidDate' | 'invalidTime';
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* @description The local instant a `once` reminder fires at.
|
|
702
|
+
*
|
|
703
|
+
* The calendar date is probed on its OWN midnight instant, independently of the
|
|
704
|
+
* picked time, so the two causes of failure stay distinguishable: `2026-02-31` is
|
|
705
|
+
* no date at all (`invalidDate`), while `02:30` on a spring-forward day is a real
|
|
706
|
+
* date whose wall clock simply skips that hour (`invalidTime`) — the JS `Date`
|
|
707
|
+
* constructor silently shifts such a time forward instead of refusing it.
|
|
708
|
+
*/
|
|
709
|
+
export declare function createReminderInstant(dateIso: string, hour: number, minute: number): ReminderInstantResult;
|
|
710
|
+
//# sourceMappingURL=reminderWizard.d.ts.map
|