@downcity/agent 1.1.74 → 1.1.81
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/README.md +15 -18
- package/bin/agent/local/Agent.d.ts +82 -0
- package/bin/agent/local/Agent.d.ts.map +1 -0
- package/bin/agent/local/Agent.js +154 -0
- package/bin/agent/local/Agent.js.map +1 -0
- package/bin/agent/local/AgentInstructions.d.ts +22 -0
- package/bin/agent/local/AgentInstructions.d.ts.map +1 -0
- package/bin/agent/local/AgentInstructions.js +57 -0
- package/bin/agent/local/AgentInstructions.js.map +1 -0
- package/bin/agent/local/AgentPluginFactory.d.ts +29 -0
- package/bin/agent/local/AgentPluginFactory.d.ts.map +1 -0
- package/bin/agent/local/AgentPluginFactory.js +53 -0
- package/bin/agent/local/AgentPluginFactory.js.map +1 -0
- package/bin/{runtime/host/AgentHostRuntime.d.ts → agent/local/AgentRuntimeAssembly.d.ts} +2 -2
- package/bin/agent/local/AgentRuntimeAssembly.d.ts.map +1 -0
- package/bin/{runtime/host/AgentHostRuntime.js → agent/local/AgentRuntimeAssembly.js} +2 -2
- package/bin/agent/local/AgentRuntimeAssembly.js.map +1 -0
- package/bin/agent/local/AgentRuntimeFactory.d.ts +72 -0
- package/bin/agent/local/AgentRuntimeFactory.d.ts.map +1 -0
- package/bin/agent/local/AgentRuntimeFactory.js +73 -0
- package/bin/agent/local/AgentRuntimeFactory.js.map +1 -0
- package/bin/{runtime/host → agent/local}/ProjectSetup.d.ts +1 -1
- package/bin/agent/local/ProjectSetup.d.ts.map +1 -0
- package/bin/{runtime/host → agent/local}/ProjectSetup.js +1 -1
- package/bin/agent/local/ProjectSetup.js.map +1 -0
- package/bin/agent/local/services/AgentAssemblyService.d.ts +112 -0
- package/bin/agent/local/services/AgentAssemblyService.d.ts.map +1 -0
- package/bin/agent/local/services/AgentAssemblyService.js +135 -0
- package/bin/agent/local/services/AgentAssemblyService.js.map +1 -0
- package/bin/agent/local/services/AgentLifecycleService.d.ts +59 -0
- package/bin/agent/local/services/AgentLifecycleService.d.ts.map +1 -0
- package/bin/agent/local/services/AgentLifecycleService.js +136 -0
- package/bin/agent/local/services/AgentLifecycleService.js.map +1 -0
- package/bin/agent/local/services/AgentSessionManager.d.ts +106 -0
- package/bin/agent/local/services/AgentSessionManager.d.ts.map +1 -0
- package/bin/agent/local/services/AgentSessionManager.js +182 -0
- package/bin/agent/local/services/AgentSessionManager.js.map +1 -0
- package/bin/agent/{RemoteAgent.d.ts → remote/RemoteAgent.d.ts} +3 -3
- package/bin/agent/remote/RemoteAgent.d.ts.map +1 -0
- package/bin/agent/remote/RemoteAgent.js +58 -0
- package/bin/agent/remote/RemoteAgent.js.map +1 -0
- package/bin/agent/remote/RemoteSession.d.ts +62 -0
- package/bin/agent/remote/RemoteSession.d.ts.map +1 -0
- package/bin/agent/remote/RemoteSession.js +225 -0
- package/bin/agent/remote/RemoteSession.js.map +1 -0
- package/bin/agent/remote/RemoteTransport.d.ts +52 -0
- package/bin/agent/remote/RemoteTransport.d.ts.map +1 -0
- package/bin/agent/remote/RemoteTransport.js +9 -0
- package/bin/agent/remote/RemoteTransport.js.map +1 -0
- package/bin/agent/remote/TransportFactory.d.ts +13 -0
- package/bin/agent/remote/TransportFactory.d.ts.map +1 -0
- package/bin/agent/remote/TransportFactory.js +22 -0
- package/bin/agent/remote/TransportFactory.js.map +1 -0
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts +35 -0
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.d.ts.map +1 -0
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.js +259 -0
- package/bin/agent/remote/transports/HttpRemoteAgentTransport.js.map +1 -0
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts +34 -0
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.d.ts.map +1 -0
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.js +66 -0
- package/bin/agent/remote/transports/RpcRemoteAgentTransport.js.map +1 -0
- package/bin/executor/Executor.d.ts +7 -20
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +77 -348
- package/bin/executor/Executor.js.map +1 -1
- package/bin/executor/SessionRunScope.d.ts +18 -34
- package/bin/executor/SessionRunScope.d.ts.map +1 -1
- package/bin/executor/SessionRunScope.js +42 -28
- package/bin/executor/SessionRunScope.js.map +1 -1
- package/bin/executor/composer/context/LocalSessionContextComposer.d.ts +5 -3
- package/bin/executor/composer/context/LocalSessionContextComposer.d.ts.map +1 -1
- package/bin/executor/composer/context/LocalSessionContextComposer.js +11 -18
- package/bin/executor/composer/context/LocalSessionContextComposer.js.map +1 -1
- package/bin/executor/composer/context/SessionContextComposer.d.ts +8 -3
- package/bin/executor/composer/context/SessionContextComposer.d.ts.map +1 -1
- package/bin/executor/composer/history/SessionHistoryWriter.js +2 -2
- package/bin/executor/composer/history/SessionHistoryWriter.js.map +1 -1
- package/bin/executor/composer/system/SessionSystemComposer.d.ts +2 -1
- package/bin/executor/composer/system/SessionSystemComposer.d.ts.map +1 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts +2 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -1
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js +2 -4
- package/bin/executor/composer/system/default/DefaultSessionSystemComposer.js.map +1 -1
- package/bin/executor/core-engine/CoreEngineRunner.d.ts +62 -0
- package/bin/executor/core-engine/CoreEngineRunner.d.ts.map +1 -0
- package/bin/executor/core-engine/CoreEngineRunner.js +309 -0
- package/bin/executor/core-engine/CoreEngineRunner.js.map +1 -0
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts +5 -0
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -1
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js +2 -4
- package/bin/executor/core-engine/CoreEngineUiStreamCollector.js.map +1 -1
- package/bin/executor/messages/AssistantResultPersistence.d.ts +3 -3
- package/bin/executor/messages/AssistantResultPersistence.d.ts.map +1 -1
- package/bin/executor/messages/AssistantResultPersistence.js +2 -6
- package/bin/executor/messages/AssistantResultPersistence.js.map +1 -1
- package/bin/executor/messages/SessionStepEventMapper.d.ts +7 -8
- package/bin/executor/messages/SessionStepEventMapper.d.ts.map +1 -1
- package/bin/executor/messages/SessionStepEventMapper.js +55 -86
- package/bin/executor/messages/SessionStepEventMapper.js.map +1 -1
- package/bin/executor/messages/UserVisibleText.d.ts +2 -10
- package/bin/executor/messages/UserVisibleText.d.ts.map +1 -1
- package/bin/executor/messages/UserVisibleText.js +3 -16
- package/bin/executor/messages/UserVisibleText.js.map +1 -1
- package/bin/executor/services/ExecutorInflightService.d.ts +39 -0
- package/bin/executor/services/ExecutorInflightService.d.ts.map +1 -0
- package/bin/executor/services/ExecutorInflightService.js +75 -0
- package/bin/executor/services/ExecutorInflightService.js.map +1 -0
- package/bin/executor/services/ExecutorRecoveryPolicy.d.ts +103 -0
- package/bin/executor/services/ExecutorRecoveryPolicy.d.ts.map +1 -0
- package/bin/executor/services/ExecutorRecoveryPolicy.js +87 -0
- package/bin/executor/services/ExecutorRecoveryPolicy.js.map +1 -0
- package/bin/executor/store/history/SessionHistoryStore.d.ts +12 -0
- package/bin/executor/store/history/SessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts +12 -0
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -1
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js +145 -8
- package/bin/executor/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -1
- package/bin/executor/tools/plugin/PluginToolBridge.d.ts +19 -0
- package/bin/executor/tools/plugin/PluginToolBridge.d.ts.map +1 -0
- package/bin/executor/tools/plugin/PluginToolBridge.js +143 -0
- package/bin/executor/tools/plugin/PluginToolBridge.js.map +1 -0
- package/bin/executor/tools/plugin/PluginToolDefinition.d.ts +32 -0
- package/bin/executor/tools/plugin/PluginToolDefinition.d.ts.map +1 -0
- package/bin/executor/tools/plugin/PluginToolDefinition.js +27 -0
- package/bin/executor/tools/plugin/PluginToolDefinition.js.map +1 -0
- package/bin/executor/tools/plugin/PluginToolSchemas.d.ts +14 -0
- package/bin/executor/tools/plugin/PluginToolSchemas.d.ts.map +1 -0
- package/bin/executor/tools/plugin/PluginToolSchemas.js +19 -0
- package/bin/executor/tools/plugin/PluginToolSchemas.js.map +1 -0
- package/bin/executor/tools/plugin/types/PluginTool.d.ts +39 -0
- package/bin/executor/tools/plugin/types/PluginTool.d.ts.map +1 -0
- package/bin/executor/tools/plugin/types/PluginTool.js +9 -0
- package/bin/executor/tools/plugin/types/PluginTool.js.map +1 -0
- package/bin/executor/tools/shell/ShellToolBridge.js +3 -3
- package/bin/executor/tools/shell/ShellToolBridge.js.map +1 -1
- package/bin/executor/tools/shell/ShellToolFormatting.d.ts +1 -10
- package/bin/executor/tools/shell/ShellToolFormatting.d.ts.map +1 -1
- package/bin/executor/tools/shell/ShellToolFormatting.js +1 -39
- package/bin/executor/tools/shell/ShellToolFormatting.js.map +1 -1
- package/bin/executor/types/SessionHistoryPaths.d.ts +4 -0
- package/bin/executor/types/SessionHistoryPaths.d.ts.map +1 -1
- package/bin/executor/types/SessionRun.d.ts +18 -0
- package/bin/executor/types/SessionRun.d.ts.map +1 -1
- package/bin/index.d.ts +15 -6
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +6 -3
- package/bin/index.js.map +1 -1
- package/bin/plugin/core/BasePlugin.d.ts +2 -2
- package/bin/plugin/core/BasePlugin.d.ts.map +1 -1
- package/bin/plugin/core/BasePlugin.js.map +1 -1
- package/bin/plugin/core/ImagePlugin.d.ts +56 -0
- package/bin/plugin/core/ImagePlugin.d.ts.map +1 -0
- package/bin/plugin/core/ImagePlugin.js +109 -0
- package/bin/plugin/core/ImagePlugin.js.map +1 -0
- package/bin/plugin/core/PluginCommandRequest.d.ts +1 -1
- package/bin/plugin/core/PluginCommandRequest.js +1 -1
- package/bin/plugin/core/PluginLocalExecution.js +1 -1
- package/bin/plugin/core/PluginLocalExecution.js.map +1 -1
- package/bin/plugin/core/ProjectConfigStore.d.ts +3 -2
- package/bin/plugin/core/ProjectConfigStore.d.ts.map +1 -1
- package/bin/plugin/core/ProjectConfigStore.js +3 -4
- package/bin/plugin/core/ProjectConfigStore.js.map +1 -1
- package/bin/plugin/types/Plugin.d.ts +10 -842
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- package/bin/plugin/types/Plugin.js +3 -4
- package/bin/plugin/types/Plugin.js.map +1 -1
- package/bin/plugin/types/PluginState.d.ts +1 -1
- package/bin/plugin/types/PluginState.d.ts.map +1 -1
- package/bin/rpc/Client.d.ts +2 -99
- package/bin/rpc/Client.d.ts.map +1 -1
- package/bin/rpc/Client.js +0 -46
- package/bin/rpc/Client.js.map +1 -1
- package/bin/rpc/Server.d.ts +5 -21
- package/bin/rpc/Server.d.ts.map +1 -1
- package/bin/rpc/Server.js +30 -315
- package/bin/rpc/Server.js.map +1 -1
- package/bin/rpc/server/InternalHandlers.d.ts +21 -0
- package/bin/rpc/server/InternalHandlers.d.ts.map +1 -0
- package/bin/rpc/server/InternalHandlers.js +190 -0
- package/bin/rpc/server/InternalHandlers.js.map +1 -0
- package/bin/rpc/server/RequestDispatcher.d.ts +27 -0
- package/bin/rpc/server/RequestDispatcher.d.ts.map +1 -0
- package/bin/rpc/server/RequestDispatcher.js +38 -0
- package/bin/rpc/server/RequestDispatcher.js.map +1 -0
- package/bin/rpc/server/SdkSessionHandlers.d.ts +25 -0
- package/bin/rpc/server/SdkSessionHandlers.d.ts.map +1 -0
- package/bin/rpc/server/SdkSessionHandlers.js +86 -0
- package/bin/rpc/server/SdkSessionHandlers.js.map +1 -0
- package/bin/rpc/server/ServerTypes.d.ts +59 -0
- package/bin/rpc/server/ServerTypes.d.ts.map +1 -0
- package/bin/rpc/server/ServerTypes.js +9 -0
- package/bin/rpc/server/ServerTypes.js.map +1 -0
- package/bin/{runtime/sandbox → sandbox}/MacOsSeatbeltSandbox.d.ts +1 -1
- package/bin/sandbox/MacOsSeatbeltSandbox.d.ts.map +1 -0
- package/bin/sandbox/MacOsSeatbeltSandbox.js.map +1 -0
- package/bin/{runtime/sandbox → sandbox}/SandboxConfigResolver.d.ts +2 -2
- package/bin/sandbox/SandboxConfigResolver.d.ts.map +1 -0
- package/bin/sandbox/SandboxConfigResolver.js.map +1 -0
- package/bin/{runtime/sandbox → sandbox}/SandboxRunner.d.ts +2 -2
- package/bin/sandbox/SandboxRunner.d.ts.map +1 -0
- package/bin/{runtime/sandbox → sandbox}/SandboxRunner.js +2 -2
- package/bin/sandbox/SandboxRunner.js.map +1 -0
- package/bin/sandbox/types/Sandbox.d.ts.map +1 -0
- package/bin/sandbox/types/Sandbox.js.map +1 -0
- package/bin/{runtime/sandbox → sandbox}/types/SandboxRuntime.d.ts +2 -2
- package/bin/sandbox/types/SandboxRuntime.d.ts.map +1 -0
- package/bin/sandbox/types/SandboxRuntime.js.map +1 -0
- package/bin/session/Session.d.ts +14 -83
- package/bin/session/Session.d.ts.map +1 -1
- package/bin/session/Session.js +140 -362
- package/bin/session/Session.js.map +1 -1
- package/bin/session/SessionSystemBuilder.d.ts +2 -1
- package/bin/session/SessionSystemBuilder.d.ts.map +1 -1
- package/bin/session/SessionSystemBuilder.js +2 -3
- package/bin/session/SessionSystemBuilder.js.map +1 -1
- package/bin/session/browse/Browse.d.ts +1 -1
- package/bin/session/browse/Browse.d.ts.map +1 -1
- package/bin/session/browse/Browse.js +28 -13
- package/bin/session/browse/Browse.js.map +1 -1
- package/bin/session/index.d.ts +1 -1
- package/bin/session/index.d.ts.map +1 -1
- package/bin/session/index.js +1 -1
- package/bin/session/index.js.map +1 -1
- package/bin/session/services/SessionStateService.d.ts +132 -0
- package/bin/session/services/SessionStateService.d.ts.map +1 -0
- package/bin/session/services/SessionStateService.js +242 -0
- package/bin/session/services/SessionStateService.js.map +1 -0
- package/bin/session/services/SessionTurnService.d.ts +66 -0
- package/bin/session/services/SessionTurnService.d.ts.map +1 -0
- package/bin/session/services/SessionTurnService.js +137 -0
- package/bin/session/services/SessionTurnService.js.map +1 -0
- package/bin/session/services/SessionViewService.d.ts +105 -0
- package/bin/session/services/SessionViewService.d.ts.map +1 -0
- package/bin/session/services/SessionViewService.js +184 -0
- package/bin/session/services/SessionViewService.js.map +1 -0
- package/bin/session/storage/Paths.d.ts +9 -0
- package/bin/session/storage/Paths.d.ts.map +1 -1
- package/bin/session/storage/Paths.js +11 -0
- package/bin/session/storage/Paths.js.map +1 -1
- package/bin/types/agent/AgentOptions.d.ts +152 -0
- package/bin/types/agent/AgentOptions.d.ts.map +1 -0
- package/bin/types/agent/AgentOptions.js +9 -0
- package/bin/types/agent/AgentOptions.js.map +1 -0
- package/bin/types/{runtime/host/AgentHost.d.ts → agent/AgentRuntimeAssembly.d.ts} +4 -4
- package/bin/types/agent/AgentRuntimeAssembly.d.ts.map +1 -0
- package/bin/types/{runtime/host/AgentHost.js → agent/AgentRuntimeAssembly.js} +3 -3
- package/bin/types/agent/AgentRuntimeAssembly.js.map +1 -0
- package/bin/types/agent/AgentTypes.d.ts +10 -613
- package/bin/types/agent/AgentTypes.d.ts.map +1 -1
- package/bin/types/agent/AgentTypes.js +4 -4
- package/bin/types/agent/RemoteAgentOptions.d.ts +28 -0
- package/bin/types/agent/RemoteAgentOptions.d.ts.map +1 -0
- package/bin/types/agent/RemoteAgentOptions.js +9 -0
- package/bin/types/agent/RemoteAgentOptions.js.map +1 -0
- package/bin/types/agent/SessionActor.d.ts +60 -0
- package/bin/types/agent/SessionActor.d.ts.map +1 -0
- package/bin/types/agent/SessionActor.js +9 -0
- package/bin/types/agent/SessionActor.js.map +1 -0
- package/bin/types/agent/SessionTypes.d.ts +312 -0
- package/bin/types/agent/SessionTypes.d.ts.map +1 -0
- package/bin/types/agent/SessionTypes.js +9 -0
- package/bin/types/agent/SessionTypes.js.map +1 -0
- package/bin/types/config/DowncityConfig.d.ts +1 -1
- package/bin/types/config/DowncityConfig.d.ts.map +1 -1
- package/bin/types/executor/SessionRunContext.d.ts +66 -0
- package/bin/types/executor/SessionRunContext.d.ts.map +1 -0
- package/bin/types/executor/SessionRunContext.js +10 -0
- package/bin/types/executor/SessionRunContext.js.map +1 -0
- package/bin/types/{runtime/host → platform}/Store.d.ts +1 -1
- package/bin/types/platform/Store.d.ts.map +1 -0
- package/bin/types/{runtime/host → platform}/Store.js +1 -1
- package/bin/types/platform/Store.js.map +1 -0
- package/bin/types/plugin/ImagePlugin.d.ts +94 -0
- package/bin/types/plugin/ImagePlugin.d.ts.map +1 -0
- package/bin/types/plugin/ImagePlugin.js +10 -0
- package/bin/types/plugin/ImagePlugin.js.map +1 -0
- package/bin/types/plugin/PluginAction.d.ts +119 -0
- package/bin/types/plugin/PluginAction.d.ts.map +1 -0
- package/bin/types/plugin/PluginAction.js +9 -0
- package/bin/types/plugin/PluginAction.js.map +1 -0
- package/bin/types/plugin/PluginCommand.d.ts +80 -0
- package/bin/types/plugin/PluginCommand.d.ts.map +1 -0
- package/bin/types/plugin/PluginCommand.js +9 -0
- package/bin/types/plugin/PluginCommand.js.map +1 -0
- package/bin/types/plugin/PluginDefinition.d.ts +57 -0
- package/bin/types/plugin/PluginDefinition.d.ts.map +1 -0
- package/bin/types/plugin/PluginDefinition.js +9 -0
- package/bin/types/plugin/PluginDefinition.js.map +1 -0
- package/bin/types/plugin/PluginHttp.d.ts +34 -0
- package/bin/types/plugin/PluginHttp.d.ts.map +1 -0
- package/bin/types/plugin/PluginHttp.js +9 -0
- package/bin/types/plugin/PluginHttp.js.map +1 -0
- package/bin/types/plugin/PluginRuntime.d.ts +148 -0
- package/bin/types/plugin/PluginRuntime.d.ts.map +1 -0
- package/bin/types/plugin/PluginRuntime.js +9 -0
- package/bin/types/plugin/PluginRuntime.js.map +1 -0
- package/bin/types/plugin/PluginSetup.d.ts +133 -0
- package/bin/types/plugin/PluginSetup.d.ts.map +1 -0
- package/bin/types/plugin/PluginSetup.js +9 -0
- package/bin/types/plugin/PluginSetup.js.map +1 -0
- package/bin/types/plugin/PluginState.d.ts +69 -0
- package/bin/types/plugin/PluginState.d.ts.map +1 -0
- package/bin/types/plugin/PluginState.js +9 -0
- package/bin/types/plugin/PluginState.js.map +1 -0
- package/bin/types/rpc/RpcProtocol.d.ts +323 -0
- package/bin/types/rpc/RpcProtocol.d.ts.map +1 -0
- package/bin/types/rpc/RpcProtocol.js +10 -0
- package/bin/types/rpc/RpcProtocol.js.map +1 -0
- package/bin/types/runtime/agent/AgentContext.d.ts +1 -1
- package/bin/types/runtime/agent/AgentContext.d.ts.map +1 -1
- package/bin/types/runtime/agent/AgentRuntime.d.ts +1 -1
- package/bin/types/runtime/agent/AgentRuntime.d.ts.map +1 -1
- package/bin/types/session/SessionComposerOptions.d.ts +90 -0
- package/bin/types/session/SessionComposerOptions.d.ts.map +1 -0
- package/bin/types/session/SessionComposerOptions.js +10 -0
- package/bin/types/session/SessionComposerOptions.js.map +1 -0
- package/bin/types/session/SessionLocalState.d.ts +35 -0
- package/bin/types/session/SessionLocalState.d.ts.map +1 -0
- package/bin/types/session/SessionLocalState.js +10 -0
- package/bin/types/session/SessionLocalState.js.map +1 -0
- package/bin/types/session/SessionOptions.d.ts +85 -0
- package/bin/types/session/SessionOptions.d.ts.map +1 -0
- package/bin/types/session/SessionOptions.js +10 -0
- package/bin/types/session/SessionOptions.js.map +1 -0
- package/package.json +2 -2
- package/scripts/session-history-inflight.test.mjs +146 -0
- package/src/agent/local/Agent.ts +197 -0
- package/src/agent/local/AgentInstructions.ts +68 -0
- package/src/agent/local/AgentPluginFactory.ts +83 -0
- package/src/{runtime/host/AgentHostRuntime.ts → agent/local/AgentRuntimeAssembly.ts} +2 -2
- package/src/agent/local/AgentRuntimeFactory.ts +152 -0
- package/src/{runtime/host → agent/local}/ProjectSetup.ts +1 -1
- package/src/agent/local/services/AgentAssemblyService.ts +268 -0
- package/src/agent/local/services/AgentLifecycleService.ts +187 -0
- package/src/agent/local/services/AgentSessionManager.ts +291 -0
- package/src/agent/remote/RemoteAgent.ts +76 -0
- package/src/agent/remote/RemoteSession.ts +287 -0
- package/src/agent/remote/RemoteTransport.ts +71 -0
- package/src/agent/remote/TransportFactory.ts +29 -0
- package/src/agent/remote/transports/HttpRemoteAgentTransport.ts +347 -0
- package/src/agent/remote/transports/RpcRemoteAgentTransport.ts +107 -0
- package/src/executor/Executor.ts +107 -426
- package/src/executor/README.md +4 -4
- package/src/executor/SessionRunScope.ts +47 -71
- package/src/executor/composer/context/LocalSessionContextComposer.ts +24 -20
- package/src/executor/composer/context/SessionContextComposer.ts +13 -3
- package/src/executor/composer/history/SessionHistoryWriter.ts +2 -2
- package/src/executor/composer/system/SessionSystemComposer.ts +2 -1
- package/src/executor/composer/system/default/DefaultSessionSystemComposer.ts +3 -4
- package/src/executor/core-engine/CoreEngineRunner.ts +433 -0
- package/src/executor/core-engine/CoreEngineUiStreamCollector.ts +7 -5
- package/src/executor/messages/AssistantResultPersistence.ts +4 -12
- package/src/executor/messages/SessionStepEventMapper.ts +59 -101
- package/src/executor/messages/UserVisibleText.ts +3 -18
- package/src/executor/services/ExecutorInflightService.ts +101 -0
- package/src/executor/services/ExecutorRecoveryPolicy.ts +213 -0
- package/src/executor/store/history/SessionHistoryStore.ts +15 -0
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +164 -11
- package/src/executor/tools/plugin/PluginToolBridge.ts +161 -0
- package/src/executor/tools/plugin/PluginToolDefinition.ts +32 -0
- package/src/executor/tools/plugin/PluginToolSchemas.ts +20 -0
- package/src/executor/tools/plugin/types/PluginTool.ts +41 -0
- package/src/executor/tools/shell/ShellToolBridge.ts +3 -3
- package/src/executor/tools/shell/ShellToolFormatting.ts +1 -50
- package/src/executor/types/SessionHistoryPaths.ts +5 -0
- package/src/executor/types/SessionRun.ts +20 -0
- package/src/index.ts +38 -5
- package/src/plugin/core/BasePlugin.ts +2 -2
- package/src/plugin/core/ImagePlugin.ts +128 -0
- package/src/plugin/core/PluginCommandRequest.ts +1 -1
- package/src/plugin/core/PluginLocalExecution.ts +1 -1
- package/src/plugin/core/ProjectConfigStore.ts +4 -4
- package/src/plugin/types/Plugin.ts +54 -913
- package/src/plugin/types/PluginState.ts +1 -1
- package/src/rpc/Client.ts +16 -322
- package/src/rpc/Server.ts +39 -565
- package/src/rpc/server/InternalHandlers.ts +230 -0
- package/src/rpc/server/RequestDispatcher.ts +67 -0
- package/src/rpc/server/SdkSessionHandlers.ts +106 -0
- package/src/rpc/server/ServerTypes.ts +65 -0
- package/src/{runtime/sandbox → sandbox}/MacOsSeatbeltSandbox.ts +1 -1
- package/src/{runtime/sandbox → sandbox}/SandboxConfigResolver.ts +1 -1
- package/src/{runtime/sandbox → sandbox}/SandboxRunner.ts +3 -3
- package/src/{runtime/sandbox → sandbox}/types/SandboxRuntime.ts +2 -2
- package/src/session/Session.ts +184 -485
- package/src/session/SessionSystemBuilder.ts +3 -3
- package/src/session/browse/Browse.ts +29 -10
- package/src/session/index.ts +1 -0
- package/src/session/services/SessionStateService.ts +341 -0
- package/src/session/services/SessionTurnService.ts +202 -0
- package/src/session/services/SessionViewService.ts +301 -0
- package/src/session/storage/Paths.ts +19 -0
- package/src/types/agent/AgentOptions.ts +172 -0
- package/src/types/{runtime/host/AgentHost.ts → agent/AgentRuntimeAssembly.ts} +2 -2
- package/src/types/agent/AgentTypes.ts +47 -709
- package/src/types/agent/RemoteAgentOptions.ts +29 -0
- package/src/types/agent/SessionActor.ts +88 -0
- package/src/types/agent/SessionTypes.ts +335 -0
- package/src/types/config/DowncityConfig.ts +1 -1
- package/src/types/executor/SessionRunContext.ts +76 -0
- package/src/types/{runtime/host → platform}/Store.ts +1 -1
- package/src/types/plugin/ImagePlugin.ts +103 -0
- package/src/types/plugin/PluginAction.ts +133 -0
- package/src/types/plugin/PluginCommand.ts +89 -0
- package/src/types/plugin/PluginDefinition.ts +74 -0
- package/src/types/plugin/PluginHttp.ts +36 -0
- package/src/types/plugin/PluginRuntime.ts +169 -0
- package/src/types/plugin/PluginSetup.ts +138 -0
- package/src/types/plugin/PluginState.ts +82 -0
- package/src/types/rpc/RpcProtocol.ts +361 -0
- package/src/types/runtime/agent/AgentContext.ts +1 -1
- package/src/types/runtime/agent/AgentRuntime.ts +1 -1
- package/src/types/session/SessionComposerOptions.ts +107 -0
- package/src/types/session/SessionLocalState.ts +40 -0
- package/src/types/session/SessionOptions.ts +99 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/agent/Agent.d.ts +0 -223
- package/bin/agent/Agent.d.ts.map +0 -1
- package/bin/agent/Agent.js +0 -627
- package/bin/agent/Agent.js.map +0 -1
- package/bin/agent/RemoteAgent.d.ts.map +0 -1
- package/bin/agent/RemoteAgent.js +0 -585
- package/bin/agent/RemoteAgent.js.map +0 -1
- package/bin/runtime/auth/AuthEnv.d.ts +0 -36
- package/bin/runtime/auth/AuthEnv.d.ts.map +0 -1
- package/bin/runtime/auth/AuthEnv.js +0 -54
- package/bin/runtime/auth/AuthEnv.js.map +0 -1
- package/bin/runtime/auth/CliAuthStateStore.d.ts +0 -29
- package/bin/runtime/auth/CliAuthStateStore.d.ts.map +0 -1
- package/bin/runtime/auth/CliAuthStateStore.js +0 -26
- package/bin/runtime/auth/CliAuthStateStore.js.map +0 -1
- package/bin/runtime/control/AuthControlService.d.ts +0 -34
- package/bin/runtime/control/AuthControlService.d.ts.map +0 -1
- package/bin/runtime/control/AuthControlService.js +0 -129
- package/bin/runtime/control/AuthControlService.js.map +0 -1
- package/bin/runtime/control/CommonHelpers.d.ts +0 -36
- package/bin/runtime/control/CommonHelpers.d.ts.map +0 -1
- package/bin/runtime/control/CommonHelpers.js +0 -63
- package/bin/runtime/control/CommonHelpers.js.map +0 -1
- package/bin/runtime/control/ExecuteBySession.d.ts +0 -30
- package/bin/runtime/control/ExecuteBySession.d.ts.map +0 -1
- package/bin/runtime/control/ExecuteBySession.js +0 -41
- package/bin/runtime/control/ExecuteBySession.js.map +0 -1
- package/bin/runtime/control/ExecuteInput.d.ts +0 -18
- package/bin/runtime/control/ExecuteInput.d.ts.map +0 -1
- package/bin/runtime/control/ExecuteInput.js +0 -201
- package/bin/runtime/control/ExecuteInput.js.map +0 -1
- package/bin/runtime/control/Helpers.d.ts +0 -13
- package/bin/runtime/control/Helpers.d.ts.map +0 -1
- package/bin/runtime/control/Helpers.js +0 -13
- package/bin/runtime/control/Helpers.js.map +0 -1
- package/bin/runtime/control/MessageTimeline.d.ts +0 -22
- package/bin/runtime/control/MessageTimeline.d.ts.map +0 -1
- package/bin/runtime/control/MessageTimeline.js +0 -226
- package/bin/runtime/control/MessageTimeline.js.map +0 -1
- package/bin/runtime/control/SessionSummaryStore.d.ts +0 -20
- package/bin/runtime/control/SessionSummaryStore.d.ts.map +0 -1
- package/bin/runtime/control/SessionSummaryStore.js +0 -50
- package/bin/runtime/control/SessionSummaryStore.js.map +0 -1
- package/bin/runtime/control/TaskStore.d.ts +0 -33
- package/bin/runtime/control/TaskStore.d.ts.map +0 -1
- package/bin/runtime/control/TaskStore.js +0 -175
- package/bin/runtime/control/TaskStore.js.map +0 -1
- package/bin/runtime/control/types/AuthControl.d.ts +0 -30
- package/bin/runtime/control/types/AuthControl.d.ts.map +0 -1
- package/bin/runtime/control/types/AuthControl.js +0 -9
- package/bin/runtime/control/types/AuthControl.js.map +0 -1
- package/bin/runtime/control/types/ControlSessionExecute.d.ts +0 -85
- package/bin/runtime/control/types/ControlSessionExecute.d.ts.map +0 -1
- package/bin/runtime/control/types/ControlSessionExecute.js +0 -9
- package/bin/runtime/control/types/ControlSessionExecute.js.map +0 -1
- package/bin/runtime/control/types/ControlViewData.d.ts +0 -320
- package/bin/runtime/control/types/ControlViewData.d.ts.map +0 -1
- package/bin/runtime/control/types/ControlViewData.js +0 -9
- package/bin/runtime/control/types/ControlViewData.js.map +0 -1
- package/bin/runtime/host/AgentHostRuntime.d.ts.map +0 -1
- package/bin/runtime/host/AgentHostRuntime.js.map +0 -1
- package/bin/runtime/host/ProjectSetup.d.ts.map +0 -1
- package/bin/runtime/host/ProjectSetup.js.map +0 -1
- package/bin/runtime/sandbox/MacOsSeatbeltSandbox.d.ts.map +0 -1
- package/bin/runtime/sandbox/MacOsSeatbeltSandbox.js.map +0 -1
- package/bin/runtime/sandbox/SandboxConfigResolver.d.ts.map +0 -1
- package/bin/runtime/sandbox/SandboxConfigResolver.js.map +0 -1
- package/bin/runtime/sandbox/SandboxRunner.d.ts.map +0 -1
- package/bin/runtime/sandbox/SandboxRunner.js.map +0 -1
- package/bin/runtime/sandbox/types/Sandbox.d.ts.map +0 -1
- package/bin/runtime/sandbox/types/Sandbox.js.map +0 -1
- package/bin/runtime/sandbox/types/SandboxRuntime.d.ts.map +0 -1
- package/bin/runtime/sandbox/types/SandboxRuntime.js.map +0 -1
- package/bin/types/runtime/host/AgentHost.d.ts.map +0 -1
- package/bin/types/runtime/host/AgentHost.js.map +0 -1
- package/bin/types/runtime/host/Store.d.ts.map +0 -1
- package/bin/types/runtime/host/Store.js.map +0 -1
- package/src/agent/Agent.ts +0 -734
- package/src/agent/RemoteAgent.ts +0 -834
- package/src/runtime/auth/AuthEnv.ts +0 -62
- package/src/runtime/auth/CliAuthStateStore.ts +0 -46
- package/src/runtime/control/AuthControlService.ts +0 -169
- package/src/runtime/control/CommonHelpers.ts +0 -69
- package/src/runtime/control/ExecuteBySession.ts +0 -52
- package/src/runtime/control/ExecuteInput.ts +0 -236
- package/src/runtime/control/Helpers.ts +0 -22
- package/src/runtime/control/MessageTimeline.ts +0 -269
- package/src/runtime/control/SessionSummaryStore.ts +0 -72
- package/src/runtime/control/TaskStore.ts +0 -242
- package/src/runtime/control/types/AuthControl.ts +0 -34
- package/src/runtime/control/types/ControlSessionExecute.ts +0 -99
- package/src/runtime/control/types/ControlViewData.ts +0 -392
- /package/bin/{runtime/sandbox → sandbox}/MacOsSeatbeltSandbox.js +0 -0
- /package/bin/{runtime/sandbox → sandbox}/SandboxConfigResolver.js +0 -0
- /package/bin/{runtime/sandbox → sandbox}/types/Sandbox.d.ts +0 -0
- /package/bin/{runtime/sandbox → sandbox}/types/Sandbox.js +0 -0
- /package/bin/{runtime/sandbox → sandbox}/types/SandboxRuntime.js +0 -0
- /package/src/{runtime/sandbox → sandbox}/types/Sandbox.ts +0 -0
package/bin/agent/Agent.d.ts
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Agent 本地入口与实例装配中心。
|
|
3
|
-
*
|
|
4
|
-
* 职责说明(中文)
|
|
5
|
-
* - 对外暴露 `Agent` 这一唯一的本地实例类。
|
|
6
|
-
* - 统一承接单个 agent 实例的配置加载、plugin 装配、session 创建、RPC 启停。
|
|
7
|
-
* - 把原先独立的实例内核装配逻辑收敛到 `Agent` 内部,避免 facade 与 core 双层跳转。
|
|
8
|
-
*
|
|
9
|
-
* 边界说明(中文)
|
|
10
|
-
* - 这里负责“单个 agent 实例”的长期状态与装配,不负责平台级多 agent 管理。
|
|
11
|
-
* - 这里不直接实现 session 执行细节,而是继续复用 `Session` / `Executor` 体系。
|
|
12
|
-
*/
|
|
13
|
-
import type { Tool } from "ai";
|
|
14
|
-
import type { AgentContext } from "../types/runtime/agent/AgentContext.js";
|
|
15
|
-
import type { AgentRuntime } from "../types/runtime/agent/AgentRuntime.js";
|
|
16
|
-
import type { DowncityConfig } from "../types/config/DowncityConfig.js";
|
|
17
|
-
import type { PluginPort } from "../plugin/types/Plugin.js";
|
|
18
|
-
import type { AgentSession, AgentCreateSessionInput, AgentListSessionsInput, AgentOptions, AgentStartOptions, AgentStartResult, AgentStopResult, AgentSessionCollection, AgentSessionSummaryPage } from "../types/agent/AgentTypes.js";
|
|
19
|
-
import { Logger } from "../utils/logger/Logger.js";
|
|
20
|
-
/**
|
|
21
|
-
* SDK 本地 Agent。
|
|
22
|
-
*/
|
|
23
|
-
export declare class Agent {
|
|
24
|
-
readonly id: string;
|
|
25
|
-
readonly path: string;
|
|
26
|
-
readonly tools: Record<string, Tool>;
|
|
27
|
-
readonly plugins: PluginPort;
|
|
28
|
-
private readonly logger;
|
|
29
|
-
private readonly sessionsById;
|
|
30
|
-
private readonly runtime;
|
|
31
|
-
private readonly agentContext;
|
|
32
|
-
private readonly pluginRegistry;
|
|
33
|
-
private readonly config;
|
|
34
|
-
private readonly env;
|
|
35
|
-
private readonly defaultModel?;
|
|
36
|
-
private readonly pluginInstances;
|
|
37
|
-
private readonly sessionCollection;
|
|
38
|
-
private instruction;
|
|
39
|
-
private configuredSessionIds;
|
|
40
|
-
private pluginsStarted;
|
|
41
|
-
private actionScheduleRuntime;
|
|
42
|
-
private startPromise;
|
|
43
|
-
private rpcBinding;
|
|
44
|
-
constructor(options: AgentOptions);
|
|
45
|
-
/**
|
|
46
|
-
* 新建一个 session。
|
|
47
|
-
*
|
|
48
|
-
* 关键点(中文)
|
|
49
|
-
* - 若调用方显式传入 `sessionId`,这里会先检查缓存与磁盘目录,避免重复创建。
|
|
50
|
-
* - session 初始化完成后会立即应用默认模型。
|
|
51
|
-
*/
|
|
52
|
-
createSession(input?: AgentCreateSessionInput): Promise<AgentSession>;
|
|
53
|
-
/**
|
|
54
|
-
* 获取一个已存在的 session。
|
|
55
|
-
*
|
|
56
|
-
* 关键点(中文)
|
|
57
|
-
* - 若缓存中没有该 session,会根据磁盘目录决定是否允许懒加载恢复。
|
|
58
|
-
* - 返回前同样会兜底执行一次默认配置装配。
|
|
59
|
-
*/
|
|
60
|
-
getSession(sessionId: string): Promise<AgentSession>;
|
|
61
|
-
/**
|
|
62
|
-
* 列出当前 agent 的 session 摘要页。
|
|
63
|
-
*/
|
|
64
|
-
listSessions(input?: AgentListSessionsInput): Promise<AgentSessionSummaryPage>;
|
|
65
|
-
/**
|
|
66
|
-
* 启动当前 agent 实例的长期运行能力。
|
|
67
|
-
*
|
|
68
|
-
* 关键点(中文)
|
|
69
|
-
* - `start()` 是唯一公开的长期运行生命周期入口。
|
|
70
|
-
* - 多次并发调用会复用同一个启动 Promise,避免重复启动 plugins / rpc。
|
|
71
|
-
*/
|
|
72
|
-
start(options?: AgentStartOptions): Promise<AgentStartResult>;
|
|
73
|
-
/**
|
|
74
|
-
* 停止当前 agent 实例的长期运行能力。
|
|
75
|
-
*
|
|
76
|
-
* 关键点(中文)
|
|
77
|
-
* - 停止顺序保持为 plugins -> rpc,与当前运行语义一致。
|
|
78
|
-
* - 停止后会清空 `startPromise`,允许后续再次 `start()`。
|
|
79
|
-
*/
|
|
80
|
-
stop(): Promise<AgentStopResult>;
|
|
81
|
-
/**
|
|
82
|
-
* 更新当前 SDK Agent 的静态基础指令。
|
|
83
|
-
*
|
|
84
|
-
* 关键点(中文)
|
|
85
|
-
* - instruction 不做动态变量替换。
|
|
86
|
-
* - 已创建的 session 后续 run 会读取最新 instruction blocks。
|
|
87
|
-
*/
|
|
88
|
-
setInstruction(input: string | string[]): void;
|
|
89
|
-
/**
|
|
90
|
-
* 返回当前项目根目录解析后的配置快照。
|
|
91
|
-
*/
|
|
92
|
-
getConfig(): DowncityConfig;
|
|
93
|
-
/**
|
|
94
|
-
* 返回当前 agent 绑定的统一日志器。
|
|
95
|
-
*/
|
|
96
|
-
getLogger(): Logger;
|
|
97
|
-
/**
|
|
98
|
-
* 返回当前 agent runtime。
|
|
99
|
-
*
|
|
100
|
-
* 关键点(中文)
|
|
101
|
-
* - 供宿主在 agent 外部装配 transport(例如 city HTTP gateway)时复用。
|
|
102
|
-
* - 不暴露启动语义,只暴露运行时访问口。
|
|
103
|
-
*/
|
|
104
|
-
getRuntime(): AgentRuntime;
|
|
105
|
-
/**
|
|
106
|
-
* 返回当前 agent context。
|
|
107
|
-
*
|
|
108
|
-
* 关键点(中文)
|
|
109
|
-
* - 供宿主装配 plugin/control 相关外层协议面。
|
|
110
|
-
*/
|
|
111
|
-
getContext(): AgentContext;
|
|
112
|
-
/**
|
|
113
|
-
* 返回当前 session collection。
|
|
114
|
-
*
|
|
115
|
-
* 关键点(中文)
|
|
116
|
-
* - 供宿主在外层挂载 RemoteAgent transport 时复用。
|
|
117
|
-
*/
|
|
118
|
-
getSessionCollection(): AgentSessionCollection;
|
|
119
|
-
/**
|
|
120
|
-
* 确保当前 plugins 已启动。
|
|
121
|
-
*
|
|
122
|
-
* 关键点(中文)
|
|
123
|
-
* - 这里只负责托管 plugin 的生命周期启动,不隐式启动 RPC 能力。
|
|
124
|
-
* - 启动失败的 plugin 会记录日志,但保留与原行为一致的整体启动流程。
|
|
125
|
-
*/
|
|
126
|
-
private ensurePluginsStarted;
|
|
127
|
-
/**
|
|
128
|
-
* 确保 ActionSchedule runtime 已随 Agent 长期生命周期启动。
|
|
129
|
-
*
|
|
130
|
-
* 关键点(中文)
|
|
131
|
-
* - ActionSchedule 不作为 plugin 注册,但它依赖 plugin action 执行能力。
|
|
132
|
-
* - 因此这里放在普通 plugins 启动之后,避免到期任务执行到尚未启动的 plugin。
|
|
133
|
-
*/
|
|
134
|
-
private ensureActionScheduleRuntimeStarted;
|
|
135
|
-
/**
|
|
136
|
-
* 停止 ActionSchedule runtime。
|
|
137
|
-
*
|
|
138
|
-
* 关键点(中文)
|
|
139
|
-
* - Agent 停止时先停 ActionSchedule,再停普通 plugin,避免关停期间继续触发 action。
|
|
140
|
-
*/
|
|
141
|
-
private stopActionScheduleRuntime;
|
|
142
|
-
/**
|
|
143
|
-
* 启动当前 agent 的本机 RPC server。
|
|
144
|
-
*/
|
|
145
|
-
private startRpc;
|
|
146
|
-
/**
|
|
147
|
-
* 停止当前 agent 的本机 RPC server。
|
|
148
|
-
*/
|
|
149
|
-
private stopRpc;
|
|
150
|
-
/**
|
|
151
|
-
* 读取当前项目配置。
|
|
152
|
-
*
|
|
153
|
-
* 关键点(中文)
|
|
154
|
-
* - 若项目根目录尚未存在合法 `downcity.json`,会退回最小 SDK 占位配置。
|
|
155
|
-
* - 这样可以允许纯 SDK 场景在尚未初始化项目时继续装配本地 Agent。
|
|
156
|
-
*/
|
|
157
|
-
private loadConfig;
|
|
158
|
-
/**
|
|
159
|
-
* 注册当前 agent 可见的 plugin 实例。
|
|
160
|
-
*
|
|
161
|
-
* 关键点(中文)
|
|
162
|
-
* - SDK 只注册宿主显式传入的 plugin 实例,不再隐式装配 built-in 集合。
|
|
163
|
-
* - 所有 plugin 在注册前都会绑定到当前实例 runtime。
|
|
164
|
-
*/
|
|
165
|
-
private registerPlugins;
|
|
166
|
-
/**
|
|
167
|
-
* 创建 plugin 注册表。
|
|
168
|
-
*
|
|
169
|
-
* 关键点(中文)
|
|
170
|
-
* - registry 本身不直接持有静态上下文,而是通过 resolver 延迟读取当前 `agentContext`。
|
|
171
|
-
* - 这样 hook 调度与 availability 判断都能复用同一份上下文视图。
|
|
172
|
-
*/
|
|
173
|
-
private createPluginRegistry;
|
|
174
|
-
/**
|
|
175
|
-
* 创建对外暴露的 plugin 调用门面。
|
|
176
|
-
*/
|
|
177
|
-
private createPluginPort;
|
|
178
|
-
/**
|
|
179
|
-
* 读取当前 agent 静态 instruction blocks。
|
|
180
|
-
*/
|
|
181
|
-
private loadInstructionSystemBlocks;
|
|
182
|
-
/**
|
|
183
|
-
* 读取当前可用 plugin 暴露的 system blocks。
|
|
184
|
-
*
|
|
185
|
-
* 关键点(中文)
|
|
186
|
-
* - 单个 plugin system 失败不会阻断 session 主链路。
|
|
187
|
-
* - 这里只加载当前启用且可用的 plugin system 文本。
|
|
188
|
-
*/
|
|
189
|
-
private loadPluginSystemBlocks;
|
|
190
|
-
/**
|
|
191
|
-
* 创建实例级 runtime 视图。
|
|
192
|
-
*
|
|
193
|
-
* 关键点(中文)
|
|
194
|
-
* - runtime 描述的是当前 agent 实例持有的长期状态。
|
|
195
|
-
* - 其他 server / plugin / transport 都通过这个视图读取统一状态。
|
|
196
|
-
*/
|
|
197
|
-
private createRuntime;
|
|
198
|
-
/**
|
|
199
|
-
* 创建统一执行上下文。
|
|
200
|
-
*
|
|
201
|
-
* 关键点(中文)
|
|
202
|
-
* - `AgentContext` 是执行期能力视图,不是状态实体本身。
|
|
203
|
-
* - plugin runtime、chat runtime、shell tool 都通过这里消费能力。
|
|
204
|
-
*/
|
|
205
|
-
private createAgentContext;
|
|
206
|
-
/**
|
|
207
|
-
* 获取或创建一个本地 Session 实例。
|
|
208
|
-
*
|
|
209
|
-
* 关键点(中文)
|
|
210
|
-
* - 同一个 `sessionId` 在单个 Agent 实例内只会装配一次。
|
|
211
|
-
* - 新建 session 时会把 instruction 与 plugin system 读取能力注入进去。
|
|
212
|
-
*/
|
|
213
|
-
private getOrCreateSession;
|
|
214
|
-
/**
|
|
215
|
-
* 为 session 应用默认模型。
|
|
216
|
-
*
|
|
217
|
-
* 关键点(中文)
|
|
218
|
-
* - 同一个 session 在单个 Agent 实例中只会执行一次配置装配。
|
|
219
|
-
* - 默认模型会在首次访问/首次执行前写入当前 session。
|
|
220
|
-
*/
|
|
221
|
-
private applySessionDefaults;
|
|
222
|
-
}
|
|
223
|
-
//# sourceMappingURL=Agent.d.ts.map
|
package/bin/agent/Agent.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.d.ts","sourceRoot":"","sources":["../../src/agent/Agent.ts"],"names":[],"mappings":"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"}
|