@nuvin/nuvin-core 1.13.5 → 1.14.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 +2 -2
- package/dist/index.d.ts +17 -25
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/VERSION
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -484,6 +484,8 @@ type ToolCall = {
|
|
|
484
484
|
arguments: string;
|
|
485
485
|
};
|
|
486
486
|
editInstruction?: string;
|
|
487
|
+
approvalId?: string;
|
|
488
|
+
requiresApproval?: boolean;
|
|
487
489
|
};
|
|
488
490
|
type TextContentPart = {
|
|
489
491
|
type: 'text';
|
|
@@ -1124,11 +1126,22 @@ declare class AgentOrchestrator {
|
|
|
1124
1126
|
* Read-only tools and todo management tools are auto-approved.
|
|
1125
1127
|
*/
|
|
1126
1128
|
private shouldBypassApproval;
|
|
1127
|
-
|
|
1129
|
+
/**
|
|
1130
|
+
* Process tool approval with per-tool granularity.
|
|
1131
|
+
* - Bypass tools (requiresApproval=false) execute immediately
|
|
1132
|
+
* - Non-bypass tools wait for their individual approval
|
|
1133
|
+
* - All tools run in parallel, each waiting only for its own approval
|
|
1134
|
+
* - ToolResult events emitted immediately when each tool completes
|
|
1135
|
+
*
|
|
1136
|
+
* @param enrichedToolCalls - Tool calls already enriched with approvalId and requiresApproval
|
|
1137
|
+
*/
|
|
1128
1138
|
private processToolApproval;
|
|
1129
1139
|
send(content: UserMessagePayload, opts?: SendMessageOptions): Promise<MessageResponse>;
|
|
1130
|
-
|
|
1131
|
-
|
|
1140
|
+
/**
|
|
1141
|
+
* Handles a single tool's approval decision.
|
|
1142
|
+
* Called by UI per-tool (not batch).
|
|
1143
|
+
*/
|
|
1144
|
+
handleToolApproval(approvalId: string, decision: ToolApprovalDecision, editInstruction?: string): void;
|
|
1132
1145
|
private getAvailableToolNames;
|
|
1133
1146
|
}
|
|
1134
1147
|
|
|
@@ -1227,27 +1240,6 @@ declare class PersistedMemory<T = unknown> implements MemoryPort<T> {
|
|
|
1227
1240
|
importSnapshot(snapshot: MemorySnapshot<T>): Promise<void>;
|
|
1228
1241
|
}
|
|
1229
1242
|
|
|
1230
|
-
interface MultiFileMemoryPersistenceOptions {
|
|
1231
|
-
directory: string;
|
|
1232
|
-
/** Converts a memory key to a filename. Default: `history.${key}.json` */
|
|
1233
|
-
getFilename?: (key: string) => string;
|
|
1234
|
-
/** Extracts the key from a filename. Default: extracts from `history.{key}.json` */
|
|
1235
|
-
getKeyFromFilename?: (filename: string) => string | null;
|
|
1236
|
-
}
|
|
1237
|
-
/**
|
|
1238
|
-
* Multi-file persistence adapter that stores each memory key in its own file.
|
|
1239
|
-
* Files are named using the pattern: history.{key}.json
|
|
1240
|
-
* Only keys starting with 'agent:' are persisted to separate files.
|
|
1241
|
-
*/
|
|
1242
|
-
declare class MultiFileMemoryPersistence<T = unknown> implements MemoryPersistence<T> {
|
|
1243
|
-
private options;
|
|
1244
|
-
private getFilename;
|
|
1245
|
-
private getKeyFromFilename;
|
|
1246
|
-
constructor(options: MultiFileMemoryPersistenceOptions);
|
|
1247
|
-
load(): Promise<MemorySnapshot<T>>;
|
|
1248
|
-
save(snapshot: MemorySnapshot<T>): Promise<void>;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
1243
|
declare class MemoryPortMetadataAdapter<T> implements MetadataPort<T> {
|
|
1252
1244
|
private memory;
|
|
1253
1245
|
private prefix;
|
|
@@ -2613,4 +2605,4 @@ declare function resolveBackspaces(s: string): string;
|
|
|
2613
2605
|
declare function stripAnsiAndControls(s: string): string;
|
|
2614
2606
|
declare function canonicalizeTerminalPaste(raw: string): string;
|
|
2615
2607
|
|
|
2616
|
-
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,
|
|
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 };
|