@juspay/neurolink 5.1.0 → 5.2.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.
Files changed (166) hide show
  1. package/CHANGELOG.md +15 -9
  2. package/README.md +123 -126
  3. package/dist/agent/direct-tools.d.ts +6 -6
  4. package/dist/cli/commands/config.d.ts +3 -3
  5. package/dist/cli/commands/mcp.js +8 -7
  6. package/dist/cli/factories/command-factory.d.ts +4 -0
  7. package/dist/cli/factories/command-factory.js +57 -3
  8. package/dist/cli/index.js +87 -140
  9. package/dist/core/base-provider.d.ts +423 -0
  10. package/dist/core/base-provider.js +365 -0
  11. package/dist/core/constants.d.ts +1 -1
  12. package/dist/core/constants.js +1 -1
  13. package/dist/core/dynamic-models.d.ts +6 -6
  14. package/dist/core/evaluation.d.ts +19 -80
  15. package/dist/core/evaluation.js +185 -484
  16. package/dist/core/factory.d.ts +3 -3
  17. package/dist/core/factory.js +31 -91
  18. package/dist/core/service-registry.d.ts +47 -0
  19. package/dist/core/service-registry.js +112 -0
  20. package/dist/core/types.d.ts +8 -1
  21. package/dist/factories/compatibility-factory.js +1 -1
  22. package/dist/factories/provider-factory.d.ts +72 -0
  23. package/dist/factories/provider-factory.js +144 -0
  24. package/dist/factories/provider-registry.d.ts +38 -0
  25. package/dist/factories/provider-registry.js +107 -0
  26. package/dist/index.d.ts +4 -3
  27. package/dist/index.js +2 -4
  28. package/dist/lib/agent/direct-tools.d.ts +6 -6
  29. package/dist/lib/core/base-provider.d.ts +423 -0
  30. package/dist/lib/core/base-provider.js +365 -0
  31. package/dist/lib/core/constants.d.ts +1 -1
  32. package/dist/lib/core/constants.js +1 -1
  33. package/dist/lib/core/dynamic-models.d.ts +6 -6
  34. package/dist/lib/core/evaluation.d.ts +19 -80
  35. package/dist/lib/core/evaluation.js +185 -484
  36. package/dist/lib/core/factory.d.ts +3 -3
  37. package/dist/lib/core/factory.js +30 -91
  38. package/dist/lib/core/service-registry.d.ts +47 -0
  39. package/dist/lib/core/service-registry.js +112 -0
  40. package/dist/lib/core/types.d.ts +8 -1
  41. package/dist/lib/factories/compatibility-factory.js +1 -1
  42. package/dist/lib/factories/provider-factory.d.ts +72 -0
  43. package/dist/lib/factories/provider-factory.js +144 -0
  44. package/dist/lib/factories/provider-registry.d.ts +38 -0
  45. package/dist/lib/factories/provider-registry.js +107 -0
  46. package/dist/lib/index.d.ts +4 -3
  47. package/dist/lib/index.js +2 -4
  48. package/dist/lib/mcp/config.js +28 -3
  49. package/dist/lib/mcp/function-calling.js +1 -1
  50. package/dist/lib/mcp/initialize-tools.d.ts +1 -1
  51. package/dist/lib/mcp/initialize-tools.js +45 -1
  52. package/dist/lib/mcp/initialize.js +16 -6
  53. package/dist/lib/mcp/servers/agent/direct-tools-server.d.ts +8 -0
  54. package/dist/lib/mcp/servers/agent/direct-tools-server.js +109 -0
  55. package/dist/lib/mcp/servers/ai-providers/ai-core-server.js +3 -1
  56. package/dist/lib/mcp/servers/ai-providers/ai-workflow-tools.d.ts +2 -2
  57. package/dist/lib/mcp/unified-registry.d.ts +4 -0
  58. package/dist/lib/mcp/unified-registry.js +42 -9
  59. package/dist/lib/neurolink.d.ts +156 -117
  60. package/dist/lib/neurolink.js +619 -404
  61. package/dist/lib/providers/amazon-bedrock.d.ts +32 -0
  62. package/dist/lib/providers/amazon-bedrock.js +143 -0
  63. package/dist/lib/providers/analytics-helper.js +7 -4
  64. package/dist/lib/providers/anthropic-baseprovider.d.ts +23 -0
  65. package/dist/lib/providers/anthropic-baseprovider.js +114 -0
  66. package/dist/lib/providers/anthropic.d.ts +19 -43
  67. package/dist/lib/providers/anthropic.js +82 -306
  68. package/dist/lib/providers/azure-openai.d.ts +20 -0
  69. package/dist/lib/providers/azure-openai.js +89 -0
  70. package/dist/lib/providers/google-ai-studio.d.ts +23 -0
  71. package/dist/lib/providers/google-ai-studio.js +107 -0
  72. package/dist/lib/providers/google-vertex.d.ts +47 -0
  73. package/dist/lib/providers/google-vertex.js +205 -0
  74. package/dist/lib/providers/huggingFace.d.ts +32 -25
  75. package/dist/lib/providers/huggingFace.js +97 -431
  76. package/dist/lib/providers/index.d.ts +9 -9
  77. package/dist/lib/providers/index.js +9 -9
  78. package/dist/lib/providers/mcp-provider.js +4 -0
  79. package/dist/lib/providers/mistral.d.ts +42 -0
  80. package/dist/lib/providers/mistral.js +160 -0
  81. package/dist/lib/providers/ollama.d.ts +52 -36
  82. package/dist/lib/providers/ollama.js +297 -520
  83. package/dist/lib/providers/openAI.d.ts +19 -18
  84. package/dist/lib/providers/openAI.js +76 -275
  85. package/dist/lib/sdk/tool-extension.d.ts +181 -0
  86. package/dist/lib/sdk/tool-extension.js +283 -0
  87. package/dist/lib/sdk/tool-registration.d.ts +95 -0
  88. package/dist/lib/sdk/tool-registration.js +167 -0
  89. package/dist/lib/types/generate-types.d.ts +1 -0
  90. package/dist/lib/types/mcp-types.d.ts +116 -0
  91. package/dist/lib/types/mcp-types.js +5 -0
  92. package/dist/lib/types/stream-types.d.ts +30 -18
  93. package/dist/lib/types/universal-provider-options.d.ts +87 -0
  94. package/dist/lib/types/universal-provider-options.js +53 -0
  95. package/dist/mcp/config.js +28 -3
  96. package/dist/mcp/function-calling.js +1 -1
  97. package/dist/mcp/initialize-tools.d.ts +1 -1
  98. package/dist/mcp/initialize-tools.js +45 -1
  99. package/dist/mcp/initialize.js +16 -6
  100. package/dist/mcp/servers/agent/direct-tools-server.d.ts +8 -0
  101. package/dist/mcp/servers/agent/direct-tools-server.js +109 -0
  102. package/dist/mcp/servers/ai-providers/ai-core-server.js +3 -1
  103. package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +2 -2
  104. package/dist/mcp/unified-registry.d.ts +4 -0
  105. package/dist/mcp/unified-registry.js +42 -9
  106. package/dist/neurolink.d.ts +156 -117
  107. package/dist/neurolink.js +619 -404
  108. package/dist/providers/amazon-bedrock.d.ts +32 -0
  109. package/dist/providers/amazon-bedrock.js +143 -0
  110. package/dist/providers/analytics-helper.js +7 -4
  111. package/dist/providers/anthropic-baseprovider.d.ts +23 -0
  112. package/dist/providers/anthropic-baseprovider.js +114 -0
  113. package/dist/providers/anthropic.d.ts +19 -43
  114. package/dist/providers/anthropic.js +81 -305
  115. package/dist/providers/azure-openai.d.ts +20 -0
  116. package/dist/providers/azure-openai.js +89 -0
  117. package/dist/providers/google-ai-studio.d.ts +23 -0
  118. package/dist/providers/google-ai-studio.js +108 -0
  119. package/dist/providers/google-vertex.d.ts +47 -0
  120. package/dist/providers/google-vertex.js +205 -0
  121. package/dist/providers/huggingFace.d.ts +32 -25
  122. package/dist/providers/huggingFace.js +96 -430
  123. package/dist/providers/index.d.ts +9 -9
  124. package/dist/providers/index.js +9 -9
  125. package/dist/providers/mcp-provider.js +4 -0
  126. package/dist/providers/mistral.d.ts +42 -0
  127. package/dist/providers/mistral.js +160 -0
  128. package/dist/providers/ollama.d.ts +52 -36
  129. package/dist/providers/ollama.js +297 -519
  130. package/dist/providers/openAI.d.ts +19 -18
  131. package/dist/providers/openAI.js +76 -276
  132. package/dist/sdk/tool-extension.d.ts +181 -0
  133. package/dist/sdk/tool-extension.js +283 -0
  134. package/dist/sdk/tool-registration.d.ts +95 -0
  135. package/dist/sdk/tool-registration.js +168 -0
  136. package/dist/types/generate-types.d.ts +1 -0
  137. package/dist/types/mcp-types.d.ts +116 -0
  138. package/dist/types/mcp-types.js +5 -0
  139. package/dist/types/stream-types.d.ts +30 -18
  140. package/dist/types/universal-provider-options.d.ts +87 -0
  141. package/dist/types/universal-provider-options.js +53 -0
  142. package/package.json +15 -10
  143. package/dist/lib/providers/agent-enhanced-provider.d.ts +0 -93
  144. package/dist/lib/providers/agent-enhanced-provider.js +0 -605
  145. package/dist/lib/providers/amazonBedrock.d.ts +0 -28
  146. package/dist/lib/providers/amazonBedrock.js +0 -364
  147. package/dist/lib/providers/azureOpenAI.d.ts +0 -42
  148. package/dist/lib/providers/azureOpenAI.js +0 -347
  149. package/dist/lib/providers/googleAIStudio.d.ts +0 -42
  150. package/dist/lib/providers/googleAIStudio.js +0 -364
  151. package/dist/lib/providers/googleVertexAI.d.ts +0 -34
  152. package/dist/lib/providers/googleVertexAI.js +0 -547
  153. package/dist/lib/providers/mistralAI.d.ts +0 -37
  154. package/dist/lib/providers/mistralAI.js +0 -325
  155. package/dist/providers/agent-enhanced-provider.d.ts +0 -93
  156. package/dist/providers/agent-enhanced-provider.js +0 -606
  157. package/dist/providers/amazonBedrock.d.ts +0 -28
  158. package/dist/providers/amazonBedrock.js +0 -364
  159. package/dist/providers/azureOpenAI.d.ts +0 -42
  160. package/dist/providers/azureOpenAI.js +0 -348
  161. package/dist/providers/googleAIStudio.d.ts +0 -42
  162. package/dist/providers/googleAIStudio.js +0 -364
  163. package/dist/providers/googleVertexAI.d.ts +0 -34
  164. package/dist/providers/googleVertexAI.js +0 -547
  165. package/dist/providers/mistralAI.d.ts +0 -37
  166. package/dist/providers/mistralAI.js +0 -325
@@ -1,6 +1,25 @@
1
1
  import type { ZodType, ZodTypeDef } from "zod";
2
2
  import type { Tool, Schema } from "ai";
3
3
  import type { AIProviderName, AnalyticsData, EvaluationData } from "../core/types.js";
4
+ /**
5
+ * Interface for tool execution calls
6
+ */
7
+ export interface ToolCall {
8
+ toolName: string;
9
+ parameters: Record<string, any>;
10
+ id?: string;
11
+ }
12
+ /**
13
+ * Interface for tool execution results
14
+ */
15
+ export interface ToolResult {
16
+ toolName: string;
17
+ status: "success" | "failure";
18
+ output?: any;
19
+ error?: string;
20
+ id?: string;
21
+ executionTime?: number;
22
+ }
4
23
  /**
5
24
  * Stream function options interface - Primary method for streaming content
6
25
  * Future-ready for multi-modal capabilities while maintaining text focus
@@ -26,6 +45,7 @@ export interface StreamOptions {
26
45
  tools?: Record<string, Tool>;
27
46
  timeout?: number | string;
28
47
  disableTools?: boolean;
48
+ maxSteps?: number;
29
49
  enableEvaluation?: boolean;
30
50
  enableAnalytics?: boolean;
31
51
  context?: Record<string, any>;
@@ -46,30 +66,22 @@ export interface StreamResult {
46
66
  }>;
47
67
  provider?: string;
48
68
  model?: string;
69
+ usage?: {
70
+ inputTokens?: number;
71
+ outputTokens?: number;
72
+ totalTokens?: number;
73
+ };
74
+ finishReason?: string;
75
+ toolCalls?: ToolCall[];
76
+ toolResults?: ToolResult[];
49
77
  metadata?: {
50
78
  streamId?: string;
51
79
  startTime?: number;
52
80
  totalChunks?: number;
53
81
  estimatedDuration?: number;
82
+ responseTime?: number;
83
+ fallback?: boolean;
54
84
  };
55
- toolCalls?: Array<{
56
- toolCallId: string;
57
- toolName: string;
58
- args: Record<string, any>;
59
- }>;
60
- toolsUsed?: string[];
61
- toolExecutions?: Array<{
62
- name: string;
63
- input: Record<string, any>;
64
- output: any;
65
- duration: number;
66
- }>;
67
- enhancedWithTools?: boolean;
68
- availableTools?: Array<{
69
- name: string;
70
- description: string;
71
- parameters: Record<string, any>;
72
- }>;
73
85
  analytics?: AnalyticsData;
74
86
  evaluation?: EvaluationData;
75
87
  }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * Universal Provider Options Interface (Phase 1: Factory Pattern)
3
+ * Based on TypeScript factory pattern best practices for AI provider abstraction
4
+ */
5
+ /**
6
+ * Base configuration interface for all AI providers
7
+ * Uses Parameter Object Pattern for flexible, extensible configuration
8
+ */
9
+ export interface UniversalProviderOptions {
10
+ prompt?: string;
11
+ model?: string;
12
+ temperature?: number;
13
+ maxTokens?: number;
14
+ systemPrompt?: string;
15
+ enableAnalytics?: boolean;
16
+ enableEvaluation?: boolean;
17
+ context?: Record<string, unknown>;
18
+ metadata?: Record<string, unknown>;
19
+ extensionOptions?: Record<string, unknown>;
20
+ }
21
+ /**
22
+ * Generic provider options (without providerType)
23
+ */
24
+ export type GenericProviderOptions = Omit<UniversalProviderOptions, "providerType">;
25
+ /**
26
+ * Provider-specific configuration extensions
27
+ * Discriminated union pattern for type-safe provider configs
28
+ */
29
+ export interface OpenAIProviderOptions extends UniversalProviderOptions {
30
+ providerType: "openai";
31
+ organization?: string;
32
+ seed?: number;
33
+ topP?: number;
34
+ }
35
+ export interface GoogleAIProviderOptions extends UniversalProviderOptions {
36
+ providerType: "google-ai";
37
+ topK?: number;
38
+ candidateCount?: number;
39
+ stopSequences?: string[];
40
+ }
41
+ export interface AnthropicProviderOptions extends UniversalProviderOptions {
42
+ providerType: "anthropic";
43
+ topK?: number;
44
+ stopSequences?: string[];
45
+ }
46
+ export interface BedrockProviderOptions extends UniversalProviderOptions {
47
+ providerType: "bedrock";
48
+ inferenceProfileArn?: string;
49
+ region?: string;
50
+ }
51
+ /**
52
+ * Discriminated union for type-safe provider configuration
53
+ * Enables compile-time type checking for provider-specific options
54
+ */
55
+ export type ProviderSpecificOptions = OpenAIProviderOptions | GoogleAIProviderOptions | AnthropicProviderOptions | BedrockProviderOptions;
56
+ /**
57
+ * Factory configuration interface
58
+ * Supports both universal and provider-specific parameters
59
+ */
60
+ export interface ProviderFactoryConfig {
61
+ providerName: string;
62
+ modelName?: string;
63
+ options?: UniversalProviderOptions | ProviderSpecificOptions;
64
+ enableMCP?: boolean;
65
+ }
66
+ /**
67
+ * Parameter normalization utilities
68
+ * Converts between different parameter formats for backward compatibility
69
+ */
70
+ export declare class ParameterNormalizer {
71
+ /**
72
+ * Normalize legacy parameter formats to universal format
73
+ */
74
+ static normalizeToUniversal(optionsOrPrompt: UniversalProviderOptions | string): UniversalProviderOptions;
75
+ /**
76
+ * Retrieve the provider type if it exists, otherwise return null
77
+ */
78
+ private static getProviderType;
79
+ /**
80
+ * Extract provider-specific parameters safely
81
+ */
82
+ static extractProviderOptions<T extends ProviderSpecificOptions>(options: UniversalProviderOptions | ProviderSpecificOptions, providerType: T["providerType"]): T | GenericProviderOptions;
83
+ /**
84
+ * Merge default values with user-provided options
85
+ */
86
+ static mergeWithDefaults(options: UniversalProviderOptions, defaults: Partial<UniversalProviderOptions>): UniversalProviderOptions;
87
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Universal Provider Options Interface (Phase 1: Factory Pattern)
3
+ * Based on TypeScript factory pattern best practices for AI provider abstraction
4
+ */
5
+ /**
6
+ * Parameter normalization utilities
7
+ * Converts between different parameter formats for backward compatibility
8
+ */
9
+ export class ParameterNormalizer {
10
+ /**
11
+ * Normalize legacy parameter formats to universal format
12
+ */
13
+ static normalizeToUniversal(optionsOrPrompt) {
14
+ if (typeof optionsOrPrompt === "string") {
15
+ return { prompt: optionsOrPrompt };
16
+ }
17
+ return optionsOrPrompt;
18
+ }
19
+ /**
20
+ * Retrieve the provider type if it exists, otherwise return null
21
+ */
22
+ static getProviderType(options) {
23
+ return "providerType" in options ? options.providerType : null;
24
+ }
25
+ /**
26
+ * Extract provider-specific parameters safely
27
+ */
28
+ static extractProviderOptions(options, providerType) {
29
+ const currentProviderType = ParameterNormalizer.getProviderType(options);
30
+ if (currentProviderType === providerType) {
31
+ return options;
32
+ }
33
+ // Handle case where options has providerType but doesn't match
34
+ if (currentProviderType !== null) {
35
+ const { providerType: _providerType, ...genericOptions } = options;
36
+ return genericOptions;
37
+ }
38
+ // Options don't have providerType, return as generic
39
+ return options;
40
+ }
41
+ /**
42
+ * Merge default values with user-provided options
43
+ */
44
+ static mergeWithDefaults(options, defaults) {
45
+ return {
46
+ ...defaults,
47
+ ...options,
48
+ // Merge nested objects
49
+ context: { ...defaults.context, ...options.context },
50
+ metadata: { ...defaults.metadata, ...options.metadata },
51
+ };
52
+ }
53
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",
@@ -124,10 +124,13 @@
124
124
  "dependencies": {
125
125
  "@ai-sdk/amazon-bedrock": "^1.0.0",
126
126
  "@ai-sdk/anthropic": "^1.2.12",
127
+ "@ai-sdk/azure": "^1.3.24",
127
128
  "@ai-sdk/google": "^1.2.19",
128
129
  "@ai-sdk/google-vertex": "^2.2.0",
129
130
  "@ai-sdk/mistral": "^1.0.0",
130
131
  "@ai-sdk/openai": "^1.0.0",
132
+ "@ai-sdk/provider": "^1.1.3",
133
+ "@ai-sdk/provider-utils": "^2.2.8",
131
134
  "@google/generative-ai": "^0.24.1",
132
135
  "@huggingface/inference": "^2.8.0",
133
136
  "@modelcontextprotocol/sdk": "^1.13.0",
@@ -145,25 +148,26 @@
145
148
  "@opentelemetry/sdk-metrics": "^1.30.1",
146
149
  "@opentelemetry/sdk-node": "^0.54.2",
147
150
  "@opentelemetry/semantic-conventions": "^1.34.0",
148
- "@types/ws": "^8.18.1",
149
151
  "ai": "^4.0.0",
150
- "chalk": "^5.3.0",
151
- "cors": "^2.8.5",
152
152
  "dotenv": "^16.5.0",
153
- "express": "^5.1.0",
154
- "inquirer": "^9.2.15",
155
- "ora": "^7.0.1",
156
- "playwright": "^1.52.0",
153
+ "ollama-ai-provider": "^1.2.0",
157
154
  "reconnecting-eventsource": "^1.6.4",
158
155
  "undici": "^6.6.2",
159
156
  "uuid": "^11.1.0",
160
157
  "ws": "^8.18.3",
161
- "yargs": "^17.7.2",
162
158
  "zod": "^3.22.0",
163
- "zod-to-json-schema": "^3.24.5"
159
+ "zod-to-json-schema": "^3.24.5",
160
+ "chalk": "^5.3.0",
161
+ "inquirer": "^9.2.15",
162
+ "ora": "^7.0.1",
163
+ "yargs": "^17.7.2"
164
164
  },
165
165
  "devDependencies": {
166
166
  "@changesets/cli": "^2.26.2",
167
+ "@types/ws": "^8.18.1",
168
+ "@vitest/coverage-v8": "^2.1.9",
169
+ "cors": "^2.8.5",
170
+ "express": "^5.1.0",
167
171
  "@eslint/js": "^9.0.0",
168
172
  "@semantic-release/changelog": "^6.0.3",
169
173
  "@semantic-release/commit-analyzer": "^13.0.0",
@@ -183,6 +187,7 @@
183
187
  "@typescript-eslint/eslint-plugin": "^8.0.0",
184
188
  "@typescript-eslint/parser": "^8.0.0",
185
189
  "eslint": "^9.0.0",
190
+ "playwright": "^1.52.0",
186
191
  "prettier": "^3.0.0",
187
192
  "publint": "^0.3.2",
188
193
  "puppeteer": "^24.10.0",
@@ -1,93 +0,0 @@
1
- /**
2
- * Agent-Enhanced Provider for NeuroLink CLI
3
- * Integrates direct tools with AI providers for true agent functionality
4
- */
5
- import type { GenerateResult } from "../types/generate-types.js";
6
- import type { AIProvider, TextGenerationOptions, EnhancedGenerateResult } from "../core/types.js";
7
- import type { StreamOptions, StreamResult } from "../types/stream-types.js";
8
- /**
9
- * Agent configuration options
10
- */
11
- interface AgentConfig {
12
- provider: "openai" | "google-ai" | "anthropic";
13
- model?: string;
14
- toolCategory?: "basic" | "filesystem" | "utility" | "all";
15
- maxSteps?: number;
16
- enableTools?: boolean;
17
- enableMCP?: boolean;
18
- mcpInitTimeoutMs?: number;
19
- toolExecutionTimeout?: number | string;
20
- mcpDiscoveryOptions?: {
21
- searchPaths?: string[];
22
- configFiles?: string[];
23
- autoDiscover?: boolean;
24
- };
25
- }
26
- /**
27
- * Agent-Enhanced Provider Class
28
- * Provides AI generation with tool calling capabilities
29
- * Now includes MCP tool integration alongside direct tools
30
- */
31
- export declare class AgentEnhancedProvider implements AIProvider {
32
- private config;
33
- private model;
34
- private resolvedModelName;
35
- private mcpSystem;
36
- private mcpInitialized;
37
- private mcpInitializing;
38
- private mcpInitFailed;
39
- constructor(config: AgentConfig);
40
- private createModel;
41
- /**
42
- * Initialize MCP registry with auto-discovery
43
- */
44
- private initializeMCP;
45
- /**
46
- * Get combined tools: direct tools + MCP tools
47
- */
48
- private getCombinedTools;
49
- /**
50
- * PRIMARY METHOD: Stream content using AI (recommended for new code)
51
- * Future-ready for multi-modal capabilities with current text focus
52
- */
53
- stream(optionsOrPrompt: StreamOptions | string, analysisSchema?: any): Promise<StreamResult>;
54
- generate(optionsOrPrompt: TextGenerationOptions | string): Promise<GenerateResult>;
55
- /**
56
- * Determine if we should force tool usage based on prompt patterns
57
- */
58
- private shouldForceToolUsage;
59
- getCapabilities(): string[];
60
- getProviderName(): string;
61
- getModelName(): string;
62
- /**
63
- * Test agent functionality
64
- */
65
- testAgentCapabilities(): Promise<{
66
- success: boolean;
67
- results: any[];
68
- }>;
69
- /**
70
- * Create agent-enhanced provider factory
71
- */
72
- static createAgent(config: AgentConfig): AgentEnhancedProvider;
73
- /**
74
- * Create multiple agent providers for comparison
75
- */
76
- static createMultiProviderAgents(): Record<string, AgentEnhancedProvider>;
77
- /**
78
- * Alias for generate() - CLI-SDK consistency
79
- */
80
- /**
81
- * Short alias for generate() - CLI-SDK consistency
82
- */
83
- gen(optionsOrPrompt: TextGenerationOptions | string, analysisSchema?: any): Promise<EnhancedGenerateResult | null>;
84
- }
85
- /**
86
- * Helper function to create agent provider
87
- */
88
- export declare function createAgentProvider(provider: "openai" | "google-ai" | "anthropic", options?: Partial<AgentConfig>): AgentEnhancedProvider;
89
- /**
90
- * Test all available agent providers
91
- */
92
- export declare function testAllAgentProviders(): Promise<void>;
93
- export {};