@juspay/neurolink 9.41.0 → 9.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +7 -1
- package/dist/auth/anthropicOAuth.d.ts +18 -3
- package/dist/auth/anthropicOAuth.js +149 -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 +354 -334
- package/dist/cli/commands/mcp.d.ts +6 -0
- package/dist/cli/commands/mcp.js +188 -181
- package/dist/cli/commands/proxy.d.ts +2 -1
- package/dist/cli/commands/proxy.js +713 -431
- package/dist/cli/commands/task.js +3 -0
- package/dist/cli/factories/commandFactory.d.ts +2 -0
- package/dist/cli/factories/commandFactory.js +38 -0
- package/dist/cli/parser.js +4 -3
- package/dist/client/aiSdkAdapter.js +3 -0
- package/dist/client/streamingClient.js +30 -10
- package/dist/core/baseProvider.d.ts +6 -1
- package/dist/core/baseProvider.js +208 -230
- package/dist/core/factory.d.ts +3 -0
- package/dist/core/factory.js +138 -188
- 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 +24 -9
- package/dist/evaluation/pipeline/strategies/batchStrategy.js +6 -3
- package/dist/evaluation/pipeline/strategies/samplingStrategy.js +18 -10
- package/dist/evaluation/scorers/scorerRegistry.d.ts +3 -0
- package/dist/evaluation/scorers/scorerRegistry.js +353 -282
- package/dist/lib/auth/anthropicOAuth.d.ts +18 -3
- package/dist/lib/auth/anthropicOAuth.js +149 -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/baseProvider.d.ts +6 -1
- package/dist/lib/core/baseProvider.js +208 -230
- package/dist/lib/core/factory.d.ts +3 -0
- package/dist/lib/core/factory.js +138 -188
- 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 +24 -9
- package/dist/lib/evaluation/pipeline/strategies/batchStrategy.js +6 -3
- package/dist/lib/evaluation/pipeline/strategies/samplingStrategy.js +18 -10
- package/dist/lib/evaluation/scorers/scorerRegistry.d.ts +3 -0
- package/dist/lib/evaluation/scorers/scorerRegistry.js +353 -282
- package/dist/lib/mcp/toolRegistry.d.ts +2 -0
- package/dist/lib/mcp/toolRegistry.js +32 -31
- package/dist/lib/neurolink.d.ts +41 -2
- package/dist/lib/neurolink.js +1616 -1681
- 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 -6
- package/dist/lib/providers/googleVertex.d.ts +10 -0
- package/dist/lib/providers/googleVertex.js +437 -423
- package/dist/lib/providers/huggingFace.d.ts +3 -3
- package/dist/lib/providers/huggingFace.js +6 -8
- package/dist/lib/providers/litellm.d.ts +1 -0
- package/dist/lib/providers/litellm.js +76 -55
- package/dist/lib/providers/mistral.js +2 -1
- package/dist/lib/providers/ollama.js +93 -23
- package/dist/lib/providers/openAI.d.ts +2 -0
- package/dist/lib/providers/openAI.js +141 -141
- 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 +27 -14
- 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 +289 -316
- package/dist/lib/proxy/proxyConfig.js +46 -24
- package/dist/lib/proxy/proxyEnv.d.ts +19 -0
- package/dist/lib/proxy/proxyEnv.js +73 -0
- package/dist/lib/proxy/proxyFetch.js +291 -217
- 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 +503 -47
- package/dist/lib/proxy/sseInterceptor.d.ts +97 -0
- package/dist/lib/proxy/sseInterceptor.js +427 -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 +17 -3
- package/dist/lib/server/routes/claudeProxyRoutes.js +3032 -1349
- package/dist/lib/services/server/ai/observability/instrumentation.d.ts +7 -1
- package/dist/lib/services/server/ai/observability/instrumentation.js +337 -161
- package/dist/lib/tasks/backends/bullmqBackend.d.ts +1 -0
- package/dist/lib/tasks/backends/bullmqBackend.js +35 -22
- package/dist/lib/tasks/store/redisTaskStore.d.ts +1 -0
- package/dist/lib/tasks/store/redisTaskStore.js +54 -39
- package/dist/lib/tasks/taskManager.d.ts +5 -0
- package/dist/lib/tasks/taskManager.js +158 -30
- 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 +69 -5
- package/dist/lib/types/cli.d.ts +10 -0
- package/dist/lib/types/proxyTypes.d.ts +160 -5
- package/dist/lib/types/streamTypes.d.ts +25 -3
- package/dist/lib/utils/messageBuilder.js +3 -2
- package/dist/lib/utils/providerHealth.d.ts +19 -0
- package/dist/lib/utils/providerHealth.js +279 -33
- package/dist/lib/utils/providerUtils.js +17 -22
- package/dist/lib/utils/toolChoice.d.ts +4 -0
- package/dist/lib/utils/toolChoice.js +7 -0
- package/dist/mcp/toolRegistry.d.ts +2 -0
- package/dist/mcp/toolRegistry.js +32 -31
- package/dist/neurolink.d.ts +41 -2
- package/dist/neurolink.js +1616 -1681
- 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 -6
- package/dist/providers/googleVertex.d.ts +10 -0
- package/dist/providers/googleVertex.js +437 -423
- package/dist/providers/huggingFace.d.ts +3 -3
- package/dist/providers/huggingFace.js +6 -7
- package/dist/providers/litellm.d.ts +1 -0
- package/dist/providers/litellm.js +76 -55
- package/dist/providers/mistral.js +2 -1
- package/dist/providers/ollama.js +93 -23
- package/dist/providers/openAI.d.ts +2 -0
- package/dist/providers/openAI.js +141 -141
- 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 +27 -14
- 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 +289 -316
- package/dist/proxy/proxyConfig.js +46 -24
- package/dist/proxy/proxyEnv.d.ts +19 -0
- package/dist/proxy/proxyEnv.js +72 -0
- package/dist/proxy/proxyFetch.js +291 -217
- 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 +503 -47
- package/dist/proxy/sseInterceptor.d.ts +97 -0
- package/dist/proxy/sseInterceptor.js +426 -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 +17 -3
- package/dist/server/routes/claudeProxyRoutes.js +3032 -1349
- package/dist/services/server/ai/observability/instrumentation.d.ts +7 -1
- package/dist/services/server/ai/observability/instrumentation.js +337 -161
- package/dist/tasks/backends/bullmqBackend.d.ts +1 -0
- package/dist/tasks/backends/bullmqBackend.js +35 -22
- package/dist/tasks/store/redisTaskStore.d.ts +1 -0
- package/dist/tasks/store/redisTaskStore.js +54 -39
- package/dist/tasks/taskManager.d.ts +5 -0
- package/dist/tasks/taskManager.js +158 -30
- 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 +69 -5
- package/dist/types/cli.d.ts +10 -0
- package/dist/types/proxyTypes.d.ts +160 -5
- package/dist/types/streamTypes.d.ts +25 -3
- package/dist/utils/messageBuilder.js +3 -2
- package/dist/utils/providerHealth.d.ts +19 -0
- package/dist/utils/providerHealth.js +279 -33
- package/dist/utils/providerUtils.js +18 -22
- 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 -2
- 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 +215 -0
- package/scripts/observability/otel-collector.proxy-observability.yaml +78 -0
- package/scripts/observability/proxy-observability.env.example +23 -0
|
@@ -341,6 +341,9 @@ export class TaskCommandFactory {
|
|
|
341
341
|
schedule = { type: "interval", every: parseDuration(argv.every) };
|
|
342
342
|
}
|
|
343
343
|
else {
|
|
344
|
+
if (!argv.at) {
|
|
345
|
+
throw new Error("One-time tasks require --at");
|
|
346
|
+
}
|
|
344
347
|
schedule = { type: "once", at: argv.at };
|
|
345
348
|
}
|
|
346
349
|
const now = new Date().toISOString();
|
|
@@ -10,6 +10,8 @@ export declare class CLICommandFactory {
|
|
|
10
10
|
private static processCliPDFFiles;
|
|
11
11
|
private static processCliFiles;
|
|
12
12
|
private static processCliVideoFiles;
|
|
13
|
+
private static isNonLocalFileReference;
|
|
14
|
+
private static validateCliInputFiles;
|
|
13
15
|
private static processOptions;
|
|
14
16
|
/**
|
|
15
17
|
* Validate Anthropic subscription options
|
|
@@ -480,6 +480,42 @@ export class CLICommandFactory {
|
|
|
480
480
|
// URLs are preserved as-is by resolveFilePaths
|
|
481
481
|
return resolveFilePaths(paths);
|
|
482
482
|
}
|
|
483
|
+
static isNonLocalFileReference(filePath) {
|
|
484
|
+
const lower = filePath.toLowerCase();
|
|
485
|
+
return (lower.startsWith("http://") ||
|
|
486
|
+
lower.startsWith("https://") ||
|
|
487
|
+
lower.startsWith("file://") ||
|
|
488
|
+
lower.startsWith("data:"));
|
|
489
|
+
}
|
|
490
|
+
static validateCliInputFiles(argv) {
|
|
491
|
+
const fileArgs = [
|
|
492
|
+
{ option: "--image", value: argv.image },
|
|
493
|
+
{ option: "--csv", value: argv.csv },
|
|
494
|
+
{ option: "--pdf", value: argv.pdf },
|
|
495
|
+
{ option: "--video", value: argv.video },
|
|
496
|
+
{ option: "--file", value: argv.file },
|
|
497
|
+
];
|
|
498
|
+
const missingPaths = [];
|
|
499
|
+
for (const { option, value } of fileArgs) {
|
|
500
|
+
if (!value) {
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
const rawPaths = Array.isArray(value) ? value : [value];
|
|
504
|
+
const resolvedPaths = resolveFilePaths(rawPaths);
|
|
505
|
+
for (let i = 0; i < resolvedPaths.length; i++) {
|
|
506
|
+
const resolvedPath = resolvedPaths[i];
|
|
507
|
+
if (CLICommandFactory.isNonLocalFileReference(resolvedPath)) {
|
|
508
|
+
continue;
|
|
509
|
+
}
|
|
510
|
+
if (!fs.existsSync(resolvedPath)) {
|
|
511
|
+
missingPaths.push(`${option} path not found: ${rawPaths[i]} (resolved to ${resolvedPath})`);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (missingPaths.length > 0) {
|
|
516
|
+
throw new Error(`One or more input files do not exist:\n${missingPaths.join("\n")}`);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
483
519
|
// Helper method to process common options
|
|
484
520
|
static processOptions(argv) {
|
|
485
521
|
// Handle noColor option by disabling chalk
|
|
@@ -1762,6 +1798,7 @@ export class CLICommandFactory {
|
|
|
1762
1798
|
if (options.delay) {
|
|
1763
1799
|
await new Promise((resolve) => setTimeout(resolve, options.delay));
|
|
1764
1800
|
}
|
|
1801
|
+
CLICommandFactory.validateCliInputFiles(argv);
|
|
1765
1802
|
// Process context
|
|
1766
1803
|
const { inputText, contextMetadata } = CLICommandFactory.processGenerateContext(rawInput, options);
|
|
1767
1804
|
// Handle dry-run mode for testing
|
|
@@ -2355,6 +2392,7 @@ export class CLICommandFactory {
|
|
|
2355
2392
|
if (options.delay) {
|
|
2356
2393
|
await new Promise((resolve) => setTimeout(resolve, options.delay));
|
|
2357
2394
|
}
|
|
2395
|
+
CLICommandFactory.validateCliInputFiles(argv);
|
|
2358
2396
|
const { inputText, contextMetadata } = await CLICommandFactory.processStreamContext(argv, options);
|
|
2359
2397
|
// Handle dry-run mode for testing
|
|
2360
2398
|
if (options.dryRun) {
|
package/dist/cli/parser.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ServeCommandFactory } from "./commands/serve.js";
|
|
|
13
13
|
import { ragCommand } from "./commands/rag.js";
|
|
14
14
|
import { ObservabilityCommandFactory } from "./commands/observability.js";
|
|
15
15
|
import { TelemetryCommandFactory } from "./commands/telemetry.js";
|
|
16
|
-
import { proxyStartCommand, proxyStatusCommand, proxySetupCommand, proxyGuardCommand, proxyInstallCommand, proxyUninstallCommand, } from "./commands/proxy.js";
|
|
16
|
+
import { proxyStartCommand, proxyStatusCommand, proxyTelemetryCommand, proxySetupCommand, proxyGuardCommand, proxyInstallCommand, proxyUninstallCommand, } from "./commands/proxy.js";
|
|
17
17
|
import { EvaluateCommandFactory } from "./commands/evaluate.js";
|
|
18
18
|
import { TaskCommandFactory } from "./commands/task.js";
|
|
19
19
|
// Enhanced CLI with Professional UX
|
|
@@ -187,16 +187,17 @@ export function initializeCliParser() {
|
|
|
187
187
|
.command(AuthCommandFactory.createAuthCommands())
|
|
188
188
|
// Proxy Commands - Claude multi-account proxy
|
|
189
189
|
.command({
|
|
190
|
-
command: "proxy
|
|
190
|
+
command: "proxy",
|
|
191
191
|
describe: "Manage Claude multi-account proxy server",
|
|
192
192
|
builder: (yargs) => yargs
|
|
193
193
|
.command(proxyStartCommand)
|
|
194
194
|
.command(proxyStatusCommand)
|
|
195
|
+
.command(proxyTelemetryCommand)
|
|
195
196
|
.command(proxySetupCommand)
|
|
196
197
|
.command(proxyGuardCommand)
|
|
197
198
|
.command(proxyInstallCommand)
|
|
198
199
|
.command(proxyUninstallCommand)
|
|
199
|
-
.demandCommand(1, "Please specify a proxy subcommand: start, status, setup, guard, install, or uninstall"),
|
|
200
|
+
.demandCommand(1, "Please specify a proxy subcommand: start, status, telemetry <setup|start|stop|status|logs|import-dashboard>, setup, guard, install, or uninstall"),
|
|
200
201
|
handler: () => { },
|
|
201
202
|
})
|
|
202
203
|
// Evaluate Command Group - Using EvaluateCommandFactory
|
|
@@ -251,10 +251,12 @@ export class SSEClient {
|
|
|
251
251
|
* Register event handler
|
|
252
252
|
*/
|
|
253
253
|
on(event, callback) {
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
let handlers = this.eventHandlers.get(event);
|
|
255
|
+
if (!handlers) {
|
|
256
|
+
handlers = new Set();
|
|
257
|
+
this.eventHandlers.set(event, handlers);
|
|
256
258
|
}
|
|
257
|
-
|
|
259
|
+
handlers.add(callback);
|
|
258
260
|
}
|
|
259
261
|
/**
|
|
260
262
|
* Remove event handler
|
|
@@ -315,7 +317,11 @@ export class SSEClient {
|
|
|
315
317
|
});
|
|
316
318
|
while (!done && !error) {
|
|
317
319
|
if (events.length > 0) {
|
|
318
|
-
|
|
320
|
+
const nextEvent = events.shift();
|
|
321
|
+
if (!nextEvent) {
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
yield nextEvent;
|
|
319
325
|
}
|
|
320
326
|
else {
|
|
321
327
|
await new Promise((resolve) => {
|
|
@@ -325,7 +331,11 @@ export class SSEClient {
|
|
|
325
331
|
}
|
|
326
332
|
// Yield remaining events
|
|
327
333
|
while (events.length > 0) {
|
|
328
|
-
|
|
334
|
+
const nextEvent = events.shift();
|
|
335
|
+
if (!nextEvent) {
|
|
336
|
+
continue;
|
|
337
|
+
}
|
|
338
|
+
yield nextEvent;
|
|
329
339
|
}
|
|
330
340
|
if (error) {
|
|
331
341
|
throw error;
|
|
@@ -545,10 +555,12 @@ export class WebSocketStreamingClient {
|
|
|
545
555
|
* Register event handler
|
|
546
556
|
*/
|
|
547
557
|
on(event, callback) {
|
|
548
|
-
|
|
549
|
-
|
|
558
|
+
let handlers = this.eventHandlers.get(event);
|
|
559
|
+
if (!handlers) {
|
|
560
|
+
handlers = new Set();
|
|
561
|
+
this.eventHandlers.set(event, handlers);
|
|
550
562
|
}
|
|
551
|
-
|
|
563
|
+
handlers.add(callback);
|
|
552
564
|
}
|
|
553
565
|
/**
|
|
554
566
|
* Remove event handler
|
|
@@ -591,7 +603,11 @@ export class WebSocketStreamingClient {
|
|
|
591
603
|
try {
|
|
592
604
|
while (!disconnected) {
|
|
593
605
|
if (messageQueue.length > 0) {
|
|
594
|
-
|
|
606
|
+
const nextMessage = messageQueue.shift();
|
|
607
|
+
if (nextMessage === undefined) {
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
610
|
+
yield nextMessage;
|
|
595
611
|
}
|
|
596
612
|
else {
|
|
597
613
|
await new Promise((resolve) => {
|
|
@@ -601,7 +617,11 @@ export class WebSocketStreamingClient {
|
|
|
601
617
|
}
|
|
602
618
|
// Yield remaining messages
|
|
603
619
|
while (messageQueue.length > 0) {
|
|
604
|
-
|
|
620
|
+
const nextMessage = messageQueue.shift();
|
|
621
|
+
if (nextMessage === undefined) {
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
yield nextMessage;
|
|
605
625
|
}
|
|
606
626
|
}
|
|
607
627
|
finally {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LanguageModel, ModelMessage, Tool } from "ai";
|
|
2
2
|
import type { AIProviderName } from "../constants/enums.js";
|
|
3
3
|
import type { EvaluationData } from "../index.js";
|
|
4
4
|
import type { NeuroLink } from "../neurolink.js";
|
|
@@ -136,6 +136,11 @@ export declare abstract class BaseProvider implements AIProvider {
|
|
|
136
136
|
* Alias for generate method - implements AIProvider interface
|
|
137
137
|
*/
|
|
138
138
|
gen(optionsOrPrompt: TextGenerationOptions | string, analysisSchema?: ValidationSchema): Promise<EnhancedGenerateResult | null>;
|
|
139
|
+
private runGenerateInActiveContext;
|
|
140
|
+
private handleDirectTTSSynthesis;
|
|
141
|
+
private handleVideoFrameGeneration;
|
|
142
|
+
private executeStandardGenerateFlow;
|
|
143
|
+
private synthesizeAIResponseIfNeeded;
|
|
139
144
|
/**
|
|
140
145
|
* BACKWARD COMPATIBILITY: Legacy generateText method
|
|
141
146
|
* Converts EnhancedGenerateResult to TextGenerationResult format
|