@downcity/agent 1.1.14 → 1.1.17
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 +126 -635
- package/bin/config/Config.js +1 -1
- package/bin/config/Config.js.map +1 -1
- package/bin/config/Defaults.d.ts +13 -0
- package/bin/config/Defaults.d.ts.map +1 -0
- package/bin/config/{DowncityDefault.js → Defaults.js} +11 -1
- package/bin/config/Defaults.js.map +1 -0
- package/bin/{project/ProjectExecutionBinding.d.ts → config/ExecutionBinding.d.ts} +2 -2
- package/bin/config/ExecutionBinding.d.ts.map +1 -0
- package/bin/{project/ProjectExecutionBinding.js → config/ExecutionBinding.js} +2 -2
- package/bin/config/ExecutionBinding.js.map +1 -0
- package/bin/{project → config/project}/AgentInitializer.d.ts +2 -2
- package/bin/config/project/AgentInitializer.d.ts.map +1 -0
- package/bin/{project → config/project}/AgentInitializer.js +7 -7
- package/bin/config/project/AgentInitializer.js.map +1 -0
- package/bin/{project → config/project}/types/AgentProject.d.ts +2 -2
- package/bin/config/project/types/AgentProject.d.ts.map +1 -0
- package/bin/config/project/types/AgentProject.js.map +1 -0
- package/bin/core/AgentContextTypes.d.ts +9 -71
- package/bin/core/AgentContextTypes.d.ts.map +1 -1
- package/bin/core/AgentCore.d.ts.map +1 -1
- package/bin/core/AgentCore.js +6 -3
- package/bin/core/AgentCore.js.map +1 -1
- package/bin/core/AgentCoreTypes.d.ts +1 -6
- package/bin/core/AgentCoreTypes.d.ts.map +1 -1
- package/bin/index.d.ts +25 -25
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +12 -13
- package/bin/index.js.map +1 -1
- package/bin/plugin/builtins/asr/Config.d.ts +1 -1
- package/bin/plugin/builtins/asr/Config.d.ts.map +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.d.ts +1 -1
- package/bin/plugin/builtins/auth/runtime/AuthorizationPolicy.d.ts.map +1 -1
- package/bin/plugin/builtins/voice/Config.d.ts +1 -1
- package/bin/plugin/builtins/voice/Config.d.ts.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.js +1 -1
- package/bin/plugin/builtins/workboard/runtime/Collector.js.map +1 -1
- package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts +1 -1
- package/bin/plugin/builtins/workboard/runtime/Normalizer.d.ts.map +1 -1
- package/bin/plugin/core/HttpRoutes.d.ts +1 -1
- package/bin/plugin/core/HttpRoutes.d.ts.map +1 -1
- package/bin/plugin/core/LocalExecution.js +1 -1
- package/bin/plugin/core/PluginManager.js +1 -1
- package/bin/plugin/types/Plugin.d.ts +2 -2
- package/bin/plugin/types/Plugin.d.ts.map +1 -1
- package/bin/{host/runtime → runtime/host}/AgentHostRuntime.d.ts +1 -1
- package/bin/{host/runtime → runtime/host}/AgentHostRuntime.d.ts.map +1 -1
- package/bin/{host/runtime → runtime/host}/AgentHostRuntime.js.map +1 -1
- package/bin/{host/runtime → runtime/host}/PluginRuntime.d.ts.map +1 -1
- package/bin/{host/runtime → runtime/host}/PluginRuntime.js.map +1 -1
- package/bin/{host → runtime/host}/daemon/Api.d.ts +1 -1
- package/bin/runtime/host/daemon/Api.d.ts.map +1 -0
- package/bin/runtime/host/daemon/Api.js.map +1 -0
- package/bin/runtime/host/daemon/Client.d.ts.map +1 -0
- package/bin/{host → runtime/host}/daemon/Client.js +2 -2
- package/bin/runtime/host/daemon/Client.js.map +1 -0
- package/bin/runtime/host/daemon/Paths.d.ts.map +1 -0
- package/bin/{host → runtime/host}/daemon/Paths.js +2 -2
- package/bin/runtime/host/daemon/Paths.js.map +1 -0
- package/bin/{host → runtime/host}/daemon/ProjectSetup.d.ts +1 -1
- package/bin/runtime/host/daemon/ProjectSetup.d.ts.map +1 -0
- package/bin/{host → runtime/host}/daemon/ProjectSetup.js +3 -3
- package/bin/runtime/host/daemon/ProjectSetup.js.map +1 -0
- package/bin/{sandbox → runtime/sandbox}/MacOsSeatbeltSandbox.d.ts +1 -1
- package/bin/runtime/sandbox/MacOsSeatbeltSandbox.d.ts.map +1 -0
- package/bin/runtime/sandbox/MacOsSeatbeltSandbox.js.map +1 -0
- package/bin/{sandbox → runtime/sandbox}/SandboxConfigResolver.d.ts +2 -2
- package/bin/runtime/sandbox/SandboxConfigResolver.d.ts.map +1 -0
- package/bin/runtime/sandbox/SandboxConfigResolver.js.map +1 -0
- package/bin/{sandbox → runtime/sandbox}/SandboxRunner.d.ts +2 -2
- package/bin/runtime/sandbox/SandboxRunner.d.ts.map +1 -0
- package/bin/{sandbox → runtime/sandbox}/SandboxRunner.js +2 -2
- package/bin/runtime/sandbox/SandboxRunner.js.map +1 -0
- package/bin/runtime/sandbox/types/Sandbox.d.ts.map +1 -0
- package/bin/runtime/sandbox/types/Sandbox.js.map +1 -0
- package/bin/{sandbox → runtime/sandbox}/types/SandboxRuntime.d.ts +2 -2
- package/bin/runtime/sandbox/types/SandboxRuntime.d.ts.map +1 -0
- package/bin/runtime/sandbox/types/SandboxRuntime.js.map +1 -0
- package/bin/{server → runtime/server}/http/Server.d.ts +3 -3
- package/bin/runtime/server/http/Server.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/Server.js +8 -8
- package/bin/runtime/server/http/Server.js.map +1 -0
- package/bin/runtime/server/http/auth/AuthEnv.d.ts.map +1 -0
- package/bin/runtime/server/http/auth/AuthEnv.js.map +1 -0
- package/bin/runtime/server/http/auth/AuthError.d.ts.map +1 -0
- package/bin/runtime/server/http/auth/AuthError.js.map +1 -0
- package/bin/runtime/server/http/auth/CliAuthStateStore.d.ts.map +1 -0
- package/bin/runtime/server/http/auth/CliAuthStateStore.js.map +1 -0
- package/bin/runtime/server/http/auth/PasswordHasher.d.ts.map +1 -0
- package/bin/runtime/server/http/auth/PasswordHasher.js.map +1 -0
- package/bin/runtime/server/http/auth/TokenService.d.ts.map +1 -0
- package/bin/runtime/server/http/auth/TokenService.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/AuthControlService.d.ts +3 -3
- package/bin/runtime/server/http/control/AuthControlService.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/AuthControlService.js +1 -1
- package/bin/runtime/server/http/control/AuthControlService.js.map +1 -0
- package/bin/runtime/server/http/control/CommonHelpers.d.ts.map +1 -0
- package/bin/runtime/server/http/control/CommonHelpers.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlApiRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/ControlApiRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlApiRoutes.js +5 -5
- package/bin/runtime/server/http/control/ControlApiRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlAuthorizationRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/ControlAuthorizationRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlAuthorizationRoutes.js +3 -3
- package/bin/runtime/server/http/control/ControlAuthorizationRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlRouter.d.ts +2 -2
- package/bin/runtime/server/http/control/ControlRouter.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ControlRouter.js +1 -1
- package/bin/runtime/server/http/control/ControlRouter.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ExecuteBySession.d.ts +4 -4
- package/bin/runtime/server/http/control/ExecuteBySession.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ExecuteBySession.js +6 -6
- package/bin/runtime/server/http/control/ExecuteBySession.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ExecuteInput.d.ts +1 -1
- package/bin/runtime/server/http/control/ExecuteInput.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ExecuteInput.js +2 -2
- package/bin/runtime/server/http/control/ExecuteInput.js.map +1 -0
- package/bin/runtime/server/http/control/Helpers.d.ts.map +1 -0
- package/bin/runtime/server/http/control/Helpers.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/MessageTimeline.d.ts +2 -2
- package/bin/runtime/server/http/control/MessageTimeline.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/MessageTimeline.js +2 -2
- package/bin/runtime/server/http/control/MessageTimeline.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/ModelRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/ModelRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/ModelRoutes.js +2 -2
- package/bin/runtime/server/http/control/ModelRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/OverviewRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/OverviewRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/OverviewRoutes.js +2 -2
- package/bin/runtime/server/http/control/OverviewRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/SessionRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/SessionRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/SessionRoutes.js +2 -2
- package/bin/runtime/server/http/control/SessionRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/SessionSummaryStore.d.ts +2 -2
- package/bin/runtime/server/http/control/SessionSummaryStore.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/SessionSummaryStore.js +2 -2
- package/bin/runtime/server/http/control/SessionSummaryStore.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/TaskRoutes.d.ts +1 -1
- package/bin/runtime/server/http/control/TaskRoutes.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/TaskRoutes.js +4 -4
- package/bin/runtime/server/http/control/TaskRoutes.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/TaskStore.d.ts +1 -1
- package/bin/runtime/server/http/control/TaskStore.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/control/TaskStore.js +2 -2
- package/bin/runtime/server/http/control/TaskStore.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/types/AuthControl.d.ts +1 -1
- package/bin/runtime/server/http/control/types/AuthControl.d.ts.map +1 -0
- package/bin/runtime/server/http/control/types/AuthControl.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/types/ControlRoutes.d.ts +2 -2
- package/bin/runtime/server/http/control/types/ControlRoutes.d.ts.map +1 -0
- package/bin/runtime/server/http/control/types/ControlRoutes.js.map +1 -0
- package/bin/runtime/server/http/control/types/ControlSessionExecute.d.ts.map +1 -0
- package/bin/runtime/server/http/control/types/ControlSessionExecute.js.map +1 -0
- package/bin/{server → runtime/server}/http/control/types/ControlViewData.d.ts +1 -1
- package/bin/runtime/server/http/control/types/ControlViewData.d.ts.map +1 -0
- package/bin/runtime/server/http/control/types/ControlViewData.js.map +1 -0
- package/bin/{server → runtime/server}/http/execute/execute.d.ts +1 -1
- package/bin/runtime/server/http/execute/execute.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/execute/execute.js +2 -2
- package/bin/runtime/server/http/execute/execute.js.map +1 -0
- package/bin/runtime/server/http/health/health.d.ts.map +1 -0
- package/bin/runtime/server/http/health/health.js.map +1 -0
- package/bin/{server → runtime/server}/http/plugins/plugins.d.ts +1 -1
- package/bin/runtime/server/http/plugins/plugins.d.ts.map +1 -0
- package/bin/runtime/server/http/plugins/plugins.js.map +1 -0
- package/bin/{server → runtime/server}/http/services/services.d.ts +1 -1
- package/bin/runtime/server/http/services/services.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/services/services.js +2 -2
- package/bin/runtime/server/http/services/services.js.map +1 -0
- package/bin/{server → runtime/server}/http/static/static.d.ts +1 -1
- package/bin/runtime/server/http/static/static.d.ts.map +1 -0
- package/bin/{server → runtime/server}/http/static/static.js +1 -1
- package/bin/runtime/server/http/static/static.js.map +1 -0
- package/bin/{server → runtime/server}/rpc/Server.d.ts +4 -4
- package/bin/runtime/server/rpc/Server.d.ts.map +1 -0
- package/bin/{server → runtime/server}/rpc/Server.js +5 -5
- package/bin/runtime/server/rpc/Server.js.map +1 -0
- package/bin/{transport → runtime/transport}/rpc/Client.d.ts +1 -1
- package/bin/runtime/transport/rpc/Client.d.ts.map +1 -0
- package/bin/runtime/transport/rpc/Client.js.map +1 -0
- package/bin/runtime/transport/rpc/Paths.d.ts.map +1 -0
- package/bin/runtime/transport/rpc/Paths.js.map +1 -0
- package/bin/{transport → runtime/transport}/rpc/Transport.d.ts +1 -1
- package/bin/runtime/transport/rpc/Transport.d.ts.map +1 -0
- package/bin/{transport → runtime/transport}/rpc/Transport.js +1 -1
- package/bin/runtime/transport/rpc/Transport.js.map +1 -0
- package/bin/sdk/Agent.d.ts +19 -5
- package/bin/sdk/Agent.d.ts.map +1 -1
- package/bin/sdk/Agent.js +71 -13
- package/bin/sdk/Agent.js.map +1 -1
- package/bin/sdk/AgentSdkTypes.d.ts +3 -3
- package/bin/sdk/AgentSdkTypes.d.ts.map +1 -1
- package/bin/sdk/RemoteAgent.d.ts +1 -1
- package/bin/sdk/RemoteAgent.js +1 -1
- package/bin/sdk/Session.d.ts +2 -1
- package/bin/sdk/Session.d.ts.map +1 -1
- package/bin/sdk/Session.js +17 -11
- package/bin/sdk/Session.js.map +1 -1
- package/bin/sdk/SessionSystemBuilder.d.ts +2 -2
- package/bin/sdk/SessionSystemBuilder.d.ts.map +1 -1
- package/bin/sdk/SessionSystemBuilder.js +1 -3
- package/bin/sdk/SessionSystemBuilder.js.map +1 -1
- package/bin/sdk/{SessionMetadata.d.ts → session/Metadata.d.ts} +2 -2
- package/bin/sdk/session/Metadata.d.ts.map +1 -0
- package/bin/sdk/{SessionMetadata.js → session/Metadata.js} +2 -2
- package/bin/sdk/session/Metadata.js.map +1 -0
- package/bin/sdk/{Paths.d.ts → session/Paths.d.ts} +1 -1
- package/bin/sdk/session/Paths.d.ts.map +1 -0
- package/bin/sdk/{Paths.js → session/Paths.js} +1 -1
- package/bin/sdk/session/Paths.js.map +1 -0
- package/bin/sdk/{SessionPersistence.d.ts → session/Persistence.d.ts} +3 -3
- package/bin/sdk/session/Persistence.d.ts.map +1 -0
- package/bin/sdk/{SessionPersistence.js → session/Persistence.js} +4 -4
- package/bin/sdk/session/Persistence.js.map +1 -0
- package/bin/sdk/{SessionServicePort.d.ts → session/ServicePort.d.ts} +5 -4
- package/bin/sdk/session/ServicePort.d.ts.map +1 -0
- package/bin/sdk/{SessionServicePort.js → session/ServicePort.js} +2 -2
- package/bin/sdk/session/ServicePort.js.map +1 -0
- package/bin/sdk/session/index.d.ts +12 -0
- package/bin/sdk/session/index.d.ts.map +1 -0
- package/bin/sdk/session/index.js +12 -0
- package/bin/sdk/session/index.js.map +1 -0
- package/bin/service/builtins/chat/ChatService.d.ts +1 -1
- package/bin/service/builtins/chat/ChatService.d.ts.map +1 -1
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts +1 -1
- package/bin/service/builtins/chat/ChatServiceTypes.d.ts.map +1 -1
- package/bin/service/builtins/chat/accounts/ChannelAccountService.d.ts +1 -1
- package/bin/service/builtins/chat/accounts/ChannelAccountService.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelConfig.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts +1 -1
- package/bin/service/builtins/chat/runtime/ChatChannelCore.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatSession.d.ts +10 -5
- package/bin/service/builtins/chat/runtime/ChatSession.d.ts.map +1 -1
- package/bin/service/builtins/chat/runtime/ChatSession.js +6 -5
- package/bin/service/builtins/chat/runtime/ChatSession.js.map +1 -1
- package/bin/service/builtins/chat/runtime/{ChatSessionExecutionComposer.d.ts → ChatSessionContextComposer.d.ts} +7 -7
- package/bin/service/builtins/chat/runtime/ChatSessionContextComposer.d.ts.map +1 -0
- package/bin/service/builtins/chat/runtime/{ChatSessionExecutionComposer.js → ChatSessionContextComposer.js} +5 -5
- package/bin/service/builtins/chat/runtime/ChatSessionContextComposer.js.map +1 -0
- package/bin/service/builtins/chat/types/ChannelAccount.d.ts +1 -1
- package/bin/service/builtins/chat/types/ChannelAccount.d.ts.map +1 -1
- package/bin/service/builtins/memory/runtime/Flush.js +3 -3
- package/bin/service/builtins/memory/runtime/Flush.js.map +1 -1
- package/bin/service/builtins/schedule/ScheduleService.d.ts.map +1 -1
- package/bin/service/builtins/schedule/ScheduleService.js +2 -2
- package/bin/service/builtins/schedule/ScheduleService.js.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.js +1 -1
- package/bin/service/builtins/shell/runtime/ShellActionRuntime.js.map +1 -1
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js +1 -1
- package/bin/service/builtins/shell/runtime/ShellRuntimeEnvironment.js.map +1 -1
- package/bin/service/builtins/task/runtime/Runner.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/Runner.js +5 -0
- package/bin/service/builtins/task/runtime/Runner.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerRound.js +2 -2
- package/bin/service/builtins/task/runtime/TaskRunnerRound.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts +7 -4
- package/bin/service/builtins/task/runtime/TaskRunnerSession.d.ts.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerSession.js +39 -24
- package/bin/service/builtins/task/runtime/TaskRunnerSession.js.map +1 -1
- package/bin/service/builtins/task/runtime/TaskRunnerTypes.d.ts +4 -4
- package/bin/service/builtins/task/runtime/TaskRunnerTypes.d.ts.map +1 -1
- package/bin/service/core/ServiceActionRunner.js +2 -2
- package/bin/service/core/ServiceActionRunner.js.map +1 -1
- package/bin/service/core/ServiceCommandRequest.js +1 -1
- package/bin/service/core/ServiceCommandRequest.js.map +1 -1
- package/bin/service/{schedule → core/schedule}/Executor.d.ts +2 -2
- package/bin/service/core/schedule/Executor.d.ts.map +1 -0
- package/bin/service/{schedule → core/schedule}/Executor.js +1 -1
- package/bin/service/core/schedule/Executor.js.map +1 -0
- package/bin/service/{schedule → core/schedule}/Store.d.ts +1 -1
- package/bin/service/core/schedule/Store.d.ts.map +1 -0
- package/bin/service/{schedule → core/schedule}/Store.js +2 -2
- package/bin/service/core/schedule/Store.js.map +1 -0
- package/bin/service/core/schedule/Time.d.ts.map +1 -0
- package/bin/service/core/schedule/Time.js.map +1 -0
- package/bin/service/types/Service.d.ts +1 -1
- package/bin/service/types/Service.js +1 -1
- package/bin/session/Executor.d.ts +50 -17
- package/bin/session/Executor.d.ts.map +1 -1
- package/bin/session/Executor.js +366 -44
- package/bin/session/Executor.js.map +1 -1
- package/bin/session/composer/compaction/SessionCompactionComposer.d.ts +11 -12
- package/bin/session/composer/compaction/SessionCompactionComposer.d.ts.map +1 -1
- package/bin/session/composer/compaction/SessionCompactionComposer.js +2 -7
- package/bin/session/composer/compaction/SessionCompactionComposer.js.map +1 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.d.ts +3 -4
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.d.ts.map +1 -1
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.js +3 -5
- package/bin/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.js.map +1 -1
- package/bin/session/composer/{execution/LocalSessionExecutionComposer.d.ts → context/LocalSessionContextComposer.d.ts} +10 -11
- package/bin/session/composer/context/LocalSessionContextComposer.d.ts.map +1 -0
- package/bin/session/composer/{execution/LocalSessionExecutionComposer.js → context/LocalSessionContextComposer.js} +8 -10
- package/bin/session/composer/context/LocalSessionContextComposer.js.map +1 -0
- package/bin/session/composer/{execution/SessionExecutionComposer.d.ts → context/SessionContextComposer.d.ts} +14 -15
- package/bin/session/composer/context/SessionContextComposer.d.ts.map +1 -0
- package/bin/session/composer/context/SessionContextComposer.js +9 -0
- package/bin/session/composer/context/SessionContextComposer.js.map +1 -0
- package/bin/session/composer/history/SessionHistoryComposer.d.ts +9 -111
- package/bin/session/composer/history/SessionHistoryComposer.d.ts.map +1 -1
- package/bin/session/composer/history/SessionHistoryComposer.js +3 -7
- package/bin/session/composer/history/SessionHistoryComposer.js.map +1 -1
- package/bin/session/composer/history/SessionHistoryWriter.d.ts +5 -5
- package/bin/session/composer/history/SessionHistoryWriter.d.ts.map +1 -1
- package/bin/session/composer/history/SessionHistoryWriter.js +10 -10
- package/bin/session/composer/history/SessionHistoryWriter.js.map +1 -1
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts +21 -54
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.d.ts.map +1 -1
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.js +16 -367
- package/bin/session/composer/history/jsonl/JsonlSessionHistoryComposer.js.map +1 -1
- package/bin/session/composer/system/SessionSystemComposer.d.ts +5 -6
- package/bin/session/composer/system/SessionSystemComposer.d.ts.map +1 -1
- package/bin/session/composer/system/SessionSystemComposer.js +2 -7
- package/bin/session/composer/system/SessionSystemComposer.js.map +1 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts +2 -2
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.d.ts.map +1 -1
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.js +1 -3
- package/bin/session/composer/system/default/DefaultSessionSystemComposer.js.map +1 -1
- package/bin/session/{executors/local/SessionExecutionError.d.ts → core-engine/CoreEngineError.d.ts} +5 -5
- package/bin/session/core-engine/CoreEngineError.d.ts.map +1 -0
- package/bin/session/{executors/local/SessionExecutionError.js → core-engine/CoreEngineError.js} +4 -4
- package/bin/session/core-engine/CoreEngineError.js.map +1 -0
- package/bin/session/{executors/local/SessionLoopDecision.d.ts → core-engine/CoreEngineLoopDecision.d.ts} +6 -6
- package/bin/session/core-engine/CoreEngineLoopDecision.d.ts.map +1 -0
- package/bin/session/{executors/local/SessionLoopDecision.js → core-engine/CoreEngineLoopDecision.js} +5 -5
- package/bin/session/core-engine/CoreEngineLoopDecision.js.map +1 -0
- package/bin/session/{executors/local/SessionModelMessageState.d.ts → core-engine/CoreEngineMessageState.d.ts} +7 -7
- package/bin/session/core-engine/CoreEngineMessageState.d.ts.map +1 -0
- package/bin/session/{executors/local/SessionModelMessageState.js → core-engine/CoreEngineMessageState.js} +7 -7
- package/bin/session/core-engine/CoreEngineMessageState.js.map +1 -0
- package/bin/session/{executors/local/SessionSignals.d.ts → core-engine/CoreEngineSignals.d.ts} +6 -6
- package/bin/session/core-engine/CoreEngineSignals.d.ts.map +1 -0
- package/bin/session/{executors/local/SessionSignals.js → core-engine/CoreEngineSignals.js} +4 -4
- package/bin/session/core-engine/CoreEngineSignals.js.map +1 -0
- package/bin/session/{executors/local/SessionUiStreamCollector.d.ts → core-engine/CoreEngineUiStreamCollector.d.ts} +3 -3
- package/bin/session/core-engine/CoreEngineUiStreamCollector.d.ts.map +1 -0
- package/bin/session/{executors/local/SessionUiStreamCollector.js → core-engine/CoreEngineUiStreamCollector.js} +3 -3
- package/bin/session/core-engine/CoreEngineUiStreamCollector.js.map +1 -0
- package/bin/session/store/history/SessionHistoryStore.d.ts +119 -0
- package/bin/session/store/history/SessionHistoryStore.d.ts.map +1 -0
- package/bin/session/store/history/SessionHistoryStore.js +10 -0
- package/bin/session/store/history/SessionHistoryStore.js.map +1 -0
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.d.ts +76 -0
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.d.ts.map +1 -0
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.js +374 -0
- package/bin/session/store/history/jsonl/JsonlSessionHistoryStore.js.map +1 -0
- package/bin/session/tools/shell/ShellToolFormatting.js +1 -1
- package/bin/session/tools/shell/ShellToolFormatting.js.map +1 -1
- package/bin/session/types/SessionHistoryPaths.d.ts +2 -2
- package/bin/session/types/SessionLoop.d.ts +1 -1
- package/bin/session/types/SessionLoop.js +1 -1
- package/bin/session/types/SessionMessages.d.ts +1 -1
- package/bin/session/types/SessionMessages.js +1 -1
- package/bin/session/types/SessionRun.d.ts +2 -2
- package/bin/session/types/SessionRun.js +1 -1
- package/bin/types/config/DowncityConfig.d.ts +4 -3
- package/bin/types/config/DowncityConfig.d.ts.map +1 -1
- package/bin/types/runtime/auth/AuthPermission.d.ts.map +1 -0
- package/bin/types/runtime/auth/AuthPermission.js.map +1 -0
- package/bin/types/runtime/auth/AuthRoute.d.ts.map +1 -0
- package/bin/types/runtime/auth/AuthRoute.js.map +1 -0
- package/bin/types/runtime/auth/AuthToken.d.ts.map +1 -0
- package/bin/types/runtime/auth/AuthToken.js.map +1 -0
- package/bin/types/runtime/auth/AuthTypes.d.ts.map +1 -0
- package/bin/types/runtime/auth/AuthTypes.js.map +1 -0
- package/bin/types/runtime/daemon/Daemon.d.ts.map +1 -0
- package/bin/types/runtime/daemon/Daemon.js.map +1 -0
- package/bin/types/{host → runtime/host}/AgentHost.d.ts +7 -7
- package/bin/types/runtime/host/AgentHost.d.ts.map +1 -0
- package/bin/types/runtime/host/AgentHost.js.map +1 -0
- package/bin/types/{host → runtime/host}/Store.d.ts +1 -1
- package/bin/types/runtime/host/Store.d.ts.map +1 -0
- package/bin/types/runtime/host/Store.js.map +1 -0
- package/bin/types/runtime/http/InlineInstant.d.ts.map +1 -0
- package/bin/types/runtime/http/InlineInstant.js.map +1 -0
- package/bin/types/runtime/platform/Platform.d.ts.map +1 -0
- package/bin/types/runtime/platform/Platform.js.map +1 -0
- package/bin/types/runtime/platform/PlatformGateway.d.ts.map +1 -0
- package/bin/types/runtime/platform/PlatformGateway.js.map +1 -0
- package/bin/types/{rpc → runtime/rpc}/LocalRpc.d.ts +2 -2
- package/bin/types/runtime/rpc/LocalRpc.d.ts.map +1 -0
- package/bin/types/runtime/rpc/LocalRpc.js.map +1 -0
- package/bin/utils/logger/FormatRequest.js +1 -1
- package/bin/utils/logger/FormatRequest.js.map +1 -1
- package/package.json +1 -1
- package/src/config/Config.ts +1 -1
- package/src/config/{DowncityDefault.ts → Defaults.ts} +11 -0
- package/src/{project/ProjectExecutionBinding.ts → config/ExecutionBinding.ts} +1 -1
- package/src/{project → config/project}/AgentInitializer.ts +4 -4
- package/src/core/AgentContextTypes.ts +9 -74
- package/src/core/AgentCore.ts +7 -4
- package/src/core/AgentCoreTypes.ts +1 -6
- package/src/index.ts +29 -26
- package/src/plugin/builtins/asr/Config.ts +1 -1
- package/src/plugin/builtins/auth/runtime/AuthorizationPolicy.ts +1 -1
- package/src/plugin/builtins/voice/Config.ts +1 -1
- package/src/plugin/builtins/workboard/runtime/Collector.ts +1 -1
- package/src/plugin/builtins/workboard/runtime/Normalizer.ts +1 -1
- package/src/plugin/core/HttpRoutes.ts +1 -1
- package/src/plugin/core/LocalExecution.ts +2 -2
- package/src/plugin/core/PluginManager.ts +1 -1
- package/src/plugin/types/Plugin.ts +2 -2
- package/src/{host/runtime → runtime/host}/AgentHostRuntime.ts +1 -1
- package/src/{host → runtime/host}/daemon/Client.ts +2 -2
- package/src/{host → runtime/host}/daemon/Paths.ts +1 -1
- package/src/{host → runtime/host}/daemon/ProjectSetup.ts +2 -3
- package/src/{sandbox → runtime/sandbox}/MacOsSeatbeltSandbox.ts +1 -1
- package/src/{sandbox → runtime/sandbox}/SandboxConfigResolver.ts +1 -1
- package/src/{sandbox → runtime/sandbox}/SandboxRunner.ts +3 -3
- package/src/{sandbox → runtime/sandbox}/types/SandboxRuntime.ts +2 -2
- package/src/{server → runtime/server}/http/Server.ts +6 -6
- package/src/{server → runtime/server}/http/control/AuthControlService.ts +1 -1
- package/src/{server → runtime/server}/http/control/ControlApiRoutes.ts +6 -6
- package/src/{server → runtime/server}/http/control/ControlAuthorizationRoutes.ts +2 -2
- package/src/{server → runtime/server}/http/control/ControlRouter.ts +1 -1
- package/src/{server → runtime/server}/http/control/ExecuteBySession.ts +1 -1
- package/src/{server → runtime/server}/http/control/ExecuteInput.ts +1 -1
- package/src/{server → runtime/server}/http/control/MessageTimeline.ts +1 -1
- package/src/{server → runtime/server}/http/control/ModelRoutes.ts +2 -2
- package/src/{server → runtime/server}/http/control/OverviewRoutes.ts +1 -1
- package/src/{server → runtime/server}/http/control/SessionRoutes.ts +2 -2
- package/src/{server → runtime/server}/http/control/SessionSummaryStore.ts +1 -1
- package/src/{server → runtime/server}/http/control/TaskRoutes.ts +1 -1
- package/src/{server → runtime/server}/http/control/TaskStore.ts +1 -1
- package/src/{server → runtime/server}/rpc/Server.ts +4 -4
- package/src/{transport → runtime/transport}/rpc/Client.ts +2 -2
- package/src/{transport → runtime/transport}/rpc/Transport.ts +2 -2
- package/src/sdk/Agent.ts +79 -13
- package/src/sdk/AgentSdkTypes.ts +3 -3
- package/src/sdk/RemoteAgent.ts +1 -1
- package/src/sdk/Session.ts +17 -11
- package/src/sdk/SessionSystemBuilder.ts +2 -3
- package/src/sdk/{SessionMetadata.ts → session/Metadata.ts} +1 -1
- package/src/sdk/{Paths.ts → session/Paths.ts} +1 -1
- package/src/sdk/{SessionPersistence.ts → session/Persistence.ts} +1 -1
- package/src/sdk/{SessionServicePort.ts → session/ServicePort.ts} +4 -3
- package/src/sdk/session/index.ts +34 -0
- package/src/service/builtins/chat/ChatService.ts +1 -1
- package/src/service/builtins/chat/ChatServiceTypes.ts +1 -1
- package/src/service/builtins/chat/accounts/ChannelAccountService.ts +2 -2
- package/src/service/builtins/chat/runtime/ChatChannelConfig.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatChannelCore.ts +1 -1
- package/src/service/builtins/chat/runtime/ChatSession.ts +15 -8
- package/src/service/builtins/chat/runtime/{ChatSessionExecutionComposer.ts → ChatSessionContextComposer.ts} +7 -7
- package/src/service/builtins/chat/types/ChannelAccount.ts +1 -1
- package/src/service/builtins/memory/runtime/Flush.ts +3 -3
- package/src/service/builtins/schedule/ScheduleService.ts +2 -2
- package/src/service/builtins/shell/runtime/ShellActionRuntime.ts +1 -1
- package/src/service/builtins/shell/runtime/ShellRuntimeEnvironment.ts +1 -1
- package/src/service/builtins/task/runtime/Runner.ts +7 -0
- package/src/service/builtins/task/runtime/TaskRunnerRound.ts +2 -2
- package/src/service/builtins/task/runtime/TaskRunnerSession.ts +48 -25
- package/src/service/builtins/task/runtime/TaskRunnerTypes.ts +4 -4
- package/src/service/core/ServiceActionRunner.ts +2 -2
- package/src/service/core/ServiceCommandRequest.ts +1 -1
- package/src/service/{schedule → core/schedule}/Executor.ts +1 -1
- package/src/service/{schedule → core/schedule}/Store.ts +4 -2
- package/src/service/types/Service.ts +1 -1
- package/src/session/Executor.ts +473 -52
- package/src/session/README.md +107 -0
- package/src/session/composer/compaction/SessionCompactionComposer.ts +11 -17
- package/src/session/composer/compaction/jsonl/JsonlSessionCompactionComposer.ts +7 -6
- package/src/session/composer/{execution/LocalSessionExecutionComposer.ts → context/LocalSessionContextComposer.ts} +14 -15
- package/src/session/composer/{execution/SessionExecutionComposer.ts → context/SessionContextComposer.ts} +13 -14
- package/src/session/composer/history/SessionHistoryComposer.ts +9 -141
- package/src/session/composer/history/SessionHistoryWriter.ts +14 -14
- package/src/session/composer/history/jsonl/JsonlSessionHistoryComposer.ts +28 -443
- package/src/session/composer/system/SessionSystemComposer.ts +5 -6
- package/src/session/composer/system/default/DefaultSessionSystemComposer.ts +2 -3
- package/src/session/{executors/local/SessionExecutionError.ts → core-engine/CoreEngineError.ts} +3 -3
- package/src/session/{executors/local/SessionLoopDecision.ts → core-engine/CoreEngineLoopDecision.ts} +4 -4
- package/src/session/{executors/local/SessionModelMessageState.ts → core-engine/CoreEngineMessageState.ts} +6 -6
- package/src/session/{executors/local/SessionSignals.ts → core-engine/CoreEngineSignals.ts} +3 -3
- package/src/session/{executors/local/SessionUiStreamCollector.ts → core-engine/CoreEngineUiStreamCollector.ts} +1 -1
- package/src/session/store/history/SessionHistoryStore.ts +145 -0
- package/src/session/store/history/jsonl/JsonlSessionHistoryStore.ts +465 -0
- package/src/session/tools/shell/ShellToolFormatting.ts +1 -1
- package/src/session/types/SessionHistoryPaths.ts +2 -2
- package/src/session/types/SessionLoop.ts +1 -1
- package/src/session/types/SessionMessages.ts +1 -1
- package/src/session/types/SessionRun.ts +2 -2
- package/src/types/config/DowncityConfig.ts +4 -3
- package/src/types/{host → runtime/host}/AgentHost.ts +3 -3
- package/src/types/{rpc → runtime/rpc}/LocalRpc.ts +1 -1
- package/src/utils/logger/FormatRequest.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/bin/config/DowncityDefault.d.ts +0 -3
- package/bin/config/DowncityDefault.d.ts.map +0 -1
- package/bin/config/DowncityDefault.js.map +0 -1
- package/bin/host/daemon/Api.d.ts.map +0 -1
- package/bin/host/daemon/Api.js.map +0 -1
- package/bin/host/daemon/Client.d.ts.map +0 -1
- package/bin/host/daemon/Client.js.map +0 -1
- package/bin/host/daemon/Paths.d.ts.map +0 -1
- package/bin/host/daemon/Paths.js.map +0 -1
- package/bin/host/daemon/ProjectSetup.d.ts.map +0 -1
- package/bin/host/daemon/ProjectSetup.js.map +0 -1
- package/bin/model/CreateModel.d.ts +0 -30
- package/bin/model/CreateModel.d.ts.map +0 -1
- package/bin/model/CreateModel.js +0 -311
- package/bin/model/CreateModel.js.map +0 -1
- package/bin/model/ModelManager.d.ts +0 -71
- package/bin/model/ModelManager.d.ts.map +0 -1
- package/bin/model/ModelManager.js +0 -187
- package/bin/model/ModelManager.js.map +0 -1
- package/bin/project/AgentInitializer.d.ts.map +0 -1
- package/bin/project/AgentInitializer.js.map +0 -1
- package/bin/project/ProjectExecutionBinding.d.ts.map +0 -1
- package/bin/project/ProjectExecutionBinding.js.map +0 -1
- package/bin/project/types/AgentProject.d.ts.map +0 -1
- package/bin/project/types/AgentProject.js.map +0 -1
- package/bin/sandbox/MacOsSeatbeltSandbox.d.ts.map +0 -1
- package/bin/sandbox/MacOsSeatbeltSandbox.js.map +0 -1
- package/bin/sandbox/SandboxConfigResolver.d.ts.map +0 -1
- package/bin/sandbox/SandboxConfigResolver.js.map +0 -1
- package/bin/sandbox/SandboxRunner.d.ts.map +0 -1
- package/bin/sandbox/SandboxRunner.js.map +0 -1
- package/bin/sandbox/types/Sandbox.d.ts.map +0 -1
- package/bin/sandbox/types/Sandbox.js.map +0 -1
- package/bin/sandbox/types/SandboxRuntime.d.ts.map +0 -1
- package/bin/sandbox/types/SandboxRuntime.js.map +0 -1
- package/bin/sdk/HttpServer.d.ts +0 -30
- package/bin/sdk/HttpServer.d.ts.map +0 -1
- package/bin/sdk/HttpServer.js +0 -59
- package/bin/sdk/HttpServer.js.map +0 -1
- package/bin/sdk/Paths.d.ts.map +0 -1
- package/bin/sdk/Paths.js.map +0 -1
- package/bin/sdk/RpcServer.d.ts +0 -30
- package/bin/sdk/RpcServer.d.ts.map +0 -1
- package/bin/sdk/RpcServer.js +0 -51
- package/bin/sdk/RpcServer.js.map +0 -1
- package/bin/sdk/SessionMetadata.d.ts.map +0 -1
- package/bin/sdk/SessionMetadata.js.map +0 -1
- package/bin/sdk/SessionPersistence.d.ts.map +0 -1
- package/bin/sdk/SessionPersistence.js.map +0 -1
- package/bin/sdk/SessionServicePort.d.ts.map +0 -1
- package/bin/sdk/SessionServicePort.js.map +0 -1
- package/bin/server/http/Server.d.ts.map +0 -1
- package/bin/server/http/Server.js.map +0 -1
- package/bin/server/http/auth/AuthEnv.d.ts.map +0 -1
- package/bin/server/http/auth/AuthEnv.js.map +0 -1
- package/bin/server/http/auth/AuthError.d.ts.map +0 -1
- package/bin/server/http/auth/AuthError.js.map +0 -1
- package/bin/server/http/auth/CliAuthStateStore.d.ts.map +0 -1
- package/bin/server/http/auth/CliAuthStateStore.js.map +0 -1
- package/bin/server/http/auth/PasswordHasher.d.ts.map +0 -1
- package/bin/server/http/auth/PasswordHasher.js.map +0 -1
- package/bin/server/http/auth/TokenService.d.ts.map +0 -1
- package/bin/server/http/auth/TokenService.js.map +0 -1
- package/bin/server/http/control/AuthControlService.d.ts.map +0 -1
- package/bin/server/http/control/AuthControlService.js.map +0 -1
- package/bin/server/http/control/CommonHelpers.d.ts.map +0 -1
- package/bin/server/http/control/CommonHelpers.js.map +0 -1
- package/bin/server/http/control/ControlApiRoutes.d.ts.map +0 -1
- package/bin/server/http/control/ControlApiRoutes.js.map +0 -1
- package/bin/server/http/control/ControlAuthorizationRoutes.d.ts.map +0 -1
- package/bin/server/http/control/ControlAuthorizationRoutes.js.map +0 -1
- package/bin/server/http/control/ControlRouter.d.ts.map +0 -1
- package/bin/server/http/control/ControlRouter.js.map +0 -1
- package/bin/server/http/control/ExecuteBySession.d.ts.map +0 -1
- package/bin/server/http/control/ExecuteBySession.js.map +0 -1
- package/bin/server/http/control/ExecuteInput.d.ts.map +0 -1
- package/bin/server/http/control/ExecuteInput.js.map +0 -1
- package/bin/server/http/control/Helpers.d.ts.map +0 -1
- package/bin/server/http/control/Helpers.js.map +0 -1
- package/bin/server/http/control/MessageTimeline.d.ts.map +0 -1
- package/bin/server/http/control/MessageTimeline.js.map +0 -1
- package/bin/server/http/control/ModelRoutes.d.ts.map +0 -1
- package/bin/server/http/control/ModelRoutes.js.map +0 -1
- package/bin/server/http/control/OverviewRoutes.d.ts.map +0 -1
- package/bin/server/http/control/OverviewRoutes.js.map +0 -1
- package/bin/server/http/control/SessionRoutes.d.ts.map +0 -1
- package/bin/server/http/control/SessionRoutes.js.map +0 -1
- package/bin/server/http/control/SessionSummaryStore.d.ts.map +0 -1
- package/bin/server/http/control/SessionSummaryStore.js.map +0 -1
- package/bin/server/http/control/TaskRoutes.d.ts.map +0 -1
- package/bin/server/http/control/TaskRoutes.js.map +0 -1
- package/bin/server/http/control/TaskStore.d.ts.map +0 -1
- package/bin/server/http/control/TaskStore.js.map +0 -1
- package/bin/server/http/control/types/AuthControl.d.ts.map +0 -1
- package/bin/server/http/control/types/AuthControl.js.map +0 -1
- package/bin/server/http/control/types/ControlRoutes.d.ts.map +0 -1
- package/bin/server/http/control/types/ControlRoutes.js.map +0 -1
- package/bin/server/http/control/types/ControlSessionExecute.d.ts.map +0 -1
- package/bin/server/http/control/types/ControlSessionExecute.js.map +0 -1
- package/bin/server/http/control/types/ControlViewData.d.ts.map +0 -1
- package/bin/server/http/control/types/ControlViewData.js.map +0 -1
- package/bin/server/http/execute/execute.d.ts.map +0 -1
- package/bin/server/http/execute/execute.js.map +0 -1
- package/bin/server/http/health/health.d.ts.map +0 -1
- package/bin/server/http/health/health.js.map +0 -1
- package/bin/server/http/plugins/plugins.d.ts.map +0 -1
- package/bin/server/http/plugins/plugins.js.map +0 -1
- package/bin/server/http/services/services.d.ts.map +0 -1
- package/bin/server/http/services/services.js.map +0 -1
- package/bin/server/http/static/static.d.ts.map +0 -1
- package/bin/server/http/static/static.js.map +0 -1
- package/bin/server/rpc/Server.d.ts.map +0 -1
- package/bin/server/rpc/Server.js.map +0 -1
- package/bin/service/builtins/chat/runtime/ChatSessionExecutionComposer.d.ts.map +0 -1
- package/bin/service/builtins/chat/runtime/ChatSessionExecutionComposer.js.map +0 -1
- package/bin/service/core/ServiceManager.d.ts +0 -9
- package/bin/service/core/ServiceManager.d.ts.map +0 -1
- package/bin/service/core/ServiceManager.js +0 -9
- package/bin/service/core/ServiceManager.js.map +0 -1
- package/bin/service/schedule/Executor.d.ts.map +0 -1
- package/bin/service/schedule/Executor.js.map +0 -1
- package/bin/service/schedule/Store.d.ts.map +0 -1
- package/bin/service/schedule/Store.js.map +0 -1
- package/bin/service/schedule/Time.d.ts.map +0 -1
- package/bin/service/schedule/Time.js.map +0 -1
- package/bin/session/composer/SessionComposer.d.ts +0 -29
- package/bin/session/composer/SessionComposer.d.ts.map +0 -1
- package/bin/session/composer/SessionComposer.js +0 -29
- package/bin/session/composer/SessionComposer.js.map +0 -1
- package/bin/session/composer/execution/LocalSessionExecutionComposer.d.ts.map +0 -1
- package/bin/session/composer/execution/LocalSessionExecutionComposer.js.map +0 -1
- package/bin/session/composer/execution/SessionExecutionComposer.d.ts.map +0 -1
- package/bin/session/composer/execution/SessionExecutionComposer.js +0 -14
- package/bin/session/composer/execution/SessionExecutionComposer.js.map +0 -1
- package/bin/session/executors/local/Runner.d.ts +0 -108
- package/bin/session/executors/local/Runner.d.ts.map +0 -1
- package/bin/session/executors/local/Runner.js +0 -219
- package/bin/session/executors/local/Runner.js.map +0 -1
- package/bin/session/executors/local/SessionExecutionError.d.ts.map +0 -1
- package/bin/session/executors/local/SessionExecutionError.js.map +0 -1
- package/bin/session/executors/local/SessionLoopDecision.d.ts.map +0 -1
- package/bin/session/executors/local/SessionLoopDecision.js.map +0 -1
- package/bin/session/executors/local/SessionModelMessageState.d.ts.map +0 -1
- package/bin/session/executors/local/SessionModelMessageState.js.map +0 -1
- package/bin/session/executors/local/SessionSignals.d.ts.map +0 -1
- package/bin/session/executors/local/SessionSignals.js.map +0 -1
- package/bin/session/executors/local/SessionToolLoopRunner.d.ts +0 -44
- package/bin/session/executors/local/SessionToolLoopRunner.d.ts.map +0 -1
- package/bin/session/executors/local/SessionToolLoopRunner.js +0 -261
- package/bin/session/executors/local/SessionToolLoopRunner.js.map +0 -1
- package/bin/session/executors/local/SessionUiStreamCollector.d.ts.map +0 -1
- package/bin/session/executors/local/SessionUiStreamCollector.js.map +0 -1
- package/bin/transport/rpc/Client.d.ts.map +0 -1
- package/bin/transport/rpc/Client.js.map +0 -1
- package/bin/transport/rpc/Paths.d.ts.map +0 -1
- package/bin/transport/rpc/Paths.js.map +0 -1
- package/bin/transport/rpc/Transport.d.ts.map +0 -1
- package/bin/transport/rpc/Transport.js.map +0 -1
- package/bin/types/auth/AuthPermission.d.ts.map +0 -1
- package/bin/types/auth/AuthPermission.js.map +0 -1
- package/bin/types/auth/AuthRoute.d.ts.map +0 -1
- package/bin/types/auth/AuthRoute.js.map +0 -1
- package/bin/types/auth/AuthToken.d.ts.map +0 -1
- package/bin/types/auth/AuthToken.js.map +0 -1
- package/bin/types/auth/AuthTypes.d.ts.map +0 -1
- package/bin/types/auth/AuthTypes.js.map +0 -1
- package/bin/types/daemon/Daemon.d.ts.map +0 -1
- package/bin/types/daemon/Daemon.js.map +0 -1
- package/bin/types/host/AgentHost.d.ts.map +0 -1
- package/bin/types/host/AgentHost.js.map +0 -1
- package/bin/types/host/Store.d.ts.map +0 -1
- package/bin/types/host/Store.js.map +0 -1
- package/bin/types/http/InlineInstant.d.ts.map +0 -1
- package/bin/types/http/InlineInstant.js.map +0 -1
- package/bin/types/platform/Platform.d.ts.map +0 -1
- package/bin/types/platform/Platform.js.map +0 -1
- package/bin/types/platform/PlatformGateway.d.ts.map +0 -1
- package/bin/types/platform/PlatformGateway.js.map +0 -1
- package/bin/types/rpc/LocalRpc.d.ts.map +0 -1
- package/bin/types/rpc/LocalRpc.js.map +0 -1
- package/src/model/CreateModel.ts +0 -350
- package/src/model/ModelManager.ts +0 -242
- package/src/sdk/HttpServer.ts +0 -66
- package/src/sdk/RpcServer.ts +0 -57
- package/src/service/core/ServiceManager.ts +0 -19
- package/src/session/composer/SessionComposer.ts +0 -34
- package/src/session/executors/local/Runner.ts +0 -297
- package/src/session/executors/local/SessionToolLoopRunner.ts +0 -350
- /package/bin/{project → config/project}/types/AgentProject.js +0 -0
- /package/bin/{host/runtime → runtime/host}/AgentHostRuntime.js +0 -0
- /package/bin/{host/runtime → runtime/host}/PluginRuntime.d.ts +0 -0
- /package/bin/{host/runtime → runtime/host}/PluginRuntime.js +0 -0
- /package/bin/{host → runtime/host}/daemon/Api.js +0 -0
- /package/bin/{host → runtime/host}/daemon/Client.d.ts +0 -0
- /package/bin/{host → runtime/host}/daemon/Paths.d.ts +0 -0
- /package/bin/{sandbox → runtime/sandbox}/MacOsSeatbeltSandbox.js +0 -0
- /package/bin/{sandbox → runtime/sandbox}/SandboxConfigResolver.js +0 -0
- /package/bin/{sandbox → runtime/sandbox}/types/Sandbox.d.ts +0 -0
- /package/bin/{sandbox → runtime/sandbox}/types/Sandbox.js +0 -0
- /package/bin/{sandbox → runtime/sandbox}/types/SandboxRuntime.js +0 -0
- /package/bin/{server → runtime/server}/http/auth/AuthEnv.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/auth/AuthEnv.js +0 -0
- /package/bin/{server → runtime/server}/http/auth/AuthError.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/auth/AuthError.js +0 -0
- /package/bin/{server → runtime/server}/http/auth/CliAuthStateStore.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/auth/CliAuthStateStore.js +0 -0
- /package/bin/{server → runtime/server}/http/auth/PasswordHasher.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/auth/PasswordHasher.js +0 -0
- /package/bin/{server → runtime/server}/http/auth/TokenService.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/auth/TokenService.js +0 -0
- /package/bin/{server → runtime/server}/http/control/CommonHelpers.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/control/CommonHelpers.js +0 -0
- /package/bin/{server → runtime/server}/http/control/Helpers.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/control/Helpers.js +0 -0
- /package/bin/{server → runtime/server}/http/control/types/AuthControl.js +0 -0
- /package/bin/{server → runtime/server}/http/control/types/ControlRoutes.js +0 -0
- /package/bin/{server → runtime/server}/http/control/types/ControlSessionExecute.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/control/types/ControlSessionExecute.js +0 -0
- /package/bin/{server → runtime/server}/http/control/types/ControlViewData.js +0 -0
- /package/bin/{server → runtime/server}/http/health/health.d.ts +0 -0
- /package/bin/{server → runtime/server}/http/health/health.js +0 -0
- /package/bin/{server → runtime/server}/http/plugins/plugins.js +0 -0
- /package/bin/{transport → runtime/transport}/rpc/Client.js +0 -0
- /package/bin/{transport → runtime/transport}/rpc/Paths.d.ts +0 -0
- /package/bin/{transport → runtime/transport}/rpc/Paths.js +0 -0
- /package/bin/service/{schedule → core/schedule}/Time.d.ts +0 -0
- /package/bin/service/{schedule → core/schedule}/Time.js +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthPermission.d.ts +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthPermission.js +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthRoute.d.ts +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthRoute.js +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthToken.d.ts +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthToken.js +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthTypes.d.ts +0 -0
- /package/bin/types/{auth → runtime/auth}/AuthTypes.js +0 -0
- /package/bin/types/{daemon → runtime/daemon}/Daemon.d.ts +0 -0
- /package/bin/types/{daemon → runtime/daemon}/Daemon.js +0 -0
- /package/bin/types/{host → runtime/host}/AgentHost.js +0 -0
- /package/bin/types/{host → runtime/host}/Store.js +0 -0
- /package/bin/types/{http → runtime/http}/InlineInstant.d.ts +0 -0
- /package/bin/types/{http → runtime/http}/InlineInstant.js +0 -0
- /package/bin/types/{platform → runtime/platform}/Platform.d.ts +0 -0
- /package/bin/types/{platform → runtime/platform}/Platform.js +0 -0
- /package/bin/types/{platform → runtime/platform}/PlatformGateway.d.ts +0 -0
- /package/bin/types/{platform → runtime/platform}/PlatformGateway.js +0 -0
- /package/bin/types/{rpc → runtime/rpc}/LocalRpc.js +0 -0
- /package/src/{project → config/project}/types/AgentProject.ts +0 -0
- /package/src/{host/runtime → runtime/host}/PluginRuntime.ts +0 -0
- /package/src/{host → runtime/host}/daemon/Api.ts +0 -0
- /package/src/{sandbox → runtime/sandbox}/types/Sandbox.ts +0 -0
- /package/src/{server → runtime/server}/http/auth/AuthEnv.ts +0 -0
- /package/src/{server → runtime/server}/http/auth/AuthError.ts +0 -0
- /package/src/{server → runtime/server}/http/auth/CliAuthStateStore.ts +0 -0
- /package/src/{server → runtime/server}/http/auth/PasswordHasher.ts +0 -0
- /package/src/{server → runtime/server}/http/auth/TokenService.ts +0 -0
- /package/src/{server → runtime/server}/http/control/CommonHelpers.ts +0 -0
- /package/src/{server → runtime/server}/http/control/Helpers.ts +0 -0
- /package/src/{server → runtime/server}/http/control/types/AuthControl.ts +0 -0
- /package/src/{server → runtime/server}/http/control/types/ControlRoutes.ts +0 -0
- /package/src/{server → runtime/server}/http/control/types/ControlSessionExecute.ts +0 -0
- /package/src/{server → runtime/server}/http/control/types/ControlViewData.ts +0 -0
- /package/src/{server → runtime/server}/http/execute/execute.ts +0 -0
- /package/src/{server → runtime/server}/http/health/health.ts +0 -0
- /package/src/{server → runtime/server}/http/plugins/plugins.ts +0 -0
- /package/src/{server → runtime/server}/http/services/services.ts +0 -0
- /package/src/{server → runtime/server}/http/static/static.ts +0 -0
- /package/src/{transport → runtime/transport}/rpc/Paths.ts +0 -0
- /package/src/service/{schedule → core/schedule}/Time.ts +0 -0
- /package/src/types/{auth → runtime/auth}/AuthPermission.ts +0 -0
- /package/src/types/{auth → runtime/auth}/AuthRoute.ts +0 -0
- /package/src/types/{auth → runtime/auth}/AuthToken.ts +0 -0
- /package/src/types/{auth → runtime/auth}/AuthTypes.ts +0 -0
- /package/src/types/{daemon → runtime/daemon}/Daemon.ts +0 -0
- /package/src/types/{host → runtime/host}/Store.ts +0 -0
- /package/src/types/{http → runtime/http}/InlineInstant.ts +0 -0
- /package/src/types/{platform → runtime/platform}/Platform.ts +0 -0
- /package/src/types/{platform → runtime/platform}/PlatformGateway.ts +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
10
|
-
import type { AgentPlatformRuntime } from "@/types/host/AgentHost.js";
|
|
10
|
+
import type { AgentPlatformRuntime } from "@/types/runtime/host/AgentHost.js";
|
|
11
11
|
import type {
|
|
12
12
|
ChatAuthorizationConfig,
|
|
13
13
|
ChatAuthorizationChannel,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { VoicePluginConfig } from "@/plugin/builtins/voice/types/VoicePlugin.js";
|
|
10
|
-
import type { AgentPluginConfigRuntime } from "@/types/host/AgentHost.js";
|
|
10
|
+
import type { AgentPluginConfigRuntime } from "@/types/runtime/host/AgentHost.js";
|
|
11
11
|
import type { JsonObject, JsonValue } from "@/types/common/Json.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import { listTaskDefinitions } from "@/service/builtins/task/Action.js";
|
|
10
10
|
import { listServiceStates } from "@/service/core/Manager.js";
|
|
11
|
-
import { listControlSessionSummaries } from "@/server/http/control/SessionSummaryStore.js";
|
|
11
|
+
import { listControlSessionSummaries } from "@/runtime/server/http/control/SessionSummaryStore.js";
|
|
12
12
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
13
13
|
import type { WorkboardSnapshot } from "@/plugin/builtins/workboard/types/Workboard.js";
|
|
14
14
|
import {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - 所有会泄漏上下文的字段都必须在这里截断或抽象。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import type { ControlSessionSummary } from "@/server/http/control/types/ControlViewData.js";
|
|
9
|
+
import type { ControlSessionSummary } from "@/runtime/server/http/control/types/ControlViewData.js";
|
|
10
10
|
import type { ServiceStateSnapshot } from "@/service/types/ServiceState.js";
|
|
11
11
|
import type { TaskListResponse } from "@/service/builtins/task/types/TaskCommand.js";
|
|
12
12
|
import type {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { Hono } from "hono";
|
|
10
10
|
import { PLUGINS } from "@/plugin/core/Plugins.js";
|
|
11
11
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
12
|
-
import type { AuthRoutePolicy } from "@/types/auth/AuthRoute.js";
|
|
12
|
+
import type { AuthRoutePolicy } from "@/types/runtime/auth/AuthRoute.js";
|
|
13
13
|
|
|
14
14
|
function dedupeAuthPolicies(policies: AuthRoutePolicy[]): AuthRoutePolicy[] {
|
|
15
15
|
const records = new Map<string, AuthRoutePolicy>();
|
|
@@ -15,9 +15,9 @@ import { findBuiltinPlugin, listStaticPluginViews } from "@/plugin/core/Catalog.
|
|
|
15
15
|
import {
|
|
16
16
|
createAgentPathRuntime,
|
|
17
17
|
createAgentPluginConfigRuntime,
|
|
18
|
-
} from "@/host/
|
|
18
|
+
} from "@/runtime/host/AgentHostRuntime.js";
|
|
19
19
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
20
|
-
import type { AgentPlatformRuntime } from "@/types/host/AgentHost.js";
|
|
20
|
+
import type { AgentPlatformRuntime } from "@/types/runtime/host/AgentHost.js";
|
|
21
21
|
import type {
|
|
22
22
|
PluginActionResult,
|
|
23
23
|
PluginAvailability,
|
|
@@ -13,7 +13,7 @@ import { isPluginEnabled } from "@/plugin/core/Activation.js";
|
|
|
13
13
|
import { HookRegistry } from "@/plugin/core/HookRegistry.js";
|
|
14
14
|
import { PluginRegistry } from "@/plugin/core/PluginRegistry.js";
|
|
15
15
|
import { registerBuiltinPlugins } from "@/plugin/core/Plugins.js";
|
|
16
|
-
import { getPluginRuntimeContextResolver } from "@/host/
|
|
16
|
+
import { getPluginRuntimeContextResolver } from "@/runtime/host/PluginRuntime.js";
|
|
17
17
|
|
|
18
18
|
let pluginManager: PluginRegistry | null = null;
|
|
19
19
|
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
AgentPathRuntime,
|
|
14
14
|
AgentPlatformRuntime,
|
|
15
15
|
AgentPluginConfigRuntime,
|
|
16
|
-
} from "@/types/host/AgentHost.js";
|
|
16
|
+
} from "@/types/runtime/host/AgentHost.js";
|
|
17
17
|
import type {
|
|
18
18
|
AgentContext,
|
|
19
19
|
StructuredConfig,
|
|
@@ -21,7 +21,7 @@ import type {
|
|
|
21
21
|
import type { Logger } from "@/utils/logger/Logger.js";
|
|
22
22
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
23
23
|
import type { JsonObject, JsonValue } from "@/types/common/Json.js";
|
|
24
|
-
import type { AuthRoutePolicy } from "@/types/auth/AuthRoute.js";
|
|
24
|
+
import type { AuthRoutePolicy } from "@/types/runtime/auth/AuthRoute.js";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Plugin 命令执行上下文。
|
|
@@ -22,7 +22,7 @@ import { persistProjectPluginConfig } from "@/plugin/core/ProjectConfigStore.js"
|
|
|
22
22
|
import type {
|
|
23
23
|
AgentPathRuntime,
|
|
24
24
|
AgentPluginConfigRuntime,
|
|
25
|
-
} from "@/types/host/AgentHost.js";
|
|
25
|
+
} from "@/types/runtime/host/AgentHost.js";
|
|
26
26
|
import type { DowncityConfig } from "@/types/config/DowncityConfig.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
formatCliBearerHeaderValue,
|
|
17
17
|
resolveCliAuthToken,
|
|
18
|
-
} from "@/server/http/auth/CliAuthStateStore.js";
|
|
19
|
-
import { getDaemonMetaPath } from "@/host/daemon/Paths.js";
|
|
18
|
+
} from "@/runtime/server/http/auth/CliAuthStateStore.js";
|
|
19
|
+
import { getDaemonMetaPath } from "@/runtime/host/daemon/Paths.js";
|
|
20
20
|
import type { JsonObject, JsonValue } from "@/types/common/Json.js";
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
import fs from "fs-extra";
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import { loadDowncityConfig } from "@/config/Config.js";
|
|
12
|
-
import type { AgentPlatformRuntime } from "@/types/host/AgentHost.js";
|
|
13
12
|
import {
|
|
14
|
-
readProjectExecutionBinding,
|
|
15
13
|
readProjectPrimaryModelId,
|
|
16
|
-
} from "@/
|
|
14
|
+
} from "@/config/ExecutionBinding.js";
|
|
15
|
+
import type { AgentPlatformRuntime } from "@/types/runtime/host/AgentHost.js";
|
|
17
16
|
import {
|
|
18
17
|
getCacheDirPath,
|
|
19
18
|
getLogsDirPath,
|
|
@@ -13,7 +13,7 @@ import fs from "fs-extra";
|
|
|
13
13
|
import type {
|
|
14
14
|
SandboxSpawnParams,
|
|
15
15
|
SandboxSpawnResult,
|
|
16
|
-
} from "@/sandbox/types/SandboxRuntime.js";
|
|
16
|
+
} from "@/runtime/sandbox/types/SandboxRuntime.js";
|
|
17
17
|
|
|
18
18
|
const DEFAULT_PATH_VALUE =
|
|
19
19
|
"/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import path from "node:path";
|
|
11
11
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
12
|
-
import type { ResolvedSandboxConfig } from "@/sandbox/types/SandboxRuntime.js";
|
|
12
|
+
import type { ResolvedSandboxConfig } from "@/runtime/sandbox/types/SandboxRuntime.js";
|
|
13
13
|
|
|
14
14
|
const DEFAULT_ENV_ALLOWLIST = [
|
|
15
15
|
"PATH",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
|
-
import type { SandboxSpawnResult } from "@/sandbox/types/SandboxRuntime.js";
|
|
12
|
-
import { resolveSandboxConfig, resolveSandboxCwd } from "@/sandbox/SandboxConfigResolver.js";
|
|
13
|
-
import { spawnMacOsSeatbeltSandbox } from "@/sandbox/MacOsSeatbeltSandbox.js";
|
|
11
|
+
import type { SandboxSpawnResult } from "@/runtime/sandbox/types/SandboxRuntime.js";
|
|
12
|
+
import { resolveSandboxConfig, resolveSandboxCwd } from "@/runtime/sandbox/SandboxConfigResolver.js";
|
|
13
|
+
import { spawnMacOsSeatbeltSandbox } from "@/runtime/sandbox/MacOsSeatbeltSandbox.js";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* 启动 shell 子进程。
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
|
11
|
-
import type { SandboxConfig } from "@/sandbox/types/Sandbox.js";
|
|
12
|
-
import type { SandboxNetworkMode } from "@/sandbox/types/Sandbox.js";
|
|
11
|
+
import type { SandboxConfig } from "@/runtime/sandbox/types/Sandbox.js";
|
|
12
|
+
import type { SandboxNetworkMode } from "@/runtime/sandbox/types/Sandbox.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* sandbox 会话状态。
|
|
@@ -12,14 +12,14 @@ import { cors } from "hono/cors";
|
|
|
12
12
|
import { logger } from "hono/logger";
|
|
13
13
|
import http from "node:http";
|
|
14
14
|
import { logger as serverLogger } from "@/utils/logger/Logger.js";
|
|
15
|
-
import { createExecuteRouter } from "@/server/http/execute/execute.js";
|
|
16
|
-
import { healthRouter } from "@/server/http/health/health.js";
|
|
15
|
+
import { createExecuteRouter } from "@/runtime/server/http/execute/execute.js";
|
|
16
|
+
import { healthRouter } from "@/runtime/server/http/health/health.js";
|
|
17
17
|
import {
|
|
18
18
|
createServicesRouter,
|
|
19
|
-
} from "@/server/http/services/services.js";
|
|
20
|
-
import { createPluginsRouter } from "@/server/http/plugins/plugins.js";
|
|
21
|
-
import { createStaticRouter } from "@/server/http/static/static.js";
|
|
22
|
-
import { createControlRouter } from "@/server/http/control/ControlRouter.js";
|
|
19
|
+
} from "@/runtime/server/http/services/services.js";
|
|
20
|
+
import { createPluginsRouter } from "@/runtime/server/http/plugins/plugins.js";
|
|
21
|
+
import { createStaticRouter } from "@/runtime/server/http/static/static.js";
|
|
22
|
+
import { createControlRouter } from "@/runtime/server/http/control/ControlRouter.js";
|
|
23
23
|
import {
|
|
24
24
|
registerBuiltinPluginHttpRoutes,
|
|
25
25
|
} from "@/plugin/core/HttpRoutes.js";
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
11
|
import type { JsonObject } from "@/types/common/Json.js";
|
|
12
|
-
import type { AuthControlPayload } from "@/server/http/control/types/AuthControl.js";
|
|
12
|
+
import type { AuthControlPayload } from "@/runtime/server/http/control/types/AuthControl.js";
|
|
13
13
|
import type {
|
|
14
14
|
AuthSetUserRolePayload,
|
|
15
15
|
AuthWriteConfigPayload,
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* - 单 agent control API 统一暴露在 `/api/control/*` 下。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import type { ControlRouteRegistrationParams } from "@/server/http/control/types/ControlRoutes.js";
|
|
11
|
-
import { registerControlAuthorizationRoutes } from "@/server/http/control/ControlAuthorizationRoutes.js";
|
|
12
|
-
import { registerControlSessionRoutes } from "@/server/http/control/SessionRoutes.js";
|
|
13
|
-
import { registerControlModelRoutes } from "@/server/http/control/ModelRoutes.js";
|
|
14
|
-
import { registerControlOverviewRoutes } from "@/server/http/control/OverviewRoutes.js";
|
|
15
|
-
import { registerControlTaskRoutes } from "@/server/http/control/TaskRoutes.js";
|
|
10
|
+
import type { ControlRouteRegistrationParams } from "@/runtime/server/http/control/types/ControlRoutes.js";
|
|
11
|
+
import { registerControlAuthorizationRoutes } from "@/runtime/server/http/control/ControlAuthorizationRoutes.js";
|
|
12
|
+
import { registerControlSessionRoutes } from "@/runtime/server/http/control/SessionRoutes.js";
|
|
13
|
+
import { registerControlModelRoutes } from "@/runtime/server/http/control/ModelRoutes.js";
|
|
14
|
+
import { registerControlOverviewRoutes } from "@/runtime/server/http/control/OverviewRoutes.js";
|
|
15
|
+
import { registerControlTaskRoutes } from "@/runtime/server/http/control/TaskRoutes.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* 注册单 agent control API 路由。
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
readAuthControlPayload,
|
|
13
13
|
setAuthControlUserRole,
|
|
14
14
|
writeAuthControlConfig,
|
|
15
|
-
} from "@/server/http/control/AuthControlService.js";
|
|
15
|
+
} from "@/runtime/server/http/control/AuthControlService.js";
|
|
16
16
|
import {
|
|
17
17
|
isChatAuthorizationChannel,
|
|
18
18
|
type AuthSetUserRolePayload,
|
|
19
19
|
type ChatAuthorizationConfig,
|
|
20
20
|
} from "@/plugin/builtins/auth/types/AuthPlugin.js";
|
|
21
21
|
import type { ChatAuthorizationChannel } from "@/plugin/builtins/auth/types/AuthPlugin.js";
|
|
22
|
-
import { buildControlRouteAliases } from "@/server/http/control/CommonHelpers.js";
|
|
22
|
+
import { buildControlRouteAliases } from "@/runtime/server/http/control/CommonHelpers.js";
|
|
23
23
|
|
|
24
24
|
function normalizeChatChannel(value: unknown): ChatAuthorizationChannel | null {
|
|
25
25
|
const text = String(value || "").trim().toLowerCase();
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { Hono } from "hono";
|
|
16
16
|
import type { AgentRuntime } from "@/core/AgentCoreTypes.js";
|
|
17
17
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
18
|
-
import { registerControlApiRoutes } from "@/server/http/control/ControlApiRoutes.js";
|
|
18
|
+
import { registerControlApiRoutes } from "@/runtime/server/http/control/ControlApiRoutes.js";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* control router 参数。
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import type { AgentRuntime } from "@/core/AgentCoreTypes.js";
|
|
10
10
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
11
11
|
import type { JsonObject } from "@/types/common/Json.js";
|
|
12
|
-
import type { ControlSessionExecuteAttachmentInput } from "@/server/http/control/types/ControlSessionExecute.js";
|
|
12
|
+
import type { ControlSessionExecuteAttachmentInput } from "@/runtime/server/http/control/types/ControlSessionExecute.js";
|
|
13
13
|
import { drainDeferredPersistedUserMessages } from "@session/SessionRunScope.js";
|
|
14
14
|
import { resolveChatQueueStore } from "@/service/builtins/chat/runtime/ChatQueue.js";
|
|
15
15
|
import { resolveDispatchTargetByChatKey } from "@/service/builtins/chat/runtime/ChatkeySend.js";
|
|
@@ -13,7 +13,7 @@ import { renderChatMessageFileTag } from "@/service/builtins/chat/runtime/ChatMe
|
|
|
13
13
|
import type {
|
|
14
14
|
ControlSessionExecuteAttachmentInput,
|
|
15
15
|
ControlSessionExecuteAttachmentType,
|
|
16
|
-
} from "@/server/http/control/types/ControlSessionExecute.js";
|
|
16
|
+
} from "@/runtime/server/http/control/types/ControlSessionExecute.js";
|
|
17
17
|
|
|
18
18
|
const EXECUTE_ATTACHMENT_MAX_COUNT = 8;
|
|
19
19
|
const EXECUTE_ATTACHMENT_MAX_BYTES = 2 * 1024 * 1024;
|
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
} from "@/session/types/SessionMessages.js";
|
|
20
20
|
import { pickLastSuccessfulChatSendText } from "@/service/builtins/chat/runtime/UserVisibleText.js";
|
|
21
21
|
import { extractToolCallsFromUiMessage } from "@/service/builtins/chat/runtime/UIMessageTransformer.js";
|
|
22
|
-
import type { ControlTimelineEvent, ControlTimelineRole } from "@/server/http/control/types/ControlViewData.js";
|
|
22
|
+
import type { ControlTimelineEvent, ControlTimelineRole } from "@/runtime/server/http/control/types/ControlViewData.js";
|
|
23
23
|
import { truncateText } from "./CommonHelpers.js";
|
|
24
24
|
|
|
25
25
|
type AnyUiPart = UIMessagePart<Record<string, never>, Record<string, never>>;
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
import fs from "fs-extra";
|
|
10
10
|
import { getDowncityJsonPath } from "@/config/Paths.js";
|
|
11
|
-
import type { ControlRouteRegistrationParams } from "@/server/http/control/types/ControlRoutes.js";
|
|
12
|
-
import { buildControlRouteAliases } from "@/server/http/control/CommonHelpers.js";
|
|
11
|
+
import type { ControlRouteRegistrationParams } from "@/runtime/server/http/control/types/ControlRoutes.js";
|
|
12
|
+
import { buildControlRouteAliases } from "@/runtime/server/http/control/CommonHelpers.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 注册模型相关路由。
|
|
@@ -13,7 +13,7 @@ import { listServiceStates } from "@/service/core/Manager.js";
|
|
|
13
13
|
import { listTaskDefinitions } from "@/service/builtins/task/Action.js";
|
|
14
14
|
import { buildControlRouteAliases, toLimit } from "./CommonHelpers.js";
|
|
15
15
|
import { listControlSessionSummaries, readRecentLogs } from "./Helpers.js";
|
|
16
|
-
import type { ControlRouteRegistrationParams } from "@/server/http/control/types/ControlRoutes.js";
|
|
16
|
+
import type { ControlRouteRegistrationParams } from "@/runtime/server/http/control/types/ControlRoutes.js";
|
|
17
17
|
|
|
18
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
19
19
|
const __dirname = dirname(__filename);
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
getDowncitySessionMessagesArchivePath,
|
|
18
18
|
getDowncitySessionMessagesPath,
|
|
19
19
|
} from "@/config/Paths.js";
|
|
20
|
-
import type { ControlSessionExecuteRequestBody } from "@/server/http/control/types/ControlSessionExecute.js";
|
|
21
|
-
import type { ControlRouteRegistrationParams } from "@/server/http/control/types/ControlRoutes.js";
|
|
20
|
+
import type { ControlSessionExecuteRequestBody } from "@/runtime/server/http/control/types/ControlSessionExecute.js";
|
|
21
|
+
import type { ControlRouteRegistrationParams } from "@/runtime/server/http/control/types/ControlRoutes.js";
|
|
22
22
|
import {
|
|
23
23
|
buildControlRouteAliases,
|
|
24
24
|
decodeMaybe,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
getDowncitySessionRootDirPath,
|
|
14
14
|
} from "@/config/Paths.js";
|
|
15
15
|
import { readChatMetaBySessionId } from "@/service/builtins/chat/runtime/ChatMetaStore.js";
|
|
16
|
-
import type { ControlSessionSummary } from "@/server/http/control/types/ControlViewData.js";
|
|
16
|
+
import type { ControlSessionSummary } from "@/runtime/server/http/control/types/ControlViewData.js";
|
|
17
17
|
import { decodeMaybe, truncateText } from "./CommonHelpers.js";
|
|
18
18
|
import { loadSessionMessagesFromFile, resolveUiMessagePreview } from "./MessageTimeline.js";
|
|
19
19
|
|
|
@@ -12,7 +12,7 @@ import { getDowncityTasksDirPath } from "@/config/Paths.js";
|
|
|
12
12
|
import { runServiceCommand } from "@/service/core/Manager.js";
|
|
13
13
|
import { listTaskDefinitions } from "@/service/builtins/task/Action.js";
|
|
14
14
|
import { resolveTaskIdByTitle } from "@/service/builtins/task/runtime/Store.js";
|
|
15
|
-
import type { ControlRouteRegistrationParams } from "@/server/http/control/types/ControlRoutes.js";
|
|
15
|
+
import type { ControlRouteRegistrationParams } from "@/runtime/server/http/control/types/ControlRoutes.js";
|
|
16
16
|
import {
|
|
17
17
|
buildControlRouteAliases,
|
|
18
18
|
decodeMaybe,
|
|
@@ -14,7 +14,7 @@ import type {
|
|
|
14
14
|
ControlLogEntry,
|
|
15
15
|
ControlTaskRunDetail,
|
|
16
16
|
ControlTaskRunSummary,
|
|
17
|
-
} from "@/server/http/control/types/ControlViewData.js";
|
|
17
|
+
} from "@/runtime/server/http/control/types/ControlViewData.js";
|
|
18
18
|
import { truncateText } from "./CommonHelpers.js";
|
|
19
19
|
import { loadSessionMessagesFromFile, toUiMessageTimeline } from "./MessageTimeline.js";
|
|
20
20
|
|
|
@@ -13,8 +13,8 @@ import type { AgentRuntime } from "@/core/AgentCoreTypes.js";
|
|
|
13
13
|
import type { AgentContext } from "@/core/AgentContextTypes.js";
|
|
14
14
|
import type { AgentCore } from "@/core/AgentCore.js";
|
|
15
15
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
16
|
-
import type { LocalRpcRequest, LocalRpcResponse, LocalRpcServerHandle } from "@/types/rpc/LocalRpc.js";
|
|
17
|
-
import type { ControlSessionExecuteRequestBody } from "@/server/http/control/types/ControlSessionExecute.js";
|
|
16
|
+
import type { LocalRpcRequest, LocalRpcResponse, LocalRpcServerHandle } from "@/types/runtime/rpc/LocalRpc.js";
|
|
17
|
+
import type { ControlSessionExecuteRequestBody } from "@/runtime/server/http/control/types/ControlSessionExecute.js";
|
|
18
18
|
import type {
|
|
19
19
|
PluginActionResponse,
|
|
20
20
|
PluginAvailabilityResponse,
|
|
@@ -29,8 +29,8 @@ import type {
|
|
|
29
29
|
import { listServiceStates, controlServiceState } from "@/service/core/ServiceStateController.js";
|
|
30
30
|
import { runServiceCommand } from "@/service/core/ServiceActionRunner.js";
|
|
31
31
|
import { parseServiceCommandRequestBody } from "@/service/core/ServiceCommandRequest.js";
|
|
32
|
-
import { executeBySessionId } from "@/server/http/control/ExecuteBySession.js";
|
|
33
|
-
import { getLocalRpcEndpoint } from "@/transport/rpc/Paths.js";
|
|
32
|
+
import { executeBySessionId } from "@/runtime/server/http/control/ExecuteBySession.js";
|
|
33
|
+
import { getLocalRpcEndpoint } from "@/runtime/transport/rpc/Paths.js";
|
|
34
34
|
|
|
35
35
|
async function isSocketEndpointActive(endpoint: string): Promise<boolean> {
|
|
36
36
|
return await new Promise<boolean>((resolve) => {
|
|
@@ -11,8 +11,8 @@ import { nanoid } from "nanoid";
|
|
|
11
11
|
import type {
|
|
12
12
|
DaemonJsonApiCallParams,
|
|
13
13
|
DaemonJsonApiCallResult,
|
|
14
|
-
} from "@/host/daemon/Api.js";
|
|
15
|
-
import type { LocalRpcRequest, LocalRpcResponse } from "@/types/rpc/LocalRpc.js";
|
|
14
|
+
} from "@/runtime/host/daemon/Api.js";
|
|
15
|
+
import type { LocalRpcRequest, LocalRpcResponse } from "@/types/runtime/rpc/LocalRpc.js";
|
|
16
16
|
import { getLocalRpcEndpoint } from "./Paths.js";
|
|
17
17
|
|
|
18
18
|
const LOCAL_RPC_TIMEOUT_MS = 5_000;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
import type {
|
|
11
11
|
DaemonJsonApiCallParams,
|
|
12
12
|
DaemonJsonApiCallResult,
|
|
13
|
-
} from "@/host/daemon/Api.js";
|
|
14
|
-
import { callServer } from "@/host/daemon/Client.js";
|
|
13
|
+
} from "@/runtime/host/daemon/Api.js";
|
|
14
|
+
import { callServer } from "@/runtime/host/daemon/Client.js";
|
|
15
15
|
import { callLocalServer } from "./Client.js";
|
|
16
16
|
|
|
17
17
|
/**
|
package/src/sdk/Agent.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 关键点(中文)
|
|
5
5
|
* - `Agent` 现在是实例外观层,长期运行状态下沉到 `AgentCore`。
|
|
6
6
|
* - session、HTTP、RPC、service lifecycle 都按需异步初始化。
|
|
7
|
-
* - `start/stop`
|
|
7
|
+
* - `start/stop` 是唯一公开的长期运行生命周期入口。
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { Tool } from "ai";
|
|
@@ -19,13 +19,16 @@ import type {
|
|
|
19
19
|
AgentStartOptions,
|
|
20
20
|
AgentStartResult,
|
|
21
21
|
AgentStopResult,
|
|
22
|
+
AgentHttpBinding,
|
|
23
|
+
AgentHttpStartOptions,
|
|
24
|
+
AgentRpcBinding,
|
|
22
25
|
AgentSessionMetadata,
|
|
23
26
|
} from "@/sdk/AgentSdkTypes.js";
|
|
24
27
|
import { Session } from "@/sdk/Session.js";
|
|
25
|
-
import { SdkAgentHttpServer } from "@/sdk/HttpServer.js";
|
|
26
|
-
import { SdkAgentRpcServer } from "@/sdk/RpcServer.js";
|
|
27
28
|
import { AgentCore } from "@/core/AgentCore.js";
|
|
28
29
|
import { startAllServices, stopAllServices } from "@/service/core/Manager.js";
|
|
30
|
+
import { startServer } from "@/runtime/server/http/Server.js";
|
|
31
|
+
import { startLocalRpcServer } from "@/runtime/server/rpc/Server.js";
|
|
29
32
|
|
|
30
33
|
/**
|
|
31
34
|
* SDK 本地 Agent。
|
|
@@ -35,12 +38,12 @@ export class Agent {
|
|
|
35
38
|
readonly id: string;
|
|
36
39
|
readonly path: string;
|
|
37
40
|
readonly tools: Record<string, Tool>;
|
|
38
|
-
readonly http: SdkAgentHttpServer;
|
|
39
|
-
readonly rpc: SdkAgentRpcServer;
|
|
40
41
|
readonly services: Map<string, BaseService>;
|
|
41
42
|
readonly plugins: PluginPort;
|
|
42
43
|
private servicesStarted = false;
|
|
43
44
|
private startPromise: Promise<AgentStartResult> | null = null;
|
|
45
|
+
private httpBinding: AgentHttpBinding | null = null;
|
|
46
|
+
private rpcBinding: AgentRpcBinding | null = null;
|
|
44
47
|
|
|
45
48
|
constructor(options: AgentOptions) {
|
|
46
49
|
this.core = new AgentCore(options);
|
|
@@ -49,8 +52,6 @@ export class Agent {
|
|
|
49
52
|
this.tools = this.core.tools;
|
|
50
53
|
this.services = this.core.services;
|
|
51
54
|
this.plugins = this.core.plugins;
|
|
52
|
-
this.http = new SdkAgentHttpServer(this);
|
|
53
|
-
this.rpc = new SdkAgentRpcServer(this);
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
/**
|
|
@@ -100,10 +101,10 @@ export class Agent {
|
|
|
100
101
|
const httpBinding =
|
|
101
102
|
options?.http === false || options?.http === undefined
|
|
102
103
|
? undefined
|
|
103
|
-
: await this.
|
|
104
|
+
: await this.startHttp(options.http);
|
|
104
105
|
const rpcBinding =
|
|
105
106
|
options?.rpc === true
|
|
106
|
-
? await this.
|
|
107
|
+
? await this.startRpc()
|
|
107
108
|
: undefined;
|
|
108
109
|
|
|
109
110
|
return {
|
|
@@ -125,8 +126,8 @@ export class Agent {
|
|
|
125
126
|
*/
|
|
126
127
|
async stop(): Promise<AgentStopResult> {
|
|
127
128
|
const servicesStarted = this.servicesStarted;
|
|
128
|
-
const rpcStarted = this.
|
|
129
|
-
const httpStarted = this.
|
|
129
|
+
const rpcStarted = this.rpcBinding !== null;
|
|
130
|
+
const httpStarted = this.httpBinding !== null;
|
|
130
131
|
|
|
131
132
|
if (servicesStarted) {
|
|
132
133
|
await stopAllServices(this.getContext());
|
|
@@ -134,11 +135,11 @@ export class Agent {
|
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
if (rpcStarted) {
|
|
137
|
-
await this.
|
|
138
|
+
await this.stopRpc();
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
if (httpStarted) {
|
|
141
|
-
await this.
|
|
142
|
+
await this.stopHttp();
|
|
142
143
|
}
|
|
143
144
|
|
|
144
145
|
this.startPromise = null;
|
|
@@ -174,4 +175,69 @@ export class Agent {
|
|
|
174
175
|
getContext(): AgentContext {
|
|
175
176
|
return this.core.getContext();
|
|
176
177
|
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* 启动当前 agent 的 HTTP server。
|
|
181
|
+
*/
|
|
182
|
+
private async startHttp(
|
|
183
|
+
options?: AgentHttpStartOptions,
|
|
184
|
+
): Promise<AgentHttpBinding> {
|
|
185
|
+
if (this.httpBinding) {
|
|
186
|
+
return this.httpBinding;
|
|
187
|
+
}
|
|
188
|
+
const host = String(options?.host || "127.0.0.1").trim() || "127.0.0.1";
|
|
189
|
+
const port =
|
|
190
|
+
typeof options?.port === "number" && Number.isInteger(options.port)
|
|
191
|
+
? options.port
|
|
192
|
+
: 15314;
|
|
193
|
+
const server = await startServer({
|
|
194
|
+
host,
|
|
195
|
+
port,
|
|
196
|
+
core: this.core,
|
|
197
|
+
});
|
|
198
|
+
this.httpBinding = {
|
|
199
|
+
baseUrl: `http://${host}:${port}`,
|
|
200
|
+
host,
|
|
201
|
+
port,
|
|
202
|
+
server,
|
|
203
|
+
};
|
|
204
|
+
return this.httpBinding;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* 停止当前 agent 的 HTTP server。
|
|
209
|
+
*/
|
|
210
|
+
private async stopHttp(): Promise<void> {
|
|
211
|
+
if (!this.httpBinding) return;
|
|
212
|
+
const current = this.httpBinding;
|
|
213
|
+
this.httpBinding = null;
|
|
214
|
+
await current.server.stop();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 启动当前 agent 的本地 RPC server。
|
|
219
|
+
*/
|
|
220
|
+
private async startRpc(): Promise<AgentRpcBinding> {
|
|
221
|
+
if (this.rpcBinding) {
|
|
222
|
+
return this.rpcBinding;
|
|
223
|
+
}
|
|
224
|
+
const server = await startLocalRpcServer({
|
|
225
|
+
core: this.core,
|
|
226
|
+
});
|
|
227
|
+
this.rpcBinding = {
|
|
228
|
+
endpoint: server.endpoint,
|
|
229
|
+
server,
|
|
230
|
+
};
|
|
231
|
+
return this.rpcBinding;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 停止当前 agent 的本地 RPC server。
|
|
236
|
+
*/
|
|
237
|
+
private async stopRpc(): Promise<void> {
|
|
238
|
+
if (!this.rpcBinding) return;
|
|
239
|
+
const current = this.rpcBinding;
|
|
240
|
+
this.rpcBinding = null;
|
|
241
|
+
await current.server.stop();
|
|
242
|
+
}
|
|
177
243
|
}
|
package/src/sdk/AgentSdkTypes.ts
CHANGED
|
@@ -12,9 +12,9 @@ import type { BaseService } from "@/service/builtins/BaseService.js";
|
|
|
12
12
|
import type { JsonValue } from "@/types/common/Json.js";
|
|
13
13
|
import type { Plugin } from "@/plugin/types/Plugin.js";
|
|
14
14
|
import type { SessionMessageV1 } from "@/session/types/SessionMessages.js";
|
|
15
|
-
import type { AgentPlatformRuntime } from "@/types/host/AgentHost.js";
|
|
16
|
-
import type { LocalRpcServerHandle } from "@/types/rpc/LocalRpc.js";
|
|
17
|
-
import type { ServerInstance } from "@/server/http/Server.js";
|
|
15
|
+
import type { AgentPlatformRuntime } from "@/types/runtime/host/AgentHost.js";
|
|
16
|
+
import type { LocalRpcServerHandle } from "@/types/runtime/rpc/LocalRpc.js";
|
|
17
|
+
import type { ServerInstance } from "@/runtime/server/http/Server.js";
|
|
18
18
|
import type { Session } from "@/sdk/Session.js";
|
|
19
19
|
|
|
20
20
|
/**
|