github-issue-tower-defence-management 1.139.1 → 1.140.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 +7 -0
- package/README.md +6 -0
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +43 -2
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/tokenExhaustionHandover.js +31 -0
- package/bin/adapter/entry-points/handlers/tokenExhaustionHandover.js.map +1 -0
- package/bin/adapter/repositories/FileHandoverStateRepository.js +99 -0
- package/bin/adapter/repositories/FileHandoverStateRepository.js.map +1 -0
- package/bin/adapter/repositories/NodeProcessSignalRepository.js +44 -0
- package/bin/adapter/repositories/NodeProcessSignalRepository.js.map +1 -0
- package/bin/adapter/repositories/NodeTmuxSessionRepository.js +67 -1
- package/bin/adapter/repositories/NodeTmuxSessionRepository.js.map +1 -1
- package/bin/adapter/repositories/ProcClaudeHandoverSessionRepository.js +206 -0
- package/bin/adapter/repositories/ProcClaudeHandoverSessionRepository.js.map +1 -0
- package/bin/adapter/repositories/RateLimitSnapshotRepository.js +44 -0
- package/bin/adapter/repositories/RateLimitSnapshotRepository.js.map +1 -0
- package/bin/domain/entities/ClaudeHandoverSession.js +3 -0
- package/bin/domain/entities/ClaudeHandoverSession.js.map +1 -0
- package/bin/domain/entities/TokenExhaustionHandoverState.js +3 -0
- package/bin/domain/entities/TokenExhaustionHandoverState.js.map +1 -0
- package/bin/domain/usecases/TokenExhaustionHandoverUseCase.js +255 -0
- package/bin/domain/usecases/TokenExhaustionHandoverUseCase.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/ClaudeHandoverSessionRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/ClaudeHandoverSessionRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/ProcessSignalRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/ProcessSignalRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/TokenExhaustionHandoverStateRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/TokenExhaustionHandoverStateRepository.js.map +1 -0
- package/bin/domain/usecases/adapter-interfaces/TokenRateLimitSnapshotRepository.js +3 -0
- package/bin/domain/usecases/adapter-interfaces/TokenRateLimitSnapshotRepository.js.map +1 -0
- package/package.json +1 -1
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +32 -0
- package/src/adapter/entry-points/handlers/tokenExhaustionHandover.ts +79 -0
- package/src/adapter/repositories/FileHandoverStateRepository.test.ts +114 -0
- package/src/adapter/repositories/FileHandoverStateRepository.ts +76 -0
- package/src/adapter/repositories/NodeProcessSignalRepository.test.ts +82 -0
- package/src/adapter/repositories/NodeProcessSignalRepository.ts +47 -0
- package/src/adapter/repositories/NodeTmuxSessionRepository.test.ts +132 -0
- package/src/adapter/repositories/NodeTmuxSessionRepository.ts +100 -0
- package/src/adapter/repositories/ProcClaudeHandoverSessionRepository.test.ts +194 -0
- package/src/adapter/repositories/ProcClaudeHandoverSessionRepository.ts +208 -0
- package/src/adapter/repositories/RateLimitSnapshotRepository.ts +50 -0
- package/src/domain/entities/ClaudeHandoverSession.ts +11 -0
- package/src/domain/entities/TokenExhaustionHandoverState.ts +8 -0
- package/src/domain/usecases/TokenExhaustionHandoverUseCase.test.ts +696 -0
- package/src/domain/usecases/TokenExhaustionHandoverUseCase.ts +413 -0
- package/src/domain/usecases/adapter-interfaces/ClaudeHandoverSessionRepository.ts +5 -0
- package/src/domain/usecases/adapter-interfaces/ProcessSignalRepository.ts +5 -0
- package/src/domain/usecases/adapter-interfaces/TmuxSessionRepository.ts +2 -0
- package/src/domain/usecases/adapter-interfaces/TokenExhaustionHandoverStateRepository.ts +6 -0
- package/src/domain/usecases/adapter-interfaces/TokenRateLimitSnapshotRepository.ts +22 -0
- package/src/domain/usecases/intmux/InTmuxByHumanSessionReconcileUseCase.test.ts +2 -0
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/tokenExhaustionHandover.d.ts +14 -0
- package/types/adapter/entry-points/handlers/tokenExhaustionHandover.d.ts.map +1 -0
- package/types/adapter/repositories/FileHandoverStateRepository.d.ts +11 -0
- package/types/adapter/repositories/FileHandoverStateRepository.d.ts.map +1 -0
- package/types/adapter/repositories/NodeProcessSignalRepository.d.ts +8 -0
- package/types/adapter/repositories/NodeProcessSignalRepository.d.ts.map +1 -0
- package/types/adapter/repositories/NodeTmuxSessionRepository.d.ts +7 -1
- package/types/adapter/repositories/NodeTmuxSessionRepository.d.ts.map +1 -1
- package/types/adapter/repositories/ProcClaudeHandoverSessionRepository.d.ts +13 -0
- package/types/adapter/repositories/ProcClaudeHandoverSessionRepository.d.ts.map +1 -0
- package/types/adapter/repositories/RateLimitSnapshotRepository.d.ts +9 -0
- package/types/adapter/repositories/RateLimitSnapshotRepository.d.ts.map +1 -0
- package/types/domain/entities/ClaudeHandoverSession.d.ts +10 -0
- package/types/domain/entities/ClaudeHandoverSession.d.ts.map +1 -0
- package/types/domain/entities/TokenExhaustionHandoverState.d.ts +8 -0
- package/types/domain/entities/TokenExhaustionHandoverState.d.ts.map +1 -0
- package/types/domain/usecases/TokenExhaustionHandoverUseCase.d.ts +50 -0
- package/types/domain/usecases/TokenExhaustionHandoverUseCase.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/ClaudeHandoverSessionRepository.d.ts +5 -0
- package/types/domain/usecases/adapter-interfaces/ClaudeHandoverSessionRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/ProcessSignalRepository.d.ts +6 -0
- package/types/domain/usecases/adapter-interfaces/ProcessSignalRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/TmuxSessionRepository.d.ts +2 -0
- package/types/domain/usecases/adapter-interfaces/TmuxSessionRepository.d.ts.map +1 -1
- package/types/domain/usecases/adapter-interfaces/TokenExhaustionHandoverStateRepository.d.ts +6 -0
- package/types/domain/usecases/adapter-interfaces/TokenExhaustionHandoverStateRepository.d.ts.map +1 -0
- package/types/domain/usecases/adapter-interfaces/TokenRateLimitSnapshotRepository.d.ts +21 -0
- package/types/domain/usecases/adapter-interfaces/TokenRateLimitSnapshotRepository.d.ts.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.140.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.139.1...v1.140.0) (2026-07-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* log token-exhaustion handover dry-run cycle summary ([#1278](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1278)) ([d6c54c8](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/d6c54c8f180430e1c0b6a2959284422b57249568)), closes [#1249](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1249)
|
|
7
|
+
|
|
1
8
|
## [1.139.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.139.0...v1.139.1) (2026-07-26)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -295,6 +295,12 @@ inTmuxConsoleToken?: string # Optional: Token embedded in the ?k= query string o
|
|
|
295
295
|
inTmuxProjectOrder?: string[] # Optional: Ordered list of project codes used to build the in-tmux-by-human index files. When unset or empty, the index files are skipped
|
|
296
296
|
newIssueRepo?: string # Optional: Repository name used only for the repo segment of the v4 in-tmux-by-human newIssueUrl. When unset, the newIssueUrl repo segment falls back to workingReport.repo, preserving the existing behavior. Only the newIssueUrl is affected; workingReport.repo and every other use of it are unchanged
|
|
297
297
|
inTmuxLauncherCommand?: string # Optional: Launcher command that starts an interactive session for an `In Tmux by human` issue. Each schedule cycle, any open assigned `In Tmux by human` issue without a live session is restarted by running this command with the issue URL as its argument inside a new detached tmux session named after the issue URL. When unset, session restarting is skipped
|
|
298
|
+
tokenExhaustionHandoverEnabled?: boolean # Optional: When true, the daemon detects Claude sessions whose OAuth token is near/at the rate limit (five-hour free < 0.10, seven-day free < 0.05 for tmux leaders, blocked/rejected, blockedUntilEpoch in the future, or a rejected weekly hard-cap whose resetsAt is still in the future) and, only when a DIFFERENT token is confirmed not-stale-not-exhausted, performs the handover: a checkpoint instruction is sent to tmux leaders via `tmux send-keys` (impl `-p` subagents receive SIGTERM instead) and the session is killed after the grace period. Issue-URL leaders are relaunched by the preparation daemon; bare-name resident leaders are relaunched by this step via `cl <name>` on a fresher token; impl subagents are left for the daemon to re-dispatch. Requires `claudeCodeOauthTokenListJsonPath`. When false, detection and logging still run but no send-keys, kill, or relaunch is performed (dry-run). Default false
|
|
299
|
+
tokenExhaustionHandoverMessage?: string # Optional: Checkpoint instruction sent to an exhausted issue-URL leader via `tmux send-keys`. When unset, a built-in default that tells the session to checkpoint to its task issue and then self-kill is used
|
|
300
|
+
tokenExhaustionHandoverBareNameLeaderMessage?: string # Optional: Checkpoint instruction sent to an exhausted bare-name resident leader (a leader started with a bare `--name` and no task issue) via `tmux send-keys`. When unset, a built-in default that tells the leader to checkpoint into each in-flight subagent's own issue and NOT self-kill (this step relaunches it) is used
|
|
301
|
+
tokenRateLimitSnapshotBaseDir?: string # Optional: Directory path for the per-token rate-limit snapshot JSON files read by the token exhaustion handover step. When unset, defaults to ${XDG_CACHE_HOME:-~/.cache}/tdpm/ratelimit
|
|
302
|
+
tokenExhaustionGracePeriodSeconds?: number # Optional: Seconds to wait after sending the handover message before killing the tmux session, giving the session time to shut down gracefully. Default 180
|
|
303
|
+
tokenExhaustionHandoverStateFilePath?: string # Optional: File path for the durable handover grace/debounce state (which sessions were signaled and when), written atomically so grace tracking survives daemon restarts. When unset, defaults to ${XDG_CACHE_HOME:-~/.cache}/tdpm/token-exhaustion-handover-state-tdpm-native.json (a TDPM-native filename kept distinct from any standalone monitor's state file so the two never share state)
|
|
298
304
|
silentNotificationEnabled?: boolean # Optional: Master switch for the silent live session self-check notification. The step is a no-op unless this is `true` (or the `TDPM_SILENT_NOTIFICATION_ENABLED` environment variable equals the string `true`). This gate prevents the step from acting automatically when the daemon is run with a default configuration; it must be explicitly turned on. Default false
|
|
299
305
|
subAgentOutputRootDirectory?: string # Optional: Root directory holding one output file per sub-process (file name derived from the sub-process label). The modification time of each file is read to compute how long the sub-process output has been idle. When unset, sub-process idle time is reported as 0 and only the running-time threshold can trigger a sub-process notification
|
|
300
306
|
subAgentProcessMatchPattern?: string # Optional: Regular expression matched against each process command line to discover the sub-processes that belong to a monitored session. The expression must define a named capture group `session` whose value equals the monitored session name, and may define a named capture group `label` used as the display name. When unset, the sub-process check is skipped
|
|
@@ -51,6 +51,7 @@ const machineStatusWriter_1 = require("./machineStatusWriter");
|
|
|
51
51
|
const tokenStatusWriter_1 = require("./tokenStatusWriter");
|
|
52
52
|
const inTmuxByHumanDataWriter_1 = require("./inTmuxByHumanDataWriter");
|
|
53
53
|
const inTmuxByHumanSessionReconciler_1 = require("./inTmuxByHumanSessionReconciler");
|
|
54
|
+
const tokenExhaustionHandover_1 = require("./tokenExhaustionHandover");
|
|
54
55
|
const staleTmuxSessionCleaner_1 = require("./staleTmuxSessionCleaner");
|
|
55
56
|
const notifySilentTmuxSessions_1 = require("./notifySilentTmuxSessions");
|
|
56
57
|
const rotationOrderFileWriter_1 = require("./rotationOrderFileWriter");
|
|
@@ -110,13 +111,13 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
110
111
|
this.handle = async (configFilePath, _verbose, inTmuxProjectOrderOverride = null) => {
|
|
111
112
|
const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
|
|
112
113
|
const input = yaml_1.default.parse(configFileContent);
|
|
113
|
-
if (!(() => { const _io0 = input => (undefined === input.thresholdForAutoReject || "number" === typeof input.thresholdForAutoReject) && (null === input.changeTargetPathAliases || undefined === input.changeTargetPathAliases || "object" === typeof input.changeTargetPathAliases && null !== input.changeTargetPathAliases && false === Array.isArray(input.changeTargetPathAliases) && _io1(input.changeTargetPathAliases)) && "string" === typeof input.projectUrl && "string" === typeof input.manager && "string" === typeof input.projectName && (null === input.labelsAsLlmAgentName || undefined === input.labelsAsLlmAgentName || Array.isArray(input.labelsAsLlmAgentName) && input.labelsAsLlmAgentName.every(elem => "string" === typeof elem)) && "string" === typeof input.org && ("object" === typeof input.workingReport && null !== input.workingReport && _io2(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io3(input.startPreparation)) && (undefined === input.createTaskFromStoryBodyCheckboxEnabled || "boolean" === typeof input.createTaskFromStoryBodyCheckboxEnabled) && (null === input.dailySecurityScan || undefined === input.dailySecurityScan || "object" === typeof input.dailySecurityScan && null !== input.dailySecurityScan && _io4(input.dailySecurityScan)) && (null === input.allowedIssueAuthors || undefined === input.allowedIssueAuthors || "string" === typeof input.allowedIssueAuthors || Array.isArray(input.allowedIssueAuthors) && input.allowedIssueAuthors.every(elem => "string" === typeof elem)) && (null === input.autoAssignManagerAuthors || undefined === input.autoAssignManagerAuthors || "string" === typeof input.autoAssignManagerAuthors || Array.isArray(input.autoAssignManagerAuthors) && input.autoAssignManagerAuthors.every(elem => "string" === typeof elem)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && (undefined === input.consoleDataOutputDir || "string" === typeof input.consoleDataOutputDir) && (undefined === input.dashboardDataDir || "string" === typeof input.dashboardDataDir) && (undefined === input.disks || Array.isArray(input.disks) && input.disks.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.workflowBlockerStoryName || "string" === typeof input.workflowBlockerStoryName) && (undefined === input.inTmuxDataOutputDir || "string" === typeof input.inTmuxDataOutputDir) && (undefined === input.newIssueRepo || "string" === typeof input.newIssueRepo) && (undefined === input.inTmuxConsoleBaseUrl || "string" === typeof input.inTmuxConsoleBaseUrl) && (undefined === input.inTmuxConsoleToken || "string" === typeof input.inTmuxConsoleToken) && (undefined === input.inTmuxProjectOrder || Array.isArray(input.inTmuxProjectOrder) && input.inTmuxProjectOrder.every(elem => "string" === typeof elem)) && (undefined === input.inTmuxLauncherCommand || "string" === typeof input.inTmuxLauncherCommand) && (undefined === input.silentNotificationEnabled || "boolean" === typeof input.silentNotificationEnabled) && (undefined === input.ownerCallMarker || "string" === typeof input.ownerCallMarker) && (undefined === input.subAgentOutputRootDirectory || "string" === typeof input.subAgentOutputRootDirectory) && (undefined === input.subAgentProcessMatchPattern || "string" === typeof input.subAgentProcessMatchPattern) && (undefined === input.subAgentTranscriptRootDirectory || "string" === typeof input.subAgentTranscriptRootDirectory) && (undefined === input.subAgentRuntimeRootDirectory || "string" === typeof input.subAgentRuntimeRootDirectory) && (undefined === input.mainSilentThresholdSeconds || "number" === typeof input.mainSilentThresholdSeconds) && (undefined === input.unansweredOwnerCallGraceSeconds || "number" === typeof input.unansweredOwnerCallGraceSeconds) && (undefined === input.subAgentSilentThresholdSeconds || "number" === typeof input.subAgentSilentThresholdSeconds) && (undefined === input.subAgentRunningThresholdSeconds || "number" === typeof input.subAgentRunningThresholdSeconds) && (undefined === input.silentNotificationStaggerSeconds || "number" === typeof input.silentNotificationStaggerSeconds) && (undefined === input.candidateDebounceRecencyWindowSeconds || "number" === typeof input.candidateDebounceRecencyWindowSeconds) && (undefined === input.candidateDebounceStateFilePath || "string" === typeof input.candidateDebounceStateFilePath) && (undefined === input.notifiedStateFilePath || "string" === typeof input.notifiedStateFilePath) && (undefined === input.activeHubTaskStatus || "string" === typeof input.activeHubTaskStatus) && (undefined === input.hubTaskStatusCacheStateFilePath || "string" === typeof input.hubTaskStatusCacheStateFilePath) && (undefined === input.hubTaskStatusCacheTtlSeconds || "number" === typeof input.hubTaskStatusCacheTtlSeconds) && (undefined === input.silentMainStalledMessage || "string" === typeof input.silentMainStalledMessage) && (undefined === input.silentMainStalledStaleOwnerCallMessage || "string" === typeof input.silentMainStalledStaleOwnerCallMessage) && (undefined === input.silentSubAgentIdleMessageHeader || "string" === typeof input.silentSubAgentIdleMessageHeader) && (undefined === input.silentSubAgentIdleMessageFooter || "string" === typeof input.silentSubAgentIdleMessageFooter) && (undefined === input.silentSubAgentLongRunningMessageHeader || "string" === typeof input.silentSubAgentLongRunningMessageHeader) && (undefined === input.silentSubAgentLongRunningMessageFooter || "string" === typeof input.silentSubAgentLongRunningMessageFooter) && ("object" === typeof input.credentials && null !== input.credentials && _io6(input.credentials)); const _io1 = input => Object.keys(input).every(key => {
|
|
114
|
+
if (!(() => { const _io0 = input => (undefined === input.thresholdForAutoReject || "number" === typeof input.thresholdForAutoReject) && (null === input.changeTargetPathAliases || undefined === input.changeTargetPathAliases || "object" === typeof input.changeTargetPathAliases && null !== input.changeTargetPathAliases && false === Array.isArray(input.changeTargetPathAliases) && _io1(input.changeTargetPathAliases)) && "string" === typeof input.projectUrl && "string" === typeof input.manager && "string" === typeof input.projectName && (null === input.labelsAsLlmAgentName || undefined === input.labelsAsLlmAgentName || Array.isArray(input.labelsAsLlmAgentName) && input.labelsAsLlmAgentName.every(elem => "string" === typeof elem)) && "string" === typeof input.org && ("object" === typeof input.workingReport && null !== input.workingReport && _io2(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io3(input.startPreparation)) && (undefined === input.createTaskFromStoryBodyCheckboxEnabled || "boolean" === typeof input.createTaskFromStoryBodyCheckboxEnabled) && (null === input.dailySecurityScan || undefined === input.dailySecurityScan || "object" === typeof input.dailySecurityScan && null !== input.dailySecurityScan && _io4(input.dailySecurityScan)) && (null === input.allowedIssueAuthors || undefined === input.allowedIssueAuthors || "string" === typeof input.allowedIssueAuthors || Array.isArray(input.allowedIssueAuthors) && input.allowedIssueAuthors.every(elem => "string" === typeof elem)) && (null === input.autoAssignManagerAuthors || undefined === input.autoAssignManagerAuthors || "string" === typeof input.autoAssignManagerAuthors || Array.isArray(input.autoAssignManagerAuthors) && input.autoAssignManagerAuthors.every(elem => "string" === typeof elem)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && (undefined === input.consoleDataOutputDir || "string" === typeof input.consoleDataOutputDir) && (undefined === input.dashboardDataDir || "string" === typeof input.dashboardDataDir) && (undefined === input.disks || Array.isArray(input.disks) && input.disks.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.workflowBlockerStoryName || "string" === typeof input.workflowBlockerStoryName) && (undefined === input.inTmuxDataOutputDir || "string" === typeof input.inTmuxDataOutputDir) && (undefined === input.newIssueRepo || "string" === typeof input.newIssueRepo) && (undefined === input.inTmuxConsoleBaseUrl || "string" === typeof input.inTmuxConsoleBaseUrl) && (undefined === input.inTmuxConsoleToken || "string" === typeof input.inTmuxConsoleToken) && (undefined === input.inTmuxProjectOrder || Array.isArray(input.inTmuxProjectOrder) && input.inTmuxProjectOrder.every(elem => "string" === typeof elem)) && (undefined === input.inTmuxLauncherCommand || "string" === typeof input.inTmuxLauncherCommand) && (undefined === input.tokenExhaustionHandoverEnabled || "boolean" === typeof input.tokenExhaustionHandoverEnabled) && (undefined === input.tokenExhaustionHandoverMessage || "string" === typeof input.tokenExhaustionHandoverMessage) && (undefined === input.tokenExhaustionHandoverBareNameLeaderMessage || "string" === typeof input.tokenExhaustionHandoverBareNameLeaderMessage) && (undefined === input.tokenRateLimitSnapshotBaseDir || "string" === typeof input.tokenRateLimitSnapshotBaseDir) && (undefined === input.tokenExhaustionGracePeriodSeconds || "number" === typeof input.tokenExhaustionGracePeriodSeconds) && (undefined === input.tokenExhaustionHandoverStateFilePath || "string" === typeof input.tokenExhaustionHandoverStateFilePath) && (undefined === input.silentNotificationEnabled || "boolean" === typeof input.silentNotificationEnabled) && (undefined === input.ownerCallMarker || "string" === typeof input.ownerCallMarker) && (undefined === input.subAgentOutputRootDirectory || "string" === typeof input.subAgentOutputRootDirectory) && (undefined === input.subAgentProcessMatchPattern || "string" === typeof input.subAgentProcessMatchPattern) && (undefined === input.subAgentTranscriptRootDirectory || "string" === typeof input.subAgentTranscriptRootDirectory) && (undefined === input.subAgentRuntimeRootDirectory || "string" === typeof input.subAgentRuntimeRootDirectory) && (undefined === input.mainSilentThresholdSeconds || "number" === typeof input.mainSilentThresholdSeconds) && (undefined === input.unansweredOwnerCallGraceSeconds || "number" === typeof input.unansweredOwnerCallGraceSeconds) && (undefined === input.subAgentSilentThresholdSeconds || "number" === typeof input.subAgentSilentThresholdSeconds) && (undefined === input.subAgentRunningThresholdSeconds || "number" === typeof input.subAgentRunningThresholdSeconds) && (undefined === input.silentNotificationStaggerSeconds || "number" === typeof input.silentNotificationStaggerSeconds) && (undefined === input.candidateDebounceRecencyWindowSeconds || "number" === typeof input.candidateDebounceRecencyWindowSeconds) && (undefined === input.candidateDebounceStateFilePath || "string" === typeof input.candidateDebounceStateFilePath) && (undefined === input.notifiedStateFilePath || "string" === typeof input.notifiedStateFilePath) && (undefined === input.activeHubTaskStatus || "string" === typeof input.activeHubTaskStatus) && (undefined === input.hubTaskStatusCacheStateFilePath || "string" === typeof input.hubTaskStatusCacheStateFilePath) && (undefined === input.hubTaskStatusCacheTtlSeconds || "number" === typeof input.hubTaskStatusCacheTtlSeconds) && (undefined === input.silentMainStalledMessage || "string" === typeof input.silentMainStalledMessage) && (undefined === input.silentMainStalledStaleOwnerCallMessage || "string" === typeof input.silentMainStalledStaleOwnerCallMessage) && (undefined === input.silentSubAgentIdleMessageHeader || "string" === typeof input.silentSubAgentIdleMessageHeader) && (undefined === input.silentSubAgentIdleMessageFooter || "string" === typeof input.silentSubAgentIdleMessageFooter) && (undefined === input.silentSubAgentLongRunningMessageHeader || "string" === typeof input.silentSubAgentLongRunningMessageHeader) && (undefined === input.silentSubAgentLongRunningMessageFooter || "string" === typeof input.silentSubAgentLongRunningMessageFooter) && ("object" === typeof input.credentials && null !== input.credentials && _io6(input.credentials)); const _io1 = input => Object.keys(input).every(key => {
|
|
114
115
|
const value = input[key];
|
|
115
116
|
if (undefined === value)
|
|
116
117
|
return true;
|
|
117
118
|
return "string" === typeof value;
|
|
118
119
|
}); const _io2 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && "string" === typeof input.spreadsheetUrl; const _io3 = input => "string" === typeof input.defaultAgentName && (null === input.defaultLlmModelName || undefined === input.defaultLlmModelName || "string" === typeof input.defaultLlmModelName) && (null === input.fallbackLlmModelName || undefined === input.fallbackLlmModelName || "string" === typeof input.fallbackLlmModelName) && (null === input.defaultLlmAgentName || undefined === input.defaultLlmAgentName || "string" === typeof input.defaultLlmAgentName) && "string" === typeof input.configFilePath && (null === input.maximumPreparingIssuesCount || "number" === typeof input.maximumPreparingIssuesCount) && (undefined === input.utilizationPercentageThreshold || "number" === typeof input.utilizationPercentageThreshold) && (null === input.allowedIssueAuthors || undefined === input.allowedIssueAuthors || Array.isArray(input.allowedIssueAuthors) && input.allowedIssueAuthors.every(elem => "string" === typeof elem)) && (undefined === input.preparationProcessCheckCommand || "string" === typeof input.preparationProcessCheckCommand) && (null === input.codexHomeCandidates || undefined === input.codexHomeCandidates || Array.isArray(input.codexHomeCandidates) && input.codexHomeCandidates.every(elem => "string" === typeof elem)) && (undefined === input.awLogDirectoryPath || "string" === typeof input.awLogDirectoryPath) && (undefined === input.awLogStaleThresholdMinutes || "number" === typeof input.awLogStaleThresholdMinutes) && (null === input.awaitingQualityCheckStatus || undefined === input.awaitingQualityCheckStatus || "string" === typeof input.awaitingQualityCheckStatus) && (null === input.labelsAsLlmAgentName || undefined === input.labelsAsLlmAgentName || Array.isArray(input.labelsAsLlmAgentName) && input.labelsAsLlmAgentName.every(elem => "string" === typeof elem)); const _io4 = input => "string" === typeof input.scanBaseDirectory && "number" === typeof input.targetHourUtc && (undefined === input.enableKevNvdReport || "boolean" === typeof input.enableKevNvdReport) && (undefined === input.kevReportRepo || "string" === typeof input.kevReportRepo); const _io5 = input => "string" === typeof input.title && "string" === typeof input.mountpoint; const _io6 = input => "object" === typeof input.manager && null !== input.manager && _io7(input.manager) && ("object" === typeof input.bot && null !== input.bot && _io11(input.bot)); const _io7 = input => "object" === typeof input.github && null !== input.github && _io8(input.github) && ("object" === typeof input.slack && null !== input.slack && _io9(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && _io10(input.googleServiceAccount)); const _io8 = input => "string" === typeof input.token; const _io9 = input => "string" === typeof input.userToken; const _io10 = input => "string" === typeof input.serviceAccountKey; const _io11 = input => "object" === typeof input.github && null !== input.github && _io12(input.github); const _io12 = input => "string" === typeof input.token; return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
|
|
119
|
-
throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const _io0 = input => (undefined === input.thresholdForAutoReject || "number" === typeof input.thresholdForAutoReject) && (null === input.changeTargetPathAliases || undefined === input.changeTargetPathAliases || "object" === typeof input.changeTargetPathAliases && null !== input.changeTargetPathAliases && false === Array.isArray(input.changeTargetPathAliases) && _io1(input.changeTargetPathAliases)) && "string" === typeof input.projectUrl && "string" === typeof input.manager && "string" === typeof input.projectName && (null === input.labelsAsLlmAgentName || undefined === input.labelsAsLlmAgentName || Array.isArray(input.labelsAsLlmAgentName) && input.labelsAsLlmAgentName.every(elem => "string" === typeof elem)) && "string" === typeof input.org && ("object" === typeof input.workingReport && null !== input.workingReport && _io2(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io3(input.startPreparation)) && (undefined === input.createTaskFromStoryBodyCheckboxEnabled || "boolean" === typeof input.createTaskFromStoryBodyCheckboxEnabled) && (null === input.dailySecurityScan || undefined === input.dailySecurityScan || "object" === typeof input.dailySecurityScan && null !== input.dailySecurityScan && _io4(input.dailySecurityScan)) && (null === input.allowedIssueAuthors || undefined === input.allowedIssueAuthors || "string" === typeof input.allowedIssueAuthors || Array.isArray(input.allowedIssueAuthors) && input.allowedIssueAuthors.every(elem => "string" === typeof elem)) && (null === input.autoAssignManagerAuthors || undefined === input.autoAssignManagerAuthors || "string" === typeof input.autoAssignManagerAuthors || Array.isArray(input.autoAssignManagerAuthors) && input.autoAssignManagerAuthors.every(elem => "string" === typeof elem)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && (undefined === input.consoleDataOutputDir || "string" === typeof input.consoleDataOutputDir) && (undefined === input.dashboardDataDir || "string" === typeof input.dashboardDataDir) && (undefined === input.disks || Array.isArray(input.disks) && input.disks.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.workflowBlockerStoryName || "string" === typeof input.workflowBlockerStoryName) && (undefined === input.inTmuxDataOutputDir || "string" === typeof input.inTmuxDataOutputDir) && (undefined === input.newIssueRepo || "string" === typeof input.newIssueRepo) && (undefined === input.inTmuxConsoleBaseUrl || "string" === typeof input.inTmuxConsoleBaseUrl) && (undefined === input.inTmuxConsoleToken || "string" === typeof input.inTmuxConsoleToken) && (undefined === input.inTmuxProjectOrder || Array.isArray(input.inTmuxProjectOrder) && input.inTmuxProjectOrder.every(elem => "string" === typeof elem)) && (undefined === input.inTmuxLauncherCommand || "string" === typeof input.inTmuxLauncherCommand) && (undefined === input.silentNotificationEnabled || "boolean" === typeof input.silentNotificationEnabled) && (undefined === input.ownerCallMarker || "string" === typeof input.ownerCallMarker) && (undefined === input.subAgentOutputRootDirectory || "string" === typeof input.subAgentOutputRootDirectory) && (undefined === input.subAgentProcessMatchPattern || "string" === typeof input.subAgentProcessMatchPattern) && (undefined === input.subAgentTranscriptRootDirectory || "string" === typeof input.subAgentTranscriptRootDirectory) && (undefined === input.subAgentRuntimeRootDirectory || "string" === typeof input.subAgentRuntimeRootDirectory) && (undefined === input.mainSilentThresholdSeconds || "number" === typeof input.mainSilentThresholdSeconds) && (undefined === input.unansweredOwnerCallGraceSeconds || "number" === typeof input.unansweredOwnerCallGraceSeconds) && (undefined === input.subAgentSilentThresholdSeconds || "number" === typeof input.subAgentSilentThresholdSeconds) && (undefined === input.subAgentRunningThresholdSeconds || "number" === typeof input.subAgentRunningThresholdSeconds) && (undefined === input.silentNotificationStaggerSeconds || "number" === typeof input.silentNotificationStaggerSeconds) && (undefined === input.candidateDebounceRecencyWindowSeconds || "number" === typeof input.candidateDebounceRecencyWindowSeconds) && (undefined === input.candidateDebounceStateFilePath || "string" === typeof input.candidateDebounceStateFilePath) && (undefined === input.notifiedStateFilePath || "string" === typeof input.notifiedStateFilePath) && (undefined === input.activeHubTaskStatus || "string" === typeof input.activeHubTaskStatus) && (undefined === input.hubTaskStatusCacheStateFilePath || "string" === typeof input.hubTaskStatusCacheStateFilePath) && (undefined === input.hubTaskStatusCacheTtlSeconds || "number" === typeof input.hubTaskStatusCacheTtlSeconds) && (undefined === input.silentMainStalledMessage || "string" === typeof input.silentMainStalledMessage) && (undefined === input.silentMainStalledStaleOwnerCallMessage || "string" === typeof input.silentMainStalledStaleOwnerCallMessage) && (undefined === input.silentSubAgentIdleMessageHeader || "string" === typeof input.silentSubAgentIdleMessageHeader) && (undefined === input.silentSubAgentIdleMessageFooter || "string" === typeof input.silentSubAgentIdleMessageFooter) && (undefined === input.silentSubAgentLongRunningMessageHeader || "string" === typeof input.silentSubAgentLongRunningMessageHeader) && (undefined === input.silentSubAgentLongRunningMessageFooter || "string" === typeof input.silentSubAgentLongRunningMessageFooter) && ("object" === typeof input.credentials && null !== input.credentials && _io6(input.credentials)); const _io1 = input => Object.keys(input).every(key => {
|
|
120
|
+
throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const _io0 = input => (undefined === input.thresholdForAutoReject || "number" === typeof input.thresholdForAutoReject) && (null === input.changeTargetPathAliases || undefined === input.changeTargetPathAliases || "object" === typeof input.changeTargetPathAliases && null !== input.changeTargetPathAliases && false === Array.isArray(input.changeTargetPathAliases) && _io1(input.changeTargetPathAliases)) && "string" === typeof input.projectUrl && "string" === typeof input.manager && "string" === typeof input.projectName && (null === input.labelsAsLlmAgentName || undefined === input.labelsAsLlmAgentName || Array.isArray(input.labelsAsLlmAgentName) && input.labelsAsLlmAgentName.every(elem => "string" === typeof elem)) && "string" === typeof input.org && ("object" === typeof input.workingReport && null !== input.workingReport && _io2(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io3(input.startPreparation)) && (undefined === input.createTaskFromStoryBodyCheckboxEnabled || "boolean" === typeof input.createTaskFromStoryBodyCheckboxEnabled) && (null === input.dailySecurityScan || undefined === input.dailySecurityScan || "object" === typeof input.dailySecurityScan && null !== input.dailySecurityScan && _io4(input.dailySecurityScan)) && (null === input.allowedIssueAuthors || undefined === input.allowedIssueAuthors || "string" === typeof input.allowedIssueAuthors || Array.isArray(input.allowedIssueAuthors) && input.allowedIssueAuthors.every(elem => "string" === typeof elem)) && (null === input.autoAssignManagerAuthors || undefined === input.autoAssignManagerAuthors || "string" === typeof input.autoAssignManagerAuthors || Array.isArray(input.autoAssignManagerAuthors) && input.autoAssignManagerAuthors.every(elem => "string" === typeof elem)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && (undefined === input.consoleDataOutputDir || "string" === typeof input.consoleDataOutputDir) && (undefined === input.dashboardDataDir || "string" === typeof input.dashboardDataDir) && (undefined === input.disks || Array.isArray(input.disks) && input.disks.every(elem => "object" === typeof elem && null !== elem && _io5(elem))) && (undefined === input.workflowBlockerStoryName || "string" === typeof input.workflowBlockerStoryName) && (undefined === input.inTmuxDataOutputDir || "string" === typeof input.inTmuxDataOutputDir) && (undefined === input.newIssueRepo || "string" === typeof input.newIssueRepo) && (undefined === input.inTmuxConsoleBaseUrl || "string" === typeof input.inTmuxConsoleBaseUrl) && (undefined === input.inTmuxConsoleToken || "string" === typeof input.inTmuxConsoleToken) && (undefined === input.inTmuxProjectOrder || Array.isArray(input.inTmuxProjectOrder) && input.inTmuxProjectOrder.every(elem => "string" === typeof elem)) && (undefined === input.inTmuxLauncherCommand || "string" === typeof input.inTmuxLauncherCommand) && (undefined === input.tokenExhaustionHandoverEnabled || "boolean" === typeof input.tokenExhaustionHandoverEnabled) && (undefined === input.tokenExhaustionHandoverMessage || "string" === typeof input.tokenExhaustionHandoverMessage) && (undefined === input.tokenExhaustionHandoverBareNameLeaderMessage || "string" === typeof input.tokenExhaustionHandoverBareNameLeaderMessage) && (undefined === input.tokenRateLimitSnapshotBaseDir || "string" === typeof input.tokenRateLimitSnapshotBaseDir) && (undefined === input.tokenExhaustionGracePeriodSeconds || "number" === typeof input.tokenExhaustionGracePeriodSeconds) && (undefined === input.tokenExhaustionHandoverStateFilePath || "string" === typeof input.tokenExhaustionHandoverStateFilePath) && (undefined === input.silentNotificationEnabled || "boolean" === typeof input.silentNotificationEnabled) && (undefined === input.ownerCallMarker || "string" === typeof input.ownerCallMarker) && (undefined === input.subAgentOutputRootDirectory || "string" === typeof input.subAgentOutputRootDirectory) && (undefined === input.subAgentProcessMatchPattern || "string" === typeof input.subAgentProcessMatchPattern) && (undefined === input.subAgentTranscriptRootDirectory || "string" === typeof input.subAgentTranscriptRootDirectory) && (undefined === input.subAgentRuntimeRootDirectory || "string" === typeof input.subAgentRuntimeRootDirectory) && (undefined === input.mainSilentThresholdSeconds || "number" === typeof input.mainSilentThresholdSeconds) && (undefined === input.unansweredOwnerCallGraceSeconds || "number" === typeof input.unansweredOwnerCallGraceSeconds) && (undefined === input.subAgentSilentThresholdSeconds || "number" === typeof input.subAgentSilentThresholdSeconds) && (undefined === input.subAgentRunningThresholdSeconds || "number" === typeof input.subAgentRunningThresholdSeconds) && (undefined === input.silentNotificationStaggerSeconds || "number" === typeof input.silentNotificationStaggerSeconds) && (undefined === input.candidateDebounceRecencyWindowSeconds || "number" === typeof input.candidateDebounceRecencyWindowSeconds) && (undefined === input.candidateDebounceStateFilePath || "string" === typeof input.candidateDebounceStateFilePath) && (undefined === input.notifiedStateFilePath || "string" === typeof input.notifiedStateFilePath) && (undefined === input.activeHubTaskStatus || "string" === typeof input.activeHubTaskStatus) && (undefined === input.hubTaskStatusCacheStateFilePath || "string" === typeof input.hubTaskStatusCacheStateFilePath) && (undefined === input.hubTaskStatusCacheTtlSeconds || "number" === typeof input.hubTaskStatusCacheTtlSeconds) && (undefined === input.silentMainStalledMessage || "string" === typeof input.silentMainStalledMessage) && (undefined === input.silentMainStalledStaleOwnerCallMessage || "string" === typeof input.silentMainStalledStaleOwnerCallMessage) && (undefined === input.silentSubAgentIdleMessageHeader || "string" === typeof input.silentSubAgentIdleMessageHeader) && (undefined === input.silentSubAgentIdleMessageFooter || "string" === typeof input.silentSubAgentIdleMessageFooter) && (undefined === input.silentSubAgentLongRunningMessageHeader || "string" === typeof input.silentSubAgentLongRunningMessageHeader) && (undefined === input.silentSubAgentLongRunningMessageFooter || "string" === typeof input.silentSubAgentLongRunningMessageFooter) && ("object" === typeof input.credentials && null !== input.credentials && _io6(input.credentials)); const _io1 = input => Object.keys(input).every(key => {
|
|
120
121
|
const value = input[key];
|
|
121
122
|
if (undefined === value)
|
|
122
123
|
return true;
|
|
@@ -285,6 +286,30 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
285
286
|
path: _path + ".inTmuxLauncherCommand",
|
|
286
287
|
expected: "(string | undefined)",
|
|
287
288
|
value: input.inTmuxLauncherCommand
|
|
289
|
+
}), undefined === input.tokenExhaustionHandoverEnabled || "boolean" === typeof input.tokenExhaustionHandoverEnabled || _report(_exceptionable, {
|
|
290
|
+
path: _path + ".tokenExhaustionHandoverEnabled",
|
|
291
|
+
expected: "(boolean | undefined)",
|
|
292
|
+
value: input.tokenExhaustionHandoverEnabled
|
|
293
|
+
}), undefined === input.tokenExhaustionHandoverMessage || "string" === typeof input.tokenExhaustionHandoverMessage || _report(_exceptionable, {
|
|
294
|
+
path: _path + ".tokenExhaustionHandoverMessage",
|
|
295
|
+
expected: "(string | undefined)",
|
|
296
|
+
value: input.tokenExhaustionHandoverMessage
|
|
297
|
+
}), undefined === input.tokenExhaustionHandoverBareNameLeaderMessage || "string" === typeof input.tokenExhaustionHandoverBareNameLeaderMessage || _report(_exceptionable, {
|
|
298
|
+
path: _path + ".tokenExhaustionHandoverBareNameLeaderMessage",
|
|
299
|
+
expected: "(string | undefined)",
|
|
300
|
+
value: input.tokenExhaustionHandoverBareNameLeaderMessage
|
|
301
|
+
}), undefined === input.tokenRateLimitSnapshotBaseDir || "string" === typeof input.tokenRateLimitSnapshotBaseDir || _report(_exceptionable, {
|
|
302
|
+
path: _path + ".tokenRateLimitSnapshotBaseDir",
|
|
303
|
+
expected: "(string | undefined)",
|
|
304
|
+
value: input.tokenRateLimitSnapshotBaseDir
|
|
305
|
+
}), undefined === input.tokenExhaustionGracePeriodSeconds || "number" === typeof input.tokenExhaustionGracePeriodSeconds || _report(_exceptionable, {
|
|
306
|
+
path: _path + ".tokenExhaustionGracePeriodSeconds",
|
|
307
|
+
expected: "(number | undefined)",
|
|
308
|
+
value: input.tokenExhaustionGracePeriodSeconds
|
|
309
|
+
}), undefined === input.tokenExhaustionHandoverStateFilePath || "string" === typeof input.tokenExhaustionHandoverStateFilePath || _report(_exceptionable, {
|
|
310
|
+
path: _path + ".tokenExhaustionHandoverStateFilePath",
|
|
311
|
+
expected: "(string | undefined)",
|
|
312
|
+
value: input.tokenExhaustionHandoverStateFilePath
|
|
288
313
|
}), undefined === input.silentNotificationEnabled || "boolean" === typeof input.silentNotificationEnabled || _report(_exceptionable, {
|
|
289
314
|
path: _path + ".silentNotificationEnabled",
|
|
290
315
|
expected: "(boolean | undefined)",
|
|
@@ -810,6 +835,22 @@ class HandleScheduledEventUseCaseHandler {
|
|
|
810
835
|
catch (error) {
|
|
811
836
|
console.error(`Failed to write in-tmux-by-human data: ${error instanceof Error ? error.message : String(error)}`);
|
|
812
837
|
}
|
|
838
|
+
try {
|
|
839
|
+
await (0, tokenExhaustionHandover_1.handleTokenExhaustionHandover)({
|
|
840
|
+
enabled: mergedInput.tokenExhaustionHandoverEnabled ?? false,
|
|
841
|
+
tokenListJsonPath: mergedInput.claudeCodeOauthTokenListJsonPath ?? null,
|
|
842
|
+
handoverMessage: mergedInput.tokenExhaustionHandoverMessage ?? null,
|
|
843
|
+
bareNameLeaderHandoverMessage: mergedInput.tokenExhaustionHandoverBareNameLeaderMessage ?? null,
|
|
844
|
+
tokenRateLimitSnapshotBaseDir: mergedInput.tokenRateLimitSnapshotBaseDir ?? null,
|
|
845
|
+
gracePeriodSeconds: mergedInput.tokenExhaustionGracePeriodSeconds ?? null,
|
|
846
|
+
stateFilePath: mergedInput.tokenExhaustionHandoverStateFilePath ?? null,
|
|
847
|
+
localCommandRunner: nodeLocalCommandRunner,
|
|
848
|
+
now: inTmuxNow,
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
catch (error) {
|
|
852
|
+
console.error(`Failed to handle token exhaustion handover: ${error instanceof Error ? error.message : String(error)}`);
|
|
853
|
+
}
|
|
813
854
|
try {
|
|
814
855
|
await (0, inTmuxByHumanSessionReconciler_1.reconcileInTmuxByHumanSessions)({
|
|
815
856
|
inTmuxLauncherCommand: mergedInput.inTmuxLauncherCommand ?? null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,+DAA2D;AAC3D,6DAAyD;AACzD,6DAAyD;AACzD,+DAA2D;AAC3D,2DAAuD;AACvD,uEAAmE;AACnE,qFAAkF;AAClF,uEAAmE;A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AAC,sCAAsC;gCAClD,OAAO,CAAC,GAAG,CAAC,gDAAgD;gCAC5D,IAAI;4BACN,gCAAgC,EAC9B,WAAW,CAAC,sCAAsC;gCAClD,OAAO,CAAC,GAAG,CAAC,gDAAgD;gCAC5D,IAAI;yBACP;wBACD,GAAG,EAAE,SAAS;qBACf,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,KAAK,CACX,0CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AAlnBD,gFAknBC"}
|
|
1
|
+
{"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,+DAA2D;AAC3D,6DAAyD;AACzD,6DAAyD;AACzD,+DAA2D;AAC3D,2DAAuD;AACvD,uEAAmE;AACnE,qFAAkF;AAClF,uEAA0E;AAC1E,uEAAmE;AACnE,yEAGoC;AACpC,uEAAmE;AACnE,wDAG8B;AAC9B,kFAA+E;AAC/E,sFAAmF;AACnF,gGAA6F;AAC7F,0FAAuF;AACvF,wFAAqF;AACrF,sFAAmF;AACnF,wGAAqG;AACrG,8GAA2G;AAC3G,sGAAmG;AACnG,gGAA6F;AAC7F,kGAA+F;AAC/F,gIAA6H;AAC7H,oHAAiH;AACjH,wGAAqG;AAIrG,0FAAuF;AACvF,wGAAqG;AACrG,gIAA6H;AAC7H,wGAAqG;AACrG,kIAA+H;AAC/H,8GAA2G;A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AW,CAAC,wBAAwB;gCACpC,OAAO,CAAC,GAAG,CAAC,gCAAgC;gCAC5C,IAAI;4BACN,gCAAgC,EAC9B,WAAW,CAAC,sCAAsC;gCAClD,OAAO,CAAC,GAAG,CAAC,iDAAiD;gCAC7D,IAAI;4BACN,yBAAyB,EACvB,WAAW,CAAC,+BAA+B;gCAC3C,OAAO,CAAC,GAAG,CAAC,wCAAwC;gCACpD,IAAI;4BACN,yBAAyB,EACvB,WAAW,CAAC,+BAA+B;gCAC3C,OAAO,CAAC,GAAG,CAAC,wCAAwC;gCACpD,IAAI;4BACN,gCAAgC,EAC9B,WAAW,CAAC,sCAAsC;gCAClD,OAAO,CAAC,GAAG,CAAC,gDAAgD;gCAC5D,IAAI;4BACN,gCAAgC,EAC9B,WAAW,CAAC,sCAAsC;gCAClD,OAAO,CAAC,GAAG,CAAC,gDAAgD;gCAC5D,IAAI;yBACP;wBACD,GAAG,EAAE,SAAS;qBACf,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,OAAO,CAAC,KAAK,CACX,0CACE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AAjpBD,gFAipBC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleTokenExhaustionHandover = void 0;
|
|
4
|
+
const TokenExhaustionHandoverUseCase_1 = require("../../../domain/usecases/TokenExhaustionHandoverUseCase");
|
|
5
|
+
const NodeTmuxSessionRepository_1 = require("../../repositories/NodeTmuxSessionRepository");
|
|
6
|
+
const RateLimitSnapshotRepository_1 = require("../../repositories/RateLimitSnapshotRepository");
|
|
7
|
+
const ProcClaudeHandoverSessionRepository_1 = require("../../repositories/ProcClaudeHandoverSessionRepository");
|
|
8
|
+
const NodeProcessSignalRepository_1 = require("../../repositories/NodeProcessSignalRepository");
|
|
9
|
+
const FileHandoverStateRepository_1 = require("../../repositories/FileHandoverStateRepository");
|
|
10
|
+
const handleTokenExhaustionHandover = async (params) => {
|
|
11
|
+
const { enabled, tokenListJsonPath, handoverMessage, bareNameLeaderHandoverMessage, tokenRateLimitSnapshotBaseDir, gracePeriodSeconds, stateFilePath, localCommandRunner, now, } = params;
|
|
12
|
+
if (tokenListJsonPath === null) {
|
|
13
|
+
console.log('Token exhaustion handover: skipped (no claudeCodeOauthTokenListJsonPath configured).');
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const snapshotRepository = new RateLimitSnapshotRepository_1.RateLimitSnapshotRepository(tokenListJsonPath, tokenRateLimitSnapshotBaseDir ?? undefined);
|
|
17
|
+
const stateRepository = new FileHandoverStateRepository_1.FileHandoverStateRepository(stateFilePath ?? (0, FileHandoverStateRepository_1.defaultHandoverStateFilePath)());
|
|
18
|
+
const useCase = new TokenExhaustionHandoverUseCase_1.TokenExhaustionHandoverUseCase(new ProcClaudeHandoverSessionRepository_1.ProcClaudeHandoverSessionRepository(), snapshotRepository, new NodeTmuxSessionRepository_1.NodeTmuxSessionRepository(localCommandRunner), new NodeProcessSignalRepository_1.NodeProcessSignalRepository());
|
|
19
|
+
const result = await useCase.run({
|
|
20
|
+
enabled,
|
|
21
|
+
issueUrlLeaderMessage: handoverMessage ?? TokenExhaustionHandoverUseCase_1.DEFAULT_TOKEN_EXHAUSTION_HANDOVER_MESSAGE,
|
|
22
|
+
bareNameLeaderMessage: bareNameLeaderHandoverMessage ??
|
|
23
|
+
TokenExhaustionHandoverUseCase_1.DEFAULT_TOKEN_EXHAUSTION_HANDOVER_MESSAGE_BARE_NAME_LEADER,
|
|
24
|
+
gracePeriodSeconds: gracePeriodSeconds ?? TokenExhaustionHandoverUseCase_1.DEFAULT_TOKEN_EXHAUSTION_GRACE_PERIOD_SECONDS,
|
|
25
|
+
state: stateRepository.load(),
|
|
26
|
+
now,
|
|
27
|
+
});
|
|
28
|
+
stateRepository.save(result.state);
|
|
29
|
+
};
|
|
30
|
+
exports.handleTokenExhaustionHandover = handleTokenExhaustionHandover;
|
|
31
|
+
//# sourceMappingURL=tokenExhaustionHandover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenExhaustionHandover.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/tokenExhaustionHandover.ts"],"names":[],"mappings":";;;AACA,4GAKiE;AACjE,4FAAyF;AACzF,gGAA6F;AAC7F,gHAA6G;AAC7G,gGAA6F;AAC7F,gGAGwD;AAcjD,MAAM,6BAA6B,GAAG,KAAK,EAChD,MAAqC,EACtB,EAAE;IACjB,MAAM,EACJ,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,GAAG,GACJ,GAAG,MAAM,CAAC;IAEX,IAAI,iBAAiB,KAAK,IAAI,EAAE,CAAC;QAC/B,OAAO,CAAC,GAAG,CACT,sFAAsF,CACvF,CAAC;QACF,OAAO;IACT,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAI,yDAA2B,CACxD,iBAAiB,EACjB,6BAA6B,IAAI,SAAS,CAC3C,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,yDAA2B,CACrD,aAAa,IAAI,IAAA,0DAA4B,GAAE,CAChD,CAAC;IACF,MAAM,OAAO,GAAG,IAAI,+DAA8B,CAChD,IAAI,yEAAmC,EAAE,EACzC,kBAAkB,EAClB,IAAI,qDAAyB,CAAC,kBAAkB,CAAC,EACjD,IAAI,yDAA2B,EAAE,CAClC,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/B,OAAO;QACP,qBAAqB,EACnB,eAAe,IAAI,0EAAyC;QAC9D,qBAAqB,EACnB,6BAA6B;YAC7B,2FAA0D;QAC5D,kBAAkB,EAChB,kBAAkB,IAAI,8EAA6C;QACrE,KAAK,EAAE,eAAe,CAAC,IAAI,EAAE;QAC7B,GAAG;KACJ,CAAC,CAAC;IAEH,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAlDW,QAAA,6BAA6B,iCAkDxC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.FileHandoverStateRepository = exports.defaultHandoverStateFilePath = void 0;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const os = __importStar(require("os"));
|
|
39
|
+
const path = __importStar(require("path"));
|
|
40
|
+
const defaultHandoverStateFilePath = () => {
|
|
41
|
+
const base = process.env.XDG_CACHE_HOME ?? path.join(os.homedir(), '.cache');
|
|
42
|
+
return path.join(base, 'tdpm', 'token-exhaustion-handover-state-tdpm-native.json');
|
|
43
|
+
};
|
|
44
|
+
exports.defaultHandoverStateFilePath = defaultHandoverStateFilePath;
|
|
45
|
+
const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
46
|
+
class FileHandoverStateRepository {
|
|
47
|
+
constructor(filePath = (0, exports.defaultHandoverStateFilePath)()) {
|
|
48
|
+
this.filePath = filePath;
|
|
49
|
+
this.load = () => {
|
|
50
|
+
let raw;
|
|
51
|
+
try {
|
|
52
|
+
raw = fs.readFileSync(this.filePath, 'utf8');
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { entries: {} };
|
|
56
|
+
}
|
|
57
|
+
let parsed;
|
|
58
|
+
try {
|
|
59
|
+
parsed = JSON.parse(raw);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return { entries: {} };
|
|
63
|
+
}
|
|
64
|
+
return { entries: this.parseEntries(parsed) };
|
|
65
|
+
};
|
|
66
|
+
this.save = (state) => {
|
|
67
|
+
const directory = path.dirname(this.filePath);
|
|
68
|
+
if (!fs.existsSync(directory)) {
|
|
69
|
+
fs.mkdirSync(directory, { recursive: true });
|
|
70
|
+
}
|
|
71
|
+
const temporaryPath = `${this.filePath}.tmp`;
|
|
72
|
+
fs.writeFileSync(temporaryPath, JSON.stringify(state));
|
|
73
|
+
fs.renameSync(temporaryPath, this.filePath);
|
|
74
|
+
};
|
|
75
|
+
this.parseEntries = (parsed) => {
|
|
76
|
+
const entries = {};
|
|
77
|
+
if (!isRecord(parsed)) {
|
|
78
|
+
return entries;
|
|
79
|
+
}
|
|
80
|
+
const stored = parsed.entries;
|
|
81
|
+
if (!isRecord(stored)) {
|
|
82
|
+
return entries;
|
|
83
|
+
}
|
|
84
|
+
for (const [key, value] of Object.entries(stored)) {
|
|
85
|
+
if (!isRecord(value)) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
const signaledAtEpoch = value.signaledAtEpoch;
|
|
89
|
+
const pid = value.pid;
|
|
90
|
+
if (typeof signaledAtEpoch === 'number' && typeof pid === 'number') {
|
|
91
|
+
entries[key] = { signaledAtEpoch, pid };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return entries;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.FileHandoverStateRepository = FileHandoverStateRepository;
|
|
99
|
+
//# sourceMappingURL=FileHandoverStateRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileHandoverStateRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/FileHandoverStateRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,uCAAyB;AACzB,2CAA6B;AAOtB,MAAM,4BAA4B,GAAG,GAAW,EAAE;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAAC;IAC7E,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,EACJ,MAAM,EACN,kDAAkD,CACnD,CAAC;AACJ,CAAC,CAAC;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AAS,CAAC,KAAK,CAAC,CAAC,CAAC;YACvD,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC9C,CAAC,CAAC;QAEM,iBAAY,GAAG,CACrB,MAAe,EACoC,EAAE;YACrD,MAAM,OAAO,GAAsD,EAAE,CAAC;YACtE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtB,OAAO,OAAO,CAAC;YACjB,CAAC;YACD,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;YAC9B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACtB,OAAO,OAAO,CAAC;YACjB,CAAC;YACD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;oBACrB,SAAS;gBACX,CAAC;gBACD,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;gBAC9C,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;gBACtB,IAAI,OAAO,eAAe,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;oBACnE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC;gBAC1C,CAAC;YACH,CAAC;YACD,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;IAlDC,CAAC;CAmDL;AAtDD,kEAsDC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeProcessSignalRepository = void 0;
|
|
4
|
+
const errorCode = (error) => {
|
|
5
|
+
if (error !== null &&
|
|
6
|
+
typeof error === 'object' &&
|
|
7
|
+
'code' in error &&
|
|
8
|
+
typeof error.code === 'string') {
|
|
9
|
+
return error.code;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
};
|
|
13
|
+
class NodeProcessSignalRepository {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.isProcessAlive = (pid) => {
|
|
16
|
+
try {
|
|
17
|
+
process.kill(pid, 0);
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return errorCode(error) === 'EPERM';
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
this.terminateProcess = (pid) => {
|
|
25
|
+
this.signal(pid, 'SIGTERM');
|
|
26
|
+
};
|
|
27
|
+
this.killProcess = (pid) => {
|
|
28
|
+
this.signal(pid, 'SIGKILL');
|
|
29
|
+
};
|
|
30
|
+
this.signal = (pid, signal) => {
|
|
31
|
+
try {
|
|
32
|
+
process.kill(pid, signal);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (errorCode(error) === 'ESRCH') {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
console.error(`Failed to send ${signal} to pid ${pid}: ${error instanceof Error ? error.message : String(error)}`);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.NodeProcessSignalRepository = NodeProcessSignalRepository;
|
|
44
|
+
//# sourceMappingURL=NodeProcessSignalRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NodeProcessSignalRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/NodeProcessSignalRepository.ts"],"names":[],"mappings":";;;AAEA,MAAM,SAAS,GAAG,CAAC,KAAc,EAAiB,EAAE;IAClD,IACE,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,MAAM,IAAI,KAAK;QACf,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,EAC9B,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAa,2BAA2B;IAAxC;QACE,mBAAc,GAAG,CAAC,GAAW,EAAW,EAAE;YACxC,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;gBACrB,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,OAAO,CAAC;YACtC,CAAC;QACH,CAAC,CAAC;QAEF,qBAAgB,GAAG,CAAC,GAAW,EAAQ,EAAE;YACvC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC9B,CAAC,CAAC;QAEF,gBAAW,GAAG,CAAC,GAAW,EAAQ,EAAE;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QAC9B,CAAC,CAAC;QAEM,WAAM,GAAG,CAAC,GAAW,EAAE,MAAsB,EAAQ,EAAE;YAC7D,IAAI,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,OAAO,EAAE,CAAC;oBACjC,OAAO;gBACT,CAAC;gBACD,OAAO,CAAC,KAAK,CACX,kBAAkB,MAAM,WAAW,GAAG,KACpC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CACvD,EAAE,CACH,CAAC;YACJ,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AAhCD,kEAgCC"}
|
|
@@ -38,10 +38,15 @@ const fs = __importStar(require("fs"));
|
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const clSessionScopeUnitName_1 = require("./clSessionScopeUnitName");
|
|
40
40
|
const clSessionScopeUnitNameFromCgroupContent_1 = require("./clSessionScopeUnitNameFromCgroupContent");
|
|
41
|
+
const DEFAULT_SEND_KEYS_SUBMIT_DELAY_MS = 1000;
|
|
42
|
+
const SEND_KEYS_COMPOSER_PROBE_LENGTH = 40;
|
|
43
|
+
const SEND_KEYS_COMPOSER_TAIL_LINES = 8;
|
|
44
|
+
const shellSingleQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
41
45
|
class NodeTmuxSessionRepository {
|
|
42
|
-
constructor(localCommandRunner, procDirectory = '/proc') {
|
|
46
|
+
constructor(localCommandRunner, procDirectory = '/proc', submitDelayMilliseconds = DEFAULT_SEND_KEYS_SUBMIT_DELAY_MS) {
|
|
43
47
|
this.localCommandRunner = localCommandRunner;
|
|
44
48
|
this.procDirectory = procDirectory;
|
|
49
|
+
this.submitDelayMilliseconds = submitDelayMilliseconds;
|
|
45
50
|
this.listLiveSessionNames = async () => {
|
|
46
51
|
const { stdout, exitCode } = await this.localCommandRunner.runCommand('tmux', ['list-sessions', '-F', '#{session_name}']);
|
|
47
52
|
if (exitCode !== 0) {
|
|
@@ -125,6 +130,67 @@ class NodeTmuxSessionRepository {
|
|
|
125
130
|
console.error(`Failed to stop systemd user scope "${scopeUnitName}": exit code ${exitCode}${stderr ? `: ${stderr}` : ''}`);
|
|
126
131
|
}
|
|
127
132
|
};
|
|
133
|
+
this.sendKeys = async (sessionName, literalText) => {
|
|
134
|
+
const literalResult = await this.localCommandRunner.runCommand('tmux', [
|
|
135
|
+
'send-keys',
|
|
136
|
+
'-t',
|
|
137
|
+
sessionName,
|
|
138
|
+
'-l',
|
|
139
|
+
literalText,
|
|
140
|
+
]);
|
|
141
|
+
if (literalResult.exitCode !== 0) {
|
|
142
|
+
throw new Error(`Failed to send keys to tmux session "${sessionName}": exit code ${literalResult.exitCode}${literalResult.stderr ? `: ${literalResult.stderr}` : ''}`);
|
|
143
|
+
}
|
|
144
|
+
await this.delaySubmit();
|
|
145
|
+
await this.sendEnter(sessionName);
|
|
146
|
+
if (await this.messageStillInComposer(sessionName, literalText)) {
|
|
147
|
+
await this.delaySubmit();
|
|
148
|
+
await this.sendEnter(sessionName);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
this.launchBareNameLeaderSession = async (name) => {
|
|
152
|
+
const sessionName = name.replace(/[.:]/g, '_');
|
|
153
|
+
const leaderCommand = `cl ${shellSingleQuote(name)}; exec /bin/bash`;
|
|
154
|
+
const { stderr, exitCode } = await this.localCommandRunner.runCommand('tmux', ['new-session', '-d', '-s', sessionName, 'bash', '-lc', leaderCommand]);
|
|
155
|
+
if (exitCode !== 0) {
|
|
156
|
+
throw new Error(`Failed to relaunch bare-name leader session "${sessionName}": exit code ${exitCode}${stderr ? `: ${stderr}` : ''}`);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
this.sendEnter = async (sessionName) => {
|
|
160
|
+
const enterResult = await this.localCommandRunner.runCommand('tmux', [
|
|
161
|
+
'send-keys',
|
|
162
|
+
'-t',
|
|
163
|
+
sessionName,
|
|
164
|
+
'Enter',
|
|
165
|
+
]);
|
|
166
|
+
if (enterResult.exitCode !== 0) {
|
|
167
|
+
throw new Error(`Failed to send Enter to tmux session "${sessionName}": exit code ${enterResult.exitCode}${enterResult.stderr ? `: ${enterResult.stderr}` : ''}`);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
this.messageStillInComposer = async (sessionName, literalText) => {
|
|
171
|
+
const probe = literalText
|
|
172
|
+
.trim()
|
|
173
|
+
.split('\n', 1)[0]
|
|
174
|
+
.slice(0, SEND_KEYS_COMPOSER_PROBE_LENGTH);
|
|
175
|
+
if (probe.length === 0) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
const { stdout, exitCode } = await this.localCommandRunner.runCommand('tmux', ['capture-pane', '-p', '-t', sessionName]);
|
|
179
|
+
if (exitCode !== 0) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
const tail = stdout
|
|
183
|
+
.split('\n')
|
|
184
|
+
.slice(-SEND_KEYS_COMPOSER_TAIL_LINES)
|
|
185
|
+
.join('\n');
|
|
186
|
+
return tail.includes(probe);
|
|
187
|
+
};
|
|
188
|
+
this.delaySubmit = async () => {
|
|
189
|
+
if (this.submitDelayMilliseconds <= 0) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
await new Promise((resolve) => setTimeout(resolve, this.submitDelayMilliseconds));
|
|
193
|
+
};
|
|
128
194
|
}
|
|
129
195
|
}
|
|
130
196
|
exports.NodeTmuxSessionRepository = NodeTmuxSessionRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTmuxSessionRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/NodeTmuxSessionRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAI7B,qEAAkE;AAClE,uGAAoG;AAEpG,MAAa,yBAAyB;IACpC,YACmB,kBAAsC,EACtC,gBAAwB,OAAO
|
|
1
|
+
{"version":3,"file":"NodeTmuxSessionRepository.js","sourceRoot":"","sources":["../../../src/adapter/repositories/NodeTmuxSessionRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAI7B,qEAAkE;AAClE,uGAAoG;AAEpG,MAAM,iCAAiC,GAAG,IAAI,CAAC;AAC/C,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAC3C,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAExC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAU,EAAE,CACjD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAEtC,MAAa,yBAAyB;IACpC,YACmB,kBAAsC,EACtC,gBAAwB,OAAO,EAC/B,0BAAkC,iCAAiC;QAFnE,uBAAkB,GAAlB,kBAAkB,CAAoB;Q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