@nuvin/nuvin-core 1.14.1 → 1.15.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.14.1",
3
- "commit": "c5c2537"
2
+ "version": "1.15.0",
3
+ "commit": "8ceca76"
4
4
  }
package/dist/index.d.ts CHANGED
@@ -1416,6 +1416,118 @@ interface FunctionTool<P = Record<string, unknown>, C = ToolExecutionContext, R
1416
1416
  execute(params: P, context?: C): Promise<R> | R;
1417
1417
  }
1418
1418
 
1419
+ type LspOperation = 'goToDefinition' | 'findReferences' | 'hover' | 'documentSymbol' | 'workspaceSymbol' | 'goToImplementation' | 'prepareCallHierarchy' | 'incomingCalls' | 'outgoingCalls' | 'diagnostics';
1420
+ type LspParams = {
1421
+ operation: LspOperation;
1422
+ filePath: string;
1423
+ line: number;
1424
+ character: number;
1425
+ query?: string;
1426
+ };
1427
+ type LspSuccessResult = {
1428
+ status: 'success';
1429
+ type: 'text';
1430
+ result: string;
1431
+ metadata?: {
1432
+ operation: LspOperation;
1433
+ filePath: string;
1434
+ line: number;
1435
+ character: number;
1436
+ resultCount?: number;
1437
+ };
1438
+ };
1439
+ type LspResult = LspSuccessResult | ExecResultError;
1440
+ interface LspService {
1441
+ init(): Promise<void>;
1442
+ isEnabled(): boolean;
1443
+ hasClients(file: string): Promise<boolean>;
1444
+ touchFile(filePath: string, waitDiagnostics?: boolean): Promise<void>;
1445
+ diagnostics(): Promise<Record<string, unknown[]>>;
1446
+ diagnosticsForFile(filePath: string): Promise<unknown[]>;
1447
+ definition(pos: {
1448
+ file: string;
1449
+ line: number;
1450
+ character: number;
1451
+ }): Promise<unknown[]>;
1452
+ references(pos: {
1453
+ file: string;
1454
+ line: number;
1455
+ character: number;
1456
+ }): Promise<unknown[]>;
1457
+ hover(pos: {
1458
+ file: string;
1459
+ line: number;
1460
+ character: number;
1461
+ }): Promise<unknown | null>;
1462
+ documentSymbol(uri: string): Promise<unknown[]>;
1463
+ workspaceSymbol(query: string): Promise<unknown[]>;
1464
+ implementation(pos: {
1465
+ file: string;
1466
+ line: number;
1467
+ character: number;
1468
+ }): Promise<unknown[]>;
1469
+ prepareCallHierarchy(pos: {
1470
+ file: string;
1471
+ line: number;
1472
+ character: number;
1473
+ }): Promise<unknown[]>;
1474
+ incomingCalls(pos: {
1475
+ file: string;
1476
+ line: number;
1477
+ character: number;
1478
+ }): Promise<unknown[]>;
1479
+ outgoingCalls(pos: {
1480
+ file: string;
1481
+ line: number;
1482
+ character: number;
1483
+ }): Promise<unknown[]>;
1484
+ }
1485
+ type LspToolOptions = {
1486
+ rootDir?: string;
1487
+ lspService?: LspService;
1488
+ };
1489
+ declare class LspTool implements FunctionTool<LspParams, ToolExecutionContext, LspResult> {
1490
+ name: "lsp";
1491
+ private readonly rootDir;
1492
+ private lspService?;
1493
+ constructor(opts?: LspToolOptions);
1494
+ setLspService(service: LspService): void;
1495
+ parameters: {
1496
+ readonly type: "object";
1497
+ readonly properties: {
1498
+ readonly operation: {
1499
+ readonly type: "string";
1500
+ readonly enum: LspOperation[];
1501
+ readonly description: "The LSP operation to perform";
1502
+ };
1503
+ readonly filePath: {
1504
+ readonly type: "string";
1505
+ readonly description: "The absolute or relative path to the file";
1506
+ };
1507
+ readonly line: {
1508
+ readonly type: "number";
1509
+ readonly description: "The line number (1-based, as shown in editors)";
1510
+ };
1511
+ readonly character: {
1512
+ readonly type: "number";
1513
+ readonly description: "The character offset (1-based, as shown in editors)";
1514
+ };
1515
+ readonly query: {
1516
+ readonly type: "string";
1517
+ readonly description: "Search query for workspaceSymbol operation (optional)";
1518
+ };
1519
+ };
1520
+ readonly required: readonly ["operation", "filePath", "line", "character"];
1521
+ };
1522
+ definition(): ToolDefinition['function'];
1523
+ execute(params: LspParams, context?: ToolExecutionContext): Promise<LspResult>;
1524
+ private formatResult;
1525
+ private formatHover;
1526
+ private formatDiagnostics;
1527
+ private formatLocations;
1528
+ private formatSymbols;
1529
+ }
1530
+
1419
1531
  interface AgentCatalog {
1420
1532
  list(): AgentTemplate[];
1421
1533
  get(agentId: string): AgentTemplate | undefined;
@@ -1613,6 +1725,7 @@ declare class ToolRegistry implements ToolPort, AgentAwareToolPort, Orchestrator
1613
1725
  private agentRegistry;
1614
1726
  private delegationServiceFactory?;
1615
1727
  private assignTool?;
1728
+ private lspTool?;
1616
1729
  private enabledAgentsConfig;
1617
1730
  private orchestratorConfig?;
1618
1731
  private orchestratorTools?;
@@ -1623,7 +1736,9 @@ declare class ToolRegistry implements ToolPort, AgentAwareToolPort, Orchestrator
1623
1736
  toolsMemory?: MemoryPort<string>;
1624
1737
  agentRegistry?: AgentRegistry;
1625
1738
  delegationServiceFactory?: DelegationServiceFactory;
1739
+ enableLsp?: boolean;
1626
1740
  });
1741
+ setLspService(service: LspService): void;
1627
1742
  private persistToolNames;
1628
1743
  listRegisteredTools(): Promise<string[]>;
1629
1744
  getToolDefinitions(enabledTools: string[]): ToolDefinition[];
@@ -2605,4 +2720,4 @@ declare function resolveBackspaces(s: string): string;
2605
2720
  declare function stripAnsiAndControls(s: string): string;
2606
2721
  declare function canonicalizeTerminalPaste(raw: string): string;
2607
2722
 
2608
- 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 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 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 };
2723
+ 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 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 };