actoviq-agent-sdk 0.4.6 → 0.4.7
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/CHANGELOG.md +203 -0
- package/README-zh.md +54 -19
- package/README.md +53 -19
- package/SECURITY.md +26 -0
- package/assets/actoviq-icon.ico +0 -0
- package/bin/actoviq-gui.js +28 -3
- package/dist/src/buddy/actoviqBuddy.d.ts.map +1 -1
- package/dist/src/buddy/actoviqBuddy.js +3 -4
- package/dist/src/buddy/actoviqBuddy.js.map +1 -1
- package/dist/src/cli/actoviq-react.js +495 -60
- package/dist/src/cli/actoviq-react.js.map +1 -1
- package/dist/src/compat/diagnostics.d.ts +18 -0
- package/dist/src/compat/diagnostics.d.ts.map +1 -0
- package/dist/src/compat/diagnostics.js +47 -0
- package/dist/src/compat/diagnostics.js.map +1 -0
- package/dist/src/compat/index.d.ts +8 -0
- package/dist/src/compat/index.d.ts.map +1 -0
- package/dist/src/compat/index.js +6 -0
- package/dist/src/compat/index.js.map +1 -0
- package/dist/src/config/actoviqHome.d.ts +32 -0
- package/dist/src/config/actoviqHome.d.ts.map +1 -0
- package/dist/src/config/actoviqHome.js +228 -0
- package/dist/src/config/actoviqHome.js.map +1 -0
- package/dist/src/config/actoviqSettingsStore.d.ts.map +1 -1
- package/dist/src/config/actoviqSettingsStore.js +6 -6
- package/dist/src/config/actoviqSettingsStore.js.map +1 -1
- package/dist/src/config/agentProfiles.d.ts +77 -0
- package/dist/src/config/agentProfiles.d.ts.map +1 -0
- package/dist/src/config/agentProfiles.js +319 -0
- package/dist/src/config/agentProfiles.js.map +1 -0
- package/dist/src/config/loadDefaultActoviqSettings.d.ts.map +1 -1
- package/dist/src/config/loadDefaultActoviqSettings.js +2 -3
- package/dist/src/config/loadDefaultActoviqSettings.js.map +1 -1
- package/dist/src/config/projectSessionDirectory.d.ts.map +1 -1
- package/dist/src/config/projectSessionDirectory.js +3 -2
- package/dist/src/config/projectSessionDirectory.js.map +1 -1
- package/dist/src/config/resolveRuntimeConfig.d.ts.map +1 -1
- package/dist/src/config/resolveRuntimeConfig.js +13 -2
- package/dist/src/config/resolveRuntimeConfig.js.map +1 -1
- package/dist/src/core/agent-spec.d.ts +74 -0
- package/dist/src/core/agent-spec.d.ts.map +1 -0
- package/dist/src/core/agent-spec.js +2 -0
- package/dist/src/core/agent-spec.js.map +1 -0
- package/dist/src/core/errors.d.ts +42 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/core/errors.js +53 -0
- package/dist/src/core/errors.js.map +1 -0
- package/dist/src/core/index.d.ts +11 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +4 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/items.d.ts +161 -0
- package/dist/src/core/items.d.ts.map +1 -0
- package/dist/src/core/items.js +2 -0
- package/dist/src/core/items.js.map +1 -0
- package/dist/src/core/json.d.ts +20 -0
- package/dist/src/core/json.d.ts.map +1 -0
- package/dist/src/core/json.js +80 -0
- package/dist/src/core/json.js.map +1 -0
- package/dist/src/core/model-ref.d.ts +6 -0
- package/dist/src/core/model-ref.d.ts.map +1 -0
- package/dist/src/core/model-ref.js +2 -0
- package/dist/src/core/model-ref.js.map +1 -0
- package/dist/src/core/run.d.ts +35 -0
- package/dist/src/core/run.d.ts.map +1 -0
- package/dist/src/core/run.js +2 -0
- package/dist/src/core/run.js.map +1 -0
- package/dist/src/core/usage.d.ts +32 -0
- package/dist/src/core/usage.d.ts.map +1 -0
- package/dist/src/core/usage.js +111 -0
- package/dist/src/core/usage.js.map +1 -0
- package/dist/src/errors.d.ts +19 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +27 -0
- package/dist/src/errors.js.map +1 -1
- package/dist/src/events/index.d.ts +4 -0
- package/dist/src/events/index.d.ts.map +1 -0
- package/dist/src/events/index.js +4 -0
- package/dist/src/events/index.js.map +1 -0
- package/dist/src/events/openTelemetry.d.ts +51 -0
- package/dist/src/events/openTelemetry.d.ts.map +1 -0
- package/dist/src/events/openTelemetry.js +116 -0
- package/dist/src/events/openTelemetry.js.map +1 -0
- package/dist/src/events/processors.d.ts +14 -0
- package/dist/src/events/processors.d.ts.map +1 -0
- package/dist/src/events/processors.js +60 -0
- package/dist/src/events/processors.js.map +1 -0
- package/dist/src/events/runEvents.d.ts +66 -0
- package/dist/src/events/runEvents.d.ts.map +1 -0
- package/dist/src/events/runEvents.js +143 -0
- package/dist/src/events/runEvents.js.map +1 -0
- package/dist/src/gui/actoviqGui.d.ts +15 -0
- package/dist/src/gui/actoviqGui.d.ts.map +1 -1
- package/dist/src/gui/actoviqGui.js +18034 -1919
- package/dist/src/gui/actoviqGui.js.map +1 -1
- package/dist/src/gui/contextRailStore.d.ts +47 -0
- package/dist/src/gui/contextRailStore.d.ts.map +1 -0
- package/dist/src/gui/contextRailStore.js +163 -0
- package/dist/src/gui/contextRailStore.js.map +1 -0
- package/dist/src/gui/electronMain.js +32 -16
- package/dist/src/gui/electronMain.js.map +1 -1
- package/dist/src/gui/guiAssets.d.ts +6 -0
- package/dist/src/gui/guiAssets.d.ts.map +1 -0
- package/dist/src/gui/guiAssets.js +48 -0
- package/dist/src/gui/guiAssets.js.map +1 -0
- package/dist/src/gui/guiSyntaxHighlight.d.ts +11 -0
- package/dist/src/gui/guiSyntaxHighlight.d.ts.map +1 -0
- package/dist/src/gui/guiSyntaxHighlight.js +348 -0
- package/dist/src/gui/guiSyntaxHighlight.js.map +1 -0
- package/dist/src/gui/projectMeta.d.ts +15 -0
- package/dist/src/gui/projectMeta.d.ts.map +1 -0
- package/dist/src/gui/projectMeta.js +61 -0
- package/dist/src/gui/projectMeta.js.map +1 -0
- package/dist/src/gui/projectWorkbench.d.ts +73 -0
- package/dist/src/gui/projectWorkbench.d.ts.map +1 -0
- package/dist/src/gui/projectWorkbench.js +307 -0
- package/dist/src/gui/projectWorkbench.js.map +1 -0
- package/dist/src/gui/terminalManager.d.ts +33 -0
- package/dist/src/gui/terminalManager.d.ts.map +1 -0
- package/dist/src/gui/terminalManager.js +206 -0
- package/dist/src/gui/terminalManager.js.map +1 -0
- package/dist/src/gui/transcript/clientBundle.d.ts +6 -0
- package/dist/src/gui/transcript/clientBundle.d.ts.map +1 -0
- package/dist/src/gui/transcript/clientBundle.js +978 -0
- package/dist/src/gui/transcript/clientBundle.js.map +1 -0
- package/dist/src/gui/transcript/index.d.ts +9 -0
- package/dist/src/gui/transcript/index.d.ts.map +1 -0
- package/dist/src/gui/transcript/index.js +6 -0
- package/dist/src/gui/transcript/index.js.map +1 -0
- package/dist/src/gui/transcript/parts.d.ts +81 -0
- package/dist/src/gui/transcript/parts.d.ts.map +1 -0
- package/dist/src/gui/transcript/parts.js +476 -0
- package/dist/src/gui/transcript/parts.js.map +1 -0
- package/dist/src/gui/transcript/registry.d.ts +8 -0
- package/dist/src/gui/transcript/registry.d.ts.map +1 -0
- package/dist/src/gui/transcript/registry.js +32 -0
- package/dist/src/gui/transcript/registry.js.map +1 -0
- package/dist/src/gui/transcript/scroll.d.ts +9 -0
- package/dist/src/gui/transcript/scroll.d.ts.map +1 -0
- package/dist/src/gui/transcript/scroll.js +13 -0
- package/dist/src/gui/transcript/scroll.js.map +1 -0
- package/dist/src/gui/transcript/styles.d.ts +3 -0
- package/dist/src/gui/transcript/styles.d.ts.map +1 -0
- package/dist/src/gui/transcript/styles.js +172 -0
- package/dist/src/gui/transcript/styles.js.map +1 -0
- package/dist/src/gui/workspaceNote.d.ts +4 -0
- package/dist/src/gui/workspaceNote.d.ts.map +1 -0
- package/dist/src/gui/workspaceNote.js +21 -0
- package/dist/src/gui/workspaceNote.js.map +1 -0
- package/dist/src/gui/workspaceRegistry.d.ts +11 -0
- package/dist/src/gui/workspaceRegistry.d.ts.map +1 -0
- package/dist/src/gui/workspaceRegistry.js +114 -0
- package/dist/src/gui/workspaceRegistry.js.map +1 -0
- package/dist/src/hooks/userHooks.d.ts +29 -8
- package/dist/src/hooks/userHooks.d.ts.map +1 -1
- package/dist/src/hooks/userHooks.js +106 -34
- package/dist/src/hooks/userHooks.js.map +1 -1
- package/dist/src/index.d.ts +24 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +18 -6
- package/dist/src/index.js.map +1 -1
- package/dist/src/issues/durableIssueCoordinator.d.ts +57 -0
- package/dist/src/issues/durableIssueCoordinator.d.ts.map +1 -0
- package/dist/src/issues/durableIssueCoordinator.js +128 -0
- package/dist/src/issues/durableIssueCoordinator.js.map +1 -0
- package/dist/src/issues/issueExecution.d.ts +34 -0
- package/dist/src/issues/issueExecution.d.ts.map +1 -0
- package/dist/src/issues/issueExecution.js +190 -0
- package/dist/src/issues/issueExecution.js.map +1 -0
- package/dist/src/issues/issueStore.d.ts +95 -0
- package/dist/src/issues/issueStore.d.ts.map +1 -0
- package/dist/src/issues/issueStore.js +373 -0
- package/dist/src/issues/issueStore.js.map +1 -0
- package/dist/src/manager/projectManager.d.ts +103 -0
- package/dist/src/manager/projectManager.d.ts.map +1 -0
- package/dist/src/manager/projectManager.js +547 -0
- package/dist/src/manager/projectManager.js.map +1 -0
- package/dist/src/mcp/connectionManager.d.ts +22 -2
- package/dist/src/mcp/connectionManager.d.ts.map +1 -1
- package/dist/src/mcp/connectionManager.js +153 -41
- package/dist/src/mcp/connectionManager.js.map +1 -1
- package/dist/src/mcp/mcpServerConfig.d.ts.map +1 -1
- package/dist/src/mcp/mcpServerConfig.js +7 -7
- package/dist/src/mcp/mcpServerConfig.js.map +1 -1
- package/dist/src/memory/actoviqMemory.js +6 -6
- package/dist/src/memory/actoviqMemory.js.map +1 -1
- package/dist/src/memory/sessionHistory.js +2 -2
- package/dist/src/memory/sessionHistory.js.map +1 -1
- package/dist/src/node/index.d.ts +5 -0
- package/dist/src/node/index.d.ts.map +1 -0
- package/dist/src/node/index.js +5 -0
- package/dist/src/node/index.js.map +1 -0
- package/dist/src/node/sqliteCheckpointAdapter.d.ts +20 -0
- package/dist/src/node/sqliteCheckpointAdapter.d.ts.map +1 -0
- package/dist/src/node/sqliteCheckpointAdapter.js +163 -0
- package/dist/src/node/sqliteCheckpointAdapter.js.map +1 -0
- package/dist/src/node/sqliteDurableChildStore.d.ts +21 -0
- package/dist/src/node/sqliteDurableChildStore.d.ts.map +1 -0
- package/dist/src/node/sqliteDurableChildStore.js +124 -0
- package/dist/src/node/sqliteDurableChildStore.js.map +1 -0
- package/dist/src/node/sqliteSessionAdapter.d.ts +28 -0
- package/dist/src/node/sqliteSessionAdapter.d.ts.map +1 -0
- package/dist/src/node/sqliteSessionAdapter.js +99 -0
- package/dist/src/node/sqliteSessionAdapter.js.map +1 -0
- package/dist/src/orchestration/agentTool.d.ts +50 -0
- package/dist/src/orchestration/agentTool.d.ts.map +1 -0
- package/dist/src/orchestration/agentTool.js +132 -0
- package/dist/src/orchestration/agentTool.js.map +1 -0
- package/dist/src/orchestration/background.d.ts +102 -0
- package/dist/src/orchestration/background.d.ts.map +1 -0
- package/dist/src/orchestration/background.js +310 -0
- package/dist/src/orchestration/background.js.map +1 -0
- package/dist/src/orchestration/childRunner.d.ts +12 -0
- package/dist/src/orchestration/childRunner.d.ts.map +1 -0
- package/dist/src/orchestration/childRunner.js +179 -0
- package/dist/src/orchestration/childRunner.js.map +1 -0
- package/dist/src/orchestration/contracts.d.ts +169 -0
- package/dist/src/orchestration/contracts.d.ts.map +1 -0
- package/dist/src/orchestration/contracts.js +11 -0
- package/dist/src/orchestration/contracts.js.map +1 -0
- package/dist/src/orchestration/handoff.d.ts +32 -0
- package/dist/src/orchestration/handoff.d.ts.map +1 -0
- package/dist/src/orchestration/handoff.js +60 -0
- package/dist/src/orchestration/handoff.js.map +1 -0
- package/dist/src/orchestration/index.d.ts +9 -0
- package/dist/src/orchestration/index.d.ts.map +1 -0
- package/dist/src/orchestration/index.js +9 -0
- package/dist/src/orchestration/index.js.map +1 -0
- package/dist/src/orchestration/presets.d.ts +51 -0
- package/dist/src/orchestration/presets.d.ts.map +1 -0
- package/dist/src/orchestration/presets.js +78 -0
- package/dist/src/orchestration/presets.js.map +1 -0
- package/dist/src/orchestration/scope.d.ts +69 -0
- package/dist/src/orchestration/scope.d.ts.map +1 -0
- package/dist/src/orchestration/scope.js +371 -0
- package/dist/src/orchestration/scope.js.map +1 -0
- package/dist/src/orchestration/workflowGraph.d.ts +73 -0
- package/dist/src/orchestration/workflowGraph.d.ts.map +1 -0
- package/dist/src/orchestration/workflowGraph.js +255 -0
- package/dist/src/orchestration/workflowGraph.js.map +1 -0
- package/dist/src/parity/actoviqCleanBridgeCompatSdk.d.ts.map +1 -1
- package/dist/src/parity/actoviqCleanBridgeCompatSdk.js +101 -48
- package/dist/src/parity/actoviqCleanBridgeCompatSdk.js.map +1 -1
- package/dist/src/parity/bridgeConfigs.d.ts +2 -2
- package/dist/src/parity/bridgeConfigs.d.ts.map +1 -1
- package/dist/src/parity/bridgeConfigs.js +78 -39
- package/dist/src/parity/bridgeConfigs.js.map +1 -1
- package/dist/src/parity/bridgeProviders.d.ts +9 -6
- package/dist/src/parity/bridgeProviders.d.ts.map +1 -1
- package/dist/src/parity/bridgeProviders.js +140 -26
- package/dist/src/parity/bridgeProviders.js.map +1 -1
- package/dist/src/parity/portableSessions.js +2 -2
- package/dist/src/parity/portableSessions.js.map +1 -1
- package/dist/src/profiles/index.d.ts +15 -0
- package/dist/src/profiles/index.d.ts.map +1 -0
- package/dist/src/profiles/index.js +618 -0
- package/dist/src/profiles/index.js.map +1 -0
- package/dist/src/profiles/types.d.ts +102 -0
- package/dist/src/profiles/types.d.ts.map +1 -0
- package/dist/src/profiles/types.js +9 -0
- package/dist/src/profiles/types.js.map +1 -0
- package/dist/src/provider/client.d.ts +1 -1
- package/dist/src/provider/client.d.ts.map +1 -1
- package/dist/src/provider/openai-model-api.js +1 -1
- package/dist/src/provider/openai-model-api.js.map +1 -1
- package/dist/src/providers-v2/adapter-base.d.ts +35 -0
- package/dist/src/providers-v2/adapter-base.d.ts.map +1 -0
- package/dist/src/providers-v2/adapter-base.js +115 -0
- package/dist/src/providers-v2/adapter-base.js.map +1 -0
- package/dist/src/providers-v2/anthropic.d.ts +15 -0
- package/dist/src/providers-v2/anthropic.d.ts.map +1 -0
- package/dist/src/providers-v2/anthropic.js +414 -0
- package/dist/src/providers-v2/anthropic.js.map +1 -0
- package/dist/src/providers-v2/capabilities.d.ts +33 -0
- package/dist/src/providers-v2/capabilities.d.ts.map +1 -0
- package/dist/src/providers-v2/capabilities.js +218 -0
- package/dist/src/providers-v2/capabilities.js.map +1 -0
- package/dist/src/providers-v2/index.d.ts +12 -0
- package/dist/src/providers-v2/index.d.ts.map +1 -0
- package/dist/src/providers-v2/index.js +8 -0
- package/dist/src/providers-v2/index.js.map +1 -0
- package/dist/src/providers-v2/legacy.d.ts +26 -0
- package/dist/src/providers-v2/legacy.d.ts.map +1 -0
- package/dist/src/providers-v2/legacy.js +543 -0
- package/dist/src/providers-v2/legacy.js.map +1 -0
- package/dist/src/providers-v2/mapping.d.ts +34 -0
- package/dist/src/providers-v2/mapping.d.ts.map +1 -0
- package/dist/src/providers-v2/mapping.js +194 -0
- package/dist/src/providers-v2/mapping.js.map +1 -0
- package/dist/src/providers-v2/openai-chat.d.ts +16 -0
- package/dist/src/providers-v2/openai-chat.d.ts.map +1 -0
- package/dist/src/providers-v2/openai-chat.js +318 -0
- package/dist/src/providers-v2/openai-chat.js.map +1 -0
- package/dist/src/providers-v2/openai-responses.d.ts +15 -0
- package/dist/src/providers-v2/openai-responses.d.ts.map +1 -0
- package/dist/src/providers-v2/openai-responses.js +356 -0
- package/dist/src/providers-v2/openai-responses.js.map +1 -0
- package/dist/src/providers-v2/registry.d.ts +39 -0
- package/dist/src/providers-v2/registry.d.ts.map +1 -0
- package/dist/src/providers-v2/registry.js +101 -0
- package/dist/src/providers-v2/registry.js.map +1 -0
- package/dist/src/providers-v2/stream.d.ts +14 -0
- package/dist/src/providers-v2/stream.d.ts.map +1 -0
- package/dist/src/providers-v2/stream.js +115 -0
- package/dist/src/providers-v2/stream.js.map +1 -0
- package/dist/src/providers-v2/transport.d.ts +36 -0
- package/dist/src/providers-v2/transport.d.ts.map +1 -0
- package/dist/src/providers-v2/transport.js +337 -0
- package/dist/src/providers-v2/transport.js.map +1 -0
- package/dist/src/providers-v2/types.d.ts +162 -0
- package/dist/src/providers-v2/types.d.ts.map +1 -0
- package/dist/src/providers-v2/types.js +8 -0
- package/dist/src/providers-v2/types.js.map +1 -0
- package/dist/src/router/modelRouter.d.ts.map +1 -1
- package/dist/src/router/modelRouter.js +2 -3
- package/dist/src/router/modelRouter.js.map +1 -1
- package/dist/src/runtime/actoviqAgents.d.ts +5 -0
- package/dist/src/runtime/actoviqAgents.d.ts.map +1 -1
- package/dist/src/runtime/actoviqAgents.js +22 -4
- package/dist/src/runtime/actoviqAgents.js.map +1 -1
- package/dist/src/runtime/actoviqBackgroundTasks.d.ts +2 -1
- package/dist/src/runtime/actoviqBackgroundTasks.d.ts.map +1 -1
- package/dist/src/runtime/actoviqBackgroundTasks.js +4 -2
- package/dist/src/runtime/actoviqBackgroundTasks.js.map +1 -1
- package/dist/src/runtime/actoviqCompact.d.ts +15 -0
- package/dist/src/runtime/actoviqCompact.d.ts.map +1 -1
- package/dist/src/runtime/actoviqCompact.js +36 -10
- package/dist/src/runtime/actoviqCompact.js.map +1 -1
- package/dist/src/runtime/actoviqModelApi.d.ts.map +1 -1
- package/dist/src/runtime/actoviqModelApi.js +16 -2
- package/dist/src/runtime/actoviqModelApi.js.map +1 -1
- package/dist/src/runtime/actoviqPermissions.js +5 -1
- package/dist/src/runtime/actoviqPermissions.js.map +1 -1
- package/dist/src/runtime/agentClient.d.ts +3 -0
- package/dist/src/runtime/agentClient.d.ts.map +1 -1
- package/dist/src/runtime/agentClient.js +127 -45
- package/dist/src/runtime/agentClient.js.map +1 -1
- package/dist/src/runtime/agentRuntimeDiscovery.d.ts +75 -0
- package/dist/src/runtime/agentRuntimeDiscovery.d.ts.map +1 -0
- package/dist/src/runtime/agentRuntimeDiscovery.js +311 -0
- package/dist/src/runtime/agentRuntimeDiscovery.js.map +1 -0
- package/dist/src/runtime/agentSession.d.ts +18 -0
- package/dist/src/runtime/agentSession.d.ts.map +1 -1
- package/dist/src/runtime/agentSession.js +36 -0
- package/dist/src/runtime/agentSession.js.map +1 -1
- package/dist/src/runtime/asyncQueue.d.ts +99 -8
- package/dist/src/runtime/asyncQueue.d.ts.map +1 -1
- package/dist/src/runtime/asyncQueue.js +437 -37
- package/dist/src/runtime/asyncQueue.js.map +1 -1
- package/dist/src/runtime/conversationEngine.d.ts +7 -0
- package/dist/src/runtime/conversationEngine.d.ts.map +1 -1
- package/dist/src/runtime/conversationEngine.js +278 -18
- package/dist/src/runtime/conversationEngine.js.map +1 -1
- package/dist/src/runtime/deadline.d.ts +13 -0
- package/dist/src/runtime/deadline.d.ts.map +1 -0
- package/dist/src/runtime/deadline.js +67 -0
- package/dist/src/runtime/deadline.js.map +1 -0
- package/dist/src/runtime/messageUtils.d.ts +5 -0
- package/dist/src/runtime/messageUtils.d.ts.map +1 -1
- package/dist/src/runtime/messageUtils.js +17 -0
- package/dist/src/runtime/messageUtils.js.map +1 -1
- package/dist/src/runtime/sessionTurnCoordinator.d.ts +12 -0
- package/dist/src/runtime/sessionTurnCoordinator.d.ts.map +1 -0
- package/dist/src/runtime/sessionTurnCoordinator.js +23 -0
- package/dist/src/runtime/sessionTurnCoordinator.js.map +1 -0
- package/dist/src/runtime/tools.d.ts.map +1 -1
- package/dist/src/runtime/tools.js +1 -0
- package/dist/src/runtime/tools.js.map +1 -1
- package/dist/src/runtime-v2/agentRuntime.d.ts +136 -0
- package/dist/src/runtime-v2/agentRuntime.d.ts.map +1 -0
- package/dist/src/runtime-v2/agentRuntime.js +1341 -0
- package/dist/src/runtime-v2/agentRuntime.js.map +1 -0
- package/dist/src/runtime-v2/index.d.ts +6 -0
- package/dist/src/runtime-v2/index.d.ts.map +1 -0
- package/dist/src/runtime-v2/index.js +6 -0
- package/dist/src/runtime-v2/index.js.map +1 -0
- package/dist/src/runtime-v2/middleware/index.d.ts +5 -0
- package/dist/src/runtime-v2/middleware/index.d.ts.map +1 -0
- package/dist/src/runtime-v2/middleware/index.js +4 -0
- package/dist/src/runtime-v2/middleware/index.js.map +1 -0
- package/dist/src/runtime-v2/middleware/pipeline.d.ts +56 -0
- package/dist/src/runtime-v2/middleware/pipeline.d.ts.map +1 -0
- package/dist/src/runtime-v2/middleware/pipeline.js +242 -0
- package/dist/src/runtime-v2/middleware/pipeline.js.map +1 -0
- package/dist/src/runtime-v2/middleware/registry.d.ts +17 -0
- package/dist/src/runtime-v2/middleware/registry.d.ts.map +1 -0
- package/dist/src/runtime-v2/middleware/registry.js +46 -0
- package/dist/src/runtime-v2/middleware/registry.js.map +1 -0
- package/dist/src/runtime-v2/middleware/stages.d.ts +25 -0
- package/dist/src/runtime-v2/middleware/stages.d.ts.map +1 -0
- package/dist/src/runtime-v2/middleware/stages.js +48 -0
- package/dist/src/runtime-v2/middleware/stages.js.map +1 -0
- package/dist/src/runtime-v2/middleware/types.d.ts +51 -0
- package/dist/src/runtime-v2/middleware/types.d.ts.map +1 -0
- package/dist/src/runtime-v2/middleware/types.js +2 -0
- package/dist/src/runtime-v2/middleware/types.js.map +1 -0
- package/dist/src/runtime-v2/services.d.ts +33 -0
- package/dist/src/runtime-v2/services.d.ts.map +1 -0
- package/dist/src/runtime-v2/services.js +92 -0
- package/dist/src/runtime-v2/services.js.map +1 -0
- package/dist/src/runtime-v2/state.d.ts +71 -0
- package/dist/src/runtime-v2/state.d.ts.map +1 -0
- package/dist/src/runtime-v2/state.js +2 -0
- package/dist/src/runtime-v2/state.js.map +1 -0
- package/dist/src/runtime-v2/tools.d.ts +124 -0
- package/dist/src/runtime-v2/tools.d.ts.map +1 -0
- package/dist/src/runtime-v2/tools.js +185 -0
- package/dist/src/runtime-v2/tools.js.map +1 -0
- package/dist/src/scheduling/durableAgentScheduler.d.ts +46 -0
- package/dist/src/scheduling/durableAgentScheduler.d.ts.map +1 -0
- package/dist/src/scheduling/durableAgentScheduler.js +97 -0
- package/dist/src/scheduling/durableAgentScheduler.js.map +1 -0
- package/dist/src/scheduling/index.d.ts +3 -0
- package/dist/src/scheduling/index.d.ts.map +1 -1
- package/dist/src/scheduling/index.js +2 -0
- package/dist/src/scheduling/index.js.map +1 -1
- package/dist/src/scheduling/taskPersistence.d.ts +9 -0
- package/dist/src/scheduling/taskPersistence.d.ts.map +1 -0
- package/dist/src/scheduling/taskPersistence.js +238 -0
- package/dist/src/scheduling/taskPersistence.js.map +1 -0
- package/dist/src/storage/atomicJsonWrite.d.ts +13 -0
- package/dist/src/storage/atomicJsonWrite.d.ts.map +1 -0
- package/dist/src/storage/atomicJsonWrite.js +40 -0
- package/dist/src/storage/atomicJsonWrite.js.map +1 -0
- package/dist/src/storage/backgroundTaskStore.d.ts.map +1 -1
- package/dist/src/storage/backgroundTaskStore.js +2 -6
- package/dist/src/storage/backgroundTaskStore.js.map +1 -1
- package/dist/src/storage/mailboxStore.d.ts.map +1 -1
- package/dist/src/storage/mailboxStore.js +2 -6
- package/dist/src/storage/mailboxStore.js.map +1 -1
- package/dist/src/storage/sessionStore.d.ts +3 -0
- package/dist/src/storage/sessionStore.d.ts.map +1 -1
- package/dist/src/storage/sessionStore.js +169 -10
- package/dist/src/storage/sessionStore.js.map +1 -1
- package/dist/src/storage/teammateStore.d.ts.map +1 -1
- package/dist/src/storage/teammateStore.js +2 -6
- package/dist/src/storage/teammateStore.js.map +1 -1
- package/dist/src/storage-v2/contracts.d.ts +36 -0
- package/dist/src/storage-v2/contracts.d.ts.map +1 -0
- package/dist/src/storage-v2/contracts.js +2 -0
- package/dist/src/storage-v2/contracts.js.map +1 -0
- package/dist/src/storage-v2/errors.d.ts +21 -0
- package/dist/src/storage-v2/errors.d.ts.map +1 -0
- package/dist/src/storage-v2/errors.js +44 -0
- package/dist/src/storage-v2/errors.js.map +1 -0
- package/dist/src/storage-v2/index.d.ts +8 -0
- package/dist/src/storage-v2/index.d.ts.map +1 -0
- package/dist/src/storage-v2/index.js +8 -0
- package/dist/src/storage-v2/index.js.map +1 -0
- package/dist/src/storage-v2/legacyJsonV1Items.d.ts +10 -0
- package/dist/src/storage-v2/legacyJsonV1Items.d.ts.map +1 -0
- package/dist/src/storage-v2/legacyJsonV1Items.js +153 -0
- package/dist/src/storage-v2/legacyJsonV1Items.js.map +1 -0
- package/dist/src/storage-v2/migration.d.ts +32 -0
- package/dist/src/storage-v2/migration.d.ts.map +1 -0
- package/dist/src/storage-v2/migration.js +242 -0
- package/dist/src/storage-v2/migration.js.map +1 -0
- package/dist/src/storage-v2/sqliteDriver.d.ts +24 -0
- package/dist/src/storage-v2/sqliteDriver.d.ts.map +1 -0
- package/dist/src/storage-v2/sqliteDriver.js +90 -0
- package/dist/src/storage-v2/sqliteDriver.js.map +1 -0
- package/dist/src/storage-v2/sqliteStorage.d.ts +55 -0
- package/dist/src/storage-v2/sqliteStorage.d.ts.map +1 -0
- package/dist/src/storage-v2/sqliteStorage.js +905 -0
- package/dist/src/storage-v2/sqliteStorage.js.map +1 -0
- package/dist/src/storage-v2/types.d.ts +198 -0
- package/dist/src/storage-v2/types.d.ts.map +1 -0
- package/dist/src/storage-v2/types.js +2 -0
- package/dist/src/storage-v2/types.js.map +1 -0
- package/dist/src/surfaces/index.d.ts +8 -0
- package/dist/src/surfaces/index.d.ts.map +1 -0
- package/dist/src/surfaces/index.js +8 -0
- package/dist/src/surfaces/index.js.map +1 -0
- package/dist/src/surfaces/internal.d.ts +17 -0
- package/dist/src/surfaces/internal.d.ts.map +1 -0
- package/dist/src/surfaces/internal.js +116 -0
- package/dist/src/surfaces/internal.js.map +1 -0
- package/dist/src/surfaces/legacyEventAdapter.d.ts +38 -0
- package/dist/src/surfaces/legacyEventAdapter.d.ts.map +1 -0
- package/dist/src/surfaces/legacyEventAdapter.js +373 -0
- package/dist/src/surfaces/legacyEventAdapter.js.map +1 -0
- package/dist/src/surfaces/legacySurfacePipeline.d.ts +18 -0
- package/dist/src/surfaces/legacySurfacePipeline.d.ts.map +1 -0
- package/dist/src/surfaces/legacySurfacePipeline.js +25 -0
- package/dist/src/surfaces/legacySurfacePipeline.js.map +1 -0
- package/dist/src/surfaces/redaction.d.ts +12 -0
- package/dist/src/surfaces/redaction.d.ts.map +1 -0
- package/dist/src/surfaces/redaction.js +111 -0
- package/dist/src/surfaces/redaction.js.map +1 -0
- package/dist/src/surfaces/runEventLegacyCompat.d.ts +26 -0
- package/dist/src/surfaces/runEventLegacyCompat.d.ts.map +1 -0
- package/dist/src/surfaces/runEventLegacyCompat.js +339 -0
- package/dist/src/surfaces/runEventLegacyCompat.js.map +1 -0
- package/dist/src/surfaces/runEventProjector.d.ts +44 -0
- package/dist/src/surfaces/runEventProjector.d.ts.map +1 -0
- package/dist/src/surfaces/runEventProjector.js +404 -0
- package/dist/src/surfaces/runEventProjector.js.map +1 -0
- package/dist/src/surfaces/runtimeBridgeAdapter.d.ts +30 -0
- package/dist/src/surfaces/runtimeBridgeAdapter.d.ts.map +1 -0
- package/dist/src/surfaces/runtimeBridgeAdapter.js +38 -0
- package/dist/src/surfaces/runtimeBridgeAdapter.js.map +1 -0
- package/dist/src/surfaces/types.d.ts +38 -0
- package/dist/src/surfaces/types.d.ts.map +1 -0
- package/dist/src/surfaces/types.js +2 -0
- package/dist/src/surfaces/types.js.map +1 -0
- package/dist/src/team/agentPool.d.ts +2 -0
- package/dist/src/team/agentPool.d.ts.map +1 -1
- package/dist/src/team/agentPool.js +3 -1
- package/dist/src/team/agentPool.js.map +1 -1
- package/dist/src/team/modelTeam.d.ts +25 -19
- package/dist/src/team/modelTeam.d.ts.map +1 -1
- package/dist/src/team/modelTeam.js +293 -294
- package/dist/src/team/modelTeam.js.map +1 -1
- package/dist/src/team/pricing.d.ts.map +1 -1
- package/dist/src/team/pricing.js +2 -1
- package/dist/src/team/pricing.js.map +1 -1
- package/dist/src/team/teamDefinitions.d.ts +28 -1
- package/dist/src/team/teamDefinitions.d.ts.map +1 -1
- package/dist/src/team/teamDefinitions.js +204 -8
- package/dist/src/team/teamDefinitions.js.map +1 -1
- package/dist/src/team/teamGraph.d.ts +191 -0
- package/dist/src/team/teamGraph.d.ts.map +1 -0
- package/dist/src/team/teamGraph.js +616 -0
- package/dist/src/team/teamGraph.js.map +1 -0
- package/dist/src/team/teamGraphLayout.d.ts +44 -0
- package/dist/src/team/teamGraphLayout.d.ts.map +1 -0
- package/dist/src/team/teamGraphLayout.js +120 -0
- package/dist/src/team/teamGraphLayout.js.map +1 -0
- package/dist/src/team/teamGraphScaffold.d.ts +76 -0
- package/dist/src/team/teamGraphScaffold.d.ts.map +1 -0
- package/dist/src/team/teamGraphScaffold.js +409 -0
- package/dist/src/team/teamGraphScaffold.js.map +1 -0
- package/dist/src/team/teamGraphV3.d.ts +28 -0
- package/dist/src/team/teamGraphV3.d.ts.map +1 -0
- package/dist/src/team/teamGraphV3.js +640 -0
- package/dist/src/team/teamGraphV3.js.map +1 -0
- package/dist/src/team/teamPreferences.d.ts +11 -0
- package/dist/src/team/teamPreferences.d.ts.map +1 -0
- package/dist/src/team/teamPreferences.js +48 -0
- package/dist/src/team/teamPreferences.js.map +1 -0
- package/dist/src/team/teamPrompts.d.ts +16 -0
- package/dist/src/team/teamPrompts.d.ts.map +1 -0
- package/dist/src/team/teamPrompts.js +44 -0
- package/dist/src/team/teamPrompts.js.map +1 -0
- package/dist/src/team/teamRunView.d.ts +78 -0
- package/dist/src/team/teamRunView.d.ts.map +1 -0
- package/dist/src/team/teamRunView.js +205 -0
- package/dist/src/team/teamRunView.js.map +1 -0
- package/dist/src/team/teamRuntime.d.ts +19 -2
- package/dist/src/team/teamRuntime.d.ts.map +1 -1
- package/dist/src/team/teamRuntime.js +13 -7
- package/dist/src/team/teamRuntime.js.map +1 -1
- package/dist/src/tools/actoviqCoreTools.d.ts +2 -1
- package/dist/src/tools/actoviqCoreTools.d.ts.map +1 -1
- package/dist/src/tools/actoviqCoreTools.js +4 -1
- package/dist/src/tools/actoviqCoreTools.js.map +1 -1
- package/dist/src/tools/actoviqShellTools.d.ts.map +1 -1
- package/dist/src/tools/actoviqShellTools.js +10 -0
- package/dist/src/tools/actoviqShellTools.js.map +1 -1
- package/dist/src/tools/askUserQuestion/AskUserQuestionTool.d.ts.map +1 -1
- package/dist/src/tools/askUserQuestion/AskUserQuestionTool.js +2 -0
- package/dist/src/tools/askUserQuestion/AskUserQuestionTool.js.map +1 -1
- package/dist/src/tools/bash/BashTool.d.ts +33 -2
- package/dist/src/tools/bash/BashTool.d.ts.map +1 -1
- package/dist/src/tools/bash/BashTool.js +140 -2
- package/dist/src/tools/bash/BashTool.js.map +1 -1
- package/dist/src/tools/bash/prompt.d.ts +1 -1
- package/dist/src/tools/bash/prompt.d.ts.map +1 -1
- package/dist/src/tools/bash/prompt.js +1 -0
- package/dist/src/tools/bash/prompt.js.map +1 -1
- package/dist/src/tools/planMode/PlanModeTools.js +2 -2
- package/dist/src/tools/planMode/PlanModeTools.js.map +1 -1
- package/dist/src/tools/todo/TodoWriteTool.d.ts +1 -1
- package/dist/src/tui/actoviqTui.d.ts.map +1 -1
- package/dist/src/tui/actoviqTui.js +522 -97
- package/dist/src/tui/actoviqTui.js.map +1 -1
- package/dist/src/tui/pluginCatalog.d.ts.map +1 -1
- package/dist/src/tui/pluginCatalog.js +3 -1
- package/dist/src/tui/pluginCatalog.js.map +1 -1
- package/dist/src/types.d.ts +355 -23
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/ui/commandSurface.d.ts.map +1 -1
- package/dist/src/ui/commandSurface.js +23 -3
- package/dist/src/ui/commandSurface.js.map +1 -1
- package/dist/src/workflow/workflowPersistence.d.ts.map +1 -1
- package/dist/src/workflow/workflowPersistence.js +2 -1
- package/dist/src/workflow/workflowPersistence.js.map +1 -1
- package/dist/src/workflow/workflowScriptRuntime.d.ts +4 -0
- package/dist/src/workflow/workflowScriptRuntime.d.ts.map +1 -1
- package/dist/src/workflow/workflowScriptRuntime.js +69 -18
- package/dist/src/workflow/workflowScriptRuntime.js.map +1 -1
- package/dist/src/workflow-v2/boundary.d.ts +2 -0
- package/dist/src/workflow-v2/boundary.d.ts.map +1 -0
- package/dist/src/workflow-v2/boundary.js +45 -0
- package/dist/src/workflow-v2/boundary.js.map +1 -0
- package/dist/src/workflow-v2/capabilities.d.ts +5 -0
- package/dist/src/workflow-v2/capabilities.d.ts.map +1 -0
- package/dist/src/workflow-v2/capabilities.js +32 -0
- package/dist/src/workflow-v2/capabilities.js.map +1 -0
- package/dist/src/workflow-v2/errors.d.ts +43 -0
- package/dist/src/workflow-v2/errors.d.ts.map +1 -0
- package/dist/src/workflow-v2/errors.js +84 -0
- package/dist/src/workflow-v2/errors.js.map +1 -0
- package/dist/src/workflow-v2/index.d.ts +9 -0
- package/dist/src/workflow-v2/index.d.ts.map +1 -0
- package/dist/src/workflow-v2/index.js +6 -0
- package/dist/src/workflow-v2/index.js.map +1 -0
- package/dist/src/workflow-v2/json.d.ts +5 -0
- package/dist/src/workflow-v2/json.d.ts.map +1 -0
- package/dist/src/workflow-v2/json.js +40 -0
- package/dist/src/workflow-v2/json.js.map +1 -0
- package/dist/src/workflow-v2/limits.d.ts +15 -0
- package/dist/src/workflow-v2/limits.d.ts.map +1 -0
- package/dist/src/workflow-v2/limits.js +37 -0
- package/dist/src/workflow-v2/limits.js.map +1 -0
- package/dist/src/workflow-v2/localIsolatedProcessExecutor.d.ts +25 -0
- package/dist/src/workflow-v2/localIsolatedProcessExecutor.d.ts.map +1 -0
- package/dist/src/workflow-v2/localIsolatedProcessExecutor.js +423 -0
- package/dist/src/workflow-v2/localIsolatedProcessExecutor.js.map +1 -0
- package/dist/src/workflow-v2/localProcessChild.d.ts +2 -0
- package/dist/src/workflow-v2/localProcessChild.d.ts.map +1 -0
- package/dist/src/workflow-v2/localProcessChild.js +305 -0
- package/dist/src/workflow-v2/localProcessChild.js.map +1 -0
- package/dist/src/workflow-v2/router.d.ts +10 -0
- package/dist/src/workflow-v2/router.d.ts.map +1 -0
- package/dist/src/workflow-v2/router.js +28 -0
- package/dist/src/workflow-v2/router.js.map +1 -0
- package/dist/src/workflow-v2/trustedCompatibilityExecutor.d.ts +17 -0
- package/dist/src/workflow-v2/trustedCompatibilityExecutor.d.ts.map +1 -0
- package/dist/src/workflow-v2/trustedCompatibilityExecutor.js +159 -0
- package/dist/src/workflow-v2/trustedCompatibilityExecutor.js.map +1 -0
- package/dist/src/workflow-v2/types.d.ts +67 -0
- package/dist/src/workflow-v2/types.d.ts.map +1 -0
- package/dist/src/workflow-v2/types.js +2 -0
- package/dist/src/workflow-v2/types.js.map +1 -0
- package/package.json +96 -10
|
@@ -7,6 +7,7 @@ import { createActoviqBuddyApi } from '../buddy/actoviqBuddy.js';
|
|
|
7
7
|
import { createActoviqComputerUseMcpServer, createActoviqComputerUseTools, } from '../computer/actoviqComputerUse.js';
|
|
8
8
|
import { resolveRuntimeConfig } from '../config/resolveRuntimeConfig.js';
|
|
9
9
|
import { resolveActoviqModelReference } from '../config/modelTiers.js';
|
|
10
|
+
import { recordCompatUsage } from '../compat/diagnostics.js';
|
|
10
11
|
import { mergeActoviqHooks, normalizeActoviqHookMessages, resolveActoviqPostRunHooks, resolveActoviqSessionStartHooks, } from '../hooks/actoviqHooks.js';
|
|
11
12
|
import { createActoviqMemoryApi } from '../memory/actoviqMemory.js';
|
|
12
13
|
import { appendMessagesToTranscript } from '../memory/actoviqTranscriptLogger.js';
|
|
@@ -19,8 +20,9 @@ import { SessionStore } from '../storage/sessionStore.js';
|
|
|
19
20
|
import { TeammateStore } from '../storage/teammateStore.js';
|
|
20
21
|
import { ActoviqSwarmApi } from '../swarm/actoviqSwarm.js';
|
|
21
22
|
import { createActoviqFileTools } from '../tools/actoviqFileTools.js';
|
|
23
|
+
import { BASH_TOOL_NAME, createBashTool } from '../tools/bash/BashTool.js';
|
|
22
24
|
import { createGitWorktreeWorkspace, } from '../workspace/actoviqWorkspace.js';
|
|
23
|
-
import { ActoviqAgentsApi, createActoviqTaskTool, summarizeActoviqAgentDefinition, } from './actoviqAgents.js';
|
|
25
|
+
import { ACTOVIQ_RUN_STATE_KEY, ActoviqAgentsApi, createActoviqRunToolState, createActoviqTaskTool, summarizeActoviqAgentDefinition, } from './actoviqAgents.js';
|
|
24
26
|
import { getDefaultActoviqAgents } from './defaultActoviqAgents.js';
|
|
25
27
|
import { loadActoviqAgentDefinitions } from './actoviqAgentDefinitions.js';
|
|
26
28
|
import { ActoviqSkillsApi, loadActoviqSkillDefinitions, resolveActoviqSkillPrompt, skillPathsMatch, summarizeActoviqSkillDefinition, } from './actoviqSkills.js';
|
|
@@ -37,6 +39,8 @@ import { getActoviqCompactBoundarySummary } from '../memory/actoviqMemory.js';
|
|
|
37
39
|
import { createActoviqModelApi } from './actoviqModelApi.js';
|
|
38
40
|
import { createOpenaiModelApi } from '../provider/openai-model-api.js';
|
|
39
41
|
import { AgentRunStream } from './asyncQueue.js';
|
|
42
|
+
import { SessionTurnCoordinator } from './sessionTurnCoordinator.js';
|
|
43
|
+
import { withDeadline } from './deadline.js';
|
|
40
44
|
import { executeConversation } from './conversationEngine.js';
|
|
41
45
|
import { asError, createId, deepClone, isRecord, nowIso, truncateText } from './helpers.js';
|
|
42
46
|
import { tool } from './tools.js';
|
|
@@ -125,7 +129,8 @@ export class AgentSessionsApi {
|
|
|
125
129
|
}
|
|
126
130
|
async continueMostRecent(options = {}) {
|
|
127
131
|
const sessions = await this.store.list();
|
|
128
|
-
const
|
|
132
|
+
const chatSessions = sessions.filter(session => session.kind !== 'manager');
|
|
133
|
+
const mostRecent = chatSessions.find(session => session.status !== 'closed') ?? chatSessions[0];
|
|
129
134
|
if (!mostRecent) {
|
|
130
135
|
throw new Error('No stored sessions are available to resume.');
|
|
131
136
|
}
|
|
@@ -369,6 +374,7 @@ export class ActoviqAgentClient {
|
|
|
369
374
|
slashCommands;
|
|
370
375
|
workflow;
|
|
371
376
|
sessionManager;
|
|
377
|
+
sessionTurnCoordinator = new SessionTurnCoordinator();
|
|
372
378
|
agentDefinitions;
|
|
373
379
|
skillDefinitions;
|
|
374
380
|
/** Names of `paths:`-conditional skills activated by touching matching files. */
|
|
@@ -470,6 +476,12 @@ export class ActoviqAgentClient {
|
|
|
470
476
|
...new Set([...(existingDelegationTool.aliases ?? []), 'Agent']),
|
|
471
477
|
];
|
|
472
478
|
}
|
|
479
|
+
if (this.defaultTools.some(tool => tool.name === BASH_TOOL_NAME)) {
|
|
480
|
+
this.replaceDefaultTool(createBashTool({
|
|
481
|
+
backgroundTaskManager: this.backgroundTaskManager,
|
|
482
|
+
onBackgroundTaskSettled: task => this.enqueueTaskNotification(task),
|
|
483
|
+
}));
|
|
484
|
+
}
|
|
473
485
|
this.replaceDefaultTool(this.createSendMessageTool());
|
|
474
486
|
this.replaceDefaultTool(this.createBackgroundTaskListTool());
|
|
475
487
|
this.replaceDefaultTool(this.createBackgroundTaskGetTool());
|
|
@@ -530,6 +542,8 @@ export class ActoviqAgentClient {
|
|
|
530
542
|
const mcpManager = new McpConnectionManager({
|
|
531
543
|
name: config.clientName,
|
|
532
544
|
version: config.clientVersion,
|
|
545
|
+
}, {
|
|
546
|
+
requestTimeoutMs: config.mcpTimeoutMs,
|
|
533
547
|
});
|
|
534
548
|
const loadedSkills = await loadActoviqSkillDefinitions({
|
|
535
549
|
homeDir: config.homeDir,
|
|
@@ -577,10 +591,14 @@ export class ActoviqAgentClient {
|
|
|
577
591
|
stream(input, options = {}) {
|
|
578
592
|
const runId = createId();
|
|
579
593
|
return new AgentRunStream(async (controller) => {
|
|
594
|
+
const runOptions = {
|
|
595
|
+
...options,
|
|
596
|
+
signal: combineAbortSignals(options.signal, controller.signal),
|
|
597
|
+
};
|
|
580
598
|
try {
|
|
581
|
-
const augmentations = await this.prepareRunAugmentations(runId, input,
|
|
582
|
-
const result = await this.executeRun(runId, input,
|
|
583
|
-
const hookOutcome = await this.applyPostRunHooks(runId, input,
|
|
599
|
+
const augmentations = await this.prepareRunAugmentations(runId, input, runOptions);
|
|
600
|
+
const result = await this.executeRun(runId, input, runOptions, undefined, true, controller.emit, augmentations);
|
|
601
|
+
const hookOutcome = await this.applyPostRunHooks(runId, input, runOptions, result);
|
|
584
602
|
if (hookOutcome.sessionMetadata) {
|
|
585
603
|
result.sessionHookMetadata = hookOutcome.sessionMetadata;
|
|
586
604
|
}
|
|
@@ -610,7 +628,7 @@ export class ActoviqAgentClient {
|
|
|
610
628
|
});
|
|
611
629
|
throw error;
|
|
612
630
|
}
|
|
613
|
-
});
|
|
631
|
+
}, { signal: options.signal });
|
|
614
632
|
}
|
|
615
633
|
async parallel(tasks, options) {
|
|
616
634
|
return parallel(tasks, options);
|
|
@@ -1347,9 +1365,13 @@ export class ActoviqAgentClient {
|
|
|
1347
1365
|
return result;
|
|
1348
1366
|
});
|
|
1349
1367
|
}
|
|
1350
|
-
|
|
1368
|
+
runOnSession(session, input, options = {}) {
|
|
1369
|
+
return this.sessionTurnCoordinator.runExclusive(session.id, () => this.runOnSessionExclusive(session, input, options));
|
|
1370
|
+
}
|
|
1371
|
+
async runOnSessionExclusive(session, input, options) {
|
|
1351
1372
|
const runId = createId();
|
|
1352
|
-
const initialSnapshot = session.
|
|
1373
|
+
const initialSnapshot = await this.store.load(session.id);
|
|
1374
|
+
session.replace(initialSnapshot);
|
|
1353
1375
|
const resolvedOptions = this.applySessionRuntimeOverrides(session.id, this.resolveSessionAgentOptions(initialSnapshot, options));
|
|
1354
1376
|
const execution = await this.executeSessionRunWithReactiveCompact({
|
|
1355
1377
|
runId,
|
|
@@ -1364,14 +1386,20 @@ export class ActoviqAgentClient {
|
|
|
1364
1386
|
}
|
|
1365
1387
|
await this.persistSessionAfterRun(session, execution.snapshot, input, execution.result, resolvedOptions, execution.augmentations.surfacedMemories, hookOutcome);
|
|
1366
1388
|
await this.sessionManager.touch(session.id);
|
|
1389
|
+
session.replace(await this.store.load(session.id));
|
|
1367
1390
|
return execution.result;
|
|
1368
1391
|
}
|
|
1369
1392
|
streamOnSession(session, input, options = {}) {
|
|
1370
1393
|
const runId = createId();
|
|
1371
|
-
|
|
1372
|
-
|
|
1394
|
+
return new AgentRunStream((controller) => this.sessionTurnCoordinator.runExclusive(session.id, async () => {
|
|
1395
|
+
const runOptions = {
|
|
1396
|
+
...options,
|
|
1397
|
+
signal: combineAbortSignals(options.signal, controller.signal),
|
|
1398
|
+
};
|
|
1373
1399
|
try {
|
|
1374
|
-
const
|
|
1400
|
+
const initialSnapshot = await this.store.load(session.id);
|
|
1401
|
+
session.replace(initialSnapshot);
|
|
1402
|
+
const resolvedOptions = this.applySessionRuntimeOverrides(session.id, this.resolveSessionAgentOptions(initialSnapshot, runOptions));
|
|
1375
1403
|
const execution = await this.executeSessionRunWithReactiveCompact({
|
|
1376
1404
|
runId,
|
|
1377
1405
|
session,
|
|
@@ -1386,6 +1414,8 @@ export class ActoviqAgentClient {
|
|
|
1386
1414
|
execution.result.sessionHookMetadata = hookOutcome.sessionMetadata;
|
|
1387
1415
|
}
|
|
1388
1416
|
await this.persistSessionAfterRun(session, execution.snapshot, input, execution.result, resolvedOptions, execution.augmentations.surfacedMemories, hookOutcome);
|
|
1417
|
+
await this.sessionManager.touch(session.id);
|
|
1418
|
+
session.replace(await this.store.load(session.id));
|
|
1389
1419
|
controller.emit({
|
|
1390
1420
|
type: 'response.completed',
|
|
1391
1421
|
runId,
|
|
@@ -1408,21 +1438,17 @@ export class ActoviqAgentClient {
|
|
|
1408
1438
|
});
|
|
1409
1439
|
throw error;
|
|
1410
1440
|
}
|
|
1411
|
-
});
|
|
1441
|
+
}), { signal: options.signal });
|
|
1412
1442
|
}
|
|
1413
|
-
async executeRun(runId, input, options, session, streaming = false, emit, augmentations, skipRunStartedEvent = false) {
|
|
1443
|
+
async executeRun(runId, input, options, session, streaming = false, emit, augmentations, skipRunStartedEvent = false, liveSession) {
|
|
1414
1444
|
const metadata = {
|
|
1415
1445
|
...this.config.metadata,
|
|
1416
1446
|
...(session?.metadata ?? {}),
|
|
1417
1447
|
...(augmentations?.metadata ?? {}),
|
|
1418
1448
|
...(options.metadata ?? {}),
|
|
1449
|
+
[ACTOVIQ_RUN_STATE_KEY]: createActoviqRunToolState(),
|
|
1419
1450
|
};
|
|
1420
|
-
|
|
1421
|
-
// unless inheritWorktree is explicitly false.
|
|
1422
|
-
const inheritWorktree = options.inheritWorktree !== false;
|
|
1423
|
-
const workDir = inheritWorktree
|
|
1424
|
-
? (options.__actoviqWorkDir ?? options.sessionWorkDir ?? options.workDir ?? this.config.workDir)
|
|
1425
|
-
: (options.__actoviqWorkDir ?? options.workDir ?? this.config.workDir);
|
|
1451
|
+
const workDir = this.resolveRunWorkDir(options);
|
|
1426
1452
|
const mergedTools = filterAgentTools(mergeUniqueByName(options.__actoviqUseDefaultTools === false ? [] : this.defaultTools, options.tools ?? []), options.__actoviqAllowedTools, options.__actoviqDisallowedTools);
|
|
1427
1453
|
// Collect tool prompts for system prompt assembly
|
|
1428
1454
|
const toolPromptParts = await collectToolPrompts(mergedTools, {
|
|
@@ -1440,13 +1466,21 @@ export class ActoviqAgentClient {
|
|
|
1440
1466
|
}
|
|
1441
1467
|
: this.config;
|
|
1442
1468
|
const notificationKey = session?.id ?? runId;
|
|
1443
|
-
const drainQueuedInputs = notificationKey || options.drainQueuedInputs
|
|
1469
|
+
const drainQueuedInputs = notificationKey || options.drainQueuedInputs || liveSession
|
|
1444
1470
|
? () => [
|
|
1471
|
+
...(liveSession?.drainSteeringInputs() ?? []),
|
|
1445
1472
|
...(options.drainQueuedInputs?.() ?? []),
|
|
1446
1473
|
...this.drainRuntimeNotifications(notificationKey),
|
|
1447
1474
|
]
|
|
1448
1475
|
: undefined;
|
|
1449
|
-
|
|
1476
|
+
const drainFollowUpInputs = options.drainFollowUpInputs || liveSession
|
|
1477
|
+
? () => [
|
|
1478
|
+
...(liveSession?.drainFollowUpInputs() ?? []),
|
|
1479
|
+
...(options.drainFollowUpInputs?.() ?? []),
|
|
1480
|
+
]
|
|
1481
|
+
: undefined;
|
|
1482
|
+
let checkpointSession = session ? deepClone(session) : undefined;
|
|
1483
|
+
return withDeadline(`Agent run ${runId}`, runtimeConfig.runTimeoutMs, options.signal, ({ signal }) => executeConversation({
|
|
1450
1484
|
runId,
|
|
1451
1485
|
input,
|
|
1452
1486
|
messages: session?.messages,
|
|
@@ -1462,7 +1496,7 @@ export class ActoviqAgentClient {
|
|
|
1462
1496
|
toolChoice: options.toolChoice,
|
|
1463
1497
|
userId: options.userId ?? this.config.userId,
|
|
1464
1498
|
metadata,
|
|
1465
|
-
signal
|
|
1499
|
+
signal,
|
|
1466
1500
|
permissionMode: options.permissionMode ?? this.defaultPermissionMode,
|
|
1467
1501
|
permissions: options.permissions ?? this.defaultPermissions,
|
|
1468
1502
|
classifier: options.classifier ?? this.defaultClassifier,
|
|
@@ -1470,19 +1504,37 @@ export class ActoviqAgentClient {
|
|
|
1470
1504
|
canUseTool: options.canUseTool,
|
|
1471
1505
|
hooks: augmentations?.hooks,
|
|
1472
1506
|
drainQueuedInputs,
|
|
1507
|
+
drainFollowUpInputs,
|
|
1473
1508
|
streaming,
|
|
1474
1509
|
// Activate paths-conditional skills when the agent touches matching files.
|
|
1475
1510
|
emit: (event) => {
|
|
1476
1511
|
this.activateConditionalSkillsFromEvent(event);
|
|
1477
1512
|
emit?.(event);
|
|
1478
1513
|
},
|
|
1514
|
+
onConversationCheckpoint: checkpointSession
|
|
1515
|
+
? async (messages) => {
|
|
1516
|
+
const snap = deepClone(checkpointSession);
|
|
1517
|
+
snap.messages = deepClone(messages);
|
|
1518
|
+
snap.updatedAt = nowIso();
|
|
1519
|
+
snap.metadata = {
|
|
1520
|
+
...snap.metadata,
|
|
1521
|
+
__actoviqWorkDir: workDir,
|
|
1522
|
+
...(options.metadata ?? {}),
|
|
1523
|
+
};
|
|
1524
|
+
await this.store.save(snap);
|
|
1525
|
+
checkpointSession = snap;
|
|
1526
|
+
// Keep the live AgentSession (if any) in sync so a subsequent
|
|
1527
|
+
// persistSessionAfterRun / reactive compact sees the checkpoint.
|
|
1528
|
+
liveSession?.replace(snap);
|
|
1529
|
+
}
|
|
1530
|
+
: undefined,
|
|
1479
1531
|
skipRunStartedEvent,
|
|
1480
1532
|
// Per-run model client override (the /model router uses this to route a
|
|
1481
1533
|
// turn to a different model/provider); falls back to the SDK default.
|
|
1482
1534
|
modelApi: options.modelApi ?? this.modelApi,
|
|
1483
1535
|
config: runtimeConfig,
|
|
1484
1536
|
mcpManager: this.mcpManager,
|
|
1485
|
-
}).then(result => ({
|
|
1537
|
+
})).then(result => ({
|
|
1486
1538
|
...result,
|
|
1487
1539
|
surfacedMemories: augmentations?.surfacedMemories.length
|
|
1488
1540
|
? deepClone(augmentations.surfacedMemories)
|
|
@@ -1499,13 +1551,13 @@ export class ActoviqAgentClient {
|
|
|
1499
1551
|
let attempts = 0;
|
|
1500
1552
|
while (true) {
|
|
1501
1553
|
try {
|
|
1502
|
-
const result = await this.executeRun(args.runId, args.input, args.options, currentSnapshot, args.streaming ?? false, args.emit, currentAugmentations, attempts > 0);
|
|
1554
|
+
const result = await this.executeRun(args.runId, args.input, args.options, currentSnapshot, args.streaming ?? false, args.emit, currentAugmentations, attempts > 0, args.session);
|
|
1503
1555
|
if (lastReactiveCompact) {
|
|
1504
1556
|
result.reactiveCompact = lastReactiveCompact;
|
|
1505
1557
|
}
|
|
1506
1558
|
return {
|
|
1507
1559
|
result,
|
|
1508
|
-
snapshot:
|
|
1560
|
+
snapshot: args.session.snapshot(),
|
|
1509
1561
|
augmentations: currentAugmentations,
|
|
1510
1562
|
};
|
|
1511
1563
|
}
|
|
@@ -1559,7 +1611,7 @@ export class ActoviqAgentClient {
|
|
|
1559
1611
|
const agentMemoryMessages = session
|
|
1560
1612
|
? await this.prepareAgentMemoryMessages(session, internalOptions)
|
|
1561
1613
|
: [];
|
|
1562
|
-
const preloadedSkillMessages = await this.preparePreloadedAgentSkillMessages(internalOptions.__actoviqPreloadedSkills, session?.id,
|
|
1614
|
+
const preloadedSkillMessages = await this.preparePreloadedAgentSkillMessages(internalOptions.__actoviqPreloadedSkills, session?.id, this.resolveRunWorkDir(internalOptions));
|
|
1563
1615
|
const hooks = mergeActoviqHooks(this.hooks, options.hooks);
|
|
1564
1616
|
const prefixedMessages = [
|
|
1565
1617
|
...notificationMessages,
|
|
@@ -1572,15 +1624,15 @@ export class ActoviqAgentClient {
|
|
|
1572
1624
|
const systemPromptParts = [];
|
|
1573
1625
|
const metadata = {};
|
|
1574
1626
|
for (const hook of resolveActoviqSessionStartHooks(hooks)) {
|
|
1575
|
-
const result = await hook({
|
|
1627
|
+
const result = await withDeadline('sessionStart hook', this.config.hookTimeoutMs, options.signal, ({ signal }) => hook({
|
|
1576
1628
|
runId,
|
|
1577
1629
|
input,
|
|
1578
1630
|
promptText,
|
|
1579
1631
|
sessionId: session?.id,
|
|
1580
1632
|
session: session ? deepClone(session) : undefined,
|
|
1581
|
-
workDir:
|
|
1582
|
-
options,
|
|
1583
|
-
});
|
|
1633
|
+
workDir: this.resolveRunWorkDir(internalOptions),
|
|
1634
|
+
options: { ...options, signal },
|
|
1635
|
+
}));
|
|
1584
1636
|
if (!result) {
|
|
1585
1637
|
continue;
|
|
1586
1638
|
}
|
|
@@ -1640,7 +1692,7 @@ export class ActoviqAgentClient {
|
|
|
1640
1692
|
typeof agentName !== 'string') {
|
|
1641
1693
|
return [];
|
|
1642
1694
|
}
|
|
1643
|
-
const workDir =
|
|
1695
|
+
const workDir = this.resolveRunWorkDir(options);
|
|
1644
1696
|
const root = scope === 'user'
|
|
1645
1697
|
? path.join(this.config.homeDir, 'agent-memory', agentName)
|
|
1646
1698
|
: scope === 'project'
|
|
@@ -1671,18 +1723,16 @@ export class ActoviqAgentClient {
|
|
|
1671
1723
|
const sessionMetadata = {};
|
|
1672
1724
|
const tags = new Set();
|
|
1673
1725
|
for (const hook of resolveActoviqPostRunHooks(hooks)) {
|
|
1674
|
-
const output = await hook({
|
|
1726
|
+
const output = await withDeadline('postRun hook', this.config.hookTimeoutMs, options.signal, ({ signal }) => hook({
|
|
1675
1727
|
runId,
|
|
1676
1728
|
input,
|
|
1677
1729
|
promptText,
|
|
1678
1730
|
sessionId: session?.id,
|
|
1679
1731
|
session: session ? deepClone(session) : undefined,
|
|
1680
|
-
workDir: options
|
|
1681
|
-
|
|
1682
|
-
this.config.workDir,
|
|
1683
|
-
options,
|
|
1732
|
+
workDir: this.resolveRunWorkDir(options),
|
|
1733
|
+
options: { ...options, signal },
|
|
1684
1734
|
result,
|
|
1685
|
-
});
|
|
1735
|
+
}));
|
|
1686
1736
|
if (!output) {
|
|
1687
1737
|
continue;
|
|
1688
1738
|
}
|
|
@@ -1855,7 +1905,7 @@ export class ActoviqAgentClient {
|
|
|
1855
1905
|
force: true,
|
|
1856
1906
|
trigger: 'reactive',
|
|
1857
1907
|
}, {
|
|
1858
|
-
workDir: this.
|
|
1908
|
+
workDir: this.resolveRunWorkDir(options),
|
|
1859
1909
|
systemPrompt: snapshot.systemPrompt ?? this.config.systemPrompt,
|
|
1860
1910
|
model: this.resolveModel(options.model ?? snapshot.model),
|
|
1861
1911
|
modelApi: this.modelApi,
|
|
@@ -2454,6 +2504,7 @@ export class ActoviqAgentClient {
|
|
|
2454
2504
|
return extraction;
|
|
2455
2505
|
}
|
|
2456
2506
|
async persistSessionAfterRun(session, snapshot, input, result, options, surfacedMemories = [], hookOutcome = {}) {
|
|
2507
|
+
const workDir = this.resolveRunWorkDir(options);
|
|
2457
2508
|
const next = deepClone(snapshot);
|
|
2458
2509
|
next.model = result.model;
|
|
2459
2510
|
next.systemPrompt = options.systemPrompt ?? next.systemPrompt;
|
|
@@ -2462,7 +2513,7 @@ export class ActoviqAgentClient {
|
|
|
2462
2513
|
next.lastRunAt = result.completedAt;
|
|
2463
2514
|
next.metadata = {
|
|
2464
2515
|
...next.metadata,
|
|
2465
|
-
__actoviqWorkDir:
|
|
2516
|
+
__actoviqWorkDir: workDir,
|
|
2466
2517
|
...(options.metadata ?? {}),
|
|
2467
2518
|
...(hookOutcome.sessionMetadata ?? {}),
|
|
2468
2519
|
};
|
|
@@ -2559,7 +2610,7 @@ export class ActoviqAgentClient {
|
|
|
2559
2610
|
const newMessages = next.messages.slice(prevMessageCount);
|
|
2560
2611
|
if (newMessages.length > 0) {
|
|
2561
2612
|
const paths = await this.memory.paths();
|
|
2562
|
-
await appendMessagesToTranscript(paths.projectStateDir, session.id,
|
|
2613
|
+
await appendMessagesToTranscript(paths.projectStateDir, session.id, workDir, newMessages);
|
|
2563
2614
|
}
|
|
2564
2615
|
const extraction = await this.performSessionMemoryExtraction(next, {
|
|
2565
2616
|
model: this.resolveModel(options.model ?? next.model),
|
|
@@ -2570,7 +2621,7 @@ export class ActoviqAgentClient {
|
|
|
2570
2621
|
});
|
|
2571
2622
|
await this.applySessionMemoryState(session, next, extraction.state);
|
|
2572
2623
|
const compacted = await compactActoviqSession(next, { trigger: 'auto' }, {
|
|
2573
|
-
workDir
|
|
2624
|
+
workDir,
|
|
2574
2625
|
systemPrompt: next.systemPrompt ?? this.config.systemPrompt,
|
|
2575
2626
|
model: this.resolveModel(options.model ?? next.model),
|
|
2576
2627
|
modelApi: this.modelApi,
|
|
@@ -2608,14 +2659,33 @@ export class ActoviqAgentClient {
|
|
|
2608
2659
|
}
|
|
2609
2660
|
return cloneSkillDefinition(definition);
|
|
2610
2661
|
}
|
|
2662
|
+
resolveRunWorkDir(options) {
|
|
2663
|
+
const internal = options;
|
|
2664
|
+
if (options.inheritWorktree === false) {
|
|
2665
|
+
return internal.__actoviqWorkDir ?? options.workDir ?? this.config.workDir;
|
|
2666
|
+
}
|
|
2667
|
+
return (internal.__actoviqWorkDir ??
|
|
2668
|
+
options.sessionWorkDir ??
|
|
2669
|
+
options.workDir ??
|
|
2670
|
+
internal.__actoviqPersistedWorkDir ??
|
|
2671
|
+
this.config.workDir);
|
|
2672
|
+
}
|
|
2611
2673
|
resolveSessionAgentOptions(session, options) {
|
|
2674
|
+
const persistedWorkDir = typeof session.metadata.__actoviqWorkDir === 'string' &&
|
|
2675
|
+
session.metadata.__actoviqWorkDir.trim().length > 0
|
|
2676
|
+
? session.metadata.__actoviqWorkDir
|
|
2677
|
+
: undefined;
|
|
2678
|
+
const sessionOptions = {
|
|
2679
|
+
...options,
|
|
2680
|
+
__actoviqPersistedWorkDir: persistedWorkDir,
|
|
2681
|
+
};
|
|
2612
2682
|
const agentName = typeof session.metadata.__actoviqAgentDefinition === 'string'
|
|
2613
2683
|
? session.metadata.__actoviqAgentDefinition
|
|
2614
2684
|
: undefined;
|
|
2615
2685
|
if (!agentName) {
|
|
2616
|
-
return
|
|
2686
|
+
return sessionOptions;
|
|
2617
2687
|
}
|
|
2618
|
-
return this.mergeAgentRunOptions(this.requireAgentDefinition(agentName),
|
|
2688
|
+
return this.mergeAgentRunOptions(this.requireAgentDefinition(agentName), sessionOptions);
|
|
2619
2689
|
}
|
|
2620
2690
|
mergeAgentRunOptions(definition, options) {
|
|
2621
2691
|
const availableMcpServers = new Set([
|
|
@@ -2687,6 +2757,7 @@ export class ActoviqAgentClient {
|
|
|
2687
2757
|
}
|
|
2688
2758
|
}
|
|
2689
2759
|
export async function createAgentSdk(options = {}) {
|
|
2760
|
+
recordCompatUsage('createAgentSdk');
|
|
2690
2761
|
return ActoviqAgentClient.create(options);
|
|
2691
2762
|
}
|
|
2692
2763
|
function resolveTaskId(input) {
|
|
@@ -2725,6 +2796,14 @@ function joinPromptParts(...parts) {
|
|
|
2725
2796
|
}
|
|
2726
2797
|
return normalized.join('\n\n');
|
|
2727
2798
|
}
|
|
2799
|
+
function combineAbortSignals(...signals) {
|
|
2800
|
+
const available = signals.filter((signal) => signal != null);
|
|
2801
|
+
if (available.length === 0)
|
|
2802
|
+
return undefined;
|
|
2803
|
+
if (available.length === 1)
|
|
2804
|
+
return available[0];
|
|
2805
|
+
return AbortSignal.any(available);
|
|
2806
|
+
}
|
|
2728
2807
|
function mergeAgentDefinitions(...groups) {
|
|
2729
2808
|
const merged = new Map();
|
|
2730
2809
|
for (const group of groups) {
|
|
@@ -2749,6 +2828,9 @@ function formatTaskNotification(task) {
|
|
|
2749
2828
|
const result = task.status === 'completed'
|
|
2750
2829
|
? task.text ?? task.partialText ?? ''
|
|
2751
2830
|
: task.partialText ?? '';
|
|
2831
|
+
const actor = task.subagentType === 'bash'
|
|
2832
|
+
? `Background command "${task.description}"`
|
|
2833
|
+
: `Agent "${task.agentName ?? task.subagentType}"`;
|
|
2752
2834
|
return [
|
|
2753
2835
|
'<task_notification>',
|
|
2754
2836
|
`<task_id>${escapeXml(task.id)}</task_id>`,
|
|
@@ -2756,8 +2838,8 @@ function formatTaskNotification(task) {
|
|
|
2756
2838
|
task.agentName ? `<agent_name>${escapeXml(task.agentName)}</agent_name>` : undefined,
|
|
2757
2839
|
`<status>${task.status}</status>`,
|
|
2758
2840
|
`<summary>${escapeXml(task.status === 'completed'
|
|
2759
|
-
?
|
|
2760
|
-
:
|
|
2841
|
+
? `${actor} completed.`
|
|
2842
|
+
: `${actor} ${task.status}.`)}</summary>`,
|
|
2761
2843
|
result ? `<result>${escapeXml(result)}</result>` : undefined,
|
|
2762
2844
|
task.error ? `<error>${escapeXml(task.error)}</error>` : undefined,
|
|
2763
2845
|
`<usage><requests>${task.requestCount ?? 0}</requests><tool_uses>${task.toolCallCount ?? 0}</tool_uses><tool_errors>${task.toolErrorCount ?? 0}</tool_errors></usage>`,
|