@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.
- package/CHANGELOG.md +3 -3
- package/dist/browser/neurolink.min.js +5 -5
- package/dist/cli/proxy-clients/gemini.d.ts +51 -0
- package/dist/cli/proxy-clients/gemini.js +278 -0
- package/dist/cli/proxy-clients/openCode.d.ts +41 -0
- package/dist/cli/proxy-clients/openCode.js +212 -27
- package/dist/cli/proxy-clients/registry.js +2 -0
- package/dist/cli/proxy-clients/snapshot.d.ts +13 -0
- package/dist/cli/proxy-clients/snapshot.js +18 -0
- package/dist/constants/proxyModels.d.ts +22 -0
- package/dist/constants/proxyModels.js +36 -0
- package/dist/core/baseProvider.d.ts +1 -1
- package/dist/core/baseProvider.js +2 -2
- package/dist/evaluation/scorers/rule/formatScorer.js +1 -1
- package/dist/mcp/mcpRegistryClient.js +1 -1
- package/dist/middleware/utils/guardrailsUtils.js +1 -1
- package/dist/neurolink.js +2 -2
- package/dist/proxy/proxyTranslationEngine.js +3 -22
- package/dist/rag/ChunkerFactory.js +1 -1
- package/dist/server/websocket/WebSocketHandler.js +3 -3
- package/dist/types/proxyClient.d.ts +33 -0
- package/dist/workflow/config.d.ts +1 -1
- package/dist/workflow/config.js +1 -1
- package/dist/workflow/core/workflowRegistry.js +1 -1
- package/dist/workflow/core/workflowRunner.js +1 -1
- package/dist/workflow/utils/workflowMetrics.d.ts +1 -1
- package/dist/workflow/utils/workflowMetrics.js +1 -1
- package/package.json +2 -1
|
@@ -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(#
|
|
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
|
package/dist/workflow/config.js
CHANGED
|
@@ -383,7 +383,7 @@ export function getAllJudges(config) {
|
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
385
|
* Calculate estimated workflow cost (placeholder)
|
|
386
|
-
* TODO(#
|
|
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(#
|
|
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(#
|
|
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(#
|
|
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(#
|
|
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
|
+
"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",
|