@juspay/neurolink 12.3.0 → 12.4.1

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.
@@ -47,6 +47,39 @@ export type CliProxyClientRestoreResult = {
47
47
  restored: boolean;
48
48
  error?: Error;
49
49
  };
50
+ /**
51
+ * Snapshot of the user's pre-existing OpenCode `provider.neurolink`.
52
+ *
53
+ * Persisted to `~/.neurolink/opencode-proxy-snapshot.json`, never inside
54
+ * `opencode.json` — OpenCode validates against a closed schema and rejects
55
+ * unknown top-level keys, so an in-file snapshot made the CLI unstartable.
56
+ */
57
+ export type CliOpenCodeSnapshot = {
58
+ /** The user's provider.neurolink before the proxy first touched it. */
59
+ original: unknown;
60
+ /** What the writer last wrote, so apply() can recognise its own block. */
61
+ written?: unknown;
62
+ };
63
+ /**
64
+ * Snapshot of the user's pre-existing Gemini CLI `~/.gemini/.env`.
65
+ *
66
+ * The whole file is kept rather than the managed keys alone: restoring must
67
+ * reproduce the user's comments, ordering and unrelated variables exactly.
68
+ */
69
+ export type CliGeminiSnapshot = {
70
+ /** The whole prior `.env`, or null when the user had no such file. */
71
+ originalEnv: string | null;
72
+ /**
73
+ * What the writer last wrote for each managed variable. Compared against the
74
+ * file on disk to detect a snapshot that has gone stale — one left behind by
75
+ * a restore whose cleanup failed, or overtaken by a user edit. Reusing such a
76
+ * record would make the next restore replay outdated values.
77
+ */
78
+ written?: {
79
+ baseUrl: string;
80
+ apiKey: string;
81
+ };
82
+ };
50
83
  /**
51
84
  * Raw contents of a Qwen Code `settings.json`. Deliberately open-ended: the
52
85
  * configurator rewrites only `security.auth` and must round-trip every other
@@ -368,7 +368,7 @@ export declare function hasJudge(config: WorkflowConfig): boolean;
368
368
  export declare function getAllJudges(config: WorkflowConfig): JudgeConfig[];
369
369
  /**
370
370
  * Calculate estimated workflow cost (placeholder)
371
- * TODO(#1179): Implement actual provider-specific pricing
371
+ * TODO(#1576): Implement actual provider-specific pricing
372
372
  * @param config - Workflow configuration
373
373
  * @param estimatedTokens - Estimated number of tokens for the request
374
374
  * @returns Estimated cost in USD
@@ -383,7 +383,7 @@ export function getAllJudges(config) {
383
383
  }
384
384
  /**
385
385
  * Calculate estimated workflow cost (placeholder)
386
- * TODO(#1179): Implement actual provider-specific pricing
386
+ * TODO(#1576): Implement actual provider-specific pricing
387
387
  * @param config - Workflow configuration
388
388
  * @param estimatedTokens - Estimated number of tokens for the request
389
389
  * @returns Estimated cost in USD
@@ -10,7 +10,7 @@ const functionTag = "WorkflowRegistry";
10
10
  // ============================================================================
11
11
  /**
12
12
  * In-memory workflow registry
13
- * TODO(#1179): Consider persistent storage in future phases
13
+ * TODO(#1576): Consider persistent storage in future phases
14
14
  */
15
15
  const workflowRegistry = new Map();
16
16
  // ============================================================================
@@ -158,7 +158,7 @@ export async function runWorkflow(config, options) {
158
158
  totalInputTokens: calculateInputTokens(ensembleResult.responses),
159
159
  totalOutputTokens: calculateOutputTokens(ensembleResult.responses),
160
160
  totalTokens: calculateTotalTokens(ensembleResult.responses),
161
- byModel: [], // TODO(#1179): Populate per-model breakdown
161
+ byModel: [], // TODO(#1576): Populate per-model breakdown
162
162
  },
163
163
  // Additional metadata
164
164
  metadata: options.metadata,
@@ -46,7 +46,7 @@ export declare function calculateModelMetrics(responses: EnsembleResponse[]): Re
46
46
  /**
47
47
  * Calculate consensus level between responses
48
48
  * NOTE: Placeholder implementation - uses response length similarity
49
- * TODO(#1179): Implement semantic similarity in Phase 2
49
+ * TODO(#1576): Implement semantic similarity in Phase 2
50
50
  */
51
51
  export declare function calculateConsensus(responses: EnsembleResponse[]): number;
52
52
  /**
@@ -159,7 +159,7 @@ export function calculateModelMetrics(responses) {
159
159
  /**
160
160
  * Calculate consensus level between responses
161
161
  * NOTE: Placeholder implementation - uses response length similarity
162
- * TODO(#1179): Implement semantic similarity in Phase 2
162
+ * TODO(#1576): Implement semantic similarity in Phase 2
163
163
  */
164
164
  export function calculateConsensus(responses) {
165
165
  const successful = responses.filter((r) => r.status === "success");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "12.3.0",
3
+ "version": "12.4.1",
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": {
@@ -215,6 +215,7 @@
215
215
  "test:archive:security": "pnpm exec tsx test/continuous-test-suite-archive-security.ts",
216
216
  "test:office:security": "pnpm exec tsx test/continuous-test-suite-office-security.ts",
217
217
  "test:model-pool": "pnpm exec tsx test/continuous-test-suite-model-pool.ts",
218
+ "test:agents": "pnpm exec tsx test/continuous-test-suite-agents.ts",
218
219
  "test:classifier-router": "pnpm exec tsx test/continuous-test-suite-classifier-router.ts",
219
220
  "test:vector-chroma": "pnpm exec tsx test/continuous-test-suite-vector-chroma.ts",
220
221
  "test:vector-pgvector": "pnpm exec tsx test/continuous-test-suite-vector-pgvector.ts",