@juspay/neurolink 11.11.3 → 11.11.4
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 +5 -1
- package/dist/cli/commands/proxy.d.ts +18 -0
- package/dist/cli/commands/proxy.js +38 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
## [11.11.
|
|
1
|
+
## [11.11.4](https://github.com/juspay/neurolink/compare/v11.11.3...v11.11.4) (2026-08-21)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
- **(proxy):** make OpenCode auto-configuration work on macOS ([e7f5c99](https://github.com/juspay/neurolink/commit/e7f5c999c7825a22a82e40888137253cf22cfbf6)), closes [#1366](https://github.com/juspay/neurolink/issues/1366) [#1367](https://github.com/juspay/neurolink/issues/1367)
|
|
2
6
|
|
|
3
7
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
4
8
|
|
|
@@ -58,6 +58,23 @@ export declare function isRollingHandoffCapable(state: ProxySupervisorState | nu
|
|
|
58
58
|
* confirm a mismatch" and falls through to the args-only result.
|
|
59
59
|
*/
|
|
60
60
|
export declare function processLooksLikeProxySupervisor(pid: number, expectedStartTimeIso?: string): Promise<boolean>;
|
|
61
|
+
declare function getOpenCodeConfigDir(): string;
|
|
62
|
+
declare function getOpenCodeConfigPath(): string;
|
|
63
|
+
declare function setOpenCodeProxySettings(baseUrl: string, proxyKey?: string): Promise<boolean>;
|
|
64
|
+
declare function clearOpenCodeProxySettings(expectedBaseUrl?: string): Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Test-only export (CLAUDE.md rule 15 determinism exception). The OpenCode
|
|
67
|
+
* client writers resolve paths from the environment and are only reachable
|
|
68
|
+
* from `proxy start` / `proxy setup`, neither of which can be driven against a
|
|
69
|
+
* throwaway HOME without starting a real server. Consumed by
|
|
70
|
+
* test/continuous-test-suite-proxy.ts.
|
|
71
|
+
*/
|
|
72
|
+
export declare const __openCodeTestHooks: {
|
|
73
|
+
getOpenCodeConfigDir: typeof getOpenCodeConfigDir;
|
|
74
|
+
getOpenCodeConfigPath: typeof getOpenCodeConfigPath;
|
|
75
|
+
setOpenCodeProxySettings: typeof setOpenCodeProxySettings;
|
|
76
|
+
clearOpenCodeProxySettings: typeof clearOpenCodeProxySettings;
|
|
77
|
+
};
|
|
61
78
|
export declare function probeProxyHealth(host: string, port: number, timeoutMs: number): Promise<ProxyHealthProbe>;
|
|
62
79
|
export declare function mapClaudeErrorTypeToStatus(errorType?: string): number;
|
|
63
80
|
export declare function createProxyStartApp(params: {
|
|
@@ -84,3 +101,4 @@ export declare const proxyGuardCommand: CommandModule<object, ProxyGuardArgs>;
|
|
|
84
101
|
export declare const proxySetupCommand: CommandModule;
|
|
85
102
|
export declare const proxyInstallCommand: CommandModule;
|
|
86
103
|
export declare const proxyUninstallCommand: CommandModule;
|
|
104
|
+
export {};
|
|
@@ -513,13 +513,17 @@ async function clearClaudeProxySettings(expectedBaseUrl) {
|
|
|
513
513
|
// OPENCODE AUTO-CONFIGURATION
|
|
514
514
|
// =============================================================================
|
|
515
515
|
function getOpenCodeConfigDir() {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
//
|
|
516
|
+
// OpenCode resolves this with the unmodified `xdg-basedir` package —
|
|
517
|
+
// `XDG_CONFIG_HOME || ~/.config` — on every platform, macOS included. There
|
|
518
|
+
// is deliberately no darwin branch here: `~/Library/Application Support/
|
|
519
|
+
// opencode` is not a path OpenCode reads. (The similar-looking literal in
|
|
520
|
+
// OpenCode's binary is `systemManagedConfigDir()`, an MDM policy directory
|
|
521
|
+
// at the filesystem root with no $HOME prefix.)
|
|
520
522
|
return join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "opencode");
|
|
521
523
|
}
|
|
522
|
-
|
|
524
|
+
function getOpenCodeConfigPath() {
|
|
525
|
+
return join(getOpenCodeConfigDir(), "opencode.json");
|
|
526
|
+
}
|
|
523
527
|
/**
|
|
524
528
|
* Key under which we persist the snapshot of the user's pre-existing
|
|
525
529
|
* `provider.neurolink` config inside `opencode.json` itself. Persisting (rather
|
|
@@ -536,12 +540,14 @@ async function setOpenCodeProxySettings(baseUrl, proxyKey) {
|
|
|
536
540
|
fs.accessSync(configDir);
|
|
537
541
|
}
|
|
538
542
|
catch {
|
|
539
|
-
// OpenCode not installed — config directory does not exist
|
|
540
|
-
|
|
543
|
+
// OpenCode not installed — config directory does not exist. Report the
|
|
544
|
+
// skip so the caller does not print a success message for work that did
|
|
545
|
+
// not happen.
|
|
546
|
+
return false;
|
|
541
547
|
}
|
|
542
548
|
let config;
|
|
543
549
|
try {
|
|
544
|
-
config = JSON.parse(fs.readFileSync(
|
|
550
|
+
config = JSON.parse(fs.readFileSync(getOpenCodeConfigPath(), "utf8"));
|
|
545
551
|
}
|
|
546
552
|
catch {
|
|
547
553
|
// file missing/invalid — create fresh config object
|
|
@@ -571,13 +577,14 @@ async function setOpenCodeProxySettings(baseUrl, proxyKey) {
|
|
|
571
577
|
},
|
|
572
578
|
};
|
|
573
579
|
config.provider = provider;
|
|
574
|
-
fs.writeFileSync(
|
|
580
|
+
fs.writeFileSync(getOpenCodeConfigPath(), JSON.stringify(config, null, 2));
|
|
581
|
+
return true;
|
|
575
582
|
}
|
|
576
583
|
async function clearOpenCodeProxySettings(expectedBaseUrl) {
|
|
577
584
|
const fs = await import("fs");
|
|
578
585
|
let config;
|
|
579
586
|
try {
|
|
580
|
-
config = JSON.parse(fs.readFileSync(
|
|
587
|
+
config = JSON.parse(fs.readFileSync(getOpenCodeConfigPath(), "utf8"));
|
|
581
588
|
}
|
|
582
589
|
catch {
|
|
583
590
|
return false;
|
|
@@ -622,9 +629,22 @@ async function clearOpenCodeProxySettings(expectedBaseUrl) {
|
|
|
622
629
|
return false;
|
|
623
630
|
}
|
|
624
631
|
config.provider = provider;
|
|
625
|
-
fs.writeFileSync(
|
|
632
|
+
fs.writeFileSync(getOpenCodeConfigPath(), JSON.stringify(config, null, 2));
|
|
626
633
|
return hadNeurolink;
|
|
627
634
|
}
|
|
635
|
+
/**
|
|
636
|
+
* Test-only export (CLAUDE.md rule 15 determinism exception). The OpenCode
|
|
637
|
+
* client writers resolve paths from the environment and are only reachable
|
|
638
|
+
* from `proxy start` / `proxy setup`, neither of which can be driven against a
|
|
639
|
+
* throwaway HOME without starting a real server. Consumed by
|
|
640
|
+
* test/continuous-test-suite-proxy.ts.
|
|
641
|
+
*/
|
|
642
|
+
export const __openCodeTestHooks = {
|
|
643
|
+
getOpenCodeConfigDir,
|
|
644
|
+
getOpenCodeConfigPath,
|
|
645
|
+
setOpenCodeProxySettings,
|
|
646
|
+
clearOpenCodeProxySettings,
|
|
647
|
+
};
|
|
628
648
|
// =============================================================================
|
|
629
649
|
// CODEX (ChatGPT) AUTO-CONFIGURATION
|
|
630
650
|
// =============================================================================
|
|
@@ -2709,9 +2729,10 @@ async function startProxyRuntime(params) {
|
|
|
2709
2729
|
(error instanceof Error ? error.message : String(error)));
|
|
2710
2730
|
}
|
|
2711
2731
|
try {
|
|
2712
|
-
await setOpenCodeProxySettings(`${url}/v1`)
|
|
2713
|
-
|
|
2714
|
-
|
|
2732
|
+
if (await setOpenCodeProxySettings(`${url}/v1`)) {
|
|
2733
|
+
logger.always(chalk.green(" ✓ Auto-configured OpenCode settings"));
|
|
2734
|
+
logger.always(chalk.dim(" Restart OpenCode to connect through proxy"));
|
|
2735
|
+
}
|
|
2715
2736
|
}
|
|
2716
2737
|
catch (error) {
|
|
2717
2738
|
logger.debug("[proxy] Failed to auto-configure OpenCode: " +
|
|
@@ -4155,8 +4176,9 @@ export const proxySetupCommand = {
|
|
|
4155
4176
|
console.info(chalk.yellow(` Set manually: ANTHROPIC_BASE_URL=${url}`));
|
|
4156
4177
|
}
|
|
4157
4178
|
try {
|
|
4158
|
-
await setOpenCodeProxySettings(`${url}/v1`)
|
|
4159
|
-
|
|
4179
|
+
if (await setOpenCodeProxySettings(`${url}/v1`)) {
|
|
4180
|
+
console.info(chalk.green(" ✓ OpenCode configured"));
|
|
4181
|
+
}
|
|
4160
4182
|
}
|
|
4161
4183
|
catch (e) {
|
|
4162
4184
|
console.info(chalk.yellow(` ⚠ Could not auto-configure OpenCode: ${e instanceof Error ? e.message : String(e)}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "11.11.
|
|
3
|
+
"version": "11.11.4",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "TypeScript AI SDK with 24+ LLM providers behind one consistent API. MCP-native (connect any MCP server), voice TTS/STT/realtime, RAG, agents, memory, context compaction. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · DeepSeek · NVIDIA NIM and more.",
|
|
6
6
|
"author": {
|