@juspay/neurolink 9.44.0 → 9.44.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 +2 -0
- package/dist/browser/neurolink.min.js +258 -258
- package/dist/cli/commands/authProviders.d.ts +1 -1
- package/dist/cli/commands/task.js +1 -1
- package/dist/cli/errorHandler.js +1 -1
- package/dist/cli/factories/commandFactory.js +1 -1
- package/dist/cli/loop/conversationSelector.d.ts +2 -2
- package/dist/cli/loop/optionsSchema.d.ts +2 -2
- package/dist/cli/loop/session.d.ts +1 -1
- package/dist/cli/utils/audioFileUtils.d.ts +1 -1
- package/dist/cli/utils/envManager.d.ts +1 -1
- package/dist/cli/utils/videoFileUtils.d.ts +1 -1
- package/dist/client/auth.d.ts +3 -3
- package/dist/client/httpClient.d.ts +20 -20
- package/dist/client/index.d.ts +3 -3
- package/dist/client/interceptors.d.ts +1 -1
- package/dist/client/reactHooks.d.ts +1 -1
- package/dist/client/reactHooks.tsx +2 -2
- package/dist/client/sseClient.d.ts +1 -1
- package/dist/client/streamingClient.d.ts +1 -1
- package/dist/client/wsClient.d.ts +1 -1
- package/dist/files/fileTools.d.ts +1 -1
- package/dist/lib/agent/directTools.d.ts +2 -2
- package/dist/lib/client/auth.d.ts +3 -3
- package/dist/lib/client/httpClient.d.ts +20 -20
- package/dist/lib/client/index.d.ts +3 -3
- package/dist/lib/client/interceptors.d.ts +1 -1
- package/dist/lib/client/reactHooks.d.ts +1 -1
- package/dist/lib/client/sseClient.d.ts +1 -1
- package/dist/lib/client/streamingClient.d.ts +1 -1
- package/dist/lib/client/wsClient.d.ts +1 -1
- package/dist/lib/files/fileTools.d.ts +1 -1
- package/dist/lib/rag/types.d.ts +1 -68
- package/dist/lib/server/types.d.ts +3 -847
- package/dist/lib/server/types.js +3 -64
- package/dist/lib/tasks/tools/taskTools.d.ts +1 -1
- package/dist/lib/types/analytics.d.ts +1 -1
- package/dist/lib/types/cli.d.ts +1 -1
- package/dist/lib/types/clientTypes.d.ts +38 -20
- package/dist/lib/types/configTypes.d.ts +1 -1
- package/dist/lib/types/configTypes.js +0 -1
- package/dist/lib/types/index.d.ts +8 -6
- package/dist/lib/types/index.js +3 -0
- package/dist/lib/types/ragTypes.d.ts +69 -0
- package/dist/lib/types/sdkTypes.d.ts +1 -2
- package/dist/lib/types/serverTypes.d.ts +858 -0
- package/dist/lib/types/serverTypes.js +68 -0
- package/dist/lib/types/streamTypes.d.ts +2 -2
- package/dist/lib/types/typeAliases.d.ts +1 -37
- package/dist/lib/workflow/config.d.ts +3 -3
- package/dist/rag/errors/RAGError.d.ts +1 -1
- package/dist/rag/types.d.ts +1 -68
- package/dist/server/types.d.ts +3 -847
- package/dist/server/types.js +3 -64
- package/dist/types/analytics.d.ts +1 -1
- package/dist/types/cli.d.ts +1 -1
- package/dist/types/clientTypes.d.ts +38 -20
- package/dist/types/configTypes.d.ts +1 -1
- package/dist/types/index.d.ts +8 -6
- package/dist/types/index.js +3 -0
- package/dist/types/ragTypes.d.ts +69 -0
- package/dist/types/sdkTypes.d.ts +1 -2
- package/dist/types/serverTypes.d.ts +858 -0
- package/dist/types/serverTypes.js +67 -0
- package/dist/types/streamTypes.d.ts +2 -2
- package/dist/types/typeAliases.d.ts +1 -37
- package/dist/workflow/config.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Adapter Types
|
|
3
|
+
* Comprehensive type system for NeuroLink server adapters
|
|
4
|
+
*/
|
|
5
|
+
// ============================================
|
|
6
|
+
// Error Types
|
|
7
|
+
// ============================================
|
|
8
|
+
/**
|
|
9
|
+
* Error categories for server adapter errors
|
|
10
|
+
*/
|
|
11
|
+
export const ErrorCategory = {
|
|
12
|
+
CONFIG: "CONFIG",
|
|
13
|
+
VALIDATION: "VALIDATION",
|
|
14
|
+
EXECUTION: "EXECUTION",
|
|
15
|
+
EXTERNAL: "EXTERNAL",
|
|
16
|
+
RATE_LIMIT: "RATE_LIMIT",
|
|
17
|
+
AUTHENTICATION: "AUTHENTICATION",
|
|
18
|
+
AUTHORIZATION: "AUTHORIZATION",
|
|
19
|
+
STREAMING: "STREAMING",
|
|
20
|
+
WEBSOCKET: "WEBSOCKET",
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Error severity levels
|
|
24
|
+
*/
|
|
25
|
+
export const ErrorSeverity = {
|
|
26
|
+
LOW: "LOW",
|
|
27
|
+
MEDIUM: "MEDIUM",
|
|
28
|
+
HIGH: "HIGH",
|
|
29
|
+
CRITICAL: "CRITICAL",
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Server adapter error codes
|
|
33
|
+
*/
|
|
34
|
+
export const ServerAdapterErrorCode = {
|
|
35
|
+
// Configuration errors
|
|
36
|
+
INVALID_CONFIG: "SERVER_ADAPTER_INVALID_CONFIG",
|
|
37
|
+
MISSING_DEPENDENCY: "SERVER_ADAPTER_MISSING_DEPENDENCY",
|
|
38
|
+
FRAMEWORK_INIT_FAILED: "SERVER_ADAPTER_FRAMEWORK_INIT_FAILED",
|
|
39
|
+
// Route errors
|
|
40
|
+
ROUTE_NOT_FOUND: "SERVER_ADAPTER_ROUTE_NOT_FOUND",
|
|
41
|
+
ROUTE_CONFLICT: "SERVER_ADAPTER_ROUTE_CONFLICT",
|
|
42
|
+
INVALID_ROUTE: "SERVER_ADAPTER_INVALID_ROUTE",
|
|
43
|
+
// Execution errors
|
|
44
|
+
HANDLER_ERROR: "SERVER_ADAPTER_HANDLER_ERROR",
|
|
45
|
+
TIMEOUT: "SERVER_ADAPTER_TIMEOUT",
|
|
46
|
+
MIDDLEWARE_ERROR: "SERVER_ADAPTER_MIDDLEWARE_ERROR",
|
|
47
|
+
// Rate limit errors
|
|
48
|
+
RATE_LIMIT_EXCEEDED: "SERVER_ADAPTER_RATE_LIMIT_EXCEEDED",
|
|
49
|
+
// Authentication/Authorization errors
|
|
50
|
+
AUTH_REQUIRED: "SERVER_ADAPTER_AUTH_REQUIRED",
|
|
51
|
+
AUTH_INVALID: "SERVER_ADAPTER_AUTH_INVALID",
|
|
52
|
+
FORBIDDEN: "SERVER_ADAPTER_FORBIDDEN",
|
|
53
|
+
// Streaming errors
|
|
54
|
+
STREAM_ERROR: "SERVER_ADAPTER_STREAM_ERROR",
|
|
55
|
+
STREAM_ABORTED: "SERVER_ADAPTER_STREAM_ABORTED",
|
|
56
|
+
// WebSocket errors
|
|
57
|
+
WEBSOCKET_ERROR: "SERVER_ADAPTER_WEBSOCKET_ERROR",
|
|
58
|
+
WEBSOCKET_CONNECTION_FAILED: "SERVER_ADAPTER_WEBSOCKET_CONNECTION_FAILED",
|
|
59
|
+
// Validation errors
|
|
60
|
+
VALIDATION_ERROR: "SERVER_ADAPTER_VALIDATION_ERROR",
|
|
61
|
+
SCHEMA_ERROR: "SERVER_ADAPTER_SCHEMA_ERROR",
|
|
62
|
+
// Server lifecycle errors
|
|
63
|
+
START_FAILED: "SERVER_ADAPTER_START_FAILED",
|
|
64
|
+
STOP_FAILED: "SERVER_ADAPTER_STOP_FAILED",
|
|
65
|
+
ALREADY_RUNNING: "SERVER_ADAPTER_ALREADY_RUNNING",
|
|
66
|
+
NOT_RUNNING: "SERVER_ADAPTER_NOT_RUNNING",
|
|
67
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LanguageModel, StepResult, Tool, ToolChoice } from "ai";
|
|
2
2
|
import type { AIProviderName } from "../constants/enums.js";
|
|
3
|
-
import type { EvaluationData } from "
|
|
4
|
-
import type { RAGConfig } from "
|
|
3
|
+
import type { EvaluationData } from "./evaluation.js";
|
|
4
|
+
import type { RAGConfig } from "./ragTypes.js";
|
|
5
5
|
import type { AnalyticsData, ToolExecutionEvent, ToolExecutionSummary } from "../types/index.js";
|
|
6
6
|
import type { MiddlewareFactoryOptions, OnChunkCallback, OnErrorCallback, OnFinishCallback } from "../types/middlewareTypes.js";
|
|
7
7
|
import type { TokenUsage } from "./analytics.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { ZodTypeAny } from "zod";
|
|
6
6
|
import type { Schema } from "ai";
|
|
7
|
-
import type { JsonValue,
|
|
7
|
+
import type { JsonValue, Result, AsyncFunction } from "./common.js";
|
|
8
8
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
9
9
|
/**
|
|
10
10
|
* Type alias for complex Zod schema type to improve readability
|
|
@@ -65,11 +65,6 @@ export type JsonRecord = Record<string, JsonValue>;
|
|
|
65
65
|
export type OptionalStandardRecord = StandardRecord | undefined;
|
|
66
66
|
export type OptionalStringRecord = StringRecord | undefined;
|
|
67
67
|
export type OptionalJsonRecord = JsonRecord | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* Standard async function type for tool execution
|
|
70
|
-
* Most common function signature in the codebase
|
|
71
|
-
*/
|
|
72
|
-
export type AsyncFunction<TParams = unknown, TResult = unknown> = (params: TParams) => Promise<TResult>;
|
|
73
68
|
/**
|
|
74
69
|
* Tool execution function with context
|
|
75
70
|
* Standard pattern for MCP tool execution
|
|
@@ -98,21 +93,11 @@ export type TransformFunction<TInput = unknown, TOutput = unknown> = (input: TIn
|
|
|
98
93
|
* Async transformation function type
|
|
99
94
|
*/
|
|
100
95
|
export type AsyncTransformFunction<TInput = unknown, TOutput = unknown> = (input: TInput) => Promise<TOutput>;
|
|
101
|
-
/**
|
|
102
|
-
* Array of unknown values
|
|
103
|
-
* Common for flexible array parameters
|
|
104
|
-
*/
|
|
105
|
-
export type UnknownArray = unknown[];
|
|
106
96
|
/**
|
|
107
97
|
* Array of standard records
|
|
108
98
|
* Common in data collections
|
|
109
99
|
*/
|
|
110
100
|
export type RecordArray = StandardRecord[];
|
|
111
|
-
/**
|
|
112
|
-
* Array of JSON objects
|
|
113
|
-
* API-safe array type
|
|
114
|
-
*/
|
|
115
|
-
export type JsonArray = JsonObject[];
|
|
116
101
|
/**
|
|
117
102
|
* String array type
|
|
118
103
|
* Very common for lists of identifiers, names, etc.
|
|
@@ -203,17 +188,6 @@ export type StandardError = {
|
|
|
203
188
|
details?: StandardRecord;
|
|
204
189
|
stack?: string;
|
|
205
190
|
};
|
|
206
|
-
/**
|
|
207
|
-
* Result type with success/error pattern
|
|
208
|
-
* Common pattern for operation results
|
|
209
|
-
*/
|
|
210
|
-
export type Result<TData = unknown, TError = StandardError> = {
|
|
211
|
-
success: true;
|
|
212
|
-
data: TData;
|
|
213
|
-
} | {
|
|
214
|
-
success: false;
|
|
215
|
-
error: TError;
|
|
216
|
-
};
|
|
217
191
|
/**
|
|
218
192
|
* Async result type
|
|
219
193
|
*/
|
|
@@ -285,16 +259,6 @@ export type ServiceConfig = {
|
|
|
285
259
|
apiKey?: string;
|
|
286
260
|
metadata?: StandardRecord;
|
|
287
261
|
};
|
|
288
|
-
/**
|
|
289
|
-
* Cache configuration
|
|
290
|
-
* Common caching parameters
|
|
291
|
-
*/
|
|
292
|
-
export type CacheConfig = {
|
|
293
|
-
enabled?: boolean;
|
|
294
|
-
ttl?: number;
|
|
295
|
-
maxSize?: number;
|
|
296
|
-
strategy?: "memory" | "redis" | "hybrid";
|
|
297
|
-
};
|
|
298
262
|
/**
|
|
299
263
|
* Rate limiting configuration
|
|
300
264
|
* Common rate limiting parameters
|
|
@@ -41,8 +41,8 @@ export declare const JudgeConfigSchema: z.ZodObject<{
|
|
|
41
41
|
model: z.ZodString;
|
|
42
42
|
criteria: z.ZodArray<z.ZodString>;
|
|
43
43
|
outputFormat: z.ZodEnum<{
|
|
44
|
-
scores: "scores";
|
|
45
44
|
detailed: "detailed";
|
|
45
|
+
scores: "scores";
|
|
46
46
|
ranking: "ranking";
|
|
47
47
|
best: "best";
|
|
48
48
|
}>;
|
|
@@ -195,8 +195,8 @@ export declare const WorkflowConfigSchema: z.ZodObject<{
|
|
|
195
195
|
model: z.ZodString;
|
|
196
196
|
criteria: z.ZodArray<z.ZodString>;
|
|
197
197
|
outputFormat: z.ZodEnum<{
|
|
198
|
-
scores: "scores";
|
|
199
198
|
detailed: "detailed";
|
|
199
|
+
scores: "scores";
|
|
200
200
|
ranking: "ranking";
|
|
201
201
|
best: "best";
|
|
202
202
|
}>;
|
|
@@ -219,8 +219,8 @@ export declare const WorkflowConfigSchema: z.ZodObject<{
|
|
|
219
219
|
model: z.ZodString;
|
|
220
220
|
criteria: z.ZodArray<z.ZodString>;
|
|
221
221
|
outputFormat: z.ZodEnum<{
|
|
222
|
-
scores: "scores";
|
|
223
222
|
detailed: "detailed";
|
|
223
|
+
scores: "scores";
|
|
224
224
|
ranking: "ranking";
|
|
225
225
|
best: "best";
|
|
226
226
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "9.44.
|
|
3
|
+
"version": "9.44.1",
|
|
4
4
|
"packageManager": "pnpm@10.15.1",
|
|
5
5
|
"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 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
6
6
|
"author": {
|