@downcity/agent 1.1.74 → 1.1.79
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 +14 -17
- package/bin/agent/{Agent.d.ts → local/Agent.d.ts} +8 -36
- package/bin/agent/local/Agent.d.ts.map +1 -0
- package/bin/agent/{Agent.js → local/Agent.js} +45 -200
- 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 +94 -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/{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 +4 -0
- package/bin/executor/Executor.d.ts.map +1 -1
- package/bin/executor/Executor.js +52 -35
- package/bin/executor/Executor.js.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/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/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/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/index.d.ts +5 -5
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +3 -3
- package/bin/index.js.map +1 -1
- 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.map +1 -1
- package/bin/session/Session.js +2 -1
- package/bin/session/Session.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/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 +134 -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 +8 -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/{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/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/package.json +2 -2
- package/scripts/session-history-inflight.test.mjs +146 -0
- package/src/agent/{Agent.ts → local/Agent.ts} +50 -228
- 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 +173 -0
- package/src/{runtime/host → agent/local}/ProjectSetup.ts +1 -1
- 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 +56 -37
- package/src/executor/composer/history/SessionHistoryWriter.ts +2 -2
- 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/store/history/SessionHistoryStore.ts +15 -0
- package/src/executor/store/history/jsonl/JsonlSessionHistoryStore.ts +164 -11
- package/src/executor/tools/shell/ShellToolFormatting.ts +1 -50
- package/src/executor/types/SessionHistoryPaths.ts +5 -0
- package/src/index.ts +5 -5
- 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 +6 -0
- package/src/session/browse/Browse.ts +29 -10
- package/src/session/index.ts +1 -0
- package/src/session/storage/Paths.ts +19 -0
- package/src/types/agent/AgentOptions.ts +147 -0
- package/src/types/{runtime/host/AgentHost.ts → agent/AgentRuntimeAssembly.ts} +2 -2
- package/src/types/agent/AgentTypes.ts +37 -709
- package/src/types/agent/RemoteAgentOptions.ts +29 -0
- package/src/types/agent/SessionActor.ts +88 -0
- package/src/types/agent/SessionTypes.ts +334 -0
- package/src/types/config/DowncityConfig.ts +1 -1
- package/src/types/{runtime/host → platform}/Store.ts +1 -1
- 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/tsconfig.tsbuildinfo +1 -1
- package/bin/agent/Agent.d.ts.map +0 -1
- 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/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
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control 任务与日志数据 helper。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 聚合 logs 与 task runs 读取逻辑。
|
|
6
|
-
* - 仅负责磁盘侧读取与 control UI 视图映射。
|
|
7
|
-
*/
|
|
8
|
-
import fs from "fs-extra";
|
|
9
|
-
import path from "node:path";
|
|
10
|
-
import { getLogsDirPath, getDowncityTasksDirPath } from "../../config/Paths.js";
|
|
11
|
-
import { truncateText } from "./CommonHelpers.js";
|
|
12
|
-
import { loadSessionMessagesFromFile, toUiMessageTimeline } from "./MessageTimeline.js";
|
|
13
|
-
export const TASK_RUN_DIR_REGEX = /^\d{8}-\d{6}-\d{3}$/;
|
|
14
|
-
const TASK_ID_REGEXP = /^[\p{L}\p{N}][\p{L}\p{N}_\-\s]{0,63}$/u;
|
|
15
|
-
function normalizeTaskId(input) {
|
|
16
|
-
const id = String(input || "").trim();
|
|
17
|
-
if (!TASK_ID_REGEXP.test(id)) {
|
|
18
|
-
throw new Error(`Invalid taskId: "${id}"`);
|
|
19
|
-
}
|
|
20
|
-
return id;
|
|
21
|
-
}
|
|
22
|
-
function deriveTaskIdFromTitle(title) {
|
|
23
|
-
const normalized = String(title || "")
|
|
24
|
-
.normalize("NFKC")
|
|
25
|
-
.replace(/[\\/:\u0000]/g, " ")
|
|
26
|
-
.replace(/[^\p{L}\p{N}_\-\s]/gu, " ")
|
|
27
|
-
.replace(/\s+/g, " ")
|
|
28
|
-
.trim()
|
|
29
|
-
.slice(0, 64)
|
|
30
|
-
.trim();
|
|
31
|
-
return normalizeTaskId(normalized);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* 读取近期日志。
|
|
35
|
-
*/
|
|
36
|
-
export async function readRecentLogs(params) {
|
|
37
|
-
const logsDir = getLogsDirPath(params.projectRoot);
|
|
38
|
-
if (!(await fs.pathExists(logsDir)))
|
|
39
|
-
return [];
|
|
40
|
-
const files = (await fs.readdir(logsDir, { withFileTypes: true }))
|
|
41
|
-
.filter((x) => x.isFile() && x.name.endsWith(".jsonl"))
|
|
42
|
-
.map((x) => x.name)
|
|
43
|
-
.sort()
|
|
44
|
-
.reverse();
|
|
45
|
-
const out = [];
|
|
46
|
-
for (const fileName of files) {
|
|
47
|
-
if (out.length >= params.limit)
|
|
48
|
-
break;
|
|
49
|
-
const abs = path.join(logsDir, fileName);
|
|
50
|
-
const raw = await fs.readFile(abs, "utf-8").catch(() => "");
|
|
51
|
-
const lines = raw.split("\n").filter(Boolean);
|
|
52
|
-
for (let index = lines.length - 1; index >= 0; index -= 1) {
|
|
53
|
-
if (out.length >= params.limit)
|
|
54
|
-
break;
|
|
55
|
-
try {
|
|
56
|
-
const parsed = JSON.parse(lines[index]);
|
|
57
|
-
if (!parsed || typeof parsed !== "object")
|
|
58
|
-
continue;
|
|
59
|
-
out.push({
|
|
60
|
-
...(typeof parsed.timestamp === "string" ? { timestamp: parsed.timestamp } : {}),
|
|
61
|
-
...(typeof parsed.type === "string" ? { type: parsed.type } : {}),
|
|
62
|
-
...(typeof parsed.level === "string" ? { level: parsed.level } : {}),
|
|
63
|
-
...(typeof parsed.message === "string" ? { message: parsed.message } : {}),
|
|
64
|
-
...(parsed.details && typeof parsed.details === "object"
|
|
65
|
-
? { details: parsed.details }
|
|
66
|
-
: {}),
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
// ignore
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return out;
|
|
75
|
-
}
|
|
76
|
-
async function resolveTaskDir(projectRoot, title) {
|
|
77
|
-
const taskId = deriveTaskIdFromTitle(title);
|
|
78
|
-
return path.join(getDowncityTasksDirPath(projectRoot), taskId);
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* 枚举任务运行摘要。
|
|
82
|
-
*/
|
|
83
|
-
export async function listTaskRuns(params) {
|
|
84
|
-
const taskDir = await resolveTaskDir(params.projectRoot, params.title);
|
|
85
|
-
if (!(await fs.pathExists(taskDir)))
|
|
86
|
-
return [];
|
|
87
|
-
const entries = await fs.readdir(taskDir, { withFileTypes: true });
|
|
88
|
-
const timestamps = entries
|
|
89
|
-
.filter((x) => x.isDirectory() && TASK_RUN_DIR_REGEX.test(x.name))
|
|
90
|
-
.map((x) => x.name)
|
|
91
|
-
.sort()
|
|
92
|
-
.reverse()
|
|
93
|
-
.slice(0, params.limit);
|
|
94
|
-
const out = [];
|
|
95
|
-
for (const timestamp of timestamps) {
|
|
96
|
-
const runDir = path.join(taskDir, timestamp);
|
|
97
|
-
const metaPath = path.join(runDir, "run.json");
|
|
98
|
-
const progressPath = path.join(runDir, "run-progress.json");
|
|
99
|
-
const runDirRel = path.relative(params.projectRoot, runDir).split(path.sep).join("/");
|
|
100
|
-
const meta = (await fs.readJson(metaPath).catch(() => null));
|
|
101
|
-
const progress = (await fs.readJson(progressPath).catch(() => null));
|
|
102
|
-
const progressStatus = typeof progress?.status === "string" ? progress.status : undefined;
|
|
103
|
-
const inProgress = progressStatus === "running" ||
|
|
104
|
-
(!meta && (await fs.pathExists(progressPath)));
|
|
105
|
-
const displayStatus = inProgress
|
|
106
|
-
? "running"
|
|
107
|
-
: typeof meta?.status === "string"
|
|
108
|
-
? meta.status
|
|
109
|
-
: progressStatus;
|
|
110
|
-
out.push({
|
|
111
|
-
timestamp,
|
|
112
|
-
...(typeof displayStatus === "string" ? { status: displayStatus } : {}),
|
|
113
|
-
...(typeof meta?.executionStatus === "string" ? { executionStatus: meta.executionStatus } : {}),
|
|
114
|
-
...(typeof meta?.resultStatus === "string" ? { resultStatus: meta.resultStatus } : {}),
|
|
115
|
-
...(inProgress ? { inProgress: true } : {}),
|
|
116
|
-
...(typeof progress?.phase === "string" ? { progressPhase: progress.phase } : {}),
|
|
117
|
-
...(typeof progress?.message === "string" ? { progressMessage: progress.message } : {}),
|
|
118
|
-
...(typeof progress?.updatedAt === "number" ? { progressUpdatedAt: progress.updatedAt } : {}),
|
|
119
|
-
...(typeof progress?.round === "number" ? { progressRound: progress.round } : {}),
|
|
120
|
-
...(typeof progress?.maxRounds === "number" ? { progressMaxRounds: progress.maxRounds } : {}),
|
|
121
|
-
...(typeof meta?.startedAt === "number" ? { startedAt: meta.startedAt } : {}),
|
|
122
|
-
...(typeof meta?.endedAt === "number" ? { endedAt: meta.endedAt } : {}),
|
|
123
|
-
...(typeof meta?.dialogueRounds === "number" ? { dialogueRounds: meta.dialogueRounds } : {}),
|
|
124
|
-
...(typeof meta?.userSimulatorSatisfied === "boolean"
|
|
125
|
-
? { userSimulatorSatisfied: meta.userSimulatorSatisfied }
|
|
126
|
-
: {}),
|
|
127
|
-
...(typeof meta?.error === "string" ? { error: meta.error } : {}),
|
|
128
|
-
runDirRel,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return out;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* 读取任务运行详情。
|
|
135
|
-
*/
|
|
136
|
-
export async function readTaskRunDetail(params) {
|
|
137
|
-
const taskDir = await resolveTaskDir(params.projectRoot, params.title);
|
|
138
|
-
const runDir = path.join(taskDir, params.timestamp);
|
|
139
|
-
if (!(await fs.pathExists(runDir)))
|
|
140
|
-
return null;
|
|
141
|
-
const readText = async (name, maxChars = 80_000) => {
|
|
142
|
-
const abs = path.join(runDir, name);
|
|
143
|
-
if (!(await fs.pathExists(abs)))
|
|
144
|
-
return undefined;
|
|
145
|
-
const raw = await fs.readFile(abs, "utf-8").catch(() => "");
|
|
146
|
-
return truncateText(raw, maxChars);
|
|
147
|
-
};
|
|
148
|
-
const readJson = async (name) => {
|
|
149
|
-
const abs = path.join(runDir, name);
|
|
150
|
-
if (!(await fs.pathExists(abs)))
|
|
151
|
-
return undefined;
|
|
152
|
-
return (await fs.readJson(abs).catch(() => undefined));
|
|
153
|
-
};
|
|
154
|
-
const messagesPath = path.join(runDir, "messages.jsonl");
|
|
155
|
-
const messages = await loadSessionMessagesFromFile(messagesPath);
|
|
156
|
-
const progress = await readJson("run-progress.json");
|
|
157
|
-
const outputText = (await readText("output.md")) || (await readText("result.md"));
|
|
158
|
-
return {
|
|
159
|
-
title: params.title,
|
|
160
|
-
timestamp: params.timestamp,
|
|
161
|
-
runDirRel: path.relative(params.projectRoot, runDir).split(path.sep).join("/"),
|
|
162
|
-
meta: await readJson("run.json"),
|
|
163
|
-
...(progress ? { progress } : {}),
|
|
164
|
-
dialogue: await readJson("dialogue.json"),
|
|
165
|
-
artifacts: {
|
|
166
|
-
input: await readText("input.md"),
|
|
167
|
-
output: outputText,
|
|
168
|
-
result: await readText("result.md"),
|
|
169
|
-
dialogue: await readText("dialogue.md"),
|
|
170
|
-
error: await readText("error.md"),
|
|
171
|
-
},
|
|
172
|
-
messages: messages.slice(-120).flatMap((message) => toUiMessageTimeline(message)),
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=TaskStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskStore.js","sourceRoot":"","sources":["../../../src/runtime/control/TaskStore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAM5E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAExF,MAAM,CAAC,MAAM,kBAAkB,GAAG,qBAAqB,CAAC;AACxD,MAAM,cAAc,GAAG,wCAAwC,CAAC;AAEhE,SAAS,eAAe,CAAC,KAAa;IACpC,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACtC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC7B,MAAM,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,CAAC,SAAS;QAC3B,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9E,IAAI,EAAE,MAAM,QAAQ,CAA0B,UAAU,CAAC;QACzD,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,QAAQ,EAAE,MAAM,QAAQ,CAA0B,eAAe,CAAC;QAClE,SAAS,EAAE;YACT,KAAK,EAAE,MAAM,QAAQ,CAAC,UAAU,CAAC;YACjC,MAAM,EAAE,UAAU;YAClB,MAAM,EAAE,MAAM,QAAQ,CAAC,WAAW,CAAC;YACnC,QAAQ,EAAE,MAAM,QAAQ,CAAC,aAAa,CAAC;YACvC,KAAK,EAAE,MAAM,QAAQ,CAAC,UAAU,CAAC;SAClC;QACD,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;KAClF,CAAC;AACJ,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Auth Control 类型定义。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 统一承载控制面 authorization 页面需要的返回结构。
|
|
6
|
-
* - 这是控制面 UI 数据类型,不属于 auth plugin 内核协议。
|
|
7
|
-
*/
|
|
8
|
-
import type { JsonObject } from "../../../types/common/Json.js";
|
|
9
|
-
/**
|
|
10
|
-
* authorization 页面完整载荷。
|
|
11
|
-
*/
|
|
12
|
-
export interface AuthControlPayload {
|
|
13
|
-
/**
|
|
14
|
-
* 后端提供的授权目录定义。
|
|
15
|
-
*/
|
|
16
|
-
catalog: JsonObject;
|
|
17
|
-
/**
|
|
18
|
-
* 当前静态授权配置。
|
|
19
|
-
*/
|
|
20
|
-
config: JsonObject;
|
|
21
|
-
/**
|
|
22
|
-
* 已观测用户列表。
|
|
23
|
-
*/
|
|
24
|
-
users: JsonObject[];
|
|
25
|
-
/**
|
|
26
|
-
* 已观测会话列表。
|
|
27
|
-
*/
|
|
28
|
-
chats: JsonObject[];
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=AuthControl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthControl.d.ts","sourceRoot":"","sources":["../../../../src/runtime/control/types/AuthControl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AuthControl.js","sourceRoot":"","sources":["../../../../src/runtime/control/types/AuthControl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control Session Execute API 类型定义。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 统一描述 `/api/control/sessions/:sessionId/execute` 的扩展请求体。
|
|
6
|
-
* - 支持通过 API 传入附件(路径或内容),由服务端落盘后注入 `<file>` 标签。
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Control execute 附件类型。
|
|
10
|
-
*/
|
|
11
|
-
export type ControlSessionExecuteAttachmentType = "document" | "photo" | "voice" | "audio" | "video";
|
|
12
|
-
/**
|
|
13
|
-
* Control execute 单个附件入参。
|
|
14
|
-
*/
|
|
15
|
-
export interface ControlSessionExecuteAttachmentInput {
|
|
16
|
-
/**
|
|
17
|
-
* 附件类型。
|
|
18
|
-
*
|
|
19
|
-
* 说明(中文)
|
|
20
|
-
* - 默认按 `document` 处理。
|
|
21
|
-
* - 会映射为 `<file type="...">...</file>`。
|
|
22
|
-
*/
|
|
23
|
-
type?: ControlSessionExecuteAttachmentType | string;
|
|
24
|
-
/**
|
|
25
|
-
* 附件相对路径(相对项目根目录)。
|
|
26
|
-
*
|
|
27
|
-
* 说明(中文)
|
|
28
|
-
* - 当该字段存在时,服务端优先复用该路径。
|
|
29
|
-
* - 仅允许项目目录内路径;越界路径会被忽略。
|
|
30
|
-
*/
|
|
31
|
-
path?: string;
|
|
32
|
-
/**
|
|
33
|
-
* 附件文件名(用于服务端落盘命名)。
|
|
34
|
-
*
|
|
35
|
-
* 说明(中文)
|
|
36
|
-
* - 当通过 `content/contentBase64` 上传附件内容时生效。
|
|
37
|
-
*/
|
|
38
|
-
fileName?: string;
|
|
39
|
-
/**
|
|
40
|
-
* 附件说明(可选)。
|
|
41
|
-
*
|
|
42
|
-
* 说明(中文)
|
|
43
|
-
* - 会映射到 `<file caption="...">`。
|
|
44
|
-
*/
|
|
45
|
-
caption?: string;
|
|
46
|
-
/**
|
|
47
|
-
* 文本内容(UTF-8)。
|
|
48
|
-
*
|
|
49
|
-
* 说明(中文)
|
|
50
|
-
* - 常用于 Markdown 文档直传。
|
|
51
|
-
* - 与 `contentBase64` 二选一,优先使用 `content`。
|
|
52
|
-
*/
|
|
53
|
-
content?: string;
|
|
54
|
-
/**
|
|
55
|
-
* 二进制内容(Base64 编码)。
|
|
56
|
-
*
|
|
57
|
-
* 说明(中文)
|
|
58
|
-
* - 当附件不是纯文本时可使用该字段。
|
|
59
|
-
*/
|
|
60
|
-
contentBase64?: string;
|
|
61
|
-
/**
|
|
62
|
-
* MIME 类型(可选)。
|
|
63
|
-
*
|
|
64
|
-
* 说明(中文)
|
|
65
|
-
* - 仅用于推断落盘扩展名,不参与权限判断。
|
|
66
|
-
*/
|
|
67
|
-
contentType?: string;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Control execute 请求体。
|
|
71
|
-
*/
|
|
72
|
-
export interface ControlSessionExecuteRequestBody {
|
|
73
|
-
/**
|
|
74
|
-
* 用户自然语言指令。
|
|
75
|
-
*/
|
|
76
|
-
instructions: string;
|
|
77
|
-
/**
|
|
78
|
-
* 附件列表(可选)。
|
|
79
|
-
*
|
|
80
|
-
* 说明(中文)
|
|
81
|
-
* - 服务端会将附件落盘后,自动把 `<file>` 标签注入到 user message 顶部。
|
|
82
|
-
*/
|
|
83
|
-
attachments?: ControlSessionExecuteAttachmentInput[];
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=ControlSessionExecute.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlSessionExecute.d.ts","sourceRoot":"","sources":["../../../../src/runtime/control/types/ControlSessionExecute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,MAAM,MAAM,mCAAmC,GAC3C,UAAU,GACV,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,CAAC;AAEZ;;GAEG;AACH,MAAM,WAAW,oCAAoC;IACnD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,mCAAmC,GAAG,MAAM,CAAC;IAEpD;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,oCAAoC,EAAE,CAAC;CACtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlSessionExecute.js","sourceRoot":"","sources":["../../../../src/runtime/control/types/ControlSessionExecute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Control UI 数据视图类型定义。
|
|
3
|
-
*
|
|
4
|
-
* 关键点(中文)
|
|
5
|
-
* - 统一承载 single-agent control API 的内部视图数据结构。
|
|
6
|
-
* - 仅描述 control UI 所需的投影视图,不包含底层上下文原始协议类型。
|
|
7
|
-
*/
|
|
8
|
-
import type { JsonObject } from "../../../types/common/Json.js";
|
|
9
|
-
/**
|
|
10
|
-
* Control 时间线消息角色。
|
|
11
|
-
*/
|
|
12
|
-
export type ControlTimelineRole = "user" | "assistant" | "tool-call" | "tool-result" | "system";
|
|
13
|
-
/**
|
|
14
|
-
* Control 时间线事件。
|
|
15
|
-
*/
|
|
16
|
-
export interface ControlTimelineEvent {
|
|
17
|
-
/**
|
|
18
|
-
* 事件唯一标识。
|
|
19
|
-
*/
|
|
20
|
-
id: string;
|
|
21
|
-
/**
|
|
22
|
-
* 事件角色。
|
|
23
|
-
*/
|
|
24
|
-
role: ControlTimelineRole;
|
|
25
|
-
/**
|
|
26
|
-
* 事件时间戳(毫秒)。
|
|
27
|
-
*/
|
|
28
|
-
ts?: number;
|
|
29
|
-
/**
|
|
30
|
-
* 事件类型。
|
|
31
|
-
*/
|
|
32
|
-
kind?: string;
|
|
33
|
-
/**
|
|
34
|
-
* 事件来源。
|
|
35
|
-
*/
|
|
36
|
-
source?: string;
|
|
37
|
-
/**
|
|
38
|
-
* 展示文本。
|
|
39
|
-
*/
|
|
40
|
-
text: string;
|
|
41
|
-
/**
|
|
42
|
-
* 工具名称。
|
|
43
|
-
*/
|
|
44
|
-
toolName?: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Control 会话摘要。
|
|
48
|
-
*/
|
|
49
|
-
export interface ControlSessionSummary {
|
|
50
|
-
/**
|
|
51
|
-
* 会话 ID。
|
|
52
|
-
*
|
|
53
|
-
* 说明(中文)
|
|
54
|
-
* - 对内对外统一使用 `sessionId` 语义。
|
|
55
|
-
*/
|
|
56
|
-
sessionId: string;
|
|
57
|
-
/**
|
|
58
|
-
* 消息数量。
|
|
59
|
-
*/
|
|
60
|
-
messageCount: number;
|
|
61
|
-
/**
|
|
62
|
-
* 最后更新时间(毫秒)。
|
|
63
|
-
*/
|
|
64
|
-
updatedAt?: number;
|
|
65
|
-
/**
|
|
66
|
-
* 最后一条消息角色。
|
|
67
|
-
*/
|
|
68
|
-
lastRole?: "user" | "assistant" | "system";
|
|
69
|
-
/**
|
|
70
|
-
* 最后一条消息摘要。
|
|
71
|
-
*/
|
|
72
|
-
lastText?: string;
|
|
73
|
-
/**
|
|
74
|
-
* 渠道名。
|
|
75
|
-
*/
|
|
76
|
-
channel?: string;
|
|
77
|
-
/**
|
|
78
|
-
* 聊天对象 id。
|
|
79
|
-
*/
|
|
80
|
-
chatId?: string;
|
|
81
|
-
/**
|
|
82
|
-
* 聊天标题。
|
|
83
|
-
*/
|
|
84
|
-
chatTitle?: string;
|
|
85
|
-
/**
|
|
86
|
-
* 聊天类型。
|
|
87
|
-
*/
|
|
88
|
-
chatType?: string;
|
|
89
|
-
/**
|
|
90
|
-
* 线程 id。
|
|
91
|
-
*/
|
|
92
|
-
threadId?: number;
|
|
93
|
-
/**
|
|
94
|
-
* 当前 session 是否正在执行。
|
|
95
|
-
*/
|
|
96
|
-
executing?: boolean;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Control 日志项。
|
|
100
|
-
*/
|
|
101
|
-
export interface ControlLogEntry {
|
|
102
|
-
/**
|
|
103
|
-
* 日志时间。
|
|
104
|
-
*/
|
|
105
|
-
timestamp?: string;
|
|
106
|
-
/**
|
|
107
|
-
* 日志类型。
|
|
108
|
-
*/
|
|
109
|
-
type?: string;
|
|
110
|
-
/**
|
|
111
|
-
* 日志级别。
|
|
112
|
-
*/
|
|
113
|
-
level?: string;
|
|
114
|
-
/**
|
|
115
|
-
* 日志消息。
|
|
116
|
-
*/
|
|
117
|
-
message?: string;
|
|
118
|
-
/**
|
|
119
|
-
* 结构化详情。
|
|
120
|
-
*/
|
|
121
|
-
details?: JsonObject;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Control 任务运行摘要。
|
|
125
|
-
*/
|
|
126
|
-
export interface ControlTaskRunSummary {
|
|
127
|
-
/**
|
|
128
|
-
* 运行时间戳目录名。
|
|
129
|
-
*/
|
|
130
|
-
timestamp: string;
|
|
131
|
-
/**
|
|
132
|
-
* 综合状态。
|
|
133
|
-
*/
|
|
134
|
-
status?: string;
|
|
135
|
-
/**
|
|
136
|
-
* 执行状态。
|
|
137
|
-
*/
|
|
138
|
-
executionStatus?: string;
|
|
139
|
-
/**
|
|
140
|
-
* 结果状态。
|
|
141
|
-
*/
|
|
142
|
-
resultStatus?: string;
|
|
143
|
-
/**
|
|
144
|
-
* 是否仍在运行。
|
|
145
|
-
*/
|
|
146
|
-
inProgress?: boolean;
|
|
147
|
-
/**
|
|
148
|
-
* 当前阶段。
|
|
149
|
-
*/
|
|
150
|
-
progressPhase?: string;
|
|
151
|
-
/**
|
|
152
|
-
* 进度消息。
|
|
153
|
-
*/
|
|
154
|
-
progressMessage?: string;
|
|
155
|
-
/**
|
|
156
|
-
* 进度更新时间。
|
|
157
|
-
*/
|
|
158
|
-
progressUpdatedAt?: number;
|
|
159
|
-
/**
|
|
160
|
-
* 当前轮次。
|
|
161
|
-
*/
|
|
162
|
-
progressRound?: number;
|
|
163
|
-
/**
|
|
164
|
-
* 最大轮次。
|
|
165
|
-
*/
|
|
166
|
-
progressMaxRounds?: number;
|
|
167
|
-
/**
|
|
168
|
-
* 开始时间。
|
|
169
|
-
*/
|
|
170
|
-
startedAt?: number;
|
|
171
|
-
/**
|
|
172
|
-
* 结束时间。
|
|
173
|
-
*/
|
|
174
|
-
endedAt?: number;
|
|
175
|
-
/**
|
|
176
|
-
* 对话轮数。
|
|
177
|
-
*/
|
|
178
|
-
dialogueRounds?: number;
|
|
179
|
-
/**
|
|
180
|
-
* user simulator 是否满意。
|
|
181
|
-
*/
|
|
182
|
-
userSimulatorSatisfied?: boolean;
|
|
183
|
-
/**
|
|
184
|
-
* 错误消息。
|
|
185
|
-
*/
|
|
186
|
-
error?: string;
|
|
187
|
-
/**
|
|
188
|
-
* 相对项目根目录的运行目录路径。
|
|
189
|
-
*/
|
|
190
|
-
runDirRel: string;
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Control 任务运行详情。
|
|
194
|
-
*/
|
|
195
|
-
export interface ControlTaskRunDetail {
|
|
196
|
-
/**
|
|
197
|
-
* 任务标题。
|
|
198
|
-
*/
|
|
199
|
-
title: string;
|
|
200
|
-
/**
|
|
201
|
-
* 运行时间戳目录名。
|
|
202
|
-
*/
|
|
203
|
-
timestamp: string;
|
|
204
|
-
/**
|
|
205
|
-
* 相对项目根目录的运行目录路径。
|
|
206
|
-
*/
|
|
207
|
-
runDirRel: string;
|
|
208
|
-
/**
|
|
209
|
-
* 运行元数据。
|
|
210
|
-
*/
|
|
211
|
-
meta?: Record<string, unknown>;
|
|
212
|
-
/**
|
|
213
|
-
* 运行进度快照。
|
|
214
|
-
*/
|
|
215
|
-
progress?: {
|
|
216
|
-
/**
|
|
217
|
-
* 进度状态。
|
|
218
|
-
*/
|
|
219
|
-
status?: string;
|
|
220
|
-
/**
|
|
221
|
-
* 当前阶段。
|
|
222
|
-
*/
|
|
223
|
-
phase?: string;
|
|
224
|
-
/**
|
|
225
|
-
* 进度消息。
|
|
226
|
-
*/
|
|
227
|
-
message?: string;
|
|
228
|
-
/**
|
|
229
|
-
* 开始时间。
|
|
230
|
-
*/
|
|
231
|
-
startedAt?: number;
|
|
232
|
-
/**
|
|
233
|
-
* 更新时间。
|
|
234
|
-
*/
|
|
235
|
-
updatedAt?: number;
|
|
236
|
-
/**
|
|
237
|
-
* 结束时间。
|
|
238
|
-
*/
|
|
239
|
-
endedAt?: number;
|
|
240
|
-
/**
|
|
241
|
-
* 当前轮次。
|
|
242
|
-
*/
|
|
243
|
-
round?: number;
|
|
244
|
-
/**
|
|
245
|
-
* 最大轮次。
|
|
246
|
-
*/
|
|
247
|
-
maxRounds?: number;
|
|
248
|
-
/**
|
|
249
|
-
* 运行状态。
|
|
250
|
-
*/
|
|
251
|
-
runStatus?: string;
|
|
252
|
-
/**
|
|
253
|
-
* 执行状态。
|
|
254
|
-
*/
|
|
255
|
-
executionStatus?: string;
|
|
256
|
-
/**
|
|
257
|
-
* 结果状态。
|
|
258
|
-
*/
|
|
259
|
-
resultStatus?: string;
|
|
260
|
-
/**
|
|
261
|
-
* 进度事件列表。
|
|
262
|
-
*/
|
|
263
|
-
events?: Array<{
|
|
264
|
-
/**
|
|
265
|
-
* 事件时间。
|
|
266
|
-
*/
|
|
267
|
-
at?: number;
|
|
268
|
-
/**
|
|
269
|
-
* 阶段。
|
|
270
|
-
*/
|
|
271
|
-
phase?: string;
|
|
272
|
-
/**
|
|
273
|
-
* 消息。
|
|
274
|
-
*/
|
|
275
|
-
message?: string;
|
|
276
|
-
/**
|
|
277
|
-
* 轮次。
|
|
278
|
-
*/
|
|
279
|
-
round?: number;
|
|
280
|
-
/**
|
|
281
|
-
* 最大轮次。
|
|
282
|
-
*/
|
|
283
|
-
maxRounds?: number;
|
|
284
|
-
}>;
|
|
285
|
-
};
|
|
286
|
-
/**
|
|
287
|
-
* 对话产物。
|
|
288
|
-
*/
|
|
289
|
-
dialogue?: Record<string, unknown>;
|
|
290
|
-
/**
|
|
291
|
-
* 产物文件摘要。
|
|
292
|
-
*/
|
|
293
|
-
artifacts: {
|
|
294
|
-
/**
|
|
295
|
-
* 输入文档内容。
|
|
296
|
-
*/
|
|
297
|
-
input?: string;
|
|
298
|
-
/**
|
|
299
|
-
* 输出文档内容。
|
|
300
|
-
*/
|
|
301
|
-
output?: string;
|
|
302
|
-
/**
|
|
303
|
-
* 结果文档内容。
|
|
304
|
-
*/
|
|
305
|
-
result?: string;
|
|
306
|
-
/**
|
|
307
|
-
* 对话文档内容。
|
|
308
|
-
*/
|
|
309
|
-
dialogue?: string;
|
|
310
|
-
/**
|
|
311
|
-
* 错误文档内容。
|
|
312
|
-
*/
|
|
313
|
-
error?: string;
|
|
314
|
-
};
|
|
315
|
-
/**
|
|
316
|
-
* 运行消息时间线。
|
|
317
|
-
*/
|
|
318
|
-
messages: ControlTimelineEvent[];
|
|
319
|
-
}
|
|
320
|
-
//# sourceMappingURL=ControlViewData.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlViewData.d.ts","sourceRoot":"","sources":["../../../../src/runtime/control/types/ControlViewData.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,WAAW,GACX,WAAW,GACX,aAAa,GACb,QAAQ,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC;IAE1B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG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M,CAAC;QAEtB;;WAEG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC;YACb;;eAEG;YACH,EAAE,CAAC,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,OAAO,CAAC,EAAE,MAAM,CAAC;YAEjB;;eAEG;YACH,KAAK,CAAC,EAAE,MAAM,CAAC;YAEf;;eAEG;YACH,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC,CAAC;KACJ,CAAC;IAEF;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF;;OAEG;IACH,QAAQ,EAAE,oBAAoB,EAAE,CAAC;CAClC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ControlViewData.js","sourceRoot":"","sources":["../../../../src/runtime/control/types/ControlViewData.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|