charness 4.2.0 → 4.3.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 +157 -2
- package/DEVELOPMENT.md +58 -10
- package/LICENSE +331 -151
- package/MIGRATION_3_TO_4.md +8 -5
- package/README.md +21 -9
- package/SETUP.md +54 -10
- package/agent-plugin/README.md +10 -3
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +18 -27
- package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +5 -3
- package/agent-plugin/skills/charness-orchestration/SKILL.md +56 -16
- package/dist/adapters/claudeCliAdapter.d.ts +4 -0
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeCliAdapter.js +13 -0
- package/dist/adapters/claudeCliAdapter.js.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +136 -10
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +365 -77
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/createAdapter.d.ts +12 -3
- package/dist/adapters/createAdapter.d.ts.map +1 -1
- package/dist/adapters/createAdapter.js +39 -13
- package/dist/adapters/createAdapter.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +34 -0
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +118 -11
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/apiErrorRetry.d.ts +11 -3
- package/dist/apiErrorRetry.d.ts.map +1 -1
- package/dist/apiErrorRetry.js +33 -3
- package/dist/apiErrorRetry.js.map +1 -1
- package/dist/apiRetryKick.d.ts +3 -2
- package/dist/apiRetryKick.d.ts.map +1 -1
- package/dist/apiRetryKick.js +13 -5
- package/dist/apiRetryKick.js.map +1 -1
- package/dist/bot.d.ts +2 -6
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +2009 -634
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +28 -6
- package/dist/cli/claudeProfiles.d.ts.map +1 -1
- package/dist/cli/claudeProfiles.js +89 -22
- package/dist/cli/claudeProfiles.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/connectors/jira/answerSink.d.ts +102 -7
- package/dist/connectors/jira/answerSink.d.ts.map +1 -1
- package/dist/connectors/jira/answerSink.js +364 -60
- package/dist/connectors/jira/answerSink.js.map +1 -1
- package/dist/connectors/jira/answerThreads.d.ts +44 -0
- package/dist/connectors/jira/answerThreads.d.ts.map +1 -0
- package/dist/connectors/jira/answerThreads.js +85 -0
- package/dist/connectors/jira/answerThreads.js.map +1 -0
- package/dist/connectors/jira/client.d.ts +67 -2
- package/dist/connectors/jira/client.d.ts.map +1 -1
- package/dist/connectors/jira/client.js +176 -4
- package/dist/connectors/jira/client.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +6 -0
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +14 -1
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +19 -0
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +68 -6
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/contextPreamble.d.ts.map +1 -1
- package/dist/connectors/jira/contextPreamble.js +6 -1
- package/dist/connectors/jira/contextPreamble.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts +21 -6
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +22 -16
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/issueBlocks.d.ts +8 -1
- package/dist/connectors/jira/issueBlocks.d.ts.map +1 -1
- package/dist/connectors/jira/issueBlocks.js +38 -2
- package/dist/connectors/jira/issueBlocks.js.map +1 -1
- package/dist/connectors/jira/operatorIssue.d.ts +28 -0
- package/dist/connectors/jira/operatorIssue.d.ts.map +1 -0
- package/dist/connectors/jira/operatorIssue.js +81 -0
- package/dist/connectors/jira/operatorIssue.js.map +1 -0
- package/dist/connectors/jira/outbound.d.ts +8 -4
- package/dist/connectors/jira/outbound.d.ts.map +1 -1
- package/dist/connectors/jira/outbound.js +16 -8
- package/dist/connectors/jira/outbound.js.map +1 -1
- package/dist/connectors/jira/outgoingFileCheck.d.ts +37 -0
- package/dist/connectors/jira/outgoingFileCheck.d.ts.map +1 -0
- package/dist/connectors/jira/outgoingFileCheck.js +279 -0
- package/dist/connectors/jira/outgoingFileCheck.js.map +1 -0
- package/dist/connectors/jira/outgoingFiles.d.ts +81 -0
- package/dist/connectors/jira/outgoingFiles.d.ts.map +1 -0
- package/dist/connectors/jira/outgoingFiles.js +268 -0
- package/dist/connectors/jira/outgoingFiles.js.map +1 -0
- package/dist/connectors/jira/progressComments.d.ts +69 -0
- package/dist/connectors/jira/progressComments.d.ts.map +1 -0
- package/dist/connectors/jira/progressComments.js +136 -0
- package/dist/connectors/jira/progressComments.js.map +1 -0
- package/dist/connectors/jira/prompt.d.ts +5 -1
- package/dist/connectors/jira/prompt.d.ts.map +1 -1
- package/dist/connectors/jira/prompt.js +23 -3
- package/dist/connectors/jira/prompt.js.map +1 -1
- package/dist/connectors/jira/promptSpill.js +1 -1
- package/dist/connectors/jira/promptSpill.js.map +1 -1
- package/dist/connectors/jira/trigger.d.ts +13 -5
- package/dist/connectors/jira/trigger.d.ts.map +1 -1
- package/dist/connectors/jira/trigger.js +13 -7
- package/dist/connectors/jira/trigger.js.map +1 -1
- package/dist/connectors/jira/uploadedFiles.d.ts +48 -0
- package/dist/connectors/jira/uploadedFiles.d.ts.map +1 -0
- package/dist/connectors/jira/uploadedFiles.js +123 -0
- package/dist/connectors/jira/uploadedFiles.js.map +1 -0
- package/dist/connectors/telegram/commands/backendSwitch.d.ts +9 -1
- package/dist/connectors/telegram/commands/backendSwitch.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/backendSwitch.js +17 -8
- package/dist/connectors/telegram/commands/backendSwitch.js.map +1 -1
- package/dist/connectors/telegram/commands/botSkills.d.ts +2 -0
- package/dist/connectors/telegram/commands/botSkills.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/botSkills.js +17 -2
- package/dist/connectors/telegram/commands/botSkills.js.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts +6 -0
- package/dist/connectors/telegram/commands/claudeAccounts.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/claudeAccounts.js +22 -4
- package/dist/connectors/telegram/commands/claudeAccounts.js.map +1 -1
- package/dist/connectors/telegram/commands/compaction.d.ts +14 -3
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +261 -96
- package/dist/connectors/telegram/commands/compaction.js.map +1 -1
- package/dist/connectors/telegram/commands/limitReminders.d.ts +21 -0
- package/dist/connectors/telegram/commands/limitReminders.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/limitReminders.js +95 -0
- package/dist/connectors/telegram/commands/limitReminders.js.map +1 -0
- package/dist/connectors/telegram/commands/limitsBoard.d.ts +4 -0
- package/dist/connectors/telegram/commands/limitsBoard.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/limitsBoard.js +27 -6
- package/dist/connectors/telegram/commands/limitsBoard.js.map +1 -1
- package/dist/connectors/telegram/commands/modelProviders.d.ts +2 -2
- package/dist/connectors/telegram/commands/modelProviders.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/modelProviders.js +27 -16
- package/dist/connectors/telegram/commands/modelProviders.js.map +1 -1
- package/dist/connectors/telegram/commands/topicCommand.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/topicCommand.js +7 -2
- package/dist/connectors/telegram/commands/topicCommand.js.map +1 -1
- package/dist/connectors/telegram/commands/workerRoles.d.ts +25 -0
- package/dist/connectors/telegram/commands/workerRoles.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/workerRoles.js +259 -0
- package/dist/connectors/telegram/commands/workerRoles.js.map +1 -0
- package/dist/connectors/telegram/groupWelcome.d.ts +12 -0
- package/dist/connectors/telegram/groupWelcome.d.ts.map +1 -0
- package/dist/connectors/telegram/groupWelcome.js +12 -0
- package/dist/connectors/telegram/groupWelcome.js.map +1 -0
- package/dist/connectors/telegram/inbound.d.ts +7 -0
- package/dist/connectors/telegram/inbound.d.ts.map +1 -1
- package/dist/connectors/telegram/inbound.js +10 -0
- package/dist/connectors/telegram/inbound.js.map +1 -1
- package/dist/connectors/telegram/outputFlushPlan.d.ts +12 -0
- package/dist/connectors/telegram/outputFlushPlan.d.ts.map +1 -1
- package/dist/connectors/telegram/outputFlushPlan.js +12 -0
- package/dist/connectors/telegram/outputFlushPlan.js.map +1 -1
- package/dist/connectors/telegram/runnerPairingMessages.d.ts +1 -1
- package/dist/connectors/telegram/topicIndicator.d.ts +1 -1
- package/dist/connectors/telegram/topicIndicator.d.ts.map +1 -1
- package/dist/connectors/telegram/topicIndicator.js +103 -5
- package/dist/connectors/telegram/topicIndicator.js.map +1 -1
- package/dist/effortLevels.d.ts +6 -0
- package/dist/effortLevels.d.ts.map +1 -1
- package/dist/effortLevels.js +6 -1
- package/dist/effortLevels.js.map +1 -1
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +95 -14
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +95 -14
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +95 -14
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +95 -14
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +95 -14
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +95 -14
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +95 -14
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +95 -14
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +95 -14
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +95 -14
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +95 -14
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +95 -14
- package/dist/i18n/zh.js.map +1 -1
- package/dist/instanceSettings.d.ts +24 -2
- package/dist/instanceSettings.d.ts.map +1 -1
- package/dist/instanceSettings.js +75 -3
- package/dist/instanceSettings.js.map +1 -1
- package/dist/limitNotes/engine.d.ts +47 -0
- package/dist/limitNotes/engine.d.ts.map +1 -0
- package/dist/limitNotes/engine.js +98 -0
- package/dist/limitNotes/engine.js.map +1 -0
- package/dist/limitNotes/noteText.d.ts +33 -0
- package/dist/limitNotes/noteText.d.ts.map +1 -0
- package/dist/limitNotes/noteText.js +55 -0
- package/dist/limitNotes/noteText.js.map +1 -0
- package/dist/limitNotes/plan.d.ts +147 -0
- package/dist/limitNotes/plan.d.ts.map +1 -0
- package/dist/limitNotes/plan.js +323 -0
- package/dist/limitNotes/plan.js.map +1 -0
- package/dist/limitNotes/reminderChoices.d.ts +30 -0
- package/dist/limitNotes/reminderChoices.d.ts.map +1 -0
- package/dist/limitNotes/reminderChoices.js +48 -0
- package/dist/limitNotes/reminderChoices.js.map +1 -0
- package/dist/limitNotes/service.d.ts +106 -0
- package/dist/limitNotes/service.d.ts.map +1 -0
- package/dist/limitNotes/service.js +169 -0
- package/dist/limitNotes/service.js.map +1 -0
- package/dist/openCodeSessionTitle.js +1 -1
- package/dist/openCodeSessionTitle.js.map +1 -1
- package/dist/outputTrace.d.ts +19 -0
- package/dist/outputTrace.d.ts.map +1 -1
- package/dist/outputTrace.js +23 -2
- package/dist/outputTrace.js.map +1 -1
- package/dist/platform/answerSink.d.ts +23 -0
- package/dist/platform/answerSink.d.ts.map +1 -1
- package/dist/platform/answerSink.js.map +1 -1
- package/dist/platform/operatorAlert.d.ts +24 -0
- package/dist/platform/operatorAlert.d.ts.map +1 -0
- package/dist/platform/operatorAlert.js +9 -0
- package/dist/platform/operatorAlert.js.map +1 -0
- package/dist/postToSession.d.ts +34 -2
- package/dist/postToSession.d.ts.map +1 -1
- package/dist/postToSession.js +31 -2
- package/dist/postToSession.js.map +1 -1
- package/dist/remoteRun/exitCodes.d.ts +2 -2
- package/dist/remoteRun/exitCodes.d.ts.map +1 -1
- package/dist/remoteRun/exitCodes.js +2 -2
- package/dist/remoteRun/exitCodes.js.map +1 -1
- package/dist/remoteRun/foreground.d.ts.map +1 -1
- package/dist/remoteRun/foreground.js +5 -1
- package/dist/remoteRun/foreground.js.map +1 -1
- package/dist/remoteRun/runnerClient.d.ts +1 -1
- package/dist/remoteRun/runnerClient.d.ts.map +1 -1
- package/dist/remoteRun/runnerClient.js +3 -3
- package/dist/remoteRun/runnerClient.js.map +1 -1
- package/dist/requests/answerRequest.d.ts +3 -0
- package/dist/requests/answerRequest.d.ts.map +1 -1
- package/dist/requests/answerRequest.js +9 -2
- package/dist/requests/answerRequest.js.map +1 -1
- package/dist/requests/limitWaitAnswer.d.ts +14 -0
- package/dist/requests/limitWaitAnswer.d.ts.map +1 -1
- package/dist/requests/limitWaitAnswer.js +26 -4
- package/dist/requests/limitWaitAnswer.js.map +1 -1
- package/dist/requests/requestHeader.d.ts +37 -5
- package/dist/requests/requestHeader.d.ts.map +1 -1
- package/dist/requests/requestHeader.js +46 -17
- package/dist/requests/requestHeader.js.map +1 -1
- package/dist/requests/scheduleWait.d.ts +79 -0
- package/dist/requests/scheduleWait.d.ts.map +1 -0
- package/dist/requests/scheduleWait.js +101 -0
- package/dist/requests/scheduleWait.js.map +1 -0
- package/dist/requests/sessionTurnProbe.d.ts +21 -3
- package/dist/requests/sessionTurnProbe.d.ts.map +1 -1
- package/dist/requests/sessionTurnProbe.js +18 -3
- package/dist/requests/sessionTurnProbe.js.map +1 -1
- package/dist/requests/topicRequestSettle.d.ts +13 -7
- package/dist/requests/topicRequestSettle.d.ts.map +1 -1
- package/dist/requests/topicRequestSettle.js +2 -2
- package/dist/requests/topicRequestSettle.js.map +1 -1
- package/dist/requests/trackerTurnPoster.d.ts +30 -0
- package/dist/requests/trackerTurnPoster.d.ts.map +1 -0
- package/dist/requests/trackerTurnPoster.js +36 -0
- package/dist/requests/trackerTurnPoster.js.map +1 -0
- package/dist/requests/types.d.ts +9 -2
- package/dist/requests/types.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.d.ts +188 -11
- package/dist/requests/wakeUpEngine.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.js +452 -43
- package/dist/requests/wakeUpEngine.js.map +1 -1
- package/dist/requests/wakeUpRules.d.ts +122 -12
- package/dist/requests/wakeUpRules.d.ts.map +1 -1
- package/dist/requests/wakeUpRules.js +117 -15
- package/dist/requests/wakeUpRules.js.map +1 -1
- package/dist/resumeContext.d.ts +2 -2
- package/dist/resumeContext.js +3 -3
- package/dist/resumeContext.js.map +1 -1
- package/dist/runnerUtility/adminService.js +1 -1
- package/dist/runnerUtility/adminService.js.map +1 -1
- package/dist/runnerUtility/guiAgent.d.ts +1 -1
- package/dist/runnerUtility/guiAgent.d.ts.map +1 -1
- package/dist/runnerUtility/guiAgent.js +1 -1
- package/dist/runnerUtility/guiAgent.js.map +1 -1
- package/dist/runnerUtility/managedNode.d.ts +3 -3
- package/dist/runnerUtility/managedNode.d.ts.map +1 -1
- package/dist/runnerUtility/managedNode.js +2 -2
- package/dist/runnerUtility/managedNode.js.map +1 -1
- package/dist/runnerUtility/runnerConfig.d.ts +1 -1
- package/dist/runnerUtility/runnerHome.d.ts +1 -1
- package/dist/runnerUtility/runnerHome.js +1 -1
- package/dist/runnerUtility/serviceCommon.d.ts +1 -1
- package/dist/runnerUtility/serviceCommon.d.ts.map +1 -1
- package/dist/runnerUtility/serviceCommon.js +1 -1
- package/dist/runnerUtility/serviceCommon.js.map +1 -1
- package/dist/runners/bootstrapLine.js +1 -1
- package/dist/runners/hubPackage.d.ts +1 -1
- package/dist/runners/hubPackage.js +3 -3
- package/dist/runners/hubPackage.js.map +1 -1
- package/dist/runners/hubPaths.d.ts +1 -1
- package/dist/runners/hubPaths.d.ts.map +1 -1
- package/dist/runners/runnerLock.d.ts +2 -2
- package/dist/runners/runnerLock.d.ts.map +1 -1
- package/dist/runners/runnerLock.js +2 -2
- package/dist/runners/runnerLock.js.map +1 -1
- package/dist/scheduler/checkRun.d.ts +2 -0
- package/dist/scheduler/checkRun.d.ts.map +1 -1
- package/dist/scheduler/checkRun.js +5 -1
- package/dist/scheduler/checkRun.js.map +1 -1
- package/dist/scheduler/delivery.d.ts +57 -0
- package/dist/scheduler/delivery.d.ts.map +1 -1
- package/dist/scheduler/delivery.js +152 -14
- package/dist/scheduler/delivery.js.map +1 -1
- package/dist/scheduler/injection.d.ts +6 -0
- package/dist/scheduler/injection.d.ts.map +1 -1
- package/dist/scheduler/injection.js +10 -0
- package/dist/scheduler/injection.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +38 -3
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +291 -175
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/scheduler/rebindResume.d.ts +24 -0
- package/dist/scheduler/rebindResume.d.ts.map +1 -1
- package/dist/scheduler/rebindResume.js +32 -0
- package/dist/scheduler/rebindResume.js.map +1 -1
- package/dist/scheduler/scheduleToolWording.d.ts +29 -0
- package/dist/scheduler/scheduleToolWording.d.ts.map +1 -0
- package/dist/scheduler/scheduleToolWording.js +117 -0
- package/dist/scheduler/scheduleToolWording.js.map +1 -0
- package/dist/scheduler/scheduledRunTarget.d.ts +90 -0
- package/dist/scheduler/scheduledRunTarget.d.ts.map +1 -0
- package/dist/scheduler/scheduledRunTarget.js +92 -0
- package/dist/scheduler/scheduledRunTarget.js.map +1 -0
- package/dist/scheduler/store.d.ts +2 -0
- package/dist/scheduler/store.d.ts.map +1 -1
- package/dist/scheduler/store.js +2 -0
- package/dist/scheduler/store.js.map +1 -1
- package/dist/scheduler/types.d.ts +10 -0
- package/dist/scheduler/types.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.d.ts +2 -0
- package/dist/scheduler/workerWatch.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.js +3 -3
- package/dist/scheduler/workerWatch.js.map +1 -1
- package/dist/selfUpdate/constants.d.ts +2 -0
- package/dist/selfUpdate/constants.d.ts.map +1 -1
- package/dist/selfUpdate/constants.js +3 -1
- package/dist/selfUpdate/constants.js.map +1 -1
- package/dist/selfUpdate/emittedSource.d.ts.map +1 -1
- package/dist/selfUpdate/emittedSource.js +1 -1
- package/dist/selfUpdate/emittedSource.js.map +1 -1
- package/dist/selfUpdate/updateRuntime.js +1 -1
- package/dist/selfUpdate/updateRuntime.js.map +1 -1
- package/dist/sessionPick.d.ts +1 -1
- package/dist/sessionPick.js +1 -1
- package/dist/startupPromptBuffer.d.ts +35 -6
- package/dist/startupPromptBuffer.d.ts.map +1 -1
- package/dist/startupPromptBuffer.js +70 -21
- package/dist/startupPromptBuffer.js.map +1 -1
- package/dist/state.d.ts +173 -25
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +282 -58
- package/dist/state.js.map +1 -1
- package/dist/testTimings.d.ts +8 -3
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +15 -2
- package/dist/testTimings.js.map +1 -1
- package/dist/threadContextPreamble.d.ts +7 -0
- package/dist/threadContextPreamble.d.ts.map +1 -1
- package/dist/threadContextPreamble.js +11 -0
- package/dist/threadContextPreamble.js.map +1 -1
- package/dist/threadRouting.d.ts +12 -0
- package/dist/threadRouting.d.ts.map +1 -1
- package/dist/threadRouting.js +15 -0
- package/dist/threadRouting.js.map +1 -1
- package/dist/todos/midTurn.d.ts +15 -41
- package/dist/todos/midTurn.d.ts.map +1 -1
- package/dist/todos/midTurn.js +27 -171
- package/dist/todos/midTurn.js.map +1 -1
- package/dist/types.d.ts +147 -23
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -1
- package/dist/utils/backendSwitchPlan.d.ts +3 -3
- package/dist/utils/backendSwitchPlan.js +3 -3
- package/dist/utils/claudeAccountAlert.d.ts +104 -0
- package/dist/utils/claudeAccountAlert.d.ts.map +1 -0
- package/dist/utils/claudeAccountAlert.js +130 -0
- package/dist/utils/claudeAccountAlert.js.map +1 -0
- package/dist/utils/claudeAccountPickerPlan.d.ts +7 -0
- package/dist/utils/claudeAccountPickerPlan.d.ts.map +1 -1
- package/dist/utils/claudeAccountPickerPlan.js +13 -2
- package/dist/utils/claudeAccountPickerPlan.js.map +1 -1
- package/dist/utils/claudeAuthRefusal.d.ts +122 -0
- package/dist/utils/claudeAuthRefusal.d.ts.map +1 -0
- package/dist/utils/claudeAuthRefusal.js +228 -0
- package/dist/utils/claudeAuthRefusal.js.map +1 -0
- package/dist/utils/claudeCompactHook.d.ts +6 -6
- package/dist/utils/claudeCompactHook.js +8 -8
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeProfileUsageViews.d.ts +54 -2
- package/dist/utils/claudeProfileUsageViews.d.ts.map +1 -1
- package/dist/utils/claudeProfileUsageViews.js +44 -1
- package/dist/utils/claudeProfileUsageViews.js.map +1 -1
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +10 -1
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeRuntimeInfo.d.ts +24 -0
- package/dist/utils/claudeRuntimeInfo.d.ts.map +1 -1
- package/dist/utils/claudeRuntimeInfo.js +128 -3
- package/dist/utils/claudeRuntimeInfo.js.map +1 -1
- package/dist/utils/claudeScheduledJobs.d.ts +6 -2
- package/dist/utils/claudeScheduledJobs.d.ts.map +1 -1
- package/dist/utils/claudeScheduledJobs.js +10 -2
- package/dist/utils/claudeScheduledJobs.js.map +1 -1
- package/dist/utils/claudeSessionTitle.js +1 -1
- package/dist/utils/claudeSessionTitle.js.map +1 -1
- package/dist/utils/claudeStreamJson.d.ts +28 -2
- package/dist/utils/claudeStreamJson.d.ts.map +1 -1
- package/dist/utils/claudeStreamJson.js +33 -3
- package/dist/utils/claudeStreamJson.js.map +1 -1
- package/dist/utils/claudeTranscriptEpoch.d.ts +14 -0
- package/dist/utils/claudeTranscriptEpoch.d.ts.map +1 -1
- package/dist/utils/claudeTranscriptEpoch.js +79 -19
- package/dist/utils/claudeTranscriptEpoch.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +103 -7
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +108 -15
- package/dist/utils/claudeUsage.js.map +1 -1
- package/dist/utils/compactOnIdle.d.ts +139 -29
- package/dist/utils/compactOnIdle.d.ts.map +1 -1
- package/dist/utils/compactOnIdle.js +163 -36
- package/dist/utils/compactOnIdle.js.map +1 -1
- package/dist/utils/conversationEnding.d.ts +76 -0
- package/dist/utils/conversationEnding.d.ts.map +1 -0
- package/dist/utils/conversationEnding.js +117 -0
- package/dist/utils/conversationEnding.js.map +1 -0
- package/dist/utils/doctorLine.d.ts +10 -0
- package/dist/utils/doctorLine.d.ts.map +1 -1
- package/dist/utils/doctorLine.js +16 -0
- package/dist/utils/doctorLine.js.map +1 -1
- package/dist/utils/fallbackBridge.d.ts.map +1 -1
- package/dist/utils/fallbackBridge.js +2 -1
- package/dist/utils/fallbackBridge.js.map +1 -1
- package/dist/utils/fallbackChain.d.ts +2 -0
- package/dist/utils/fallbackChain.d.ts.map +1 -1
- package/dist/utils/fallbackChain.js +4 -3
- package/dist/utils/fallbackChain.js.map +1 -1
- package/dist/utils/fallbackSwitchNotice.d.ts +11 -4
- package/dist/utils/fallbackSwitchNotice.d.ts.map +1 -1
- package/dist/utils/fallbackSwitchNotice.js +9 -5
- package/dist/utils/fallbackSwitchNotice.js.map +1 -1
- package/dist/utils/fileSendService.d.ts +31 -0
- package/dist/utils/fileSendService.d.ts.map +1 -1
- package/dist/utils/fileSendService.js +45 -2
- package/dist/utils/fileSendService.js.map +1 -1
- package/dist/utils/jsonStreamHost.d.ts +2 -0
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +4 -1
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/jsonStreamPendingWork.d.ts +14 -2
- package/dist/utils/jsonStreamPendingWork.d.ts.map +1 -1
- package/dist/utils/jsonStreamPendingWork.js +25 -5
- package/dist/utils/jsonStreamPendingWork.js.map +1 -1
- package/dist/utils/jsonStreamUnconsumedInput.d.ts +80 -0
- package/dist/utils/jsonStreamUnconsumedInput.d.ts.map +1 -0
- package/dist/utils/jsonStreamUnconsumedInput.js +99 -0
- package/dist/utils/jsonStreamUnconsumedInput.js.map +1 -0
- package/dist/utils/limitEpisodeRecovery.d.ts +43 -4
- package/dist/utils/limitEpisodeRecovery.d.ts.map +1 -1
- package/dist/utils/limitEpisodeRecovery.js +107 -20
- package/dist/utils/limitEpisodeRecovery.js.map +1 -1
- package/dist/utils/limitHeldPrompts.d.ts +21 -11
- package/dist/utils/limitHeldPrompts.d.ts.map +1 -1
- package/dist/utils/limitHeldPrompts.js +12 -9
- package/dist/utils/limitHeldPrompts.js.map +1 -1
- package/dist/utils/limitRemindersScreenPlan.d.ts +63 -0
- package/dist/utils/limitRemindersScreenPlan.d.ts.map +1 -0
- package/dist/utils/limitRemindersScreenPlan.js +121 -0
- package/dist/utils/limitRemindersScreenPlan.js.map +1 -0
- package/dist/utils/limitsBoardPlan.d.ts +16 -7
- package/dist/utils/limitsBoardPlan.d.ts.map +1 -1
- package/dist/utils/limitsBoardPlan.js +41 -9
- package/dist/utils/limitsBoardPlan.js.map +1 -1
- package/dist/utils/lostWork.d.ts +16 -2
- package/dist/utils/lostWork.d.ts.map +1 -1
- package/dist/utils/lostWork.js +16 -3
- package/dist/utils/lostWork.js.map +1 -1
- package/dist/utils/messageContext.d.ts +2 -2
- package/dist/utils/messageContext.js +2 -2
- package/dist/utils/midTurnInbox.d.ts +79 -0
- package/dist/utils/midTurnInbox.d.ts.map +1 -0
- package/dist/utils/midTurnInbox.js +265 -0
- package/dist/utils/midTurnInbox.js.map +1 -0
- package/dist/utils/promptDelivery.d.ts +70 -22
- package/dist/utils/promptDelivery.d.ts.map +1 -1
- package/dist/utils/promptDelivery.js +100 -42
- package/dist/utils/promptDelivery.js.map +1 -1
- package/dist/utils/topicIndicatorPlan.d.ts +13 -3
- package/dist/utils/topicIndicatorPlan.d.ts.map +1 -1
- package/dist/utils/topicIndicatorPlan.js +26 -4
- package/dist/utils/topicIndicatorPlan.js.map +1 -1
- package/dist/utils/topicRequest.d.ts +3 -0
- package/dist/utils/topicRequest.d.ts.map +1 -1
- package/dist/utils/topicRequest.js +4 -0
- package/dist/utils/topicRequest.js.map +1 -1
- package/dist/utils/workerRoles.d.ts +122 -0
- package/dist/utils/workerRoles.d.ts.map +1 -0
- package/dist/utils/workerRoles.js +160 -0
- package/dist/utils/workerRoles.js.map +1 -0
- package/dist/utils/workerRolesScreenPlan.d.ts +118 -0
- package/dist/utils/workerRolesScreenPlan.d.ts.map +1 -0
- package/dist/utils/workerRolesScreenPlan.js +232 -0
- package/dist/utils/workerRolesScreenPlan.js.map +1 -0
- package/dist/utils/workingSignals.d.ts +49 -0
- package/dist/utils/workingSignals.d.ts.map +1 -0
- package/dist/utils/workingSignals.js +41 -0
- package/dist/utils/workingSignals.js.map +1 -0
- package/licensing.json +88 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +7 -7
- package/{remoteRun → runner-scripts}/runner.sh +6 -3
- package/LICENSE-COMMERCIAL.md +0 -142
- package/dist/agentTrigger.d.ts +0 -28
- package/dist/agentTrigger.d.ts.map +0 -1
- package/dist/agentTrigger.js +0 -53
- package/dist/agentTrigger.js.map +0 -1
- /package/{remoteRun → runner-scripts}/ensureNode.sh +0 -0
- /package/{remoteRun → runner-scripts}/runner-package-lock.json +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noteText.d.ts","sourceRoot":"","sources":["../../src/limitNotes/noteText.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,uIAAuI;AACvI,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,6FAA6F;AAC7F,eAAO,MAAM,oBAAoB,oBAAe,CAAC;AAEjD,wEAAwE;AACxE,eAAO,MAAM,gCAAgC,qIAAgI,CAAC;AAE9K,sGAAsG;AACtG,eAAO,MAAM,2BAA2B,UAAU,CAAC;AAEnD,4HAA4H;AAC5H,eAAO,MAAM,sBAAsB,cAAc,CAAC;AAElD,oIAAoI;AACpI,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAE9E;AAeD,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @description The SHAPE of an accounts note and how one is attached to a text and taken off it again — kept apart from `plan.ts` (the
|
|
4
|
+
* decisions and the figures) because the readers that must cut a note off — the resume context, the fallback hand-over, the session
|
|
5
|
+
* titles, the renderer of a tool result — need only this, and none should load the planner for it: this module imports nothing.
|
|
6
|
+
* `plan.ts` builds every note from the constants here, so what it writes and what {@link stripLimitNote} recognises cannot drift.
|
|
7
|
+
*
|
|
8
|
+
* A note is attached as the LAST block of the text it rides on, after a blank line: at the end of a prompt (after the todo lines) and
|
|
9
|
+
* at the end of a bot tool's result. A stored user turn may hold more after it — the CLI merges messages queued behind a prompt into
|
|
10
|
+
* ONE turn (their texts joined by a newline) — so the strip follows the note's own shape, wherever it sits:
|
|
11
|
+
* - a change summary is its header line alone;
|
|
12
|
+
* - a reminder is its header line, at most one line starting `Then …` / `ChatGPT: …`, and the fixed instruction line.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.limitNoteChatGptPrefix = exports.limitNoteNextAccountsPrefix = exports.limitNoteReminderInstructionLine = exports.limitNoteChangedMark = exports.limitNoteMarker = void 0;
|
|
16
|
+
exports.formatLimitNoteHeader = formatLimitNoteHeader;
|
|
17
|
+
exports.appendLimitNote = appendLimitNote;
|
|
18
|
+
exports.stripLimitNote = stripLimitNote;
|
|
19
|
+
/** What a note text starts with (`[Accounts · 14:05] …`). A person's words never open a line with `[` (the author marks escape it). */
|
|
20
|
+
exports.limitNoteMarker = '[Accounts';
|
|
21
|
+
/** What a change summary's header carries before its `]`: `[Accounts · 16:40 · changed]`. */
|
|
22
|
+
exports.limitNoteChangedMark = ' · changed';
|
|
23
|
+
/** The reminder's last line: the instruction the summary leaves out. */
|
|
24
|
+
exports.limitNoteReminderInstructionLine = 'Call claude_profiles right before your next launch or resume — the pick moves as limits fill and reset. No reply is needed.';
|
|
25
|
+
/** What the reminder's optional second line starts with when it names the accounts after the pick. */
|
|
26
|
+
exports.limitNoteNextAccountsPrefix = 'Then ';
|
|
27
|
+
/** What the reminder's optional second line starts with when it names the ChatGPT window (alone, or after the accounts). */
|
|
28
|
+
exports.limitNoteChatGptPrefix = 'ChatGPT: ';
|
|
29
|
+
/** @description The first line's head of a note: `[Accounts · 14:05]`, or `[Accounts · 14:05 · changed]` for the change summary. */
|
|
30
|
+
function formatLimitNoteHeader(clock, isChange) {
|
|
31
|
+
return `${exports.limitNoteMarker} · ${clock}${isChange ? exports.limitNoteChangedMark : ''}]`;
|
|
32
|
+
}
|
|
33
|
+
const noteSeparator = '\n\n';
|
|
34
|
+
function escapeRegExp(text) {
|
|
35
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
36
|
+
}
|
|
37
|
+
const headerStartPattern = `${escapeRegExp(exports.limitNoteMarker)} · \\d{2}:\\d{2}`;
|
|
38
|
+
/** A change summary: its header line alone. */
|
|
39
|
+
const summaryPattern = `${headerStartPattern}${escapeRegExp(exports.limitNoteChangedMark)}\\][^\\n]*`;
|
|
40
|
+
/** A reminder: its header line, at most one line of accounts / ChatGPT, then the instruction line — nothing past it. */
|
|
41
|
+
const reminderPattern = `${headerStartPattern}\\][^\\n]*(?:\\n(?:${[exports.limitNoteNextAccountsPrefix, exports.limitNoteChatGptPrefix].map(escapeRegExp).join('|')})[^\\n]*)?\\n${escapeRegExp(exports.limitNoteReminderInstructionLine)}`;
|
|
42
|
+
const noteBlockPattern = new RegExp(`${noteSeparator}(?:${summaryPattern}|${reminderPattern})`, 'g');
|
|
43
|
+
/** @description `text` with `note` as its last block. */
|
|
44
|
+
function appendLimitNote(text, note) {
|
|
45
|
+
return `${text}${noteSeparator}${note}`;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @description `text` without every accounts note it holds, each cut by its own shape ({@link limitNoteMarker}): the blank line before
|
|
49
|
+
* it and the note's lines go, whatever follows it (`\n` and the next merged message) stays. `text` itself when it holds none; a block
|
|
50
|
+
* that only starts like a note but has no such shape (no blank line before it, another header, a missing instruction line) is not one.
|
|
51
|
+
*/
|
|
52
|
+
function stripLimitNote(text) {
|
|
53
|
+
return text.replace(noteBlockPattern, '');
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=noteText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noteText.js","sourceRoot":"","sources":["../../src/limitNotes/noteText.ts"],"names":[],"m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AAO,GAAG,IAAI,GAAG,aAAa,GAAG,IAAI,EAAE,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description The «accounts note» an orchestrating agent gets about the limits of its accounts, as PURE decisions and
|
|
3
|
+
* texts — no clock, no state, no I/O: the caller hands in the report, the record, the clock and the setting.
|
|
4
|
+
*
|
|
5
|
+
* Two shapes of one note, both agent-facing English and never posted to the topic:
|
|
6
|
+
* • `reminder` — which account the next new Claude worker goes to and why, the next one or two, the ChatGPT window, and
|
|
7
|
+
* «call `claude_profiles` right before your next launch or resume». Scheduled: due once the interval has passed since the
|
|
8
|
+
* conversation's last note (any shape) or its agent's last `claude_profiles` call.
|
|
9
|
+
* • `summary` — one line of the same figures, only when the limits picture CHANGED since the last note, at most once per
|
|
10
|
+
* {@link limitNoteSummaryFloorMs}, and only at a moment the agent messages the user or wakes up.
|
|
11
|
+
*
|
|
12
|
+
* A note is a passenger, never a cause (README § Lifecycle safety): nothing here may stamp activity, write to an agent or wake a
|
|
13
|
+
* session — that is why this module takes plain values and returns plain values.
|
|
14
|
+
*/
|
|
15
|
+
import { type ClaudeProfilesReport } from '../utils/claudeUsage';
|
|
16
|
+
import { type OpenCodeProviderUsageRecord } from '../utils/openCodeUsage';
|
|
17
|
+
/** What the poller recorded per OpenCode provider (`state.json` `openCodeProviderUsage`); the ChatGPT subscription's figures are read from it. */
|
|
18
|
+
export type OpenCodeProviderUsages = Readonly<Record<string, OpenCodeProviderUsageRecord>>;
|
|
19
|
+
/** A session quiet for this long «woke up»: its next turn start may carry the summary. */
|
|
20
|
+
export declare const limitNoteMinQuietMs: number;
|
|
21
|
+
/** The least time between two notes of the summary shape. */
|
|
22
|
+
export declare const limitNoteSummaryFloorMs: number;
|
|
23
|
+
/** A conversation that called `claude_profiles` or armed a worker watch within this long orchestrates workers. */
|
|
24
|
+
export declare const limitNoteOrchestrationWindowMs: number;
|
|
25
|
+
/** @name LimitNoteWindows @description The three windows, injectable so a flow can shorten them (`CHARNESS_TEST_TIMINGS`). */
|
|
26
|
+
export interface LimitNoteWindows {
|
|
27
|
+
/** How long a session must have been quiet for a turn start to carry the summary. */
|
|
28
|
+
minQuietMs: number;
|
|
29
|
+
/** The least time between two summaries. */
|
|
30
|
+
summaryFloorMs: number;
|
|
31
|
+
/** How long after its last `claude_profiles` call / worker watch a conversation still counts as orchestrating. */
|
|
32
|
+
orchestrationWindowMs: number;
|
|
33
|
+
}
|
|
34
|
+
export declare const defaultLimitNoteWindows: LimitNoteWindows;
|
|
35
|
+
/**
|
|
36
|
+
* @name LimitNoteRecord
|
|
37
|
+
* @description What the bot remembers per conversation (`state.json` `limitNotes`), epoch ms: when the last note of either shape
|
|
38
|
+
* reached the agent, the fingerprint of the picture it showed (absent = the agent holds none, e.g. a fresh context), when the agent
|
|
39
|
+
* last called `claude_profiles` or armed a worker watch (it orchestrates), and when it last called `claude_profiles` (it looked).
|
|
40
|
+
*/
|
|
41
|
+
export interface LimitNoteRecord {
|
|
42
|
+
lastNoteAt?: number;
|
|
43
|
+
fingerprint?: string;
|
|
44
|
+
lastOrchestratedAt?: number;
|
|
45
|
+
lastProfilesCallAt?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @description `record` after a note of either shape reached the agent: its time and the fingerprint of the picture it showed. The
|
|
49
|
+
* reminder clock restarts, and the summary's «changed» is measured against this picture from now on.
|
|
50
|
+
*/
|
|
51
|
+
export declare function getLimitNoteRecordAfterNote(record: LimitNoteRecord | undefined, input: {
|
|
52
|
+
atMs: number;
|
|
53
|
+
fingerprint: string;
|
|
54
|
+
}): LimitNoteRecord;
|
|
55
|
+
/**
|
|
56
|
+
* @description {@link getLimitNoteRecordAfterNote} for a note TAKEN at `takenAtMs` and delivered later (a mid-turn note waits for
|
|
57
|
+
* the agent's next tool call). A look or a note that came in between — the agent's `claude_profiles` call, a send result's summary —
|
|
58
|
+
* holds a newer picture and has restarted the reminder clock: recording the older note over it would put its stale fingerprint
|
|
59
|
+
* back, and the next summary would read as a change although nothing moved since the agent looked. Then the record stays as it is.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getLimitNoteRecordAfterDeliveredNote(record: LimitNoteRecord | undefined, input: {
|
|
62
|
+
atMs: number;
|
|
63
|
+
takenAtMs: number;
|
|
64
|
+
fingerprint: string;
|
|
65
|
+
}): LimitNoteRecord;
|
|
66
|
+
/**
|
|
67
|
+
* @description `record` after the agent called `claude_profiles` (it LOOKED: the reminder clock restarts, and it holds the picture
|
|
68
|
+
* the answer showed) — which is also how a conversation counts as orchestrating workers.
|
|
69
|
+
*/
|
|
70
|
+
export declare function getLimitNoteRecordAfterProfilesCall(record: LimitNoteRecord | undefined, input: {
|
|
71
|
+
atMs: number;
|
|
72
|
+
fingerprint: string;
|
|
73
|
+
}): LimitNoteRecord;
|
|
74
|
+
/** @description `record` after the agent armed a worker watch (`schedule_create` with `statusWorkerRunDir`): it orchestrates workers; nothing else moves. */
|
|
75
|
+
export declare function getLimitNoteRecordAfterWorkerWatch(record: LimitNoteRecord | undefined, atMs: number): LimitNoteRecord;
|
|
76
|
+
/** The moment a note may ride: a turn start the person or the scheduler makes, a Claude turn already running, the result of a bot send tool. */
|
|
77
|
+
export type LimitNoteMoment = 'turnStart' | 'midTurn' | 'sendResult';
|
|
78
|
+
export type LimitNoteShape = 'reminder' | 'summary';
|
|
79
|
+
/** @description Every reason a note is not delivered, named so a log line says why nothing came. */
|
|
80
|
+
export declare const limitNoteSkipReasons: {
|
|
81
|
+
readonly notOrchestrating: "not orchestrating";
|
|
82
|
+
readonly off: "off";
|
|
83
|
+
readonly noFreshUsage: "no fresh usage";
|
|
84
|
+
readonly notDue: "not due";
|
|
85
|
+
readonly noReminderAtMoment: "a send result carries no reminder";
|
|
86
|
+
readonly noSummaryAtMoment: "a running turn carries no summary";
|
|
87
|
+
readonly notQuiet: "not quiet";
|
|
88
|
+
readonly unchanged: "unchanged";
|
|
89
|
+
readonly summaryFloor: "30-min floor";
|
|
90
|
+
};
|
|
91
|
+
/** @description What was decided: the shape to deliver, or `null` with every reason that applied. */
|
|
92
|
+
export interface LimitNoteDecision {
|
|
93
|
+
shape: LimitNoteShape | null;
|
|
94
|
+
skipReasons: string[];
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @description Which shape of the note the conversation gets at `moment`, if any.
|
|
98
|
+
*
|
|
99
|
+
* Gates for both shapes: the conversation orchestrates (`lastOrchestratedAt` within the window), the setting is not Off
|
|
100
|
+
* (`intervalMs` null — the summary too), and the usage cache holds a fresh figure ({@link checkHasFreshLimitUsage}).
|
|
101
|
+
*
|
|
102
|
+
* `reminder` — at a turn start or mid-turn, once `intervalMs` has passed since the last note or `claude_profiles` call (never
|
|
103
|
+
* either: due). A send result carries no reminder.
|
|
104
|
+
*
|
|
105
|
+
* `summary` — at a send result, or at a turn start after `windows.minQuietMs` of quiet; never mid-turn. Only when `fingerprint`
|
|
106
|
+
* differs from the one the last note showed (none stored: the agent holds no picture, so it differs) and at least
|
|
107
|
+
* `windows.summaryFloorMs` since the last note.
|
|
108
|
+
*
|
|
109
|
+
* Reminder and summary due together → the reminder alone. `quietMs` is how long the session was quiet before this turn
|
|
110
|
+
* start (`null`: not a turn start, or unknown — counts as not quiet).
|
|
111
|
+
*/
|
|
112
|
+
export declare function decideLimitNote(input: {
|
|
113
|
+
moment: LimitNoteMoment;
|
|
114
|
+
record: LimitNoteRecord | undefined;
|
|
115
|
+
/** The interval in ms; `null` = Off. */
|
|
116
|
+
intervalMs: number | null;
|
|
117
|
+
/** {@link buildLimitNoteFingerprint} of the figures now. */
|
|
118
|
+
fingerprint: string;
|
|
119
|
+
/** {@link checkHasFreshLimitUsage} of the report now. */
|
|
120
|
+
hasFreshUsage: boolean;
|
|
121
|
+
quietMs: number | null;
|
|
122
|
+
nowMs: number;
|
|
123
|
+
windows?: LimitNoteWindows;
|
|
124
|
+
}): LimitNoteDecision;
|
|
125
|
+
/**
|
|
126
|
+
* @description Whether the usage cache holds a figure worth a note: some account the operator's list offers has a snapshot that was
|
|
127
|
+
* re-read at its last poll, or is billed to API credits (no windows by design) AND is one a launch would really use (it is in
|
|
128
|
+
* `launchOrder`: held by the `/limits` list, not held off agents, its credit not used up). Nothing fresh at all → no note (a note of
|
|
129
|
+
* «usage unknown» only would tell the agent nothing the tool does not).
|
|
130
|
+
*/
|
|
131
|
+
export declare function checkHasFreshLimitUsage(report: ClaudeProfilesReport): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* @description The limits picture as a short stable string; two notes differ in content only when two fingerprints differ: the
|
|
134
|
+
* account that would be recommended; for every account the operator's list offers its weekly use in 10-point steps (`?` unknown,
|
|
135
|
+
* `-` an API account), whether it is usable now (`u` / `x`) and whether its five-hour window is past the launch ceiling (`f` / `o`);
|
|
136
|
+
* the ChatGPT weekly use in 10-point steps (`-` none recorded).
|
|
137
|
+
*/
|
|
138
|
+
export declare function buildLimitNoteFingerprint(report: ClaudeProfilesReport, openCodeUsage: OpenCodeProviderUsages, nowMs: number): string;
|
|
139
|
+
/**
|
|
140
|
+
* @description The note's text: `reminder` — three lines (the pick with its figures and why, the next one or two accounts and the
|
|
141
|
+
* ChatGPT window, the instruction); `summary` — one line of the same figures. Both start with `[Accounts · HH:MM]` in `timezone`
|
|
142
|
+
* (the summary adds `· changed`). The figures come from `report` (`buildClaudeProfilesCreditReport`: the SAME pick `claude_profiles`
|
|
143
|
+
* gives) and `openCodeUsage` (`state.json` `openCodeProviderUsage`); a stale snapshot reads «usage unknown», a window whose reset has
|
|
144
|
+
* passed 0 % with no countdown, an API account its credit estimate.
|
|
145
|
+
*/
|
|
146
|
+
export declare function buildLimitNoteText(shape: LimitNoteShape, report: ClaudeProfilesReport, openCodeUsage: OpenCodeProviderUsages, timezone: string, nowMs: number): string;
|
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AAuB,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAG7E;AAaD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,oBAAoB,EAAE,aAAa,EAAE,sBAAsB,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQpI;AAqGD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,cAAc,EACrB,MAAM,EAAE,oBAAoB,EAC5B,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACZ,MAAM,CAKR"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @description The «accounts note» an orchestrating agent gets about the limits of its accounts, as PURE decisions and
|
|
4
|
+
* texts — no clock, no state, no I/O: the caller hands in the report, the record, the clock and the setting.
|
|
5
|
+
*
|
|
6
|
+
* Two shapes of one note, both agent-facing English and never posted to the topic:
|
|
7
|
+
* • `reminder` — which account the next new Claude worker goes to and why, the next one or two, the ChatGPT window, and
|
|
8
|
+
* «call `claude_profiles` right before your next launch or resume». Scheduled: due once the interval has passed since the
|
|
9
|
+
* conversation's last note (any shape) or its agent's last `claude_profiles` call.
|
|
10
|
+
* • `summary` — one line of the same figures, only when the limits picture CHANGED since the last note, at most once per
|
|
11
|
+
* {@link limitNoteSummaryFloorMs}, and only at a moment the agent messages the user or wakes up.
|
|
12
|
+
*
|
|
13
|
+
* A note is a passenger, never a cause (README § Lifecycle safety): nothing here may stamp activity, write to an agent or wake a
|
|
14
|
+
* session — that is why this module takes plain values and returns plain values.
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.limitNoteSkipReasons = exports.defaultLimitNoteWindows = exports.limitNoteOrchestrationWindowMs = exports.limitNoteSummaryFloorMs = exports.limitNoteMinQuietMs = void 0;
|
|
18
|
+
exports.getLimitNoteRecordAfterNote = getLimitNoteRecordAfterNote;
|
|
19
|
+
exports.getLimitNoteRecordAfterDeliveredNote = getLimitNoteRecordAfterDeliveredNote;
|
|
20
|
+
exports.getLimitNoteRecordAfterProfilesCall = getLimitNoteRecordAfterProfilesCall;
|
|
21
|
+
exports.getLimitNoteRecordAfterWorkerWatch = getLimitNoteRecordAfterWorkerWatch;
|
|
22
|
+
exports.decideLimitNote = decideLimitNote;
|
|
23
|
+
exports.checkHasFreshLimitUsage = checkHasFreshLimitUsage;
|
|
24
|
+
exports.buildLimitNoteFingerprint = buildLimitNoteFingerprint;
|
|
25
|
+
exports.buildLimitNoteText = buildLimitNoteText;
|
|
26
|
+
const claudeApiSpend_1 = require("../utils/claudeApiSpend");
|
|
27
|
+
const claudeUsage_1 = require("../utils/claudeUsage");
|
|
28
|
+
const openCodeUsage_1 = require("../utils/openCodeUsage");
|
|
29
|
+
const reminderWizard_1 = require("../utils/reminderWizard");
|
|
30
|
+
const noteText_1 = require("./noteText");
|
|
31
|
+
const timezone_1 = require("../utils/timezone");
|
|
32
|
+
const msPerMinute = 60 * 1000;
|
|
33
|
+
const msPerDay = 24 * 60 * msPerMinute;
|
|
34
|
+
// ── windows and names ──
|
|
35
|
+
/** A session quiet for this long «woke up»: its next turn start may carry the summary. */
|
|
36
|
+
exports.limitNoteMinQuietMs = 30 * msPerMinute;
|
|
37
|
+
/** The least time between two notes of the summary shape. */
|
|
38
|
+
exports.limitNoteSummaryFloorMs = 30 * msPerMinute;
|
|
39
|
+
/** A conversation that called `claude_profiles` or armed a worker watch within this long orchestrates workers. */
|
|
40
|
+
exports.limitNoteOrchestrationWindowMs = 7 * msPerDay;
|
|
41
|
+
exports.defaultLimitNoteWindows = {
|
|
42
|
+
minQuietMs: exports.limitNoteMinQuietMs,
|
|
43
|
+
summaryFloorMs: exports.limitNoteSummaryFloorMs,
|
|
44
|
+
orchestrationWindowMs: exports.limitNoteOrchestrationWindowMs,
|
|
45
|
+
};
|
|
46
|
+
/** A weekly figure moves the fingerprint in steps this wide: a note is not worth its tokens for a point or two. */
|
|
47
|
+
const fingerprintPercentStep = 10;
|
|
48
|
+
/** How many accounts one note names after the pick (three Claude accounts in all). */
|
|
49
|
+
const limitNoteNextAccountCount = 2;
|
|
50
|
+
/** The relative reset in the note's own words: `1 d 19 h`, `5 d`, `3 h`, `30 min`. */
|
|
51
|
+
const limitNoteResetWords = { pattern: '{time}', day: ' d', hour: ' h', minute: ' min' };
|
|
52
|
+
/**
|
|
53
|
+
* @description `record` after a note of either shape reached the agent: its time and the fingerprint of the picture it showed. The
|
|
54
|
+
* reminder clock restarts, and the summary's «changed» is measured against this picture from now on.
|
|
55
|
+
*/
|
|
56
|
+
function getLimitNoteRecordAfterNote(record, input) {
|
|
57
|
+
return { ...record, lastNoteAt: input.atMs, fingerprint: input.fingerprint };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @description {@link getLimitNoteRecordAfterNote} for a note TAKEN at `takenAtMs` and delivered later (a mid-turn note waits for
|
|
61
|
+
* the agent's next tool call). A look or a note that came in between — the agent's `claude_profiles` call, a send result's summary —
|
|
62
|
+
* holds a newer picture and has restarted the reminder clock: recording the older note over it would put its stale fingerprint
|
|
63
|
+
* back, and the next summary would read as a change although nothing moved since the agent looked. Then the record stays as it is.
|
|
64
|
+
*/
|
|
65
|
+
function getLimitNoteRecordAfterDeliveredNote(record, input) {
|
|
66
|
+
const newerStampMs = Math.max(record?.lastNoteAt ?? 0, record?.lastProfilesCallAt ?? 0);
|
|
67
|
+
if (record !== undefined && newerStampMs > input.takenAtMs)
|
|
68
|
+
return record;
|
|
69
|
+
return getLimitNoteRecordAfterNote(record, input);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* @description `record` after the agent called `claude_profiles` (it LOOKED: the reminder clock restarts, and it holds the picture
|
|
73
|
+
* the answer showed) — which is also how a conversation counts as orchestrating workers.
|
|
74
|
+
*/
|
|
75
|
+
function getLimitNoteRecordAfterProfilesCall(record, input) {
|
|
76
|
+
return { ...record, lastProfilesCallAt: input.atMs, lastOrchestratedAt: input.atMs, fingerprint: input.fingerprint };
|
|
77
|
+
}
|
|
78
|
+
/** @description `record` after the agent armed a worker watch (`schedule_create` with `statusWorkerRunDir`): it orchestrates workers; nothing else moves. */
|
|
79
|
+
function getLimitNoteRecordAfterWorkerWatch(record, atMs) {
|
|
80
|
+
return { ...record, lastOrchestratedAt: atMs };
|
|
81
|
+
}
|
|
82
|
+
/** @description Every reason a note is not delivered, named so a log line says why nothing came. */
|
|
83
|
+
exports.limitNoteSkipReasons = {
|
|
84
|
+
notOrchestrating: 'not orchestrating',
|
|
85
|
+
off: 'off',
|
|
86
|
+
noFreshUsage: 'no fresh usage',
|
|
87
|
+
notDue: 'not due',
|
|
88
|
+
noReminderAtMoment: 'a send result carries no reminder',
|
|
89
|
+
noSummaryAtMoment: 'a running turn carries no summary',
|
|
90
|
+
notQuiet: 'not quiet',
|
|
91
|
+
unchanged: 'unchanged',
|
|
92
|
+
summaryFloor: '30-min floor',
|
|
93
|
+
};
|
|
94
|
+
/** When the agent last got a note or looked (`claude_profiles`) — the reminder clock's start; `null` = never. */
|
|
95
|
+
function getLastLookAtMs(record) {
|
|
96
|
+
const stamps = [record?.lastNoteAt, record?.lastProfilesCallAt].filter((stamp) => stamp !== undefined);
|
|
97
|
+
return stamps.length === 0 ? null : Math.max(...stamps);
|
|
98
|
+
}
|
|
99
|
+
function listReasons(candidates) {
|
|
100
|
+
return candidates.filter((reason) => typeof reason === 'string');
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @description Which shape of the note the conversation gets at `moment`, if any.
|
|
104
|
+
*
|
|
105
|
+
* Gates for both shapes: the conversation orchestrates (`lastOrchestratedAt` within the window), the setting is not Off
|
|
106
|
+
* (`intervalMs` null — the summary too), and the usage cache holds a fresh figure ({@link checkHasFreshLimitUsage}).
|
|
107
|
+
*
|
|
108
|
+
* `reminder` — at a turn start or mid-turn, once `intervalMs` has passed since the last note or `claude_profiles` call (never
|
|
109
|
+
* either: due). A send result carries no reminder.
|
|
110
|
+
*
|
|
111
|
+
* `summary` — at a send result, or at a turn start after `windows.minQuietMs` of quiet; never mid-turn. Only when `fingerprint`
|
|
112
|
+
* differs from the one the last note showed (none stored: the agent holds no picture, so it differs) and at least
|
|
113
|
+
* `windows.summaryFloorMs` since the last note.
|
|
114
|
+
*
|
|
115
|
+
* Reminder and summary due together → the reminder alone. `quietMs` is how long the session was quiet before this turn
|
|
116
|
+
* start (`null`: not a turn start, or unknown — counts as not quiet).
|
|
117
|
+
*/
|
|
118
|
+
function decideLimitNote(input) {
|
|
119
|
+
const { moment, record, intervalMs, nowMs } = input;
|
|
120
|
+
const windows = input.windows ?? exports.defaultLimitNoteWindows;
|
|
121
|
+
const gateReasons = listReasons([
|
|
122
|
+
(record?.lastOrchestratedAt === undefined || nowMs - record.lastOrchestratedAt > windows.orchestrationWindowMs) && exports.limitNoteSkipReasons.notOrchestrating,
|
|
123
|
+
intervalMs === null && exports.limitNoteSkipReasons.off,
|
|
124
|
+
!input.hasFreshUsage && exports.limitNoteSkipReasons.noFreshUsage,
|
|
125
|
+
]);
|
|
126
|
+
if (gateReasons.length > 0 || intervalMs === null)
|
|
127
|
+
return { shape: null, skipReasons: gateReasons };
|
|
128
|
+
const lastLookAtMs = getLastLookAtMs(record);
|
|
129
|
+
const lastNoteAtMs = record?.lastNoteAt;
|
|
130
|
+
const reminderReasons = listReasons([
|
|
131
|
+
moment === 'sendResult' && exports.limitNoteSkipReasons.noReminderAtMoment,
|
|
132
|
+
moment !== 'sendResult' && lastLookAtMs !== null && nowMs - lastLookAtMs < intervalMs && exports.limitNoteSkipReasons.notDue,
|
|
133
|
+
]);
|
|
134
|
+
if (reminderReasons.length === 0)
|
|
135
|
+
return { shape: 'reminder', skipReasons: [] };
|
|
136
|
+
const summaryReasons = listReasons([
|
|
137
|
+
moment === 'midTurn' && exports.limitNoteSkipReasons.noSummaryAtMoment,
|
|
138
|
+
moment === 'turnStart' && (input.quietMs === null || input.quietMs < windows.minQuietMs) && exports.limitNoteSkipReasons.notQuiet,
|
|
139
|
+
record?.fingerprint === input.fingerprint && exports.limitNoteSkipReasons.unchanged,
|
|
140
|
+
lastNoteAtMs !== undefined && nowMs - lastNoteAtMs < windows.summaryFloorMs && exports.limitNoteSkipReasons.summaryFloor,
|
|
141
|
+
]);
|
|
142
|
+
if (summaryReasons.length === 0)
|
|
143
|
+
return { shape: 'summary', skipReasons: [] };
|
|
144
|
+
return { shape: null, skipReasons: [...reminderReasons, ...summaryReasons] };
|
|
145
|
+
}
|
|
146
|
+
// ── the figures ──
|
|
147
|
+
/** The accounts the note speaks of: the ones the operator's `/limits` list lets agents use. */
|
|
148
|
+
function listOfferedEntries(report) {
|
|
149
|
+
return report.profiles.filter((entry) => entry.chainExclusion === null);
|
|
150
|
+
}
|
|
151
|
+
function getEntryBucket(entry, kind) {
|
|
152
|
+
return entry.buckets.find((bucket) => bucket.kind === kind) ?? null;
|
|
153
|
+
}
|
|
154
|
+
/** The used percent of the five-hour window as of `nowMs`; `null` when the entry has none. */
|
|
155
|
+
function getSessionPercent(entry, nowMs) {
|
|
156
|
+
const bucket = getEntryBucket(entry, 'session');
|
|
157
|
+
return bucket === null ? null : (0, claudeUsage_1.getClaudeUsagePercentAsOf)(bucket, nowMs);
|
|
158
|
+
}
|
|
159
|
+
/** Whether a NEW worker would not start on the account for want of room in its five-hour window (the launch ceiling). */
|
|
160
|
+
function checkIsSessionFull(entry, nowMs) {
|
|
161
|
+
const percent = getSessionPercent(entry, nowMs);
|
|
162
|
+
return percent !== null && percent >= claudeUsage_1.claudeLaunchSessionCeilingPercent;
|
|
163
|
+
}
|
|
164
|
+
function getWeeklyFigure(bucket, nowMs) {
|
|
165
|
+
const resetMs = bucket.resetsAt === null ? Number.NaN : Date.parse(bucket.resetsAt);
|
|
166
|
+
const isResetAhead = Number.isFinite(resetMs) && resetMs > nowMs;
|
|
167
|
+
return {
|
|
168
|
+
percent: (0, claudeUsage_1.getClaudeUsagePercentAsOf)(bucket, nowMs),
|
|
169
|
+
// A window whose reset has passed shows no countdown: nothing says when its next period ends.
|
|
170
|
+
resetIn: isResetAhead ? (0, claudeUsage_1.formatClaudeUsageRelativeReset)(bucket.resetsAt, nowMs, limitNoteResetWords) : null,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
/** The account's weekly figure; `null` = «usage unknown» (a stale snapshot, no weekly window) and for an API account, which has none. */
|
|
174
|
+
function getEntryWeeklyFigure(entry, nowMs) {
|
|
175
|
+
const bucket = entry.isUsageStale ? null : getEntryBucket(entry, 'weekly_all');
|
|
176
|
+
return bucket === null ? null : getWeeklyFigure(bucket, nowMs);
|
|
177
|
+
}
|
|
178
|
+
/** The ChatGPT subscription's usage snapshot, when the poller recorded one. */
|
|
179
|
+
function getChatGptUsage(openCodeUsage) {
|
|
180
|
+
return openCodeUsage[openCodeUsage_1.chatGptProviderId]?.usage;
|
|
181
|
+
}
|
|
182
|
+
/** The ChatGPT weekly figure; `null` = «usage unknown» (stale, no weekly window). Call only when {@link getChatGptUsage} found a snapshot. */
|
|
183
|
+
function getChatGptWeeklyFigure(usage, nowMs) {
|
|
184
|
+
const bucket = usage.isStale === true ? null : (0, claudeUsage_1.getClaudeUsageBucket)(usage, 'weekly_all');
|
|
185
|
+
return bucket === null ? null : getWeeklyFigure(bucket, nowMs);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @description Whether the usage cache holds a figure worth a note: some account the operator's list offers has a snapshot that was
|
|
189
|
+
* re-read at its last poll, or is billed to API credits (no windows by design) AND is one a launch would really use (it is in
|
|
190
|
+
* `launchOrder`: held by the `/limits` list, not held off agents, its credit not used up). Nothing fresh at all → no note (a note of
|
|
191
|
+
* «usage unknown» only would tell the agent nothing the tool does not).
|
|
192
|
+
*/
|
|
193
|
+
function checkHasFreshLimitUsage(report) {
|
|
194
|
+
return listOfferedEntries(report).some((entry) => entry.loggedIn !== false
|
|
195
|
+
&& (entry.billing === 'api' ? report.launchOrder.includes(entry.name) : !entry.isUsageStale && entry.buckets.length > 0));
|
|
196
|
+
}
|
|
197
|
+
const unknownStep = '?';
|
|
198
|
+
const noWindowStep = '-';
|
|
199
|
+
function getPercentStep(percent) {
|
|
200
|
+
return Math.floor(percent / fingerprintPercentStep).toString();
|
|
201
|
+
}
|
|
202
|
+
function getWeeklyStep(figure) {
|
|
203
|
+
return figure === null ? unknownStep : getPercentStep(figure.percent);
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* @description The limits picture as a short stable string; two notes differ in content only when two fingerprints differ: the
|
|
207
|
+
* account that would be recommended; for every account the operator's list offers its weekly use in 10-point steps (`?` unknown,
|
|
208
|
+
* `-` an API account), whether it is usable now (`u` / `x`) and whether its five-hour window is past the launch ceiling (`f` / `o`);
|
|
209
|
+
* the ChatGPT weekly use in 10-point steps (`-` none recorded).
|
|
210
|
+
*/
|
|
211
|
+
function buildLimitNoteFingerprint(report, openCodeUsage, nowMs) {
|
|
212
|
+
const accounts = listOfferedEntries(report).map((entry) => {
|
|
213
|
+
const weeklyStep = entry.billing === 'api' ? noWindowStep : getWeeklyStep(getEntryWeeklyFigure(entry, nowMs));
|
|
214
|
+
return `${entry.name}:${weeklyStep}${entry.isEligible ? 'u' : 'x'}${checkIsSessionFull(entry, nowMs) ? 'f' : 'o'}`;
|
|
215
|
+
});
|
|
216
|
+
const chatGptUsage = getChatGptUsage(openCodeUsage);
|
|
217
|
+
const chatGptStep = chatGptUsage === undefined ? noWindowStep : getWeeklyStep(getChatGptWeeklyFigure(chatGptUsage, nowMs));
|
|
218
|
+
return [`rec=${report.recommended ?? 'none'}`, ...accounts, `gpt=${chatGptStep}`].join('|');
|
|
219
|
+
}
|
|
220
|
+
// ── the texts ──
|
|
221
|
+
const noWorkerAccountSentence = 'No Claude account can take a new worker now';
|
|
222
|
+
const noWorkerAccountClause = 'no Claude account can take a new worker now';
|
|
223
|
+
function getNoteHeader(shape, nowMs, timezone) {
|
|
224
|
+
return (0, noteText_1.formatLimitNoteHeader)((0, reminderWizard_1.formatReminderTime)((0, timezone_1.getZonedWallClock)(timezone, nowMs)), shape === 'summary');
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The accounts after the pick, in the order a launch prefers them — the report's `launchOrder`, the SAME order the pick is the head
|
|
228
|
+
* of (API credit the list holds first, then the usable subscriptions by the soonest weekly reset), never a second ranking.
|
|
229
|
+
*/
|
|
230
|
+
function listNextAccountEntries(report) {
|
|
231
|
+
return report.launchOrder
|
|
232
|
+
.filter((name) => name !== report.recommended)
|
|
233
|
+
.slice(0, limitNoteNextAccountCount)
|
|
234
|
+
.flatMap((name) => report.profiles.filter((entry) => entry.name === name));
|
|
235
|
+
}
|
|
236
|
+
const usageUnknownWords = 'usage unknown';
|
|
237
|
+
/** What the bot estimates is left of an API account's credit (`≈ $61.20 left`); `null` when the operator gave it no figure. */
|
|
238
|
+
function formatApiCreditLeft(entry) {
|
|
239
|
+
return entry.remainingEstimateUsd === null ? null : `≈ ${(0, claudeApiSpend_1.formatUsd)(entry.remainingEstimateUsd)} left`;
|
|
240
|
+
}
|
|
241
|
+
function formatApiCreditWords(entry) {
|
|
242
|
+
const left = formatApiCreditLeft(entry);
|
|
243
|
+
return left === null ? 'API credit' : `API credit (${left})`;
|
|
244
|
+
}
|
|
245
|
+
/** What the reminder says of the account the pick names after its reason: `week 62 % used, resets in 1 d 19 h; 5 h 30 %`; `null` for an API account with no credit figure (its reason says it all). */
|
|
246
|
+
function formatReminderPickFigures(entry, nowMs) {
|
|
247
|
+
if (entry.billing === 'api')
|
|
248
|
+
return formatApiCreditLeft(entry);
|
|
249
|
+
const weekly = getEntryWeeklyFigure(entry, nowMs);
|
|
250
|
+
if (weekly === null)
|
|
251
|
+
return usageUnknownWords;
|
|
252
|
+
const session = getSessionPercent(entry, nowMs);
|
|
253
|
+
return `week ${weekly.percent} % used${weekly.resetIn === null ? '' : `, resets in ${weekly.resetIn}`}${session === null ? '' : `; 5 h ${session} %`}`;
|
|
254
|
+
}
|
|
255
|
+
/** What the reminder says of an account after the pick: `week 20 %, resets in 5 d`. */
|
|
256
|
+
function formatReminderNextFigures(entry, nowMs) {
|
|
257
|
+
if (entry.billing === 'api')
|
|
258
|
+
return formatApiCreditWords(entry);
|
|
259
|
+
const weekly = getEntryWeeklyFigure(entry, nowMs);
|
|
260
|
+
return weekly === null ? usageUnknownWords : `week ${weekly.percent} %${weekly.resetIn === null ? '' : `, resets in ${weekly.resetIn}`}`;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The first line: where the next new worker goes, why (the wording of `describeClaudeLaunchOutcome`, the one `claude_profiles` opens
|
|
264
|
+
* with) and its figures — or that nothing can take one and what frees up first.
|
|
265
|
+
*/
|
|
266
|
+
function formatReminderPickLine(report, nowMs) {
|
|
267
|
+
const picked = report.profiles.find((entry) => entry.name === report.recommended);
|
|
268
|
+
if (picked !== undefined) {
|
|
269
|
+
const figures = formatReminderPickFigures(picked, nowMs);
|
|
270
|
+
return `Next new Claude worker → ${picked.name} (${(0, claudeUsage_1.describeClaudeLaunchOutcome)(report, null)})${figures === null ? '' : `: ${figures}`}.`;
|
|
271
|
+
}
|
|
272
|
+
const next = report.nextAvailable;
|
|
273
|
+
return next === null ? `${noWorkerAccountSentence}.` : `${noWorkerAccountSentence}; ${next.profile} frees up in ${(0, claudeUsage_1.formatClaudeUsageRelativeReset)(next.at, nowMs, limitNoteResetWords)}.`;
|
|
274
|
+
}
|
|
275
|
+
/** The reminder's ChatGPT sentence: `ChatGPT: week 40 %, resets in 3 d.`; `null` when no ChatGPT subscription usage is recorded. */
|
|
276
|
+
function formatReminderChatGptSentence(openCodeUsage, nowMs) {
|
|
277
|
+
const usage = getChatGptUsage(openCodeUsage);
|
|
278
|
+
if (usage === undefined)
|
|
279
|
+
return null;
|
|
280
|
+
const weekly = getChatGptWeeklyFigure(usage, nowMs);
|
|
281
|
+
return `${noteText_1.limitNoteChatGptPrefix}${weekly === null ? usageUnknownWords : `week ${weekly.percent} %${weekly.resetIn === null ? '' : `, resets in ${weekly.resetIn}`}`}.`;
|
|
282
|
+
}
|
|
283
|
+
function buildReminderText(report, openCodeUsage, nowMs) {
|
|
284
|
+
const next = listNextAccountEntries(report).map((entry) => `${entry.name} (${formatReminderNextFigures(entry, nowMs)})`);
|
|
285
|
+
const alsoSentences = [next.length === 0 ? null : `${noteText_1.limitNoteNextAccountsPrefix}${next.join(', ')}.`, formatReminderChatGptSentence(openCodeUsage, nowMs)].filter((sentence) => sentence !== null);
|
|
286
|
+
return [formatReminderPickLine(report, nowMs), ...(alsoSentences.length === 0 ? [] : [alsoSentences.join(' ')]), noteText_1.limitNoteReminderInstructionLine].join('\n');
|
|
287
|
+
}
|
|
288
|
+
/** A weekly figure for the summary's one line: `71 % (resets in 1 d 16 h)` for the pick, `20 % (5 d)` for the rest. */
|
|
289
|
+
function formatSummaryFigure(figure, isPick) {
|
|
290
|
+
if (figure === null)
|
|
291
|
+
return usageUnknownWords;
|
|
292
|
+
if (figure.resetIn === null)
|
|
293
|
+
return `${figure.percent} %`;
|
|
294
|
+
return `${figure.percent} % (${isPick ? `resets in ${figure.resetIn}` : figure.resetIn})`;
|
|
295
|
+
}
|
|
296
|
+
function formatSummaryEntry(entry, isPick, nowMs) {
|
|
297
|
+
const figures = entry.billing === 'api' ? formatApiCreditWords(entry) : formatSummaryFigure(getEntryWeeklyFigure(entry, nowMs), isPick);
|
|
298
|
+
return `${entry.name} ${figures}${isPick ? ' → next new worker' : ''}`;
|
|
299
|
+
}
|
|
300
|
+
function buildSummaryText(report, openCodeUsage, nowMs) {
|
|
301
|
+
const picked = report.profiles.find((entry) => entry.name === report.recommended);
|
|
302
|
+
const chatGptUsage = getChatGptUsage(openCodeUsage);
|
|
303
|
+
const items = [
|
|
304
|
+
picked === undefined ? noWorkerAccountClause : formatSummaryEntry(picked, true, nowMs),
|
|
305
|
+
...listNextAccountEntries(report).map((entry) => formatSummaryEntry(entry, false, nowMs)),
|
|
306
|
+
...(chatGptUsage === undefined ? [] : [`ChatGPT ${formatSummaryFigure(getChatGptWeeklyFigure(chatGptUsage, nowMs), false)}`]),
|
|
307
|
+
];
|
|
308
|
+
return `${items.join('; ')}.`;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* @description The note's text: `reminder` — three lines (the pick with its figures and why, the next one or two accounts and the
|
|
312
|
+
* ChatGPT window, the instruction); `summary` — one line of the same figures. Both start with `[Accounts · HH:MM]` in `timezone`
|
|
313
|
+
* (the summary adds `· changed`). The figures come from `report` (`buildClaudeProfilesCreditReport`: the SAME pick `claude_profiles`
|
|
314
|
+
* gives) and `openCodeUsage` (`state.json` `openCodeProviderUsage`); a stale snapshot reads «usage unknown», a window whose reset has
|
|
315
|
+
* passed 0 % with no countdown, an API account its credit estimate.
|
|
316
|
+
*/
|
|
317
|
+
function buildLimitNoteText(shape, report, openCodeUsage, timezone, nowMs) {
|
|
318
|
+
const header = getNoteHeader(shape, nowMs, timezone);
|
|
319
|
+
return shape === 'reminder'
|
|
320
|
+
? `${header} ${buildReminderText(report, openCodeUsage, nowMs)}`
|
|
321
|
+
: `${header} ${buildSummaryText(report, openCodeUsage, nowMs)}`;
|
|
322
|
+
}
|
|
323
|
+
//# sourceMappingURL=plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../src/limitNotes/plan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAiFH,kEAEC;AAQD,oFAIC;AAMD,kFAEC;AAGD,gFAEC;AAoDD,0CAsCC;AAgED,0DAGC;AAmBD,8DAQC;AA4GD,gDAWC;AAzZD,4DAAoD;AACpD,sDAW8B;AAC9B,0DAA6F;AAC7F,4DAA6D;AAC7D,yCAA0I;AAC1I,gDAAsD;AAKtD,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,CAAC;AAC9B,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,WAAW,CAAC;AAEvC,0BAA0B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C,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,mBAAmB,CAAC,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;KAC9H,CAAC;IACF,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAChC,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,KAAqB,EACrB,MAA4B,EAC5B,aAAqC,EACrC,QAAgB,EAChB,KAAa;IAEb,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrD,OAAO,KAAK,KAAK,UAAU;QACzB,CAAC,CAAC,GAAG,MAAM,IAAI,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE;QAChE,CAAC,CAAC,GAAG,MAAM,IAAI,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description The choices of the «limit reminders» setting (`/limits_reminders`) and the rule that picks one for a topic —
|
|
3
|
+
* kept apart from `plan.ts` (the decisions and texts of the note) because the instance settings and the state store need only
|
|
4
|
+
* these, and they load before any env file is read: this module imports nothing.
|
|
5
|
+
*/
|
|
6
|
+
/** The stored value of «Off» (`settings.json` and `state.json` keep minutes; `0` is no interval). */
|
|
7
|
+
export declare const limitReminderOffMinutes = 0;
|
|
8
|
+
/** The intervals the picker offers, in the order it shows them; «Off» is the picker's own button. */
|
|
9
|
+
export declare const limitReminderIntervalOptions: readonly [60, 120, 240];
|
|
10
|
+
/** @name LimitReminderMinutes @description One interval the `/limits_reminders` setting offers. */
|
|
11
|
+
export type LimitReminderMinutes = (typeof limitReminderIntervalOptions)[number];
|
|
12
|
+
/** @name LimitReminderChoice @description What the setting stores: an interval, or Off (`0`). */
|
|
13
|
+
export type LimitReminderChoice = LimitReminderMinutes | typeof limitReminderOffMinutes;
|
|
14
|
+
/** Every stored value the setting accepts, Off first: the values a picker's buttons write. */
|
|
15
|
+
export declare const limitReminderChoices: readonly LimitReminderChoice[];
|
|
16
|
+
/** The interval nobody chose. */
|
|
17
|
+
export declare const limitReminderDefaultMinutes: LimitReminderMinutes;
|
|
18
|
+
/** @description Whether a stored number is one of the offered intervals. */
|
|
19
|
+
export declare function checkIsLimitReminderMinutes(value: number | null | undefined): value is LimitReminderMinutes;
|
|
20
|
+
/** @description Whether a stored number is a choice of the setting: an offered interval or Off (a hand-edited file may hold anything). */
|
|
21
|
+
export declare function checkIsLimitReminderChoice(value: number | null | undefined): value is LimitReminderChoice;
|
|
22
|
+
/**
|
|
23
|
+
* @description The interval a topic is under: its own choice, else General's, else {@link limitReminderDefaultMinutes}; `null` =
|
|
24
|
+
* Off. `topic` / `general` are the stored values (`undefined` or `null` = no choice made; `0` = Off; a number that is no choice
|
|
25
|
+
* counts as no choice). A topic's Off beats General's interval, a topic's interval beats General's Off.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveLimitRemindersMinutes(general: number | null | undefined, topic: number | null | undefined): LimitReminderMinutes | null;
|
|
28
|
+
/** @description The interval in ms, or `null` when the reminder is off. `overrideMs` is the test-only timing seam (`CHARNESS_TEST_TIMINGS`); Off stays off. */
|
|
29
|
+
export declare function getLimitReminderIntervalMs(minutes: LimitReminderMinutes | null, overrideMs: number | undefined): number | null;
|
|
30
|
+
//# sourceMappingURL=reminderChoices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reminderChoices.d.ts","sourceRoot":"","sources":["../../src/limitNotes/reminderChoices.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,qGAAqG;AACrG,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,yBAA0B,CAAC;AAEpE,mGAAmG;AACnG,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjF,iGAAiG;AACjG,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,OAAO,uBAAuB,CAAC;AAExF,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,SAAS,mBAAmB,EAA+D,CAAC;AAE/H,iCAAiC;AACjC,eAAO,MAAM,2BAA2B,EAAE,oBAAyB,CAAC;AAEpE,4EAA4E;AAC5E,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,oBAAoB,CAE3G;AAED,0IAA0I;AAC1I,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,mBAAmB,CAEzG;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,oBAAoB,GAAG,IAAI,CAM9I;AAID,+JAA+J;AAC/J,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAE9H"}
|