charness 3.10.0 → 3.12.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 +171 -0
- package/DEVELOPMENT.md +3 -3
- package/README.md +3 -2
- package/SETUP.md +6 -5
- package/agent-plugin/README.md +15 -6
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +23 -13
- package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +10 -6
- package/agent-plugin/skills/charness-delivery-loop/SKILL.md +92 -0
- package/agent-plugin/skills/charness-orchestration/SKILL.md +116 -0
- package/dist/adapters/openCodeAdapter.d.ts +15 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +48 -4
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/agentLogin/agentLogin.d.ts +11 -0
- package/dist/agentLogin/agentLogin.d.ts.map +1 -1
- package/dist/agentLogin/agentLogin.js +18 -6
- package/dist/agentLogin/agentLogin.js.map +1 -1
- package/dist/apiErrorRetry.d.ts +5 -0
- package/dist/apiErrorRetry.d.ts.map +1 -1
- package/dist/apiErrorRetry.js +3 -3
- package/dist/apiErrorRetry.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +331 -152
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +5 -2
- package/dist/cli/claudeProfiles.d.ts.map +1 -1
- package/dist/cli/claudeProfiles.js +43 -20
- package/dist/cli/claudeProfiles.js.map +1 -1
- package/dist/cli/claudeProfilesCredit.d.ts +49 -0
- package/dist/cli/claudeProfilesCredit.d.ts.map +1 -0
- package/dist/cli/claudeProfilesCredit.js +160 -0
- package/dist/cli/claudeProfilesCredit.js.map +1 -0
- package/dist/cli/flagValue.d.ts +10 -0
- package/dist/cli/flagValue.d.ts.map +1 -0
- package/dist/cli/flagValue.js +17 -0
- package/dist/cli/flagValue.js.map +1 -0
- package/dist/connectors/telegram/commands/botCore.d.ts +1 -0
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/botSkills.js +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.js +12 -9
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
- package/dist/connectors/telegram/commands/compaction.d.ts +11 -0
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +208 -22
- package/dist/connectors/telegram/commands/compaction.js.map +1 -1
- package/dist/connectors/telegram/commands/runners.d.ts +5 -1
- package/dist/connectors/telegram/commands/runners.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/runners.js +151 -30
- 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/runnerPairingMessages.d.ts +2 -7
- package/dist/connectors/telegram/runnerPairingMessages.d.ts.map +1 -1
- package/dist/connectors/telegram/runnerPairingMessages.js +5 -19
- 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 +63 -11
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +63 -11
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +63 -11
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +63 -11
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +63 -11
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +63 -11
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +63 -11
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +63 -11
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +63 -11
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +63 -11
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +63 -11
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +63 -11
- package/dist/i18n/zh.js.map +1 -1
- package/dist/installManager.d.ts.map +1 -1
- package/dist/installManager.js +3 -0
- package/dist/installManager.js.map +1 -1
- package/dist/instanceLock.d.ts.map +1 -1
- package/dist/instanceLock.js +2 -1
- package/dist/instanceLock.js.map +1 -1
- package/dist/outputTrace.d.ts +6 -0
- package/dist/outputTrace.d.ts.map +1 -1
- package/dist/outputTrace.js +13 -0
- package/dist/outputTrace.js.map +1 -1
- package/dist/platform/outbound.d.ts +14 -1
- package/dist/platform/outbound.d.ts.map +1 -1
- package/dist/platform/outbound.js.map +1 -1
- package/dist/remoteRun/cleanReport.d.ts +45 -0
- package/dist/remoteRun/cleanReport.d.ts.map +1 -0
- package/dist/remoteRun/cleanReport.js +84 -0
- package/dist/remoteRun/cleanReport.js.map +1 -0
- package/dist/remoteRun/cliArgs.d.ts +18 -0
- package/dist/remoteRun/cliArgs.d.ts.map +1 -1
- package/dist/remoteRun/cliArgs.js +100 -4
- package/dist/remoteRun/cliArgs.js.map +1 -1
- package/dist/remoteRun/commands.d.ts +30 -1
- package/dist/remoteRun/commands.d.ts.map +1 -1
- package/dist/remoteRun/commands.js +84 -9
- package/dist/remoteRun/commands.js.map +1 -1
- package/dist/remoteRun/exitCodes.d.ts +5 -0
- package/dist/remoteRun/exitCodes.d.ts.map +1 -1
- package/dist/remoteRun/exitCodes.js +6 -1
- package/dist/remoteRun/exitCodes.js.map +1 -1
- package/dist/remoteRun/foreground.d.ts +6 -0
- package/dist/remoteRun/foreground.d.ts.map +1 -1
- package/dist/remoteRun/foreground.js +13 -1
- package/dist/remoteRun/foreground.js.map +1 -1
- package/dist/remoteRun/interrupts.d.ts.map +1 -1
- package/dist/remoteRun/interrupts.js +2 -2
- package/dist/remoteRun/interrupts.js.map +1 -1
- package/dist/remoteRun/jobFiles.d.ts +6 -1
- package/dist/remoteRun/jobFiles.d.ts.map +1 -1
- package/dist/remoteRun/jobFiles.js +14 -0
- package/dist/remoteRun/jobFiles.js.map +1 -1
- package/dist/remoteRun/jobId.d.ts +5 -0
- package/dist/remoteRun/jobId.d.ts.map +1 -1
- package/dist/remoteRun/jobId.js +10 -0
- package/dist/remoteRun/jobId.js.map +1 -1
- package/dist/remoteRun/jobState.d.ts.map +1 -1
- package/dist/remoteRun/jobState.js +3 -2
- package/dist/remoteRun/jobState.js.map +1 -1
- package/dist/remoteRun/pairedRunners.d.ts +1 -1
- package/dist/remoteRun/pairedRunners.d.ts.map +1 -1
- package/dist/remoteRun/pairedRunners.js +4 -0
- package/dist/remoteRun/pairedRunners.js.map +1 -1
- package/dist/remoteRun/pathPatterns.d.ts +1 -1
- package/dist/remoteRun/pathPatterns.js +1 -1
- package/dist/remoteRun/probe.d.ts +58 -5
- package/dist/remoteRun/probe.d.ts.map +1 -1
- package/dist/remoteRun/probe.js +107 -11
- package/dist/remoteRun/probe.js.map +1 -1
- package/dist/remoteRun/probeTiming.d.ts +15 -0
- package/dist/remoteRun/probeTiming.d.ts.map +1 -0
- package/dist/remoteRun/probeTiming.js +23 -0
- package/dist/remoteRun/probeTiming.js.map +1 -0
- package/dist/remoteRun/project.d.ts +5 -0
- package/dist/remoteRun/project.d.ts.map +1 -1
- package/dist/remoteRun/project.js +10 -0
- package/dist/remoteRun/project.js.map +1 -1
- package/dist/remoteRun/projectConfig.d.ts +8 -1
- package/dist/remoteRun/projectConfig.d.ts.map +1 -1
- package/dist/remoteRun/projectConfig.js +18 -5
- package/dist/remoteRun/projectConfig.js.map +1 -1
- package/dist/remoteRun/pruneReport.d.ts +48 -0
- package/dist/remoteRun/pruneReport.d.ts.map +1 -0
- package/dist/remoteRun/pruneReport.js +80 -0
- package/dist/remoteRun/pruneReport.js.map +1 -0
- package/dist/remoteRun/remoteRunCli.d.ts +1 -1
- package/dist/remoteRun/remoteRunCli.d.ts.map +1 -1
- package/dist/remoteRun/remoteRunCli.js +20 -0
- package/dist/remoteRun/remoteRunCli.js.map +1 -1
- package/dist/remoteRun/runnerClient.d.ts +10 -0
- package/dist/remoteRun/runnerClient.d.ts.map +1 -1
- package/dist/remoteRun/runnerClient.js +19 -5
- package/dist/remoteRun/runnerClient.js.map +1 -1
- package/dist/remoteRun/runnerWait.d.ts.map +1 -1
- package/dist/remoteRun/runnerWait.js +2 -1
- package/dist/remoteRun/runnerWait.js.map +1 -1
- package/dist/remoteRun/runners.d.ts +48 -7
- package/dist/remoteRun/runners.d.ts.map +1 -1
- package/dist/remoteRun/runners.js +105 -40
- package/dist/remoteRun/runners.js.map +1 -1
- package/dist/remoteRun/runnersConfig.d.ts +24 -0
- package/dist/remoteRun/runnersConfig.d.ts.map +1 -1
- package/dist/remoteRun/runnersConfig.js +29 -2
- package/dist/remoteRun/runnersConfig.js.map +1 -1
- package/dist/remoteRun/ssh.d.ts +3 -3
- package/dist/remoteRun/ssh.d.ts.map +1 -1
- package/dist/remoteRun/ssh.js +19 -5
- package/dist/remoteRun/ssh.js.map +1 -1
- package/dist/remoteRun/submit.d.ts +1 -1
- package/dist/remoteRun/submit.d.ts.map +1 -1
- package/dist/remoteRun/submit.js +30 -2
- package/dist/remoteRun/submit.js.map +1 -1
- package/dist/runnerUtility/adminService.d.ts.map +1 -1
- package/dist/runnerUtility/adminService.js +5 -5
- package/dist/runnerUtility/adminService.js.map +1 -1
- package/dist/runnerUtility/appInstall.d.ts +9 -0
- package/dist/runnerUtility/appInstall.d.ts.map +1 -1
- package/dist/runnerUtility/appInstall.js +12 -2
- package/dist/runnerUtility/appInstall.js.map +1 -1
- package/dist/runnerUtility/execEnv.d.ts +1 -1
- package/dist/runnerUtility/execEnv.d.ts.map +1 -1
- package/dist/runnerUtility/execEnv.js +23 -5
- package/dist/runnerUtility/execEnv.js.map +1 -1
- package/dist/runnerUtility/guiAgentHeal.d.ts +3 -3
- package/dist/runnerUtility/guiAgentHeal.d.ts.map +1 -1
- package/dist/runnerUtility/guiAgentHeal.js +6 -4
- package/dist/runnerUtility/guiAgentHeal.js.map +1 -1
- package/dist/runnerUtility/homeFolders.d.ts +1 -0
- package/dist/runnerUtility/homeFolders.d.ts.map +1 -1
- package/dist/runnerUtility/homeFolders.js +2 -1
- package/dist/runnerUtility/homeFolders.js.map +1 -1
- package/dist/runnerUtility/iosCheck.d.ts +2 -0
- package/dist/runnerUtility/iosCheck.d.ts.map +1 -1
- package/dist/runnerUtility/iosCheck.js +12 -3
- package/dist/runnerUtility/iosCheck.js.map +1 -1
- package/dist/runnerUtility/isolatedCommand.d.ts +0 -2
- package/dist/runnerUtility/isolatedCommand.d.ts.map +1 -1
- package/dist/runnerUtility/isolatedCommand.js +4 -11
- package/dist/runnerUtility/isolatedCommand.js.map +1 -1
- package/dist/runnerUtility/keepAwake.d.ts +47 -10
- package/dist/runnerUtility/keepAwake.d.ts.map +1 -1
- package/dist/runnerUtility/keepAwake.js +108 -31
- package/dist/runnerUtility/keepAwake.js.map +1 -1
- package/dist/runnerUtility/launcher.d.ts +4 -0
- package/dist/runnerUtility/launcher.d.ts.map +1 -1
- package/dist/runnerUtility/launcher.js +31 -13
- package/dist/runnerUtility/launcher.js.map +1 -1
- package/dist/runnerUtility/linkLoop.d.ts +4 -0
- package/dist/runnerUtility/linkLoop.d.ts.map +1 -1
- package/dist/runnerUtility/linkLoop.js +15 -6
- package/dist/runnerUtility/linkLoop.js.map +1 -1
- package/dist/runnerUtility/managedNode.d.ts +84 -0
- package/dist/runnerUtility/managedNode.d.ts.map +1 -0
- package/dist/runnerUtility/managedNode.js +165 -0
- package/dist/runnerUtility/managedNode.js.map +1 -0
- package/dist/runnerUtility/nodeOnPath.d.ts +10 -0
- package/dist/runnerUtility/nodeOnPath.d.ts.map +1 -0
- package/dist/runnerUtility/nodeOnPath.js +49 -0
- package/dist/runnerUtility/nodeOnPath.js.map +1 -0
- package/dist/runnerUtility/nodeUpkeep.d.ts +140 -0
- package/dist/runnerUtility/nodeUpkeep.d.ts.map +1 -0
- package/dist/runnerUtility/nodeUpkeep.js +348 -0
- package/dist/runnerUtility/nodeUpkeep.js.map +1 -0
- package/dist/runnerUtility/nodeUpkeepTiming.d.ts +14 -0
- package/dist/runnerUtility/nodeUpkeepTiming.d.ts.map +1 -0
- package/dist/runnerUtility/nodeUpkeepTiming.js +21 -0
- package/dist/runnerUtility/nodeUpkeepTiming.js.map +1 -0
- package/dist/runnerUtility/packageManagerShims.d.ts +10 -0
- package/dist/runnerUtility/packageManagerShims.d.ts.map +1 -1
- package/dist/runnerUtility/packageManagerShims.js +67 -3
- package/dist/runnerUtility/packageManagerShims.js.map +1 -1
- package/dist/runnerUtility/pueueDaemon.d.ts +73 -8
- package/dist/runnerUtility/pueueDaemon.d.ts.map +1 -1
- package/dist/runnerUtility/pueueDaemon.js +90 -15
- package/dist/runnerUtility/pueueDaemon.js.map +1 -1
- package/dist/runnerUtility/runnerCommands.d.ts +7 -1
- package/dist/runnerUtility/runnerCommands.d.ts.map +1 -1
- package/dist/runnerUtility/runnerCommands.js +119 -16
- package/dist/runnerUtility/runnerCommands.js.map +1 -1
- package/dist/runnerUtility/runnerHome.d.ts +34 -0
- package/dist/runnerUtility/runnerHome.d.ts.map +1 -1
- package/dist/runnerUtility/runnerHome.js +17 -3
- package/dist/runnerUtility/runnerHome.js.map +1 -1
- package/dist/runnerUtility/serviceCommon.d.ts +2 -0
- package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
- package/dist/runnerUtility/serviceCommon.js +3 -1
- package/dist/runnerUtility/serviceCommon.js.map +1 -1
- package/dist/runnerUtility/serviceManager.d.ts.map +1 -1
- package/dist/runnerUtility/serviceManager.js +7 -2
- package/dist/runnerUtility/serviceManager.js.map +1 -1
- package/dist/runnerUtility/simctlGuard.d.ts +38 -0
- package/dist/runnerUtility/simctlGuard.d.ts.map +1 -0
- package/dist/runnerUtility/simctlGuard.js +166 -0
- package/dist/runnerUtility/simctlGuard.js.map +1 -0
- package/dist/runners/bootstrapLine.d.ts +3 -4
- package/dist/runners/bootstrapLine.d.ts.map +1 -1
- package/dist/runners/bootstrapLine.js +108 -83
- package/dist/runners/bootstrapLine.js.map +1 -1
- package/dist/runners/hubPackage.d.ts +1 -1
- package/dist/runners/hubPackage.d.ts.map +1 -1
- package/dist/runners/hubPackage.js +5 -6
- package/dist/runners/hubPackage.js.map +1 -1
- package/dist/runners/hubPairing.d.ts +19 -0
- package/dist/runners/hubPairing.d.ts.map +1 -1
- package/dist/runners/hubPairing.js +38 -0
- package/dist/runners/hubPairing.js.map +1 -1
- package/dist/runners/hubRegistry.d.ts +8 -0
- package/dist/runners/hubRegistry.d.ts.map +1 -1
- package/dist/runners/hubRegistry.js +6 -0
- package/dist/runners/hubRegistry.js.map +1 -1
- package/dist/runners/pairCode.d.ts +34 -3
- package/dist/runners/pairCode.d.ts.map +1 -1
- package/dist/runners/pairCode.js +65 -13
- package/dist/runners/pairCode.js.map +1 -1
- package/dist/runners/runnerGroups.d.ts +22 -0
- package/dist/runners/runnerGroups.d.ts.map +1 -0
- package/dist/runners/runnerGroups.js +41 -0
- package/dist/runners/runnerGroups.js.map +1 -0
- package/dist/runners/runnersCli.d.ts +5 -2
- package/dist/runners/runnersCli.d.ts.map +1 -1
- package/dist/runners/runnersCli.js +59 -9
- package/dist/runners/runnersCli.js.map +1 -1
- package/dist/runners/runnersList.d.ts +1 -1
- package/dist/runners/runnersList.d.ts.map +1 -1
- package/dist/runners/runnersList.js +3 -1
- package/dist/runners/runnersList.js.map +1 -1
- package/dist/runners/runnersOverview.d.ts.map +1 -1
- package/dist/runners/runnersOverview.js +8 -4
- package/dist/runners/runnersOverview.js.map +1 -1
- 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 +4 -5
- package/dist/scheduler/checkStatus.d.ts.map +1 -1
- package/dist/scheduler/checkStatus.js +11 -15
- package/dist/scheduler/checkStatus.js.map +1 -1
- package/dist/scheduler/delivery.d.ts +80 -37
- package/dist/scheduler/delivery.d.ts.map +1 -1
- package/dist/scheduler/delivery.js +121 -68
- package/dist/scheduler/delivery.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +13 -5
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +84 -34
- 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 +8 -2
- package/dist/scheduler/store.d.ts.map +1 -1
- package/dist/scheduler/store.js +25 -4
- package/dist/scheduler/store.js.map +1 -1
- package/dist/scheduler/types.d.ts +4 -10
- package/dist/scheduler/types.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.d.ts +49 -11
- package/dist/scheduler/workerWatch.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.js +57 -13
- package/dist/scheduler/workerWatch.js.map +1 -1
- package/dist/state.d.ts +95 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +145 -7
- package/dist/state.js.map +1 -1
- package/dist/testTimings.d.ts +6 -2
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +12 -1
- package/dist/testTimings.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/agentPlugin.d.ts +2 -1
- package/dist/utils/agentPlugin.d.ts.map +1 -1
- package/dist/utils/agentPlugin.js +2 -1
- package/dist/utils/agentPlugin.js.map +1 -1
- package/dist/utils/botSkills.d.ts +1 -1
- package/dist/utils/claudeApiAgentStop.d.ts +64 -0
- package/dist/utils/claudeApiAgentStop.d.ts.map +1 -0
- package/dist/utils/claudeApiAgentStop.js +85 -0
- package/dist/utils/claudeApiAgentStop.js.map +1 -0
- package/dist/utils/claudeApiCredit.d.ts +168 -0
- package/dist/utils/claudeApiCredit.d.ts.map +1 -0
- package/dist/utils/claudeApiCredit.js +260 -0
- package/dist/utils/claudeApiCredit.js.map +1 -0
- package/dist/utils/claudeApiCreditRecheck.d.ts +120 -0
- package/dist/utils/claudeApiCreditRecheck.d.ts.map +1 -0
- package/dist/utils/claudeApiCreditRecheck.js +173 -0
- package/dist/utils/claudeApiCreditRecheck.js.map +1 -0
- package/dist/utils/claudeCompactHook.d.ts +18 -10
- package/dist/utils/claudeCompactHook.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.js +35 -14
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeProfileUsageLines.d.ts +13 -1
- package/dist/utils/claudeProfileUsageLines.d.ts.map +1 -1
- package/dist/utils/claudeProfileUsageLines.js +75 -4
- package/dist/utils/claudeProfileUsageLines.js.map +1 -1
- package/dist/utils/claudeProfileUsageViews.d.ts +46 -0
- package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -0
- package/dist/utils/claudeProfileUsageViews.js +114 -0
- package/dist/utils/claudeProfileUsageViews.js.map +1 -0
- package/dist/utils/claudeProfiles.d.ts +15 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +54 -0
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +97 -36
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +142 -61
- 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/compactOnIdle.d.ts +140 -15
- package/dist/utils/compactOnIdle.d.ts.map +1 -1
- package/dist/utils/compactOnIdle.js +209 -23
- package/dist/utils/compactOnIdle.js.map +1 -1
- package/dist/utils/compactSelfReviewFlags.d.ts +50 -0
- package/dist/utils/compactSelfReviewFlags.d.ts.map +1 -0
- package/dist/utils/compactSelfReviewFlags.js +120 -0
- package/dist/utils/compactSelfReviewFlags.js.map +1 -0
- package/dist/utils/fallbackChain.d.ts +18 -7
- package/dist/utils/fallbackChain.d.ts.map +1 -1
- package/dist/utils/fallbackChain.js +28 -12
- package/dist/utils/fallbackChain.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/openCodeCompactPlugin.d.ts +28 -7
- package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
- package/dist/utils/openCodeCompactPlugin.js +80 -15
- package/dist/utils/openCodeCompactPlugin.js.map +1 -1
- 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 +51 -20
- package/dist/utils/runnersScreenPlan.d.ts.map +1 -1
- package/dist/utils/runnersScreenPlan.js +143 -28
- package/dist/utils/runnersScreenPlan.js.map +1 -1
- package/dist/utils/streamedCompactionSummary.d.ts +65 -0
- package/dist/utils/streamedCompactionSummary.d.ts.map +1 -0
- package/dist/utils/streamedCompactionSummary.js +108 -0
- package/dist/utils/streamedCompactionSummary.js.map +1 -0
- 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/telegramError.d.ts +6 -0
- package/dist/utils/telegramError.d.ts.map +1 -1
- package/dist/utils/telegramError.js +30 -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/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/package.json +2 -2
- package/remoteRun/ensureNode.sh +288 -0
- package/remoteRun/runner.sh +2252 -115
- package/agent-plugin/skills/charness-manager/SKILL.md +0 -156
- package/remoteRun/pickNode.sh +0 -65
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../src/scheduler/delivery.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../src/scheduler/delivery.ts"],"names":[],"mappings":";;;AAqJA,8DAGC;AAaD,sDAmBC;AA6BD,oEAkBC;AAMD,0DAIC;AA+ED,oDAWC;AAgGD,wDA2BC;AAtcD,kCAA4B;AAC5B,wEAAwE;AACxE,oDAAgF;AAChF,yCASoB;AACpB,+CAUuB;AACvB,iDAA+E;AAC/E,6CAA+C;AAC/C,iDAA0D;AAE1D,+CAA2G;AAC3G,oDAAyE;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,kFAAkF;AACrE,QAAA,oBAAoB,GAAG,mBAAmB,CAAC;AAqExD;;;;;;;;;GASG;AACH,SAAgB,yBAAyB,CAAC,OAAe,EAAE,MAAc,EAAE,UAAgC,EAAE;IAC3G,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO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E;YAChF,QAAQ,EAAE,yBAAyB,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC;SACvE,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -76,8 +76,12 @@ export declare const schedulerMcpPendingCancellationTtlMs = 30000;
|
|
|
76
76
|
/** Global memory bound shared by pending-cancellation and recent-completion tombstones. */
|
|
77
77
|
export declare const schedulerMcpPendingCancellationMax = 1000;
|
|
78
78
|
/**
|
|
79
|
-
* Claude Code cuts a server's connect-time `instructions` that are longer than this: whatever comes last is lost, silently.
|
|
80
|
-
*
|
|
79
|
+
* Claude Code cuts a server's connect-time `instructions` that are longer than this: whatever comes last is lost, silently. Measured, not
|
|
80
|
+
* assumed (commit 39455c20): a Telegram text of 4,029 characters without the remote-run bullet reached an agent with no bullet and no runner
|
|
81
|
+
* line — they began at character 3,932. The Telegram text is within a few hundred characters of it before that bullet, so the runner lines
|
|
82
|
+
* are fitted to the room that is left. Pinned in `todoRegistryMcp.test.ts` (every platform, the skills on and off, 40 runner lines of the
|
|
83
|
+
* longest kind) and `remoteRunMcpInstructions.test.ts`: any bullet that grows past it fails them, as the first, longer wording of the
|
|
84
|
+
* orchestration hint did.
|
|
81
85
|
*/
|
|
82
86
|
export declare const claudeCodeInstructionsMaxLength = 4096;
|
|
83
87
|
/** What the `claude_profiles` tool asks the bot: the model, and for a resumed session the account it last ran on. */
|
|
@@ -110,7 +114,7 @@ export interface OptionalBotTools {
|
|
|
110
114
|
* a Telegram session has the scheduling and send-to-topic tools, so only its
|
|
111
115
|
* instructions name them (Jira connector plan J2, D18); an optional tool is named
|
|
112
116
|
* only where it is offered. With the bot's skills off for the session
|
|
113
|
-
* (`isBotSkillsEnabled`, `/bot_skills`) the orchestration bullet no longer tells it to load `charness-
|
|
117
|
+
* (`isBotSkillsEnabled`, `/bot_skills`) the orchestration bullet no longer tells it to load `charness-orchestration`.
|
|
114
118
|
*/
|
|
115
119
|
export declare function buildMcpServerInstructions(platform: PlatformId | null, offered: OptionalBotTools, isBotSkillsEnabled: boolean): string;
|
|
116
120
|
/**
|
|
@@ -186,8 +190,12 @@ export interface SchedulerMcpDeps {
|
|
|
186
190
|
getThreadsForDirectory: (directory: string) => string[];
|
|
187
191
|
/** Last-used adapter name for a thread, for the `lastAdapterName` snapshot. */
|
|
188
192
|
getThreadAdapterName: (threadKey: string) => string | undefined;
|
|
189
|
-
/**
|
|
190
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Unpin these messages of the thread — the old alert pins of a cancelled check — and resolve with the ids that are STILL
|
|
195
|
+
* pinned and worth another try (Telegram did not answer, asked to slow down, failed). A message that is gone, was never
|
|
196
|
+
* pinned or cannot be unpinned any more is final: it is not in the list. Never rejects.
|
|
197
|
+
*/
|
|
198
|
+
unpinMessages: (threadKey: string, messageIds: readonly number[]) => Promise<number[]>;
|
|
191
199
|
/** Delete a message of the thread (best-effort: one that is gone or too old to delete is skipped) — a cancelled check's status line. */
|
|
192
200
|
deleteMessage: (threadKey: string, messageId: number) => Promise<void>;
|
|
193
201
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcpSurface.d.ts","sourceRoot":"","sources":["../../src/scheduler/mcpSurface.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAmC,KAAK,UAAU,EAAmB,MAAM,eAAe,CAAC;AAGlG,OAAO,
|
|
1
|
+
{"version":3,"file":"mcpSurface.d.ts","sourceRoot":"","sources":["../../src/scheduler/mcpSurface.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAmC,KAAK,UAAU,EAAmB,M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M,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9D,KAAK,EAAE,MAAM,GACZ,eAAe,CAwBjB;AAgiBD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,cAAc,EACrB,eAAe,EAAE,MAAM,EACvB,sBAAsB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,EAAE,GACtD,OAAO,CAGT;AAED,uEAAuE;AACvE,eAAO,MAAM,+BAA+B,KAAK,CAAC;AA8ElD,UAAU,6BAA6B;IACrC,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,UAAU,iCAAiC;IACzC,eAAe,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,6BAA6B,CAAC;IACjG,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACnG;AAED,6EAA6E;AAC7E,MAAM,WAAW,wCAAwC;IACvD,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uCAAuC,CACrD,OAAO,GAAE,wCAA6C,GACrD,iCAAiC,CAsGnC;AAqJD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,kBAAkB,CAqNnF"}
|
|
@@ -30,6 +30,7 @@ const botSkills_1 = require("../utils/botSkills");
|
|
|
30
30
|
const claudeProfiles_1 = require("../utils/claudeProfiles");
|
|
31
31
|
const claudeUsage_1 = require("../utils/claudeUsage");
|
|
32
32
|
const isoTimestamp_1 = require("../utils/isoTimestamp");
|
|
33
|
+
const localClock_1 = require("../utils/localClock");
|
|
33
34
|
const messageSendService_1 = require("../utils/messageSendService");
|
|
34
35
|
const utils_1 = require("../utils");
|
|
35
36
|
const checkRun_1 = require("./checkRun");
|
|
@@ -116,19 +117,32 @@ const schedulerMcpClientIdPattern = /^[A-Za-z0-9._:-]+$/;
|
|
|
116
117
|
/** Server identity reported in the MCP `initialize` handshake. */
|
|
117
118
|
const mcpServerName = 'telegram-bot-scheduler';
|
|
118
119
|
const mcpServerVersion = '1.0.0';
|
|
119
|
-
/**
|
|
120
|
-
|
|
120
|
+
/**
|
|
121
|
+
* The skill an orchestrating agent loads in a bot session, as each CLI names it. An ADD-ON, loaded together with the
|
|
122
|
+
* session's own manager skill (which keeps the delivery policy): never «instead of» it, or the bot's skill would switch the
|
|
123
|
+
* owner's or the project's off. A session with no manager skill is sent on to the fallback by the add-on itself.
|
|
124
|
+
*/
|
|
125
|
+
const managerSkillInstruction = 'load `charness-orchestration` (Claude Code: `charness:charness-orchestration`) together with your manager skill — it adds the bot\'s tools';
|
|
121
126
|
/** The instruction bullets that hold on every platform (the two platform-neutral tools). */
|
|
122
127
|
const compactConversationInstruction = '• The user EXPLICITLY asks to compact/shrink/summarize this conversation\'s context → compact_conversation. Never on your own judgement.';
|
|
123
128
|
const answerRequestInstruction = '• A message carries a "[Request <id> · from: …]" header → answer it through answer_request with that id: kind "final" with the full result at the end of your turn, "question" when you need the requester before you can go on (their reply arrives as a new request), "progress" for an interim note. Only question/final close the request. ' +
|
|
124
129
|
answerStyle_1.answerStyleInstruction;
|
|
125
130
|
/** The shared todo registry's bullet (D7) — Telegram topics and Jira issues publish alike. */
|
|
126
131
|
const todoInstruction = '• BEFORE you start any task (fixes you found yourself included: a failing test, a leak) → todo_update adds it as inWork, naming the area (files, tests). Check the returned board for overlap with other agents. Take the queue top-down; mark items done / dropped at once. A ticket you create in a tracker gets an item with its key in `ref`.';
|
|
127
|
-
/** The `charness remote-run` bullet — present only while a runner is paired or listed in `runners.json`, for Telegram topics and tracker issues alike. The CLI's own `--help` has the job commands. */
|
|
128
|
-
const remoteRunInstruction = '• Heavy work (test suite, build, e2e run) → send it to a runner, not this machine: `charness remote-run runners` lists them and what each can do; `charness remote-run [--needs android|ios|docker|playwright] <command>` (iOS: `--needs ios`) runs it in a copy of this project, returns output and exit code (edit files only here). Longer than your tool timeout: `charness remote-run --bg <command>`, then `charness remote-run wait <id>` in the background; `charness remote-run --help` lists the rest.';
|
|
129
132
|
/**
|
|
130
|
-
*
|
|
131
|
-
* text is
|
|
133
|
+
* The `charness remote-run` bullet — present only while a runner is paired or listed in `runners.json`, for Telegram topics and tracker issues alike. The CLI's own `--help` has the job commands. It is the longest
|
|
134
|
+
* line of the Telegram text, and that text is near Claude Code's cut (`claudeCodeInstructionsMaxLength`): every character here is a runner line less, so the `clean` sentence is the shortest that says when (the LAST task of a project folder: one folder is ONE copy on a runner, shared by every task run from it) and what not to do,
|
|
135
|
+
* the sentence on jobs side by side names the two variables a job is given (its ports and its own iOS simulator: `docs/remote-run.md`, «Jobs beside each other») and the command and the alias that reach the others' simulators,
|
|
136
|
+
* and the capability names (`runners` shows them per runner) are not spelled out.
|
|
137
|
+
*/
|
|
138
|
+
const remoteRunInstruction = '• Heavy work (test suite, build, e2e run) → run it on a runner, not here: `charness remote-run runners` lists them and what each can do; `charness remote-run [--needs <capability>] <command>` (iOS: `--needs ios`) runs it in a copy of this project, returns output and exit code (edit files only here). Bind ports from `$REMOTE_RUN_PORT_BASE`, simulator `$REMOTE_RUN_IOS_SIMULATOR_UDID`, never `simctl shutdown all` or `booted`. Longer than your tool timeout: `charness remote-run --bg <command>`, then `charness remote-run wait <id>` in the background. Folder\'s last task closed → `charness remote-run clean`, never others\' copies; `--help`: the rest.';
|
|
139
|
+
/**
|
|
140
|
+
* Claude Code cuts a server's connect-time `instructions` that are longer than this: whatever comes last is lost, silently. Measured, not
|
|
141
|
+
* assumed (commit 39455c20): a Telegram text of 4,029 characters without the remote-run bullet reached an agent with no bullet and no runner
|
|
142
|
+
* line — they began at character 3,932. The Telegram text is within a few hundred characters of it before that bullet, so the runner lines
|
|
143
|
+
* are fitted to the room that is left. Pinned in `todoRegistryMcp.test.ts` (every platform, the skills on and off, 40 runner lines of the
|
|
144
|
+
* longest kind) and `remoteRunMcpInstructions.test.ts`: any bullet that grows past it fails them, as the first, longer wording of the
|
|
145
|
+
* orchestration hint did.
|
|
132
146
|
*/
|
|
133
147
|
exports.claudeCodeInstructionsMaxLength = 4096;
|
|
134
148
|
/**
|
|
@@ -149,7 +163,7 @@ function buildRemoteRunInstruction(runnerLines, shownCount) {
|
|
|
149
163
|
}
|
|
150
164
|
const orchestrationInstructionHead = '• You orchestrate detached workers (a `claude -p` / `opencode run` builder, reviewer, researcher) →';
|
|
151
165
|
/** What the worker-watch recipe says once a tool is named: shared by both wordings of the Telegram bullet. */
|
|
152
|
-
const workerWatchRecipeText =
|
|
166
|
+
const workerWatchRecipeText = 'its description has the recipe (checkCommand, cron, status arguments); never `kill -0` alone: it never fires on a hung worker.';
|
|
153
167
|
/**
|
|
154
168
|
* The orchestration bullet of a conversation on a tracker, which has no scheduling tools: only the manager-skill hint, so
|
|
155
169
|
* with the bot's skills off (`/bot_skills`) there is nothing left of it and `null` drops it.
|
|
@@ -181,7 +195,7 @@ When to use it:
|
|
|
181
195
|
• You want to deliver SEVERAL discrete messages (each its own message, e.g. a per-item news digest) → send_messages_to_user; an item may attach ONE file (the text becomes its caption).
|
|
182
196
|
${compactConversationInstruction}
|
|
183
197
|
${isTodoToolOffered ? `${todoInstruction}\n` : ''}• You need to review or remove scheduled jobs → schedule_list / schedule_cancel.
|
|
184
|
-
• You need a watchdog — keep an eye on a service, build, deploy, disk, URL… → schedule_create with \`checkCommand\` (cron): the bot runs it in this folder, stays silent while it exits 0, and on the first failure
|
|
198
|
+
• You need a watchdog — keep an eye on a service, build, deploy, disk, URL… → schedule_create with \`checkCommand\` (cron): the bot runs it in this folder, stays silent while it exits 0, and on the first failure posts a notice and wakes you with \`prompt\` + the exit code and output tail. Checks survive restarts and crashes. NEVER build your own watcher (background loop, nohup, sleep loop, tmux pane, shell crontab): it dies with your session or a restart, silently.
|
|
185
199
|
${buildTelegramOrchestrationInstruction(isBotSkillsEnabled)}
|
|
186
200
|
${answerRequestInstruction} The requester may not see your plain text: anything they must read goes through answer_request — yet your plain text is relayed into the topic too, so end the turn WITHOUT a recap of what you answered (it would show twice).
|
|
187
201
|
${claudeProfilesInstruction}${remoteRunInstructionText === null ? '' : `\n${remoteRunInstructionText}`}
|
|
@@ -216,7 +230,7 @@ Each tool's own description has the exact argument recipe.`;
|
|
|
216
230
|
* a Telegram session has the scheduling and send-to-topic tools, so only its
|
|
217
231
|
* instructions name them (Jira connector plan J2, D18); an optional tool is named
|
|
218
232
|
* only where it is offered. With the bot's skills off for the session
|
|
219
|
-
* (`isBotSkillsEnabled`, `/bot_skills`) the orchestration bullet no longer tells it to load `charness-
|
|
233
|
+
* (`isBotSkillsEnabled`, `/bot_skills`) the orchestration bullet no longer tells it to load `charness-orchestration`.
|
|
220
234
|
*/
|
|
221
235
|
function buildMcpServerInstructions(platform, offered, isBotSkillsEnabled) {
|
|
222
236
|
const render = (remoteRunInstructionText) => {
|
|
@@ -489,10 +503,11 @@ const scheduleCreateShape = {
|
|
|
489
503
|
.optional()
|
|
490
504
|
.describe('Makes the job a WATCHDOG CHECK: a shell command (run with /bin/sh -c in the bound folder) the bot ' +
|
|
491
505
|
'executes at every fire instead of waking you. Exit 0 = healthy, nothing is posted. The first ' +
|
|
492
|
-
'non-zero exit or timeout
|
|
506
|
+
'non-zero exit or timeout tells the topic in one line (never the command) and wakes you with `prompt` plus the exit ' +
|
|
493
507
|
'code and output tail; later failures stay silent until a run passes again (the topic is told). ' +
|
|
494
508
|
'Keep it a quick probe, e.g. `systemctl --user is-active myapp`, `curl -fsS -m 10 http://127.0.0.1:8080/health`, ' +
|
|
495
|
-
'`test $(df --output=pcent / | tail -1 | tr -dc 0-9) -lt 90`; a detached worker: the recipe in the tool description.'
|
|
509
|
+
'`test $(df --output=pcent / | tail -1 | tr -dc 0-9) -lt 90`; a detached worker: the recipe in the tool description. ' +
|
|
510
|
+
'Use ABSOLUTE paths only: it runs in the topic\'s folder, so a relative path or `~` points elsewhere.'),
|
|
496
511
|
checkTimeoutSeconds: zod_1.z
|
|
497
512
|
.number()
|
|
498
513
|
.int()
|
|
@@ -528,7 +543,7 @@ const scheduleCreateShape = {
|
|
|
528
543
|
isPinSilent: zod_1.z
|
|
529
544
|
.boolean()
|
|
530
545
|
.optional()
|
|
531
|
-
.describe('
|
|
546
|
+
.describe('DEPRECATED, has no effect: scheduled messages and check alerts are never pinned. Do not pass it.'),
|
|
532
547
|
threadKey: threadKeyArgSchema,
|
|
533
548
|
};
|
|
534
549
|
const scheduleCreateInput = (0, strictToolInput_1.createStrictToolInput)(scheduleCreateShape);
|
|
@@ -713,6 +728,25 @@ function summarizeRecord(record) {
|
|
|
713
728
|
const statusNote = hasStatusSource ? `; status every ${record.statusEveryMinutes ?? checkStatus_1.defaultCheckStatusEveryMinutes} min` : '';
|
|
714
729
|
return `${record.name} (id: ${record.id}) — ${(0, recurrence_1.describeSchedule)(record.spec)}${checkNote}${statusNote}; next run: ${next}${pausedNote}`;
|
|
715
730
|
}
|
|
731
|
+
/**
|
|
732
|
+
* The `schedule_create` confirmation, which also lands in the topic as a tool result: one line a person reads, with WHAT and
|
|
733
|
+
* WHEN («Scheduled "Nightly build": daily at 02:00; next: 2026-06-07 02:00» / «Scheduled "API health": checks every 5m; next:
|
|
734
|
+
* …») and, on the next, the id the agent needs to cancel it. The «next» stamp is the instance-local time, so a schedule that
|
|
735
|
+
* was read in the wrong timezone shows at once; a cron nothing phrases shows only that (never the raw expression), and a
|
|
736
|
+
* one-shot's phrase already is its time. The command and the status rhythm are in `schedule_list`.
|
|
737
|
+
*/
|
|
738
|
+
function summarizeCreated(record) {
|
|
739
|
+
const isCheck = (0, deliveryKind_1.checkIsCheckSchedule)(record);
|
|
740
|
+
const phrase = (0, recurrence_1.describePhrasedSchedule)(record.spec);
|
|
741
|
+
const parts = [];
|
|
742
|
+
if (phrase !== null)
|
|
743
|
+
parts.push(isCheck ? `checks ${phrase}` : phrase);
|
|
744
|
+
else if (isCheck)
|
|
745
|
+
parts.push('checks');
|
|
746
|
+
if (record.spec.kind === 'cron' && record.nextRunAt !== null)
|
|
747
|
+
parts.push(`next: ${(0, localClock_1.formatLocalDateAndClock)(record.nextRunAt)}`);
|
|
748
|
+
return `Scheduled "${record.name}": ${parts.join('; ')}\nid: ${record.id}`;
|
|
749
|
+
}
|
|
716
750
|
// ─── tool handlers (scope-bound) ─────────────────────────────────────
|
|
717
751
|
/**
|
|
718
752
|
* @description Register the three scoped tools onto a fresh {@link McpServer}.
|
|
@@ -723,8 +757,8 @@ function summarizeRecord(record) {
|
|
|
723
757
|
function registerSchedulerTools(server, deps, scope) {
|
|
724
758
|
server.registerTool('schedule_create', {
|
|
725
759
|
title: 'Create a scheduled prompt',
|
|
726
|
-
description: 'Schedule a prompt to be delivered to this topic later.
|
|
727
|
-
'forwards the prompt to the agent
|
|
760
|
+
description: 'Schedule a prompt to be delivered to this topic later. At fire time the bot posts a short silent line ' +
|
|
761
|
+
'(name and schedule, the prompt folded under it) and forwards the prompt to the agent. The line is never pinned.\n\n' +
|
|
728
762
|
'Pick exactly ONE mode:\n' +
|
|
729
763
|
'• one-shot (run once at a time): pass onceAt (ISO 8601); omit cron and repeatCount.\n' +
|
|
730
764
|
'• recurring: pass cron (5-field); omit onceAt.\n' +
|
|
@@ -743,9 +777,11 @@ function registerSchedulerTools(server, deps, scope) {
|
|
|
743
777
|
'background loop, nohup, a sleep loop, a tmux pane, a shell crontab) — it dies with your session ' +
|
|
744
778
|
'or a restart and then fails silently.\n\n' +
|
|
745
779
|
`A DETACHED WORKER you launched (a \`claude -p\` / \`opencode run\` process): cron \`${workerWatch_1.workerWatchCheckCron}\`, ` +
|
|
746
|
-
`\`${workerWatch_1.
|
|
747
|
-
|
|
748
|
-
'
|
|
780
|
+
`\`${workerWatch_1.workerWatchStatusArguments}\`, checkCommand \`${workerWatch_1.workerWatchCheckCommand}\` with its PID and run dir (an absolute path) — it fails when ` +
|
|
781
|
+
`the worker exits, OR nothing in its run dir changed for ${workerWatch_1.workerWatchSilenceMinutes} min, OR the watch was armed ${workerWatch_1.workerWatchUnreportedMinutes} min ago (\`touch <run-dir>/${workerWatch_1.workerWatchArmedFileName}\` ` +
|
|
782
|
+
'right before you arm it — a resumed worker\'s reused run dir too — and again when you looked and found the worker fine: the same check then passes and watches on, ' +
|
|
783
|
+
'so do not arm a second one; a run dir without the file fails at once with exit 4), so the first failure is also the "worker finished" ' +
|
|
784
|
+
'signal (the topic then reads «worker finished», «worker silent» or «running without a report», never the command). Never `kill -0` alone: it stays green ' +
|
|
749
785
|
'while a worker hangs. The status arguments make the BOT post a silent status line into the topic every ' +
|
|
750
786
|
`${workerWatch_1.workerWatchStatusEveryMinutes} min while the worker lives (works N min, its last action), so the topic never looks frozen — ` +
|
|
751
787
|
'without waking you or spending tokens: never arm a schedule of your own for status lines. One check per worker run; ' +
|
|
@@ -792,7 +828,6 @@ function registerSchedulerTools(server, deps, scope) {
|
|
|
792
828
|
createdBy: 'agent',
|
|
793
829
|
nowMs,
|
|
794
830
|
lastAdapterName: deps.getThreadAdapterName(resolved.threadKey),
|
|
795
|
-
isPinSilent: args.isPinSilent,
|
|
796
831
|
...(checkCommand
|
|
797
832
|
? { deliveryKind: 'check', checkCommand, checkTimeoutSec: args.checkTimeoutSeconds }
|
|
798
833
|
: {}),
|
|
@@ -807,7 +842,7 @@ function registerSchedulerTools(server, deps, scope) {
|
|
|
807
842
|
const record = created.record;
|
|
808
843
|
deps.armJob(record);
|
|
809
844
|
const noteSuffix = notes.map((note) => `\n\nℹ️ ${note}`).join('');
|
|
810
|
-
return textResult(
|
|
845
|
+
return textResult(`${summarizeCreated(record)}${noteSuffix}`);
|
|
811
846
|
});
|
|
812
847
|
server.registerTool('schedule_list', {
|
|
813
848
|
title: 'List scheduled prompts',
|
|
@@ -841,8 +876,8 @@ function registerSchedulerTools(server, deps, scope) {
|
|
|
841
876
|
server.registerTool('schedule_cancel', {
|
|
842
877
|
title: 'Cancel a scheduled prompt',
|
|
843
878
|
description: 'Cancel (delete) a scheduled prompt by its id. Only schedules owned by this topic can be cancelled. Cancelling a ' +
|
|
844
|
-
'watchdog check also
|
|
845
|
-
'
|
|
879
|
+
'watchdog check also deletes its status line — cancel a worker watch once its wake is handled, so a finished worker ' +
|
|
880
|
+
'leaves no status line behind.',
|
|
846
881
|
inputSchema: scheduleCancelInput,
|
|
847
882
|
}, async (args) => {
|
|
848
883
|
const resolved = resolveTargetThreadKey(scope, args.threadKey, deps.getThreadsForDirectory);
|
|
@@ -860,10 +895,15 @@ function registerSchedulerTools(server, deps, scope) {
|
|
|
860
895
|
await deps.store.removeSchedule(args.id);
|
|
861
896
|
deps.disarmJob(args.id);
|
|
862
897
|
const cleanedUp = [];
|
|
898
|
+
// Nothing pins a check alert any more, but a job made by an earlier version may still carry the ids of the ones it pinned.
|
|
863
899
|
const alertPins = record.alertPinMessageIds ?? [];
|
|
864
900
|
if (alertPins.length > 0) {
|
|
865
|
-
await deps.unpinMessages(record.threadKey, alertPins);
|
|
866
|
-
|
|
901
|
+
const stillPinned = await deps.unpinMessages(record.threadKey, alertPins);
|
|
902
|
+
const unpinnedCount = alertPins.length - stillPinned.length;
|
|
903
|
+
if (unpinnedCount > 0)
|
|
904
|
+
cleanedUp.push(`its ${unpinnedCount} pinned alert(s) unpinned`);
|
|
905
|
+
if (stillPinned.length > 0)
|
|
906
|
+
cleanedUp.push(`${stillPinned.length} pinned alert(s) could not be unpinned (Telegram did not answer — unpin by hand)`);
|
|
867
907
|
}
|
|
868
908
|
// A "⏳ works …" line left under a cancelled watch would be wrong: the watch no longer says anything.
|
|
869
909
|
if (record.statusMessageId !== undefined) {
|
|
@@ -1345,11 +1385,13 @@ function registerBotTools(server, deps, scope, platform, requestSignal) {
|
|
|
1345
1385
|
/** The first line of the `claude_profiles` answer: the pick with how to launch it and why, or that nothing is usable and when something is. */
|
|
1346
1386
|
function buildClaudeProfilesVerdict(report, currentProfile) {
|
|
1347
1387
|
const outcome = (0, claudeUsage_1.describeClaudeLaunchOutcome)(report, currentProfile);
|
|
1388
|
+
const exclusions = (0, claudeUsage_1.describeClaudeChainExclusions)(report);
|
|
1389
|
+
const notOffered = exclusions === null ? '' : ` [${exclusions}]`;
|
|
1348
1390
|
if (report.recommended === null)
|
|
1349
|
-
return outcome
|
|
1391
|
+
return `${outcome}${notOffered}`;
|
|
1350
1392
|
const dir = report.profiles.find((profile) => profile.name === report.recommended)?.configDir ?? null;
|
|
1351
1393
|
const launch = dir === null ? 'default profile, set no CLAUDE_CONFIG_DIR' : `CLAUDE_CONFIG_DIR=${dir}`;
|
|
1352
|
-
return `recommended: ${report.recommended} → ${launch} (${outcome})`;
|
|
1394
|
+
return `recommended: ${report.recommended} → ${launch} (${outcome})${notOffered}`;
|
|
1353
1395
|
}
|
|
1354
1396
|
/**
|
|
1355
1397
|
* `claude_profiles`: which Claude account a child process should run on. Reads the bot's per-profile usage
|
|
@@ -1361,15 +1403,23 @@ function registerClaudeProfilesTool(server, listClaudeProfiles) {
|
|
|
1361
1403
|
title: 'Claude accounts and their usage',
|
|
1362
1404
|
description: 'The Claude account profiles signed in on this host, each with its usage windows — session (5 h), weekly ' +
|
|
1363
1405
|
'(all models) and weekly Fable — as percent used + reset instant, and `recommended`: the account a process of ' +
|
|
1364
|
-
'the model you pass should run on.
|
|
1365
|
-
'
|
|
1366
|
-
'
|
|
1367
|
-
'
|
|
1368
|
-
'
|
|
1369
|
-
'
|
|
1370
|
-
'
|
|
1371
|
-
'
|
|
1372
|
-
'
|
|
1406
|
+
'the model you pass should run on. `recommended` follows the operator\'s /limits auto-switch list: once it names a ' +
|
|
1407
|
+
'Claude account, only accounts with an enabled rung there are offered (the others carry `chainExclusion`, also for a ' +
|
|
1408
|
+
'session you resume). A NEW agent (omit `currentProfile`) goes to an `api`-billed account of the list first while its ' +
|
|
1409
|
+
'credit lasts (a Claude Console balance, no windows), then to the usable subscription whose weekly limit resets ' +
|
|
1410
|
+
'SOONEST — what burns soonest is spent first; an account whose five-hour window is at 90 % or more is skipped until ' +
|
|
1411
|
+
'it resets. Take the account `recommended` names; no need to ask the operator. A session you RESUME (pass ' +
|
|
1412
|
+
'`currentProfile`, the profile it last ran on) stays on it unless that account is signed out, limited, out of the ' +
|
|
1413
|
+
'list or at 100 % on a window the model drains; when it broke off on a usage limit — or on "Credit balance is too ' +
|
|
1414
|
+
'low" — pass `isStoppedByLimit: true` and resume the SAME session at once on the answer (for an `api` account the bot ' +
|
|
1415
|
+
'first checks the balance with one tiny request: it marks the credit used up only if the API refuses for it, else it ' +
|
|
1416
|
+
'keeps the account off agents for an hour). The session window and the shared weekly window bound every model, Fable ' +
|
|
1417
|
+
'included; Fable also drains its own weekly window; signed-out and limited accounts are skipped. An `api` entry ' +
|
|
1418
|
+
'also carries the bot\'s own estimate of its API credit — `spentUsd` through the bot in the current credit period, ' +
|
|
1419
|
+
'`remainingEstimateUsd` and `expiresOn` when the operator gave a Console figure (null otherwise; `expiresOn` stays null ' +
|
|
1420
|
+
'after a renewal), `probablyUsedUp` after a refusal for the balance (the bot cannot be sure; it rechecks daily) and ' +
|
|
1421
|
+
'`renewedAt` once it saw the credit come back — never the Console balance; past a given `expiresOn` it is not put ' +
|
|
1422
|
+
'first. `recommended: null` means nothing is usable now: ' +
|
|
1373
1423
|
'`nextAvailable` names the account and instant that frees up first — schedule ONE resume at that time instead ' +
|
|
1374
1424
|
'of retrying; when `nextAvailable` is null too, tell the user and retry once in about 30 minutes. Call it BEFORE launching or resuming a child `claude` and start the child with ' +
|
|
1375
1425
|
'CLAUDE_CONFIG_DIR=<configDir> in its environment — configDir null means the default profile: set nothing. ' +
|