@juspay/neurolink 13.8.6 → 13.8.8
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/auth/anthropicOAuth.js +7 -6
- package/dist/auth/codexOAuth.js +2 -1
- package/dist/browser/neurolink.min.js +630 -608
- package/dist/cli/commands/proxy.js +26 -4
- package/dist/mcp/mcpClientFactory.d.ts +12 -1
- package/dist/mcp/mcpClientFactory.js +87 -8
- package/dist/providers/anthropic/client.js +2 -2
- package/dist/proxy/accountUsage.js +2 -1
- package/dist/proxy/codexAccountUsage.js +2 -1
- package/dist/proxy/providerTransportCoordinator.d.ts +6 -0
- package/dist/proxy/providerTransportCoordinator.js +34 -1
- package/dist/proxy/proxyDispatcher.js +2 -2
- package/dist/proxy/proxyFetch.d.ts +9 -3
- package/dist/proxy/proxyFetch.js +31 -9
- package/dist/proxy/routingPolicy.d.ts +1 -1
- package/dist/proxy/snapshotPersistence.d.ts +6 -0
- package/dist/proxy/snapshotPersistence.js +10 -0
- package/dist/proxy/tokenRefresh.d.ts +2 -0
- package/dist/proxy/tokenRefresh.js +19 -3
- package/dist/proxy/vertexAnthropicFallback.js +2 -2
- package/dist/server/routes/claudeProxyRoutes.js +107 -26
- package/dist/server/routes/codexProxyRoutes.js +3 -2
- package/dist/types/proxy.d.ts +8 -0
- package/docs-site/static/search-index.json +2 -2
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
## [13.8.
|
|
1
|
+
## [13.8.8](https://github.com/juspay/neurolink/compare/v13.8.7...v13.8.8) (2026-10-24)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
- **(
|
|
5
|
+
- **(deps):** raise zod to ^4.6.7 and accept body-parser until its patch clears the cooldown ([52f13f7](https://github.com/juspay/neurolink/commit/52f13f728914e16006f1537cf42f084bcec18d7a))
|
|
6
6
|
|
|
7
7
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
8
|
|
|
@@ -20,6 +20,7 @@ import { OAuthError, OAuthConfigurationError, OAuthTokenExchangeError, OAuthToke
|
|
|
20
20
|
import { logger } from "../utils/logger.js";
|
|
21
21
|
import { withSpan } from "../telemetry/withSpan.js";
|
|
22
22
|
import { tracers } from "../telemetry/tracers.js";
|
|
23
|
+
import { fetchProxyAware } from "../proxy/proxyFetch.js";
|
|
23
24
|
/**
|
|
24
25
|
* HTML-escape a string to prevent XSS when embedding in HTML responses.
|
|
25
26
|
*/
|
|
@@ -501,7 +502,7 @@ export class AnthropicOAuth {
|
|
|
501
502
|
const controller = new AbortController();
|
|
502
503
|
const timeoutId = setTimeout(() => controller.abort(), 10_000);
|
|
503
504
|
try {
|
|
504
|
-
const response = await
|
|
505
|
+
const response = await fetchProxyAware(url, {
|
|
505
506
|
method: "POST",
|
|
506
507
|
headers: {
|
|
507
508
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -596,7 +597,7 @@ export class AnthropicOAuth {
|
|
|
596
597
|
const controller = new AbortController();
|
|
597
598
|
const timeoutId = setTimeout(() => controller.abort(), 10_000);
|
|
598
599
|
try {
|
|
599
|
-
const response = await
|
|
600
|
+
const response = await fetchProxyAware(url, {
|
|
600
601
|
method: "POST",
|
|
601
602
|
headers,
|
|
602
603
|
body: new URLSearchParams(body).toString(),
|
|
@@ -667,7 +668,7 @@ export class AnthropicOAuth {
|
|
|
667
668
|
}
|
|
668
669
|
logger.debug("Validating access token");
|
|
669
670
|
try {
|
|
670
|
-
const response = await
|
|
671
|
+
const response = await fetchProxyAware(this.validationUrl, {
|
|
671
672
|
method: "POST",
|
|
672
673
|
headers: {
|
|
673
674
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -710,7 +711,7 @@ export class AnthropicOAuth {
|
|
|
710
711
|
}
|
|
711
712
|
logger.debug("Validating access token with details");
|
|
712
713
|
try {
|
|
713
|
-
const response = await
|
|
714
|
+
const response = await fetchProxyAware(this.validationUrl, {
|
|
714
715
|
method: "POST",
|
|
715
716
|
headers: {
|
|
716
717
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -787,7 +788,7 @@ export class AnthropicOAuth {
|
|
|
787
788
|
body.client_secret = this.clientSecret;
|
|
788
789
|
}
|
|
789
790
|
try {
|
|
790
|
-
const response = await
|
|
791
|
+
const response = await fetchProxyAware(this.revocationUrl, {
|
|
791
792
|
method: "POST",
|
|
792
793
|
headers: {
|
|
793
794
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
@@ -1088,7 +1089,7 @@ export function buildSubscriptionAuthUrl(params) {
|
|
|
1088
1089
|
* entire point: the code alone buys nothing.
|
|
1089
1090
|
*/
|
|
1090
1091
|
export async function exchangeSubscriptionCode(params) {
|
|
1091
|
-
const response = await
|
|
1092
|
+
const response = await fetchProxyAware(ANTHROPIC_TOKEN_URL, {
|
|
1092
1093
|
method: "POST",
|
|
1093
1094
|
headers: { "Content-Type": "application/json" },
|
|
1094
1095
|
body: JSON.stringify({
|
package/dist/auth/codexOAuth.js
CHANGED
|
@@ -13,6 +13,7 @@ import { readFile } from "node:fs/promises";
|
|
|
13
13
|
import { homedir } from "node:os";
|
|
14
14
|
import { join } from "node:path";
|
|
15
15
|
import { logger } from "../utils/logger.js";
|
|
16
|
+
import { fetchProxyAware } from "../proxy/proxyFetch.js";
|
|
16
17
|
// OAuth client + endpoints (Codex CLI values).
|
|
17
18
|
export const CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann";
|
|
18
19
|
export const CODEX_AUTH_URL = "https://auth.openai.com/oauth/authorize";
|
|
@@ -148,7 +149,7 @@ export async function refreshCodexToken(refreshToken, options = {}) {
|
|
|
148
149
|
client_id: CODEX_CLIENT_ID,
|
|
149
150
|
scope: CODEX_DEFAULT_SCOPES.join(" "),
|
|
150
151
|
});
|
|
151
|
-
const response = await
|
|
152
|
+
const response = await fetchProxyAware(CODEX_TOKEN_URL, {
|
|
152
153
|
method: "POST",
|
|
153
154
|
headers: {
|
|
154
155
|
"Content-Type": "application/x-www-form-urlencoded",
|