github-issue-tower-defence-management 1.44.1 → 1.44.3
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 +11 -2
- package/README.md +1 -1
- package/bin/adapter/entry-points/cli/index.js +15 -224
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/adapter/entry-points/cli/projectConfig.js +254 -0
- package/bin/adapter/entry-points/cli/projectConfig.js.map +1 -0
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +57 -5
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/repositories/OauthProxyClaudeRepository.js +11 -0
- package/bin/adapter/repositories/OauthProxyClaudeRepository.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/cli/index.ts +15 -329
- package/src/adapter/entry-points/cli/projectConfig.ts +329 -0
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.test.ts +144 -5
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +78 -5
- package/src/adapter/repositories/OauthProxyClaudeRepository.test.ts +82 -0
- package/src/adapter/repositories/OauthProxyClaudeRepository.ts +15 -0
- package/types/adapter/entry-points/cli/index.d.ts +1 -25
- package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
- package/types/adapter/entry-points/cli/projectConfig.d.ts +26 -0
- package/types/adapter/entry-points/cli/projectConfig.d.ts.map +1 -0
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/repositories/OauthProxyClaudeRepository.d.ts.map +1 -1
|
@@ -7,6 +7,7 @@ type ProxyFileHeaders = {
|
|
|
7
7
|
'anthropic-ratelimit-unified-7d-utilization'?: string;
|
|
8
8
|
'anthropic-ratelimit-unified-5h-reset'?: string;
|
|
9
9
|
'anthropic-ratelimit-unified-7d-reset'?: string;
|
|
10
|
+
'anthropic-ratelimit-unified-overage-status'?: string;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
type ProxyFile = {
|
|
@@ -84,6 +85,20 @@ export class OauthProxyClaudeRepository implements ClaudeRepository {
|
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
const overageStatus = headers['anthropic-ratelimit-unified-overage-status'];
|
|
89
|
+
if (
|
|
90
|
+
overageStatus === 'rejected' &&
|
|
91
|
+
!usages.some((u) => u.utilizationPercentage >= 100)
|
|
92
|
+
) {
|
|
93
|
+
usages.push({
|
|
94
|
+
hour: 168,
|
|
95
|
+
utilizationPercentage: 100,
|
|
96
|
+
resetsAt: sevenDayReset
|
|
97
|
+
? new Date(parseInt(sevenDayReset, 10) * 1000)
|
|
98
|
+
: new Date(),
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
|
|
87
102
|
return usages;
|
|
88
103
|
}
|
|
89
104
|
|
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
-
|
|
4
|
-
projectUrl?: string;
|
|
5
|
-
awaitingWorkspaceStatus?: string;
|
|
6
|
-
preparationStatus?: string;
|
|
7
|
-
defaultAgentName?: string;
|
|
8
|
-
defaultLlmModelName?: string;
|
|
9
|
-
defaultLlmAgentName?: string;
|
|
10
|
-
maximumPreparingIssuesCount?: number;
|
|
11
|
-
allowIssueCacheMinutes?: number;
|
|
12
|
-
utilizationPercentageThreshold?: number;
|
|
13
|
-
allowedIssueAuthors?: string;
|
|
14
|
-
awaitingQualityCheckStatus?: string;
|
|
15
|
-
thresholdForAutoReject?: number;
|
|
16
|
-
workflowBlockerResolvedWebhookUrl?: string;
|
|
17
|
-
projectName?: string;
|
|
18
|
-
preparationProcessCheckCommand?: string;
|
|
19
|
-
codexHomeCandidates?: string[];
|
|
20
|
-
awLogDirectoryPath?: string;
|
|
21
|
-
awLogStaleThresholdMinutes?: number;
|
|
22
|
-
};
|
|
23
|
-
export declare const loadConfigFile: (configFilePath: string) => ConfigFile;
|
|
24
|
-
export declare const parseProjectReadmeConfig: (readme: string) => ConfigFile;
|
|
25
|
-
export declare const mergeConfigs: (configFile: ConfigFile, cliOverrides: ConfigFile, readmeOverrides: ConfigFile) => ConfigFile;
|
|
26
|
-
export declare const fetchProjectReadme: (projectUrl: string, token: string) => Promise<string | null>;
|
|
3
|
+
export { ConfigFile, loadConfigFile, parseProjectReadmeConfig, mergeConfigs, fetchProjectReadme, } from './projectConfig';
|
|
27
4
|
export declare const program: Command;
|
|
28
|
-
export {};
|
|
29
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,UAAU,EACV,cAAc,EACd,wBAAwB,EACxB,YAAY,EACZ,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAwEzB,eAAO,MAAM,OAAO,SAAgB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type ConfigFile = {
|
|
2
|
+
projectUrl?: string;
|
|
3
|
+
awaitingWorkspaceStatus?: string;
|
|
4
|
+
preparationStatus?: string;
|
|
5
|
+
defaultAgentName?: string;
|
|
6
|
+
defaultLlmModelName?: string;
|
|
7
|
+
defaultLlmAgentName?: string;
|
|
8
|
+
maximumPreparingIssuesCount?: number;
|
|
9
|
+
allowIssueCacheMinutes?: number;
|
|
10
|
+
utilizationPercentageThreshold?: number;
|
|
11
|
+
allowedIssueAuthors?: string;
|
|
12
|
+
awaitingQualityCheckStatus?: string;
|
|
13
|
+
thresholdForAutoReject?: number;
|
|
14
|
+
workflowBlockerResolvedWebhookUrl?: string;
|
|
15
|
+
projectName?: string;
|
|
16
|
+
preparationProcessCheckCommand?: string;
|
|
17
|
+
codexHomeCandidates?: string[];
|
|
18
|
+
awLogDirectoryPath?: string;
|
|
19
|
+
awLogStaleThresholdMinutes?: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
22
|
+
export declare const loadConfigFile: (configFilePath: string) => ConfigFile;
|
|
23
|
+
export declare const parseProjectReadmeConfig: (readme: string) => ConfigFile;
|
|
24
|
+
export declare const mergeConfigs: (configFile: ConfigFile, cliOverrides: ConfigFile, readmeOverrides: ConfigFile) => ConfigFile;
|
|
25
|
+
export declare const fetchProjectReadme: (projectUrl: string, token: string) => Promise<string | null>;
|
|
26
|
+
//# sourceMappingURL=projectConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectConfig.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/cli/projectConfig.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iCAAiC,CAAC,EAAE,MAAM,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAC;CACrC,CAAC;AAoCF,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CACH,CAAC;AAEvE,eAAO,MAAM,cAAc,GAAI,gBAAgB,MAAM,KAAG,UAuDvD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,KAAG,UA2DzD,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,UAAU,EACtB,cAAc,UAAU,EACxB,iBAAiB,UAAU,KAC1B,UAmED,CAAC;AAkBH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,EAClB,OAAO,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAyDvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HandleScheduledEventUseCaseHandler.d.ts","sourceRoot":"","sources":["../../../../src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAqB3D,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,CAoQP;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OauthProxyClaudeRepository.d.ts","sourceRoot":"","sources":["../../../src/adapter/repositories/OauthProxyClaudeRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"OauthProxyClaudeRepository.d.ts","sourceRoot":"","sources":["../../../src/adapter/repositories/OauthProxyClaudeRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAoB5E,qBAAa,0BAA2B,YAAW,gBAAgB;IACjE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAGhC,QAAQ,GAAE,MACoB;IAK1B,QAAQ,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAyExC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAO7D"}
|