@juspay/neurolink 9.40.0 → 9.42.0
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 +12 -0
- package/README.md +7 -1
- package/dist/auth/anthropicOAuth.d.ts +18 -3
- package/dist/auth/anthropicOAuth.js +137 -4
- package/dist/auth/providers/firebase.js +5 -1
- package/dist/auth/providers/jwt.js +5 -1
- package/dist/auth/providers/workos.js +5 -1
- package/dist/auth/sessionManager.d.ts +1 -1
- package/dist/auth/sessionManager.js +58 -27
- package/dist/browser/neurolink.min.js +471 -445
- package/dist/cli/commands/mcp.js +3 -0
- package/dist/cli/commands/proxy.d.ts +2 -1
- package/dist/cli/commands/proxy.js +279 -16
- package/dist/cli/commands/task.d.ts +56 -0
- package/dist/cli/commands/task.js +838 -0
- package/dist/cli/factories/commandFactory.d.ts +2 -0
- package/dist/cli/factories/commandFactory.js +38 -0
- package/dist/cli/parser.js +8 -4
- package/dist/client/aiSdkAdapter.js +3 -0
- package/dist/client/streamingClient.js +30 -10
- package/dist/core/modules/GenerationHandler.js +3 -2
- package/dist/core/redisConversationMemoryManager.js +7 -3
- package/dist/evaluation/BatchEvaluator.js +4 -1
- package/dist/evaluation/hooks/observabilityHooks.js +5 -3
- package/dist/evaluation/pipeline/evaluationPipeline.d.ts +3 -2
- package/dist/evaluation/pipeline/evaluationPipeline.js +20 -8
- package/dist/evaluation/pipeline/strategies/batchStrategy.js +6 -3
- package/dist/evaluation/pipeline/strategies/samplingStrategy.js +18 -10
- package/dist/lib/auth/anthropicOAuth.d.ts +18 -3
- package/dist/lib/auth/anthropicOAuth.js +137 -4
- package/dist/lib/auth/providers/firebase.js +5 -1
- package/dist/lib/auth/providers/jwt.js +5 -1
- package/dist/lib/auth/providers/workos.js +5 -1
- package/dist/lib/auth/sessionManager.d.ts +1 -1
- package/dist/lib/auth/sessionManager.js +58 -27
- package/dist/lib/client/aiSdkAdapter.js +3 -0
- package/dist/lib/client/streamingClient.js +30 -10
- package/dist/lib/core/modules/GenerationHandler.js +3 -2
- package/dist/lib/core/redisConversationMemoryManager.js +7 -3
- package/dist/lib/evaluation/BatchEvaluator.js +4 -1
- package/dist/lib/evaluation/hooks/observabilityHooks.js +5 -3
- package/dist/lib/evaluation/pipeline/evaluationPipeline.d.ts +3 -2
- package/dist/lib/evaluation/pipeline/evaluationPipeline.js +20 -8
- package/dist/lib/evaluation/pipeline/strategies/batchStrategy.js +6 -3
- package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.js +18 -10
- package/dist/lib/neurolink.d.ts +18 -1
- package/dist/lib/neurolink.js +367 -484
- package/dist/lib/observability/otelBridge.d.ts +2 -2
- package/dist/lib/observability/otelBridge.js +12 -3
- package/dist/lib/providers/amazonBedrock.js +2 -4
- package/dist/lib/providers/anthropic.d.ts +9 -5
- package/dist/lib/providers/anthropic.js +19 -14
- package/dist/lib/providers/anthropicBaseProvider.d.ts +3 -3
- package/dist/lib/providers/anthropicBaseProvider.js +5 -4
- package/dist/lib/providers/azureOpenai.d.ts +1 -1
- package/dist/lib/providers/azureOpenai.js +5 -4
- package/dist/lib/providers/googleAiStudio.js +30 -1
- package/dist/lib/providers/googleVertex.js +28 -6
- package/dist/lib/providers/huggingFace.d.ts +3 -3
- package/dist/lib/providers/huggingFace.js +6 -8
- package/dist/lib/providers/litellm.js +41 -29
- package/dist/lib/providers/mistral.js +2 -1
- package/dist/lib/providers/ollama.js +80 -23
- package/dist/lib/providers/openAI.js +3 -2
- package/dist/lib/providers/openRouter.js +2 -1
- package/dist/lib/providers/openaiCompatible.d.ts +4 -4
- package/dist/lib/providers/openaiCompatible.js +4 -4
- package/dist/lib/proxy/claudeFormat.d.ts +3 -2
- package/dist/lib/proxy/claudeFormat.js +25 -20
- package/dist/lib/proxy/cloaking/plugins/sessionIdentity.d.ts +2 -6
- package/dist/lib/proxy/cloaking/plugins/sessionIdentity.js +9 -33
- package/dist/lib/proxy/modelRouter.js +3 -0
- package/dist/lib/proxy/oauthFetch.d.ts +1 -1
- package/dist/lib/proxy/oauthFetch.js +65 -72
- package/dist/lib/proxy/proxyConfig.js +44 -24
- package/dist/lib/proxy/proxyEnv.d.ts +19 -0
- package/dist/lib/proxy/proxyEnv.js +73 -0
- package/dist/lib/proxy/proxyFetch.js +50 -4
- package/dist/lib/proxy/proxyTracer.d.ts +133 -0
- package/dist/lib/proxy/proxyTracer.js +645 -0
- package/dist/lib/proxy/rawStreamCapture.d.ts +10 -0
- package/dist/lib/proxy/rawStreamCapture.js +83 -0
- package/dist/lib/proxy/requestLogger.d.ts +32 -5
- package/dist/lib/proxy/requestLogger.js +406 -37
- package/dist/lib/proxy/sseInterceptor.d.ts +97 -0
- package/dist/lib/proxy/sseInterceptor.js +402 -0
- package/dist/lib/proxy/usageStats.d.ts +4 -3
- package/dist/lib/proxy/usageStats.js +25 -12
- package/dist/lib/rag/chunkers/MarkdownChunker.js +13 -5
- package/dist/lib/rag/chunking/markdownChunker.js +15 -6
- package/dist/lib/server/routes/claudeProxyRoutes.d.ts +7 -2
- package/dist/lib/server/routes/claudeProxyRoutes.js +1737 -508
- package/dist/lib/services/server/ai/observability/instrumentation.d.ts +7 -1
- package/dist/lib/services/server/ai/observability/instrumentation.js +240 -40
- package/dist/lib/tasks/backends/bullmqBackend.d.ts +33 -0
- package/dist/lib/tasks/backends/bullmqBackend.js +196 -0
- package/dist/lib/tasks/backends/nodeTimeoutBackend.d.ts +27 -0
- package/dist/lib/tasks/backends/nodeTimeoutBackend.js +141 -0
- package/dist/lib/tasks/backends/taskBackendRegistry.d.ts +31 -0
- package/dist/lib/tasks/backends/taskBackendRegistry.js +66 -0
- package/dist/lib/tasks/errors.d.ts +31 -0
- package/dist/lib/tasks/errors.js +18 -0
- package/dist/lib/tasks/store/fileTaskStore.d.ts +43 -0
- package/dist/lib/tasks/store/fileTaskStore.js +179 -0
- package/dist/lib/tasks/store/redisTaskStore.d.ts +43 -0
- package/dist/lib/tasks/store/redisTaskStore.js +197 -0
- package/dist/lib/tasks/taskExecutor.d.ts +21 -0
- package/dist/lib/tasks/taskExecutor.js +166 -0
- package/dist/lib/tasks/taskManager.d.ts +63 -0
- package/dist/lib/tasks/taskManager.js +426 -0
- package/dist/lib/tasks/tools/taskTools.d.ts +135 -0
- package/dist/lib/tasks/tools/taskTools.js +274 -0
- package/dist/lib/telemetry/index.d.ts +2 -1
- package/dist/lib/telemetry/index.js +2 -1
- package/dist/lib/telemetry/telemetryService.d.ts +3 -0
- package/dist/lib/telemetry/telemetryService.js +65 -5
- package/dist/lib/types/cli.d.ts +10 -0
- package/dist/lib/types/configTypes.d.ts +3 -0
- package/dist/lib/types/generateTypes.d.ts +13 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/proxyTypes.d.ts +37 -5
- package/dist/lib/types/streamTypes.d.ts +25 -3
- package/dist/lib/types/taskTypes.d.ts +275 -0
- package/dist/lib/types/taskTypes.js +37 -0
- package/dist/lib/utils/messageBuilder.js +3 -2
- package/dist/lib/utils/providerHealth.d.ts +18 -0
- package/dist/lib/utils/providerHealth.js +240 -9
- package/dist/lib/utils/providerUtils.js +14 -8
- package/dist/lib/utils/toolChoice.d.ts +4 -0
- package/dist/lib/utils/toolChoice.js +7 -0
- package/dist/neurolink.d.ts +18 -1
- package/dist/neurolink.js +367 -484
- package/dist/observability/otelBridge.d.ts +2 -2
- package/dist/observability/otelBridge.js +12 -3
- package/dist/providers/amazonBedrock.js +2 -4
- package/dist/providers/anthropic.d.ts +9 -5
- package/dist/providers/anthropic.js +19 -14
- package/dist/providers/anthropicBaseProvider.d.ts +3 -3
- package/dist/providers/anthropicBaseProvider.js +5 -4
- package/dist/providers/azureOpenai.d.ts +1 -1
- package/dist/providers/azureOpenai.js +5 -4
- package/dist/providers/googleAiStudio.js +30 -1
- package/dist/providers/googleVertex.js +28 -6
- package/dist/providers/huggingFace.d.ts +3 -3
- package/dist/providers/huggingFace.js +6 -7
- package/dist/providers/litellm.js +41 -29
- package/dist/providers/mistral.js +2 -1
- package/dist/providers/ollama.js +80 -23
- package/dist/providers/openAI.js +3 -2
- package/dist/providers/openRouter.js +2 -1
- package/dist/providers/openaiCompatible.d.ts +4 -4
- package/dist/providers/openaiCompatible.js +4 -3
- package/dist/proxy/claudeFormat.d.ts +3 -2
- package/dist/proxy/claudeFormat.js +25 -20
- package/dist/proxy/cloaking/plugins/sessionIdentity.d.ts +2 -6
- package/dist/proxy/cloaking/plugins/sessionIdentity.js +9 -33
- package/dist/proxy/modelRouter.js +3 -0
- package/dist/proxy/oauthFetch.d.ts +1 -1
- package/dist/proxy/oauthFetch.js +65 -72
- package/dist/proxy/proxyConfig.js +44 -24
- package/dist/proxy/proxyEnv.d.ts +19 -0
- package/dist/proxy/proxyEnv.js +72 -0
- package/dist/proxy/proxyFetch.js +50 -4
- package/dist/proxy/proxyTracer.d.ts +133 -0
- package/dist/proxy/proxyTracer.js +644 -0
- package/dist/proxy/rawStreamCapture.d.ts +10 -0
- package/dist/proxy/rawStreamCapture.js +82 -0
- package/dist/proxy/requestLogger.d.ts +32 -5
- package/dist/proxy/requestLogger.js +406 -37
- package/dist/proxy/sseInterceptor.d.ts +97 -0
- package/dist/proxy/sseInterceptor.js +401 -0
- package/dist/proxy/usageStats.d.ts +4 -3
- package/dist/proxy/usageStats.js +25 -12
- package/dist/rag/chunkers/MarkdownChunker.js +13 -5
- package/dist/rag/chunking/markdownChunker.js +15 -6
- package/dist/server/routes/claudeProxyRoutes.d.ts +7 -2
- package/dist/server/routes/claudeProxyRoutes.js +1737 -508
- package/dist/services/server/ai/observability/instrumentation.d.ts +7 -1
- package/dist/services/server/ai/observability/instrumentation.js +240 -40
- package/dist/tasks/backends/bullmqBackend.d.ts +33 -0
- package/dist/tasks/backends/bullmqBackend.js +195 -0
- package/dist/tasks/backends/nodeTimeoutBackend.d.ts +27 -0
- package/dist/tasks/backends/nodeTimeoutBackend.js +140 -0
- package/dist/tasks/backends/taskBackendRegistry.d.ts +31 -0
- package/dist/tasks/backends/taskBackendRegistry.js +65 -0
- package/dist/tasks/errors.d.ts +31 -0
- package/dist/tasks/errors.js +17 -0
- package/dist/tasks/store/fileTaskStore.d.ts +43 -0
- package/dist/tasks/store/fileTaskStore.js +178 -0
- package/dist/tasks/store/redisTaskStore.d.ts +43 -0
- package/dist/tasks/store/redisTaskStore.js +196 -0
- package/dist/tasks/taskExecutor.d.ts +21 -0
- package/dist/tasks/taskExecutor.js +165 -0
- package/dist/tasks/taskManager.d.ts +63 -0
- package/dist/tasks/taskManager.js +425 -0
- package/dist/tasks/tools/taskTools.d.ts +135 -0
- package/dist/tasks/tools/taskTools.js +273 -0
- package/dist/telemetry/index.d.ts +2 -1
- package/dist/telemetry/index.js +2 -1
- package/dist/telemetry/telemetryService.d.ts +3 -0
- package/dist/telemetry/telemetryService.js +65 -5
- package/dist/types/cli.d.ts +10 -0
- package/dist/types/configTypes.d.ts +3 -0
- package/dist/types/generateTypes.d.ts +13 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/proxyTypes.d.ts +37 -5
- package/dist/types/streamTypes.d.ts +25 -3
- package/dist/types/taskTypes.d.ts +275 -0
- package/dist/types/taskTypes.js +36 -0
- package/dist/utils/messageBuilder.js +3 -2
- package/dist/utils/providerHealth.d.ts +18 -0
- package/dist/utils/providerHealth.js +240 -9
- package/dist/utils/providerUtils.js +14 -8
- package/dist/utils/toolChoice.d.ts +4 -0
- package/dist/utils/toolChoice.js +6 -0
- package/docs/assets/dashboards/neurolink-proxy-observability-dashboard.json +6609 -0
- package/docs/changelog.md +252 -0
- package/package.json +19 -1
- package/scripts/observability/check-proxy-telemetry.mjs +235 -0
- package/scripts/observability/docker-compose.proxy-observability.yaml +55 -0
- package/scripts/observability/import-openobserve-dashboard.mjs +240 -0
- package/scripts/observability/manage-local-openobserve.sh +184 -0
- package/scripts/observability/otel-collector.proxy-observability.yaml +78 -0
- package/scripts/observability/proxy-observability.env.example +23 -0
|
@@ -91,6 +91,7 @@ export class EvaluationPipeline {
|
|
|
91
91
|
if (!this._initialized) {
|
|
92
92
|
await this.initialize();
|
|
93
93
|
}
|
|
94
|
+
this._validateExecutionOptions(options);
|
|
94
95
|
const startTime = Date.now();
|
|
95
96
|
const correlationId = options?.correlationId ?? `pipeline-${Date.now()}`;
|
|
96
97
|
logger.debug(`Executing pipeline: ${this._config.name ?? "unnamed"}`, {
|
|
@@ -173,16 +174,25 @@ export class EvaluationPipeline {
|
|
|
173
174
|
skippedScorers,
|
|
174
175
|
};
|
|
175
176
|
}
|
|
177
|
+
_validateExecutionOptions(options) {
|
|
178
|
+
const hasOnlyScorers = !!options?.onlyScorers && options.onlyScorers.length > 0;
|
|
179
|
+
const hasSkipScorers = !!options?.skipScorers && options.skipScorers.length > 0;
|
|
180
|
+
if (hasOnlyScorers && hasSkipScorers) {
|
|
181
|
+
throw new Error("Cannot specify both 'onlyScorers' and 'skipScorers' options");
|
|
182
|
+
}
|
|
183
|
+
}
|
|
176
184
|
/**
|
|
177
185
|
* Get scorers to run based on options
|
|
178
186
|
*/
|
|
179
187
|
_getScorersToRun(options) {
|
|
180
188
|
const allScorers = Array.from(this._scorers.entries());
|
|
181
|
-
|
|
182
|
-
|
|
189
|
+
const onlyScorers = options?.onlyScorers;
|
|
190
|
+
const skipScorers = options?.skipScorers;
|
|
191
|
+
if (onlyScorers && onlyScorers.length > 0) {
|
|
192
|
+
return allScorers.filter(([id]) => onlyScorers.includes(id));
|
|
183
193
|
}
|
|
184
|
-
if (
|
|
185
|
-
return allScorers.filter(([id]) => !
|
|
194
|
+
if (skipScorers && skipScorers.length > 0) {
|
|
195
|
+
return allScorers.filter(([id]) => !skipScorers.includes(id));
|
|
186
196
|
}
|
|
187
197
|
return allScorers;
|
|
188
198
|
}
|
|
@@ -191,11 +201,13 @@ export class EvaluationPipeline {
|
|
|
191
201
|
*/
|
|
192
202
|
_getSkippedScorers(options) {
|
|
193
203
|
const allIds = Array.from(this._scorers.keys());
|
|
194
|
-
|
|
195
|
-
|
|
204
|
+
const onlyScorers = options?.onlyScorers;
|
|
205
|
+
const skipScorers = options?.skipScorers;
|
|
206
|
+
if (onlyScorers && onlyScorers.length > 0) {
|
|
207
|
+
return allIds.filter((id) => !onlyScorers.includes(id));
|
|
196
208
|
}
|
|
197
|
-
if (
|
|
198
|
-
return
|
|
209
|
+
if (skipScorers && skipScorers.length > 0) {
|
|
210
|
+
return skipScorers.filter((id) => allIds.includes(id));
|
|
199
211
|
}
|
|
200
212
|
return [];
|
|
201
213
|
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* @file Batch Strategy
|
|
3
3
|
* Batch processing for evaluation pipelines
|
|
4
4
|
*/
|
|
5
|
+
function hasPipelineResult(result) {
|
|
6
|
+
return !result.error && result.result !== undefined;
|
|
7
|
+
}
|
|
5
8
|
/**
|
|
6
9
|
* Default batch configuration
|
|
7
10
|
*/
|
|
@@ -66,7 +69,7 @@ export class BatchStrategy {
|
|
|
66
69
|
}
|
|
67
70
|
// Calculate summary
|
|
68
71
|
const totalDuration = Date.now() - startTime;
|
|
69
|
-
const successfulResults = results.filter(
|
|
72
|
+
const successfulResults = results.filter(hasPipelineResult);
|
|
70
73
|
const scores = successfulResults.map((r) => r.result.overallScore);
|
|
71
74
|
const passed = successfulResults.filter((r) => r.result.passed);
|
|
72
75
|
return {
|
|
@@ -192,7 +195,7 @@ export async function* streamBatchEvaluation(pipeline, inputs, config) {
|
|
|
192
195
|
durations.push(result.duration);
|
|
193
196
|
// If continueOnError is false and this result has an error, abort and return summary
|
|
194
197
|
if (result.error && batchConfig.continueOnError === false) {
|
|
195
|
-
const successfulResults = results.filter(
|
|
198
|
+
const successfulResults = results.filter(hasPipelineResult);
|
|
196
199
|
const earlyScores = successfulResults.map((r) => r.result.overallScore);
|
|
197
200
|
const earlyPassed = successfulResults.filter((r) => r.result.passed);
|
|
198
201
|
return {
|
|
@@ -219,7 +222,7 @@ export async function* streamBatchEvaluation(pipeline, inputs, config) {
|
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
// Return summary
|
|
222
|
-
const successfulResults = results.filter(
|
|
225
|
+
const successfulResults = results.filter(hasPipelineResult);
|
|
223
226
|
const scores = successfulResults.map((r) => r.result.overallScore);
|
|
224
227
|
const passed = successfulResults.filter((r) => r.result.passed);
|
|
225
228
|
return {
|
|
@@ -17,6 +17,12 @@ export const DEFAULT_SAMPLING_CONFIG = {
|
|
|
17
17
|
maxRate: 1.0,
|
|
18
18
|
},
|
|
19
19
|
};
|
|
20
|
+
const DEFAULT_ADAPTIVE_CONFIG = {
|
|
21
|
+
enabled: false,
|
|
22
|
+
qualityThreshold: 0.7,
|
|
23
|
+
minRate: 0.1,
|
|
24
|
+
maxRate: 1.0,
|
|
25
|
+
};
|
|
20
26
|
/**
|
|
21
27
|
* Sampling strategy for evaluation
|
|
22
28
|
*/
|
|
@@ -27,9 +33,10 @@ export class SamplingStrategy {
|
|
|
27
33
|
_maxRecentScores = 100;
|
|
28
34
|
constructor(config = {}) {
|
|
29
35
|
const clamp01 = (v) => Math.max(0, Math.min(1, v));
|
|
36
|
+
const defaultAdaptive = DEFAULT_SAMPLING_CONFIG.adaptive ?? DEFAULT_ADAPTIVE_CONFIG;
|
|
30
37
|
const rawRate = config.rate ?? DEFAULT_SAMPLING_CONFIG.rate;
|
|
31
|
-
const rawMinRate = config.adaptive?.minRate ??
|
|
32
|
-
const rawMaxRate = config.adaptive?.maxRate ??
|
|
38
|
+
const rawMinRate = config.adaptive?.minRate ?? defaultAdaptive.minRate;
|
|
39
|
+
const rawMaxRate = config.adaptive?.maxRate ?? defaultAdaptive.maxRate;
|
|
33
40
|
const minRate = clamp01(Math.min(rawMinRate, rawMaxRate));
|
|
34
41
|
const maxRate = clamp01(Math.max(rawMinRate, rawMaxRate));
|
|
35
42
|
this._config = {
|
|
@@ -41,9 +48,8 @@ export class SamplingStrategy {
|
|
|
41
48
|
...(config.alwaysEvaluate ?? {}),
|
|
42
49
|
},
|
|
43
50
|
adaptive: {
|
|
44
|
-
enabled: config.adaptive?.enabled ??
|
|
45
|
-
qualityThreshold: clamp01(config.adaptive?.qualityThreshold ??
|
|
46
|
-
DEFAULT_SAMPLING_CONFIG.adaptive.qualityThreshold),
|
|
51
|
+
enabled: config.adaptive?.enabled ?? defaultAdaptive.enabled,
|
|
52
|
+
qualityThreshold: clamp01(config.adaptive?.qualityThreshold ?? defaultAdaptive.qualityThreshold),
|
|
47
53
|
minRate,
|
|
48
54
|
maxRate,
|
|
49
55
|
},
|
|
@@ -156,9 +162,12 @@ export class SamplingStrategy {
|
|
|
156
162
|
*/
|
|
157
163
|
configure(config) {
|
|
158
164
|
const clamp01 = (v) => Math.max(0, Math.min(1, v));
|
|
165
|
+
const currentAdaptive = this._config.adaptive ??
|
|
166
|
+
DEFAULT_SAMPLING_CONFIG.adaptive ??
|
|
167
|
+
DEFAULT_ADAPTIVE_CONFIG;
|
|
159
168
|
const rawRate = config.rate ?? this._config.rate;
|
|
160
|
-
const rawMinRate = config.adaptive?.minRate ??
|
|
161
|
-
const rawMaxRate = config.adaptive?.maxRate ??
|
|
169
|
+
const rawMinRate = config.adaptive?.minRate ?? currentAdaptive.minRate;
|
|
170
|
+
const rawMaxRate = config.adaptive?.maxRate ?? currentAdaptive.maxRate;
|
|
162
171
|
const minRate = clamp01(Math.min(rawMinRate, rawMaxRate));
|
|
163
172
|
const maxRate = clamp01(Math.max(rawMinRate, rawMaxRate));
|
|
164
173
|
this._config = {
|
|
@@ -170,9 +179,8 @@ export class SamplingStrategy {
|
|
|
170
179
|
...(config.alwaysEvaluate ?? {}),
|
|
171
180
|
},
|
|
172
181
|
adaptive: {
|
|
173
|
-
enabled: config.adaptive?.enabled ??
|
|
174
|
-
qualityThreshold: clamp01(config.adaptive?.qualityThreshold ??
|
|
175
|
-
this._config.adaptive.qualityThreshold),
|
|
182
|
+
enabled: config.adaptive?.enabled ?? currentAdaptive.enabled,
|
|
183
|
+
qualityThreshold: clamp01(config.adaptive?.qualityThreshold ?? currentAdaptive.qualityThreshold),
|
|
176
184
|
minRate,
|
|
177
185
|
maxRate,
|
|
178
186
|
},
|
package/dist/lib/neurolink.d.ts
CHANGED
|
@@ -13,8 +13,9 @@ import type { MCPToolAnnotations } from "./mcp/toolAnnotations.js";
|
|
|
13
13
|
import { MCPToolRegistry } from "./mcp/toolRegistry.js";
|
|
14
14
|
import type { MetricsSummary, TraceView } from "./observability/metricsAggregator.js";
|
|
15
15
|
import type { SpanData } from "./observability/types/spanTypes.js";
|
|
16
|
-
import
|
|
16
|
+
import { TaskManager } from "./tasks/taskManager.js";
|
|
17
17
|
import type { AuthenticatedContext, MastraAuthProvider } from "./types/authTypes.js";
|
|
18
|
+
import type { JsonObject, NeuroLinkEvents, TypedEventEmitter } from "./types/common.js";
|
|
18
19
|
import type { MCPEnhancementsConfig, NeuroLinkAuthConfig, NeurolinkConstructorConfig } from "./types/configTypes.js";
|
|
19
20
|
import type { ChatMessage } from "./types/conversation.js";
|
|
20
21
|
import type { ExternalMCPOperationResult, ExternalMCPServerInstance, ExternalMCPToolInfo } from "./types/externalMcp.js";
|
|
@@ -30,6 +31,8 @@ export declare class NeuroLink {
|
|
|
30
31
|
private mcpSkipped;
|
|
31
32
|
private mcpInitPromise;
|
|
32
33
|
private emitter;
|
|
34
|
+
private _taskManager?;
|
|
35
|
+
private _taskManagerConfig?;
|
|
33
36
|
private toolRegistry;
|
|
34
37
|
private autoDiscoveredServerInfos;
|
|
35
38
|
private externalServerManager;
|
|
@@ -148,6 +151,13 @@ export declare class NeuroLink {
|
|
|
148
151
|
*/
|
|
149
152
|
private get _metricsTraceContext();
|
|
150
153
|
constructor(config?: NeurolinkConstructorConfig);
|
|
154
|
+
/**
|
|
155
|
+
* TaskManager — scheduled and self-running tasks.
|
|
156
|
+
* Lazy-initialized on first access. Configurable via constructor `tasks` option.
|
|
157
|
+
* The actual async initialization (Redis connect, backend start) happens
|
|
158
|
+
* lazily inside TaskManager on first operation.
|
|
159
|
+
*/
|
|
160
|
+
get tasks(): TaskManager;
|
|
151
161
|
/**
|
|
152
162
|
* Initialize provider registry with security settings
|
|
153
163
|
*/
|
|
@@ -173,6 +183,12 @@ export declare class NeuroLink {
|
|
|
173
183
|
* and registers them as direct tools so they're available to LLMs.
|
|
174
184
|
*/
|
|
175
185
|
private registerFileTools;
|
|
186
|
+
/**
|
|
187
|
+
* Register task management tools bound to a TaskManager instance.
|
|
188
|
+
* Follows the same factory + registry pattern as registerFileTools().
|
|
189
|
+
* Called when TaskManager is created (eagerly or lazily via the `tasks` getter).
|
|
190
|
+
*/
|
|
191
|
+
private registerTaskTools;
|
|
176
192
|
/**
|
|
177
193
|
* Register memory retrieval tools that allow the AI to access
|
|
178
194
|
* conversation history, including full tool outputs.
|
|
@@ -1893,6 +1909,7 @@ export declare class NeuroLink {
|
|
|
1893
1909
|
* @param config - Auth provider or configuration to create one
|
|
1894
1910
|
*/
|
|
1895
1911
|
setAuthProvider(config: NeuroLinkAuthConfig): Promise<void>;
|
|
1912
|
+
private initializeAuthProviderFromConfig;
|
|
1896
1913
|
/**
|
|
1897
1914
|
* Get the currently configured authentication provider
|
|
1898
1915
|
*/
|