@juspay/neurolink 12.5.1 → 12.5.2

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 CHANGED
@@ -1,4 +1,8 @@
1
- ## [12.5.1](https://github.com/juspay/neurolink/compare/v12.5.0...v12.5.1) (2026-08-29)
1
+ ## [12.5.2](https://github.com/juspay/neurolink/compare/v12.5.1...v12.5.2) (2026-08-29)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **(proxy-clients):** keep the true original when a migration is interrupted ([df7f534](https://github.com/juspay/neurolink/commit/df7f534bb27378ba023428c229714d59cb294e26)), closes [#1589](https://github.com/juspay/neurolink/issues/1589)
2
6
 
3
7
  ## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
4
8
 
@@ -146,13 +146,26 @@ async function readSnapshotFile(filePath) {
146
146
  * provider block.
147
147
  */
148
148
  async function resolveOpenCodeSnapshot(inFileLegacy) {
149
+ // An in-file legacy record outranks everything, because its presence means
150
+ // more than "here is a snapshot": the config still carries `__proxy_*` keys,
151
+ // so the previous migration did not complete. That record is the only one
152
+ // that predates the proxy, and on a migration run it is guaranteed to
153
+ // disagree with a scoped snapshot — the old writer's block has `models: {}`
154
+ // while the new writer's `written` carries the full map, so valuesMatch() is
155
+ // always false and shouldCaptureSnapshot() re-captures. Re-capturing there
156
+ // adopts the proxy's OWN block as the user's "original" and discards the
157
+ // real one, silently and permanently.
158
+ //
159
+ // Reachable whenever apply() wrote the scoped snapshot and then failed to
160
+ // write opencode.json: applyAllClients() catches per-client errors, so the
161
+ // retry runs against a config still holding the legacy keys.
162
+ if (inFileLegacy !== null) {
163
+ return { snapshot: inFileLegacy, source: "in-file" };
164
+ }
149
165
  const scoped = await readSnapshotFile(getOpenCodeSnapshotPath());
150
166
  if (scoped !== null) {
151
167
  return { snapshot: scoped, source: "scoped" };
152
168
  }
153
- if (inFileLegacy !== null) {
154
- return { snapshot: inFileLegacy, source: "in-file" };
155
- }
156
169
  const unscoped = await readSnapshotFile(getLegacyOpenCodeSnapshotPath());
157
170
  return unscoped === null
158
171
  ? { snapshot: null, source: null }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.5.1",
3
+ "version": "12.5.2",
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": {