@juspay/neurolink 12.24.0 → 12.25.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 +2 -2
- package/dist/browser/neurolink.min.js +407 -407
- package/dist/cli/commands/proxy.js +30 -0
- package/dist/proxy/accountRanking.d.ts +67 -4
- package/dist/proxy/accountRanking.js +188 -8
- package/dist/proxy/proxyAnalysis.js +76 -0
- package/dist/proxy/proxyConfig.d.ts +24 -1
- package/dist/proxy/proxyConfig.js +131 -3
- package/dist/proxy/routingEvidence.d.ts +1 -1
- package/dist/proxy/routingEvidence.js +5 -0
- package/dist/proxy/runtimeConfig.js +15 -0
- package/dist/proxy/sessionAffinity.d.ts +23 -0
- package/dist/proxy/sessionAffinity.js +62 -0
- package/dist/server/routes/claudeProxyRoutes.d.ts +48 -3
- package/dist/server/routes/claudeProxyRoutes.js +324 -29
- package/dist/types/proxy.d.ts +48 -0
- package/dist/types/subscription.d.ts +16 -4
- package/docs-site/static/search-index.json +11045 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { StoredOAuthTokens } from "./auth.js";
|
|
8
8
|
import type { CodexReasoningEffort } from "./codex.js";
|
|
9
|
+
import type { ProxyAccountRankingPolicy } from "./proxy.js";
|
|
9
10
|
export type { StoredOAuthTokens, TokenRefresher, TokenStorageData, StoredProviderTokens, } from "./auth.js";
|
|
10
11
|
/**
|
|
11
12
|
* Claude subscription tier levels
|
|
@@ -1018,16 +1019,27 @@ export type ProxyRoutingConfig = {
|
|
|
1018
1019
|
sessionSoftLimit?: number;
|
|
1019
1020
|
/** Reset-time bucket width used when ordering quota windows. */
|
|
1020
1021
|
sessionResetToleranceMs?: number;
|
|
1021
|
-
/** Email/label of the Anthropic account
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1022
|
+
/** Email/label of the Anthropic account used as "home". Under quota
|
|
1023
|
+
* routing it is the ranking's final tiebreaker unless prefer-primary is
|
|
1024
|
+
* set; it is tried first only when quota routing is disabled. When
|
|
1025
|
+
* absent, falls back to insertion-order index 0. Resolved per-request to
|
|
1026
|
+
* a stable key (anthropic:<email>); does not encode an index. */
|
|
1025
1027
|
primaryAccount?: string;
|
|
1026
1028
|
/** Anthropic account emails/labels that may be loaded by the proxy. When
|
|
1027
1029
|
* present, every token-store, legacy, and environment credential outside
|
|
1028
1030
|
* this set is excluded before refresh or routing. An empty list denies all
|
|
1029
1031
|
* stored credentials. */
|
|
1030
1032
|
accountAllowlist?: string[];
|
|
1033
|
+
/** Ordering rule for usable accounts. Defaults to "expiry-first" (today's behaviour). */
|
|
1034
|
+
accountRanking?: ProxyAccountRankingPolicy;
|
|
1035
|
+
/** If the configured primary is usable and not session-saturated, try it first. */
|
|
1036
|
+
preferPrimary?: boolean;
|
|
1037
|
+
/** Keep a Claude Code session on its bound account while it stays usable and not session-saturated. */
|
|
1038
|
+
sessionAffinity?: boolean;
|
|
1039
|
+
/** Idle TTL, in ms, before a session-affinity binding is dropped. 60000-86400000. */
|
|
1040
|
+
sessionAffinityIdleTtlMs?: number;
|
|
1041
|
+
/** For a request without a binding: spill off an account already at N in-flight. 0-100, 0 = off. */
|
|
1042
|
+
spillInflight?: number;
|
|
1031
1043
|
};
|
|
1032
1044
|
/** Cloaking plugin config */
|
|
1033
1045
|
export type CloakingConfig = {
|