@nuvin/nuvin-core 1.16.2 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/VERSION CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.16.2",
3
- "commit": "8411280"
2
+ "version": "1.17.0",
3
+ "commit": "97f0346"
4
4
  }
package/dist/index.d.ts CHANGED
@@ -286,7 +286,20 @@ type AssignTaskArgs = {
286
286
  task: string;
287
287
  description: string;
288
288
  };
289
- type ToolArguments = BashToolArgs | FileReadArgs | FileEditArgs | FileNewArgs | LsArgs | GlobArgs | GrepArgs | WebSearchArgs | WebFetchArgs | TodoWriteArgs | AssignTaskArgs;
289
+ type AskUserArgs = {
290
+ description?: string;
291
+ questions: Array<{
292
+ question: string;
293
+ header: string;
294
+ options: Array<{
295
+ label: string;
296
+ description: string;
297
+ }>;
298
+ multiSelect: boolean;
299
+ }>;
300
+ answers?: Record<string, string | string[]>;
301
+ };
302
+ type ToolArguments = BashToolArgs | FileReadArgs | FileEditArgs | FileNewArgs | LsArgs | GlobArgs | GrepArgs | WebSearchArgs | WebFetchArgs | TodoWriteArgs | AssignTaskArgs | AskUserArgs;
290
303
  /**
291
304
  * Type guard to safely parse tool arguments
292
305
  */
@@ -453,6 +466,11 @@ type TodoWriteMetadata = {
453
466
  };
454
467
  };
455
468
  type AssignTaskMetadata = DelegationMetadata;
469
+ type AskUserMetadata = {
470
+ questionId: string;
471
+ questionCount: number;
472
+ answers: Record<string, string | string[]>;
473
+ };
456
474
  type ToolErrorMetadata = {
457
475
  errorReason?: ErrorReason;
458
476
  editInstruction?: string;
@@ -474,6 +492,7 @@ type ToolMetadataMap = {
474
492
  web_fetch: WebFetchMetadata;
475
493
  todo_write: TodoWriteMetadata;
476
494
  assign_task: AssignTaskMetadata;
495
+ ask_user_tool: AskUserMetadata;
477
496
  };
478
497
 
479
498
  type ToolCall = {
@@ -930,6 +949,8 @@ declare const AgentEventTypes: {
930
949
  readonly SubAgentToolResult: "sub_agent_tool_result";
931
950
  readonly SubAgentCompleted: "sub_agent_completed";
932
951
  readonly SubAgentMetrics: "sub_agent_metrics";
952
+ readonly UserQuestionRequired: "user_question_required";
953
+ readonly UserQuestionResponse: "user_question_response";
933
954
  };
934
955
  type ToolApprovalDecision = 'approve' | 'deny' | 'approve_all' | 'edit';
935
956
  type AgentEvent = {
@@ -1045,6 +1066,27 @@ type AgentEvent = {
1045
1066
  agentId: string;
1046
1067
  toolCallId: string;
1047
1068
  metrics: MetricsSnapshot;
1069
+ } | {
1070
+ type: typeof AgentEventTypes.UserQuestionRequired;
1071
+ conversationId: string;
1072
+ messageId: string;
1073
+ questionId: string;
1074
+ questions: Array<{
1075
+ id: string;
1076
+ question: string;
1077
+ header: string;
1078
+ options: Array<{
1079
+ label: string;
1080
+ description: string;
1081
+ }>;
1082
+ multiSelect: boolean;
1083
+ }>;
1084
+ } | {
1085
+ type: typeof AgentEventTypes.UserQuestionResponse;
1086
+ conversationId: string;
1087
+ messageId: string;
1088
+ questionId: string;
1089
+ answers: Record<string, string | string[]>;
1048
1090
  };
1049
1091
  interface EventPort {
1050
1092
  emit(event: AgentEvent): void | Promise<void>;
@@ -1053,6 +1095,7 @@ interface EventPort {
1053
1095
  declare class AgentOrchestrator {
1054
1096
  private cfg;
1055
1097
  private pendingApprovals;
1098
+ private pendingQuestions;
1056
1099
  private context;
1057
1100
  private ids;
1058
1101
  private clock;
@@ -1142,6 +1185,11 @@ declare class AgentOrchestrator {
1142
1185
  * Called by UI per-tool (not batch).
1143
1186
  */
1144
1187
  handleToolApproval(approvalId: string, decision: ToolApprovalDecision, editInstruction?: string): void;
1188
+ /**
1189
+ * Handles user's response to questions.
1190
+ * Called by UI when user submits answers.
1191
+ */
1192
+ handleUserQuestionResponse(questionId: string, answers: Record<string, string | string[]>): void;
1145
1193
  private getAvailableToolNames;
1146
1194
  }
1147
1195
 
@@ -1408,6 +1456,16 @@ type ToolExecutionContext = {
1408
1456
  messageId?: string;
1409
1457
  eventPort?: EventPort;
1410
1458
  signal?: AbortSignal;
1459
+ waitForUserQuestion?: (questionId: string, questions: Array<{
1460
+ id: string;
1461
+ question: string;
1462
+ header: string;
1463
+ options: Array<{
1464
+ label: string;
1465
+ description: string;
1466
+ }>;
1467
+ multiSelect: boolean;
1468
+ }>) => Promise<Record<string, string | string[]>>;
1411
1469
  } & Record<string, unknown>;
1412
1470
  interface FunctionTool<P = Record<string, unknown>, C = ToolExecutionContext, R extends ExecResult = ExecResult> {
1413
1471
  name: string;
@@ -2304,6 +2362,77 @@ type AssignErrorResult = ExecResultError & {
2304
2362
  };
2305
2363
  type AssignResult = AssignSuccessResult$1 | AssignErrorResult;
2306
2364
 
2365
+ type AskUserSuccessResult = {
2366
+ status: 'success';
2367
+ type: 'text';
2368
+ result: string;
2369
+ metadata: AskUserMetadata;
2370
+ };
2371
+ type AskUserErrorResult = ExecResultError;
2372
+ type AskUserResult = AskUserSuccessResult | AskUserErrorResult;
2373
+ declare class AskUserTool implements FunctionTool<AskUserArgs, ToolExecutionContext, AskUserResult> {
2374
+ name: "ask_user_tool";
2375
+ parameters: {
2376
+ readonly type: "object";
2377
+ readonly properties: {
2378
+ readonly questions: {
2379
+ readonly type: "array";
2380
+ readonly minItems: 1;
2381
+ readonly maxItems: 4;
2382
+ readonly items: {
2383
+ readonly type: "object";
2384
+ readonly properties: {
2385
+ readonly question: {
2386
+ readonly type: "string";
2387
+ readonly description: "The complete question to ask the user. Should be clear, specific, and end with a question mark. Example: \"Which library should we use for date formatting?\" If multiSelect is true, phrase it accordingly, e.g. \"Which features do you want to enable?\"";
2388
+ };
2389
+ readonly header: {
2390
+ readonly type: "string";
2391
+ readonly description: "Very short label displayed as a chip/tag (max 12 chars). Examples: \"Auth method\", \"Library\", \"Approach\".";
2392
+ };
2393
+ readonly options: {
2394
+ readonly type: "array";
2395
+ readonly minItems: 2;
2396
+ readonly maxItems: 4;
2397
+ readonly items: {
2398
+ readonly type: "object";
2399
+ readonly properties: {
2400
+ readonly label: {
2401
+ readonly type: "string";
2402
+ readonly description: "The display text for this option that the user will see and select. Should be concise (1-5 words) and clearly describe the choice.";
2403
+ };
2404
+ readonly description: {
2405
+ readonly type: "string";
2406
+ readonly description: "Explanation of what this option means or what will happen if chosen. Useful for providing context about trade-offs or implications.";
2407
+ };
2408
+ };
2409
+ readonly required: readonly ["label", "description"];
2410
+ };
2411
+ readonly description: "The available choices for this question. Must have 2-4 options. Each option should be a distinct, mutually exclusive choice (unless multiSelect is enabled). There should be no 'Other' option, that will be provided automatically.";
2412
+ };
2413
+ readonly multiSelect: {
2414
+ readonly type: "boolean";
2415
+ readonly description: "Set to true to allow the user to select multiple options instead of just one. Use when choices are not mutually exclusive.";
2416
+ };
2417
+ };
2418
+ readonly required: readonly ["question", "header", "options", "multiSelect"];
2419
+ };
2420
+ readonly description: "Questions to ask the user (1-4 questions)";
2421
+ };
2422
+ readonly answers: {
2423
+ readonly type: "object";
2424
+ readonly additionalProperties: {
2425
+ readonly type: "string";
2426
+ };
2427
+ readonly description: "User answers collected by the permission component";
2428
+ };
2429
+ };
2430
+ readonly required: readonly ["questions"];
2431
+ };
2432
+ definition(): ToolDefinition['function'];
2433
+ execute(params: AskUserArgs, context?: ToolExecutionContext): Promise<AskUserResult>;
2434
+ }
2435
+
2307
2436
  interface TaskOutputParams {
2308
2437
  session_id: string;
2309
2438
  blocking?: boolean;
@@ -2677,10 +2806,18 @@ declare function getProviderAuthMethods(providerKey: string, customProviders?: R
2677
2806
  }>;
2678
2807
  declare function getProviderDefaultModels(providerKey: string, customProviders?: Record<string, CustomProviderDefinition>): string[];
2679
2808
 
2809
+ interface MCPAuthOptions {
2810
+ type: 'none' | 'bearer' | 'oauth';
2811
+ token?: string;
2812
+ getToken?: () => Promise<string | null>;
2813
+ onAuthRequired?: () => Promise<string | null>;
2814
+ onInsufficientScope?: (requiredScopes: string[]) => Promise<string | null>;
2815
+ }
2680
2816
  type MCPHttpOptions = {
2681
2817
  type: 'http';
2682
2818
  url: string;
2683
2819
  headers?: Record<string, string>;
2820
+ auth?: MCPAuthOptions;
2684
2821
  };
2685
2822
  type MCPStdioOptions = {
2686
2823
  type: 'stdio';
@@ -2711,9 +2848,13 @@ declare class CoreMCPClient {
2711
2848
  private transport;
2712
2849
  private connected;
2713
2850
  private tools;
2851
+ private currentToken;
2714
2852
  constructor(opts: MCPOptions, timeoutMs?: number);
2853
+ private getAuthHeaders;
2715
2854
  connect(): Promise<void>;
2855
+ reconnectWithNewToken(): Promise<void>;
2716
2856
  isConnected(): boolean;
2857
+ getCurrentToken(): string | null;
2717
2858
  disconnect(): Promise<void>;
2718
2859
  refreshTools(): Promise<MCPToolSchema[]>;
2719
2860
  getTools(): MCPToolSchema[];
@@ -2735,6 +2876,106 @@ declare class MCPToolPort implements ToolPort {
2735
2876
  executeToolCalls(calls: ToolInvocation[], _context?: Record<string, unknown>, maxConcurrent?: number, signal?: AbortSignal): Promise<ToolExecutionResult[]>;
2736
2877
  }
2737
2878
 
2879
+ interface MCPOAuthConfig {
2880
+ clientId?: string;
2881
+ clientMetadataUrl?: string;
2882
+ authorizationServer?: string;
2883
+ scopes?: string[];
2884
+ tokenStorageKey?: string;
2885
+ }
2886
+ interface OAuthDiscoveryResult {
2887
+ authorizationServerUrl: string;
2888
+ authServerMetadata?: AuthServerMetadata;
2889
+ protectedResourceMetadata?: ProtectedResourceMetadata;
2890
+ wwwAuthenticateScope?: string;
2891
+ }
2892
+ interface StoredTokens {
2893
+ accessToken: string;
2894
+ refreshToken?: string;
2895
+ expiresAt?: number;
2896
+ scope?: string;
2897
+ tokenType?: string;
2898
+ }
2899
+ interface TokenStorage {
2900
+ get(key: string): Promise<StoredTokens | null>;
2901
+ set(key: string, tokens: StoredTokens): Promise<void>;
2902
+ delete(key: string): Promise<void>;
2903
+ }
2904
+ interface ProtectedResourceMetadata {
2905
+ resource: string;
2906
+ authorization_servers?: string[];
2907
+ scopes_supported?: string[];
2908
+ bearer_methods_supported?: string[];
2909
+ }
2910
+ interface AuthServerMetadata {
2911
+ issuer: string;
2912
+ authorization_endpoint: string;
2913
+ token_endpoint: string;
2914
+ registration_endpoint?: string;
2915
+ scopes_supported?: string[];
2916
+ response_types_supported?: string[];
2917
+ code_challenge_methods_supported?: string[];
2918
+ grant_types_supported?: string[];
2919
+ client_id_metadata_document_supported?: boolean;
2920
+ }
2921
+ interface AuthFlowResult {
2922
+ success: boolean;
2923
+ tokens?: StoredTokens;
2924
+ error?: string;
2925
+ }
2926
+ declare class MCPOAuthClient {
2927
+ private serverUrl;
2928
+ private config;
2929
+ private tokenStorage;
2930
+ private protectedResourceMetadata;
2931
+ private authServerMetadata;
2932
+ private pendingFlow;
2933
+ private callbackServer;
2934
+ private discoveryResult;
2935
+ private wwwAuthenticateScope;
2936
+ private cachedClientId;
2937
+ private cachedRedirectUris;
2938
+ constructor(serverUrl: string, config: MCPOAuthConfig, tokenStorage: TokenStorage);
2939
+ private get storageKey();
2940
+ discoverOAuthServer(): Promise<OAuthDiscoveryResult>;
2941
+ private tryDiscoverProtectedResourceMetadata;
2942
+ private fetchAuthServerMetadataFromUrl;
2943
+ discoverProtectedResourceMetadata(): Promise<ProtectedResourceMetadata>;
2944
+ discoverAuthServerMetadata(): Promise<AuthServerMetadata>;
2945
+ getAccessToken(): Promise<string | null>;
2946
+ hasValidToken(): Promise<boolean>;
2947
+ private refreshTokens;
2948
+ private getClientId;
2949
+ buildAuthorizationUrl(port: number): Promise<string>;
2950
+ private getEffectiveScopes;
2951
+ handleCallback(code: string, state: string): Promise<StoredTokens>;
2952
+ initiateAuthFlow(openBrowser: (url: string) => Promise<void>): Promise<AuthFlowResult>;
2953
+ private stopCallbackServer;
2954
+ private findAvailablePort;
2955
+ private isPortAvailable;
2956
+ private generateSuccessHtml;
2957
+ private generateErrorHtml;
2958
+ logout(): Promise<void>;
2959
+ getAuthStatus(): Promise<{
2960
+ authenticated: boolean;
2961
+ expiresAt?: number;
2962
+ scope?: string;
2963
+ }>;
2964
+ }
2965
+ declare function parseWWWAuthenticate(header: string): {
2966
+ scheme: string;
2967
+ params: Record<string, string>;
2968
+ };
2969
+ declare function isInsufficientScopeError(status: number, wwwAuthenticate?: string): {
2970
+ isError: boolean;
2971
+ requiredScopes?: string[];
2972
+ };
2973
+ declare function isUnauthorizedError(status: number, wwwAuthenticate?: string): {
2974
+ isError: boolean;
2975
+ resourceMetadataUrl?: string;
2976
+ requiredScopes?: string[];
2977
+ };
2978
+
2738
2979
  /**
2739
2980
  * @deprecated Use MCPServerConfig from nuvin-cli/config/types.ts instead
2740
2981
  */
@@ -2774,4 +3015,4 @@ declare function resolveBackspaces(s: string): string;
2774
3015
  declare function stripAnsiAndControls(s: string): string;
2775
3016
  declare function canonicalizeTerminalPaste(raw: string): string;
2776
3017
 
2777
- export { AGENT_CREATOR_SYSTEM_PROMPT, AbortError, type AgentAwareToolPort, type AgentCatalog, type AgentConfig, type AgentEvent, AgentEventTypes, AgentFilePersistence, AgentManager, AgentManagerCommandRunner, AgentOrchestrator, AgentRegistry, type AgentSession, type AgentStateManager, type AgentTemplate, AnthropicAISDKLLM, type AssignErrorResult, type AssignParams, type AssignResult, type AssignSuccessResult$1 as AssignSuccessResult, type AssignTaskArgs, type AssignTaskMetadata, type BaseLLMOptions, type BashErrorResult, type BashParams, type BashResult, type BashSuccessResult$1 as BashSuccessResult, BashTool, type BashToolArgs, type BashToolMetadata, CommandFilePersistence, type CommandMetadata, type CommandSource, type CompleteAgent, type CompleteCustomCommand, CompositeToolPort, type Conversation, ConversationContext, type ConversationMetadata, type ConversationSnapshot, ConversationStore, CoreMCPClient, type CustomCommandFrontmatter, type CustomCommandTemplate, DEFAULT_RETRY_CONFIG, DefaultAgentStateManager, DefaultDelegationService, DefaultSpecialistAgentFactory, type DelegationMetadata, type DelegationService, type DelegationServiceConfig, DelegationServiceFactory, type DirEntry, type ErrorMetadata, ErrorReason, type ExecResult, type ExecResultError, type ExecResultSuccess, type FileEditArgs, type FileEditMetadata, type FileEditResult, type FileEditSuccessResult$1 as FileEditSuccessResult, type FileMetadata, type FileNewArgs, type FileNewMetadata, type FileNewParams, type FileNewResult, type FileNewSuccessResult$1 as FileNewSuccessResult, type FileReadArgs, type FileReadErrorResult, type FileReadMetadata, type FileReadParams, type FileReadResult, type FileReadSuccessResult$1 as FileReadSuccessResult, type FolderTreeOptions, type FunctionTool, GithubLLM, type GlobArgs, type GlobParams, type GlobResult, type GlobSuccessResult$1 as GlobSuccessResult, type GlobToolMetadata, type GrepArgs, type GrepParams, type GrepResult, type GrepSuccessResult$1 as GrepSuccessResult, type GrepToolMetadata, InMemoryMemory, InMemoryMetadata, InMemoryMetricsPort, JsonFileMemoryPersistence, type LLMConfig, LLMError, type LLMFactory, type LLMOptions, type LLMPort, LLMResolver, type LineRangeMetadata, type LsArgs, type LsMetadata, type LsParams, type LsResult, type LsSuccessResult$1 as LsSuccessResult, type LspService, LspTool, type MCPConfig, type MCPServerConfig, MCPToolPort, type MemoryPort, MemoryPortMetadataAdapter, type Message, type MessageContent, type MessageContentPart, type MetadataPort, type MetricsChangeHandler, type MetricsPort, type MetricsSnapshot, type ModelInfo, type ModelLimits, NoopMetricsPort, NoopReminders, type OrchestratorAwareToolPort, type ParseResult, PersistedMemory, PersistingConsoleEventPort, type RetryConfig, RetryTransport, RuntimeEnv, type SendMessageOptions, SimpleContextBuilder, SimpleCost, SimpleId, type SkillErrorResult, type SkillMetadata, type SkillParams, type SkillProvider, type SkillResult, type SkillSuccessResult, SkillTool, type SkillInfo as SkillToolInfo, type SpecialistAgentConfig, type SpecialistAgentResult, type SubAgentState, type SubAgentToolCall, SystemClock, type TaskOutputMetadata, type TaskOutputParams, type TaskOutputResult, type TaskOutputSuccessResult, type TodoWriteArgs, type TodoWriteMetadata, type TodoWriteResult, type TodoWriteSuccessResult$1 as TodoWriteSuccessResult, type ToolApprovalDecision, type ToolArguments, type ToolCall, type ToolCallConversionResult, type ToolCallValidation, type ToolErrorMetadata, type ToolExecutionContext, type ToolExecutionResult, type ToolMetadataMap, type ToolName, type ToolParameterMap, type ToolPort, ToolRegistry, type ToolValidator, type TypedToolInvocation, type UsageData, type UserAttachment, type UserMessagePayload, type ValidationError, type ValidationResult, type WebFetchArgs, type WebFetchMetadata, type WebFetchParams, type WebFetchResult, type WebFetchSuccessResult$1 as WebFetchSuccessResult, type WebSearchArgs, type WebSearchMetadata, type WebSearchParams, type WebSearchResult, type WebSearchSuccessResult$1 as WebSearchSuccessResult, type WebSearchToolResult, assignTaskSchema, bashToolSchema, buildAgentCreationPrompt, buildInjectedSystem, canonicalizeTerminalPaste, convertToolCall, convertToolCalls, convertToolCallsWithErrorHandling, createEmptySnapshot, createLLM, deduplicateModels, err, fileEditSchema, fileNewSchema, fileReadSchema, generateFolderTree, getAvailableProviders, getFallbackLimits, getProviderAuthMethods, getProviderDefaultModels, getProviderLabel, globToolSchema, grepToolSchema, isAssignResult, isAssignSuccess, isAssignTaskArgs, isBashResult, isBashSuccess, isBashToolArgs, isError, isFileEditArgs, isFileEditResult, isFileEditSuccess, isFileNewArgs, isFileNewResult, isFileNewSuccess, isFileReadArgs, isFileReadResult, isFileReadSuccess, isGlobArgs, isGlobResult, isGlobSuccess, isGrepArgs, isGrepResult, isGrepSuccess, isJsonResult, isLsArgs, isLsToolResult, isLsToolSuccess, isRetryableError, isRetryableStatusCode, isSuccess, isSuccessJson, isSuccessText, isTextResult, isTodoWriteArgs, isTodoWriteResult, isTodoWriteSuccess, isValidCommandId, isWebFetchArgs, isWebFetchResult, isWebFetchSuccess, isWebSearchArgs, isWebSearchResult, isWebSearchSuccess, lsToolSchema, normalizeModelInfo, normalizeModelLimits, normalizeNewlines, okJson, okText, parseJSON, parseSubAgentToolCallArguments, parseToolArguments, renderTemplate, resolveBackspaces, resolveCarriageReturns, sanitizeCommandId, stripAnsiAndControls, supportsGetModels, todoWriteSchema, toolSchemas, toolValidators, validateToolParams, webFetchSchema, webSearchSchema };
3018
+ export { AGENT_CREATOR_SYSTEM_PROMPT, AbortError, type AgentAwareToolPort, type AgentCatalog, type AgentConfig, type AgentEvent, AgentEventTypes, AgentFilePersistence, AgentManager, AgentManagerCommandRunner, AgentOrchestrator, AgentRegistry, type AgentSession, type AgentStateManager, type AgentTemplate, AnthropicAISDKLLM, type AskUserArgs, type AskUserMetadata, AskUserTool, type AssignErrorResult, type AssignParams, type AssignResult, type AssignSuccessResult$1 as AssignSuccessResult, type AssignTaskArgs, type AssignTaskMetadata, type AuthFlowResult, type AuthServerMetadata, type BaseLLMOptions, type BashErrorResult, type BashParams, type BashResult, type BashSuccessResult$1 as BashSuccessResult, BashTool, type BashToolArgs, type BashToolMetadata, CommandFilePersistence, type CommandMetadata, type CommandSource, type CompleteAgent, type CompleteCustomCommand, CompositeToolPort, type Conversation, ConversationContext, type ConversationMetadata, type ConversationSnapshot, ConversationStore, CoreMCPClient, type CustomCommandFrontmatter, type CustomCommandTemplate, DEFAULT_RETRY_CONFIG, DefaultAgentStateManager, DefaultDelegationService, DefaultSpecialistAgentFactory, type DelegationMetadata, type DelegationService, type DelegationServiceConfig, DelegationServiceFactory, type DirEntry, type ErrorMetadata, ErrorReason, type ExecResult, type ExecResultError, type ExecResultSuccess, type FileEditArgs, type FileEditMetadata, type FileEditResult, type FileEditSuccessResult$1 as FileEditSuccessResult, type FileMetadata, type FileNewArgs, type FileNewMetadata, type FileNewParams, type FileNewResult, type FileNewSuccessResult$1 as FileNewSuccessResult, type FileReadArgs, type FileReadErrorResult, type FileReadMetadata, type FileReadParams, type FileReadResult, type FileReadSuccessResult$1 as FileReadSuccessResult, type FolderTreeOptions, type FunctionTool, GithubLLM, type GlobArgs, type GlobParams, type GlobResult, type GlobSuccessResult$1 as GlobSuccessResult, type GlobToolMetadata, type GrepArgs, type GrepParams, type GrepResult, type GrepSuccessResult$1 as GrepSuccessResult, type GrepToolMetadata, InMemoryMemory, InMemoryMetadata, InMemoryMetricsPort, JsonFileMemoryPersistence, type LLMConfig, LLMError, type LLMFactory, type LLMOptions, type LLMPort, LLMResolver, type LineRangeMetadata, type LsArgs, type LsMetadata, type LsParams, type LsResult, type LsSuccessResult$1 as LsSuccessResult, type LspService, LspTool, type MCPAuthOptions, type MCPCallResult, type MCPConfig, type MCPHttpOptions, MCPOAuthClient, type MCPOAuthConfig, type MCPOptions, type MCPServerConfig, type MCPStdioOptions, type MCPToolCall, MCPToolPort, type MCPToolSchema, type MemoryPort, MemoryPortMetadataAdapter, type Message, type MessageContent, type MessageContentPart, type MetadataPort, type MetricsChangeHandler, type MetricsPort, type MetricsSnapshot, type ModelInfo, type ModelLimits, NoopMetricsPort, NoopReminders, type OrchestratorAwareToolPort, type ParseResult, PersistedMemory, PersistingConsoleEventPort, type ProtectedResourceMetadata, type RetryConfig, RetryTransport, RuntimeEnv, type SendMessageOptions, SimpleContextBuilder, SimpleCost, SimpleId, type SkillErrorResult, type SkillMetadata, type SkillParams, type SkillProvider, type SkillResult, type SkillSuccessResult, SkillTool, type SkillInfo as SkillToolInfo, type SpecialistAgentConfig, type SpecialistAgentResult, type StoredTokens, type SubAgentState, type SubAgentToolCall, SystemClock, type TaskOutputMetadata, type TaskOutputParams, type TaskOutputResult, type TaskOutputSuccessResult, type TodoWriteArgs, type TodoWriteMetadata, type TodoWriteResult, type TodoWriteSuccessResult$1 as TodoWriteSuccessResult, type TokenStorage, type ToolApprovalDecision, type ToolArguments, type ToolCall, type ToolCallConversionResult, type ToolCallValidation, type ToolErrorMetadata, type ToolExecutionContext, type ToolExecutionResult, type ToolMetadataMap, type ToolName, type ToolParameterMap, type ToolPort, ToolRegistry, type ToolValidator, type TypedToolInvocation, type UsageData, type UserAttachment, type UserMessagePayload, type ValidationError, type ValidationResult, type WebFetchArgs, type WebFetchMetadata, type WebFetchParams, type WebFetchResult, type WebFetchSuccessResult$1 as WebFetchSuccessResult, type WebSearchArgs, type WebSearchMetadata, type WebSearchParams, type WebSearchResult, type WebSearchSuccessResult$1 as WebSearchSuccessResult, type WebSearchToolResult, assignTaskSchema, bashToolSchema, buildAgentCreationPrompt, buildInjectedSystem, canonicalizeTerminalPaste, convertToolCall, convertToolCalls, convertToolCallsWithErrorHandling, createEmptySnapshot, createLLM, deduplicateModels, err, fileEditSchema, fileNewSchema, fileReadSchema, generateFolderTree, getAvailableProviders, getFallbackLimits, getProviderAuthMethods, getProviderDefaultModels, getProviderLabel, globToolSchema, grepToolSchema, isAssignResult, isAssignSuccess, isAssignTaskArgs, isBashResult, isBashSuccess, isBashToolArgs, isError, isFileEditArgs, isFileEditResult, isFileEditSuccess, isFileNewArgs, isFileNewResult, isFileNewSuccess, isFileReadArgs, isFileReadResult, isFileReadSuccess, isGlobArgs, isGlobResult, isGlobSuccess, isGrepArgs, isGrepResult, isGrepSuccess, isInsufficientScopeError, isJsonResult, isLsArgs, isLsToolResult, isLsToolSuccess, isRetryableError, isRetryableStatusCode, isSuccess, isSuccessJson, isSuccessText, isTextResult, isTodoWriteArgs, isTodoWriteResult, isTodoWriteSuccess, isUnauthorizedError, isValidCommandId, isWebFetchArgs, isWebFetchResult, isWebFetchSuccess, isWebSearchArgs, isWebSearchResult, isWebSearchSuccess, lsToolSchema, normalizeModelInfo, normalizeModelLimits, normalizeNewlines, okJson, okText, parseJSON, parseSubAgentToolCallArguments, parseToolArguments, parseWWWAuthenticate, renderTemplate, resolveBackspaces, resolveCarriageReturns, sanitizeCommandId, stripAnsiAndControls, supportsGetModels, todoWriteSchema, toolSchemas, toolValidators, validateToolParams, webFetchSchema, webSearchSchema };