charness 3.9.1 → 3.11.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/CHANGELOG.md +155 -0
- package/DEVELOPMENT.md +4 -1
- package/README.md +2 -1
- package/SETUP.md +6 -4
- package/agent-plugin/README.md +2 -2
- package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +1 -1
- package/agent-plugin/skills/charness-manager/SKILL.md +11 -6
- package/dist/bot.d.ts +27 -18
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +390 -231
- package/dist/bot.js.map +1 -1
- package/dist/connectors/jira/adf.d.ts.map +1 -1
- package/dist/connectors/jira/adf.js +2 -3
- package/dist/connectors/jira/adf.js.map +1 -1
- package/dist/connectors/telegram/commands/botCore.d.ts +17 -0
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.js +3 -3
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
- package/dist/connectors/telegram/commands/runners.d.ts +10 -1
- package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.js +85 -17
- package/dist/connectors/telegram/commands/runners.js.map +1 -1
- package/dist/connectors/telegram/foldedMessage.d.ts +24 -0
- package/dist/connectors/telegram/foldedMessage.d.ts.map +1 -0
- package/dist/connectors/telegram/foldedMessage.js +39 -0
- package/dist/connectors/telegram/foldedMessage.js.map +1 -0
- package/dist/connectors/telegram/inbound.d.ts +24 -1
- package/dist/connectors/telegram/inbound.d.ts.map +1 -1
- package/dist/connectors/telegram/inbound.js +77 -1
- package/dist/connectors/telegram/inbound.js.map +1 -1
- package/dist/connectors/telegram/renderAgentHtml.d.ts +15 -0
- package/dist/connectors/telegram/renderAgentHtml.d.ts.map +1 -1
- package/dist/connectors/telegram/renderAgentHtml.js +11 -1
- package/dist/connectors/telegram/renderAgentHtml.js.map +1 -1
- package/dist/connectors/telegram/runnerLinkNotices.d.ts +24 -0
- package/dist/connectors/telegram/runnerLinkNotices.d.ts.map +1 -0
- package/dist/connectors/telegram/runnerLinkNotices.js +95 -0
- package/dist/connectors/telegram/runnerLinkNotices.js.map +1 -0
- package/dist/connectors/telegram/runnerPairingMessages.d.ts +9 -0
- package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
- package/dist/connectors/telegram/runnerPairingMessages.js +17 -1
- package/dist/connectors/telegram/runnerPairingMessages.js.map +1 -1
- package/dist/connectors/telegram/unpinMessages.d.ts +12 -0
- package/dist/connectors/telegram/unpinMessages.d.ts.map +1 -0
- package/dist/connectors/telegram/unpinMessages.js +44 -0
- package/dist/connectors/telegram/unpinMessages.js.map +1 -0
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +30 -3
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +30 -3
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +30 -3
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +30 -3
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +30 -3
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +30 -3
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +30 -3
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +30 -3
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +30 -3
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +30 -3
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +30 -3
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +30 -3
- package/dist/i18n/zh.js.map +1 -1
- package/dist/outputTrace.d.ts +6 -0
- package/dist/outputTrace.d.ts.map +1 -1
- package/dist/outputTrace.js +15 -9
- package/dist/outputTrace.js.map +1 -1
- package/dist/rateLimiter.d.ts +3 -1
- package/dist/rateLimiter.d.ts.map +1 -1
- package/dist/rateLimiter.js +3 -1
- package/dist/rateLimiter.js.map +1 -1
- package/dist/remoteRun/cliArgs.d.ts +6 -1
- package/dist/remoteRun/cliArgs.d.ts.map +1 -1
- package/dist/remoteRun/cliArgs.js +39 -2
- package/dist/remoteRun/cliArgs.js.map +1 -1
- package/dist/remoteRun/exitCodes.d.ts +12 -2
- package/dist/remoteRun/exitCodes.d.ts.map +1 -1
- package/dist/remoteRun/exitCodes.js +3 -0
- package/dist/remoteRun/exitCodes.js.map +1 -1
- package/dist/remoteRun/foreground.d.ts +13 -0
- package/dist/remoteRun/foreground.d.ts.map +1 -1
- package/dist/remoteRun/foreground.js +15 -2
- package/dist/remoteRun/foreground.js.map +1 -1
- package/dist/remoteRun/heldBackNotice.d.ts +7 -0
- package/dist/remoteRun/heldBackNotice.d.ts.map +1 -0
- package/dist/remoteRun/heldBackNotice.js +92 -0
- package/dist/remoteRun/heldBackNotice.js.map +1 -0
- package/dist/remoteRun/interrupts.d.ts +6 -2
- package/dist/remoteRun/interrupts.d.ts.map +1 -1
- package/dist/remoteRun/interrupts.js +18 -3
- package/dist/remoteRun/interrupts.js.map +1 -1
- package/dist/remoteRun/leaseTiming.d.ts +1 -2
- package/dist/remoteRun/leaseTiming.d.ts.map +1 -1
- package/dist/remoteRun/leaseTiming.js +3 -17
- package/dist/remoteRun/leaseTiming.js.map +1 -1
- package/dist/remoteRun/output.d.ts +16 -1
- package/dist/remoteRun/output.d.ts.map +1 -1
- package/dist/remoteRun/output.js +28 -2
- package/dist/remoteRun/output.js.map +1 -1
- package/dist/remoteRun/probe.d.ts +40 -2
- package/dist/remoteRun/probe.d.ts.map +1 -1
- package/dist/remoteRun/probe.js +58 -2
- package/dist/remoteRun/probe.js.map +1 -1
- package/dist/remoteRun/project.d.ts +2 -2
- package/dist/remoteRun/project.d.ts.map +1 -1
- package/dist/remoteRun/project.js +5 -4
- package/dist/remoteRun/project.js.map +1 -1
- package/dist/remoteRun/remoteRunCli.d.ts +1 -1
- package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
- package/dist/remoteRun/remoteRunCli.js +6 -3
- package/dist/remoteRun/remoteRunCli.js.map +1 -1
- package/dist/remoteRun/runnerWait.d.ts +3 -3
- package/dist/remoteRun/runnerWait.d.ts.map +1 -1
- package/dist/remoteRun/runnerWait.js +12 -6
- package/dist/remoteRun/runnerWait.js.map +1 -1
- package/dist/remoteRun/runnerWaitTiming.d.ts +1 -1
- package/dist/remoteRun/runnerWaitTiming.d.ts.map +1 -1
- package/dist/remoteRun/runnerWaitTiming.js +3 -16
- package/dist/remoteRun/runnerWaitTiming.js.map +1 -1
- package/dist/remoteRun/runners.d.ts +16 -3
- package/dist/remoteRun/runners.d.ts.map +1 -1
- package/dist/remoteRun/runners.js +42 -4
- package/dist/remoteRun/runners.js.map +1 -1
- package/dist/remoteRun/sendPlan.d.ts +11 -1
- package/dist/remoteRun/sendPlan.d.ts.map +1 -1
- package/dist/remoteRun/sendPlan.js +29 -5
- package/dist/remoteRun/sendPlan.js.map +1 -1
- package/dist/remoteRun/submit.d.ts.map +1 -1
- package/dist/remoteRun/submit.js +13 -3
- package/dist/remoteRun/submit.js.map +1 -1
- package/dist/runnerUtility/adminService.d.ts +30 -2
- package/dist/runnerUtility/adminService.d.ts.map +1 -1
- package/dist/runnerUtility/adminService.js +104 -6
- package/dist/runnerUtility/adminService.js.map +1 -1
- package/dist/runnerUtility/appInstall.d.ts +13 -4
- package/dist/runnerUtility/appInstall.d.ts.map +1 -1
- package/dist/runnerUtility/appInstall.js +46 -19
- package/dist/runnerUtility/appInstall.js.map +1 -1
- package/dist/runnerUtility/appUpdate.js +1 -1
- package/dist/runnerUtility/appUpdate.js.map +1 -1
- package/dist/runnerUtility/execEnv.d.ts +2 -0
- package/dist/runnerUtility/execEnv.d.ts.map +1 -1
- package/dist/runnerUtility/execEnv.js +6 -2
- package/dist/runnerUtility/execEnv.js.map +1 -1
- package/dist/runnerUtility/guiAgent.d.ts +126 -0
- package/dist/runnerUtility/guiAgent.d.ts.map +1 -0
- package/dist/runnerUtility/guiAgent.js +591 -0
- package/dist/runnerUtility/guiAgent.js.map +1 -0
- package/dist/runnerUtility/guiAgentHeal.d.ts +128 -0
- package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -0
- package/dist/runnerUtility/guiAgentHeal.js +284 -0
- package/dist/runnerUtility/guiAgentHeal.js.map +1 -0
- package/dist/runnerUtility/homeFolders.d.ts +33 -0
- package/dist/runnerUtility/homeFolders.d.ts.map +1 -0
- package/dist/runnerUtility/homeFolders.js +158 -0
- package/dist/runnerUtility/homeFolders.js.map +1 -0
- package/dist/runnerUtility/hubClient.d.ts +12 -2
- package/dist/runnerUtility/hubClient.d.ts.map +1 -1
- package/dist/runnerUtility/hubClient.js +24 -3
- package/dist/runnerUtility/hubClient.js.map +1 -1
- package/dist/runnerUtility/iosCheck.d.ts +7 -1
- package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
- package/dist/runnerUtility/iosCheck.js +14 -5
- package/dist/runnerUtility/iosCheck.js.map +1 -1
- package/dist/runnerUtility/isolatedCommand.d.ts +31 -0
- package/dist/runnerUtility/isolatedCommand.d.ts.map +1 -0
- package/dist/runnerUtility/isolatedCommand.js +132 -0
- package/dist/runnerUtility/isolatedCommand.js.map +1 -0
- package/dist/runnerUtility/keepAwake.d.ts +67 -0
- package/dist/runnerUtility/keepAwake.d.ts.map +1 -0
- package/dist/runnerUtility/keepAwake.js +211 -0
- package/dist/runnerUtility/keepAwake.js.map +1 -0
- package/dist/runnerUtility/lidPollTiming.d.ts +11 -0
- package/dist/runnerUtility/lidPollTiming.d.ts.map +1 -0
- package/dist/runnerUtility/lidPollTiming.js +18 -0
- package/dist/runnerUtility/lidPollTiming.js.map +1 -0
- package/dist/runnerUtility/lidState.d.ts +57 -0
- package/dist/runnerUtility/lidState.d.ts.map +1 -0
- package/dist/runnerUtility/lidState.js +195 -0
- package/dist/runnerUtility/lidState.js.map +1 -0
- package/dist/runnerUtility/linkLoop.d.ts +5 -0
- package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
- package/dist/runnerUtility/linkLoop.js +37 -1
- package/dist/runnerUtility/linkLoop.js.map +1 -1
- package/dist/runnerUtility/packageManagerShims.d.ts +44 -0
- package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -0
- package/dist/runnerUtility/packageManagerShims.js +130 -0
- package/dist/runnerUtility/packageManagerShims.js.map +1 -0
- package/dist/runnerUtility/progress.d.ts +43 -0
- package/dist/runnerUtility/progress.d.ts.map +1 -0
- package/dist/runnerUtility/progress.js +78 -0
- package/dist/runnerUtility/progress.js.map +1 -0
- package/dist/runnerUtility/pueueDaemon.d.ts +8 -4
- package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
- package/dist/runnerUtility/pueueDaemon.js +12 -7
- package/dist/runnerUtility/pueueDaemon.js.map +1 -1
- package/dist/runnerUtility/rootServiceCli.d.ts +23 -3
- package/dist/runnerUtility/rootServiceCli.d.ts.map +1 -1
- package/dist/runnerUtility/rootServiceCli.js +56 -10
- package/dist/runnerUtility/rootServiceCli.js.map +1 -1
- package/dist/runnerUtility/runnerCli.d.ts +1 -0
- package/dist/runnerUtility/runnerCli.d.ts.map +1 -1
- package/dist/runnerUtility/runnerCli.js +14 -7
- package/dist/runnerUtility/runnerCli.js.map +1 -1
- package/dist/runnerUtility/runnerCommands.d.ts +45 -0
- package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
- package/dist/runnerUtility/runnerCommands.js +188 -21
- package/dist/runnerUtility/runnerCommands.js.map +1 -1
- package/dist/runnerUtility/runnerHome.d.ts +8 -0
- package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
- package/dist/runnerUtility/runnerHome.js +7 -0
- package/dist/runnerUtility/runnerHome.js.map +1 -1
- package/dist/runnerUtility/serviceCommon.d.ts +4 -0
- package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
- package/dist/runnerUtility/serviceCommon.js +8 -1
- package/dist/runnerUtility/serviceCommon.js.map +1 -1
- package/dist/runnerUtility/serviceManager.d.ts +5 -2
- package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
- package/dist/runnerUtility/serviceManager.js +40 -17
- package/dist/runnerUtility/serviceManager.js.map +1 -1
- package/dist/runnerUtility/serviceUnits.d.ts +11 -0
- package/dist/runnerUtility/serviceUnits.d.ts.map +1 -1
- package/dist/runnerUtility/serviceUnits.js +8 -2
- package/dist/runnerUtility/serviceUnits.js.map +1 -1
- package/dist/runnerUtility/simulatorSilencer.d.ts +55 -0
- package/dist/runnerUtility/simulatorSilencer.d.ts.map +1 -0
- package/dist/runnerUtility/simulatorSilencer.js +203 -0
- package/dist/runnerUtility/simulatorSilencer.js.map +1 -0
- package/dist/runnerUtility/stopSignals.d.ts +10 -0
- package/dist/runnerUtility/stopSignals.d.ts.map +1 -0
- package/dist/runnerUtility/stopSignals.js +27 -0
- package/dist/runnerUtility/stopSignals.js.map +1 -0
- package/dist/runnerUtility/versionPollTiming.d.ts +2 -3
- package/dist/runnerUtility/versionPollTiming.d.ts.map +1 -1
- package/dist/runnerUtility/versionPollTiming.js +4 -18
- package/dist/runnerUtility/versionPollTiming.js.map +1 -1
- package/dist/runners/bootstrapLine.d.ts.map +1 -1
- package/dist/runners/bootstrapLine.js +35 -19
- package/dist/runners/bootstrapLine.js.map +1 -1
- package/dist/runners/gate.d.ts.map +1 -1
- package/dist/runners/gate.js +28 -1
- package/dist/runners/gate.js.map +1 -1
- package/dist/runners/gateLink.d.ts +7 -0
- package/dist/runners/gateLink.d.ts.map +1 -1
- package/dist/runners/gateLink.js +36 -3
- package/dist/runners/gateLink.js.map +1 -1
- package/dist/runners/gateProtocol.d.ts +37 -2
- package/dist/runners/gateProtocol.d.ts.map +1 -1
- package/dist/runners/gateProtocol.js +45 -4
- package/dist/runners/gateProtocol.js.map +1 -1
- package/dist/runners/hubPackage.d.ts +2 -1
- package/dist/runners/hubPackage.d.ts.map +1 -1
- package/dist/runners/hubPackage.js +32 -11
- package/dist/runners/hubPackage.js.map +1 -1
- package/dist/runners/hubPairing.d.ts +1 -1
- package/dist/runners/hubPairing.d.ts.map +1 -1
- package/dist/runners/hubPairing.js +8 -1
- package/dist/runners/hubPairing.js.map +1 -1
- package/dist/runners/hubPaths.d.ts +2 -0
- package/dist/runners/hubPaths.d.ts.map +1 -1
- package/dist/runners/hubPaths.js +1 -1
- package/dist/runners/hubPaths.js.map +1 -1
- package/dist/runners/linkConcern.d.ts +75 -0
- package/dist/runners/linkConcern.d.ts.map +1 -0
- package/dist/runners/linkConcern.js +85 -0
- package/dist/runners/linkConcern.js.map +1 -0
- package/dist/runners/linkControl.d.ts +25 -1
- package/dist/runners/linkControl.d.ts.map +1 -1
- package/dist/runners/linkControl.js +46 -4
- package/dist/runners/linkControl.js.map +1 -1
- package/dist/runners/pairingTiming.d.ts +2 -3
- package/dist/runners/pairingTiming.d.ts.map +1 -1
- package/dist/runners/pairingTiming.js +4 -18
- package/dist/runners/pairingTiming.js.map +1 -1
- package/dist/runners/runnerLock.d.ts +112 -0
- package/dist/runners/runnerLock.d.ts.map +1 -0
- package/dist/runners/runnerLock.js +292 -0
- package/dist/runners/runnerLock.js.map +1 -0
- package/dist/runners/runnersCli.d.ts +6 -3
- package/dist/runners/runnersCli.d.ts.map +1 -1
- package/dist/runners/runnersCli.js +33 -6
- package/dist/runners/runnersCli.js.map +1 -1
- package/dist/runners/runnersList.d.ts +3 -3
- package/dist/runners/runnersList.d.ts.map +1 -1
- package/dist/runners/runnersList.js +9 -2
- package/dist/runners/runnersList.js.map +1 -1
- package/dist/runners/runnersOverview.d.ts +29 -3
- package/dist/runners/runnersOverview.d.ts.map +1 -1
- package/dist/runners/runnersOverview.js +71 -6
- package/dist/runners/runnersOverview.js.map +1 -1
- package/dist/runners/serviceRemoval.d.ts +43 -0
- package/dist/runners/serviceRemoval.d.ts.map +1 -0
- package/dist/runners/serviceRemoval.js +114 -0
- package/dist/runners/serviceRemoval.js.map +1 -0
- package/dist/scheduler/checkRun.d.ts +9 -10
- package/dist/scheduler/checkRun.d.ts.map +1 -1
- package/dist/scheduler/checkRun.js +8 -16
- package/dist/scheduler/checkRun.js.map +1 -1
- package/dist/scheduler/checkStatus.d.ts +75 -0
- package/dist/scheduler/checkStatus.d.ts.map +1 -0
- package/dist/scheduler/checkStatus.js +117 -0
- package/dist/scheduler/checkStatus.js.map +1 -0
- package/dist/scheduler/delivery.d.ts +106 -38
- package/dist/scheduler/delivery.d.ts.map +1 -1
- package/dist/scheduler/delivery.js +199 -73
- package/dist/scheduler/delivery.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +8 -2
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +96 -20
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/scheduler/recurrence.d.ts +32 -0
- package/dist/scheduler/recurrence.d.ts.map +1 -1
- package/dist/scheduler/recurrence.js +56 -18
- package/dist/scheduler/recurrence.js.map +1 -1
- package/dist/scheduler/scheduleText.d.ts +7 -0
- package/dist/scheduler/scheduleText.d.ts.map +1 -0
- package/dist/scheduler/scheduleText.js +55 -0
- package/dist/scheduler/scheduleText.js.map +1 -0
- package/dist/scheduler/store.d.ts +23 -2
- package/dist/scheduler/store.d.ts.map +1 -1
- package/dist/scheduler/store.js +57 -3
- package/dist/scheduler/store.js.map +1 -1
- package/dist/scheduler/types.d.ts +26 -10
- package/dist/scheduler/types.d.ts.map +1 -1
- package/dist/scheduler/unbindPause.d.ts +27 -0
- package/dist/scheduler/unbindPause.d.ts.map +1 -0
- package/dist/scheduler/unbindPause.js +21 -0
- package/dist/scheduler/unbindPause.js.map +1 -0
- package/dist/scheduler/workerActivity.d.ts +25 -0
- package/dist/scheduler/workerActivity.d.ts.map +1 -0
- package/dist/scheduler/workerActivity.js +195 -0
- package/dist/scheduler/workerActivity.js.map +1 -0
- package/dist/scheduler/workerWatch.d.ts +36 -9
- package/dist/scheduler/workerWatch.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.js +41 -11
- package/dist/scheduler/workerWatch.js.map +1 -1
- package/dist/state.d.ts +8 -0
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +30 -0
- package/dist/state.js.map +1 -1
- package/dist/stt/sttRuntime.d.ts.map +1 -1
- package/dist/stt/sttRuntime.js +8 -1
- package/dist/stt/sttRuntime.js.map +1 -1
- package/dist/stt/sttSettings.d.ts +56 -6
- package/dist/stt/sttSettings.d.ts.map +1 -1
- package/dist/stt/sttSettings.js +128 -7
- package/dist/stt/sttSettings.js.map +1 -1
- package/dist/stt/sttSidecarOwner.d.ts +13 -5
- package/dist/stt/sttSidecarOwner.d.ts.map +1 -1
- package/dist/stt/sttSidecarOwner.js +72 -31
- package/dist/stt/sttSidecarOwner.js.map +1 -1
- package/dist/stt/transcribeChain.d.ts +23 -1
- package/dist/stt/transcribeChain.d.ts.map +1 -1
- package/dist/stt/transcribeChain.js +59 -4
- package/dist/stt/transcribeChain.js.map +1 -1
- package/dist/testTimings.d.ts +4 -2
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +7 -1
- package/dist/testTimings.js.map +1 -1
- package/dist/testTimingsSeam.d.ts +10 -0
- package/dist/testTimingsSeam.d.ts.map +1 -0
- package/dist/testTimingsSeam.js +29 -0
- package/dist/testTimingsSeam.js.map +1 -0
- package/dist/utils/claudeUsage.d.ts +3 -0
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +8 -1
- package/dist/utils/claudeUsage.js.map +1 -1
- package/dist/utils/claudeUsageRefresher.d.ts +27 -3
- package/dist/utils/claudeUsageRefresher.d.ts.map +1 -1
- package/dist/utils/claudeUsageRefresher.js +113 -14
- package/dist/utils/claudeUsageRefresher.js.map +1 -1
- package/dist/utils/forwardedMark.d.ts +54 -0
- package/dist/utils/forwardedMark.d.ts.map +1 -0
- package/dist/utils/forwardedMark.js +80 -0
- package/dist/utils/forwardedMark.js.map +1 -0
- package/dist/utils/limitHeldPrompts.d.ts +8 -2
- package/dist/utils/limitHeldPrompts.d.ts.map +1 -1
- package/dist/utils/limitHeldPrompts.js +11 -4
- package/dist/utils/limitHeldPrompts.js.map +1 -1
- package/dist/utils/messageContext.d.ts +54 -0
- package/dist/utils/messageContext.d.ts.map +1 -0
- package/dist/utils/messageContext.js +58 -0
- package/dist/utils/messageContext.js.map +1 -0
- package/dist/utils/openCodeUsage.d.ts +10 -3
- package/dist/utils/openCodeUsage.d.ts.map +1 -1
- package/dist/utils/openCodeUsage.js +19 -5
- package/dist/utils/openCodeUsage.js.map +1 -1
- package/dist/utils/replyQuote.d.ts +11 -26
- package/dist/utils/replyQuote.d.ts.map +1 -1
- package/dist/utils/replyQuote.js +9 -31
- package/dist/utils/replyQuote.js.map +1 -1
- package/dist/utils/runnersScreenPlan.d.ts +14 -0
- package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
- package/dist/utils/runnersScreenPlan.js +49 -5
- package/dist/utils/runnersScreenPlan.js.map +1 -1
- package/dist/utils/stripControlCharacters.d.ts +8 -0
- package/dist/utils/stripControlCharacters.d.ts.map +1 -0
- package/dist/utils/stripControlCharacters.js +16 -0
- package/dist/utils/stripControlCharacters.js.map +1 -0
- package/dist/utils/surrogateSafeCut.d.ts +14 -0
- package/dist/utils/surrogateSafeCut.d.ts.map +1 -0
- package/dist/utils/surrogateSafeCut.js +30 -0
- package/dist/utils/surrogateSafeCut.js.map +1 -0
- package/dist/utils/telegramError.d.ts +13 -0
- package/dist/utils/telegramError.d.ts.map +1 -1
- package/dist/utils/telegramError.js +45 -0
- package/dist/utils/telegramError.js.map +1 -1
- package/dist/utils/topicRequest.d.ts +13 -0
- package/dist/utils/topicRequest.d.ts.map +1 -1
- package/dist/utils/topicRequest.js +10 -0
- package/dist/utils/topicRequest.js.map +1 -1
- package/dist/utils/transientFrames.d.ts +51 -6
- package/dist/utils/transientFrames.d.ts.map +1 -1
- package/dist/utils/transientFrames.js +52 -2
- package/dist/utils/transientFrames.js.map +1 -1
- package/dist/utils/usageRefreshBudget.d.ts.map +1 -1
- package/dist/utils/usageRefreshBudget.js +4 -10
- package/dist/utils/usageRefreshBudget.js.map +1 -1
- package/dist/utils/waitUpTo.d.ts +8 -0
- package/dist/utils/waitUpTo.d.ts.map +1 -0
- package/dist/utils/waitUpTo.js +20 -0
- package/dist/utils/waitUpTo.js.map +1 -0
- package/dist/voiceProgressNote.d.ts +73 -0
- package/dist/voiceProgressNote.d.ts.map +1 -0
- package/dist/voiceProgressNote.js +142 -0
- package/dist/voiceProgressNote.js.map +1 -0
- package/package.json +4 -1
- package/remoteRun/pickNode.sh +65 -0
- package/remoteRun/runner-package-lock.json +59 -0
- package/remoteRun/runner.sh +304 -6
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkStatusActivityMaxChars = exports.checkStatusSlackMs = exports.checkStatusCommandTimeoutSec = exports.maxCheckStatusRunDirLength = exports.maxCheckStatusCommandLength = exports.maxCheckStatusEveryMinutes = exports.minCheckStatusEveryMinutes = exports.defaultCheckStatusEveryMinutes = void 0;
|
|
4
|
+
exports.getCheckStatusIntervalMs = getCheckStatusIntervalMs;
|
|
5
|
+
exports.checkIsCheckStatusDue = checkIsCheckStatusDue;
|
|
6
|
+
exports.getCheckStatusSinceMs = getCheckStatusSinceMs;
|
|
7
|
+
exports.checkIsCheckStatusShown = checkIsCheckStatusShown;
|
|
8
|
+
exports.formatCheckStatusActivity = formatCheckStatusActivity;
|
|
9
|
+
exports.getCheckStatusActivityFromOutput = getCheckStatusActivityFromOutput;
|
|
10
|
+
exports.getCheckStatusElapsedText = getCheckStatusElapsedText;
|
|
11
|
+
exports.getCheckShownName = getCheckShownName;
|
|
12
|
+
exports.buildCheckStatusLine = buildCheckStatusLine;
|
|
13
|
+
const i18n_1 = require("../i18n");
|
|
14
|
+
const surrogateSafeCut_1 = require("../utils/surrogateSafeCut");
|
|
15
|
+
const topicView_1 = require("../utils/topicView");
|
|
16
|
+
/**
|
|
17
|
+
* @description The STATUS LINE of a passing check: while a `'check'` job keeps passing and carries a status source
|
|
18
|
+
* (a worker's run directory, or a command), the BOT itself posts a short silent line into the topic — «⏳ builder S2 ·
|
|
19
|
+
* works 30 min · now: Bash: Run the unit tests» — and deletes the previous one. The agent is never woken and no turn
|
|
20
|
+
* runs, so a topic whose agent is idle, compacting or stopped still shows that its worker is alive. This file holds the
|
|
21
|
+
* pure decisions (when a line is due, whether the topic shows it, its text); the I/O lives in `delivery.ts`
|
|
22
|
+
* (`updateCheckStatus`) and `workerActivity.ts`.
|
|
23
|
+
*/
|
|
24
|
+
/** Minutes between two status lines when `schedule_create` leaves `statusEveryMinutes` out. */
|
|
25
|
+
exports.defaultCheckStatusEveryMinutes = 15;
|
|
26
|
+
/** The shortest `statusEveryMinutes`: a status line is a heartbeat, not a stream (the bot posts at most one per 5 min). */
|
|
27
|
+
exports.minCheckStatusEveryMinutes = 5;
|
|
28
|
+
/** The longest `statusEveryMinutes` (4 h). */
|
|
29
|
+
exports.maxCheckStatusEveryMinutes = 240;
|
|
30
|
+
/** Longest `statusCommand` accepted (the same bound as `checkCommand`). */
|
|
31
|
+
exports.maxCheckStatusCommandLength = 1000;
|
|
32
|
+
/** Longest `statusWorkerRunDir` accepted. */
|
|
33
|
+
exports.maxCheckStatusRunDirLength = 1000;
|
|
34
|
+
/** Seconds a `statusCommand` run may take; a slow probe only costs the «now» part of its line. */
|
|
35
|
+
exports.checkStatusCommandTimeoutSec = 15;
|
|
36
|
+
/**
|
|
37
|
+
* How much earlier than a full interval a line may come due. A check runs on a cron tick, a few seconds after the minute,
|
|
38
|
+
* so «15 min since the last line» is measured at 14 min 58 s on the tick that should post it, and a plain `>=` would
|
|
39
|
+
* push every line one tick later (a cron ticking every 5 minutes would post every 20 min, not 15).
|
|
40
|
+
*/
|
|
41
|
+
exports.checkStatusSlackMs = 60_000;
|
|
42
|
+
/** The slack never exceeds this share of the interval, so a test window of a minute or two is still an interval. */
|
|
43
|
+
const checkStatusSlackShareDivisor = 5;
|
|
44
|
+
/** The longest «now» part of a line: one line of a phone's width, never a paragraph. */
|
|
45
|
+
exports.checkStatusActivityMaxChars = 120;
|
|
46
|
+
const msPerMinute = 60_000;
|
|
47
|
+
const minutesPerHour = 60;
|
|
48
|
+
/** A leading `watch ` of a check's name is the recipe's own prefix (`watch builder S2`), noise in the topic. */
|
|
49
|
+
const leadingWatchWordPattern = /^watch\s+/i;
|
|
50
|
+
/** @description The status interval of a check, in ms. */
|
|
51
|
+
function getCheckStatusIntervalMs(job) {
|
|
52
|
+
return (job.statusEveryMinutes ?? exports.defaultCheckStatusEveryMinutes) * msPerMinute;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @description Whether a status line is due: an interval (less the slack) has passed since the last line, or since the
|
|
56
|
+
* check was created before the first one — the manager's own launch message covers the first minutes.
|
|
57
|
+
*/
|
|
58
|
+
function checkIsCheckStatusDue(input) {
|
|
59
|
+
const slackMs = Math.min(exports.checkStatusSlackMs, Math.floor(input.intervalMs / checkStatusSlackShareDivisor));
|
|
60
|
+
return input.nowMs - input.sinceMs >= input.intervalMs - slackMs;
|
|
61
|
+
}
|
|
62
|
+
/** @description The instant a check's next line is counted from: its last line, else its creation. */
|
|
63
|
+
function getCheckStatusSinceMs(job) {
|
|
64
|
+
return job.lastStatusAt ?? Date.parse(job.createdAt);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @description The ONE gate that decides whether a topic shows status lines: a Telegram conversation (a tracker issue gets no
|
|
68
|
+
* message, no comment, no edited note) whose view shows the agent's stream — the answers-only view shows nothing but answers.
|
|
69
|
+
*/
|
|
70
|
+
function checkIsCheckStatusShown(input) {
|
|
71
|
+
return input.isTelegram && (0, topicView_1.checkIsStreamShown)(input.view);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @description One line of activity text: whitespace collapsed, cut to {@link checkStatusActivityMaxChars} with an ellipsis;
|
|
75
|
+
* `null` when nothing readable is left. Shared by the log reader and the `statusCommand` output.
|
|
76
|
+
*/
|
|
77
|
+
function formatCheckStatusActivity(text) {
|
|
78
|
+
const collapsed = text.replace(/\s+/g, ' ').trim();
|
|
79
|
+
if (collapsed === '')
|
|
80
|
+
return null;
|
|
81
|
+
// The cut keeps room for the ellipsis and never splits an emoji's two halves: Telegram refuses a text that ends in half of one.
|
|
82
|
+
return collapsed.length <= exports.checkStatusActivityMaxChars ? collapsed : `${(0, surrogateSafeCut_1.cutTextSurrogateSafe)(collapsed, exports.checkStatusActivityMaxChars - 1)}…`;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @description The «now» of a `statusCommand`: the first non-empty line of its output, which is stdout and stderr together,
|
|
86
|
+
* so a command that only complained has a «now» of its complaint — callers pass the output of a run that exited 0.
|
|
87
|
+
*/
|
|
88
|
+
function getCheckStatusActivityFromOutput(output) {
|
|
89
|
+
const firstLine = output.split('\n').find((line) => line.trim() !== '');
|
|
90
|
+
return firstLine === undefined ? null : formatCheckStatusActivity(firstLine);
|
|
91
|
+
}
|
|
92
|
+
/** @description «N min» under an hour, «H h M min» from an hour on (rounded to the nearest minute). */
|
|
93
|
+
function getCheckStatusElapsedText(elapsedMs) {
|
|
94
|
+
const totalMinutes = Math.max(0, Math.round(elapsedMs / msPerMinute));
|
|
95
|
+
if (totalMinutes < minutesPerHour)
|
|
96
|
+
return (0, i18n_1.t)('schedule.statusElapsedMinutes', { minutes: totalMinutes });
|
|
97
|
+
return (0, i18n_1.t)('schedule.statusElapsedHours', {
|
|
98
|
+
hours: Math.floor(totalMinutes / minutesPerHour),
|
|
99
|
+
minutes: totalMinutes % minutesPerHour,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/** @description A check's name as the topic shows it: without the recipe's leading `watch ` (`watch builder S2` → `builder S2`). */
|
|
103
|
+
function getCheckShownName(name) {
|
|
104
|
+
return name.replace(leadingWatchWordPattern, '').trim() || name;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @description The status line: `⏳ <name> · works <elapsed>[ · now: <activity>]`. The name is the check's own without the
|
|
108
|
+
* recipe's leading `watch `; the «now» part is left out when there is nothing readable to say.
|
|
109
|
+
*/
|
|
110
|
+
function buildCheckStatusLine(input) {
|
|
111
|
+
return (0, i18n_1.t)('schedule.statusLineText', {
|
|
112
|
+
name: getCheckShownName(input.name),
|
|
113
|
+
elapsed: getCheckStatusElapsedText(input.elapsedMs),
|
|
114
|
+
activity: input.activity === null ? '' : (0, i18n_1.t)('schedule.statusLineActivity', { activity: input.activity }),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=checkStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkStatus.js","sourceRoot":"","sources":["../../src/scheduler/checkStatus.ts"],"names":[],"mappings":";;;AAqDA,4DAEC;AAMD,sDAGC;AAGD,sDAEC;AAMD,0DAEC;AAMD,8DAKC;AAMD,4EAGC;AAGD,8DAOC;AAGD,8CAEC;AAMD,oDAMC;AA5HD,kCAA4B;AAC5B,gEAAiE;AACjE,kDAAwD;AAIxD;;;;;;;GAOG;AAEH,+FAA+F;AAClF,QAAA,8BAA8B,GAAG,EAAE,CAAC;AAEjD,2HAA2H;AAC9G,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAE5C,8CAA8C;AACjC,QAAA,0BAA0B,GAAG,GAAG,CAAC;AAE9C,2EAA2E;AAC9D,QAAA,2BAA2B,G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C;AAClE,CAAC;AAED;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,KAAmE;IACtG,OAAO,IAAA,QAAC,EAAC,yBAAyB,EAAE;QAClC,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC;QACnC,OAAO,EAAE,yBAAyB,CAAC,KAAK,CAAC,SAAS,CAAC;QACnD,QAAQ,EAAE,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAA,QAAC,EAAC,6BAA6B,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;KACxG,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type CheckRunResult } from './checkRun';
|
|
2
|
-
import type { DeliveryOutcome, FireContext, ScheduleRecord } from './types';
|
|
2
|
+
import type { CheckStatusLine, DeliveryOutcome, FireContext, ScheduleRecord } from './types';
|
|
3
3
|
import { type PostToSessionDeps } from '../postToSession';
|
|
4
4
|
/**
|
|
5
5
|
* @description Scheduler delivery (plan S4): the real `deliver(job, fireContext)`
|
|
6
6
|
* callback the engine (S3) invokes at fire time. The flow is locked by the plan:
|
|
7
7
|
*
|
|
8
|
-
* 1. announce — post a
|
|
9
|
-
* schedule
|
|
10
|
-
*
|
|
11
|
-
* default
|
|
12
|
-
* and the flow continues — the announcement is already visible.
|
|
8
|
+
* 1. announce — post a SILENT message into the topic: «⏰ Scheduled: <name> ·
|
|
9
|
+
* <human schedule>» (+ a "missed at HH:MM" note for a catch-up run), with the
|
|
10
|
+
* prompt folded under it (an agent instruction, not something to read by
|
|
11
|
+
* default). Never pinned: a scheduled run is ordinary output.
|
|
13
12
|
* 3–4. post the prefixed prompt to the session ({@link postToSession}, shared
|
|
14
13
|
* with the Jira connector): ensure a session (starting one with the job's
|
|
15
14
|
* `lastAdapterName` snapshot as the adapter fallback — a topic that never
|
|
@@ -18,19 +17,21 @@ import { type PostToSessionDeps } from '../postToSession';
|
|
|
18
17
|
* unbound topic → outcome `failed` with a distinct error string the engine
|
|
19
18
|
* records (S8 turns that into a pause).
|
|
20
19
|
*
|
|
21
|
-
* A REMINDER record (`deliveryKind: 'reminder'`)
|
|
22
|
-
* delivery IS the announcement plus its pin, which is what pierces a
|
|
23
|
-
* Steps 3–4 are skipped entirely, so a reminder
|
|
24
|
-
* General — there is no session to ensure,
|
|
25
|
-
* tell about the run.
|
|
20
|
+
* A REMINDER record (`deliveryKind: 'reminder'`) is the one thing still pinned:
|
|
21
|
+
* its whole delivery IS the announcement plus its pin, which is what pierces a
|
|
22
|
+
* muted topic, and it stops there. Steps 3–4 are skipped entirely, so a reminder
|
|
23
|
+
* fires in an unbound topic and in General — there is no session to ensure,
|
|
24
|
+
* nothing to interrupt, and no agent to tell about the run.
|
|
26
25
|
*
|
|
27
26
|
* A CHECK record (`deliveryKind: 'check'`) runs its command FIRST and decides
|
|
28
27
|
* from the result and its persisted failing flag: a pass after a pass, or a
|
|
29
28
|
* failure after a failure, posts nothing; a pass after a failure posts one
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
29
|
+
* "is back to normal" line; the first failure posts a one-sentence silent notice
|
|
30
|
+
* (never the command; a worker watch says "finished" or "silent", any other check
|
|
31
|
+
* folds the output under "fired") and then wakes the agent through steps 3–4 with
|
|
32
|
+
* the command, the failure details and the output ahead of the job's prompt. An
|
|
33
|
+
* unbound topic fails with the same distinct error as a prompt job, so it is
|
|
34
|
+
* paused the same way.
|
|
34
35
|
*
|
|
35
36
|
* It owns NO bot.ts import: every side effect is injected via
|
|
36
37
|
* {@link ScheduleDeliveryDeps} (announce / pin / busy probe / ensure-session /
|
|
@@ -39,6 +40,24 @@ import { type PostToSessionDeps } from '../postToSession';
|
|
|
39
40
|
*/
|
|
40
41
|
/** Distinct error string the engine records when a fire hits an unbound topic. */
|
|
41
42
|
export declare const unboundDeliveryError = "thread is unbound";
|
|
43
|
+
/**
|
|
44
|
+
* @name ScheduleAnnounceOptions
|
|
45
|
+
* @description How a topic message of the scheduler is sent.
|
|
46
|
+
*/
|
|
47
|
+
export interface ScheduleAnnounceOptions {
|
|
48
|
+
/** Send without a notification: the bot's ordinary output. Absent only for a reminder, which is meant to ring. */
|
|
49
|
+
isSilent?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Text folded under the message: the reader opens it on demand (Telegram: an expandable quote). Plain text — the
|
|
52
|
+
* platform escapes it.
|
|
53
|
+
*/
|
|
54
|
+
foldedDetail?: string;
|
|
55
|
+
}
|
|
56
|
+
/** @name ScheduleAnnouncement @description What a fire or an alert says in the topic: the sentence, and the detail folded under it. */
|
|
57
|
+
export interface ScheduleAnnouncement {
|
|
58
|
+
text: string;
|
|
59
|
+
foldedDetail?: string;
|
|
60
|
+
}
|
|
42
61
|
/**
|
|
43
62
|
* @name ScheduleDeliveryDeps
|
|
44
63
|
* @description Everything the delivery callback needs from bot.ts, injected so
|
|
@@ -48,19 +67,42 @@ export declare const unboundDeliveryError = "thread is unbound";
|
|
|
48
67
|
*/
|
|
49
68
|
export interface ScheduleDeliveryDeps extends PostToSessionDeps {
|
|
50
69
|
/**
|
|
51
|
-
* Post
|
|
52
|
-
* `
|
|
53
|
-
* send failed — pinning is skipped on `null`.
|
|
70
|
+
* Post a message into the topic (the bot bakes in priority `'interactive'`). Resolves with the sent message id, or
|
|
71
|
+
* `null` when the send failed — a reminder's pin is skipped on `null`.
|
|
54
72
|
*/
|
|
55
|
-
announce: (threadKey: string, text: string) => Promise<number | null>;
|
|
56
|
-
/** Pin
|
|
57
|
-
pin: (threadKey: string, messageId: number
|
|
73
|
+
announce: (threadKey: string, text: string, options?: ScheduleAnnounceOptions) => Promise<number | null>;
|
|
74
|
+
/** Pin a REMINDER's announcement, notifying (that is how a reminder pierces a muted topic). Rejects on failure. */
|
|
75
|
+
pin: (threadKey: string, messageId: number) => Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Unpin these messages of the topic and resolve with the ids that are STILL pinned and worth another try (Telegram did not
|
|
78
|
+
* answer, asked to slow down, failed on its side). A message that is gone, was never pinned or cannot be unpinned any more
|
|
79
|
+
* is final, so it is not in the list. Never rejects.
|
|
80
|
+
*/
|
|
81
|
+
unpinMessages: (threadKey: string, messageIds: readonly number[]) => Promise<number[]>;
|
|
58
82
|
/** Run a check job's command in the thread's bound folder; `null` when the thread is unbound. */
|
|
59
83
|
runCheck: (threadKey: string, command: string, timeoutMs: number) => Promise<CheckRunResult | null>;
|
|
60
84
|
/** Persist a check job's failing flag (it decides whether the next run alerts). */
|
|
61
85
|
setCheckFailing: (jobId: string, isFailing: boolean) => Promise<void>;
|
|
62
|
-
/**
|
|
63
|
-
|
|
86
|
+
/** Forget these alert pins of an earlier version on a job (`ScheduleRecord.alertPinMessageIds`), once they are unpinned. */
|
|
87
|
+
clearAlertPins: (jobId: string, releasedMessageIds: readonly number[]) => Promise<void>;
|
|
88
|
+
/** Whether this conversation shows status lines at all (a Telegram topic whose view shows the agent's stream). */
|
|
89
|
+
checkIsStatusShown: (threadKey: string) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Post a status line SILENTLY (no notification, never pinned) and resolve with its message id, or `null` when the send
|
|
92
|
+
* failed. It is the bot's own message: it never reaches an agent.
|
|
93
|
+
*/
|
|
94
|
+
postStatus: (threadKey: string, text: string) => Promise<number | null>;
|
|
95
|
+
/** Delete a message of the topic, best effort: one that is gone or too old to delete is not an error. */
|
|
96
|
+
deleteMessage: (threadKey: string, messageId: number) => Promise<void>;
|
|
97
|
+
/** What the worker whose run directory is `runDir` (relative to the bound folder, or absolute) did last; `null` when unreadable. */
|
|
98
|
+
readWorkerActivity: (threadKey: string, runDir: string) => Promise<string | null>;
|
|
99
|
+
/**
|
|
100
|
+
* Persist the status line a job now has in the topic (`null`: it has none). Resolves `false` when the job no longer
|
|
101
|
+
* exists (it was cancelled while the line was being posted), so the caller can delete the line it just posted.
|
|
102
|
+
*/
|
|
103
|
+
recordStatusLine: (jobId: string, line: CheckStatusLine | null) => Promise<boolean>;
|
|
104
|
+
/** Test seam (`CHARNESS_TEST_TIMINGS`): the status interval in place of the job's `statusEveryMinutes`. */
|
|
105
|
+
statusIntervalOverrideMs?: number;
|
|
64
106
|
}
|
|
65
107
|
/**
|
|
66
108
|
* @description Prefix a scheduled job's prompt with a single English line that
|
|
@@ -76,23 +118,49 @@ export declare function prependScheduledRunMarker(jobName: string, prompt: strin
|
|
|
76
118
|
dueAtMs?: number;
|
|
77
119
|
}): string;
|
|
78
120
|
/**
|
|
79
|
-
* @description Build the visible fire
|
|
80
|
-
*
|
|
81
|
-
* reminder leads with its own text (the pin notification previews it, so the
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* instant) for a `catch-up` fire, empty for an `on-time` run — so a replayed run
|
|
85
|
-
* is annotated identically whichever kind it is.
|
|
121
|
+
* @description Build the visible fire announcement via i18n, per delivery kind. A prompt job says «⏰ Scheduled: <name> ·
|
|
122
|
+
* <schedule>» and folds its prompt under it: the prompt is an instruction for the agent, not something a person reads by
|
|
123
|
+
* default. A reminder leads with its own text (the pin notification previews it, so the operator reads the reminder
|
|
124
|
+
* without opening the topic) and carries nothing folded. Both interpolate the SAME `{missedNote}` — the catch-up annotation
|
|
125
|
+
* (host-local HH:MM of the missed instant) for a `catch-up` fire, empty for an `on-time` run.
|
|
86
126
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
127
|
+
* A reminder's `{schedule}` is always the LOCALIZED {@link getReminderScheduleText} — the very same words its `/reminders`
|
|
128
|
+
* list row and card show, because describing one reminder two different ways is a defect. A prompt job's goes through
|
|
129
|
+
* {@link getAnnouncedScheduleText}, which counts the next run from `nowMs` where nothing phrases the shape.
|
|
130
|
+
*/
|
|
131
|
+
export declare function buildFireAnnouncement(job: ScheduleRecord, fireContext: FireContext, nowMs: number): ScheduleAnnouncement;
|
|
132
|
+
/**
|
|
133
|
+
* @name CheckFailedAnnouncementInput
|
|
134
|
+
* @description What the notice of a check's first failure is built from: the job, the failed run, its short description
|
|
135
|
+
* ({@link describeCheckFailure}) and the instant the notice is made at (how long a worker ran).
|
|
136
|
+
*/
|
|
137
|
+
export interface CheckFailedAnnouncementInput {
|
|
138
|
+
job: ScheduleRecord;
|
|
139
|
+
result: CheckRunResult;
|
|
140
|
+
failure: string;
|
|
141
|
+
nowMs: number;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @description The topic notice of a check's first failure, in one sentence and never with the command (that goes to the
|
|
145
|
+
* agent's prompt only). A worker watch (a check with a status source of a worker's run directory) says what happened to
|
|
146
|
+
* the worker: finished (its process is gone) or silent for {@link workerWatchSilenceMinutes} minutes. Any other check — and a
|
|
147
|
+
* worker watch that failed some other way, a timeout say — says it fired, with what failed and the output tail folded under
|
|
148
|
+
* it, because the failure is the only thing a person can use to tell why.
|
|
149
|
+
*/
|
|
150
|
+
export declare function buildCheckFailedAnnouncement(input: CheckFailedAnnouncementInput): ScheduleAnnouncement;
|
|
151
|
+
/**
|
|
152
|
+
* @description The line for a check that passes again, in the words of its failure notice: a worker watch speaks of the worker
|
|
153
|
+
* (and its shown name, without the recipe's `watch `), any other check of the check.
|
|
154
|
+
*/
|
|
155
|
+
export declare function buildCheckRecoveredText(job: ScheduleRecord): string;
|
|
156
|
+
/**
|
|
157
|
+
* @description Take a job's status line out of the topic and out of its record — the ONE place that does it, for a failed or
|
|
158
|
+
* unbound run, a topic that stopped showing the stream, a final run, and the `/unbind` pause (`unbindPause.ts`). The record is
|
|
159
|
+
* cleared first: a crash between the two leaves an orphan line in the topic, never a record that points at a message that was
|
|
160
|
+
* already deleted. Never rejects — the alert of a failed check runs right after it, and a status line must not be able to stop
|
|
161
|
+
* that (nor an unbind be stopped by it).
|
|
92
162
|
*/
|
|
93
|
-
export declare function
|
|
94
|
-
/** @description The topic alert of a check's first failure: what failed, how, and the output tail. */
|
|
95
|
-
export declare function buildCheckFailedAnnouncement(job: ScheduleRecord, fireContext: FireContext, failure: string, output: string): string;
|
|
163
|
+
export declare function clearCheckStatusLine(deps: Pick<ScheduleDeliveryDeps, 'recordStatusLine' | 'deleteMessage'>, job: Pick<ScheduleRecord, 'id' | 'threadKey' | 'statusMessageId'>): Promise<void>;
|
|
96
164
|
/**
|
|
97
165
|
* @description Build the engine's `deliver(job, fireContext)` callback bound to
|
|
98
166
|
* the injected deps. See the module header for the locked flow.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/scheduler/delivery.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../../src/scheduler/delivery.ts"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAcpB,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7F,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kFAAkF;AAClF,eAAO,MAAM,oBAAoB,sBAAsB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,kHAAkH;IAClH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,uIAAuI;AACvI,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D;;;OAGG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,K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