@n8n/agents 0.10.0 → 0.11.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/build.tsbuildinfo +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/runtime/agent-runtime.d.ts +14 -6
- package/dist/runtime/agent-runtime.js +320 -243
- package/dist/runtime/agent-runtime.js.map +1 -1
- package/dist/runtime/delegate-sub-agent-tool.d.ts +87 -0
- package/dist/runtime/delegate-sub-agent-tool.js +362 -0
- package/dist/runtime/delegate-sub-agent-tool.js.map +1 -0
- package/dist/runtime/event-bus.d.ts +8 -0
- package/dist/runtime/event-bus.js +48 -0
- package/dist/runtime/event-bus.js.map +1 -1
- package/dist/runtime/mcp-connection.d.ts +1 -2
- package/dist/runtime/mcp-connection.js +1 -4
- package/dist/runtime/mcp-connection.js.map +1 -1
- package/dist/runtime/message-list.d.ts +9 -3
- package/dist/runtime/message-list.js +16 -5
- package/dist/runtime/message-list.js.map +1 -1
- package/dist/runtime/messages.js +10 -2
- package/dist/runtime/messages.js.map +1 -1
- package/dist/runtime/model-factory.js +12 -0
- package/dist/runtime/model-factory.js.map +1 -1
- package/dist/runtime/provider-credentials.d.ts +13 -0
- package/dist/runtime/provider-credentials.js +1 -0
- package/dist/runtime/provider-credentials.js.map +1 -1
- package/dist/runtime/runtime-helpers.d.ts +1 -2
- package/dist/runtime/runtime-helpers.js +0 -8
- package/dist/runtime/runtime-helpers.js.map +1 -1
- package/dist/runtime/sdk-owned-tool.d.ts +4 -0
- package/dist/runtime/sdk-owned-tool.js +19 -0
- package/dist/runtime/sdk-owned-tool.js.map +1 -0
- package/dist/runtime/stream.js +8 -0
- package/dist/runtime/stream.js.map +1 -1
- package/dist/runtime/sub-agent-task-path.d.ts +10 -0
- package/dist/runtime/sub-agent-task-path.js +39 -0
- package/dist/runtime/sub-agent-task-path.js.map +1 -0
- package/dist/runtime/title-generation.js +3 -5
- package/dist/runtime/title-generation.js.map +1 -1
- package/dist/runtime/tool-adapter.d.ts +0 -9
- package/dist/runtime/tool-adapter.js +12 -21
- package/dist/runtime/tool-adapter.js.map +1 -1
- package/dist/runtime/write-todos-tool.d.ts +3 -0
- package/dist/runtime/write-todos-tool.js +95 -0
- package/dist/runtime/write-todos-tool.js.map +1 -0
- package/dist/sdk/agent.d.ts +19 -12
- package/dist/sdk/agent.js +318 -91
- package/dist/sdk/agent.js.map +1 -1
- package/dist/sdk/cancellation.d.ts +7 -0
- package/dist/sdk/cancellation.js +16 -0
- package/dist/sdk/cancellation.js.map +1 -0
- package/dist/sdk/catalog.js +20 -4
- package/dist/sdk/catalog.js.map +1 -1
- package/dist/sdk/mcp-client.d.ts +1 -1
- package/dist/sdk/mcp-client.js +2 -2
- package/dist/sdk/mcp-client.js.map +1 -1
- package/dist/sdk/memory.d.ts +1 -3
- package/dist/sdk/memory.js +0 -14
- package/dist/sdk/memory.js.map +1 -1
- package/dist/sdk/provider-capabilities.js +1 -0
- package/dist/sdk/provider-capabilities.js.map +1 -1
- package/dist/sdk/tool.d.ts +3 -0
- package/dist/sdk/tool.js +42 -10
- package/dist/sdk/tool.js.map +1 -1
- package/dist/storage/base-memory.d.ts +0 -31
- package/dist/storage/base-memory.js +0 -9
- package/dist/storage/base-memory.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/runtime/event.d.ts +31 -1
- package/dist/types/runtime/event.js +2 -0
- package/dist/types/runtime/event.js.map +1 -1
- package/dist/types/sdk/agent-builder.d.ts +0 -1
- package/dist/types/sdk/agent.d.ts +20 -15
- package/dist/types/sdk/memory.d.ts +0 -42
- package/dist/types/sdk/message.d.ts +1 -0
- package/dist/types/sdk/tool.d.ts +19 -1
- package/dist/utils/json-schema.d.ts +3 -0
- package/dist/utils/json-schema.js +72 -0
- package/dist/utils/json-schema.js.map +1 -0
- package/dist/workspace/filesystem/daytona-filesystem.d.ts +25 -0
- package/dist/workspace/filesystem/daytona-filesystem.js +130 -0
- package/dist/workspace/filesystem/daytona-filesystem.js.map +1 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.d.ts +25 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.js +126 -0
- package/dist/workspace/filesystem/n8n-sandbox-filesystem.js.map +1 -0
- package/dist/workspace/sandbox/base-sandbox.d.ts +1 -0
- package/dist/workspace/sandbox/base-sandbox.js +5 -0
- package/dist/workspace/sandbox/base-sandbox.js.map +1 -1
- package/dist/workspace/sandbox/create-workspace.d.ts +4 -0
- package/dist/workspace/sandbox/create-workspace.js +58 -0
- package/dist/workspace/sandbox/create-workspace.js.map +1 -0
- package/dist/workspace/sandbox/daytona-auth-manager.d.ts +26 -0
- package/dist/workspace/sandbox/daytona-auth-manager.js +84 -0
- package/dist/workspace/sandbox/daytona-auth-manager.js.map +1 -0
- package/dist/workspace/sandbox/daytona-sandbox.d.ts +72 -0
- package/dist/workspace/sandbox/daytona-sandbox.js +357 -0
- package/dist/workspace/sandbox/daytona-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/index.d.ts +7 -0
- package/dist/workspace/sandbox/index.js +22 -0
- package/dist/workspace/sandbox/index.js.map +1 -0
- package/dist/workspace/sandbox/lazy-daytona.d.ts +2 -0
- package/dist/workspace/sandbox/lazy-daytona.js +12 -0
- package/dist/workspace/sandbox/lazy-daytona.js.map +1 -0
- package/dist/workspace/sandbox/logger.d.ts +12 -0
- package/dist/workspace/sandbox/logger.js +3 -0
- package/dist/workspace/sandbox/logger.js.map +1 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.d.ts +35 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.js +138 -0
- package/dist/workspace/sandbox/n8n-sandbox-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/provider.d.ts +4 -0
- package/dist/workspace/sandbox/provider.js +14 -0
- package/dist/workspace/sandbox/provider.js.map +1 -0
- package/dist/workspace/sandbox/run-in-sandbox.d.ts +26 -0
- package/dist/workspace/sandbox/run-in-sandbox.js +19 -0
- package/dist/workspace/sandbox/run-in-sandbox.js.map +1 -0
- package/dist/workspace/sandbox/types.d.ts +41 -0
- package/dist/workspace/sandbox/types.js +3 -0
- package/dist/workspace/sandbox/types.js.map +1 -0
- package/dist/workspace/sandbox/workspace-root.d.ts +16 -0
- package/dist/workspace/sandbox/workspace-root.js +69 -0
- package/dist/workspace/sandbox/workspace-root.js.map +1 -0
- package/dist/workspace/tools/batch-str-replace-file.js +2 -2
- package/dist/workspace/tools/batch-str-replace-file.js.map +1 -1
- package/dist/workspace/tools/str-replace-file.js +2 -2
- package/dist/workspace/tools/str-replace-file.js.map +1 -1
- package/package.json +29 -17
- package/dist/sdk/network.d.ts +0 -20
- package/dist/sdk/network.js +0 -46
- package/dist/sdk/network.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export type { BuiltTool, BuiltProviderTool, BuiltAgent, BuiltMemory, BuiltEpisodicMemoryStore, BuiltGuardrail, BuiltEval, RunOptions, AgentResult, GenerateResult, StreamResult, EvalInput, EvalScore, EvalRunResult, EvalResults, ToolContext, ToolExecutionContext, InterruptibleToolContext, CheckpointStore, StreamChunk,
|
|
1
|
+
export type { BuiltTool, BuiltProviderTool, BuiltAgent, BuiltMemory, BuiltEpisodicMemoryStore, BuiltGuardrail, BuiltEval, RunOptions, AgentResult, GenerateResult, StreamResult, EvalInput, EvalScore, EvalRunResult, EvalResults, ToolContext, ToolExecutionContext, InterruptibleToolContext, CheckpointStore, StreamChunk, Provider, ThinkingConfig, ThinkingConfigFor, AnthropicThinkingConfig, OpenAIThinkingConfig, GoogleThinkingConfig, XaiThinkingConfig, SerializableAgentState, AgentRunState, MemoryConfig, ObservationLogMemoryConfig, MemoryDescriptor, ObservationCapableMemory, TitleGenerationConfig, Thread, EpisodicMemoryConfig, EpisodicMemoryCursor, EpisodicMemoryEmbeddingProviderOptions, EpisodicMemoryEntry, EpisodicMemoryEntrySource, EpisodicMemoryExtractFn, EpisodicMemoryExtraction, EpisodicMemoryExtractionCandidate, EpisodicMemoryExtractorInput, EpisodicMemoryMethods, EpisodicMemoryPrompts, EpisodicMemoryReflectFn, EpisodicMemoryReflection, EpisodicMemoryReflectionApply, EpisodicMemoryReflectionApplyMerge, EpisodicMemoryReflectionMerge, EpisodicMemoryReflectionResult, EpisodicMemoryReflectorInput, EpisodicMemoryScope, EpisodicMemorySearchOptions, EpisodicMemoryStatus, EpisodicMemoryTaskLockHandle, EpisodicMemoryTaskLockMethods, NewEpisodicMemoryCursor, NewEpisodicMemoryEntry, NewEpisodicMemoryEntrySource, NewEpisodicMemoryEntrySourceForEntry, RetrievedEpisodicMemoryEntry, ResumeOptions, McpServerConfig, McpVerifyResult, ModelConfig, ExecutionOptions, SmoothStreamOptions, AgentExecutionCounter, PersistedExecutionOptions, BuiltTelemetry, AttributeValue, ObservationCursor, ObservationalMemoryConfig, BuiltObservationLogStore, BuiltObservationLogTaskLockStore, NewObservationLogEntry, ObservationLogEntry, ObservationLogMarker, ObservationLogMerge, ObservationLogReadOptions, ObservationLogReflection, ObservationLogReflectionResult, ObservationLogScope, ObservationLogStatus, ObservationLogTaskKind, ObservationLogTaskLockHandle, TokenCounter, } from './types';
|
|
2
2
|
export type { ProviderOptions } from '@ai-sdk/provider-utils';
|
|
3
3
|
export { AgentEvent } from './types';
|
|
4
4
|
export type { AgentEventData, AgentEventHandler } from './types';
|
|
5
5
|
export { estimateObservationTokens, OBSERVATION_LOG_MARKERS, OBSERVATION_LOG_STATUSES, } from './types';
|
|
6
|
+
export { createCancellation, isCancellation, CANCELLATION_TYPE } from './sdk/cancellation';
|
|
7
|
+
export type { Cancellation } from './sdk/cancellation';
|
|
6
8
|
export { Tool, wrapToolForApproval } from './sdk/tool';
|
|
7
9
|
export { Memory } from './sdk/memory';
|
|
8
10
|
export { Guardrail } from './sdk/guardrail';
|
|
@@ -19,7 +21,6 @@ export { appendSkillCatalogToInstructions, createListSkillsTool, createRuntimeSk
|
|
|
19
21
|
export type { RenderSkillCatalogOptions, RuntimeSkill, RuntimeSkillContent, RuntimeSkillDependenciesContract, RuntimeSkillFileContent, RuntimeSkillFileLoader, RuntimeSkillIndexEntry, RuntimeSkillInterfaceContract, RuntimeSkillLinkedFile, RuntimeSkillLinkedFileGroup, RuntimeSkillLinkedFiles, RuntimeSkillLoader, RuntimeSkillMcpServerDependency, RuntimeSkillPolicyContract, RuntimeSkillRegistry, RuntimeSkillRegistryEntry, RuntimeSkillSource, RuntimeSkillValidationError, RuntimeSkillValidationResult, } from './skills';
|
|
20
22
|
export type { AgentBuilder, CredentialProvider, ResolvedCredential, CredentialListItem, } from './types';
|
|
21
23
|
export { McpClient } from './sdk/mcp-client';
|
|
22
|
-
export { Network } from './sdk/network';
|
|
23
24
|
export { providerTools } from './sdk/provider-tools';
|
|
24
25
|
export { verify } from './sdk/verify';
|
|
25
26
|
export type { VerifyResult } from './sdk/verify';
|
|
@@ -33,6 +34,11 @@ export type { ProviderCatalog, ProviderInfo, ModelInfo, ModelCost, ModelLimits,
|
|
|
33
34
|
export { BaseMemory } from './storage/base-memory';
|
|
34
35
|
export type { ToolDescriptor } from './types/sdk/tool-descriptor';
|
|
35
36
|
export { createModel } from './runtime/model-factory';
|
|
37
|
+
export { DEFAULT_SUB_AGENT_MAX_CHILDREN, ROOT_SUB_AGENT_TASK_PATH, assertSubAgentTaskPath, createChildSubAgentTaskPath, isSubAgentTaskPath, sanitizeSubAgentTaskName, } from './runtime/sub-agent-task-path';
|
|
38
|
+
export type { SubAgentTaskPath, SubAgentTaskPathPolicy } from './runtime/sub-agent-task-path';
|
|
39
|
+
export { DELEGATE_SUB_AGENT_TOOL_NAME, DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE, INLINE_SUB_AGENT_ID, SUB_AGENT_TASK_DIFFICULTIES, createDelegateSubAgentTool, failedDelegatedChildSuspendOutput, generateResultToDelegateSubAgentOutput, getInlineDelegateSubAgentToolOptions, renderDelegateSubAgentPrompt, } from './runtime/delegate-sub-agent-tool';
|
|
40
|
+
export type { CreateDelegateSubAgentToolOptions, DelegateSubAgentInput, DelegateSubAgentPolicy, DelegateSubAgentRequest, DelegateSubAgentRunner, DelegateSubAgentRunnerHelpers, DelegateSubAgentToolOutput, InlineSubAgentProviderToolsResolver, SubAgentTaskDifficulty, } from './runtime/delegate-sub-agent-tool';
|
|
41
|
+
export { WRITE_TODOS_TOOL_NAME, createWriteTodosTool } from './runtime/write-todos-tool';
|
|
36
42
|
export { createEmbeddingModel } from './runtime/model-factory';
|
|
37
43
|
export { generateTitleFromMessage } from './runtime/title-generation';
|
|
38
44
|
export { activeLifecycleState, droppedLifecycleState, markLifecycleActive, markLifecycleDropped, markLifecycleSuperseded, normalizeFlatReflectionActions, supersededLifecycleState, uniqueStrings, } from './runtime/memory-lifecycle';
|
package/dist/index.js
CHANGED
|
@@ -33,15 +33,19 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.zodToJsonSchema = void 0;
|
|
36
|
+
exports.createChildSubAgentTaskPath = exports.assertSubAgentTaskPath = exports.ROOT_SUB_AGENT_TASK_PATH = exports.DEFAULT_SUB_AGENT_MAX_CHILDREN = exports.createModel = exports.BaseMemory = exports.providerCapabilities = exports.fetchProviderCatalog = exports.isLlmMessage = exports.filterLlmMessages = exports.verify = exports.providerTools = exports.McpClient = exports.validateRuntimeSkill = exports.SKILL_LOAD_TOOL_NAME = exports.LIST_SKILLS_TOOL_NAME = exports.RUNTIME_SKILL_REGISTRY_SCHEMA_VERSION = exports.RUNTIME_SKILL_NAME_PATTERN = exports.RUNTIME_SKILL_LINKED_FILE_GROUPS = exports.RUNTIME_SKILL_FILE_NAME = exports.RUNTIME_SKILL_TOOL_NAMES = exports.renderSkillCatalogPrompt = exports.parseRuntimeSkillMarkdown = exports.loadRuntimeSkillSourceFromDirectory = exports.loadRuntimeSkillsFromDirectory = exports.InvalidRuntimeSkillError = exports.formatSkillValidationErrors = exports.createSkillLoadTool = exports.createRuntimeSkillTools = exports.createRuntimeSkillSource = exports.createRuntimeSkillRegistry = exports.createListSkillsTool = exports.appendSkillCatalogToInstructions = exports.Agent = exports.LangSmithTelemetry = exports.Telemetry = exports.evals = exports.evaluate = exports.Eval = exports.Guardrail = exports.Memory = exports.wrapToolForApproval = exports.Tool = exports.CANCELLATION_TYPE = exports.isCancellation = exports.createCancellation = exports.OBSERVATION_LOG_STATUSES = exports.OBSERVATION_LOG_MARKERS = exports.estimateObservationTokens = exports.AgentEvent = void 0;
|
|
37
|
+
exports.runObservationLogReflector = exports.renderObservationLogForReflection = exports.parseObservationLogReflectionJson = exports.normalizeObservationLogReflection = exports.runObservationLogObserver = exports.renderObserverTranscript = exports.parseObservationLogMarkdown = exports.createEpisodicMemoryReflectFn = exports.createEpisodicMemoryExtractFn = exports.buildEpisodicMemoryReflectorPrompt = exports.buildEpisodicMemoryExtractorPrompt = exports.DEFAULT_EPISODIC_MEMORY_TOP_K = exports.DEFAULT_EPISODIC_MEMORY_REFLECTION_PROMPT = exports.DEFAULT_EPISODIC_MEMORY_RECALL_TOOL_INSTRUCTION = exports.DEFAULT_EPISODIC_MEMORY_MAX_ENTRIES_PER_RUN = exports.DEFAULT_EPISODIC_MEMORY_EXTRACTION_PROMPT = exports.DEFAULT_EPISODIC_MEMORY_EMBEDDING_MODEL = exports.withEpisodicMemoryDefaults = exports.runEpisodicMemoryIndexer = exports.rankEpisodicMemoryEntries = exports.isEpisodicMemoryEnabled = exports.hasEpisodicMemoryStore = exports.hashEpisodicMemoryEvidence = exports.hashEpisodicMemoryContent = exports.getEpisodicMemoryScope = exports.createRecallMemoryTool = exports.RECALL_MEMORY_TOOL_NAME = exports.uniqueStrings = exports.supersededLifecycleState = exports.normalizeFlatReflectionActions = exports.markLifecycleSuperseded = exports.markLifecycleDropped = exports.markLifecycleActive = exports.droppedLifecycleState = exports.activeLifecycleState = exports.generateTitleFromMessage = exports.createEmbeddingModel = exports.createWriteTodosTool = exports.WRITE_TODOS_TOOL_NAME = exports.renderDelegateSubAgentPrompt = exports.getInlineDelegateSubAgentToolOptions = exports.generateResultToDelegateSubAgentOutput = exports.failedDelegatedChildSuspendOutput = exports.createDelegateSubAgentTool = exports.SUB_AGENT_TASK_DIFFICULTIES = exports.INLINE_SUB_AGENT_ID = exports.DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE = exports.DELEGATE_SUB_AGENT_TOOL_NAME = exports.sanitizeSubAgentTaskName = exports.isSubAgentTaskPath = void 0;
|
|
38
|
+
exports.zodToJsonSchema = exports.isZodSchema = exports.ProcessHandle = exports.SandboxProcessManager = exports.createWorkspaceTools = exports.BaseSandbox = exports.BaseFilesystem = exports.Workspace = exports.DEFAULT_OBSERVATION_LOG_TAIL_LIMIT = exports.DEFAULT_OBSERVATION_LOG_RENDER_TOKEN_BUDGET = exports.DEFAULT_OBSERVATION_LOG_REFLECTOR_THRESHOLD_TOKENS = exports.DEFAULT_OBSERVATION_LOG_REFLECTOR_PROMPT = exports.DEFAULT_OBSERVATION_LOG_OBSERVER_THRESHOLD_TOKENS = exports.DEFAULT_OBSERVATION_LOG_OBSERVER_PROMPT = exports.DEFAULT_OBSERVATION_LOG_LOCK_TTL_MS = exports.createObservationLogObserveFn = exports.createObservationLogReflectFn = exports.buildObservationLogObserverPrompt = exports.buildObservationLogReflectorPrompt = exports.ScopedMemoryTaskRunner = void 0;
|
|
39
39
|
var types_1 = require("./types");
|
|
40
40
|
Object.defineProperty(exports, "AgentEvent", { enumerable: true, get: function () { return types_1.AgentEvent; } });
|
|
41
41
|
var types_2 = require("./types");
|
|
42
42
|
Object.defineProperty(exports, "estimateObservationTokens", { enumerable: true, get: function () { return types_2.estimateObservationTokens; } });
|
|
43
43
|
Object.defineProperty(exports, "OBSERVATION_LOG_MARKERS", { enumerable: true, get: function () { return types_2.OBSERVATION_LOG_MARKERS; } });
|
|
44
44
|
Object.defineProperty(exports, "OBSERVATION_LOG_STATUSES", { enumerable: true, get: function () { return types_2.OBSERVATION_LOG_STATUSES; } });
|
|
45
|
+
var cancellation_1 = require("./sdk/cancellation");
|
|
46
|
+
Object.defineProperty(exports, "createCancellation", { enumerable: true, get: function () { return cancellation_1.createCancellation; } });
|
|
47
|
+
Object.defineProperty(exports, "isCancellation", { enumerable: true, get: function () { return cancellation_1.isCancellation; } });
|
|
48
|
+
Object.defineProperty(exports, "CANCELLATION_TYPE", { enumerable: true, get: function () { return cancellation_1.CANCELLATION_TYPE; } });
|
|
45
49
|
var tool_1 = require("./sdk/tool");
|
|
46
50
|
Object.defineProperty(exports, "Tool", { enumerable: true, get: function () { return tool_1.Tool; } });
|
|
47
51
|
Object.defineProperty(exports, "wrapToolForApproval", { enumerable: true, get: function () { return tool_1.wrapToolForApproval; } });
|
|
@@ -83,8 +87,6 @@ Object.defineProperty(exports, "SKILL_LOAD_TOOL_NAME", { enumerable: true, get:
|
|
|
83
87
|
Object.defineProperty(exports, "validateRuntimeSkill", { enumerable: true, get: function () { return skills_1.validateRuntimeSkill; } });
|
|
84
88
|
var mcp_client_1 = require("./sdk/mcp-client");
|
|
85
89
|
Object.defineProperty(exports, "McpClient", { enumerable: true, get: function () { return mcp_client_1.McpClient; } });
|
|
86
|
-
var network_1 = require("./sdk/network");
|
|
87
|
-
Object.defineProperty(exports, "Network", { enumerable: true, get: function () { return network_1.Network; } });
|
|
88
90
|
var provider_tools_1 = require("./sdk/provider-tools");
|
|
89
91
|
Object.defineProperty(exports, "providerTools", { enumerable: true, get: function () { return provider_tools_1.providerTools; } });
|
|
90
92
|
var verify_1 = require("./sdk/verify");
|
|
@@ -100,6 +102,26 @@ var base_memory_1 = require("./storage/base-memory");
|
|
|
100
102
|
Object.defineProperty(exports, "BaseMemory", { enumerable: true, get: function () { return base_memory_1.BaseMemory; } });
|
|
101
103
|
var model_factory_1 = require("./runtime/model-factory");
|
|
102
104
|
Object.defineProperty(exports, "createModel", { enumerable: true, get: function () { return model_factory_1.createModel; } });
|
|
105
|
+
var sub_agent_task_path_1 = require("./runtime/sub-agent-task-path");
|
|
106
|
+
Object.defineProperty(exports, "DEFAULT_SUB_AGENT_MAX_CHILDREN", { enumerable: true, get: function () { return sub_agent_task_path_1.DEFAULT_SUB_AGENT_MAX_CHILDREN; } });
|
|
107
|
+
Object.defineProperty(exports, "ROOT_SUB_AGENT_TASK_PATH", { enumerable: true, get: function () { return sub_agent_task_path_1.ROOT_SUB_AGENT_TASK_PATH; } });
|
|
108
|
+
Object.defineProperty(exports, "assertSubAgentTaskPath", { enumerable: true, get: function () { return sub_agent_task_path_1.assertSubAgentTaskPath; } });
|
|
109
|
+
Object.defineProperty(exports, "createChildSubAgentTaskPath", { enumerable: true, get: function () { return sub_agent_task_path_1.createChildSubAgentTaskPath; } });
|
|
110
|
+
Object.defineProperty(exports, "isSubAgentTaskPath", { enumerable: true, get: function () { return sub_agent_task_path_1.isSubAgentTaskPath; } });
|
|
111
|
+
Object.defineProperty(exports, "sanitizeSubAgentTaskName", { enumerable: true, get: function () { return sub_agent_task_path_1.sanitizeSubAgentTaskName; } });
|
|
112
|
+
var delegate_sub_agent_tool_1 = require("./runtime/delegate-sub-agent-tool");
|
|
113
|
+
Object.defineProperty(exports, "DELEGATE_SUB_AGENT_TOOL_NAME", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.DELEGATE_SUB_AGENT_TOOL_NAME; } });
|
|
114
|
+
Object.defineProperty(exports, "DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.DELEGATED_CHILD_SUSPEND_UNSUPPORTED_MESSAGE; } });
|
|
115
|
+
Object.defineProperty(exports, "INLINE_SUB_AGENT_ID", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.INLINE_SUB_AGENT_ID; } });
|
|
116
|
+
Object.defineProperty(exports, "SUB_AGENT_TASK_DIFFICULTIES", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.SUB_AGENT_TASK_DIFFICULTIES; } });
|
|
117
|
+
Object.defineProperty(exports, "createDelegateSubAgentTool", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.createDelegateSubAgentTool; } });
|
|
118
|
+
Object.defineProperty(exports, "failedDelegatedChildSuspendOutput", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.failedDelegatedChildSuspendOutput; } });
|
|
119
|
+
Object.defineProperty(exports, "generateResultToDelegateSubAgentOutput", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.generateResultToDelegateSubAgentOutput; } });
|
|
120
|
+
Object.defineProperty(exports, "getInlineDelegateSubAgentToolOptions", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.getInlineDelegateSubAgentToolOptions; } });
|
|
121
|
+
Object.defineProperty(exports, "renderDelegateSubAgentPrompt", { enumerable: true, get: function () { return delegate_sub_agent_tool_1.renderDelegateSubAgentPrompt; } });
|
|
122
|
+
var write_todos_tool_1 = require("./runtime/write-todos-tool");
|
|
123
|
+
Object.defineProperty(exports, "WRITE_TODOS_TOOL_NAME", { enumerable: true, get: function () { return write_todos_tool_1.WRITE_TODOS_TOOL_NAME; } });
|
|
124
|
+
Object.defineProperty(exports, "createWriteTodosTool", { enumerable: true, get: function () { return write_todos_tool_1.createWriteTodosTool; } });
|
|
103
125
|
var model_factory_2 = require("./runtime/model-factory");
|
|
104
126
|
Object.defineProperty(exports, "createEmbeddingModel", { enumerable: true, get: function () { return model_factory_2.createEmbeddingModel; } });
|
|
105
127
|
var title_generation_1 = require("./runtime/title-generation");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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A;AAClB,yCAA6C;AAApC,2GAAA,cAAc,OAAA;AACvB,yCAA0C;AAAjC,wGAAA,WAAW,OAAA;AACpB,yCAAmD;AAA1C,iHAAA,oBAAoB,OAAA;AAC7B,yCAAmE;AAA1D,kHAAA,qBAAqB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAiC7C,mCAA2D;AAAlD,kGAAA,WAAW,OAAA;AAAE,sGAAA,eAAe,OAAA"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ProviderOptions } from '@ai-sdk/provider-utils';
|
|
2
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
2
3
|
import type { z } from 'zod';
|
|
3
|
-
import
|
|
4
|
+
import { type ModelCost } from '../sdk/catalog';
|
|
5
|
+
import type { BuiltMemory, BuiltProviderTool, BuiltTelemetry, BuiltTool, CheckpointStore, EpisodicMemoryConfig, GenerateResult, ObservationalMemoryConfig, ObservationLogMemoryConfig, RunOptions, SerializableAgentState, StreamResult, ThinkingConfig, TitleGenerationConfig } from '../types';
|
|
4
6
|
import { AgentEventBus } from './event-bus';
|
|
7
|
+
import { RunStateManager } from './run-state';
|
|
5
8
|
import type { ExecutionOptions, ModelConfig } from '../types/sdk/agent';
|
|
6
9
|
import type { AgentMessage } from '../types/sdk/message';
|
|
7
10
|
export interface AgentRuntimeConfig {
|
|
@@ -19,14 +22,16 @@ export interface AgentRuntimeConfig {
|
|
|
19
22
|
observationLog?: ObservationLogMemoryConfig;
|
|
20
23
|
observationalMemory?: ObservationalMemoryConfig;
|
|
21
24
|
episodicMemory?: EpisodicMemoryConfig;
|
|
22
|
-
|
|
23
|
-
structuredOutput?: z.ZodType;
|
|
25
|
+
structuredOutput?: z.ZodType | JSONSchema7;
|
|
24
26
|
checkpointStorage?: 'memory' | CheckpointStore;
|
|
25
27
|
thinking?: ThinkingConfig;
|
|
26
28
|
eventBus?: AgentEventBus;
|
|
27
29
|
toolCallConcurrency?: number;
|
|
28
30
|
titleGeneration?: TitleGenerationConfig;
|
|
29
31
|
telemetry?: BuiltTelemetry;
|
|
32
|
+
runId?: string;
|
|
33
|
+
modelCost?: ModelCost;
|
|
34
|
+
runState?: RunStateManager;
|
|
30
35
|
}
|
|
31
36
|
export declare class AgentRuntime {
|
|
32
37
|
private config;
|
|
@@ -38,6 +43,7 @@ export declare class AgentRuntime {
|
|
|
38
43
|
private memoryTasks;
|
|
39
44
|
private episodicMemoryTasksByResource;
|
|
40
45
|
private deferredToolManager;
|
|
46
|
+
private runId;
|
|
41
47
|
constructor(config: AgentRuntimeConfig);
|
|
42
48
|
setTelemetry(telemetry: BuiltTelemetry | undefined): void;
|
|
43
49
|
dispose(): Promise<void>;
|
|
@@ -55,13 +61,12 @@ export declare class AgentRuntime {
|
|
|
55
61
|
} & ExecutionOptions): Promise<StreamResult>;
|
|
56
62
|
private buildMessageList;
|
|
57
63
|
private loadHistoryMessages;
|
|
58
|
-
private performSemanticRecall;
|
|
59
|
-
private expandMessageRange;
|
|
60
64
|
private initRun;
|
|
61
65
|
private finalizeGenerate;
|
|
62
66
|
private resolveTelemetry;
|
|
63
67
|
private flushTelemetry;
|
|
64
68
|
private buildAiSdkOptions;
|
|
69
|
+
private buildSmoothStreamTransformOptions;
|
|
65
70
|
private buildTelemetryOptions;
|
|
66
71
|
private buildTelemetryRootAttributes;
|
|
67
72
|
private buildTelemetryMetadataAttributes;
|
|
@@ -84,13 +89,16 @@ export declare class AgentRuntime {
|
|
|
84
89
|
private scheduleMemoryTask;
|
|
85
90
|
private getMemoryTaskRunner;
|
|
86
91
|
private getObservationLogScope;
|
|
87
|
-
private saveEmbeddingsForMessages;
|
|
88
92
|
private buildThinkingProviderOptions;
|
|
89
93
|
private buildCallProviderOptions;
|
|
94
|
+
private isDelegateSubAgentCall;
|
|
95
|
+
private getToolCallBatchSize;
|
|
96
|
+
private takeNextToolCallBatch;
|
|
90
97
|
private iterateToolCallsConcurrent;
|
|
91
98
|
private iteratePendingToolCallsConcurrent;
|
|
92
99
|
private processToolCall;
|
|
93
100
|
private buildStaticLoopContext;
|
|
101
|
+
private relaxStrictJsonSchemaIfNeeded;
|
|
94
102
|
private buildToolLoopContext;
|
|
95
103
|
private getCurrentTools;
|
|
96
104
|
private createRecallMemoryToolForRun;
|