@juspay/neurolink 12.45.0 → 12.45.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 +3 -3
- package/dist/browser/neurolink.min.js +285 -285
- package/dist/localUsage/cursorReader.js +53 -21
- package/dist/localUsage/grokReader.d.ts +3 -1
- package/dist/localUsage/grokReader.js +43 -4
- package/dist/localUsage/hermesReader.d.ts +3 -1
- package/dist/localUsage/hermesReader.js +16 -2
- package/dist/providers/litellm/client.js +1 -1
- package/docs-site/static/search-index.json +7 -7
- package/package.json +3 -3
|
@@ -86,11 +86,16 @@ function decodeMessage(buf) {
|
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
88
|
// Beyond 2^53 a JS number stops being exact, and a token count that
|
|
89
|
-
// silently loses precision is worse than a refused parse.
|
|
89
|
+
// silently loses precision is worse than a refused parse. The shift
|
|
90
|
+
// guard is only the cheap early exit: the eighth byte (shift 49) passes
|
|
91
|
+
// it and can still carry the sum past Number.MAX_SAFE_INTEGER.
|
|
90
92
|
if (shift > 53) {
|
|
91
93
|
return null;
|
|
92
94
|
}
|
|
93
95
|
result += (byte & 0x7f) * Math.pow(2, shift);
|
|
96
|
+
if (!Number.isSafeInteger(result)) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
94
99
|
shift += 7;
|
|
95
100
|
if ((byte & 0x80) === 0) {
|
|
96
101
|
return result;
|
|
@@ -269,6 +274,32 @@ function findBreakdownTotal(buf, depth) {
|
|
|
269
274
|
export function extractCursorContextTokens(rootBlob) {
|
|
270
275
|
return findBreakdownTotal(rootBlob, 0);
|
|
271
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* The root blob id a store's meta row points at, or `undefined` when the row is
|
|
279
|
+
* not hex-encoded JSON carrying a string `latestRootBlobId`.
|
|
280
|
+
*/
|
|
281
|
+
function readLatestRootBlobId(rawMeta) {
|
|
282
|
+
// Hex-encoded JSON. Validated rather than assumed: a non-hex value decodes to
|
|
283
|
+
// mojibake and would throw inside JSON.parse anyway, but the explicit test
|
|
284
|
+
// says why the buffer conversion is there.
|
|
285
|
+
if (!/^(?:[0-9a-fA-F]{2})+$/.test(rawMeta)) {
|
|
286
|
+
return undefined;
|
|
287
|
+
}
|
|
288
|
+
try {
|
|
289
|
+
const meta = JSON.parse(Buffer.from(rawMeta, "hex").toString("utf8"));
|
|
290
|
+
if (typeof meta === "object" &&
|
|
291
|
+
meta !== null &&
|
|
292
|
+
"latestRootBlobId" in meta &&
|
|
293
|
+
typeof meta.latestRootBlobId ===
|
|
294
|
+
"string") {
|
|
295
|
+
return meta.latestRootBlobId;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
catch {
|
|
299
|
+
// Not JSON: reported by the caller, which cannot tell this from a missing id.
|
|
300
|
+
}
|
|
301
|
+
return undefined;
|
|
302
|
+
}
|
|
272
303
|
/** `~/.cursor/chats/<workspaceHash>/<agentId>/store.db`, two levels down. */
|
|
273
304
|
async function findStoreDatabases() {
|
|
274
305
|
const root = chatsRoot();
|
|
@@ -380,30 +411,31 @@ export async function createCursorReader() {
|
|
|
380
411
|
const metaRows = db.prepare("SELECT value FROM meta").all();
|
|
381
412
|
const rawMeta = metaRows.find((row) => typeof row.value === "string")?.value;
|
|
382
413
|
if (rawMeta === undefined) {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
// the explicit test says why the buffer conversion is there.
|
|
388
|
-
if (!/^(?:[0-9a-fA-F]{2})+$/.test(rawMeta)) {
|
|
389
|
-
continue;
|
|
390
|
-
}
|
|
391
|
-
let latestRootBlobId;
|
|
392
|
-
try {
|
|
393
|
-
const meta = JSON.parse(Buffer.from(rawMeta, "hex").toString("utf8"));
|
|
394
|
-
if (typeof meta === "object" &&
|
|
395
|
-
meta !== null &&
|
|
396
|
-
"latestRootBlobId" in meta &&
|
|
397
|
-
typeof meta
|
|
398
|
-
.latestRootBlobId === "string") {
|
|
399
|
-
latestRootBlobId = meta
|
|
400
|
-
.latestRootBlobId;
|
|
414
|
+
if (metaRows.length === 0) {
|
|
415
|
+
// A store a session has only just created: no meta row yet. That
|
|
416
|
+
// is a new session, not a format change.
|
|
417
|
+
continue;
|
|
401
418
|
}
|
|
402
|
-
|
|
403
|
-
|
|
419
|
+
// A row is there but holds no text (NULL or a BLOB): the store was
|
|
420
|
+
// opened and counted, so this is reported like any other meta row
|
|
421
|
+
// that cannot be read.
|
|
422
|
+
errors.push({
|
|
423
|
+
cliId: CLI_ID,
|
|
424
|
+
filePath: dbPath,
|
|
425
|
+
message: "meta row holds no text value — Cursor's on-disk format has likely changed",
|
|
426
|
+
});
|
|
404
427
|
continue;
|
|
405
428
|
}
|
|
429
|
+
const latestRootBlobId = readLatestRootBlobId(rawMeta);
|
|
406
430
|
if (latestRootBlobId === undefined) {
|
|
431
|
+
// Reported, never silently skipped, for the same reason as the
|
|
432
|
+
// missing breakdown below: a store opened and counted in
|
|
433
|
+
// filesScanned that yields nothing must not read as "used nothing".
|
|
434
|
+
errors.push({
|
|
435
|
+
cliId: CLI_ID,
|
|
436
|
+
filePath: dbPath,
|
|
437
|
+
message: "meta row is not hex-encoded JSON carrying a latestRootBlobId — Cursor's on-disk format has likely changed",
|
|
438
|
+
});
|
|
407
439
|
continue;
|
|
408
440
|
}
|
|
409
441
|
const blobRows = db
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
* `modelUsage` map and `numTurns`. A turn that failed before any model call
|
|
25
25
|
* carries no `usage` at all, so it excludes itself. `stop_reason` is not an
|
|
26
26
|
* eligibility test: a truncated or interrupted turn with a usage object was
|
|
27
|
-
* still billed.
|
|
27
|
+
* still billed. A `usage` that is present but is not that ledger (empty, an
|
|
28
|
+
* array, none of the counters) is a changed format: it is reported, not billed
|
|
29
|
+
* as a request of zero tokens.
|
|
28
30
|
*
|
|
29
31
|
* What the numbers MEAN took a second real turn to settle, and the answer is
|
|
30
32
|
* neither "per turn" nor "cumulative" but both, by process:
|
|
@@ -24,7 +24,9 @@
|
|
|
24
24
|
* `modelUsage` map and `numTurns`. A turn that failed before any model call
|
|
25
25
|
* carries no `usage` at all, so it excludes itself. `stop_reason` is not an
|
|
26
26
|
* eligibility test: a truncated or interrupted turn with a usage object was
|
|
27
|
-
* still billed.
|
|
27
|
+
* still billed. A `usage` that is present but is not that ledger (empty, an
|
|
28
|
+
* array, none of the counters) is a changed format: it is reported, not billed
|
|
29
|
+
* as a request of zero tokens.
|
|
28
30
|
*
|
|
29
31
|
* What the numbers MEAN took a second real turn to settle, and the answer is
|
|
30
32
|
* neither "per turn" nor "cumulative" but both, by process:
|
|
@@ -189,6 +191,24 @@ function continuesRun(prev, next) {
|
|
|
189
191
|
next.cacheCreation >= prev.cacheCreation &&
|
|
190
192
|
next.calls >= prev.calls);
|
|
191
193
|
}
|
|
194
|
+
const USAGE_COUNTERS = ["inputTokens", "outputTokens", "modelCalls"];
|
|
195
|
+
/**
|
|
196
|
+
* Whether `usage` is shaped like the ledger Grok writes: an object, not an
|
|
197
|
+
* array, with at least one of the counters a turn that reached a model always
|
|
198
|
+
* carries. `count()` reads any missing field as 0, so without this a `{}`, a
|
|
199
|
+
* `[]` or the same counters under renamed keys passed as a turn of zero tokens
|
|
200
|
+
* and was billed as one request.
|
|
201
|
+
*/
|
|
202
|
+
function isTurnUsage(usage) {
|
|
203
|
+
if (typeof usage !== "object" || usage === null || Array.isArray(usage)) {
|
|
204
|
+
return false;
|
|
205
|
+
}
|
|
206
|
+
const record = usage;
|
|
207
|
+
// `1e999` parses as Infinity, which is a number but not a count: `count()`
|
|
208
|
+
// reads it as 0, so one such field made a malformed turn a zero-token request.
|
|
209
|
+
const counters = USAGE_COUNTERS.map((key) => record[key]).filter((value) => typeof value === "number");
|
|
210
|
+
return counters.length > 0 && counters.every(Number.isFinite);
|
|
211
|
+
}
|
|
192
212
|
function completedTurn(parsed) {
|
|
193
213
|
if (typeof parsed !== "object" || parsed === null) {
|
|
194
214
|
return null;
|
|
@@ -208,7 +228,7 @@ function completedTurn(parsed) {
|
|
|
208
228
|
if (u.sessionUpdate !== "turn_completed") {
|
|
209
229
|
return null;
|
|
210
230
|
}
|
|
211
|
-
if (
|
|
231
|
+
if (u.usage === undefined || u.usage === null) {
|
|
212
232
|
// Completed without reaching a model — an error before the first call.
|
|
213
233
|
return null;
|
|
214
234
|
}
|
|
@@ -217,10 +237,11 @@ function completedTurn(parsed) {
|
|
|
217
237
|
usage: u.usage,
|
|
218
238
|
};
|
|
219
239
|
}
|
|
220
|
-
async function foldStream(filePath, totals, unpriced) {
|
|
240
|
+
async function foldStream(filePath, totals, unpriced, errors) {
|
|
221
241
|
// Insertion-ordered, so the delta rule below sees turns in the order Grok
|
|
222
242
|
// wrote them, with a re-emitted prompt replacing its earlier record.
|
|
223
243
|
const turns = new Map();
|
|
244
|
+
let unrecognised = 0;
|
|
224
245
|
const rl = createInterface({
|
|
225
246
|
input: createReadStream(filePath, { encoding: "utf8" }),
|
|
226
247
|
crlfDelay: Infinity,
|
|
@@ -244,12 +265,30 @@ async function foldStream(filePath, totals, unpriced) {
|
|
|
244
265
|
if (turn === null) {
|
|
245
266
|
continue;
|
|
246
267
|
}
|
|
268
|
+
if (!isTurnUsage(turn.usage)) {
|
|
269
|
+
unrecognised += 1;
|
|
270
|
+
// The later record for a prompt replaces the earlier one, so one that
|
|
271
|
+
// cannot be read must not leave the earlier reading in the totals.
|
|
272
|
+
if (turn.promptId !== undefined) {
|
|
273
|
+
turns.delete(turn.promptId);
|
|
274
|
+
}
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
247
277
|
turns.set(turn.promptId ?? `line:${lineNo}`, readTurn(turn.usage));
|
|
248
278
|
}
|
|
249
279
|
}
|
|
250
280
|
finally {
|
|
251
281
|
rl.close();
|
|
252
282
|
}
|
|
283
|
+
if (unrecognised > 0) {
|
|
284
|
+
// One entry per stream: a changed format hits every turn in the file, and
|
|
285
|
+
// an entry each would bury everything else a scan has to report.
|
|
286
|
+
errors.push({
|
|
287
|
+
cliId: CLI_ID,
|
|
288
|
+
filePath,
|
|
289
|
+
message: `${unrecognised} completed turn(s) carried a usage record with no recognisable token or call counter — Grok Build's stream format has likely changed`,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
253
292
|
let prev;
|
|
254
293
|
for (const turn of turns.values()) {
|
|
255
294
|
const delta = prev !== undefined && continuesRun(prev, turn)
|
|
@@ -307,7 +346,7 @@ export async function createGrokReader() {
|
|
|
307
346
|
if (cutoff !== undefined && (await stat(file)).mtimeMs < cutoff) {
|
|
308
347
|
continue;
|
|
309
348
|
}
|
|
310
|
-
await foldStream(file, totals, unpriced);
|
|
349
|
+
await foldStream(file, totals, unpriced, errors);
|
|
311
350
|
filesScanned += 1;
|
|
312
351
|
}
|
|
313
352
|
catch (error) {
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
* therefore the complete record of what Hermes actually sent to a provider,
|
|
28
28
|
* and this reader sums them. The `sessions` aggregate is read only for a
|
|
29
29
|
* session that has no usage rows at all (a store older than the migration
|
|
30
|
-
* that introduced the table), and never in addition to them.
|
|
30
|
+
* that introduced the table), and never in addition to them. A usage table
|
|
31
|
+
* that exists but lacks a required column is a changed schema, and is reported
|
|
32
|
+
* rather than read around.
|
|
31
33
|
*
|
|
32
34
|
* Cost: Hermes records `estimated_cost_usd` with a `cost_status` of
|
|
33
35
|
* `estimated`, from its own pricing snapshot. That is a modeled figure and is
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
* therefore the complete record of what Hermes actually sent to a provider,
|
|
28
28
|
* and this reader sums them. The `sessions` aggregate is read only for a
|
|
29
29
|
* session that has no usage rows at all (a store older than the migration
|
|
30
|
-
* that introduced the table), and never in addition to them.
|
|
30
|
+
* that introduced the table), and never in addition to them. A usage table
|
|
31
|
+
* that exists but lacks a required column is a changed schema, and is reported
|
|
32
|
+
* rather than read around.
|
|
31
33
|
*
|
|
32
34
|
* Cost: Hermes records `estimated_cost_usd` with a `cost_status` of
|
|
33
35
|
* `estimated`, from its own pricing snapshot. That is a modeled figure and is
|
|
@@ -235,7 +237,19 @@ function readStore(db, dbPath, cutoffSeconds, totals, unpriced, errors) {
|
|
|
235
237
|
return;
|
|
236
238
|
}
|
|
237
239
|
const usageCols = columnsOf(db, "session_model_usage");
|
|
238
|
-
const
|
|
240
|
+
const missingUsage = USAGE_REQUIRED.filter((c) => !usageCols.has(c));
|
|
241
|
+
if (usageCols.size > 0 && missingUsage.length > 0) {
|
|
242
|
+
// Fail closed, for the same reason as above. The table exists, so this is
|
|
243
|
+
// not a store older than the migration; falling back to the sessions
|
|
244
|
+
// aggregate would silently drop every non-primary task.
|
|
245
|
+
errors.push({
|
|
246
|
+
cliId: CLI_ID,
|
|
247
|
+
filePath: dbPath,
|
|
248
|
+
message: `session_model_usage table lacks required column(s) ${missingUsage.join(", ")} — Hermes' schema has changed`,
|
|
249
|
+
});
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const hasUsage = usageCols.size > 0;
|
|
239
253
|
// Last activity, in seconds. Sessions know theirs; usage rows fall back to
|
|
240
254
|
// their session's when they carry no `last_seen` of their own.
|
|
241
255
|
const sessionAt = [
|
|
@@ -242,7 +242,7 @@ export class LiteLLMProvider extends OpenAIChatCompletionsProvider {
|
|
|
242
242
|
return (process.env.LITELLM_FALLBACK_MODELS?.split(",")
|
|
243
243
|
.map((m) => m.trim())
|
|
244
244
|
.filter((m) => m.length > 0) || [
|
|
245
|
-
"openai/gpt-
|
|
245
|
+
"openai/gpt-5.4",
|
|
246
246
|
"anthropic/claude-haiku-4-5-20251001",
|
|
247
247
|
"meta-llama/llama-3.1-8b-instruct",
|
|
248
248
|
"google/gemini-2.5-flash",
|
|
@@ -3493,11 +3493,11 @@
|
|
|
3493
3493
|
{"objectID":"062ba86ed5fa937d989ef36219f6bc4d2673654750f6c4fbfee623527282bc03","title":"From Previous Implementations","url":"/docs/features/guardrails-implementation#from-previous-implementations","content":"If upgrading from older guardrail implementations:\nUpdate configuration format to new interfaces\nReplace deprecated methods with new utility functions\nTest evaluation thresholds and adjust as needed\nUpdate error handling to use new patterns","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Implementation Guide","lvl2":"From Previous Implementations","lvl3":""}},
|
|
3494
3494
|
{"objectID":"1d4cfe18f157b91540119afedbf464d626c2c320e56551b69d5b3f853541e3c4","title":"Breaking Changes","url":"/docs/features/guardrails-implementation#breaking-changes","content":"Configuration structure has been updated for better organization\nSome utility function signatures have changed\nError handling patterns have been improved","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Implementation Guide","lvl2":"Breaking Changes","lvl3":""}},
|
|
3495
3495
|
{"objectID":"214fe14d9f320f468b5ed10d5b5cf315a7aa2a0fcb1a32598f42a622570e177d","title":"Conclusion","url":"/docs/features/guardrails-implementation#conclusion","content":"The NeuroLink guardrails implementation provides comprehensive content safety and filtering capabilities with:\n✅ AI-powered pre-call evaluation\n✅ Flexible content filtering options\n✅ Configurable response actions\n✅ Visual proof and demonstrations\n✅ High performance and scalability\n✅ Comprehensive error handling\n✅ TypeScript support throughout\n\nFor additional support or questions, refer to the main NeuroLink documentation or create an issue in the repository.","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Implementation Guide","lvl2":"Conclusion","lvl3":""}},
|
|
3496
|
-
{"objectID":"540c47bd7c6e059a9673d6acb056728c913d14a87db9e96c85e9ad17847af52d","title":"Guardrails Middleware","url":"/docs/features/guardrails","content":"Guardrails Middleware\n\nSince: v7.42.0 | Status: Stable | Availability: SDK (CLI + SDK)\n\nOverview\n\nWhat it does: Guardrails middleware provides real-time content filtering and policy enforcement for AI model outputs, blocking profanity, PII, unsafe content, and custom-defined terms.\n\nWhy use it: Protect your application from generating harmful, inappropriate, or non-compliant content. Ensures AI responses meet safety standards and regulatory requirements.\n\nCommon use cases:\nContent moderation for user-facing applications\nPII (Personally Identifiable Information) redaction\nProfanity filtering for family-friendly apps\nCompliance with industry regulations (COPPA, GDPR, etc.)\nBrand safety and reputation management\n\nQuick Start\n\nGuardrails work out of the box with the security preset. No custom configuration required for basic content filtering.\n\nSDK Example with Security Preset\nEnables guardrails middleware with default configuration\
|
|
3496
|
+
{"objectID":"540c47bd7c6e059a9673d6acb056728c913d14a87db9e96c85e9ad17847af52d","title":"Guardrails Middleware","url":"/docs/features/guardrails","content":"Guardrails Middleware\n\nSince: v7.42.0 | Status: Stable | Availability: SDK (CLI + SDK)\n\nOverview\n\nWhat it does: Guardrails middleware provides real-time content filtering and policy enforcement for AI model outputs, blocking profanity, PII, unsafe content, and custom-defined terms.\n\nWhy use it: Protect your application from generating harmful, inappropriate, or non-compliant content. Ensures AI responses meet safety standards and regulatory requirements.\n\nCommon use cases:\nContent moderation for user-facing applications\nPII (Personally Identifiable Information) redaction\nProfanity filtering for family-friendly apps\nCompliance with industry regulations (COPPA, GDPR, etc.)\nBrand safety and reputation management\n\nQuick Start\n\nGuardrails work out of the box with the security preset. No custom configuration required for basic content filtering.\n\nSDK Example with Security Preset\nEnables guardrails middleware with default configuration\nPass middleware on every call that should be filtered; the NeuroLink constructor does not take this option\nContent is already filtered - safe to display to users\n\nCustom Guardrails Configuration\nMaster switch for guardrails middleware\nEnable keyword-based filtering (fast, regex-based)\nCustom terms to filter/redact from outputs\nEnable AI-powered content safety check (slower, more accurate)\nUse fast, cheap model for safety evaluation\n\nCLI Usage\n\nConfiguration\n\n| Option | Type | Default | Required | Description |\n| ------------------------- | ---------- | ------- | -------- | ------------------------------------ |\n| enabled | boolean | true | No | Enable/disable guardrails middleware |\n| badWords.enabled | boolean | false | No | Enable keyword-based filtering |\n| badWords.list | string[] | [] | No | List of terms to filter/redact |\n| modelFilter.enabled | boolean | false | No | Enable AI-based content safety check |\n| modelFilter.filterModel | string | - | No | Model to use for safety evaluation |\n\nEnvironment Variables\n\nConfig File\n\nHow It Works\n\nFiltering Pipeline\nUser prompt → Sent to AI model\nAI generates response → Initial content created\nGuardrails middleware intercepts:\nBad word filtering: Regex-based term replacement\nModel-based filtering: AI evaluates content safety\nFiltered response → Delivered to user\n\nBad Word Filtering\n\nSimple regex-based replacement:\nCase-insensitive matching\nReplaces with asterisks (*) of equal length\nWorks in both generate and stream modes\n\nModel-Based Filtering\n\nWhile guardrails filter common PII patterns, always review critical outputs manually. False negatives can occur with obfuscated data or uncommon PII formats. For high-stakes compliance, combine with dedicated PII detection services.\n\nAI-powered safety check:\nUses separate, lightweight model (e.g., gpt-4o-mini)\nBinary safe/unsafe classification\nFull redaction on unsafe detection\n\nAdvanced Usage\n\nCombining with Other Middleware\n\nStreaming with Guardrails\n\nDynamic Guardrails\n\nAPI Reference\n\nMiddleware Configuration\npreset: \"security\" → Enables guardrails with defaults\npreset: \"all\" → Enables guardrails + all other middleware\nmiddlewareConfig.guardrails → Custom guardrails configuration\n\nSee guardrails-ai-integration.md for complete integration guide.\n\nTroubleshooting\n\nProblem: Guardrails not filtering content\n\nCause: Middleware not enabled or preset not configured\nSolution:\n\nProblem: Too many false positives (legitimate content filtered)\n\nCause: Overly aggressive bad word list\nSolution:\n\nProblem: Model-based filter is slow\n\nCause: Using large/expensive model for filtering\nSolution:\n\nProblem: Guardrails not working in streaming mode\n\nCause: Streaming guardrails only support bad word filtering (not model-based)\nSolution:\n\nBest Practices\n\nContent Filtering Strategy\nStart with presets - Use preset: \"security\" as baseline\nLayer protections - Combine bad words + model filtering\nUse lightweight filter models - gpt-4o-mini for speed\nTest thoroughly - Verify filtering doesn't break legitimate content\nMonitor and iterate - Track false positives/negatives\n\nBad Word List Curation\n\n✅ Do:\nInclude specific harmful terms\nUse exact phrases, not single characters\nRegularly update based on user reports\nConsider context-specific terms for your domain\n\n❌ Don't:\nAdd common English words (high false positive rate)\nInclude single letters or short words\nRely solely on bad words (use model filter too)\n\nPerformance Optimization\n\nCompliance Use Cases\n\nCOPPA (Children's Online Privacy)\n\nGDPR Data Protection\n\nRelated Features\nHITL Workflows - User approval for risky actions\nMiddleware Architecture - Custom middleware development\nAnalytics Integration - Track filtered content metrics\n\nMigration Notes\n\nIf upgrading from versions before v7.42.0:\nGuardrails are now enabled via middleware presets\nOld guardrailsConfig option deprecated - use middlewareConfig.guardrails\nNo breaking changes ","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"","lvl3":""}},
|
|
3497
3497
|
{"objectID":"ad4c8c0e011c259d8f444afec90c94a3c939d9f14e65491e8044a8417430b54c","title":"Guardrails Middleware","url":"/docs/features/guardrails#guardrails-middleware","content":"Since: v7.42.0 | Status: Stable | Availability: SDK (CLI + SDK)","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"Guardrails Middleware","lvl3":""}},
|
|
3498
3498
|
{"objectID":"1ecba9f0cdb3586cf8ad53bba31fb80cabab7aed2aba88050b4f98078dd2bec9","title":"Overview","url":"/docs/features/guardrails#overview","content":"What it does: Guardrails middleware provides real-time content filtering and policy enforcement for AI model outputs, blocking profanity, PII, unsafe content, and custom-defined terms.\n\nWhy use it: Protect your application from generating harmful, inappropriate, or non-compliant content. Ensures AI responses meet safety standards and regulatory requirements.\n\nCommon use cases:\nContent moderation for user-facing applications\nPII (Personally Identifiable Information) redaction\nProfanity filtering for family-friendly apps\nCompliance with industry regulations (COPPA, GDPR, etc.)\nBrand safety and reputation management","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"Overview","lvl3":""}},
|
|
3499
3499
|
{"objectID":"064824951ceeb2f827852673ce43e1d5b0a4776cda59dec766413ea3ea1a41ae","title":"Quick Start","url":"/docs/features/guardrails#quick-start","content":"Guardrails work out of the box with the security preset. No custom configuration required for basic content filtering.","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"Quick Start","lvl3":""}},
|
|
3500
|
-
{"objectID":"95afe6ceda57115c0508134d07f22b3d8ca5fa5f064adacafde697b1e97a1f49","title":"SDK Example with Security Preset","url":"/docs/features/guardrails#sdk-example-with-security-preset","content":"Enables guardrails middleware with default configuration\
|
|
3500
|
+
{"objectID":"95afe6ceda57115c0508134d07f22b3d8ca5fa5f064adacafde697b1e97a1f49","title":"SDK Example with Security Preset","url":"/docs/features/guardrails#sdk-example-with-security-preset","content":"Enables guardrails middleware with default configuration\nPass middleware on every call that should be filtered; the NeuroLink constructor does not take this option\nContent is already filtered - safe to display to users","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"SDK Example with Security Preset","lvl3":""}},
|
|
3501
3501
|
{"objectID":"b4fbe7f14d6486c89e71170dde75c0aac0a463e7146d3505542a389e27177987","title":"Custom Guardrails Configuration","url":"/docs/features/guardrails#custom-guardrails-configuration","content":"Master switch for guardrails middleware\nEnable keyword-based filtering (fast, regex-based)\nCustom terms to filter/redact from outputs\nEnable AI-powered content safety check (slower, more accurate)\nUse fast, cheap model for safety evaluation","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"Custom Guardrails Configuration","lvl3":""}},
|
|
3502
3502
|
{"objectID":"c8521792297f968b1ed06d4d84924590f9453bb688d0511d82b24e8cb807d1d4","title":"CLI Usage","url":"/docs/features/guardrails#cli-usage","content":"`bash","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"CLI Usage","lvl3":""}},
|
|
3503
3503
|
{"objectID":"db6d627e8bf12acc503a42180b82237d38b98a34bf4b5c6427110388ba783598","title":"Enable guardrails via environment variable","url":"/docs/features/guardrails#enable-guardrails-via-environment-variable","content":"npx @juspay/neurolink generate \"Write a product description\" --enable-analytics","hierarchy":{"lvl0":"Features","lvl1":"Guardrails Middleware","lvl2":"Enable guardrails via environment variable","lvl3":""}},
|
|
@@ -7806,7 +7806,7 @@
|
|
|
7806
7806
|
{"objectID":"4e625e9030f4ea5fefc5b7d84590c608e6ba446d7d4b99f1cb1ba251e7f977bc","title":"Tool Not Available","url":"/docs/guides/mcp/server-catalog#tool-not-available","content":"Problem: AI can't see MCP tools.\n\nSolution:","hierarchy":{"lvl0":"Guides","lvl1":"MCP Server Catalog","lvl2":"Tool Not Available","lvl3":""}},
|
|
7807
7807
|
{"objectID":"6d2d4fa3bbc54b540d933545bf408ed8aedbf14464bcc106ba3aa99ef10b3eeb","title":"Related Documentation","url":"/docs/guides/mcp/server-catalog#related-documentation","content":"MCP Integration Guide - Detailed MCP setup\nCustom Tools - Create and use custom MCP servers\nSecurity - MCP security best practices","hierarchy":{"lvl0":"Guides","lvl1":"MCP Server Catalog","lvl2":"Related Documentation","lvl3":""}},
|
|
7808
7808
|
{"objectID":"16b53f447a7f270153e21177c8452dc74b51e8a2b9ace9b9dfa8aa2fb06c5eae","title":"Additional Resources","url":"/docs/guides/mcp/server-catalog#additional-resources","content":"MCP Specification - Official protocol spec\nMCP GitHub - Source code\nServer Registry - Official servers\nCommunity Servers - Community contributions\n\nNeed Help? Join our GitHub Discussions or open an issue.","hierarchy":{"lvl0":"Guides","lvl1":"MCP Server Catalog","lvl2":"Additional Resources","lvl3":""}},
|
|
7809
|
-
{"objectID":"4e74c1e4ff68211a2a065ab2d47fe95bc680df578aa09601cb90da05a15f41b9","title":"Migrating from LangChain to NeuroLink","url":"/docs/guides/migration/from-langchain","content":"Migrating from LangChain to NeuroLink\n\nWhy Migrate?\n\nNeuroLink offers a simpler, more production-ready alternative to LangChain with these key advantages:\n\n| Benefit | LangChain | NeuroLink |\n| ----------------------- | ------------------------------------------- | -------------------------------------------------- |\n| TypeScript Support | Partial, many type issues | Full native TypeScript, complete type safety |\n| API Complexity | Complex chains, agents, memory abstractions | Single unified generate() API |\n| Provider Support | Requires separate packages | Supported providers built in, one package |\n| Enterprise Features | Limited | HITL workflows, Redis memory, middleware, failover |\n| MCP Integration | None | Native 58+ MCP servers with zero config |\n| Bundle Size | Large (many dependencies) | Optimized, tree-shakeable |\n| Production Ready | Community-driven | In production use at Juspay |\n\nMigration time: Most applications can migrate in 1-2 hours, with full feature parity and improved capabilities.\n\nConcept Mapping\n\nUnderstanding how LangChain concepts map to NeuroLink:\n\n| LangChain Concept | NeuroLink Equivalent | Notes |\n| ----------------------------------- | --------------------------- | -------------------------------- |\n| ChatOpenAI, ChatAnthropic, etc. | provider parameter | Single unified interface |\n| LLMChain | generate() method | No chain abstraction needed |\n| ConversationChain | conversationMemory config | Built-in conversation tracking |\n| Agent + Tools | MCP Tools | Native tool support, 58+ servers |\n| Memory (BufferMemory, etc.) | conversationMemory | Redis or in-memory |\n| Callbacks | Middleware system | More powerful, composable |\n| VectorStoreRetriever | Custom tools + external MCP | Use MCP for RAG integrations |\n| OutputParser | structuredOutput | Zod schema validation |\n| PromptTemplate | Template literals / utils | Use native JS/TS patterns |\n\nQuick Start Migration\n\nBefore (LangChain)\n\nAfter (NeuroLink)\n\nKey changes:\nSingle import instead of multiple\nUnified generate() method instead of call()\nSimpler message format (no HumanMessage wrapper)\nType-safe result with content property\n\nFeature-by-Feature Migration\nChat Models\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nNo separate packages for each provider\nConsistent API across supported providers\nRuntime provider switching\nAutomatic failover\nChains\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nNo chain abstraction needed\nUse native JavaScript template literals\nMore flexible, easier to debug\nDirect control over prompts\nAgents and Tools\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\n6 core tools work out-of-the-box (no setup)\n58+ MCP servers available\nNo complex agent configuration\nAI automatically chooses tools\nMemory\n\nLangChain:\n\nNeuroLink:\n\nWith Redis (production):\n\nBenefits:\nBuilt-in conversation tracking\nRedis support for distributed systems\nAutomatic context management\nExport conversations to JSON\nCallbacks\n\nLangChain:\n\nNeuroLink:\n\nBuilt-in middleware:\n\nBenefits:\nMore powerful than callbacks\nComposable middleware system\nBuilt-in analytics and auto-evaluation\nRequest and response hooks\n\nCommon Patterns\n\nPattern 1: RAG Applications\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nUse MCP for database/vector integrations\nMore flexible retrieval strategies\nDirect control over context injection\n\nPattern 2: Chatbots\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nRedis support for multi-instance deployments\nAutomatic context windowing\nExport conversations for analytics\nBuilt-in conversation management\n\nPattern 3: Multi-step Workflows\n\nLangChain:\n\nNeuroLink:\n\nWith orchestration:\n\nBenefits:\nExplicit control over workflow\nEasier to debug and test\nCan use conversation memory for context\nMore flexible than rigid chains\n\nStreaming\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nSimpler streaming API\nConsistent streaming API across supported providers\nBuilt-in error handling\n\nStructured Output\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nBuilt-in Zod schema validation\nType-safe results\nAutomatic JSON parsing\nNo manual parsing needed\n\nGotchas and Differences\nMessage
|
|
7809
|
+
{"objectID":"4e74c1e4ff68211a2a065ab2d47fe95bc680df578aa09601cb90da05a15f41b9","title":"Migrating from LangChain to NeuroLink","url":"/docs/guides/migration/from-langchain","content":"Migrating from LangChain to NeuroLink\n\nWhy Migrate?\n\nNeuroLink offers a simpler, more production-ready alternative to LangChain with these key advantages:\n\n| Benefit | LangChain | NeuroLink |\n| ----------------------- | ------------------------------------------- | -------------------------------------------------- |\n| TypeScript Support | Partial, many type issues | Full native TypeScript, complete type safety |\n| API Complexity | Complex chains, agents, memory abstractions | Single unified generate() API |\n| Provider Support | Requires separate packages | Supported providers built in, one package |\n| Enterprise Features | Limited | HITL workflows, Redis memory, middleware, failover |\n| MCP Integration | None | Native 58+ MCP servers with zero config |\n| Bundle Size | Large (many dependencies) | Optimized, tree-shakeable |\n| Production Ready | Community-driven | In production use at Juspay |\n\nMigration time: Most applications can migrate in 1-2 hours, with full feature parity and improved capabilities.\n\nConcept Mapping\n\nUnderstanding how LangChain concepts map to NeuroLink:\n\n| LangChain Concept | NeuroLink Equivalent | Notes |\n| ----------------------------------- | --------------------------- | -------------------------------- |\n| ChatOpenAI, ChatAnthropic, etc. | provider parameter | Single unified interface |\n| LLMChain | generate() method | No chain abstraction needed |\n| ConversationChain | conversationMemory config | Built-in conversation tracking |\n| Agent + Tools | MCP Tools | Native tool support, 58+ servers |\n| Memory (BufferMemory, etc.) | conversationMemory | Redis or in-memory |\n| Callbacks | Middleware system | More powerful, composable |\n| VectorStoreRetriever | Custom tools + external MCP | Use MCP for RAG integrations |\n| OutputParser | structuredOutput | Zod schema validation |\n| PromptTemplate | Template literals / utils | Use native JS/TS patterns |\n\nQuick Start Migration\n\nBefore (LangChain)\n\nAfter (NeuroLink)\n\nKey changes:\nSingle import instead of multiple\nUnified generate() method instead of call()\nSimpler message format (no HumanMessage wrapper)\nType-safe result with content property\n\nFeature-by-Feature Migration\nChat Models\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nNo separate packages for each provider\nConsistent API across supported providers\nRuntime provider switching\nAutomatic failover\nChains\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nNo chain abstraction needed\nUse native JavaScript template literals\nMore flexible, easier to debug\nDirect control over prompts\nAgents and Tools\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\n6 core tools work out-of-the-box (no setup)\n58+ MCP servers available\nNo complex agent configuration\nAI automatically chooses tools\nMemory\n\nLangChain:\n\nNeuroLink:\n\nWith Redis (production):\n\nBenefits:\nBuilt-in conversation tracking\nRedis support for distributed systems\nAutomatic context management\nExport conversations to JSON\nCallbacks\n\nLangChain:\n\nNeuroLink:\n\nBuilt-in middleware:\n\nautoEvaluation scores each response with a judge model, which defaults to Vertex, so this call fails without Google credentials. Point the judge at a provider you have with config: { provider: \"openai\" } under autoEvaluation, or set blocking: false to let the call succeed when the judge fails.\n\nBenefits:\nMore powerful than callbacks\nComposable middleware system\nBuilt-in analytics and auto-evaluation\nRequest and response hooks\n\nCommon Patterns\n\nPattern 1: RAG Applications\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nUse MCP for database/vector integrations\nMore flexible retrieval strategies\nDirect control over context injection\n\nPattern 2: Chatbots\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nRedis support for multi-instance deployments\nAutomatic context windowing\nExport conversations for analytics\nBuilt-in conversation management\n\nPattern 3: Multi-step Workflows\n\nLangChain:\n\nNeuroLink:\n\nWith orchestration:\n\nBenefits:\nExplicit control over workflow\nEasier to debug and test\nCan use conversation memory for context\nMore flexible than rigid chains\n\nStreaming\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nSimpler streaming API\nConsistent streaming API across supported providers\nBuilt-in error handling\n\nStructured Output\n\nLangChain:\n\nNeuroLink:\n\nBenefits:\nBuilt-in Zod schema validation\nType-safe results\nAutomatic JSON parsing\nNo manual parsing needed\n\nGotchas and Differences\nMessage For","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"","lvl3":""}},
|
|
7810
7810
|
{"objectID":"a48bbe2942ddb17ff0becb164f308f631fa2cb15ff71defc2a8efa2e759601a3","title":"Why Migrate?","url":"/docs/guides/migration/from-langchain#why-migrate","content":"NeuroLink offers a simpler, more production-ready alternative to LangChain with these key advantages:\n\n| Benefit | LangChain | NeuroLink |\n| ----------------------- | ------------------------------------------- | -------------------------------------------------- |\n| TypeScript Support | Partial, many type issues | Full native TypeScript, complete type safety |\n| API Complexity | Complex chains, agents, memory abstractions | Single unified generate() API |\n| Provider Support | Requires separate packages | Supported providers built in, one package |\n| Enterprise Features | Limited | HITL workflows, Redis memory, middleware, failover |\n| MCP Integration | None | Native 58+ MCP servers with zero config |\n| Bundle Size | Large (many dependencies) | Optimized, tree-shakeable |\n| Production Ready | Community-driven | In production use at Juspay |\n\nMigration time: Most applications can migrate in 1-2 hours, with full feature parity and improved capabilities.","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"Why Migrate?","lvl3":""}},
|
|
7811
7811
|
{"objectID":"577449cc99d461284c8c0b170d17bca277a1c8902b814a0c4c23a0ed7ec0d97a","title":"Concept Mapping","url":"/docs/guides/migration/from-langchain#concept-mapping","content":"Understanding how LangChain concepts map to NeuroLink:\n\n| LangChain Concept | NeuroLink Equivalent | Notes |\n| ----------------------------------- | --------------------------- | -------------------------------- |\n| ChatOpenAI, ChatAnthropic, etc. | provider parameter | Single unified interface |\n| LLMChain | generate() method | No chain abstraction needed |\n| ConversationChain | conversationMemory config | Built-in conversation tracking |\n| Agent + Tools | MCP Tools | Native tool support, 58+ servers |\n| Memory (BufferMemory, etc.) | conversationMemory | Redis or in-memory |\n| Callbacks | Middleware system | More powerful, composable |\n| VectorStoreRetriever | Custom tools + external MCP | Use MCP for RAG integrations |\n| OutputParser | structuredOutput | Zod schema validation |\n| PromptTemplate | Template literals / utils | Use native JS/TS patterns |","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"Concept Mapping","lvl3":""}},
|
|
7812
7812
|
{"objectID":"88a2415a8665ffb48e4aa61b4bfe5038b9058d71d57d7dfefdcae9926279ea2d","title":"After (NeuroLink)","url":"/docs/guides/migration/from-langchain#after-neurolink","content":"Key changes:\nSingle import instead of multiple\nUnified generate() method instead of call()\nSimpler message format (no HumanMessage wrapper)\nType-safe result with content property","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"After (NeuroLink)","lvl3":""}},
|
|
@@ -7814,7 +7814,7 @@
|
|
|
7814
7814
|
{"objectID":"87ed2004761c0ac3f520eefcb0d6e3b9f4b3b6e8590a2b7ac77201de056c2d7a","title":"2. Chains","url":"/docs/guides/migration/from-langchain#2-chains","content":"LangChain:\n\nNeuroLink:\n\nBenefits:\nNo chain abstraction needed\nUse native JavaScript template literals\nMore flexible, easier to debug\nDirect control over prompts","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"2. Chains","lvl3":""}},
|
|
7815
7815
|
{"objectID":"dc52896ae97fa9f660e3fb62286c58c304440af383736dde467399d1f7adda39","title":"3. Agents and Tools","url":"/docs/guides/migration/from-langchain#3-agents-and-tools","content":"LangChain:\n\nNeuroLink:\n\nBenefits:\n6 core tools work out-of-the-box (no setup)\n58+ MCP servers available\nNo complex agent configuration\nAI automatically chooses tools","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"3. Agents and Tools","lvl3":""}},
|
|
7816
7816
|
{"objectID":"caf9522e06a3e9cb5bc8259e003d905389fb74982b7791849a6b338b28ef9d16","title":"4. Memory","url":"/docs/guides/migration/from-langchain#4-memory","content":"LangChain:\n\nNeuroLink:\n\nWith Redis (production):\n\nBenefits:\nBuilt-in conversation tracking\nRedis support for distributed systems\nAutomatic context management\nExport conversations to JSON","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"4. Memory","lvl3":""}},
|
|
7817
|
-
{"objectID":"2fd66e40f14ccffc7cf949ff5a6fa4645add3ad9f2e97fbf8637fa93b6a1149b","title":"5. Callbacks","url":"/docs/guides/migration/from-langchain#5-callbacks","content":"LangChain:\n\nNeuroLink:\n\nBuilt-in middleware:\n\nBenefits:\nMore powerful than callbacks\nComposable middleware system\nBuilt-in analytics and auto-evaluation\nRequest and response hooks","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"5. Callbacks","lvl3":""}},
|
|
7817
|
+
{"objectID":"2fd66e40f14ccffc7cf949ff5a6fa4645add3ad9f2e97fbf8637fa93b6a1149b","title":"5. Callbacks","url":"/docs/guides/migration/from-langchain#5-callbacks","content":"LangChain:\n\nNeuroLink:\n\nBuilt-in middleware:\n\nautoEvaluation scores each response with a judge model, which defaults to Vertex, so this call fails without Google credentials. Point the judge at a provider you have with config: { provider: \"openai\" } under autoEvaluation, or set blocking: false to let the call succeed when the judge fails.\n\nBenefits:\nMore powerful than callbacks\nComposable middleware system\nBuilt-in analytics and auto-evaluation\nRequest and response hooks","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"5. Callbacks","lvl3":""}},
|
|
7818
7818
|
{"objectID":"0ba8b00a515703e5a305e59c4599a53284b23bd566124629859c0a424603b20a","title":"Pattern 1: RAG Applications","url":"/docs/guides/migration/from-langchain#pattern-1-rag-applications","content":"LangChain:\n\nNeuroLink:\n\nBenefits:\nUse MCP for database/vector integrations\nMore flexible retrieval strategies\nDirect control over context injection","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"Pattern 1: RAG Applications","lvl3":""}},
|
|
7819
7819
|
{"objectID":"e7b879ef1d9410960e6b330ffdd930baee5730e693c3850961d4dde1b250dbf5","title":"Pattern 2: Chatbots","url":"/docs/guides/migration/from-langchain#pattern-2-chatbots","content":"LangChain:\n\nNeuroLink:\n\nBenefits:\nRedis support for multi-instance deployments\nAutomatic context windowing\nExport conversations for analytics\nBuilt-in conversation management","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"Pattern 2: Chatbots","lvl3":""}},
|
|
7820
7820
|
{"objectID":"22f85c21288e70d58eade9cf05ca318566866fd9274d03b7ec30c03f8088a9a8","title":"Pattern 3: Multi-step Workflows","url":"/docs/guides/migration/from-langchain#pattern-3-multi-step-workflows","content":"LangChain:\n\nNeuroLink:\n\nWith orchestration:\n\nBenefits:\nExplicit control over workflow\nEasier to debug and test\nCan use conversation memory for context\nMore flexible than rigid chains","hierarchy":{"lvl0":"Guides","lvl1":"Migrating from LangChain to NeuroLink","lvl2":"Pattern 3: Multi-step Workflows","lvl3":""}},
|
|
@@ -9610,7 +9610,7 @@
|
|
|
9610
9610
|
{"objectID":"6bfda42431fee55d45b08f169983782641ed449c8f73abe19f2f3c421f8666cb","title":"Credential-free provider acceptance gate","url":"/docs/provider-integration/acceptance-gate#credential-free-provider-acceptance-gate","content":"Suite: test/continuous-test-suite-acceptance-gate.ts\nRun: pnpm run test:acceptance-gate\nScript: test:acceptance-gate in package.json\nMock server: test/helpers/acceptanceGateServer.ts","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"Credential-free provider acceptance gate","lvl3":""}},
|
|
9611
9611
|
{"objectID":"3ebd78a77f6b62003d9706d1608fb7eded2399f0dbd78b3964e14d5ac3d31f90","title":"Why this exists","url":"/docs/provider-integration/acceptance-gate#why-this-exists","content":"The prior full provider capability matrix (test/continuous-test-suite-provider-matrix.ts,\n1,037 cells) was audited and found to be able to report green without proving\nanything, in at least 10 ways: tool cells that passed with zero tool calls\nmade, no disableInternalFallback and no provider/model identity check on\nany cell, structured-output cells that asserted a value's type rather than\nits contents, and a harness that could exit 0 on zero coverage.\n\nThis gate replaces that surface area with a small, falsifiable one: at most\n9 cells per (provider, pinned model), fail-fast, cheapest first, run\nentirely against a local mock vendor HTTP server — no real vendor calls, no\nreal API keys, ever. Every provider is pointed at the mock through its own\ndocumented base-URL environment override, with a fake key, so the SDK and\nthe CLI both round-trip through the exact same server (that's what makes\ncell 9, CLI parity, meaningful instead of a re-derivation).","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"Why this exists","lvl3":""}},
|
|
9612
9612
|
{"objectID":"0d725f9afdd86b7d8821e0e94ea518e7d06ef55da79a6781a8c9b96d17125ed8","title":"The 9 cells","url":"/docs/provider-integration/acceptance-gate#the-9-cells","content":"Each cell asserts an exact value the mock server returns, never a shape\nor a \"non-empty\" check. A row stops (remaining cells report SKIP, not a\nsecond FAIL) the first time a cell genuinely fails — this is the\n\"fail-fast\" contract; a capability-gated skip (e.g. a provider that doesn't\ndeclare tools) never counts as a failure and never poisons the rest of the\nrow.\nIdentity pin — every call carries\n { provider, model, disableInternalFallback: true }; the result's\n provider and model fields are asserted against what was requested.\nExact-output generate — generate()'s content is asserted equal to\n a specific constant (GATE_EXACT_VALUE), not merely non-empty.\nDrained stream, identity asserted — the stream is fully drained and\n the accumulated content is asserted equal to a constant. The\n StreamResult's provider/model are then asserted — and for the\n OpenAI-compatible protocol rows, against what the mock server actually\n served (${model}::mock-server-resolved), not what was requested. See\n \"The stream-identity defect\" below — this cell is the reason that defect\n was caught and fixed.\nTool-nonce proof — the test tool's execute() returns a fresh\n randomUUID() nonce that exists nowhere else. The final answer is\n asserted to contain ACCEPTANCE_GATE_TOOL_CONFIRMED:<nonce>, which the\n mock server only emits once it sees that exact nonce echoed back in a\n tool-result message — i.e. the assertion can only pass if a real tool\n call round-tripped through the model.\nStructured-exact — generate({ schema })'s parsed structuredData is\n asserted equal (via JSON.stringify) to an exact object, and\n jsonTruncated is asserted not true — truncation is surfaced, never\n silently swallowed.\nThinking proof — only for providers whose catalog/descriptor declares\n thinking: true (currently anthropic and the deepseek catalog row).\n Drives stream() with an explicit\n thinkingConfig: { enabled: true, budgetTokens: 2048 } (the SDK path has no bare thinkingLevel\n ","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"The 9 cells","lvl3":""}},
|
|
9613
|
-
{"objectID":"9e86b70c4ede7dc96da001ab3bf0327c39f525d7d1c62279bcf34ae41f54229a","title":"Known, documented gap in cell 9","url":"/docs/provider-integration/acceptance-gate#known-documented-gap-in-cell-9","content":"The CLI's generate/stream commands have no flag that reaches\ndisableInternalFallback — commandFactory.ts's processOptions()\nwhitelist omits it (only the interactive REPL's separate options schema\nsupports it). Cell 9 therefore runs without disableInternalFallback. This\nis an intentional, documented gap, not an oversight: fixing it is a CLI\noption-surface change out of scope for this gate.\n\nWhat keeps the gap harmless is that the suite holds no real credential to\nfall back to. test/helpers/credentialFreeEnv.ts is its first import: it\npoints DOTENV_CONFIG_PATH at /dev/null, so neither the SDK's nor the\nharness's .env load reads a developer's .env, it deletes every\ncredential-named variable the shell exported, and it points HOME at an
|
|
9613
|
+
{"objectID":"9e86b70c4ede7dc96da001ab3bf0327c39f525d7d1c62279bcf34ae41f54229a","title":"Known, documented gap in cell 9","url":"/docs/provider-integration/acceptance-gate#known-documented-gap-in-cell-9","content":"The CLI's generate/stream commands have no flag that reaches\ndisableInternalFallback — commandFactory.ts's processOptions()\nwhitelist omits it (only the interactive REPL's separate options schema\nsupports it). Cell 9 therefore runs without disableInternalFallback. This\nis an intentional, documented gap, not an oversight: fixing it is a CLI\noption-surface change out of scope for this gate.\n\nWhat keeps the gap harmless is that the suite holds no real credential to\nfall back to. test/helpers/credentialFreeEnv.ts is its first import: it\npoints DOTENV_CONFIG_PATH at /dev/null, so neither the SDK's nor the\nharness's .env load reads a developer's .env, it deletes every\ncredential-named variable the shell exported (including secrets whose names the\nplain API-key and token words miss: service-account and private keys, speech\nkeys, OTLP exporter headers, a Redis URL, an auth config blob, the ssh-agent\nsocket) together with the ambient *_BASE_URL, *_ENDPOINT,\nOTLP exporter and AWS_PROFILE overrides that could point a cell somewhere\nother than the mock server, and it points HOME at an empty temp directory.\nThe last one matters as much as the first two: the\nAnthropic provider prefers a stored OAuth token\n(~/.neurolink/anthropic-credentials.json) over ANTHROPIC_API_KEY and\nrefreshes it against Anthropic's live token endpoint, so a gate that only\ncleaned the environment could still send a real refresh token to a real\nhost. The suite checks the environment and the home directory before it\nruns a row, and the CLI child inherits that stripped environment plus the\ncurrent row's fake key. Because that check reuses the strip's own pattern, the\nsuite also plants a literal list of dummy secret and endpoint variables\n(test/helpers/ambientSecretCanaries.ts) before the strip runs and fails if\nany survives, so a name the pattern misses cannot pass unnoticed.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"Known, documented gap in cell 9","lvl3":""}},
|
|
9614
9614
|
{"objectID":"d7fd57b5311bed74e1ac06949abeca0fc2aab02f46c7841d85da59920aafcd61","title":"The stream-identity defect (cell 3)","url":"/docs/provider-integration/acceptance-gate#the-stream-identity-defect-cell-3","content":"Confirmed and fixed in src.\n\nStreamResult.model (the public value cell 3 asserts against) was reporting\nthe requested model, not the model the server actually served. Internally,\nneurolink.ts already captured the resolved model — the bug was that this\nresolved value never reached the public StreamResult.\nOpenAI-compatible protocol path (src/lib/providers/openaiChatCompletionsBase.ts,\n src/lib/types/openaiCompatible.ts) — the substantive fix, and the one\n cell 3 actually exercises: added StreamLoopArgs.onModelObserved?: (model:\nstring) => void, fired once per step that echoes a model field on the\n wire (SSE chunk.model, captured by parseSSEStream into\n OpenAICompatSSEResult.model). executeStream's public result.model was\n a plain data property fixed at the pre-call resolved/requested modelId;\n it is now a live getter (observedServerModel ?? modelId) so a caller\n reading .model after draining .stream sees what the server actually\n served — the mock's ::mock-server-resolved suffix on the STREAM cell\n is what makes this difference observable and the fix provable. It has to\n be a getter, not a reassignment after the fact: preserveLiveStreamAccessors\n spreads result into a new object at each provider boundary before the\n background loop produces its first chunk, which would freeze a plain field\n at its construction-time value.\nAnthropic path (src/lib/providers/anthropic/client.ts) — a narrower,\n related fix: StreamResult.model was reporting the raw constructor\n argument this.modelName, which is undefined whenever a caller relies\n on the default model rather than passing one explicitly. It now reports\n modelId, the value already resolved as this.modelName ||\ngetDefaultAnthropicModel() and actually put on the wire. Note this is a\n different bug from the OpenAI-compatible one: the Anthropic Messages API\n always echoes the request's model back verbatim in its envelope, so\n there is no \"server resolved a different model than requested\" case on\n this protoc","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"The stream-identity defect (cell 3)","lvl3":""}},
|
|
9615
9615
|
{"objectID":"d47c3d7913d5adb6968b60f5025f7c15472e8bbf76abe5b0b4277001a96c9691","title":"Additional src defects found and fixed by cells 4 and 8","url":"/docs/provider-integration/acceptance-gate#additional-src-defects-found-and-fixed-by-cells-4-and-8","content":"Building this gate surfaced three more real defects, all in provider-side\ntool-capability allowlists and one test-sizing constant — none in the mock\nitself. Each is a one-line, strictly capability-adding fix.\nollama cell 4 (tool-nonce proof) — OllamaProvider.supportsTools()\n checks the model name against modelConfiguration.ts's\n createOllamaConfig().modelBehavior.toolCapableModels allowlist. That list\n (OLLAMA_TOOL_CAPABLE_MODELS) included \"llama3.1\" but not \"llama3.2\" —\n the gate's own pinned default Ollama model\n (providerMatrix.ts's ollama.defaultModel, which declares tools:\ntrue). supportsTools() returned false for the provider's own default\n model, which silently dropped the user-supplied tool from both the\n wire tools field and the execution lookup (executeNativeGenerate()'s\n toolsRecord is built empty when supportsTools() is false), producing a\n \"Tool not found\" error instead of a real tool round-trip. Fixed in\n src/lib/core/modelConfiguration.ts by adding \"llama3.2\" to the default\n toolCapableModels array.\nopenrouter cell 4 (tool-nonce proof) — OpenRouterProvider.supportsTools()\n has two paths: a dynamically cached capability set (populated by\n cacheModelCapabilities(), which fetches /models and reads\n supported_parameters) and a hardcoded fallback pattern list used until\n that cache is populated. cacheModelCapabilities() is never invoked\n automatically anywhere in the real generate()/stream() code paths, so\n the fallback list is the only path ever exercised in practice. That list\n included \"meta-llama/llama-3.2\" and \"meta-llama/llama-3.3\" but not\n \"meta-llama/llama-3.1\" — the family of the gate's pinned default\n OpenRouter model, \"meta-llama/llama-3.1-8b-instruct\" (chosen, per an\n existing code comment, specifically because it supports every capability\n the matrix exercises). Same failure mode as the ollama defect above.\n Fixed in src/lib/providers/openRouter/client.ts by adding\n \"meta-llama/llama-3.1\" to knownToolCapablePatterns.\nli","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"Additional src defects found and fixed by cells 4 and 8","lvl3":""}},
|
|
9616
9616
|
{"objectID":"0618b382f27d4d7ae674f8c803a793a4b1774ab7eecc3e1eb4738979361454ff","title":"Mock server","url":"/docs/provider-integration/acceptance-gate#mock-server","content":"test/helpers/acceptanceGateServer.ts is a real node:http server (not\nfetch interception) that speaks the two wire protocols the covered providers\nactually use:\nOpenAI-compatible chat completions — /chat/completions (including\n SSE streaming, tool calls, response_format, reasoning deltas), /models,\n /embeddings.\nAnthropic Messages API — /messages, for the one ANTHROPIC_BASE_URL\n row.\n\nEvery provider is redirected at it through its own documented base-URL\nenvironment override (<ID>_BASE_URL for catalog providers, each\nhand-written provider's own env var — see \"Coverage\" below) with a fake API\nkey (gate-fake-key-not-a-real-credential). The server enforces a\nrequest-count ceiling per instance and returns HTTP 400 past it (cell 8).\n\nEvery gate marker, exact value, and mock behavior the suite asserts against\nis exported from that file (GATE_MARKERS, GATE_EXACT_VALUE,\nGATE_STREAM_VALUE, GATE_STRUCTURED_VALUE, GATE_TOOL_NAME,\nGATE_TOOL_CONFIRM_PREFIX, GATE_THINKING_FULL, GATE_THINKING_ANSWER,\nGATE_EMBEDDING_VECTOR, GATE_SERVER_MODEL_SUFFIX, ...) so the suite and\nthe mock can never silently drift apart.","hierarchy":{"lvl0":"Provider Integration","lvl1":"Credential-free provider acceptance gate","lvl2":"Mock server","lvl3":""}},
|
|
@@ -9799,7 +9799,7 @@
|
|
|
9799
9799
|
{"objectID":"61a3976ba8f1c5eeed456f7af64d3274a0fd5bf8ee77fe201de27295f5b403cb","title":"8. Documentation Verification","url":"/docs/rag/VERIFICATION#8-documentation-verification","content":"| Document | Exists | Accurate | Complete | Status |\n| ---------------- | ------ | -------- | -------- | ------ |\n| TESTING.md | [ ] | [ ] | [ ] | [ ] |\n| CONFIGURATION.md | [ ] | [ ] | [ ] | [ ] |\n| VERIFICATION.md | [ ] | [ ] | [ ] | [ ] |\n| CLI-COVERAGE.md | [ ] | [ ] | [ ] | [ ] |","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"8. Documentation Verification","lvl3":""}},
|
|
9800
9800
|
{"objectID":"83f7357fa2d3b81496d704bba2ae12343314f32e2ccec6dae2248e63867cddca","title":"Sign-off","url":"/docs/rag/VERIFICATION#sign-off","content":"| Role | Name | Date | Signature |\n| --------- | ---- | ---- | --------- |\n| Developer | | | |\n| QA | | | |\n| Tech Lead | | | |","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"Sign-off","lvl3":""}},
|
|
9801
9801
|
{"objectID":"574e58b2065b4cf4518e5cbf15dfd86d2bea4091d742c3eeb19a4f89f28fbfc5","title":"Notes","url":"/docs/rag/VERIFICATION#notes","content":"Add any observations, issues, or recommendations here:","hierarchy":{"lvl0":"Rag","lvl1":"RAG Processing - Manual Verification Checklist","lvl2":"Notes","lvl3":""}},
|
|
9802
|
-
{"objectID":"9b3ba67e38b636436e6b2f378b85e8b14b45f30f68b91afe7597703a50c9d82a","title":"Analytics Reference","url":"/docs/reference/analytics","content":"Analytics Reference\n\nNeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.\n\nOverview\n\nThe analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |\n\nToken Usage Tracking\n\nBasic Token Usage\n\nNeuroLink automatically tracks token usage for every generation:\n\nTokenUsage Type\n\nThe TokenUsage type provides detailed token information:\n\nCache Token Tracking\n\nFor providers that support prompt caching (Anthropic, Google), NeuroLink tracks cache metrics:\n\nReasoning Token Tracking\n\nFor models with extended thinking capabilities (OpenAI o1, Anthropic Claude with thinking, Gemini 3):\n\nCost Analytics\n\nAutomatic Cost Estimation\n\nNeuroLink automatically estimates costs based on provider pricing:\n\nCost Calculation Formula\n\nCosts are calculated using per-token pricing:\n\nProvider Pricing Configuration\n\nNeuroLink uses configurable pricing for each provider:\n\n| Provider | Default Input Cost (per 1K) | Default Output Cost (per 1K) |\n| ------------- | --------------------------- | ---------------------------- |\n| OpenAI | $0.00015 | $0.0006 |\n| Anthropic | $0.0015 | $0.0075 |\n| Google AI | $0.000075 | $0.0003 |\n| Google Vertex | $0.000075 | $0.0003 |\n| Bedrock | $0.0015 | $0.0075 |\n| Azure | $0.00015 | $0.0006 |\n| Mistral | $0.0001 | $0.0003 |\n| HuggingFace | $0.0002 | $0.0008 |\n| Ollama | $0 | $0 |\n\nCustom Cost Configuration\n\nOverride default pricing via environment variables:\n\nAggregating Costs\n\nTrack cumulative costs across multiple requests:\n\nPerformance Metrics\n\nResponse Time Tracking\n\nEvery request automatically tracks response time:\n\nAnalyticsData Structure\n\nThe complete analytics data structure:\n\nPerformance Metrics Type\n\nFor advanced performance tracking:\n\nStream Performance Metrics\n\nFor streaming requests, additional metrics are available:\n\nStreaming Example\n\nQuality Evaluation\n\nEnabling Evaluation\n\nNeuroLink can automatically evaluate response quality:\n\nEvaluationData Structure\n\nDomain-Aware Evaluation\n\nConfigure evaluation for specific domains:\n\nEvaluation Providers\n\nEvaluation can use different providers:\n\nAnalytics Middleware\n\nUsing Analytics Middleware\n\nNeuroLink provides built-in analytics middleware:\n\nMiddleware Metadata\n\nThe analytics middleware provides:\n\nCustom Analytics Collection\n\nImplement custom analytics collection:\n\nIntegration with Observability Tools\n\nOpenTelemetry Integration\n\nExport analytics to OpenTelemetry:\n\nPrometheus Metrics\n\nExport metrics to Prometheus:\n\nDataDog Integration\n\nSend analytics to DataDog:\n\nCustom Logging\n\nStructured logging with analytics:\n\nUsage Statistics\n\nTracking Usage Over Time\n\nBuild usage dashboards with aggregated statistics:\n\nRate Limiting Based on Usage\n\nImplement rate limiting using analytics:\n\nCLI Analytics\n\nViewing Analytics in CLI\n\nVerbose Analytics\n\nBest Practices\nAlways Enable Analytics in Production\nMonitor Cost Alerts\nTrack Token Efficiency\nImplement Budget Controls\n\nRelated Documentation\nConfiguration Reference - Configure analytics settings\nProvider Comparison - Compare provider costs\nTroubleshooting - Debug analytics issues\nError Codes - Analytics-related error codes","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"","lvl3":""}},
|
|
9802
|
+
{"objectID":"9b3ba67e38b636436e6b2f378b85e8b14b45f30f68b91afe7597703a50c9d82a","title":"Analytics Reference","url":"/docs/reference/analytics","content":"Analytics Reference\n\nNeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.\n\nOverview\n\nThe analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |\n\nToken Usage Tracking\n\nBasic Token Usage\n\nNeuroLink automatically tracks token usage for every generation:\n\nTokenUsage Type\n\nThe TokenUsage type provides detailed token information:\n\nCache Token Tracking\n\nFor providers that support prompt caching (Anthropic, Google), NeuroLink tracks cache metrics:\n\nReasoning Token Tracking\n\nFor models with extended thinking capabilities (OpenAI o1, Anthropic Claude with thinking, Gemini 3):\n\nCost Analytics\n\nAutomatic Cost Estimation\n\nNeuroLink automatically estimates costs based on provider pricing:\n\nCost Calculation Formula\n\nCosts are calculated using per-token pricing:\n\nProvider Pricing Configuration\n\nNeuroLink uses configurable pricing for each provider:\n\n| Provider | Default Input Cost (per 1K) | Default Output Cost (per 1K) |\n| ------------- | --------------------------- | ---------------------------- |\n| OpenAI | $0.00015 | $0.0006 |\n| Anthropic | $0.0015 | $0.0075 |\n| Google AI | $0.000075 | $0.0003 |\n| Google Vertex | $0.000075 | $0.0003 |\n| Bedrock | $0.0015 | $0.0075 |\n| Azure | $0.00015 | $0.0006 |\n| Mistral | $0.0001 | $0.0003 |\n| HuggingFace | $0.0002 | $0.0008 |\n| Ollama | $0 | $0 |\n\nCustom Cost Configuration\n\nOverride default pricing via environment variables:\n\nAggregating Costs\n\nTrack cumulative costs across multiple requests:\n\nPerformance Metrics\n\nResponse Time Tracking\n\nEvery request automatically tracks response time:\n\nAnalyticsData Structure\n\nThe complete analytics data structure:\n\nPerformance Metrics Type\n\nFor advanced performance tracking:\n\nStream Performance Metrics\n\nFor streaming requests, additional metrics are available:\n\nStreaming Example\n\nQuality Evaluation\n\nEnabling Evaluation\n\nNeuroLink can automatically evaluate response quality:\n\nEvaluationData Structure\n\nDomain-Aware Evaluation\n\nConfigure evaluation for specific domains:\n\nEvaluation Providers\n\nEvaluation can use different providers:\n\nAnalytics Middleware\n\nUsing Analytics Middleware\n\nNeuroLink provides built-in analytics middleware:\n\nThe same two fields attach your own middleware (see Custom Analytics Collection below): registering it with middleware does not switch it on, so list its metadata.id in enabledMiddleware as well.\n\nMiddleware Metadata\n\nThe analytics middleware provides:\n\nCustom Analytics Collection\n\nImplement custom analytics collection:\n\nIntegration with Observability Tools\n\nOpenTelemetry Integration\n\nExport analytics to OpenTelemetry:\n\nPrometheus Metrics\n\nExport metrics to Prometheus:\n\nDataDog Integration\n\nSend analytics to DataDog:\n\nCustom Logging\n\nStructured logging with analytics:\n\nUsage Statistics\n\nTracking Usage Over Time\n\nBuild usage dashboards with aggregated statistics:\n\nRate Limiting Based on Usage\n\nImplement rate limiting using analytics:\n\nCLI Analytics\n\nViewing Analytics in CLI\n\nVerbose Analytics\n\nBest Practices\nAlways Enable Analytics in Production\nMonitor Cost Alerts\nTrack Token Efficiency\nImplement Budget Controls\n\nRelated Documentation\nConfiguration Reference - Configure analytics settings\nProvider Comparison - Compare provider costs\nTroubleshooting - Debug analytics issues\nError Codes - Analytics-related error codes","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"","lvl3":""}},
|
|
9803
9803
|
{"objectID":"0926aba6cc673644c3648445ea2da40fb83fabeb6f365c4e889c094c3560fb9d","title":"Analytics Reference","url":"/docs/reference/analytics#analytics-reference","content":"NeuroLink provides comprehensive analytics capabilities for tracking token usage, costs, performance metrics, and quality evaluation across your configured AI provider interactions.","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Analytics Reference","lvl3":""}},
|
|
9804
9804
|
{"objectID":"2405c488fbebcf4cfe8245a94e5fe3eb106a312cde6bd795c0b2710362507e6f","title":"Overview","url":"/docs/reference/analytics#overview","content":"The analytics system in NeuroLink consists of several interconnected components:\n\n| Component | Purpose |\n| -------------------------- | --------------------------------------------------------------- |\n| Token Usage Tracking | Monitor input/output tokens, cache tokens, and reasoning tokens |\n| Cost Analytics | Estimate and track costs across providers and models |\n| Performance Metrics | Measure response times, throughput, and memory usage |\n| Quality Evaluation | Assess response relevance, accuracy, and completeness |\n| Middleware Integration | Automatic analytics collection via middleware |","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Overview","lvl3":""}},
|
|
9805
9805
|
{"objectID":"4de3db21ab73ce27bed5f620bc7d11d61e84931962cde34efcd084c976a22c99","title":"Basic Token Usage","url":"/docs/reference/analytics#basic-token-usage","content":"NeuroLink automatically tracks token usage for every generation:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Basic Token Usage","lvl3":""}},
|
|
@@ -9820,7 +9820,7 @@
|
|
|
9820
9820
|
{"objectID":"12adc0945eee0a41cde1f2fb2a55c859f9c764ef46af73cec9f470f4df52b74a","title":"Enabling Evaluation","url":"/docs/reference/analytics#enabling-evaluation","content":"NeuroLink can automatically evaluate response quality:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Enabling Evaluation","lvl3":""}},
|
|
9821
9821
|
{"objectID":"de429495444202372f4be294b69c352af88196a8b52c9eebca06f6bea4c0f35c","title":"Domain-Aware Evaluation","url":"/docs/reference/analytics#domain-aware-evaluation","content":"Configure evaluation for specific domains:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Domain-Aware Evaluation","lvl3":""}},
|
|
9822
9822
|
{"objectID":"af7c1b9b08b43cf98310613acaf23b6b84d773f43965ddcdfcec98ffe61ff6d2","title":"Evaluation Providers","url":"/docs/reference/analytics#evaluation-providers","content":"Evaluation can use different providers:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Evaluation Providers","lvl3":""}},
|
|
9823
|
-
{"objectID":"9e3a9b0706ef20857760b4ebe63e0f94af84ca9697bde7ea9b7bae561024f36d","title":"Using Analytics Middleware","url":"/docs/reference/analytics#using-analytics-middleware","content":"NeuroLink provides built-in analytics middleware:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Using Analytics Middleware","lvl3":""}},
|
|
9823
|
+
{"objectID":"9e3a9b0706ef20857760b4ebe63e0f94af84ca9697bde7ea9b7bae561024f36d","title":"Using Analytics Middleware","url":"/docs/reference/analytics#using-analytics-middleware","content":"NeuroLink provides built-in analytics middleware:\n\nThe same two fields attach your own middleware (see Custom Analytics Collection below): registering it with middleware does not switch it on, so list its metadata.id in enabledMiddleware as well.","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Using Analytics Middleware","lvl3":""}},
|
|
9824
9824
|
{"objectID":"cacf9ebf346acab9baec8a67e2cc35459db844cf253d0bc6fcc3b902b187c049","title":"Middleware Metadata","url":"/docs/reference/analytics#middleware-metadata","content":"The analytics middleware provides:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Middleware Metadata","lvl3":""}},
|
|
9825
9825
|
{"objectID":"4c247098862da88a8445264fec8c7fb1145f2de4ec0306165423751bc9202b09","title":"Custom Analytics Collection","url":"/docs/reference/analytics#custom-analytics-collection","content":"Implement custom analytics collection:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"Custom Analytics Collection","lvl3":""}},
|
|
9826
9826
|
{"objectID":"b407ce402cd9c1f810aaad8520ec6c3addecefb698dd9366f19c8757515645a8","title":"OpenTelemetry Integration","url":"/docs/reference/analytics#opentelemetry-integration","content":"Export analytics to OpenTelemetry:","hierarchy":{"lvl0":"Reference","lvl1":"Analytics Reference","lvl2":"OpenTelemetry Integration","lvl3":""}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "12.45.
|
|
3
|
+
"version": "12.45.2",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"description": "The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002/call) for routing, tool selection and context budgeting. MCP-native (4 transports), voice TTS/STT/realtime, RAG, agents, memory, compaction, 9 observability exporters. OpenAI · Anthropic · Gemini · Bedrock · Azure · Ollama · TypeSafe Jev and more.",
|
|
6
6
|
"author": {
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
"// CI tier — fast, no live AI calls, safe for every commit (test:unit; also see the separate provider-safety-net CI job, which runs build + test:providers-mocked + test:provider-structure + test:error-classifier-contract on every PR)": "",
|
|
197
197
|
"test:tool-routing": "pnpm exec tsx test/continuous-test-suite-tool-routing.ts",
|
|
198
198
|
"test:tool-routing-semantic": "pnpm exec tsx test/continuous-test-suite-tool-routing-semantic.ts",
|
|
199
|
-
"test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:
|
|
199
|
+
"test:unit": "pnpm run test:bugfixes && pnpm run test:mcp:infra && pnpm run test:mcp:spans && pnpm run test:tool-routing && pnpm run test:tool-routing-cli && pnpm run test:tool-dedup && pnpm run test:model-pool && pnpm run test:classifier-router && pnpm run test:tool-routing-semantic && pnpm run test:mcp-result-cache && pnpm run test:mcp-direct-name-repair && pnpm run test:mcp-breaker-resolved-errors && pnpm run test:archive:security && pnpm run test:office:security && pnpm run test:image-exif && pnpm run test:vector-chroma && pnpm run test:vector-pgvector && pnpm run test:vector-pinecone && pnpm run test:provider-wiring && pnpm run test:docs-mcp && pnpm run test:retired-model-defaults",
|
|
200
200
|
"// CI tier — live providers, runs only when API keys are present (test:credentials and test:dynamic make real provider calls when keys are set, so they live here, not in test:unit; test:matrix, a different suite covering the full provider capability matrix, runs nightly via .github/workflows/live-matrix.yml — test:providers itself is still only wired into test:live, not any GitHub Actions workflow)": "",
|
|
201
|
-
"test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic",
|
|
201
|
+
"test:live": "pnpm run test:providers && pnpm run test:mcp:http && pnpm run test:mcp:sdk && pnpm run test:mcp:cli && pnpm run test:observability && pnpm run test:context && pnpm run test:memory && pnpm run test:tool-reliability && pnpm run test:evaluation && pnpm run test:autoresearch && pnpm run test:credentials && pnpm run test:dynamic && pnpm run test:model-not-found-retryable",
|
|
202
202
|
"// CI tier — product output (image/video/TTS/PPT) — costs $$ per run (not wired into any GitHub Actions workflow as of this comment; run manually or add to live-matrix.yml if nightly coverage is needed)": "",
|
|
203
203
|
"test:product": "pnpm run test:media && pnpm run test:tts && pnpm run test:ppt && pnpm run test:proxy",
|
|
204
204
|
"test:performance": "tsx tools/testing/performanceMonitor.ts",
|