charness 3.6.1 → 3.7.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 +267 -0
- package/DEVELOPMENT.md +31 -5
- package/MIGRATION_RENAME_TO_CHARNESS.md +3 -2
- package/README.md +84 -782
- package/SETUP.md +37 -10
- package/agent-plugin/.claude-plugin/plugin.json +7 -0
- package/agent-plugin/README.md +35 -0
- package/agent-plugin/skills/charness-delegate-claude/SKILL.md +85 -0
- package/agent-plugin/skills/charness-delegate-claude/summarize-events.py +90 -0
- package/agent-plugin/skills/charness-delegate-opencode/SKILL.md +68 -0
- package/agent-plugin/skills/charness-manager/SKILL.md +152 -0
- package/dist/adapters/adapterNames.d.ts +6 -0
- package/dist/adapters/adapterNames.d.ts.map +1 -1
- package/dist/adapters/adapterNames.js +8 -2
- package/dist/adapters/adapterNames.js.map +1 -1
- package/dist/adapters/claudeCliAdapter.d.ts +8 -0
- package/dist/adapters/claudeCliAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeCliAdapter.js +42 -5
- package/dist/adapters/claudeCliAdapter.js.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.d.ts +10 -9
- package/dist/adapters/claudeJsonStreamAdapter.d.ts.map +1 -1
- package/dist/adapters/claudeJsonStreamAdapter.js +53 -55
- package/dist/adapters/claudeJsonStreamAdapter.js.map +1 -1
- package/dist/adapters/createAdapter.d.ts +8 -0
- package/dist/adapters/createAdapter.d.ts.map +1 -1
- package/dist/adapters/createAdapter.js +14 -2
- package/dist/adapters/createAdapter.js.map +1 -1
- package/dist/adapters/openCodeAdapter.d.ts +43 -6
- package/dist/adapters/openCodeAdapter.d.ts.map +1 -1
- package/dist/adapters/openCodeAdapter.js +95 -6
- package/dist/adapters/openCodeAdapter.js.map +1 -1
- package/dist/agentLogin/agentLogin.d.ts +1 -1
- package/dist/agentLogin/agentLogin.d.ts.map +1 -1
- package/dist/apiRetryKick.d.ts +4 -3
- package/dist/apiRetryKick.d.ts.map +1 -1
- package/dist/apiRetryKick.js +16 -9
- package/dist/apiRetryKick.js.map +1 -1
- package/dist/bot.d.ts.map +1 -1
- package/dist/bot.js +1313 -381
- package/dist/bot.js.map +1 -1
- package/dist/cli/claudeProfiles.d.ts +11 -6
- package/dist/cli/claudeProfiles.d.ts.map +1 -1
- package/dist/cli/claudeProfiles.js +50 -22
- package/dist/cli/claudeProfiles.js.map +1 -1
- package/dist/cli/hot.d.ts +5 -0
- package/dist/cli/hot.d.ts.map +1 -1
- package/dist/cli/hot.js +71 -25
- package/dist/cli/hot.js.map +1 -1
- package/dist/cli/tscWatchGuard.d.ts +95 -0
- package/dist/cli/tscWatchGuard.d.ts.map +1 -0
- package/dist/cli/tscWatchGuard.js +295 -0
- package/dist/cli/tscWatchGuard.js.map +1 -0
- package/dist/cli.js +12 -1
- package/dist/cli.js.map +1 -1
- package/dist/connectors/jira/answerSink.d.ts +10 -0
- package/dist/connectors/jira/answerSink.d.ts.map +1 -1
- package/dist/connectors/jira/answerSink.js +13 -0
- package/dist/connectors/jira/answerSink.js.map +1 -1
- package/dist/connectors/jira/config.d.ts +2 -0
- package/dist/connectors/jira/config.d.ts.map +1 -1
- package/dist/connectors/jira/config.js +9 -1
- package/dist/connectors/jira/config.js.map +1 -1
- package/dist/connectors/jira/connector.d.ts +11 -1
- package/dist/connectors/jira/connector.d.ts.map +1 -1
- package/dist/connectors/jira/connector.js +7 -0
- package/dist/connectors/jira/connector.js.map +1 -1
- package/dist/connectors/jira/inbound.d.ts +27 -4
- package/dist/connectors/jira/inbound.d.ts.map +1 -1
- package/dist/connectors/jira/inbound.js +69 -8
- package/dist/connectors/jira/inbound.js.map +1 -1
- package/dist/connectors/jira/issueBlocks.d.ts +5 -0
- package/dist/connectors/jira/issueBlocks.d.ts.map +1 -1
- package/dist/connectors/jira/issueBlocks.js +11 -0
- package/dist/connectors/jira/issueBlocks.js.map +1 -1
- package/dist/connectors/telegram/bindPicker.d.ts +5 -0
- package/dist/connectors/telegram/bindPicker.d.ts.map +1 -1
- package/dist/connectors/telegram/bindPicker.js +18 -1
- package/dist/connectors/telegram/bindPicker.js.map +1 -1
- package/dist/connectors/telegram/bindPickerClaims.d.ts +46 -0
- package/dist/connectors/telegram/bindPickerClaims.d.ts.map +1 -0
- package/dist/connectors/telegram/bindPickerClaims.js +83 -0
- package/dist/connectors/telegram/bindPickerClaims.js.map +1 -0
- package/dist/connectors/telegram/bindSweep.d.ts +32 -0
- package/dist/connectors/telegram/bindSweep.d.ts.map +1 -0
- package/dist/connectors/telegram/bindSweep.js +47 -0
- package/dist/connectors/telegram/bindSweep.js.map +1 -0
- package/dist/connectors/telegram/bindingWelcome.d.ts +23 -0
- package/dist/connectors/telegram/bindingWelcome.d.ts.map +1 -0
- package/dist/connectors/telegram/bindingWelcome.js +26 -0
- package/dist/connectors/telegram/bindingWelcome.js.map +1 -0
- package/dist/connectors/telegram/botApiConnection.d.ts +74 -0
- package/dist/connectors/telegram/botApiConnection.d.ts.map +1 -0
- package/dist/connectors/telegram/botApiConnection.js +201 -0
- package/dist/connectors/telegram/botApiConnection.js.map +1 -0
- package/dist/connectors/telegram/commands/botCore.d.ts +8 -2
- package/dist/connectors/telegram/commands/botCore.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/botSkills.d.ts +21 -0
- package/dist/connectors/telegram/commands/botSkills.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/botSkills.js +133 -0
- package/dist/connectors/telegram/commands/botSkills.js.map +1 -0
- package/dist/connectors/telegram/commands/callbackMessage.d.ts +5 -0
- package/dist/connectors/telegram/commands/callbackMessage.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/callbackMessage.js +9 -0
- package/dist/connectors/telegram/commands/callbackMessage.js.map +1 -1
- package/dist/connectors/telegram/commands/compaction.d.ts +65 -3
- package/dist/connectors/telegram/commands/compaction.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/compaction.js +512 -94
- package/dist/connectors/telegram/commands/compaction.js.map +1 -1
- package/dist/connectors/telegram/commands/displayModes.d.ts +1 -1
- package/dist/connectors/telegram/commands/displayModes.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/displayModes.js +6 -18
- package/dist/connectors/telegram/commands/displayModes.js.map +1 -1
- package/dist/connectors/telegram/commands/fallbackChain.js +5 -5
- package/dist/connectors/telegram/commands/fallbackChain.js.map +1 -1
- package/dist/connectors/telegram/commands/reminders.d.ts +1 -1
- package/dist/connectors/telegram/commands/reminders.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/reminders.js +4 -15
- package/dist/connectors/telegram/commands/reminders.js.map +1 -1
- package/dist/connectors/telegram/commands/selfUpdate.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/selfUpdate.js +1 -11
- package/dist/connectors/telegram/commands/selfUpdate.js.map +1 -1
- package/dist/connectors/telegram/commands/taskAgents.d.ts +22 -0
- package/dist/connectors/telegram/commands/taskAgents.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/taskAgents.js +104 -0
- package/dist/connectors/telegram/commands/taskAgents.js.map +1 -0
- package/dist/connectors/telegram/commands/todo.d.ts +82 -0
- package/dist/connectors/telegram/commands/todo.d.ts.map +1 -0
- package/dist/connectors/telegram/commands/todo.js +384 -0
- package/dist/connectors/telegram/commands/todo.js.map +1 -0
- package/dist/connectors/telegram/commands/topicCommand.d.ts +6 -2
- package/dist/connectors/telegram/commands/topicCommand.d.ts.map +1 -1
- package/dist/connectors/telegram/commands/topicCommand.js +6 -9
- package/dist/connectors/telegram/commands/topicCommand.js.map +1 -1
- package/dist/connectors/telegram/openBindMessages.d.ts +45 -0
- package/dist/connectors/telegram/openBindMessages.d.ts.map +1 -0
- package/dist/connectors/telegram/openBindMessages.js +67 -0
- package/dist/connectors/telegram/openBindMessages.js.map +1 -0
- package/dist/connectors/telegram/outputFlushPlan.d.ts +49 -0
- package/dist/connectors/telegram/outputFlushPlan.d.ts.map +1 -1
- package/dist/connectors/telegram/outputFlushPlan.js +46 -0
- package/dist/connectors/telegram/outputFlushPlan.js.map +1 -1
- package/dist/connectors/telegram/pendingTopicName.d.ts +26 -0
- package/dist/connectors/telegram/pendingTopicName.d.ts.map +1 -0
- package/dist/connectors/telegram/pendingTopicName.js +27 -0
- package/dist/connectors/telegram/pendingTopicName.js.map +1 -0
- package/dist/connectors/test/connector.d.ts.map +1 -1
- package/dist/connectors/test/connector.js +6 -1
- package/dist/connectors/test/connector.js.map +1 -1
- package/dist/i18n/de.d.ts.map +1 -1
- package/dist/i18n/de.js +90 -7
- package/dist/i18n/de.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +90 -7
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +90 -7
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +90 -7
- package/dist/i18n/fr.js.map +1 -1
- package/dist/i18n/hi.d.ts.map +1 -1
- package/dist/i18n/hi.js +90 -7
- package/dist/i18n/hi.js.map +1 -1
- package/dist/i18n/ja.d.ts.map +1 -1
- package/dist/i18n/ja.js +90 -7
- package/dist/i18n/ja.js.map +1 -1
- package/dist/i18n/ka.d.ts.map +1 -1
- package/dist/i18n/ka.js +90 -7
- package/dist/i18n/ka.js.map +1 -1
- package/dist/i18n/pt.d.ts.map +1 -1
- package/dist/i18n/pt.js +90 -7
- package/dist/i18n/pt.js.map +1 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +90 -7
- package/dist/i18n/ru.js.map +1 -1
- package/dist/i18n/uk.d.ts.map +1 -1
- package/dist/i18n/uk.js +90 -7
- package/dist/i18n/uk.js.map +1 -1
- package/dist/i18n/uz.d.ts.map +1 -1
- package/dist/i18n/uz.js +90 -7
- package/dist/i18n/uz.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +90 -7
- package/dist/i18n/zh.js.map +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.js +1 -1
- package/dist/installManager.d.ts +13 -0
- package/dist/installManager.d.ts.map +1 -1
- package/dist/installManager.js +38 -4
- package/dist/installManager.js.map +1 -1
- package/dist/instanceSettings.d.ts +40 -1
- package/dist/instanceSettings.d.ts.map +1 -1
- package/dist/instanceSettings.js +105 -26
- package/dist/instanceSettings.js.map +1 -1
- package/dist/openCodeQuestionFlow.d.ts +30 -0
- package/dist/openCodeQuestionFlow.d.ts.map +1 -1
- package/dist/openCodeQuestionFlow.js +43 -0
- package/dist/openCodeQuestionFlow.js.map +1 -1
- package/dist/postToSession.d.ts +20 -5
- package/dist/postToSession.d.ts.map +1 -1
- package/dist/postToSession.js +38 -7
- package/dist/postToSession.js.map +1 -1
- package/dist/remoteRun/cliArgs.d.ts +73 -0
- package/dist/remoteRun/cliArgs.d.ts.map +1 -0
- package/dist/remoteRun/cliArgs.js +197 -0
- package/dist/remoteRun/cliArgs.js.map +1 -0
- package/dist/remoteRun/commands.d.ts +56 -0
- package/dist/remoteRun/commands.d.ts.map +1 -0
- package/dist/remoteRun/commands.js +306 -0
- package/dist/remoteRun/commands.js.map +1 -0
- package/dist/remoteRun/depsPlan.d.ts +16 -0
- package/dist/remoteRun/depsPlan.d.ts.map +1 -0
- package/dist/remoteRun/depsPlan.js +82 -0
- package/dist/remoteRun/depsPlan.js.map +1 -0
- package/dist/remoteRun/exitCodes.d.ts +34 -0
- package/dist/remoteRun/exitCodes.d.ts.map +1 -0
- package/dist/remoteRun/exitCodes.js +38 -0
- package/dist/remoteRun/exitCodes.js.map +1 -0
- package/dist/remoteRun/foreground.d.ts +29 -0
- package/dist/remoteRun/foreground.d.ts.map +1 -0
- package/dist/remoteRun/foreground.js +159 -0
- package/dist/remoteRun/foreground.js.map +1 -0
- package/dist/remoteRun/interrupts.d.ts +17 -0
- package/dist/remoteRun/interrupts.d.ts.map +1 -0
- package/dist/remoteRun/interrupts.js +41 -0
- package/dist/remoteRun/interrupts.js.map +1 -0
- package/dist/remoteRun/jobFiles.d.ts +31 -0
- package/dist/remoteRun/jobFiles.d.ts.map +1 -0
- package/dist/remoteRun/jobFiles.js +84 -0
- package/dist/remoteRun/jobFiles.js.map +1 -0
- package/dist/remoteRun/jobFormat.d.ts +16 -0
- package/dist/remoteRun/jobFormat.d.ts.map +1 -0
- package/dist/remoteRun/jobFormat.js +130 -0
- package/dist/remoteRun/jobFormat.js.map +1 -0
- package/dist/remoteRun/jobId.d.ts +15 -0
- package/dist/remoteRun/jobId.d.ts.map +1 -0
- package/dist/remoteRun/jobId.js +85 -0
- package/dist/remoteRun/jobId.js.map +1 -0
- package/dist/remoteRun/jobMeta.d.ts +18 -0
- package/dist/remoteRun/jobMeta.d.ts.map +1 -0
- package/dist/remoteRun/jobMeta.js +33 -0
- package/dist/remoteRun/jobMeta.js.map +1 -0
- package/dist/remoteRun/jobQuery.d.ts +12 -0
- package/dist/remoteRun/jobQuery.d.ts.map +1 -0
- package/dist/remoteRun/jobQuery.js +22 -0
- package/dist/remoteRun/jobQuery.js.map +1 -0
- package/dist/remoteRun/jobRecords.d.ts +22 -0
- package/dist/remoteRun/jobRecords.d.ts.map +1 -0
- package/dist/remoteRun/jobRecords.js +145 -0
- package/dist/remoteRun/jobRecords.js.map +1 -0
- package/dist/remoteRun/jobState.d.ts +62 -0
- package/dist/remoteRun/jobState.d.ts.map +1 -0
- package/dist/remoteRun/jobState.js +132 -0
- package/dist/remoteRun/jobState.js.map +1 -0
- package/dist/remoteRun/leaseTiming.d.ts +18 -0
- package/dist/remoteRun/leaseTiming.d.ts.map +1 -0
- package/dist/remoteRun/leaseTiming.js +43 -0
- package/dist/remoteRun/leaseTiming.js.map +1 -0
- package/dist/remoteRun/output.d.ts +35 -0
- package/dist/remoteRun/output.d.ts.map +1 -0
- package/dist/remoteRun/output.js +82 -0
- package/dist/remoteRun/output.js.map +1 -0
- package/dist/remoteRun/pathPatterns.d.ts +33 -0
- package/dist/remoteRun/pathPatterns.d.ts.map +1 -0
- package/dist/remoteRun/pathPatterns.js +115 -0
- package/dist/remoteRun/pathPatterns.js.map +1 -0
- package/dist/remoteRun/probe.d.ts +56 -0
- package/dist/remoteRun/probe.d.ts.map +1 -0
- package/dist/remoteRun/probe.js +123 -0
- package/dist/remoteRun/probe.js.map +1 -0
- package/dist/remoteRun/project.d.ts +26 -0
- package/dist/remoteRun/project.d.ts.map +1 -0
- package/dist/remoteRun/project.js +159 -0
- package/dist/remoteRun/project.js.map +1 -0
- package/dist/remoteRun/projectConfig.d.ts +38 -0
- package/dist/remoteRun/projectConfig.d.ts.map +1 -0
- package/dist/remoteRun/projectConfig.js +87 -0
- package/dist/remoteRun/projectConfig.js.map +1 -0
- package/dist/remoteRun/remoteRunCli.d.ts +15 -0
- package/dist/remoteRun/remoteRunCli.d.ts.map +1 -0
- package/dist/remoteRun/remoteRunCli.js +144 -0
- package/dist/remoteRun/remoteRunCli.js.map +1 -0
- package/dist/remoteRun/remoteRunError.d.ts +14 -0
- package/dist/remoteRun/remoteRunError.d.ts.map +1 -0
- package/dist/remoteRun/remoteRunError.js +28 -0
- package/dist/remoteRun/remoteRunError.js.map +1 -0
- package/dist/remoteRun/rsync.d.ts +17 -0
- package/dist/remoteRun/rsync.d.ts.map +1 -0
- package/dist/remoteRun/rsync.js +39 -0
- package/dist/remoteRun/rsync.js.map +1 -0
- package/dist/remoteRun/runnerClient.d.ts +50 -0
- package/dist/remoteRun/runnerClient.d.ts.map +1 -0
- package/dist/remoteRun/runnerClient.js +139 -0
- package/dist/remoteRun/runnerClient.js.map +1 -0
- package/dist/remoteRun/runners.d.ts +57 -0
- package/dist/remoteRun/runners.d.ts.map +1 -0
- package/dist/remoteRun/runners.js +181 -0
- package/dist/remoteRun/runners.js.map +1 -0
- package/dist/remoteRun/runnersConfig.d.ts +44 -0
- package/dist/remoteRun/runnersConfig.d.ts.map +1 -0
- package/dist/remoteRun/runnersConfig.js +107 -0
- package/dist/remoteRun/runnersConfig.js.map +1 -0
- package/dist/remoteRun/safeCopy.d.ts +31 -0
- package/dist/remoteRun/safeCopy.d.ts.map +1 -0
- package/dist/remoteRun/safeCopy.js +137 -0
- package/dist/remoteRun/safeCopy.js.map +1 -0
- package/dist/remoteRun/sendPlan.d.ts +67 -0
- package/dist/remoteRun/sendPlan.d.ts.map +1 -0
- package/dist/remoteRun/sendPlan.js +139 -0
- package/dist/remoteRun/sendPlan.js.map +1 -0
- package/dist/remoteRun/ssh.d.ts +62 -0
- package/dist/remoteRun/ssh.d.ts.map +1 -0
- package/dist/remoteRun/ssh.js +202 -0
- package/dist/remoteRun/ssh.js.map +1 -0
- package/dist/remoteRun/submit.d.ts +29 -0
- package/dist/remoteRun/submit.d.ts.map +1 -0
- package/dist/remoteRun/submit.js +142 -0
- package/dist/remoteRun/submit.js.map +1 -0
- package/dist/requests/answerRequest.d.ts +5 -0
- package/dist/requests/answerRequest.d.ts.map +1 -1
- package/dist/requests/answerRequest.js +16 -1
- package/dist/requests/answerRequest.js.map +1 -1
- package/dist/requests/requestLedger.d.ts +13 -0
- package/dist/requests/requestLedger.d.ts.map +1 -1
- package/dist/requests/requestLedger.js +9 -0
- package/dist/requests/requestLedger.js.map +1 -1
- package/dist/requests/topicRequestSettle.d.ts +30 -0
- package/dist/requests/topicRequestSettle.d.ts.map +1 -0
- package/dist/requests/topicRequestSettle.js +23 -0
- package/dist/requests/topicRequestSettle.js.map +1 -0
- package/dist/requests/wakeUpEngine.d.ts +4 -0
- package/dist/requests/wakeUpEngine.d.ts.map +1 -1
- package/dist/requests/wakeUpEngine.js +5 -1
- package/dist/requests/wakeUpEngine.js.map +1 -1
- package/dist/scheduler/delivery.d.ts +2 -0
- package/dist/scheduler/delivery.d.ts.map +1 -1
- package/dist/scheduler/delivery.js +8 -4
- package/dist/scheduler/delivery.js.map +1 -1
- package/dist/scheduler/mcpSurface.d.ts +59 -10
- package/dist/scheduler/mcpSurface.d.ts.map +1 -1
- package/dist/scheduler/mcpSurface.js +276 -79
- package/dist/scheduler/mcpSurface.js.map +1 -1
- package/dist/scheduler/recurrence.d.ts +5 -0
- package/dist/scheduler/recurrence.d.ts.map +1 -1
- package/dist/scheduler/recurrence.js +12 -2
- package/dist/scheduler/recurrence.js.map +1 -1
- package/dist/scheduler/strictToolInput.d.ts +45 -0
- package/dist/scheduler/strictToolInput.d.ts.map +1 -0
- package/dist/scheduler/strictToolInput.js +155 -0
- package/dist/scheduler/strictToolInput.js.map +1 -0
- package/dist/scheduler/types.d.ts +5 -0
- package/dist/scheduler/types.d.ts.map +1 -1
- package/dist/scheduler/workerWatch.d.ts +23 -0
- package/dist/scheduler/workerWatch.d.ts.map +1 -0
- package/dist/scheduler/workerWatch.js +26 -0
- package/dist/scheduler/workerWatch.js.map +1 -0
- package/dist/selfUpdate/emittedSource.d.ts +11 -0
- package/dist/selfUpdate/emittedSource.d.ts.map +1 -0
- package/dist/selfUpdate/emittedSource.js +24 -0
- package/dist/selfUpdate/emittedSource.js.map +1 -0
- package/dist/selfUpdate/gitSource.d.ts +0 -6
- package/dist/selfUpdate/gitSource.d.ts.map +1 -1
- package/dist/selfUpdate/gitSource.js +2 -18
- package/dist/selfUpdate/gitSource.js.map +1 -1
- package/dist/selfUpdate/updatePending.d.ts +1 -1
- package/dist/sendErrorClassifier.d.ts +10 -0
- package/dist/sendErrorClassifier.d.ts.map +1 -1
- package/dist/sendErrorClassifier.js +22 -0
- package/dist/sendErrorClassifier.js.map +1 -1
- package/dist/state.d.ts +78 -7
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +125 -8
- package/dist/state.js.map +1 -1
- package/dist/stateFile.d.ts +9 -0
- package/dist/stateFile.d.ts.map +1 -0
- package/dist/stateFile.js +57 -0
- package/dist/stateFile.js.map +1 -0
- package/dist/stt/sttInstall.d.ts +7 -3
- package/dist/stt/sttInstall.d.ts.map +1 -1
- package/dist/stt/sttInstall.js +8 -4
- package/dist/stt/sttInstall.js.map +1 -1
- package/dist/stt/sttSettings.d.ts +2 -1
- package/dist/stt/sttSettings.d.ts.map +1 -1
- package/dist/stt/sttSettings.js +3 -2
- package/dist/stt/sttSettings.js.map +1 -1
- package/dist/stt/transcribeChain.js +2 -0
- package/dist/stt/transcribeChain.js.map +1 -1
- package/dist/testTimings.d.ts +13 -3
- package/dist/testTimings.d.ts.map +1 -1
- package/dist/testTimings.js +26 -2
- package/dist/testTimings.js.map +1 -1
- package/dist/todos/board.d.ts +83 -0
- package/dist/todos/board.d.ts.map +1 -0
- package/dist/todos/board.js +227 -0
- package/dist/todos/board.js.map +1 -0
- package/dist/todos/format.d.ts +33 -0
- package/dist/todos/format.d.ts.map +1 -0
- package/dist/todos/format.js +90 -0
- package/dist/todos/format.js.map +1 -0
- package/dist/todos/merge.d.ts +46 -0
- package/dist/todos/merge.d.ts.map +1 -0
- package/dist/todos/merge.js +137 -0
- package/dist/todos/merge.js.map +1 -0
- package/dist/todos/midTurn.d.ts +75 -0
- package/dist/todos/midTurn.d.ts.map +1 -0
- package/dist/todos/midTurn.js +214 -0
- package/dist/todos/midTurn.js.map +1 -0
- package/dist/todos/nag.d.ts +85 -0
- package/dist/todos/nag.d.ts.map +1 -0
- package/dist/todos/nag.js +103 -0
- package/dist/todos/nag.js.map +1 -0
- package/dist/todos/order.d.ts +25 -0
- package/dist/todos/order.d.ts.map +1 -0
- package/dist/todos/order.js +61 -0
- package/dist/todos/order.js.map +1 -0
- package/dist/todos/projects.d.ts +102 -0
- package/dist/todos/projects.d.ts.map +1 -0
- package/dist/todos/projects.js +342 -0
- package/dist/todos/projects.js.map +1 -0
- package/dist/todos/registry.d.ts +64 -0
- package/dist/todos/registry.d.ts.map +1 -0
- package/dist/todos/registry.js +116 -0
- package/dist/todos/registry.js.map +1 -0
- package/dist/todos/reminderEngine.d.ts +78 -0
- package/dist/todos/reminderEngine.d.ts.map +1 -0
- package/dist/todos/reminderEngine.js +162 -0
- package/dist/todos/reminderEngine.js.map +1 -0
- package/dist/todos/store.d.ts +34 -0
- package/dist/todos/store.d.ts.map +1 -0
- package/dist/todos/store.js +208 -0
- package/dist/todos/store.js.map +1 -0
- package/dist/todos/tools.d.ts +26 -0
- package/dist/todos/tools.d.ts.map +1 -0
- package/dist/todos/tools.js +25 -0
- package/dist/todos/tools.js.map +1 -0
- package/dist/todos/types.d.ts +85 -0
- package/dist/todos/types.d.ts.map +1 -0
- package/dist/todos/types.js +30 -0
- package/dist/todos/types.js.map +1 -0
- package/dist/trackers/taskAgentLimit.d.ts +58 -0
- package/dist/trackers/taskAgentLimit.d.ts.map +1 -0
- package/dist/trackers/taskAgentLimit.js +62 -0
- package/dist/trackers/taskAgentLimit.js.map +1 -0
- package/dist/trackers/taskAgentSlots.d.ts +109 -0
- package/dist/trackers/taskAgentSlots.d.ts.map +1 -0
- package/dist/trackers/taskAgentSlots.js +227 -0
- package/dist/trackers/taskAgentSlots.js.map +1 -0
- package/dist/trackers/types.d.ts +14 -0
- package/dist/trackers/types.d.ts.map +1 -0
- package/dist/trackers/types.js +3 -0
- package/dist/trackers/types.js.map +1 -0
- package/dist/types.d.ts +80 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/adoptReplayGate.d.ts +16 -0
- package/dist/utils/adoptReplayGate.d.ts.map +1 -0
- package/dist/utils/adoptReplayGate.js +35 -0
- package/dist/utils/adoptReplayGate.js.map +1 -0
- package/dist/utils/agentPlugin.d.ts +113 -0
- package/dist/utils/agentPlugin.d.ts.map +1 -0
- package/dist/utils/agentPlugin.js +192 -0
- package/dist/utils/agentPlugin.js.map +1 -0
- package/dist/utils/autoContinueOnLimit.d.ts +7 -4
- package/dist/utils/autoContinueOnLimit.d.ts.map +1 -1
- package/dist/utils/autoContinueOnLimit.js +8 -5
- package/dist/utils/autoContinueOnLimit.js.map +1 -1
- package/dist/utils/botSkills.d.ts +62 -0
- package/dist/utils/botSkills.d.ts.map +1 -0
- package/dist/utils/botSkills.js +53 -0
- package/dist/utils/botSkills.js.map +1 -0
- package/dist/utils/botSkillsSetting.d.ts +7 -0
- package/dist/utils/botSkillsSetting.d.ts.map +1 -0
- package/dist/utils/botSkillsSetting.js +9 -0
- package/dist/utils/botSkillsSetting.js.map +1 -0
- package/dist/utils/claudeCodeVersion.d.ts +7 -0
- package/dist/utils/claudeCodeVersion.d.ts.map +1 -1
- package/dist/utils/claudeCodeVersion.js +14 -1
- package/dist/utils/claudeCodeVersion.js.map +1 -1
- package/dist/utils/claudeCompactHook.d.ts +33 -15
- package/dist/utils/claudeCompactHook.d.ts.map +1 -1
- package/dist/utils/claudeCompactHook.js +36 -17
- package/dist/utils/claudeCompactHook.js.map +1 -1
- package/dist/utils/claudeCompactSummary.d.ts +15 -0
- package/dist/utils/claudeCompactSummary.d.ts.map +1 -0
- package/dist/utils/claudeCompactSummary.js +96 -0
- package/dist/utils/claudeCompactSummary.js.map +1 -0
- package/dist/utils/claudeLimitSwitch.d.ts +11 -9
- package/dist/utils/claudeLimitSwitch.d.ts.map +1 -1
- package/dist/utils/claudeLimitSwitch.js +18 -16
- package/dist/utils/claudeLimitSwitch.js.map +1 -1
- package/dist/utils/claudeProfiles.d.ts +5 -0
- package/dist/utils/claudeProfiles.d.ts.map +1 -1
- package/dist/utils/claudeProfiles.js +14 -0
- package/dist/utils/claudeProfiles.js.map +1 -1
- package/dist/utils/claudeSessionTitle.d.ts +2 -1
- package/dist/utils/claudeSessionTitle.d.ts.map +1 -1
- package/dist/utils/claudeSessionTitle.js +14 -14
- package/dist/utils/claudeSessionTitle.js.map +1 -1
- package/dist/utils/claudeUsage.d.ts +95 -15
- package/dist/utils/claudeUsage.d.ts.map +1 -1
- package/dist/utils/claudeUsage.js +241 -41
- package/dist/utils/claudeUsage.js.map +1 -1
- package/dist/utils/claudeUsageRefresher.d.ts +10 -0
- package/dist/utils/claudeUsageRefresher.d.ts.map +1 -1
- package/dist/utils/claudeUsageRefresher.js +11 -0
- package/dist/utils/claudeUsageRefresher.js.map +1 -1
- package/dist/utils/claudeUserEntry.d.ts +50 -0
- package/dist/utils/claudeUserEntry.d.ts.map +1 -0
- package/dist/utils/claudeUserEntry.js +120 -0
- package/dist/utils/claudeUserEntry.js.map +1 -0
- package/dist/utils/clearThreadOutputQueues.d.ts +4 -3
- package/dist/utils/clearThreadOutputQueues.d.ts.map +1 -1
- package/dist/utils/clearThreadOutputQueues.js +1 -1
- package/dist/utils/clearThreadOutputQueues.js.map +1 -1
- package/dist/utils/compactOnIdle.d.ts +33 -13
- package/dist/utils/compactOnIdle.d.ts.map +1 -1
- package/dist/utils/compactOnIdle.js +35 -15
- package/dist/utils/compactOnIdle.js.map +1 -1
- package/dist/utils/fallbackBridge.d.ts +5 -0
- package/dist/utils/fallbackBridge.d.ts.map +1 -1
- package/dist/utils/fallbackBridge.js +19 -3
- package/dist/utils/fallbackBridge.js.map +1 -1
- package/dist/utils/fallbackChain.d.ts +9 -3
- package/dist/utils/fallbackChain.d.ts.map +1 -1
- package/dist/utils/fallbackChain.js +21 -3
- package/dist/utils/fallbackChain.js.map +1 -1
- package/dist/utils/fileSendPlan.d.ts +6 -0
- package/dist/utils/fileSendPlan.d.ts.map +1 -1
- package/dist/utils/fileSendPlan.js +11 -0
- package/dist/utils/fileSendPlan.js.map +1 -1
- package/dist/utils/fileSendService.d.ts +7 -1
- package/dist/utils/fileSendService.d.ts.map +1 -1
- package/dist/utils/fileSendService.js +6 -2
- package/dist/utils/fileSendService.js.map +1 -1
- package/dist/utils/groupFinalizePlan.d.ts +8 -10
- package/dist/utils/groupFinalizePlan.d.ts.map +1 -1
- package/dist/utils/groupFinalizePlan.js +8 -12
- package/dist/utils/groupFinalizePlan.js.map +1 -1
- package/dist/utils/jsonStreamHost.d.ts +13 -0
- package/dist/utils/jsonStreamHost.d.ts.map +1 -1
- package/dist/utils/jsonStreamHost.js +13 -0
- package/dist/utils/jsonStreamHost.js.map +1 -1
- package/dist/utils/messageSendService.d.ts +5 -3
- package/dist/utils/messageSendService.d.ts.map +1 -1
- package/dist/utils/messageSendService.js +12 -5
- package/dist/utils/messageSendService.js.map +1 -1
- package/dist/utils/openCodeCompactPlugin.d.ts +39 -14
- package/dist/utils/openCodeCompactPlugin.d.ts.map +1 -1
- package/dist/utils/openCodeCompactPlugin.js +106 -38
- package/dist/utils/openCodeCompactPlugin.js.map +1 -1
- package/dist/utils/promptDelivery.d.ts +29 -12
- package/dist/utils/promptDelivery.d.ts.map +1 -1
- package/dist/utils/promptDelivery.js +13 -5
- package/dist/utils/promptDelivery.js.map +1 -1
- package/dist/utils/sentKindsSummary.d.ts +10 -0
- package/dist/utils/sentKindsSummary.d.ts.map +1 -0
- package/dist/utils/sentKindsSummary.js +18 -0
- package/dist/utils/sentKindsSummary.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 +12 -0
- package/dist/utils/telegramError.js.map +1 -1
- package/dist/utils/topicView.d.ts +1 -1
- package/dist/utils/topicView.js +1 -1
- package/dist/utils/transcribeAudio.d.ts +10 -0
- package/dist/utils/transcribeAudio.d.ts.map +1 -1
- package/dist/utils/transcribeAudio.js +22 -3
- package/dist/utils/transcribeAudio.js.map +1 -1
- package/dist/utils/transcriptErrorTime.d.ts +8 -0
- package/dist/utils/transcriptErrorTime.d.ts.map +1 -0
- package/dist/utils/transcriptErrorTime.js +56 -0
- package/dist/utils/transcriptErrorTime.js.map +1 -0
- package/dist/utils/wedgeRecovery.d.ts +2 -0
- package/dist/utils/wedgeRecovery.d.ts.map +1 -1
- package/dist/utils/wedgeRecovery.js +1 -1
- package/dist/utils/wedgeRecovery.js.map +1 -1
- package/package.json +11 -3
- package/remoteRun/runner.sh +1242 -0
- package/stt/gigaam_sidecar.py +555 -50
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* WHY this exists: a bot-issued compaction carries its instruction as
|
|
7
7
|
* `/compact <instruction>`, but the overflow-triggered (auto) compaction is started
|
|
8
8
|
* by the CLI itself and has no argument the bot could fill. It summarised with the
|
|
9
|
-
* default prompt: the loaded skills were not named
|
|
10
|
-
*
|
|
9
|
+
* default prompt: the loaded skills were not named and no next-steps checklist
|
|
10
|
+
* closed the summary, so the continuing session silently stopped following those
|
|
11
|
+
* skills. The hook adds the resume guidance (`compactionResumeGuidance`: the skills
|
|
12
|
+
* to load again, then that checklist). Claude Code runs `PreCompact` hooks before
|
|
11
13
|
* EVERY compaction (`trigger` `auto` and `manual`) and appends a hook's stdout to
|
|
12
14
|
* that compaction's custom instructions — measured on v2.1.289: an
|
|
13
15
|
* overflow-triggered compaction's summary opened with the line the hook printed.
|
|
@@ -16,8 +18,12 @@
|
|
|
16
18
|
*
|
|
17
19
|
* A bot-issued compaction already carries the same text, so the hook prints
|
|
18
20
|
* nothing when the compaction's `custom_instructions` (part of the JSON the hook
|
|
19
|
-
* reads on stdin) already contain the
|
|
20
|
-
* get the instruction twice.
|
|
21
|
+
* reads on stdin) already contain the resume guidance (the loaded skills and the
|
|
22
|
+
* next-steps checklist) — otherwise the model would get the instruction twice.
|
|
23
|
+
*
|
|
24
|
+
* The same launch settings carry the shared todo lists' `PostToolUse` hook
|
|
25
|
+
* (`todos/midTurn.ts`): it prints the session's inbox — the project board's
|
|
26
|
+
* changes — after a tool call, and nothing when there is none.
|
|
21
27
|
*/
|
|
22
28
|
/**
|
|
23
29
|
* Name of the hook settings file inside `DATA_DIR`. ONE file shared by every
|
|
@@ -27,30 +33,41 @@
|
|
|
27
33
|
export declare const claudeCompactHookSettingsFileName = "claude-compact-hook.json";
|
|
28
34
|
/**
|
|
29
35
|
* @description The instruction the hook adds to a compaction the bot did not
|
|
30
|
-
* issue: D3 + the
|
|
31
|
-
*
|
|
36
|
+
* issue: D3 + the resume guidance. No closing section — that one exists for the
|
|
37
|
+
* bot's own idle-compaction report, which an overflow compaction never feeds; the
|
|
38
|
+
* checklist then ends the summary itself.
|
|
32
39
|
*/
|
|
33
40
|
export declare function getHookCompactionInstruction(): string;
|
|
34
41
|
/**
|
|
35
42
|
* @description Build the hook's shell command: print `instruction` unless the
|
|
36
43
|
* hook's stdin (the `PreCompact` input JSON) already contains `alreadySentMarker`.
|
|
37
44
|
* The marker is matched as a fixed string against the raw JSON, so it must be text
|
|
38
|
-
* JSON leaves unescaped — the caller passes the
|
|
45
|
+
* JSON leaves unescaped — the caller passes the resume guidance, and a test pins
|
|
39
46
|
* that it qualifies.
|
|
40
47
|
*/
|
|
41
48
|
export declare function buildPreCompactHookCommand(input: {
|
|
42
49
|
instruction: string;
|
|
43
50
|
alreadySentMarker: string;
|
|
44
51
|
}): string;
|
|
45
|
-
/**
|
|
46
|
-
|
|
52
|
+
/** One command hook with no matcher (every compaction, every tool). */
|
|
53
|
+
type CommandHookGroups = Array<{
|
|
54
|
+
hooks: Array<{
|
|
55
|
+
type: 'command';
|
|
56
|
+
command: string;
|
|
57
|
+
}>;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* @description The `--settings` payload: the `PreCompact` command hook (auto AND manual compactions) and the shared
|
|
61
|
+
* todo lists' `PostToolUse` inbox hook (every tool: the project board's changes reach a working agent with its next
|
|
62
|
+
* tool result, `todos/midTurn.ts`).
|
|
63
|
+
*/
|
|
64
|
+
export declare function buildClaudeLaunchHookSettings(commands: {
|
|
65
|
+
preCompact: string;
|
|
66
|
+
postToolUse: string;
|
|
67
|
+
}): {
|
|
47
68
|
hooks: {
|
|
48
|
-
PreCompact:
|
|
49
|
-
|
|
50
|
-
type: 'command';
|
|
51
|
-
command: string;
|
|
52
|
-
}>;
|
|
53
|
-
}>;
|
|
69
|
+
PreCompact: CommandHookGroups;
|
|
70
|
+
PostToolUse: CommandHookGroups;
|
|
54
71
|
};
|
|
55
72
|
};
|
|
56
73
|
/**
|
|
@@ -66,4 +83,5 @@ export declare function buildClaudeCompactHookSettings(command: string): {
|
|
|
66
83
|
* the same settings go inline instead, so the account never loses its key to a full disk.
|
|
67
84
|
*/
|
|
68
85
|
export declare function prepareClaudeCompactHookFlags(dataDir: string, configDir?: string | null): string[];
|
|
86
|
+
export {};
|
|
69
87
|
//# sourceMappingURL=claudeCompactHook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeCompactHook.d.ts","sourceRoot":"","sources":["../../src/utils/claudeCompactHook.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claudeCompactHook.d.ts","sourceRoot":"","sources":["../../src/utils/claudeCompactHook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAcH;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,6BAA6B,CAAC;AAE5E;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,CAOrD;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GAAG,MAAM,CAET;AAED,uEAAuE;AACvE,KAAK,iBAAiB,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAEvF;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG;IACpG,KAAK,EAAE;QAAE,UAAU,EAAE,iBAAiB,CAAC;QAAC,WAAW,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC1E,CAOA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,MAAM,GAAG,IAAW,GAAG,MAAM,EAAE,CAexG"}
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* WHY this exists: a bot-issued compaction carries its instruction as
|
|
8
8
|
* `/compact <instruction>`, but the overflow-triggered (auto) compaction is started
|
|
9
9
|
* by the CLI itself and has no argument the bot could fill. It summarised with the
|
|
10
|
-
* default prompt: the loaded skills were not named
|
|
11
|
-
*
|
|
10
|
+
* default prompt: the loaded skills were not named and no next-steps checklist
|
|
11
|
+
* closed the summary, so the continuing session silently stopped following those
|
|
12
|
+
* skills. The hook adds the resume guidance (`compactionResumeGuidance`: the skills
|
|
13
|
+
* to load again, then that checklist). Claude Code runs `PreCompact` hooks before
|
|
12
14
|
* EVERY compaction (`trigger` `auto` and `manual`) and appends a hook's stdout to
|
|
13
15
|
* that compaction's custom instructions — measured on v2.1.289: an
|
|
14
16
|
* overflow-triggered compaction's summary opened with the line the hook printed.
|
|
@@ -17,8 +19,12 @@
|
|
|
17
19
|
*
|
|
18
20
|
* A bot-issued compaction already carries the same text, so the hook prints
|
|
19
21
|
* nothing when the compaction's `custom_instructions` (part of the JSON the hook
|
|
20
|
-
* reads on stdin) already contain the
|
|
21
|
-
* get the instruction twice.
|
|
22
|
+
* reads on stdin) already contain the resume guidance (the loaded skills and the
|
|
23
|
+
* next-steps checklist) — otherwise the model would get the instruction twice.
|
|
24
|
+
*
|
|
25
|
+
* The same launch settings carry the shared todo lists' `PostToolUse` hook
|
|
26
|
+
* (`todos/midTurn.ts`): it prints the session's inbox — the project board's
|
|
27
|
+
* changes — after a tool call, and nothing when there is none.
|
|
22
28
|
*/
|
|
23
29
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
24
30
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -27,7 +33,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
27
33
|
exports.claudeCompactHookSettingsFileName = void 0;
|
|
28
34
|
exports.getHookCompactionInstruction = getHookCompactionInstruction;
|
|
29
35
|
exports.buildPreCompactHookCommand = buildPreCompactHookCommand;
|
|
30
|
-
exports.
|
|
36
|
+
exports.buildClaudeLaunchHookSettings = buildClaudeLaunchHookSettings;
|
|
31
37
|
exports.prepareClaudeCompactHookFlags = prepareClaudeCompactHookFlags;
|
|
32
38
|
const fs_1 = __importDefault(require("fs"));
|
|
33
39
|
const path_1 = __importDefault(require("path"));
|
|
@@ -35,6 +41,7 @@ const compactOnIdle_1 = require("./compactOnIdle");
|
|
|
35
41
|
const tmuxExec_1 = require("./tmuxExec");
|
|
36
42
|
const claudeProfiles_1 = require("./claudeProfiles");
|
|
37
43
|
const claudeApiKeyHelper_1 = require("./claudeApiKeyHelper");
|
|
44
|
+
const midTurn_1 = require("../todos/midTurn");
|
|
38
45
|
/**
|
|
39
46
|
* Name of the hook settings file inside `DATA_DIR`. ONE file shared by every
|
|
40
47
|
* session: its content is the same for all of them, and a session that outlives
|
|
@@ -43,30 +50,40 @@ const claudeApiKeyHelper_1 = require("./claudeApiKeyHelper");
|
|
|
43
50
|
exports.claudeCompactHookSettingsFileName = 'claude-compact-hook.json';
|
|
44
51
|
/**
|
|
45
52
|
* @description The instruction the hook adds to a compaction the bot did not
|
|
46
|
-
* issue: D3 + the
|
|
47
|
-
*
|
|
53
|
+
* issue: D3 + the resume guidance. No closing section — that one exists for the
|
|
54
|
+
* bot's own idle-compaction report, which an overflow compaction never feeds; the
|
|
55
|
+
* checklist then ends the summary itself.
|
|
48
56
|
*/
|
|
49
57
|
function getHookCompactionInstruction() {
|
|
50
58
|
return (0, compactOnIdle_1.buildCompactionInstruction)({
|
|
51
59
|
bakesSummaryGuidance: false,
|
|
52
60
|
summaryGuidance: compactOnIdle_1.compactionSummaryGuidance,
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
bakesResumeGuidance: false,
|
|
62
|
+
resumeGuidance: compactOnIdle_1.compactionResumeGuidance,
|
|
55
63
|
}) ?? '';
|
|
56
64
|
}
|
|
57
65
|
/**
|
|
58
66
|
* @description Build the hook's shell command: print `instruction` unless the
|
|
59
67
|
* hook's stdin (the `PreCompact` input JSON) already contains `alreadySentMarker`.
|
|
60
68
|
* The marker is matched as a fixed string against the raw JSON, so it must be text
|
|
61
|
-
* JSON leaves unescaped — the caller passes the
|
|
69
|
+
* JSON leaves unescaped — the caller passes the resume guidance, and a test pins
|
|
62
70
|
* that it qualifies.
|
|
63
71
|
*/
|
|
64
72
|
function buildPreCompactHookCommand(input) {
|
|
65
73
|
return `grep -qF -e ${(0, tmuxExec_1.shellSingleQuote)(input.alreadySentMarker)} || printf '%s\\n' ${(0, tmuxExec_1.shellSingleQuote)(input.instruction)}`;
|
|
66
74
|
}
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
/**
|
|
76
|
+
* @description The `--settings` payload: the `PreCompact` command hook (auto AND manual compactions) and the shared
|
|
77
|
+
* todo lists' `PostToolUse` inbox hook (every tool: the project board's changes reach a working agent with its next
|
|
78
|
+
* tool result, `todos/midTurn.ts`).
|
|
79
|
+
*/
|
|
80
|
+
function buildClaudeLaunchHookSettings(commands) {
|
|
81
|
+
return {
|
|
82
|
+
hooks: {
|
|
83
|
+
PreCompact: [{ hooks: [{ type: 'command', command: commands.preCompact }] }],
|
|
84
|
+
PostToolUse: [{ hooks: [{ type: 'command', command: commands.postToolUse }] }],
|
|
85
|
+
},
|
|
86
|
+
};
|
|
70
87
|
}
|
|
71
88
|
/**
|
|
72
89
|
* @description Write the launch settings file and return the `--settings <path>` argument pair for a Claude
|
|
@@ -81,11 +98,13 @@ function buildClaudeCompactHookSettings(command) {
|
|
|
81
98
|
* the same settings go inline instead, so the account never loses its key to a full disk.
|
|
82
99
|
*/
|
|
83
100
|
function prepareClaudeCompactHookFlags(dataDir, configDir = null) {
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
101
|
+
const hookSettings = buildClaudeLaunchHookSettings({
|
|
102
|
+
preCompact: buildPreCompactHookCommand({
|
|
103
|
+
instruction: getHookCompactionInstruction(),
|
|
104
|
+
alreadySentMarker: compactOnIdle_1.compactionResumeGuidance,
|
|
105
|
+
}),
|
|
106
|
+
postToolUse: (0, midTurn_1.buildTodoInboxHookCommand)((0, midTurn_1.getTodoInboxDir)(dataDir)),
|
|
87
107
|
});
|
|
88
|
-
const hookSettings = buildClaudeCompactHookSettings(command);
|
|
89
108
|
if (configDir !== null && (0, claudeProfiles_1.checkHasClaudeProfileApiKey)(configDir)) {
|
|
90
109
|
const settings = { ...hookSettings, ...(0, claudeApiKeyHelper_1.buildClaudeApiKeyHelperSettings)(configDir) };
|
|
91
110
|
const written = writeLaunchSettingsFile(configDir, path_1.default.join(configDir, claudeProfiles_1.claudeProfileLaunchSettingsFileName), settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeCompactHook.js","sourceRoot":"","sources":["../../src/utils/claudeCompactHook.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"claudeCompactHook.js","sourceRoot":"","sources":["../../src/utils/claudeCompactHook.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;;;;;;AA2BH,oEAOC;AASD,gEAKC;AAUD,sEASC;AAcD,sEAeC;AA9FD,4CAAoB;AACpB,gDAAwB;AACxB,mDAIyB;AACzB,yCAA8C;AAC9C,qDAAoG;AACpG,6DAAuE;AACvE,8CAA8E;AAE9E;;;;GAIG;AACU,QAAA,iCAAiC,GAAG,0BAA0B,CAAC;AAE5E;;;;;GAKG;AACH,SAAgB,4BAA4B;IAC1C,OAAO,IAAA,0CAA0B,EAAC;QAChC,oBAAoB,EAAE,KAAK;QAC3B,eAAe,EAAE,yCAAyB;QAC1C,mBAAmB,EAAE,KAAK;QAC1B,cAAc,EAAE,wCAAwB;KACzC,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,0BAA0B,CAAC,KAG1C;IACC,OAAO,eAAe,IAAA,2BAAgB,EAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,IAAA,2BAAgB,EAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;AAC7H,CAAC;AAKD;;;;GAIG;AACH,SAAgB,6BAA6B,CAAC,QAAqD;IAGjG,OAAO;QACL,KAAK,EAAE;YACL,UAAU,EAAE,CAAC,EAAE,KAAK,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AAED,kHAAkH;AAClH,SAAS,uBAAuB,CAAC,GAAW,EAAE,YAAoB,EAAE,QAAgB;IAClF,MAAM,OAAO,GAAG,GAAG,YAAY,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC;IACnE,IAAI,CAAC;QACH,YAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,YAAE,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QACrE,YAAE,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,+BAA+B,YAAY,GAAG,EAAE,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC;YAAC,YAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description Reads the summary a Claude compaction left in the conversation's on-disk transcript. Read by the
|
|
3
|
+
* json-stream adapter's `getLatestCompactionSummary` (the idle-compaction notice) and by both Claude adapters'
|
|
4
|
+
* `getSessionCompactionSummary` (the context bridge), so it lives apart from the adapters, one of which imports the other.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @description Extract the newest compaction summary from a Claude on-disk
|
|
8
|
+
* transcript: the last JSONL line with `isCompactSummary === true`, whose
|
|
9
|
+
* `message.content` (a string, or `{type:'text'}` blocks) holds the summary the
|
|
10
|
+
* `/compact` turn produced. Returns `null` for an unreadable file or when no
|
|
11
|
+
* summary line is present. Reads the whole file, but parses only the lines that
|
|
12
|
+
* carry the summary flag's key.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readLatestCompactSummaryFromTranscript(filePath: string): string | null;
|
|
15
|
+
//# sourceMappingURL=claudeCompactSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claudeCompactSummary.d.ts","sourceRoot":"","sources":["../../src/utils/claudeCompactSummary.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH;;;;;;;GAOG;AACH,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4BtF"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @description Reads the summary a Claude compaction left in the conversation's on-disk transcript. Read by the
|
|
4
|
+
* json-stream adapter's `getLatestCompactionSummary` (the idle-compaction notice) and by both Claude adapters'
|
|
5
|
+
* `getSessionCompactionSummary` (the context bridge), so it lives apart from the adapters, one of which imports the other.
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.readLatestCompactSummaryFromTranscript = readLatestCompactSummaryFromTranscript;
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const claudeStreamJson_1 = require("./claudeStreamJson");
|
|
44
|
+
/**
|
|
45
|
+
* The key a line must carry to be a compaction summary. Checked on the raw line BEFORE `JSON.parse`: a transcript can be
|
|
46
|
+
* a hundred megabytes, almost none of it a summary, and parsing every line blocks the bot's event loop for seconds.
|
|
47
|
+
*/
|
|
48
|
+
const compactSummaryKey = '"isCompactSummary"';
|
|
49
|
+
/**
|
|
50
|
+
* @description Extract the newest compaction summary from a Claude on-disk
|
|
51
|
+
* transcript: the last JSONL line with `isCompactSummary === true`, whose
|
|
52
|
+
* `message.content` (a string, or `{type:'text'}` blocks) holds the summary the
|
|
53
|
+
* `/compact` turn produced. Returns `null` for an unreadable file or when no
|
|
54
|
+
* summary line is present. Reads the whole file, but parses only the lines that
|
|
55
|
+
* carry the summary flag's key.
|
|
56
|
+
*/
|
|
57
|
+
function readLatestCompactSummaryFromTranscript(filePath) {
|
|
58
|
+
let raw;
|
|
59
|
+
try {
|
|
60
|
+
raw = fs.readFileSync(filePath, 'utf8');
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
let summary = null;
|
|
66
|
+
for (const line of raw.split('\n')) {
|
|
67
|
+
if (!line.includes(compactSummaryKey))
|
|
68
|
+
continue;
|
|
69
|
+
let obj;
|
|
70
|
+
try {
|
|
71
|
+
obj = JSON.parse(line.trim());
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!(0, claudeStreamJson_1.checkIsStreamRecord)(obj) || obj.isCompactSummary !== true)
|
|
77
|
+
continue;
|
|
78
|
+
const message = (0, claudeStreamJson_1.checkIsStreamRecord)(obj.message) ? obj.message : null;
|
|
79
|
+
const content = message?.content;
|
|
80
|
+
if (typeof content === 'string' && content.trim()) {
|
|
81
|
+
summary = content;
|
|
82
|
+
}
|
|
83
|
+
else if (Array.isArray(content)) {
|
|
84
|
+
const chunks = [];
|
|
85
|
+
for (const block of content) {
|
|
86
|
+
if ((0, claudeStreamJson_1.checkIsStreamRecord)(block) && block.type === 'text' && typeof block.text === 'string') {
|
|
87
|
+
chunks.push(block.text);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (chunks.join('').trim())
|
|
91
|
+
summary = chunks.join('');
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return summary;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=claudeCompactSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claudeCompactSummary.js","sourceRoot":"","sources":["../../src/utils/claudeCompactSummary.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,wFA4BC;AA7CD,uCAAyB;AACzB,yDAAyD;AAEzD;;;GAGG;AACH,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAE/C;;;;;;;GAOG;AACH,SAAgB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QAAQ,EAAE,CAAC;oBAC1F,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC1B,CAAC;YACH,CAAC;YACD,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;gBAAE,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @description Pure decisions behind SWITCHING A TOPIC TO ANOTHER CLAUDE ACCOUNT when its own hits a usage
|
|
3
|
-
* limit (`utils/claudeProfiles.ts`, `utils/claudeUsage.ts`): which profiles may take the work over, ranked
|
|
4
|
-
*
|
|
5
|
-
* (`utils/fallbackChain.ts`) falls back to when the operator configured no
|
|
6
|
-
* account→account switch as it existed before the chain. The auto / offer decision, the
|
|
7
|
-
* the auto-switch toggle (`/
|
|
8
|
-
*
|
|
3
|
+
* limit (`utils/claudeProfiles.ts`, `utils/claudeUsage.ts`): which profiles may take the work over, ranked like a
|
|
4
|
+
* new agent's launch (the soonest weekly reset first), and until when the exhausted one is marked limited.
|
|
5
|
+
* This ranking is what the fallback chain (`utils/fallbackChain.ts`) falls back to when the operator configured no
|
|
6
|
+
* chain: the within-Claude account→account switch as it existed before the chain. The auto / offer decision, the
|
|
7
|
+
* notice's buttons and the auto-switch toggle (`/limits_autoswitch`; ON by default, also with one account) live in
|
|
8
|
+
* the chain module.
|
|
9
9
|
*
|
|
10
10
|
* No I/O, no `Date.now()`: the caller passes the clock and the profile views, so every rule is unit-tested.
|
|
11
11
|
*/
|
|
@@ -14,9 +14,11 @@ import { type ClaudeProfileUsageView, type ClaudeUsageSnapshot } from './claudeU
|
|
|
14
14
|
export { resolveClaudeAutoSwitchOnLimitEnabled } from './autoContinueOnLimit';
|
|
15
15
|
/**
|
|
16
16
|
* @description The profiles that may take a topic's work over, best first: signed in, not marked limited, with
|
|
17
|
-
* KNOWN and fresh usage that leaves
|
|
18
|
-
* the
|
|
19
|
-
*
|
|
17
|
+
* KNOWN and fresh usage that leaves room on the windows `model` drains — below 100 % on each, and the five-hour window
|
|
18
|
+
* below the launch ceiling (`checkIsClaudeProfileLaunchable`) — and not the profile that just hit the limit. The order is
|
|
19
|
+
* the launch pick's: the account whose weekly window resets soonest first (`sortClaudeProfilesByLaunchRank`), the one
|
|
20
|
+
* ranking a new agent's account too. A profile whose usage is unknown or stale is left out on purpose — the switch is sold
|
|
21
|
+
* as "this one has room", and a guess could land the topic in a second limit. An account billed to API credits is never
|
|
20
22
|
* one of them: it has no windows to have room on, and only the operator decides to spend money (the chain's rung).
|
|
21
23
|
*/
|
|
22
24
|
export declare function pickClaudeLimitSwitchCandidates(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeLimitSwitch.d.ts","sourceRoot":"","sources":["../../src/utils/claudeLimitSwitch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"claudeLimitSwitch.d.ts","sourceRoot":"","sources":["../../src/utils/claudeLimitSwitch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAKL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,gHAAgH;AAChH,OAAO,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AAE9E;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,QAAQ,EAAE,SAAS,sBAAsB,EAAE,CAAC;IAC5C,4DAA4D;IAC5D,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,EAAE,CAQX;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAC/C,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACvC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAWT"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* @description Pure decisions behind SWITCHING A TOPIC TO ANOTHER CLAUDE ACCOUNT when its own hits a usage
|
|
4
|
-
* limit (`utils/claudeProfiles.ts`, `utils/claudeUsage.ts`): which profiles may take the work over, ranked
|
|
5
|
-
*
|
|
6
|
-
* (`utils/fallbackChain.ts`) falls back to when the operator configured no
|
|
7
|
-
* account→account switch as it existed before the chain. The auto / offer decision, the
|
|
8
|
-
* the auto-switch toggle (`/
|
|
9
|
-
*
|
|
4
|
+
* limit (`utils/claudeProfiles.ts`, `utils/claudeUsage.ts`): which profiles may take the work over, ranked like a
|
|
5
|
+
* new agent's launch (the soonest weekly reset first), and until when the exhausted one is marked limited.
|
|
6
|
+
* This ranking is what the fallback chain (`utils/fallbackChain.ts`) falls back to when the operator configured no
|
|
7
|
+
* chain: the within-Claude account→account switch as it existed before the chain. The auto / offer decision, the
|
|
8
|
+
* notice's buttons and the auto-switch toggle (`/limits_autoswitch`; ON by default, also with one account) live in
|
|
9
|
+
* the chain module.
|
|
10
10
|
*
|
|
11
11
|
* No I/O, no `Date.now()`: the caller passes the clock and the profile views, so every rule is unit-tested.
|
|
12
12
|
*/
|
|
@@ -20,19 +20,21 @@ var autoContinueOnLimit_1 = require("./autoContinueOnLimit");
|
|
|
20
20
|
Object.defineProperty(exports, "resolveClaudeAutoSwitchOnLimitEnabled", { enumerable: true, get: function () { return autoContinueOnLimit_1.resolveClaudeAutoSwitchOnLimitEnabled; } });
|
|
21
21
|
/**
|
|
22
22
|
* @description The profiles that may take a topic's work over, best first: signed in, not marked limited, with
|
|
23
|
-
* KNOWN and fresh usage that leaves
|
|
24
|
-
* the
|
|
25
|
-
*
|
|
23
|
+
* KNOWN and fresh usage that leaves room on the windows `model` drains — below 100 % on each, and the five-hour window
|
|
24
|
+
* below the launch ceiling (`checkIsClaudeProfileLaunchable`) — and not the profile that just hit the limit. The order is
|
|
25
|
+
* the launch pick's: the account whose weekly window resets soonest first (`sortClaudeProfilesByLaunchRank`), the one
|
|
26
|
+
* ranking a new agent's account too. A profile whose usage is unknown or stale is left out on purpose — the switch is sold
|
|
27
|
+
* as "this one has room", and a guess could land the topic in a second limit. An account billed to API credits is never
|
|
26
28
|
* one of them: it has no windows to have room on, and only the operator decides to spend money (the chain's rung).
|
|
27
29
|
*/
|
|
28
30
|
function pickClaudeLimitSwitchCandidates(input) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const kinds = (0, claudeUsage_1.getRelevantClaudeUsageKinds)(input.model);
|
|
32
|
+
const candidates = input.profiles.filter((profile) => profile.name !== input.currentName
|
|
33
|
+
&& profile.loggedIn === true
|
|
34
|
+
&& profile.usage?.isStale !== true
|
|
35
|
+
&& kinds.some((kind) => (0, claudeUsage_1.getClaudeUsageBucket)(profile.usage, kind) !== null)
|
|
36
|
+
&& (0, claudeUsage_1.checkIsClaudeProfileLaunchable)(profile, input.model, input.nowMs));
|
|
37
|
+
return (0, claudeUsage_1.sortClaudeProfilesByLaunchRank)(candidates, input.model, input.nowMs).map((profile) => profile.name);
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* @description Until when the profile that hit the limit is marked limited, so the ranking skips it before the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeLimitSwitch.js","sourceRoot":"","sources":["../../src/utils/claudeLimitSwitch.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;
|
|
1
|
+
{"version":3,"file":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,KAAK,CAAC,YAAY,CAAC,CAAC;IACrF,IAAI,OAAO,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,KAAK;QAC1E,CAAC,CAAC,KAAK,CAAC,SAAS;QACjB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,cAAc,GAAG,KAAK,CAAC,KAAK;YAC/D,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC;IACrC,MAAM,UAAU,GAAG,KAAK,CAAC,oBAAoB,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAC7G,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,OAAO;QAAE,OAAO,GAAG,UAAU,CAAC;IAC9E,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -157,6 +157,11 @@ export declare function removeClaudeProfileApiKey(configDir: string): void;
|
|
|
157
157
|
* rejection IS the answer — fed to {@link parseClaudeAuthStatus}, which yields `null` for an empty string.
|
|
158
158
|
*/
|
|
159
159
|
export declare function readProcessErrorStdout(error: unknown): string;
|
|
160
|
+
/**
|
|
161
|
+
* @description Why a child process (the CLI's `auth status` probe) gave no answer, for one log line: killed by the
|
|
162
|
+
* caller's timeout, the exit code, or the spawn error's code — never its output, which may name the account.
|
|
163
|
+
*/
|
|
164
|
+
export declare function getProcessFailureReason(error: unknown, timeoutMs: number): string;
|
|
160
165
|
export type ClaudeAccountKind = 'personal' | 'corporate' | 'unknown';
|
|
161
166
|
/** Personal (`pro`, `max`) versus corporate (`team`, `enterprise`) subscription, from the CLI's `subscriptionType`. */
|
|
162
167
|
export declare function getClaudeAccountKind(subscriptionType: string | null): ClaudeAccountKind;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeProfiles.d.ts","sourceRoot":"","sources":["../../src/utils/claudeProfiles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAMH,uEAAuE;AACvE,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAElD,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,6DAA8D,CAAC;AACtG,eAAO,MAAM,kCAAkC,wBAAyB,CAAC;AAEzE,iGAAiG;AACjG,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAG7C,wHAAwH;AACxH,eAAO,MAAM,2BAA2B,UAAU,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,2GAA2G;AAC3G,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGpF;AAED,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,MAAqB,GAAG,MAAM,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CA6BlH;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAI7E;AAED;;;;;GAKG;AACH,wBAAgB,yBAA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
|
exports.removeClaudeProfileApiKey = removeClaudeProfileApiKey;
|
|
77
77
|
exports.readProcessErrorStdout = readProcessErrorStdout;
|
|
78
|
+
exports.getProcessFailureReason = getProcessFailureReason;
|
|
78
79
|
exports.getClaudeAccountKind = getClaudeAccountKind;
|
|
79
80
|
exports.checkIsSameClaudeConfigDir = checkIsSameClaudeConfigDir;
|
|
80
81
|
exports.parseClaudeConfigDirFromCommand = parseClaudeConfigDirFromCommand;
|
|
@@ -347,6 +348,19 @@ function readProcessErrorStdout(error) {
|
|
|
347
348
|
return stdout.toString('utf8');
|
|
348
349
|
return '';
|
|
349
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* @description Why a child process (the CLI's `auth status` probe) gave no answer, for one log line: killed by the
|
|
353
|
+
* caller's timeout, the exit code, or the spawn error's code — never its output, which may name the account.
|
|
354
|
+
*/
|
|
355
|
+
function getProcessFailureReason(error, timeoutMs) {
|
|
356
|
+
if (!error || typeof error !== 'object')
|
|
357
|
+
return 'unknown failure';
|
|
358
|
+
if ('killed' in error && error.killed === true)
|
|
359
|
+
return `timed out after ${timeoutMs} ms`;
|
|
360
|
+
if ('code' in error && (typeof error.code === 'number' || typeof error.code === 'string'))
|
|
361
|
+
return `exit ${error.code}`;
|
|
362
|
+
return 'unknown failure';
|
|
363
|
+
}
|
|
350
364
|
/** Personal (`pro`, `max`) versus corporate (`team`, `enterprise`) subscription, from the CLI's `subscriptionType`. */
|
|
351
365
|
function getClaudeAccountKind(subscriptionType) {
|
|
352
366
|
if (subscriptionType === null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeProfiles.js","sourceRoot":"","sources":["../../src/utils/claudeProfiles.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCH,sEAEC;AAGD,gEAEC;AAED,8DAEC;AAMD,0DAGC;AAGD,oDAEC;AAQD,8DA6BC;AAMD,8DAIC;A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AAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,+BAA+B,CAAC,OAAe;IAC7D,iHAAiH;IACjH,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,uGAAuG,CAAC,CAAC;IACrI,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACnE,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACtC,CAAC"}
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
export declare function getSessionTitleLine(rawPrompt: string): string;
|
|
22
22
|
/**
|
|
23
23
|
* @description A session-title candidate from ONE stored prompt: the stripped
|
|
24
|
-
* single-line topic, or `null` when the prompt is empty
|
|
24
|
+
* single-line topic, or `null` when the prompt is empty, a slash command run in
|
|
25
|
+
* the CLI, text the CLI injected, or other tooling noise.
|
|
25
26
|
*/
|
|
26
27
|
export declare function getSessionTitleCandidate(rawPrompt: string): string | null;
|
|
27
28
|
//# sourceMappingURL=claudeSessionTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claudeSessionTitle.d.ts","sourceRoot":"","sources":["../../src/utils/claudeSessionTitle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"claudeSessionTitle.d.ts","sourceRoot":"","sources":["../../src/utils/claudeSessionTitle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuCH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAK7D;AAWD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOzE"}
|