@nuvin/nuvin-core 1.14.1 → 1.16.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.16.0",
3
+ "commit": "6f699bb"
4
4
  }
package/dist/index.d.ts CHANGED
@@ -1416,6 +1416,169 @@ 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 SkillParams = {
1420
+ name: string;
1421
+ };
1422
+ type SkillMetadata = {
1423
+ name: string;
1424
+ dir: string;
1425
+ };
1426
+ type SkillSuccessResult = {
1427
+ status: 'success';
1428
+ type: 'text';
1429
+ result: string;
1430
+ metadata: SkillMetadata;
1431
+ };
1432
+ type SkillErrorResult = ExecResultError & {
1433
+ metadata?: {
1434
+ name?: string;
1435
+ errorReason?: ErrorReason;
1436
+ };
1437
+ };
1438
+ type SkillResult = SkillSuccessResult | SkillErrorResult;
1439
+ interface SkillInfo {
1440
+ name: string;
1441
+ description: string;
1442
+ location: string;
1443
+ }
1444
+ interface SkillProvider {
1445
+ get(name: string): Promise<SkillInfo | null>;
1446
+ getAll(): Promise<Record<string, SkillInfo>>;
1447
+ buildToolDescription(): string;
1448
+ getPermission(name: string): 'allow' | 'ask' | 'deny';
1449
+ }
1450
+ declare class SkillTool implements FunctionTool<SkillParams, ToolExecutionContext, SkillResult> {
1451
+ name: "skill";
1452
+ private provider;
1453
+ private dynamicDescription;
1454
+ parameters: {
1455
+ readonly type: "object";
1456
+ readonly properties: {
1457
+ readonly name: {
1458
+ readonly type: "string";
1459
+ readonly description: "The skill identifier from available_skills (e.g., \"front-end-skill\" or \"vitest-skill\")";
1460
+ };
1461
+ };
1462
+ readonly required: readonly ["name"];
1463
+ };
1464
+ setProvider(provider: SkillProvider): void;
1465
+ updateDescription(): void;
1466
+ definition(): ToolDefinition['function'];
1467
+ execute(params: SkillParams, _context?: ToolExecutionContext): Promise<SkillResult>;
1468
+ }
1469
+
1470
+ type LspOperation = 'goToDefinition' | 'findReferences' | 'hover' | 'documentSymbol' | 'workspaceSymbol' | 'goToImplementation' | 'prepareCallHierarchy' | 'incomingCalls' | 'outgoingCalls' | 'diagnostics';
1471
+ type LspParams = {
1472
+ operation: LspOperation;
1473
+ filePath: string;
1474
+ line: number;
1475
+ character: number;
1476
+ query?: string;
1477
+ };
1478
+ type LspSuccessResult = {
1479
+ status: 'success';
1480
+ type: 'text';
1481
+ result: string;
1482
+ metadata?: {
1483
+ operation: LspOperation;
1484
+ filePath: string;
1485
+ line: number;
1486
+ character: number;
1487
+ resultCount?: number;
1488
+ };
1489
+ };
1490
+ type LspResult = LspSuccessResult | ExecResultError;
1491
+ interface LspService {
1492
+ init(): Promise<void>;
1493
+ isEnabled(): boolean;
1494
+ hasClients(file: string): Promise<boolean>;
1495
+ touchFile(filePath: string, waitDiagnostics?: boolean): Promise<void>;
1496
+ diagnostics(): Promise<Record<string, unknown[]>>;
1497
+ diagnosticsForFile(filePath: string): Promise<unknown[]>;
1498
+ definition(pos: {
1499
+ file: string;
1500
+ line: number;
1501
+ character: number;
1502
+ }): Promise<unknown[]>;
1503
+ references(pos: {
1504
+ file: string;
1505
+ line: number;
1506
+ character: number;
1507
+ }): Promise<unknown[]>;
1508
+ hover(pos: {
1509
+ file: string;
1510
+ line: number;
1511
+ character: number;
1512
+ }): Promise<unknown | null>;
1513
+ documentSymbol(uri: string): Promise<unknown[]>;
1514
+ workspaceSymbol(query: string): Promise<unknown[]>;
1515
+ implementation(pos: {
1516
+ file: string;
1517
+ line: number;
1518
+ character: number;
1519
+ }): Promise<unknown[]>;
1520
+ prepareCallHierarchy(pos: {
1521
+ file: string;
1522
+ line: number;
1523
+ character: number;
1524
+ }): Promise<unknown[]>;
1525
+ incomingCalls(pos: {
1526
+ file: string;
1527
+ line: number;
1528
+ character: number;
1529
+ }): Promise<unknown[]>;
1530
+ outgoingCalls(pos: {
1531
+ file: string;
1532
+ line: number;
1533
+ character: number;
1534
+ }): Promise<unknown[]>;
1535
+ }
1536
+ type LspToolOptions = {
1537
+ rootDir?: string;
1538
+ lspService?: LspService;
1539
+ };
1540
+ declare class LspTool implements FunctionTool<LspParams, ToolExecutionContext, LspResult> {
1541
+ name: "lsp";
1542
+ private readonly rootDir;
1543
+ private lspService?;
1544
+ constructor(opts?: LspToolOptions);
1545
+ setLspService(service: LspService): void;
1546
+ parameters: {
1547
+ readonly type: "object";
1548
+ readonly properties: {
1549
+ readonly operation: {
1550
+ readonly type: "string";
1551
+ readonly enum: LspOperation[];
1552
+ readonly description: "The LSP operation to perform";
1553
+ };
1554
+ readonly filePath: {
1555
+ readonly type: "string";
1556
+ readonly description: "The absolute or relative path to the file";
1557
+ };
1558
+ readonly line: {
1559
+ readonly type: "number";
1560
+ readonly description: "The line number (1-based, as shown in editors)";
1561
+ };
1562
+ readonly character: {
1563
+ readonly type: "number";
1564
+ readonly description: "The character offset (1-based, as shown in editors)";
1565
+ };
1566
+ readonly query: {
1567
+ readonly type: "string";
1568
+ readonly description: "Search query for workspaceSymbol operation (optional)";
1569
+ };
1570
+ };
1571
+ readonly required: readonly ["operation", "filePath", "line", "character"];
1572
+ };
1573
+ definition(): ToolDefinition['function'];
1574
+ execute(params: LspParams, context?: ToolExecutionContext): Promise<LspResult>;
1575
+ private formatResult;
1576
+ private formatHover;
1577
+ private formatDiagnostics;
1578
+ private formatLocations;
1579
+ private formatSymbols;
1580
+ }
1581
+
1419
1582
  interface AgentCatalog {
1420
1583
  list(): AgentTemplate[];
1421
1584
  get(agentId: string): AgentTemplate | undefined;
@@ -1613,6 +1776,8 @@ declare class ToolRegistry implements ToolPort, AgentAwareToolPort, Orchestrator
1613
1776
  private agentRegistry;
1614
1777
  private delegationServiceFactory?;
1615
1778
  private assignTool?;
1779
+ private lspTool?;
1780
+ private skillTool?;
1616
1781
  private enabledAgentsConfig;
1617
1782
  private orchestratorConfig?;
1618
1783
  private orchestratorTools?;
@@ -1623,7 +1788,12 @@ declare class ToolRegistry implements ToolPort, AgentAwareToolPort, Orchestrator
1623
1788
  toolsMemory?: MemoryPort<string>;
1624
1789
  agentRegistry?: AgentRegistry;
1625
1790
  delegationServiceFactory?: DelegationServiceFactory;
1791
+ enableLsp?: boolean;
1792
+ enableSkills?: boolean;
1626
1793
  });
1794
+ setLspService(service: LspService): void;
1795
+ setSkillProvider(provider: SkillProvider): void;
1796
+ updateSkillToolDescription(): void;
1627
1797
  private persistToolNames;
1628
1798
  listRegisteredTools(): Promise<string[]>;
1629
1799
  getToolDefinitions(enabledTools: string[]): ToolDefinition[];
@@ -2605,4 +2775,4 @@ declare function resolveBackspaces(s: string): string;
2605
2775
  declare function stripAnsiAndControls(s: string): string;
2606
2776
  declare function canonicalizeTerminalPaste(raw: string): string;
2607
2777
 
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 };
2778
+ 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 };