github-issue-tower-defence-management 1.57.0 → 1.58.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.58.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.58.0...v1.58.1) (2026-05-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **core:** read claudeCodeOauthTokenListJsonPath from top-level config in schedule handler ([deb1e35](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/deb1e358261bfec76994387a700ab78a84544687)), closes [#616](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/616) [#617](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/617)
7
+
8
+ # [1.58.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.57.0...v1.58.0) (2026-05-23)
9
+
10
+
11
+ ### Features
12
+
13
+ * **core:** wire long-term OAuth token rotation into the schedule path ([c5a4fe7](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/c5a4fe72cfa3dd2a3bc62def6ee127e2b9952fd2)), closes [#615](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/615)
14
+
1
15
  # [1.57.0](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.56.1...v1.57.0) (2026-05-23)
2
16
 
3
17
 
package/README.md CHANGED
@@ -102,9 +102,9 @@ startPreparation?: # Optional: Enable automatic issue preparation workflow
102
102
  preparationProcessCheckCommand?: string # Optional: Shell command template with {URL} placeholder to check if a preparation process is alive. When set, orphaned Preparation issues (process exits non-zero, or stale aw log) are evaluated for completion: if work is done they advance to Awaiting Quality Check; otherwise they fall back to Awaiting Workspace
103
103
  awaitingQualityCheckStatus?: string | null # Optional: Project status name for issues awaiting quality check. When set with preparationProcessCheckCommand, orphaned issues with no rejections advance to this status instead of awaitingWorkspaceStatus
104
104
  codexHomeCandidates?: string[] | null # Optional: Ordered list of CODEX_HOME directory paths. Each launched Codex job cycles through the list; absent or empty keeps current behavior
105
- claudeCodeOauthTokenListJsonPath?: string # Optional: Path to a JSON file listing long-term Claude Code OAuth tokens to rotate across (see "Claude OAuth Token Rotation" below)
106
105
  awLogDirectoryPath?: string # Optional: Directory path where aw log files named {org}_{repo}_{number}_* are written. Used with awLogStaleThresholdMinutes to detect zombie-wrapper orphans
107
106
  awLogStaleThresholdMinutes?: number # Optional: Minutes since last aw log mtime after which a Preparation issue is considered orphaned even when pgrep still returns 0 (outer wrapper alive but inner claude dead). Requires awLogDirectoryPath
107
+ claudeCodeOauthTokenListJsonPath?: string # Optional: Path to a JSON file listing long-term Claude Code OAuth tokens to rotate across (see "Claude OAuth Token Rotation" below). Declared at the top level (sibling of startPreparation), not inside it.
108
108
  ```
109
109
 
110
110
  Example:
@@ -80,8 +80,8 @@ class HandleScheduledEventUseCaseHandler {
80
80
  this.handle = async (configFilePath, _verbose) => {
81
81
  const configFileContent = fs_1.default.readFileSync(configFilePath, 'utf8');
82
82
  const input = yaml_1.default.parse(configFileContent);
83
- if (!(() => { const _io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && _io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io2(input.startPreparation)) && (null === input.notifyFinishedPreparation || undefined === input.notifyFinishedPreparation || "object" === typeof input.notifyFinishedPreparation && null !== input.notifyFinishedPreparation && false === Array.isArray(input.notifyFinishedPreparation) && _io3(input.notifyFinishedPreparation)) && ("object" === typeof input.credentials && null !== input.credentials && _io4(input.credentials)); const _io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && "string" === typeof input.spreadsheetUrl; const _io2 = input => "string" === typeof input.defaultAgentName && (null === input.defaultLlmModelName || undefined === input.defaultLlmModelName || "string" === typeof input.defaultLlmModelName) && (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); const _io3 = input => null === input.awaitingQualityCheckStatusName || undefined === input.awaitingQualityCheckStatusName || "string" === typeof input.awaitingQualityCheckStatusName; const _io4 = input => "object" === typeof input.manager && null !== input.manager && _io5(input.manager) && ("object" === typeof input.bot && null !== input.bot && _io9(input.bot)); const _io5 = input => "object" === typeof input.github && null !== input.github && _io6(input.github) && ("object" === typeof input.slack && null !== input.slack && _io7(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && _io8(input.googleServiceAccount)); const _io6 = input => "string" === typeof input.token; const _io7 = input => "string" === typeof input.userToken; const _io8 = input => "string" === typeof input.serviceAccountKey; const _io9 = input => "object" === typeof input.github && null !== input.github && _io10(input.github); const _io10 = input => "string" === typeof input.token && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
84
- throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const _io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && _io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io2(input.startPreparation)) && (null === input.notifyFinishedPreparation || undefined === input.notifyFinishedPreparation || "object" === typeof input.notifyFinishedPreparation && null !== input.notifyFinishedPreparation && false === Array.isArray(input.notifyFinishedPreparation) && _io3(input.notifyFinishedPreparation)) && ("object" === typeof input.credentials && null !== input.credentials && _io4(input.credentials)); const _io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && "string" === typeof input.spreadsheetUrl; const _io2 = input => "string" === typeof input.defaultAgentName && (null === input.defaultLlmModelName || undefined === input.defaultLlmModelName || "string" === typeof input.defaultLlmModelName) && (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); const _io3 = input => null === input.awaitingQualityCheckStatusName || undefined === input.awaitingQualityCheckStatusName || "string" === typeof input.awaitingQualityCheckStatusName; const _io4 = input => "object" === typeof input.manager && null !== input.manager && _io5(input.manager) && ("object" === typeof input.bot && null !== input.bot && _io9(input.bot)); const _io5 = input => "object" === typeof input.github && null !== input.github && _io6(input.github) && ("object" === typeof input.slack && null !== input.slack && _io7(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && _io8(input.googleServiceAccount)); const _io6 = input => "string" === typeof input.token; const _io7 = input => "string" === typeof input.userToken; const _io8 = input => "string" === typeof input.serviceAccountKey; const _io9 = input => "object" === typeof input.github && null !== input.github && _io10(input.github); const _io10 = input => "string" === typeof input.token && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectName || _report(_exceptionable, {
83
+ if (!(() => { const _io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && _io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io2(input.startPreparation)) && (null === input.notifyFinishedPreparation || undefined === input.notifyFinishedPreparation || "object" === typeof input.notifyFinishedPreparation && null !== input.notifyFinishedPreparation && false === Array.isArray(input.notifyFinishedPreparation) && _io3(input.notifyFinishedPreparation)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && ("object" === typeof input.credentials && null !== input.credentials && _io4(input.credentials)); const _io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && "string" === typeof input.spreadsheetUrl; const _io2 = input => "string" === typeof input.defaultAgentName && (null === input.defaultLlmModelName || undefined === input.defaultLlmModelName || "string" === typeof input.defaultLlmModelName) && (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); const _io3 = input => null === input.awaitingQualityCheckStatusName || undefined === input.awaitingQualityCheckStatusName || "string" === typeof input.awaitingQualityCheckStatusName; const _io4 = input => "object" === typeof input.manager && null !== input.manager && _io5(input.manager) && ("object" === typeof input.bot && null !== input.bot && _io9(input.bot)); const _io5 = input => "object" === typeof input.github && null !== input.github && _io6(input.github) && ("object" === typeof input.slack && null !== input.slack && _io7(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && _io8(input.googleServiceAccount)); const _io6 = input => "string" === typeof input.token; const _io7 = input => "string" === typeof input.userToken; const _io8 = input => "string" === typeof input.serviceAccountKey; const _io9 = input => "object" === typeof input.github && null !== input.github && _io10(input.github); const _io10 = input => "string" === typeof input.token && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); return input => "object" === typeof input && null !== input && _io0(input); })()(input)) {
84
+ throw new Error(`Invalid input: ${JSON.stringify(input)}\n\n${JSON.stringify((() => { const _io0 = input => "string" === typeof input.projectName && "string" === typeof input.org && "string" === typeof input.projectUrl && "string" === typeof input.manager && ("object" === typeof input.workingReport && null !== input.workingReport && _io1(input.workingReport)) && "string" === typeof input.urlOfStoryView && "boolean" === typeof input.disabled && "number" === typeof input.allowIssueCacheMinutes && (null === input.startPreparation || undefined === input.startPreparation || "object" === typeof input.startPreparation && null !== input.startPreparation && _io2(input.startPreparation)) && (null === input.notifyFinishedPreparation || undefined === input.notifyFinishedPreparation || "object" === typeof input.notifyFinishedPreparation && null !== input.notifyFinishedPreparation && false === Array.isArray(input.notifyFinishedPreparation) && _io3(input.notifyFinishedPreparation)) && (undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath) && ("object" === typeof input.credentials && null !== input.credentials && _io4(input.credentials)); const _io1 = input => "string" === typeof input.repo && (Array.isArray(input.members) && input.members.every(elem => "string" === typeof elem)) && "string" === typeof input.spreadsheetUrl; const _io2 = input => "string" === typeof input.defaultAgentName && (null === input.defaultLlmModelName || undefined === input.defaultLlmModelName || "string" === typeof input.defaultLlmModelName) && (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); const _io3 = input => null === input.awaitingQualityCheckStatusName || undefined === input.awaitingQualityCheckStatusName || "string" === typeof input.awaitingQualityCheckStatusName; const _io4 = input => "object" === typeof input.manager && null !== input.manager && _io5(input.manager) && ("object" === typeof input.bot && null !== input.bot && _io9(input.bot)); const _io5 = input => "object" === typeof input.github && null !== input.github && _io6(input.github) && ("object" === typeof input.slack && null !== input.slack && _io7(input.slack)) && ("object" === typeof input.googleServiceAccount && null !== input.googleServiceAccount && _io8(input.googleServiceAccount)); const _io6 = input => "string" === typeof input.token; const _io7 = input => "string" === typeof input.userToken; const _io8 = input => "string" === typeof input.serviceAccountKey; const _io9 = input => "object" === typeof input.github && null !== input.github && _io10(input.github); const _io10 = input => "string" === typeof input.token && (undefined === input.name || "string" === typeof input.name) && (undefined === input.password || "string" === typeof input.password) && (undefined === input.authenticatorKey || "string" === typeof input.authenticatorKey); const _vo0 = (input, _path, _exceptionable = true) => ["string" === typeof input.projectName || _report(_exceptionable, {
85
85
  path: _path + ".projectName",
86
86
  expected: "string",
87
87
  value: input.projectName
@@ -133,6 +133,10 @@ class HandleScheduledEventUseCaseHandler {
133
133
  path: _path + ".notifyFinishedPreparation",
134
134
  expected: "(__type.o2 | null | undefined)",
135
135
  value: input.notifyFinishedPreparation
136
+ }), undefined === input.claudeCodeOauthTokenListJsonPath || "string" === typeof input.claudeCodeOauthTokenListJsonPath || _report(_exceptionable, {
137
+ path: _path + ".claudeCodeOauthTokenListJsonPath",
138
+ expected: "(string | undefined)",
139
+ value: input.claudeCodeOauthTokenListJsonPath
136
140
  }), ("object" === typeof input.credentials && null !== input.credentials || _report(_exceptionable, {
137
141
  path: _path + ".credentials",
138
142
  expected: "__type.o3",
@@ -343,6 +347,8 @@ class HandleScheduledEventUseCaseHandler {
343
347
  const mergedInput = {
344
348
  ...input,
345
349
  allowIssueCacheMinutes: readmeConfig.allowIssueCacheMinutes ?? input.allowIssueCacheMinutes,
350
+ claudeCodeOauthTokenListJsonPath: readmeConfig.claudeCodeOauthTokenListJsonPath ??
351
+ input.claudeCodeOauthTokenListJsonPath,
346
352
  startPreparation: input.startPreparation
347
353
  ? {
348
354
  ...input.startPreparation,
@@ -403,7 +409,7 @@ class HandleScheduledEventUseCaseHandler {
403
409
  const updateIssueStatusByLabelUseCase = new UpdateIssueStatusByLabelUseCase_1.UpdateIssueStatusByLabelUseCase(issueRepository);
404
410
  const nodeLocalCommandRunner = new NodeLocalCommandRunner_1.NodeLocalCommandRunner();
405
411
  const claudeRepository = new OauthAPIProxyClaudeRepository_1.OauthAPIProxyClaudeRepository();
406
- const claudeTokenUsageRepository = new ProxyClaudeTokenUsageRepository_1.ProxyClaudeTokenUsageRepository(null);
412
+ const claudeTokenUsageRepository = new ProxyClaudeTokenUsageRepository_1.ProxyClaudeTokenUsageRepository(mergedInput.claudeCodeOauthTokenListJsonPath ?? null);
407
413
  const startPreparationUseCase = new StartPreparationUseCase_1.StartPreparationUseCase(projectRepository, issueRepository, claudeRepository, nodeLocalCommandRunner, claudeTokenUsageRepository);
408
414
  const issueCommentRepository = new GitHubIssueCommentRepository_1.GitHubIssueCommentRepository(input.credentials.bot.github.token);
409
415
  const revertOrphanedPreparationUseCase = new RevertOrphanedPreparationUseCase_1.RevertOrphanedPreparationUseCase(projectRepository, issueRepository, issueCommentRepository, nodeLocalCommandRunner);
@@ -1 +1 @@
1
- {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;;;;;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AAW,EAAE;wBACX,0BAA0B,EAAE,mDAAkC;wBAC9D,iBAAiB,EAAE,wCAAuB;wBAC1C,uBAAuB,EAAE,+CAA8B;qBACxD;oBACD,MAAM,EAAE;wBACN,2BAA2B,EACzB,WAAW,CAAC,gBAAgB,EAAE,2BAA2B,IAAI,IAAI;wBACnE,8BAA8B,EAC5B,WAAW,CAAC,gBAAgB,EAAE,8BAA8B,IAAI,EAAE;wBACpE,sBAAsB,EAAE,WAAW,CAAC,sBAAsB;wBAC1D,sBAAsB,EAAE,CAAC;qBAC1B;oBACD,8BAA8B,EAC5B,WAAW,CAAC,gBAAgB,EAAE,8BAA8B,IAAI,IAAI;oBACtE,kBAAkB,EAAE,sBAAsB;iBAC3C,CAAC,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AAzPD,gFAyPC"}
1
+ {"version":3,"file":"HandleScheduledEventUseCaseHandler.js","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,kDAA0B;AAC1B,4CAAoB;AACpB,+DAA2D;AAC3D,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,wGAAqG;AACrG,kIAA+H;AAC/H,8GAA2G;AAC3G,0GAAuG;AACvG,wGAAqG;AACrG,0HAAuH;AACvH,8GAA2G;AAC3G,8FAA2F;AAC3F,sFAAmF;AACnF,oGAAiG;AACjG,wGAAqG;AACrG,gHAA6G;AAC7G,kIAA+H;AAC/H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C3C,CAAC,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC;IACJ,CAAC;CAAA;AA7PD,gFA6PC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-issue-tower-defence-management",
3
- "version": "1.57.0",
3
+ "version": "1.58.1",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "scripts": {
@@ -99,6 +99,9 @@ jest.mock('../../repositories/NodeLocalCommandRunner', () => ({
99
99
  jest.mock('../../repositories/OauthAPIProxyClaudeRepository', () => ({
100
100
  OauthAPIProxyClaudeRepository: jest.fn().mockImplementation(() => ({})),
101
101
  }));
102
+ jest.mock('../../repositories/ProxyClaudeTokenUsageRepository', () => ({
103
+ ProxyClaudeTokenUsageRepository: jest.fn().mockImplementation(() => ({})),
104
+ }));
102
105
  jest.mock('../../repositories/GitHubIssueCommentRepository', () => ({
103
106
  GitHubIssueCommentRepository: jest.fn().mockImplementation(() => ({})),
104
107
  }));
@@ -113,6 +116,7 @@ import { ApiV3IssueRepository } from '../../repositories/issue/ApiV3IssueReposit
113
116
  import { RestIssueRepository } from '../../repositories/issue/RestIssueRepository';
114
117
  import { GraphqlProjectItemRepository } from '../../repositories/issue/GraphqlProjectItemRepository';
115
118
  import { ApiV3CheerioRestIssueRepository } from '../../repositories/issue/ApiV3CheerioRestIssueRepository';
119
+ import { ProxyClaudeTokenUsageRepository } from '../../repositories/ProxyClaudeTokenUsageRepository';
116
120
 
117
121
  const MockedGraphqlProjectRepository = jest.mocked(GraphqlProjectRepository);
118
122
  const MockedApiV3IssueRepository = jest.mocked(ApiV3IssueRepository);
@@ -123,6 +127,9 @@ const MockedGraphqlProjectItemRepository = jest.mocked(
123
127
  const MockedApiV3CheerioRestIssueRepository = jest.mocked(
124
128
  ApiV3CheerioRestIssueRepository,
125
129
  );
130
+ const MockedProxyClaudeTokenUsageRepository = jest.mocked(
131
+ ProxyClaudeTokenUsageRepository,
132
+ );
126
133
 
127
134
  const validConfig = {
128
135
  projectName: 'test-project',
@@ -414,4 +421,84 @@ allowedIssueAuthors: 'user1, user2, user3'
414
421
  });
415
422
  });
416
423
  });
424
+
425
+ describe('Claude OAuth token rotation wiring', () => {
426
+ it('should pass top-level claudeCodeOauthTokenListJsonPath to ProxyClaudeTokenUsageRepository', async () => {
427
+ const configWithTokenPath = {
428
+ ...validConfig,
429
+ claudeCodeOauthTokenListJsonPath:
430
+ '/home/user/creds/claudeCodeOauthTokenList.json',
431
+ startPreparation: {
432
+ defaultAgentName: 'agent1',
433
+ configFilePath: './config.yml',
434
+ maximumPreparingIssuesCount: 3,
435
+ },
436
+ };
437
+ jest
438
+ .mocked(fs.readFileSync)
439
+ .mockReturnValue(YAML.stringify(configWithTokenPath));
440
+
441
+ const handler = new HandleScheduledEventUseCaseHandler();
442
+ await handler.handle('config.yml', false);
443
+
444
+ expect(MockedProxyClaudeTokenUsageRepository).toHaveBeenCalledWith(
445
+ '/home/user/creds/claudeCodeOauthTokenList.json',
446
+ );
447
+ });
448
+
449
+ it('should pass null when claudeCodeOauthTokenListJsonPath is absent', async () => {
450
+ const configWithoutTokenPath = {
451
+ ...validConfig,
452
+ startPreparation: {
453
+ defaultAgentName: 'agent1',
454
+ configFilePath: './config.yml',
455
+ maximumPreparingIssuesCount: 3,
456
+ },
457
+ };
458
+ jest
459
+ .mocked(fs.readFileSync)
460
+ .mockReturnValue(YAML.stringify(configWithoutTokenPath));
461
+
462
+ const handler = new HandleScheduledEventUseCaseHandler();
463
+ await handler.handle('config.yml', false);
464
+
465
+ expect(MockedProxyClaudeTokenUsageRepository).toHaveBeenCalledWith(null);
466
+ });
467
+
468
+ it('should pass null when claudeCodeOauthTokenListJsonPath is unset and startPreparation is absent', async () => {
469
+ jest.mocked(fs.readFileSync).mockReturnValue(YAML.stringify(validConfig));
470
+
471
+ const handler = new HandleScheduledEventUseCaseHandler();
472
+ await handler.handle('config.yml', false);
473
+
474
+ expect(MockedProxyClaudeTokenUsageRepository).toHaveBeenCalledWith(null);
475
+ });
476
+
477
+ it('should let README claudeCodeOauthTokenListJsonPath override the YAML value', async () => {
478
+ const readmeContent = `<details>
479
+ <summary>config</summary>
480
+ claudeCodeOauthTokenListJsonPath: /readme/tokens.json
481
+ </details>`;
482
+ mockFetchReturningReadme(readmeContent);
483
+ const configWithTokenPath = {
484
+ ...validConfig,
485
+ claudeCodeOauthTokenListJsonPath: '/yaml/tokens.json',
486
+ startPreparation: {
487
+ defaultAgentName: 'agent1',
488
+ configFilePath: './config.yml',
489
+ maximumPreparingIssuesCount: 3,
490
+ },
491
+ };
492
+ jest
493
+ .mocked(fs.readFileSync)
494
+ .mockReturnValue(YAML.stringify(configWithTokenPath));
495
+
496
+ const handler = new HandleScheduledEventUseCaseHandler();
497
+ await handler.handle('config.yml', false);
498
+
499
+ expect(MockedProxyClaudeTokenUsageRepository).toHaveBeenCalledWith(
500
+ '/readme/tokens.json',
501
+ );
502
+ });
503
+ });
417
504
  });
@@ -59,6 +59,7 @@ export class HandleScheduledEventUseCaseHandler {
59
59
  const configFileContent = fs.readFileSync(configFilePath, 'utf8');
60
60
  const input: unknown = YAML.parse(configFileContent);
61
61
  type inputType = Parameters<HandleScheduledEventUseCase['run']>[0] & {
62
+ claudeCodeOauthTokenListJsonPath?: string;
62
63
  credentials: {
63
64
  manager: {
64
65
  github: {
@@ -99,6 +100,9 @@ export class HandleScheduledEventUseCaseHandler {
99
100
  ...input,
100
101
  allowIssueCacheMinutes:
101
102
  readmeConfig.allowIssueCacheMinutes ?? input.allowIssueCacheMinutes,
103
+ claudeCodeOauthTokenListJsonPath:
104
+ readmeConfig.claudeCodeOauthTokenListJsonPath ??
105
+ input.claudeCodeOauthTokenListJsonPath,
102
106
  startPreparation: input.startPreparation
103
107
  ? {
104
108
  ...input.startPreparation,
@@ -219,7 +223,7 @@ export class HandleScheduledEventUseCaseHandler {
219
223
  const nodeLocalCommandRunner = new NodeLocalCommandRunner();
220
224
  const claudeRepository = new OauthAPIProxyClaudeRepository();
221
225
  const claudeTokenUsageRepository = new ProxyClaudeTokenUsageRepository(
222
- null,
226
+ mergedInput.claudeCodeOauthTokenListJsonPath ?? null,
223
227
  );
224
228
  const startPreparationUseCase = new StartPreparationUseCase(
225
229
  projectRepository,
@@ -1 +1 @@
1
- {"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAyB3D,qBAAa,kCAAkC;IAC7C,MAAM,GACJ,gBAAgB,MAAM,EACtB,UAAU,OAAO,KAChB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CA+OP;CACH"}
1
+ {"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAyB3D,qBAAa,kCAAkC;IAC7C,MAAM,GACJ,gBAAgB,MAAM,EACtB,UAAU,OAAO,KAChB,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,KAAK,EAAE,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,IAAI,EAAE,CAAC;KACzB,GAAG,IAAI,CAAC,CAmPP;CACH"}