@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.
@@ -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 that should be tried first
1022
- * ("home"). When absent, falls back to insertion-order index 0.
1023
- * Resolved per-request to a stable key (anthropic:<email>); does not
1024
- * encode an index. */
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 = {