@juspay/neurolink 9.43.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 +8 -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
|
@@ -22,7 +22,7 @@ import { mkdirSync } from "node:fs";
|
|
|
22
22
|
import chalk from "chalk";
|
|
23
23
|
import { nanoid } from "nanoid";
|
|
24
24
|
import ora from "ora";
|
|
25
|
-
import { TASK_DEFAULTS } from "../../lib/types/
|
|
25
|
+
import { TASK_DEFAULTS } from "../../lib/types/index.js";
|
|
26
26
|
import { StateFileManager, isProcessRunning, formatUptime, getNeuroLinkDir, ensureStateDir, } from "../utils/serverUtils.js";
|
|
27
27
|
const workerState = new StateFileManager("task-worker-state.json");
|
|
28
28
|
/**
|
package/dist/cli/errorHandler.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
2
|
import { logger } from "../lib/utils/logger.js";
|
|
3
|
-
import { AuthenticationError, AuthorizationError, NetworkError, RateLimitError, } from "../lib/types/
|
|
3
|
+
import { AuthenticationError, AuthorizationError, NetworkError, RateLimitError, } from "../lib/types/index.js";
|
|
4
4
|
import { globalSession } from "../lib/session/globalSessionState.js";
|
|
5
5
|
export function handleError(_error, context) {
|
|
6
6
|
logger.error(chalk.red(`❌ ${context} failed: ${_error.message}`));
|
|
@@ -5,7 +5,7 @@ import ora from "ora";
|
|
|
5
5
|
import { ModelResolver } from "../../lib/models/modelResolver.js";
|
|
6
6
|
import { globalSession } from "../../lib/session/globalSessionState.js";
|
|
7
7
|
// Use TokenUsage from standard types - no local interface needed
|
|
8
|
-
import { ContextFactory, } from "../../lib/types/
|
|
8
|
+
import { ContextFactory, } from "../../lib/types/index.js";
|
|
9
9
|
import { checkRedisAvailability } from "../../lib/utils/conversationMemory.js";
|
|
10
10
|
import { normalizeEvaluationData } from "../../lib/utils/evaluationUtils.js";
|
|
11
11
|
import { logger } from "../../lib/utils/logger.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Conversation Selector for Loop Mode
|
|
3
3
|
* Handles discovery and selection of stored conversations from Redis
|
|
4
4
|
*/
|
|
5
|
-
import type { ConversationSummary } from "../../lib/types/
|
|
6
|
-
import type { RedisStorageConfig } from "../../lib/types/
|
|
5
|
+
import type { ConversationSummary } from "../../lib/types/index.js";
|
|
6
|
+
import type { RedisStorageConfig } from "../../lib/types/index.js";
|
|
7
7
|
export declare class ConversationSelector {
|
|
8
8
|
private redisClient;
|
|
9
9
|
private redisConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OptionSchema } from "../../lib/types/
|
|
2
|
-
import type { TextGenerationOptions } from "../../lib/types/
|
|
1
|
+
import type { OptionSchema } from "../../lib/types/index.js";
|
|
2
|
+
import type { TextGenerationOptions } from "../../lib/types/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Master schema for all text generation options.
|
|
5
5
|
* This object provides metadata for validation and help text in the CLI loop.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Argv } from "yargs";
|
|
2
|
-
import type { ConversationMemoryConfig } from "../../lib/types/
|
|
2
|
+
import type { ConversationMemoryConfig } from "../../lib/types/index.js";
|
|
3
3
|
export declare class LoopSession {
|
|
4
4
|
private conversationMemoryConfig?;
|
|
5
5
|
private options?;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module cli/utils/audioFileUtils
|
|
8
8
|
*/
|
|
9
|
-
import type { TTSResult, AudioSaveResult, AudioFormat } from "../../lib/types/
|
|
9
|
+
import type { TTSResult, AudioSaveResult, AudioFormat } from "../../lib/types/index.js";
|
|
10
10
|
/**
|
|
11
11
|
* Format file size in human-readable format
|
|
12
12
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Handles .env file operations including backup, update, and validation.
|
|
5
5
|
*/
|
|
6
|
-
import type { EnvBackupResult, EnvUpdateResult } from "../../lib/types/
|
|
6
|
+
import type { EnvBackupResult, EnvUpdateResult } from "../../lib/types/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* Create a timestamped backup of the existing .env file
|
|
9
9
|
*/
|
package/dist/client/auth.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/auth
|
|
8
8
|
*/
|
|
9
|
-
import type { Middleware, AuthConfig,
|
|
9
|
+
import type { Middleware, AuthConfig, ClientOAuth2Config, ClientTokenRefreshResult } from "../types/clientTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* OAuth2 Token Manager for client credentials flow
|
|
12
12
|
*
|
|
@@ -38,7 +38,7 @@ export declare class OAuth2TokenManager {
|
|
|
38
38
|
private tokenExpiry;
|
|
39
39
|
private refreshPromise;
|
|
40
40
|
private refreshBufferMs;
|
|
41
|
-
constructor(config:
|
|
41
|
+
constructor(config: ClientOAuth2Config, options?: {
|
|
42
42
|
refreshBufferMs?: number;
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
@@ -97,7 +97,7 @@ export declare class JWTTokenManager {
|
|
|
97
97
|
constructor(config: {
|
|
98
98
|
token: string;
|
|
99
99
|
expiresAt: number;
|
|
100
|
-
refreshFn: () => Promise<
|
|
100
|
+
refreshFn: () => Promise<ClientTokenRefreshResult>;
|
|
101
101
|
refreshBufferMs?: number;
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client
|
|
8
8
|
*/
|
|
9
|
-
import type { ClientConfig, RequestOptions,
|
|
9
|
+
import type { ClientConfig, RequestOptions, ClientApiResponse, ApiError, ClientRetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext, StreamCallbacks, ClientStreamEvent, ClientStreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
10
10
|
import type { UnknownRecord } from "../types/common.js";
|
|
11
11
|
import { HttpError, ClientNetworkError, ClientTimeoutError } from "./errors.js";
|
|
12
12
|
/**
|
|
@@ -114,7 +114,7 @@ export declare class NeuroLinkClient {
|
|
|
114
114
|
* console.log(response.data.content);
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
generate(options: GenerateRequestOptions, requestOptions?: RequestOptions): Promise<
|
|
117
|
+
generate(options: GenerateRequestOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<GenerateResponse>>;
|
|
118
118
|
/**
|
|
119
119
|
* Stream text generation
|
|
120
120
|
*
|
|
@@ -129,7 +129,7 @@ export declare class NeuroLinkClient {
|
|
|
129
129
|
* );
|
|
130
130
|
* ```
|
|
131
131
|
*/
|
|
132
|
-
stream(options: StreamRequestOptions | GenerateRequestOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<
|
|
132
|
+
stream(options: StreamRequestOptions | GenerateRequestOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<ClientStreamResult>;
|
|
133
133
|
/**
|
|
134
134
|
* Handle individual stream events
|
|
135
135
|
*/
|
|
@@ -147,19 +147,19 @@ export declare class NeuroLinkClient {
|
|
|
147
147
|
* console.log(result.data.content);
|
|
148
148
|
* ```
|
|
149
149
|
*/
|
|
150
|
-
executeAgent(options: AgentExecuteOptions, requestOptions?: RequestOptions): Promise<
|
|
150
|
+
executeAgent(options: AgentExecuteOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentExecuteResult>>;
|
|
151
151
|
/**
|
|
152
152
|
* Stream agent execution
|
|
153
153
|
*/
|
|
154
|
-
streamAgent(options: AgentExecuteOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<
|
|
154
|
+
streamAgent(options: AgentExecuteOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<ClientStreamResult>;
|
|
155
155
|
/**
|
|
156
156
|
* List available agents
|
|
157
157
|
*/
|
|
158
|
-
listAgents(requestOptions?: RequestOptions): Promise<
|
|
158
|
+
listAgents(requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentInfo[]>>;
|
|
159
159
|
/**
|
|
160
160
|
* Get agent details
|
|
161
161
|
*/
|
|
162
|
-
getAgent(agentId: string, requestOptions?: RequestOptions): Promise<
|
|
162
|
+
getAgent(agentId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentInfo>>;
|
|
163
163
|
/**
|
|
164
164
|
* Execute a workflow
|
|
165
165
|
*
|
|
@@ -179,29 +179,29 @@ export declare class NeuroLinkClient {
|
|
|
179
179
|
* }
|
|
180
180
|
* ```
|
|
181
181
|
*/
|
|
182
|
-
executeWorkflow(options: WorkflowExecuteOptions, requestOptions?: RequestOptions): Promise<
|
|
182
|
+
executeWorkflow(options: WorkflowExecuteOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
183
183
|
/**
|
|
184
184
|
* Resume a suspended workflow
|
|
185
185
|
*/
|
|
186
|
-
resumeWorkflow(workflowId: string, resumeToken: string, resumeData?: UnknownRecord, requestOptions?: RequestOptions): Promise<
|
|
186
|
+
resumeWorkflow(workflowId: string, resumeToken: string, resumeData?: UnknownRecord, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
187
187
|
/**
|
|
188
188
|
* Get workflow execution status
|
|
189
189
|
*/
|
|
190
|
-
getWorkflowStatus(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<
|
|
190
|
+
getWorkflowStatus(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
191
191
|
/**
|
|
192
192
|
* Cancel workflow execution
|
|
193
193
|
*/
|
|
194
|
-
cancelWorkflow(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<
|
|
194
|
+
cancelWorkflow(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<{
|
|
195
195
|
success: boolean;
|
|
196
196
|
}>>;
|
|
197
197
|
/**
|
|
198
198
|
* List available workflows
|
|
199
199
|
*/
|
|
200
|
-
listWorkflows(requestOptions?: RequestOptions): Promise<
|
|
200
|
+
listWorkflows(requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowInfo[]>>;
|
|
201
201
|
/**
|
|
202
202
|
* Get workflow details
|
|
203
203
|
*/
|
|
204
|
-
getWorkflow(workflowId: string, requestOptions?: RequestOptions): Promise<
|
|
204
|
+
getWorkflow(workflowId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowInfo>>;
|
|
205
205
|
/**
|
|
206
206
|
* List available tools
|
|
207
207
|
*
|
|
@@ -214,27 +214,27 @@ export declare class NeuroLinkClient {
|
|
|
214
214
|
listTools(options?: {
|
|
215
215
|
category?: string;
|
|
216
216
|
serverId?: string;
|
|
217
|
-
}, requestOptions?: RequestOptions): Promise<
|
|
217
|
+
}, requestOptions?: RequestOptions): Promise<ClientApiResponse<ToolInfo[]>>;
|
|
218
218
|
/**
|
|
219
219
|
* Execute a tool
|
|
220
220
|
*/
|
|
221
|
-
executeTool(toolName: string, params: UnknownRecord, requestOptions?: RequestOptions): Promise<
|
|
221
|
+
executeTool(toolName: string, params: UnknownRecord, requestOptions?: RequestOptions): Promise<ClientApiResponse<unknown>>;
|
|
222
222
|
/**
|
|
223
223
|
* Get tool details
|
|
224
224
|
*/
|
|
225
|
-
getTool(toolName: string, requestOptions?: RequestOptions): Promise<
|
|
225
|
+
getTool(toolName: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<ToolInfo>>;
|
|
226
226
|
/**
|
|
227
227
|
* List available providers
|
|
228
228
|
*/
|
|
229
|
-
listProviders(requestOptions?: RequestOptions): Promise<
|
|
229
|
+
listProviders(requestOptions?: RequestOptions): Promise<ClientApiResponse<ClientProviderStatus[]>>;
|
|
230
230
|
/**
|
|
231
231
|
* Get provider status
|
|
232
232
|
*/
|
|
233
|
-
getProviderStatus(providerName: string, requestOptions?: RequestOptions): Promise<
|
|
233
|
+
getProviderStatus(providerName: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<ClientProviderStatus>>;
|
|
234
234
|
/**
|
|
235
235
|
* Health check
|
|
236
236
|
*/
|
|
237
|
-
health(requestOptions?: RequestOptions): Promise<
|
|
237
|
+
health(requestOptions?: RequestOptions): Promise<ClientApiResponse<{
|
|
238
238
|
status: string;
|
|
239
239
|
version: string;
|
|
240
240
|
}>>;
|
|
@@ -294,4 +294,4 @@ export declare class NeuroLinkClient {
|
|
|
294
294
|
* ```
|
|
295
295
|
*/
|
|
296
296
|
export declare function createClient(config: ClientConfig): NeuroLinkClient;
|
|
297
|
-
export type { ClientConfig, RequestOptions,
|
|
297
|
+
export type { ClientConfig, RequestOptions, ClientApiResponse, ApiError, ClientRetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext, StreamCallbacks, ClientStreamEvent, ClientStreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
export { NeuroLinkClient, createClient, NeuroLinkApiError, } from "./httpClient.js";
|
|
95
|
-
export type { ClientConfig, RequestOptions, ApiResponse, ApiError, RetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, MiddlewareContext, StreamCallbacks, StreamEvent, StreamEventType, StreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, } from "../types/clientTypes.js";
|
|
95
|
+
export type { ClientConfig, RequestOptions, ClientApiResponse as ApiResponse, ApiError, ClientRetryConfig as RetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext as MiddlewareContext, StreamCallbacks, ClientStreamEvent as StreamEvent, StreamEventType, ClientStreamResult as StreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus as ProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, } from "../types/clientTypes.js";
|
|
96
96
|
export { NeuroLinkProvider, useNeuroLinkClient, useChat, useAgent, useWorkflow, useVoice, useStream, useTools, } from "./reactHooks.js";
|
|
97
97
|
export type { NeuroLinkProviderProps } from "./reactHooks.js";
|
|
98
|
-
export type { UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ChatMessage, NeuroLinkProviderOptions, ModelOptions, LanguageModel, LanguageModelCallOptions, LanguageModelResponse, LanguageModelStreamResponse, } from "../types/clientTypes.js";
|
|
98
|
+
export type { UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ClientChatMessage as ChatMessage, NeuroLinkProviderOptions, ModelOptions, LanguageModel, LanguageModelCallOptions, LanguageModelResponse, LanguageModelStreamResponse, } from "../types/clientTypes.js";
|
|
99
99
|
export { NeuroLinkLanguageModel, NeuroLinkProvider as NeuroLinkAIProvider, createNeuroLinkProvider, createNeuroLinkModel, createStreamingResponse, neurolink, } from "./aiSdkAdapter.js";
|
|
100
100
|
export { createApiKeyAuthInterceptor, createBearerAuthInterceptor, createDynamicAuthInterceptor, createLoggingInterceptor, createRetryInterceptor, createRateLimitInterceptor, createRequestTransformInterceptor, createResponseTransformInterceptor, createCacheInterceptor, createTimeoutInterceptor, createErrorHandlerInterceptor, composeMiddleware, conditionalMiddleware, } from "./interceptors.js";
|
|
101
101
|
export type { LoggingInterceptorOptions, RetryInterceptorOptions, RateLimiterOptions, CacheInterceptorOptions, TimeoutInterceptorOptions, ErrorHandlerOptions, } from "./interceptors.js";
|
|
@@ -106,6 +106,6 @@ export type { WebSocketConfig, WebSocketMessage, WebSocketEventHandlers, WebSock
|
|
|
106
106
|
export { NeuroLinkSSE, createSSEClient } from "./sseClient.js";
|
|
107
107
|
export type { SSEConfig, SSERequestOptions, SSEEventHandlers, SSEState, } from "./sseClient.js";
|
|
108
108
|
export { OAuth2TokenManager, JWTTokenManager, createApiKeyMiddleware, createBearerTokenMiddleware, createTokenManagerMiddleware, createAuthWithRetryMiddleware, createMultiAuthMiddleware, OAuth2Error, OAuth2AuthenticationError as OAuth2AuthError, TokenRefreshError, decodeJWTPayload, isJWTExpired, getJWTExpiry, getApiKeyFromEnv, } from "./auth.js";
|
|
109
|
-
export type { AuthConfig, OAuth2Config, TokenRefreshResult, SpeechRecognitionResult, SpeechSynthesisOptions, JsonValue, JsonObject, UnknownRecord, ToolCall, ToolResult, } from "../types/clientTypes.js";
|
|
109
|
+
export type { AuthConfig, ClientOAuth2Config as OAuth2Config, ClientTokenRefreshResult as TokenRefreshResult, SpeechRecognitionResult, SpeechSynthesisOptions, JsonValue, JsonObject, UnknownRecord, ToolCall, ToolResult, } from "../types/clientTypes.js";
|
|
110
110
|
export { ErrorCode, NeuroLinkError, HttpError, ClientRateLimitError, ClientValidationError, ClientAuthenticationError, ClientAuthorizationError, NotFoundError, ClientNetworkError, ClientTimeoutError, ClientConnectionError, AbortError, ClientConfigurationError, StreamError, ClientProviderError, ContextLengthError, ContentFilterError, createErrorFromResponse, createErrorFromNative, mapStatusToErrorCode, isRetryableStatus, isRetryableError, isNeuroLinkError, isApiError, } from "./errors.js";
|
|
111
111
|
export type { ErrorCodeType } from "./errors.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/interceptors
|
|
8
8
|
*/
|
|
9
|
-
import type { Middleware, MiddlewareRequest, MiddlewareResponse, MiddlewareContext, RetryConfig, ApiError } from "../types/clientTypes.js";
|
|
9
|
+
import type { Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext as MiddlewareContext, ClientRetryConfig as RetryConfig, ApiError } from "../types/clientTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* API Key authentication interceptor
|
|
12
12
|
*
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @module @neurolink/react
|
|
16
16
|
*/
|
|
17
17
|
import type { ReactNode } from "react";
|
|
18
|
-
import type { NeuroLinkProviderProps, UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ChatMessage, SpeechRecognitionInternal } from "../types/clientTypes.js";
|
|
18
|
+
import type { NeuroLinkProviderProps, UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ClientChatMessage as ChatMessage, SpeechRecognitionInternal } from "../types/clientTypes.js";
|
|
19
19
|
import { NeuroLinkClient } from "./httpClient.js";
|
|
20
20
|
/**
|
|
21
21
|
* Provider component for NeuroLink client
|
|
@@ -42,13 +42,13 @@ import type {
|
|
|
42
42
|
UseStreamReturn,
|
|
43
43
|
UseToolsOptions,
|
|
44
44
|
UseToolsReturn,
|
|
45
|
-
ChatMessage,
|
|
45
|
+
ClientChatMessage as ChatMessage,
|
|
46
46
|
AgentExecuteOptions,
|
|
47
47
|
AgentExecuteResult,
|
|
48
48
|
WorkflowExecuteOptions,
|
|
49
49
|
WorkflowExecuteResult,
|
|
50
50
|
StreamCallbacks,
|
|
51
|
-
StreamEvent,
|
|
51
|
+
ClientStreamEvent as StreamEvent,
|
|
52
52
|
ToolInfo,
|
|
53
53
|
SpeechRecognitionInternal,
|
|
54
54
|
SpeechRecognitionEventInternal,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module @neurolink/client/sseClient
|
|
9
9
|
*/
|
|
10
|
-
import type { ClientConfig, StreamCallbacks, StreamEvent, StreamResult, ApiError } from "../types/clientTypes.js";
|
|
10
|
+
import type { ClientConfig, StreamCallbacks, ClientStreamEvent as StreamEvent, ClientStreamResult as StreamResult, ApiError } from "../types/clientTypes.js";
|
|
11
11
|
/**
|
|
12
12
|
* SSE connection state
|
|
13
13
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/streaming
|
|
8
8
|
*/
|
|
9
|
-
import type { StreamEvent, StreamCallbacks, StreamResult, ApiError, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
9
|
+
import type { ClientStreamEvent as StreamEvent, StreamCallbacks, ClientStreamResult as StreamResult, ApiError, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
10
10
|
import type { JsonObject, UnknownRecord } from "../types/common.js";
|
|
11
11
|
import type { ToolCall, ToolResult } from "../types/streamTypes.js";
|
|
12
12
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module @neurolink/client/wsClient
|
|
9
9
|
*/
|
|
10
|
-
import type { StreamCallbacks, StreamEvent, StreamResult, ApiError, WSClientState, WSClientConfig, WSClientMessage, WSClientEventHandlers } from "../types/clientTypes.js";
|
|
10
|
+
import type { StreamCallbacks, ClientStreamEvent as StreamEvent, ClientStreamResult as StreamResult, ApiError, WSClientState, WSClientConfig, WSClientMessage, WSClientEventHandlers } from "../types/clientTypes.js";
|
|
11
11
|
/** @see WSClientState */
|
|
12
12
|
export type WebSocketState = WSClientState;
|
|
13
13
|
/** @see WSClientConfig */
|
|
@@ -173,7 +173,7 @@ export declare function createFileTools(registry: FileReferenceRegistry): {
|
|
|
173
173
|
} | undefined;
|
|
174
174
|
columns?: string[] | undefined;
|
|
175
175
|
entry_path?: string | undefined;
|
|
176
|
-
format?: "
|
|
176
|
+
format?: "detailed" | "text" | "summary" | undefined;
|
|
177
177
|
}, {
|
|
178
178
|
success: false;
|
|
179
179
|
error: string | undefined;
|
|
@@ -101,7 +101,7 @@ export declare const directAgentTools: {
|
|
|
101
101
|
writeFile: import("ai").Tool<{
|
|
102
102
|
path: string;
|
|
103
103
|
content: string;
|
|
104
|
-
mode: "create" | "
|
|
104
|
+
mode: "create" | "append" | "overwrite";
|
|
105
105
|
}, {
|
|
106
106
|
success: boolean;
|
|
107
107
|
error: string;
|
|
@@ -112,7 +112,7 @@ export declare const directAgentTools: {
|
|
|
112
112
|
} | {
|
|
113
113
|
success: boolean;
|
|
114
114
|
path: string;
|
|
115
|
-
mode: "create" | "
|
|
115
|
+
mode: "create" | "append" | "overwrite";
|
|
116
116
|
size: number;
|
|
117
117
|
written: number;
|
|
118
118
|
error?: undefined;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/auth
|
|
8
8
|
*/
|
|
9
|
-
import type { Middleware, AuthConfig,
|
|
9
|
+
import type { Middleware, AuthConfig, ClientOAuth2Config, ClientTokenRefreshResult } from "../types/clientTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* OAuth2 Token Manager for client credentials flow
|
|
12
12
|
*
|
|
@@ -38,7 +38,7 @@ export declare class OAuth2TokenManager {
|
|
|
38
38
|
private tokenExpiry;
|
|
39
39
|
private refreshPromise;
|
|
40
40
|
private refreshBufferMs;
|
|
41
|
-
constructor(config:
|
|
41
|
+
constructor(config: ClientOAuth2Config, options?: {
|
|
42
42
|
refreshBufferMs?: number;
|
|
43
43
|
});
|
|
44
44
|
/**
|
|
@@ -97,7 +97,7 @@ export declare class JWTTokenManager {
|
|
|
97
97
|
constructor(config: {
|
|
98
98
|
token: string;
|
|
99
99
|
expiresAt: number;
|
|
100
|
-
refreshFn: () => Promise<
|
|
100
|
+
refreshFn: () => Promise<ClientTokenRefreshResult>;
|
|
101
101
|
refreshBufferMs?: number;
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client
|
|
8
8
|
*/
|
|
9
|
-
import type { ClientConfig, RequestOptions,
|
|
9
|
+
import type { ClientConfig, RequestOptions, ClientApiResponse, ApiError, ClientRetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext, StreamCallbacks, ClientStreamEvent, ClientStreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
10
10
|
import type { UnknownRecord } from "../types/common.js";
|
|
11
11
|
import { HttpError, ClientNetworkError, ClientTimeoutError } from "./errors.js";
|
|
12
12
|
/**
|
|
@@ -114,7 +114,7 @@ export declare class NeuroLinkClient {
|
|
|
114
114
|
* console.log(response.data.content);
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
generate(options: GenerateRequestOptions, requestOptions?: RequestOptions): Promise<
|
|
117
|
+
generate(options: GenerateRequestOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<GenerateResponse>>;
|
|
118
118
|
/**
|
|
119
119
|
* Stream text generation
|
|
120
120
|
*
|
|
@@ -129,7 +129,7 @@ export declare class NeuroLinkClient {
|
|
|
129
129
|
* );
|
|
130
130
|
* ```
|
|
131
131
|
*/
|
|
132
|
-
stream(options: StreamRequestOptions | GenerateRequestOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<
|
|
132
|
+
stream(options: StreamRequestOptions | GenerateRequestOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<ClientStreamResult>;
|
|
133
133
|
/**
|
|
134
134
|
* Handle individual stream events
|
|
135
135
|
*/
|
|
@@ -147,19 +147,19 @@ export declare class NeuroLinkClient {
|
|
|
147
147
|
* console.log(result.data.content);
|
|
148
148
|
* ```
|
|
149
149
|
*/
|
|
150
|
-
executeAgent(options: AgentExecuteOptions, requestOptions?: RequestOptions): Promise<
|
|
150
|
+
executeAgent(options: AgentExecuteOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentExecuteResult>>;
|
|
151
151
|
/**
|
|
152
152
|
* Stream agent execution
|
|
153
153
|
*/
|
|
154
|
-
streamAgent(options: AgentExecuteOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<
|
|
154
|
+
streamAgent(options: AgentExecuteOptions, callbacks?: StreamCallbacks, requestOptions?: RequestOptions): Promise<ClientStreamResult>;
|
|
155
155
|
/**
|
|
156
156
|
* List available agents
|
|
157
157
|
*/
|
|
158
|
-
listAgents(requestOptions?: RequestOptions): Promise<
|
|
158
|
+
listAgents(requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentInfo[]>>;
|
|
159
159
|
/**
|
|
160
160
|
* Get agent details
|
|
161
161
|
*/
|
|
162
|
-
getAgent(agentId: string, requestOptions?: RequestOptions): Promise<
|
|
162
|
+
getAgent(agentId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<AgentInfo>>;
|
|
163
163
|
/**
|
|
164
164
|
* Execute a workflow
|
|
165
165
|
*
|
|
@@ -179,29 +179,29 @@ export declare class NeuroLinkClient {
|
|
|
179
179
|
* }
|
|
180
180
|
* ```
|
|
181
181
|
*/
|
|
182
|
-
executeWorkflow(options: WorkflowExecuteOptions, requestOptions?: RequestOptions): Promise<
|
|
182
|
+
executeWorkflow(options: WorkflowExecuteOptions, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
183
183
|
/**
|
|
184
184
|
* Resume a suspended workflow
|
|
185
185
|
*/
|
|
186
|
-
resumeWorkflow(workflowId: string, resumeToken: string, resumeData?: UnknownRecord, requestOptions?: RequestOptions): Promise<
|
|
186
|
+
resumeWorkflow(workflowId: string, resumeToken: string, resumeData?: UnknownRecord, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
187
187
|
/**
|
|
188
188
|
* Get workflow execution status
|
|
189
189
|
*/
|
|
190
|
-
getWorkflowStatus(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<
|
|
190
|
+
getWorkflowStatus(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowExecuteResult>>;
|
|
191
191
|
/**
|
|
192
192
|
* Cancel workflow execution
|
|
193
193
|
*/
|
|
194
|
-
cancelWorkflow(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<
|
|
194
|
+
cancelWorkflow(workflowId: string, runId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<{
|
|
195
195
|
success: boolean;
|
|
196
196
|
}>>;
|
|
197
197
|
/**
|
|
198
198
|
* List available workflows
|
|
199
199
|
*/
|
|
200
|
-
listWorkflows(requestOptions?: RequestOptions): Promise<
|
|
200
|
+
listWorkflows(requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowInfo[]>>;
|
|
201
201
|
/**
|
|
202
202
|
* Get workflow details
|
|
203
203
|
*/
|
|
204
|
-
getWorkflow(workflowId: string, requestOptions?: RequestOptions): Promise<
|
|
204
|
+
getWorkflow(workflowId: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<WorkflowInfo>>;
|
|
205
205
|
/**
|
|
206
206
|
* List available tools
|
|
207
207
|
*
|
|
@@ -214,27 +214,27 @@ export declare class NeuroLinkClient {
|
|
|
214
214
|
listTools(options?: {
|
|
215
215
|
category?: string;
|
|
216
216
|
serverId?: string;
|
|
217
|
-
}, requestOptions?: RequestOptions): Promise<
|
|
217
|
+
}, requestOptions?: RequestOptions): Promise<ClientApiResponse<ToolInfo[]>>;
|
|
218
218
|
/**
|
|
219
219
|
* Execute a tool
|
|
220
220
|
*/
|
|
221
|
-
executeTool(toolName: string, params: UnknownRecord, requestOptions?: RequestOptions): Promise<
|
|
221
|
+
executeTool(toolName: string, params: UnknownRecord, requestOptions?: RequestOptions): Promise<ClientApiResponse<unknown>>;
|
|
222
222
|
/**
|
|
223
223
|
* Get tool details
|
|
224
224
|
*/
|
|
225
|
-
getTool(toolName: string, requestOptions?: RequestOptions): Promise<
|
|
225
|
+
getTool(toolName: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<ToolInfo>>;
|
|
226
226
|
/**
|
|
227
227
|
* List available providers
|
|
228
228
|
*/
|
|
229
|
-
listProviders(requestOptions?: RequestOptions): Promise<
|
|
229
|
+
listProviders(requestOptions?: RequestOptions): Promise<ClientApiResponse<ClientProviderStatus[]>>;
|
|
230
230
|
/**
|
|
231
231
|
* Get provider status
|
|
232
232
|
*/
|
|
233
|
-
getProviderStatus(providerName: string, requestOptions?: RequestOptions): Promise<
|
|
233
|
+
getProviderStatus(providerName: string, requestOptions?: RequestOptions): Promise<ClientApiResponse<ClientProviderStatus>>;
|
|
234
234
|
/**
|
|
235
235
|
* Health check
|
|
236
236
|
*/
|
|
237
|
-
health(requestOptions?: RequestOptions): Promise<
|
|
237
|
+
health(requestOptions?: RequestOptions): Promise<ClientApiResponse<{
|
|
238
238
|
status: string;
|
|
239
239
|
version: string;
|
|
240
240
|
}>>;
|
|
@@ -294,4 +294,4 @@ export declare class NeuroLinkClient {
|
|
|
294
294
|
* ```
|
|
295
295
|
*/
|
|
296
296
|
export declare function createClient(config: ClientConfig): NeuroLinkClient;
|
|
297
|
-
export type { ClientConfig, RequestOptions,
|
|
297
|
+
export type { ClientConfig, RequestOptions, ClientApiResponse, ApiError, ClientRetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext, StreamCallbacks, ClientStreamEvent, ClientStreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, };
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
export { NeuroLinkClient, createClient, NeuroLinkApiError, } from "./httpClient.js";
|
|
95
|
-
export type { ClientConfig, RequestOptions, ApiResponse, ApiError, RetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, MiddlewareContext, StreamCallbacks, StreamEvent, StreamEventType, StreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, } from "../types/clientTypes.js";
|
|
95
|
+
export type { ClientConfig, RequestOptions, ClientApiResponse as ApiResponse, ApiError, ClientRetryConfig as RetryConfig, Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext as MiddlewareContext, StreamCallbacks, ClientStreamEvent as StreamEvent, StreamEventType, ClientStreamResult as StreamResult, GenerateRequestOptions, GenerateResponse, StreamRequestOptions, AgentExecuteOptions, AgentExecuteResult, AgentInfo, WorkflowExecuteOptions, WorkflowExecuteResult, WorkflowInfo, ToolInfo, ClientProviderStatus as ProviderStatus, WebSocketOptions, WebSocketState, WebSocketMessageHandler, } from "../types/clientTypes.js";
|
|
96
96
|
export { NeuroLinkProvider, useNeuroLinkClient, useChat, useAgent, useWorkflow, useVoice, useStream, useTools, } from "./reactHooks.js";
|
|
97
97
|
export type { NeuroLinkProviderProps } from "./reactHooks.js";
|
|
98
|
-
export type { UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ChatMessage, NeuroLinkProviderOptions, ModelOptions, LanguageModel, LanguageModelCallOptions, LanguageModelResponse, LanguageModelStreamResponse, } from "../types/clientTypes.js";
|
|
98
|
+
export type { UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ClientChatMessage as ChatMessage, NeuroLinkProviderOptions, ModelOptions, LanguageModel, LanguageModelCallOptions, LanguageModelResponse, LanguageModelStreamResponse, } from "../types/clientTypes.js";
|
|
99
99
|
export { NeuroLinkLanguageModel, NeuroLinkProvider as NeuroLinkAIProvider, createNeuroLinkProvider, createNeuroLinkModel, createStreamingResponse, neurolink, } from "./aiSdkAdapter.js";
|
|
100
100
|
export { createApiKeyAuthInterceptor, createBearerAuthInterceptor, createDynamicAuthInterceptor, createLoggingInterceptor, createRetryInterceptor, createRateLimitInterceptor, createRequestTransformInterceptor, createResponseTransformInterceptor, createCacheInterceptor, createTimeoutInterceptor, createErrorHandlerInterceptor, composeMiddleware, conditionalMiddleware, } from "./interceptors.js";
|
|
101
101
|
export type { LoggingInterceptorOptions, RetryInterceptorOptions, RateLimiterOptions, CacheInterceptorOptions, TimeoutInterceptorOptions, ErrorHandlerOptions, } from "./interceptors.js";
|
|
@@ -106,6 +106,6 @@ export type { WebSocketConfig, WebSocketMessage, WebSocketEventHandlers, WebSock
|
|
|
106
106
|
export { NeuroLinkSSE, createSSEClient } from "./sseClient.js";
|
|
107
107
|
export type { SSEConfig, SSERequestOptions, SSEEventHandlers, SSEState, } from "./sseClient.js";
|
|
108
108
|
export { OAuth2TokenManager, JWTTokenManager, createApiKeyMiddleware, createBearerTokenMiddleware, createTokenManagerMiddleware, createAuthWithRetryMiddleware, createMultiAuthMiddleware, OAuth2Error, OAuth2AuthenticationError as OAuth2AuthError, TokenRefreshError, decodeJWTPayload, isJWTExpired, getJWTExpiry, getApiKeyFromEnv, } from "./auth.js";
|
|
109
|
-
export type { AuthConfig, OAuth2Config, TokenRefreshResult, SpeechRecognitionResult, SpeechSynthesisOptions, JsonValue, JsonObject, UnknownRecord, ToolCall, ToolResult, } from "../types/clientTypes.js";
|
|
109
|
+
export type { AuthConfig, ClientOAuth2Config as OAuth2Config, ClientTokenRefreshResult as TokenRefreshResult, SpeechRecognitionResult, SpeechSynthesisOptions, JsonValue, JsonObject, UnknownRecord, ToolCall, ToolResult, } from "../types/clientTypes.js";
|
|
110
110
|
export { ErrorCode, NeuroLinkError, HttpError, ClientRateLimitError, ClientValidationError, ClientAuthenticationError, ClientAuthorizationError, NotFoundError, ClientNetworkError, ClientTimeoutError, ClientConnectionError, AbortError, ClientConfigurationError, StreamError, ClientProviderError, ContextLengthError, ContentFilterError, createErrorFromResponse, createErrorFromNative, mapStatusToErrorCode, isRetryableStatus, isRetryableError, isNeuroLinkError, isApiError, } from "./errors.js";
|
|
111
111
|
export type { ErrorCodeType } from "./errors.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/interceptors
|
|
8
8
|
*/
|
|
9
|
-
import type { Middleware, MiddlewareRequest, MiddlewareResponse, MiddlewareContext, RetryConfig, ApiError } from "../types/clientTypes.js";
|
|
9
|
+
import type { Middleware, MiddlewareRequest, MiddlewareResponse, ClientMiddlewareContext as MiddlewareContext, ClientRetryConfig as RetryConfig, ApiError } from "../types/clientTypes.js";
|
|
10
10
|
/**
|
|
11
11
|
* API Key authentication interceptor
|
|
12
12
|
*
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* @module @neurolink/react
|
|
16
16
|
*/
|
|
17
17
|
import type { ReactNode } from "react";
|
|
18
|
-
import type { NeuroLinkProviderProps, UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ChatMessage, SpeechRecognitionInternal } from "../types/clientTypes.js";
|
|
18
|
+
import type { NeuroLinkProviderProps, UseChatOptions, UseChatReturn, UseAgentOptions, UseAgentReturn, UseWorkflowOptions, UseWorkflowReturn, UseVoiceOptions, UseVoiceReturn, UseStreamOptions, UseStreamReturn, UseToolsOptions, UseToolsReturn, ClientChatMessage as ChatMessage, SpeechRecognitionInternal } from "../types/clientTypes.js";
|
|
19
19
|
import { NeuroLinkClient } from "./httpClient.js";
|
|
20
20
|
/**
|
|
21
21
|
* Provider component for NeuroLink client
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module @neurolink/client/sseClient
|
|
9
9
|
*/
|
|
10
|
-
import type { ClientConfig, StreamCallbacks, StreamEvent, StreamResult, ApiError } from "../types/clientTypes.js";
|
|
10
|
+
import type { ClientConfig, StreamCallbacks, ClientStreamEvent as StreamEvent, ClientStreamResult as StreamResult, ApiError } from "../types/clientTypes.js";
|
|
11
11
|
/**
|
|
12
12
|
* SSE connection state
|
|
13
13
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @neurolink/client/streaming
|
|
8
8
|
*/
|
|
9
|
-
import type { StreamEvent, StreamCallbacks, StreamResult, ApiError, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
9
|
+
import type { ClientStreamEvent as StreamEvent, StreamCallbacks, ClientStreamResult as StreamResult, ApiError, WebSocketOptions, WebSocketState, WebSocketMessageHandler } from "../types/clientTypes.js";
|
|
10
10
|
import type { JsonObject, UnknownRecord } from "../types/common.js";
|
|
11
11
|
import type { ToolCall, ToolResult } from "../types/streamTypes.js";
|
|
12
12
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module @neurolink/client/wsClient
|
|
9
9
|
*/
|
|
10
|
-
import type { StreamCallbacks, StreamEvent, StreamResult, ApiError, WSClientState, WSClientConfig, WSClientMessage, WSClientEventHandlers } from "../types/clientTypes.js";
|
|
10
|
+
import type { StreamCallbacks, ClientStreamEvent as StreamEvent, ClientStreamResult as StreamResult, ApiError, WSClientState, WSClientConfig, WSClientMessage, WSClientEventHandlers } from "../types/clientTypes.js";
|
|
11
11
|
/** @see WSClientState */
|
|
12
12
|
export type WebSocketState = WSClientState;
|
|
13
13
|
/** @see WSClientConfig */
|
|
@@ -173,7 +173,7 @@ export declare function createFileTools(registry: FileReferenceRegistry): {
|
|
|
173
173
|
} | undefined;
|
|
174
174
|
columns?: string[] | undefined;
|
|
175
175
|
entry_path?: string | undefined;
|
|
176
|
-
format?: "
|
|
176
|
+
format?: "detailed" | "text" | "summary" | undefined;
|
|
177
177
|
}, {
|
|
178
178
|
success: false;
|
|
179
179
|
error: string | undefined;
|