downcity 1.1.364 → 1.1.394
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 +19 -4
- package/bin/city/agent/AgentChat.d.ts.map +1 -1
- package/bin/city/agent/AgentChat.js +35 -15
- package/bin/city/agent/AgentChat.js.map +1 -1
- package/bin/city/agent/AgentChatHelpers.d.ts +11 -11
- package/bin/city/agent/AgentChatHelpers.d.ts.map +1 -1
- package/bin/city/agent/AgentChatHelpers.js +74 -74
- package/bin/city/agent/AgentChatHelpers.js.map +1 -1
- package/bin/city/agent/AgentChatInteractiveRenderer.js +2 -2
- package/bin/city/agent/AgentChatInteractiveRenderer.js.map +1 -1
- package/bin/city/agent/AgentChatRemote.d.ts +3 -3
- package/bin/city/agent/AgentChatRemote.d.ts.map +1 -1
- package/bin/city/agent/AgentChatRemote.js +16 -16
- package/bin/city/agent/AgentChatRemote.js.map +1 -1
- package/bin/city/agent/AgentChatTui.d.ts +16 -8
- package/bin/city/agent/AgentChatTui.d.ts.map +1 -1
- package/bin/city/agent/AgentChatTui.js +5 -2
- package/bin/city/agent/AgentChatTui.js.map +1 -1
- package/bin/city/agent/AgentChatTypes.d.ts +17 -17
- package/bin/city/agent/AgentChatTypes.d.ts.map +1 -1
- package/bin/city/agent/AgentExecutionModelRecovery.d.ts +2 -2
- package/bin/city/agent/AgentExecutionModelRecovery.d.ts.map +1 -1
- package/bin/city/agent/AgentExecutionModelRecovery.js +14 -15
- package/bin/city/agent/AgentExecutionModelRecovery.js.map +1 -1
- package/bin/city/agent/AgentHttpGateway.d.ts +9 -4
- package/bin/city/agent/AgentHttpGateway.d.ts.map +1 -1
- package/bin/city/agent/AgentHttpGateway.js +33 -30
- package/bin/city/agent/AgentHttpGateway.js.map +1 -1
- package/bin/city/agent/AgentManager.js +2 -2
- package/bin/city/agent/AgentManager.js.map +1 -1
- package/bin/city/agent/AgentManagerHelpers.d.ts +3 -30
- package/bin/city/agent/AgentManagerHelpers.d.ts.map +1 -1
- package/bin/city/agent/AgentManagerHelpers.js +78 -335
- package/bin/city/agent/AgentManagerHelpers.js.map +1 -1
- package/bin/city/agent/AgentManagerTypes.d.ts +4 -5
- package/bin/city/agent/AgentManagerTypes.d.ts.map +1 -1
- package/bin/city/agent/AgentModel.d.ts +1 -1
- package/bin/city/agent/AgentModel.d.ts.map +1 -1
- package/bin/city/agent/AgentModel.js +28 -26
- package/bin/city/agent/AgentModel.js.map +1 -1
- package/bin/city/agent/AgentSelection.d.ts +27 -35
- package/bin/city/agent/AgentSelection.d.ts.map +1 -1
- package/bin/city/agent/AgentSelection.js +91 -186
- package/bin/city/agent/AgentSelection.js.map +1 -1
- package/bin/city/agent/Init.d.ts +12 -4
- package/bin/city/agent/Init.d.ts.map +1 -1
- package/bin/city/agent/Init.js +70 -132
- package/bin/city/agent/Init.js.map +1 -1
- package/bin/city/agent/ManagedAgentRuntime.d.ts +28 -0
- package/bin/city/agent/ManagedAgentRuntime.d.ts.map +1 -0
- package/bin/city/agent/ManagedAgentRuntime.js +151 -0
- package/bin/city/agent/ManagedAgentRuntime.js.map +1 -0
- package/bin/city/agent/Restart.d.ts +2 -1
- package/bin/city/agent/Restart.d.ts.map +1 -1
- package/bin/city/agent/Restart.js +9 -10
- package/bin/city/agent/Restart.js.map +1 -1
- package/bin/city/agent/Run.d.ts +5 -19
- package/bin/city/agent/Run.d.ts.map +1 -1
- package/bin/city/agent/Run.js +18 -128
- package/bin/city/agent/Run.js.map +1 -1
- package/bin/city/agent/Start.d.ts +2 -1
- package/bin/city/agent/Start.d.ts.map +1 -1
- package/bin/city/agent/Start.js +9 -10
- package/bin/city/agent/Start.js.map +1 -1
- package/bin/city/agent/Status.d.ts +2 -1
- package/bin/city/agent/Status.d.ts.map +1 -1
- package/bin/city/agent/Status.js +16 -17
- package/bin/city/agent/Status.js.map +1 -1
- package/bin/city/agent/Stop.d.ts +2 -1
- package/bin/city/agent/Stop.d.ts.map +1 -1
- package/bin/city/agent/Stop.js +5 -8
- package/bin/city/agent/Stop.js.map +1 -1
- package/bin/city/agent/control/ExecuteBySession.d.ts +3 -4
- package/bin/city/agent/control/ExecuteBySession.d.ts.map +1 -1
- package/bin/city/agent/control/ExecuteBySession.js +6 -7
- package/bin/city/agent/control/ExecuteBySession.js.map +1 -1
- package/bin/city/agent/control/ExecuteInput.d.ts +2 -2
- package/bin/city/agent/control/ExecuteInput.d.ts.map +1 -1
- package/bin/city/agent/control/ExecuteInput.js +12 -12
- package/bin/city/agent/control/ExecuteInput.js.map +1 -1
- package/bin/city/agent/control/Helpers.d.ts +1 -1
- package/bin/city/agent/control/Helpers.d.ts.map +1 -1
- package/bin/city/agent/control/Helpers.js +1 -1
- package/bin/city/agent/control/Helpers.js.map +1 -1
- package/bin/city/agent/control/MessageTimeline.js +12 -12
- package/bin/city/agent/control/MessageTimeline.js.map +1 -1
- package/bin/city/agent/control/SessionSummary.d.ts +12 -0
- package/bin/city/agent/control/SessionSummary.d.ts.map +1 -0
- package/bin/city/agent/control/SessionSummary.js +20 -0
- package/bin/city/agent/control/SessionSummary.js.map +1 -0
- package/bin/city/agent/control/TaskStore.d.ts +3 -3
- package/bin/city/agent/control/TaskStore.d.ts.map +1 -1
- package/bin/city/agent/control/TaskStore.js +8 -8
- package/bin/city/agent/control/TaskStore.js.map +1 -1
- package/bin/city/agent/control/types/ControlSessionExecute.d.ts +1 -1
- package/bin/city/agent/control/types/ControlSessionExecute.js +1 -1
- package/bin/city/agent/control/types/ControlViewData.d.ts +9 -9
- package/bin/city/agent/control/types/ControlViewData.d.ts.map +1 -1
- package/bin/city/agent/create/AgentCreateWorkspace.d.ts +11 -0
- package/bin/city/agent/create/AgentCreateWorkspace.d.ts.map +1 -0
- package/bin/city/agent/create/AgentCreateWorkspace.js +66 -0
- package/bin/city/agent/create/AgentCreateWorkspace.js.map +1 -0
- package/bin/city/agent/create/NativeDirectoryPicker.d.ts +9 -0
- package/bin/city/agent/create/NativeDirectoryPicker.d.ts.map +1 -0
- package/bin/city/agent/create/NativeDirectoryPicker.js +140 -0
- package/bin/city/agent/create/NativeDirectoryPicker.js.map +1 -0
- package/bin/city/agent/http/control/ControlApiRoutes.js +1 -1
- package/bin/city/agent/http/control/ControlApiRoutes.js.map +1 -1
- package/bin/city/agent/http/control/ControlChatAccessRoutes.d.ts +2 -2
- package/bin/city/agent/http/control/ControlChatAccessRoutes.d.ts.map +1 -1
- package/bin/city/agent/http/control/ControlChatAccessRoutes.js +9 -9
- package/bin/city/agent/http/control/ControlChatAccessRoutes.js.map +1 -1
- package/bin/city/agent/http/control/ControlRouter.d.ts +2 -2
- package/bin/city/agent/http/control/ControlRouter.d.ts.map +1 -1
- package/bin/city/agent/http/control/ControlRouter.js +1 -1
- package/bin/city/agent/http/control/ControlRouter.js.map +1 -1
- package/bin/city/agent/http/control/OverviewRoutes.d.ts.map +1 -1
- package/bin/city/agent/http/control/OverviewRoutes.js +8 -17
- package/bin/city/agent/http/control/OverviewRoutes.js.map +1 -1
- package/bin/city/agent/http/control/SessionRoutes.d.ts +1 -1
- package/bin/city/agent/http/control/SessionRoutes.d.ts.map +1 -1
- package/bin/city/agent/http/control/SessionRoutes.js +65 -163
- package/bin/city/agent/http/control/SessionRoutes.js.map +1 -1
- package/bin/city/agent/http/control/TaskRoutes.d.ts.map +1 -1
- package/bin/city/agent/http/control/TaskRoutes.js +25 -29
- package/bin/city/agent/http/control/TaskRoutes.js.map +1 -1
- package/bin/city/agent/http/control/types/ControlRoutes.d.ts +2 -2
- package/bin/city/agent/http/control/types/ControlRoutes.d.ts.map +1 -1
- package/bin/city/agent/http/execute/execute.d.ts +2 -2
- package/bin/city/agent/http/execute/execute.d.ts.map +1 -1
- package/bin/city/agent/http/execute/execute.js +9 -9
- package/bin/city/agent/http/execute/execute.js.map +1 -1
- package/bin/city/agent/http/plugins/plugins.d.ts +3 -3
- package/bin/city/agent/http/plugins/plugins.d.ts.map +1 -1
- package/bin/city/agent/http/plugins/plugins.js +19 -68
- package/bin/city/agent/http/plugins/plugins.js.map +1 -1
- package/bin/city/agent/http/static/static.d.ts +2 -2
- package/bin/city/agent/http/static/static.d.ts.map +1 -1
- package/bin/city/agent/http/static/static.js +4 -4
- package/bin/city/agent/http/static/static.js.map +1 -1
- package/bin/city/agent/runtime/ExecutionBinding.d.ts +31 -0
- package/bin/city/agent/runtime/ExecutionBinding.d.ts.map +1 -0
- package/bin/city/agent/runtime/ExecutionBinding.js +46 -0
- package/bin/city/agent/runtime/ExecutionBinding.js.map +1 -0
- package/bin/city/agent/setup/AgentInitializer.d.ts +31 -0
- package/bin/city/agent/setup/AgentInitializer.d.ts.map +1 -0
- package/bin/city/agent/setup/AgentInitializer.js +109 -0
- package/bin/city/agent/setup/AgentInitializer.js.map +1 -0
- package/bin/city/agent/setup/EnvFile.d.ts +31 -0
- package/bin/city/agent/setup/EnvFile.d.ts.map +1 -0
- package/bin/city/agent/setup/EnvFile.js +92 -0
- package/bin/city/agent/setup/EnvFile.js.map +1 -0
- package/bin/city/agent/setup/Gitignore.d.ts +21 -0
- package/bin/city/agent/setup/Gitignore.d.ts.map +1 -0
- package/bin/city/agent/setup/Gitignore.js +46 -0
- package/bin/city/agent/setup/Gitignore.js.map +1 -0
- package/bin/city/agent/tui/AgentChatTuiCoordinator.d.ts +42 -48
- package/bin/city/agent/tui/AgentChatTuiCoordinator.d.ts.map +1 -1
- package/bin/city/agent/tui/AgentChatTuiCoordinator.js +208 -116
- package/bin/city/agent/tui/AgentChatTuiCoordinator.js.map +1 -1
- package/bin/city/agent/tui/PiTuiChatRenderer.d.ts +3 -3
- package/bin/city/agent/tui/PiTuiChatRenderer.d.ts.map +1 -1
- package/bin/city/agent/tui/PiTuiChatRenderer.js +10 -20
- package/bin/city/agent/tui/PiTuiChatRenderer.js.map +1 -1
- package/bin/city/agent/tui/commands/dispatch.js +3 -0
- package/bin/city/agent/tui/commands/dispatch.js.map +1 -1
- package/bin/city/agent/tui/commands/host.d.ts +2 -0
- package/bin/city/agent/tui/commands/host.d.ts.map +1 -1
- package/bin/city/agent/tui/commands/registry.d.ts.map +1 -1
- package/bin/city/agent/tui/commands/registry.js +6 -0
- package/bin/city/agent/tui/commands/registry.js.map +1 -1
- package/bin/city/agent/tui/components/AgentHeader.d.ts.map +1 -1
- package/bin/city/agent/tui/components/AgentHeader.js +11 -1
- package/bin/city/agent/tui/components/AgentHeader.js.map +1 -1
- package/bin/city/agent/tui/components/AssistantMessage.d.ts +17 -37
- package/bin/city/agent/tui/components/AssistantMessage.d.ts.map +1 -1
- package/bin/city/agent/tui/components/AssistantMessage.js +86 -74
- package/bin/city/agent/tui/components/AssistantMessage.js.map +1 -1
- package/bin/city/agent/tui/components/ChatFooter.js +3 -3
- package/bin/city/agent/tui/components/ChatFooter.js.map +1 -1
- package/bin/city/agent/tui/components/MessageList.d.ts +41 -105
- package/bin/city/agent/tui/components/MessageList.d.ts.map +1 -1
- package/bin/city/agent/tui/components/MessageList.js +142 -184
- package/bin/city/agent/tui/components/MessageList.js.map +1 -1
- package/bin/city/agent/tui/components/ToolActivity.d.ts +25 -0
- package/bin/city/agent/tui/components/ToolActivity.d.ts.map +1 -0
- package/bin/city/agent/tui/components/ToolActivity.js +76 -0
- package/bin/city/agent/tui/components/ToolActivity.js.map +1 -0
- package/bin/city/agent/tui/components/index.d.ts +1 -1
- package/bin/city/agent/tui/components/index.d.ts.map +1 -1
- package/bin/city/agent/tui/components/index.js +1 -1
- package/bin/city/agent/tui/components/index.js.map +1 -1
- package/bin/city/agent/tui/controllers/StreamingUI.d.ts +22 -70
- package/bin/city/agent/tui/controllers/StreamingUI.d.ts.map +1 -1
- package/bin/city/agent/tui/controllers/StreamingUI.js +50 -179
- package/bin/city/agent/tui/controllers/StreamingUI.js.map +1 -1
- package/bin/city/agent/tui/controllers/TranscriptNavigation.d.ts +2 -6
- package/bin/city/agent/tui/controllers/TranscriptNavigation.d.ts.map +1 -1
- package/bin/city/agent/tui/controllers/TranscriptNavigation.js +2 -18
- package/bin/city/agent/tui/controllers/TranscriptNavigation.js.map +1 -1
- package/bin/city/agent/tui/dialogs/QuestionDialog.d.ts +55 -0
- package/bin/city/agent/tui/dialogs/QuestionDialog.d.ts.map +1 -0
- package/bin/city/agent/tui/dialogs/QuestionDialog.js +188 -0
- package/bin/city/agent/tui/dialogs/QuestionDialog.js.map +1 -0
- package/bin/city/agent/tui/dialogs/SecurityPolicyDialog.d.ts +36 -0
- package/bin/city/agent/tui/dialogs/SecurityPolicyDialog.d.ts.map +1 -0
- package/bin/city/agent/tui/dialogs/SecurityPolicyDialog.js +71 -0
- package/bin/city/agent/tui/dialogs/SecurityPolicyDialog.js.map +1 -0
- package/bin/city/agent/tui/dialogs/SessionPicker.d.ts +4 -4
- package/bin/city/agent/tui/dialogs/SessionPicker.d.ts.map +1 -1
- package/bin/city/agent/tui/dialogs/SessionPicker.js +12 -12
- package/bin/city/agent/tui/dialogs/SessionPicker.js.map +1 -1
- package/bin/city/agent/tui/presentation/ToolActivityPresentation.d.ts +11 -0
- package/bin/city/agent/tui/presentation/ToolActivityPresentation.d.ts.map +1 -0
- package/bin/city/agent/tui/presentation/ToolActivityPresentation.js +118 -0
- package/bin/city/agent/tui/presentation/ToolActivityPresentation.js.map +1 -0
- package/bin/city/agent/tui/types/ToolActivity.d.ts +27 -0
- package/bin/city/agent/tui/types/ToolActivity.d.ts.map +1 -0
- package/bin/city/agent/tui/types/ToolActivity.js +8 -0
- package/bin/city/agent/tui/types/ToolActivity.js.map +1 -0
- package/bin/city/agent/tui/types/TranscriptNotice.d.ts +18 -0
- package/bin/city/agent/tui/types/TranscriptNotice.d.ts.map +1 -0
- package/bin/city/agent/tui/types/TranscriptNotice.js +8 -0
- package/bin/city/agent/tui/types/TranscriptNotice.js.map +1 -0
- package/bin/city/agent/tui/types.d.ts +5 -124
- package/bin/city/agent/tui/types.d.ts.map +1 -1
- package/bin/city/agent/tui/types.js +2 -2
- package/bin/city/command/AgentCommand.d.ts.map +1 -1
- package/bin/city/command/AgentCommand.js +61 -141
- package/bin/city/command/AgentCommand.js.map +1 -1
- package/bin/city/command/EnvCommand.d.ts +2 -7
- package/bin/city/command/EnvCommand.d.ts.map +1 -1
- package/bin/city/command/EnvCommand.js +97 -251
- package/bin/city/command/EnvCommand.js.map +1 -1
- package/bin/city/command/GatewayCommand.d.ts +1 -1
- package/bin/city/command/GatewayCommand.d.ts.map +1 -1
- package/bin/city/command/GatewayCommand.js +1 -44
- package/bin/city/command/GatewayCommand.js.map +1 -1
- package/bin/city/command/PluginCommand.d.ts +6 -7
- package/bin/city/command/PluginCommand.d.ts.map +1 -1
- package/bin/city/command/PluginCommand.js +390 -195
- package/bin/city/command/PluginCommand.js.map +1 -1
- package/bin/city/command/TokenCommand.d.ts +4 -9
- package/bin/city/command/TokenCommand.d.ts.map +1 -1
- package/bin/city/command/TokenCommand.js +83 -102
- package/bin/city/command/TokenCommand.js.map +1 -1
- package/bin/city/config/Paths.d.ts +0 -20
- package/bin/city/config/Paths.d.ts.map +1 -1
- package/bin/city/config/Paths.js +0 -46
- package/bin/city/config/Paths.js.map +1 -1
- package/bin/city/env/EnvBroadcast.d.ts +11 -0
- package/bin/city/env/EnvBroadcast.d.ts.map +1 -0
- package/bin/city/env/EnvBroadcast.js +42 -0
- package/bin/city/env/EnvBroadcast.js.map +1 -0
- package/bin/city/env/EnvFileStore.d.ts +37 -0
- package/bin/city/env/EnvFileStore.d.ts.map +1 -0
- package/bin/city/env/EnvFileStore.js +129 -0
- package/bin/city/env/EnvFileStore.js.map +1 -0
- package/bin/city/env/EnvService.d.ts +17 -0
- package/bin/city/env/EnvService.d.ts.map +1 -0
- package/bin/city/env/EnvService.js +80 -0
- package/bin/city/env/EnvService.js.map +1 -0
- package/bin/city/env/InteractiveEnvManager.d.ts +8 -0
- package/bin/city/env/InteractiveEnvManager.d.ts.map +1 -0
- package/bin/city/env/InteractiveEnvManager.js +95 -0
- package/bin/city/env/InteractiveEnvManager.js.map +1 -0
- package/bin/city/env/ProcessEnv.d.ts +10 -4
- package/bin/city/env/ProcessEnv.d.ts.map +1 -1
- package/bin/city/env/ProcessEnv.js +30 -18
- package/bin/city/env/ProcessEnv.js.map +1 -1
- package/bin/city/index.d.ts +1 -1
- package/bin/city/index.d.ts.map +1 -1
- package/bin/city/index.js +1 -14
- package/bin/city/index.js.map +1 -1
- package/bin/city/process/daemon/Api.d.ts +4 -3
- package/bin/city/process/daemon/Api.d.ts.map +1 -1
- package/bin/city/process/daemon/CliArgs.d.ts +1 -1
- package/bin/city/process/daemon/CliArgs.d.ts.map +1 -1
- package/bin/city/process/daemon/CliArgs.js +4 -4
- package/bin/city/process/daemon/CliArgs.js.map +1 -1
- package/bin/city/process/daemon/Client.d.ts +2 -2
- package/bin/city/process/daemon/Client.d.ts.map +1 -1
- package/bin/city/process/daemon/Client.js +4 -4
- package/bin/city/process/daemon/Client.js.map +1 -1
- package/bin/city/process/daemon/DaemonRpcClient.d.ts +14 -0
- package/bin/city/process/daemon/DaemonRpcClient.d.ts.map +1 -0
- package/bin/city/process/daemon/DaemonRpcClient.js +101 -0
- package/bin/city/process/daemon/DaemonRpcClient.js.map +1 -0
- package/bin/city/process/daemon/Manager.d.ts +16 -16
- package/bin/city/process/daemon/Manager.d.ts.map +1 -1
- package/bin/city/process/daemon/Manager.js +104 -118
- package/bin/city/process/daemon/Manager.js.map +1 -1
- package/bin/city/process/daemon/Types.d.ts +22 -11
- package/bin/city/process/daemon/Types.d.ts.map +1 -1
- package/bin/city/process/daemon/Types.js +3 -3
- package/bin/city/process/daemon/Types.js.map +1 -1
- package/bin/city/process/plugin/InteractivePluginManager.d.ts +12 -0
- package/bin/city/process/plugin/InteractivePluginManager.d.ts.map +1 -0
- package/bin/city/process/plugin/InteractivePluginManager.js +270 -0
- package/bin/city/process/plugin/InteractivePluginManager.js.map +1 -0
- package/bin/city/process/plugin/InteractivePluginResourceManager.d.ts +14 -0
- package/bin/city/process/plugin/InteractivePluginResourceManager.d.ts.map +1 -0
- package/bin/city/process/plugin/InteractivePluginResourceManager.js +214 -0
- package/bin/city/process/plugin/InteractivePluginResourceManager.js.map +1 -0
- package/bin/city/process/plugin/PluginBindingConfiguration.d.ts +19 -0
- package/bin/city/process/plugin/PluginBindingConfiguration.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginBindingConfiguration.js +31 -0
- package/bin/city/process/plugin/PluginBindingConfiguration.js.map +1 -0
- package/bin/city/process/plugin/PluginCatalog.d.ts +14 -0
- package/bin/city/process/plugin/PluginCatalog.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginCatalog.js +38 -0
- package/bin/city/process/plugin/PluginCatalog.js.map +1 -0
- package/bin/city/process/plugin/PluginConfigForm.d.ts +22 -0
- package/bin/city/process/plugin/PluginConfigForm.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginConfigForm.js +355 -0
- package/bin/city/process/plugin/PluginConfigForm.js.map +1 -0
- package/bin/city/process/plugin/PluginConfigValidator.d.ts +17 -0
- package/bin/city/process/plugin/PluginConfigValidator.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginConfigValidator.js +54 -0
- package/bin/city/process/plugin/PluginConfigValidator.js.map +1 -0
- package/bin/city/process/plugin/PluginInstaller.d.ts +18 -0
- package/bin/city/process/plugin/PluginInstaller.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginInstaller.js +320 -0
- package/bin/city/process/plugin/PluginInstaller.js.map +1 -0
- package/bin/city/process/plugin/PluginResourceSchema.d.ts +38 -0
- package/bin/city/process/plugin/PluginResourceSchema.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginResourceSchema.js +176 -0
- package/bin/city/process/plugin/PluginResourceSchema.js.map +1 -0
- package/bin/city/process/plugin/PluginResourceService.d.ts +32 -0
- package/bin/city/process/plugin/PluginResourceService.d.ts.map +1 -0
- package/bin/city/process/plugin/PluginResourceService.js +139 -0
- package/bin/city/process/plugin/PluginResourceService.js.map +1 -0
- package/bin/city/process/registry/CityPaths.d.ts +24 -18
- package/bin/city/process/registry/CityPaths.d.ts.map +1 -1
- package/bin/city/process/registry/CityPaths.js +43 -25
- package/bin/city/process/registry/CityPaths.js.map +1 -1
- package/bin/city/process/registry/ManagedAgentRepository.d.ts +36 -0
- package/bin/city/process/registry/ManagedAgentRepository.d.ts.map +1 -0
- package/bin/city/process/registry/ManagedAgentRepository.js +148 -0
- package/bin/city/process/registry/ManagedAgentRepository.js.map +1 -0
- package/bin/city/process/registry/PluginRepository.d.ts +39 -0
- package/bin/city/process/registry/PluginRepository.d.ts.map +1 -0
- package/bin/city/process/registry/PluginRepository.js +178 -0
- package/bin/city/process/registry/PluginRepository.js.map +1 -0
- package/bin/city/process/registry/PluginResourceRepository.d.ts +23 -0
- package/bin/city/process/registry/PluginResourceRepository.d.ts.map +1 -0
- package/bin/city/process/registry/PluginResourceRepository.js +112 -0
- package/bin/city/process/registry/PluginResourceRepository.js.map +1 -0
- package/bin/city/runtime/auth/AuthMiddleware.d.ts +3 -3
- package/bin/city/runtime/auth/AuthMiddleware.d.ts.map +1 -1
- package/bin/city/runtime/auth/AuthMiddleware.js +1 -1
- package/bin/city/runtime/auth/AuthMiddleware.js.map +1 -1
- package/bin/city/runtime/auth/AuthService.d.ts +23 -107
- package/bin/city/runtime/auth/AuthService.d.ts.map +1 -1
- package/bin/city/runtime/auth/AuthService.js +74 -276
- package/bin/city/runtime/auth/AuthService.js.map +1 -1
- package/bin/city/runtime/auth/RoutePolicy.d.ts +20 -20
- package/bin/city/runtime/auth/RoutePolicy.d.ts.map +1 -1
- package/bin/city/runtime/auth/RoutePolicy.js +33 -209
- package/bin/city/runtime/auth/RoutePolicy.js.map +1 -1
- package/bin/city/runtime/city-model/CreateRuntimeModel.d.ts +2 -2
- package/bin/city/runtime/city-model/CreateRuntimeModel.d.ts.map +1 -1
- package/bin/city/runtime/city-model/CreateRuntimeModel.js +3 -3
- package/bin/city/runtime/city-model/CreateRuntimeModel.js.map +1 -1
- package/bin/city/runtime/city-model/ExecutionModelBinding.d.ts +0 -4
- package/bin/city/runtime/city-model/ExecutionModelBinding.d.ts.map +1 -1
- package/bin/city/runtime/city-model/ExecutionModelBinding.js +3 -18
- package/bin/city/runtime/city-model/ExecutionModelBinding.js.map +1 -1
- package/bin/city/runtime/plugins/DowncityPlugins.d.ts +19 -0
- package/bin/city/runtime/plugins/DowncityPlugins.d.ts.map +1 -0
- package/bin/city/runtime/plugins/DowncityPlugins.js +227 -0
- package/bin/city/runtime/plugins/DowncityPlugins.js.map +1 -0
- package/bin/city/runtime/plugins/PluginAssembler.d.ts +19 -0
- package/bin/city/runtime/plugins/PluginAssembler.d.ts.map +1 -0
- package/bin/city/runtime/plugins/PluginAssembler.js +42 -0
- package/bin/city/runtime/plugins/PluginAssembler.js.map +1 -0
- package/bin/city/runtime/plugins/PluginTypeLoader.d.ts +23 -0
- package/bin/city/runtime/plugins/PluginTypeLoader.d.ts.map +1 -0
- package/bin/city/runtime/plugins/PluginTypeLoader.js +106 -0
- package/bin/city/runtime/plugins/PluginTypeLoader.js.map +1 -0
- package/bin/city/runtime/store/StoreAgentTokenRepository.d.ts +23 -0
- package/bin/city/runtime/store/StoreAgentTokenRepository.d.ts.map +1 -0
- package/bin/city/runtime/store/StoreAgentTokenRepository.js +54 -0
- package/bin/city/runtime/store/StoreAgentTokenRepository.js.map +1 -0
- package/bin/city/runtime/store/StoreManagedAgentRepository.d.ts +21 -0
- package/bin/city/runtime/store/StoreManagedAgentRepository.d.ts.map +1 -0
- package/bin/city/runtime/store/StoreManagedAgentRepository.js +70 -0
- package/bin/city/runtime/store/StoreManagedAgentRepository.js.map +1 -0
- package/bin/city/runtime/store/StorePluginRepository.d.ts +27 -0
- package/bin/city/runtime/store/StorePluginRepository.d.ts.map +1 -0
- package/bin/city/runtime/store/StorePluginRepository.js +116 -0
- package/bin/city/runtime/store/StorePluginRepository.js.map +1 -0
- package/bin/city/runtime/store/StorePluginResourceRepository.d.ts +19 -0
- package/bin/city/runtime/store/StorePluginResourceRepository.d.ts.map +1 -0
- package/bin/city/runtime/store/StorePluginResourceRepository.js +60 -0
- package/bin/city/runtime/store/StorePluginResourceRepository.js.map +1 -0
- package/bin/city/runtime/store/StoreSchema.d.ts.map +1 -1
- package/bin/city/runtime/store/StoreSchema.js +253 -169
- package/bin/city/runtime/store/StoreSchema.js.map +1 -1
- package/bin/city/runtime/store/StoreSecureSettings.js +2 -2
- package/bin/city/runtime/store/StoreSecureSettings.js.map +1 -1
- package/bin/city/runtime/store/StoreShared.d.ts +0 -5
- package/bin/city/runtime/store/StoreShared.d.ts.map +1 -1
- package/bin/city/runtime/store/StoreShared.js +0 -10
- package/bin/city/runtime/store/StoreShared.js.map +1 -1
- package/bin/city/runtime/store/index.d.ts +1 -70
- package/bin/city/runtime/store/index.d.ts.map +1 -1
- package/bin/city/runtime/store/index.js +6 -108
- package/bin/city/runtime/store/index.js.map +1 -1
- package/bin/city/shared/CityAgentRuntime.d.ts +5 -8
- package/bin/city/shared/CityAgentRuntime.d.ts.map +1 -1
- package/bin/city/shared/CityAgentRuntime.js +21 -41
- package/bin/city/shared/CityAgentRuntime.js.map +1 -1
- package/bin/city/shared/CityBalance.d.ts +1 -1
- package/bin/city/shared/CityBalance.d.ts.map +1 -1
- package/bin/city/shared/CityBalance.js +22 -20
- package/bin/city/shared/CityBalance.js.map +1 -1
- package/bin/city/shared/FederationConnection.d.ts +1 -1
- package/bin/city/shared/FederationConnection.js +1 -1
- package/bin/city/shared/PluginTargetSupport.d.ts +16 -66
- package/bin/city/shared/PluginTargetSupport.d.ts.map +1 -1
- package/bin/city/shared/PluginTargetSupport.js +34 -186
- package/bin/city/shared/PluginTargetSupport.js.map +1 -1
- package/bin/city/tui/FederationManagerFormat.d.ts.map +1 -1
- package/bin/city/tui/FederationManagerFormat.js +4 -5
- package/bin/city/tui/FederationManagerFormat.js.map +1 -1
- package/bin/city/tui/FederationManagerPrompts.d.ts +1 -1
- package/bin/city/tui/FederationManagerPrompts.d.ts.map +1 -1
- package/bin/city/tui/FederationManagerPrompts.js +5 -5
- package/bin/city/tui/FederationManagerPrompts.js.map +1 -1
- package/bin/city/tui/FederationManagerState.js +6 -6
- package/bin/city/tui/FederationManagerState.js.map +1 -1
- package/bin/city/types/AgentChatInteractive.d.ts +10 -14
- package/bin/city/types/AgentChatInteractive.d.ts.map +1 -1
- package/bin/city/types/AgentModel.d.ts +0 -2
- package/bin/city/types/AgentModel.d.ts.map +1 -1
- package/bin/city/types/ChatAccessCommand.d.ts +2 -2
- package/bin/city/types/ChatAccessCommand.d.ts.map +1 -1
- package/bin/city/types/CityBalance.d.ts +13 -55
- package/bin/city/types/CityBalance.d.ts.map +1 -1
- package/bin/city/types/CityBalance.js +1 -1
- package/bin/city/types/FederationMembership.d.ts +1 -1
- package/bin/city/types/FederationMembership.js +1 -1
- package/bin/city/types/agent/AgentCreateWorkspace.d.ts +19 -0
- package/bin/city/types/agent/AgentCreateWorkspace.d.ts.map +1 -0
- package/bin/city/types/agent/AgentCreateWorkspace.js +5 -0
- package/bin/city/types/agent/AgentCreateWorkspace.js.map +1 -0
- package/bin/city/types/agent/AgentSelection.d.ts +26 -0
- package/bin/city/types/agent/AgentSelection.d.ts.map +1 -0
- package/bin/city/types/agent/AgentSelection.js +9 -0
- package/bin/city/types/agent/AgentSelection.js.map +1 -0
- package/bin/city/types/agent/ManagedAgent.d.ts +57 -0
- package/bin/city/types/agent/ManagedAgent.d.ts.map +1 -0
- package/bin/city/types/agent/ManagedAgent.js +10 -0
- package/bin/city/types/agent/ManagedAgent.js.map +1 -0
- package/bin/city/types/agent/ManagedAgentRuntime.d.ts +15 -0
- package/bin/city/types/agent/ManagedAgentRuntime.d.ts.map +1 -0
- package/bin/city/types/agent/ManagedAgentRuntime.js +7 -0
- package/bin/city/types/agent/ManagedAgentRuntime.js.map +1 -0
- package/bin/city/types/auth/AgentToken.d.ts +37 -0
- package/bin/city/types/auth/AgentToken.d.ts.map +1 -0
- package/bin/city/types/auth/AgentToken.js +7 -0
- package/bin/city/types/auth/AgentToken.js.map +1 -0
- package/bin/city/types/config/AgentProject.d.ts +58 -0
- package/bin/city/types/config/AgentProject.d.ts.map +1 -0
- package/bin/city/types/config/AgentProject.js +9 -0
- package/bin/city/types/config/AgentProject.js.map +1 -0
- package/bin/city/types/config/DowncityConfig.d.ts +46 -0
- package/bin/city/types/config/DowncityConfig.d.ts.map +1 -0
- package/bin/city/types/config/DowncityConfig.js +2 -0
- package/bin/city/types/config/DowncityConfig.js.map +1 -0
- package/bin/city/types/config/EnvFile.d.ts +30 -0
- package/bin/city/types/config/EnvFile.d.ts.map +1 -0
- package/bin/city/types/config/EnvFile.js +10 -0
- package/bin/city/types/config/EnvFile.js.map +1 -0
- package/bin/city/types/config/ExecutionBinding.d.ts +26 -0
- package/bin/city/types/config/ExecutionBinding.d.ts.map +1 -0
- package/bin/city/types/config/ExecutionBinding.js +10 -0
- package/bin/city/types/config/ExecutionBinding.js.map +1 -0
- package/bin/city/types/config/LlmConfig.d.ts +102 -0
- package/bin/city/types/config/LlmConfig.d.ts.map +1 -0
- package/bin/city/types/config/LlmConfig.js +12 -0
- package/bin/city/types/config/LlmConfig.js.map +1 -0
- package/bin/city/types/env/EnvBroadcast.d.ts +18 -0
- package/bin/city/types/env/EnvBroadcast.d.ts.map +1 -0
- package/bin/city/types/env/EnvBroadcast.js +5 -0
- package/bin/city/types/env/EnvBroadcast.js.map +1 -0
- package/bin/city/types/env/EnvTarget.d.ts +29 -0
- package/bin/city/types/env/EnvTarget.d.ts.map +1 -0
- package/bin/city/types/env/EnvTarget.js +5 -0
- package/bin/city/types/env/EnvTarget.js.map +1 -0
- package/bin/city/types/plugin/AgentPluginBinding.d.ts +37 -0
- package/bin/city/types/plugin/AgentPluginBinding.d.ts.map +1 -0
- package/bin/city/types/plugin/AgentPluginBinding.js +7 -0
- package/bin/city/types/plugin/AgentPluginBinding.js.map +1 -0
- package/bin/city/types/plugin/PluginCatalog.d.ts +28 -0
- package/bin/city/types/plugin/PluginCatalog.d.ts.map +1 -0
- package/bin/city/types/plugin/PluginCatalog.js +3 -0
- package/bin/city/types/plugin/PluginCatalog.js.map +1 -0
- package/bin/city/types/plugin/PluginConfigForm.d.ts +12 -0
- package/bin/city/types/plugin/PluginConfigForm.d.ts.map +1 -0
- package/bin/city/types/plugin/PluginConfigForm.js +3 -0
- package/bin/city/types/plugin/PluginConfigForm.js.map +1 -0
- package/bin/city/types/plugin/PluginInstallation.d.ts +104 -0
- package/bin/city/types/plugin/PluginInstallation.d.ts.map +1 -0
- package/bin/city/types/plugin/PluginInstallation.js +13 -0
- package/bin/city/types/plugin/PluginInstallation.js.map +1 -0
- package/bin/city/types/plugin/PluginResource.d.ts +55 -0
- package/bin/city/types/plugin/PluginResource.d.ts.map +1 -0
- package/bin/city/types/plugin/PluginResource.js +10 -0
- package/bin/city/types/plugin/PluginResource.js.map +1 -0
- package/bin/city/types/runtime/InlineInstant.d.ts +82 -0
- package/bin/city/types/runtime/InlineInstant.d.ts.map +1 -0
- package/bin/city/types/runtime/InlineInstant.js +10 -0
- package/bin/city/types/runtime/InlineInstant.js.map +1 -0
- package/bin/city/types/runtime/Platform.d.ts +310 -0
- package/bin/city/types/runtime/Platform.d.ts.map +1 -0
- package/bin/city/types/runtime/Platform.js +10 -0
- package/bin/city/types/runtime/Platform.js.map +1 -0
- package/bin/city/types/runtime/PlatformGateway.d.ts +41 -0
- package/bin/city/types/runtime/PlatformGateway.d.ts.map +1 -0
- package/bin/city/types/runtime/PlatformGateway.js +2 -0
- package/bin/city/types/runtime/PlatformGateway.js.map +1 -0
- package/bin/city/utils/Id.d.ts +1 -1
- package/bin/city/utils/Id.d.ts.map +1 -1
- package/bin/city/utils/Id.js +1 -1
- package/bin/city/utils/Id.js.map +1 -1
- package/bin/federation/admin/commands/credits.d.ts +11 -0
- package/bin/federation/admin/commands/credits.d.ts.map +1 -0
- package/bin/federation/admin/commands/credits.js +157 -0
- package/bin/federation/admin/commands/credits.js.map +1 -0
- package/bin/federation/admin/commands/payment.d.ts.map +1 -1
- package/bin/federation/admin/commands/payment.js +1 -1
- package/bin/federation/admin/commands/payment.js.map +1 -1
- package/bin/federation/admin/dashboard/dashboard-data.js +5 -5
- package/bin/federation/admin/dashboard/dashboard-data.js.map +1 -1
- package/bin/federation/admin/dashboard/dashboard-format.js +5 -5
- package/bin/federation/admin/dashboard/dashboard-format.js.map +1 -1
- package/bin/federation/admin/dashboard/dashboard-metrics.js +11 -11
- package/bin/federation/admin/dashboard/dashboard-metrics.js.map +1 -1
- package/bin/federation/admin/loop.js +7 -7
- package/bin/federation/admin/loop.js.map +1 -1
- package/bin/federation/bureau/InteractiveBureauTokenManager.d.ts +11 -0
- package/bin/federation/bureau/InteractiveBureauTokenManager.d.ts.map +1 -0
- package/bin/federation/bureau/InteractiveBureauTokenManager.js +166 -0
- package/bin/federation/bureau/InteractiveBureauTokenManager.js.map +1 -0
- package/bin/federation/bureau/commands/bureau.d.ts +10 -2
- package/bin/federation/bureau/commands/bureau.d.ts.map +1 -1
- package/bin/federation/bureau/commands/bureau.js +72 -9
- package/bin/federation/bureau/commands/bureau.js.map +1 -1
- package/bin/federation/core/update.d.ts +6 -0
- package/bin/federation/core/update.d.ts.map +1 -1
- package/bin/federation/core/update.js +9 -7
- package/bin/federation/core/update.js.map +1 -1
- package/bin/federation/create/templates/CloudflareWorkersTemplate.js +2 -2
- package/bin/federation/create/templates/LocalNodeTemplate.js +2 -2
- package/bin/federation/index.d.ts.map +1 -1
- package/bin/federation/index.js +12 -6
- package/bin/federation/index.js.map +1 -1
- package/bin/federation/types/AdminDashboard.d.ts +8 -8
- package/bin/federation/types/AdminDashboard.d.ts.map +1 -1
- package/bin/federation/types/FederationBureau.d.ts +7 -0
- package/bin/federation/types/FederationBureau.d.ts.map +1 -1
- package/bin/shared/IndexSupport.d.ts +4 -7
- package/bin/shared/IndexSupport.d.ts.map +1 -1
- package/bin/shared/IndexSupport.js +5 -23
- package/bin/shared/IndexSupport.js.map +1 -1
- package/bin/shared/types/CliReporter.d.ts +1 -1
- package/package.json +16 -14
- package/bin/city/agent/AgentHistory.d.ts +0 -14
- package/bin/city/agent/AgentHistory.d.ts.map +0 -1
- package/bin/city/agent/AgentHistory.js +0 -95
- package/bin/city/agent/AgentHistory.js.map +0 -1
- package/bin/city/agent/AgentHistoryTypes.d.ts +0 -24
- package/bin/city/agent/AgentHistoryTypes.d.ts.map +0 -1
- package/bin/city/agent/AgentHistoryTypes.js +0 -9
- package/bin/city/agent/AgentHistoryTypes.js.map +0 -1
- package/bin/city/agent/AgentSelectionTypes.d.ts +0 -30
- package/bin/city/agent/AgentSelectionTypes.d.ts.map +0 -1
- package/bin/city/agent/AgentSelectionTypes.js +0 -5
- package/bin/city/agent/AgentSelectionTypes.js.map +0 -1
- package/bin/city/agent/control/SessionSummaryStore.d.ts +0 -18
- package/bin/city/agent/control/SessionSummaryStore.d.ts.map +0 -1
- package/bin/city/agent/control/SessionSummaryStore.js +0 -66
- package/bin/city/agent/control/SessionSummaryStore.js.map +0 -1
- package/bin/city/agent/tui/components/ToolCallBlock.d.ts +0 -85
- package/bin/city/agent/tui/components/ToolCallBlock.d.ts.map +0 -1
- package/bin/city/agent/tui/components/ToolCallBlock.js +0 -320
- package/bin/city/agent/tui/components/ToolCallBlock.js.map +0 -1
- package/bin/city/agent/tui/history/HistoryLoader.d.ts +0 -10
- package/bin/city/agent/tui/history/HistoryLoader.d.ts.map +0 -1
- package/bin/city/agent/tui/history/HistoryLoader.js +0 -89
- package/bin/city/agent/tui/history/HistoryLoader.js.map +0 -1
- package/bin/city/command/ChatAccessCommand.d.ts +0 -30
- package/bin/city/command/ChatAccessCommand.d.ts.map +0 -1
- package/bin/city/command/ChatAccessCommand.js +0 -278
- package/bin/city/command/ChatAccessCommand.js.map +0 -1
- package/bin/city/command/ChatCommand.d.ts +0 -14
- package/bin/city/command/ChatCommand.d.ts.map +0 -1
- package/bin/city/command/ChatCommand.js +0 -33
- package/bin/city/command/ChatCommand.js.map +0 -1
- package/bin/city/command/ConfigCommand.d.ts +0 -14
- package/bin/city/command/ConfigCommand.d.ts.map +0 -1
- package/bin/city/command/ConfigCommand.js +0 -268
- package/bin/city/command/ConfigCommand.js.map +0 -1
- package/bin/city/command/ManagedPluginActionCommand.d.ts +0 -15
- package/bin/city/command/ManagedPluginActionCommand.d.ts.map +0 -1
- package/bin/city/command/ManagedPluginActionCommand.js +0 -351
- package/bin/city/command/ManagedPluginActionCommand.js.map +0 -1
- package/bin/city/command/PluginScheduleCommand.d.ts +0 -37
- package/bin/city/command/PluginScheduleCommand.d.ts.map +0 -1
- package/bin/city/command/PluginScheduleCommand.js +0 -310
- package/bin/city/command/PluginScheduleCommand.js.map +0 -1
- package/bin/city/command/plugin/PluginHelpers.d.ts +0 -69
- package/bin/city/command/plugin/PluginHelpers.d.ts.map +0 -1
- package/bin/city/command/plugin/PluginHelpers.js +0 -339
- package/bin/city/command/plugin/PluginHelpers.js.map +0 -1
- package/bin/city/command/token/TokenActions.d.ts +0 -25
- package/bin/city/command/token/TokenActions.d.ts.map +0 -1
- package/bin/city/command/token/TokenActions.js +0 -98
- package/bin/city/command/token/TokenActions.js.map +0 -1
- package/bin/city/command/token/TokenHelpers.d.ts +0 -47
- package/bin/city/command/token/TokenHelpers.d.ts.map +0 -1
- package/bin/city/command/token/TokenHelpers.js +0 -135
- package/bin/city/command/token/TokenHelpers.js.map +0 -1
- package/bin/city/command/token/TokenPrompts.d.ts +0 -13
- package/bin/city/command/token/TokenPrompts.d.ts.map +0 -1
- package/bin/city/command/token/TokenPrompts.js +0 -328
- package/bin/city/command/token/TokenPrompts.js.map +0 -1
- package/bin/city/command/token/TokenRender.d.ts +0 -21
- package/bin/city/command/token/TokenRender.d.ts.map +0 -1
- package/bin/city/command/token/TokenRender.js +0 -81
- package/bin/city/command/token/TokenRender.js.map +0 -1
- package/bin/city/process/registry/AgentConfigStore.d.ts +0 -29
- package/bin/city/process/registry/AgentConfigStore.d.ts.map +0 -1
- package/bin/city/process/registry/AgentConfigStore.js +0 -96
- package/bin/city/process/registry/AgentConfigStore.js.map +0 -1
- package/bin/city/process/registry/CityRegistry.d.ts +0 -50
- package/bin/city/process/registry/CityRegistry.d.ts.map +0 -1
- package/bin/city/process/registry/CityRegistry.js +0 -256
- package/bin/city/process/registry/CityRegistry.js.map +0 -1
- package/bin/city/runtime/auth/AuthEnv.d.ts +0 -45
- package/bin/city/runtime/auth/AuthEnv.d.ts.map +0 -1
- package/bin/city/runtime/auth/AuthEnv.js +0 -63
- package/bin/city/runtime/auth/AuthEnv.js.map +0 -1
- package/bin/city/runtime/auth/AuthRoutes.d.ts +0 -17
- package/bin/city/runtime/auth/AuthRoutes.d.ts.map +0 -1
- package/bin/city/runtime/auth/AuthRoutes.js +0 -78
- package/bin/city/runtime/auth/AuthRoutes.js.map +0 -1
- package/bin/city/runtime/auth/AuthStore.d.ts +0 -164
- package/bin/city/runtime/auth/AuthStore.d.ts.map +0 -1
- package/bin/city/runtime/auth/AuthStore.js +0 -437
- package/bin/city/runtime/auth/AuthStore.js.map +0 -1
- package/bin/city/runtime/auth/CliAuthStateStore.d.ts +0 -33
- package/bin/city/runtime/auth/CliAuthStateStore.d.ts.map +0 -1
- package/bin/city/runtime/auth/CliAuthStateStore.js +0 -30
- package/bin/city/runtime/auth/CliAuthStateStore.js.map +0 -1
- package/bin/city/runtime/auth/PasswordHasher.d.ts +0 -16
- package/bin/city/runtime/auth/PasswordHasher.d.ts.map +0 -1
- package/bin/city/runtime/auth/PasswordHasher.js +0 -37
- package/bin/city/runtime/auth/PasswordHasher.js.map +0 -1
- package/bin/city/runtime/gateway/runtime/GatewayInit.d.ts +0 -13
- package/bin/city/runtime/gateway/runtime/GatewayInit.d.ts.map +0 -1
- package/bin/city/runtime/gateway/runtime/GatewayInit.js +0 -43
- package/bin/city/runtime/gateway/runtime/GatewayInit.js.map +0 -1
- package/bin/city/runtime/plugins/CityBuiltinPlugins.d.ts +0 -42
- package/bin/city/runtime/plugins/CityBuiltinPlugins.d.ts.map +0 -1
- package/bin/city/runtime/plugins/CityBuiltinPlugins.js +0 -134
- package/bin/city/runtime/plugins/CityBuiltinPlugins.js.map +0 -1
- package/bin/city/runtime/store/StoreAgentConfigRepository.d.ts +0 -28
- package/bin/city/runtime/store/StoreAgentConfigRepository.d.ts.map +0 -1
- package/bin/city/runtime/store/StoreAgentConfigRepository.js +0 -81
- package/bin/city/runtime/store/StoreAgentConfigRepository.js.map +0 -1
- package/bin/city/runtime/store/StoreChannelAccountRepository.d.ts +0 -34
- package/bin/city/runtime/store/StoreChannelAccountRepository.d.ts.map +0 -1
- package/bin/city/runtime/store/StoreChannelAccountRepository.js +0 -198
- package/bin/city/runtime/store/StoreChannelAccountRepository.js.map +0 -1
- package/bin/city/runtime/store/StoreEnvRepository.d.ts +0 -54
- package/bin/city/runtime/store/StoreEnvRepository.d.ts.map +0 -1
- package/bin/city/runtime/store/StoreEnvRepository.js +0 -187
- package/bin/city/runtime/store/StoreEnvRepository.js.map +0 -1
- package/bin/city/shared/ChatAccessManager.d.ts +0 -10
- package/bin/city/shared/ChatAccessManager.d.ts.map +0 -1
- package/bin/city/shared/ChatAccessManager.js +0 -145
- package/bin/city/shared/ChatAccessManager.js.map +0 -1
- package/bin/city/shared/ChatManager.d.ts +0 -14
- package/bin/city/shared/ChatManager.d.ts.map +0 -1
- package/bin/city/shared/ChatManager.js +0 -460
- package/bin/city/shared/ChatManager.js.map +0 -1
- package/bin/city/shared/ChatManagerTypes.d.ts +0 -23
- package/bin/city/shared/ChatManagerTypes.d.ts.map +0 -1
- package/bin/city/shared/ChatManagerTypes.js +0 -5
- package/bin/city/shared/ChatManagerTypes.js.map +0 -1
- package/bin/city/shared/ManagedPluginRemote.d.ts +0 -30
- package/bin/city/shared/ManagedPluginRemote.d.ts.map +0 -1
- package/bin/city/shared/ManagedPluginRemote.js +0 -200
- package/bin/city/shared/ManagedPluginRemote.js.map +0 -1
- package/bin/city/shared/Update.d.ts +0 -43
- package/bin/city/shared/Update.d.ts.map +0 -1
- package/bin/city/shared/Update.js +0 -180
- package/bin/city/shared/Update.js.map +0 -1
- package/bin/city/types/AgentConfig.d.ts +0 -41
- package/bin/city/types/AgentConfig.d.ts.map +0 -1
- package/bin/city/types/AgentConfig.js +0 -9
- package/bin/city/types/AgentConfig.js.map +0 -1
- package/bin/federation/admin/commands/balance.d.ts +0 -7
- package/bin/federation/admin/commands/balance.d.ts.map +0 -1
- package/bin/federation/admin/commands/balance.js +0 -257
- package/bin/federation/admin/commands/balance.js.map +0 -1
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ npm install -g downcity
|
|
|
7
7
|
downcity -v
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
安装后会得到 `city` / `downcity` 与 `fed` / `downfed`
|
|
10
|
+
安装后会得到 `city` / `downcity` 与 `fed` / `downfed` 两个相互独立的工具:
|
|
11
11
|
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
12
|
+
- `city` 是本机 City 容器,基于 `City()` 与 Agent SDK 管理全局 Agent、运行时、Plugin 与控制台。
|
|
13
|
+
- `fed` 是 Federation Server Manager;TUI 用于注册和管理 Server,项目命令读取当前目录的 `federation.json`。Local Node.js 和 Cloudflare Workers 都通过 `fed deploy` 部署。
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
fed create ./my-fed
|
|
@@ -22,10 +22,25 @@ fed
|
|
|
22
22
|
|
|
23
23
|
`fed create` 默认生成 Local Node.js + SQLite 项目。Local deploy 会自动注入并保存 admin key。无参数执行 `fed` 会进入系统级 Federation 管理面板,已部署实例不依赖当前工作目录。
|
|
24
24
|
|
|
25
|
+
City 的主要命令:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
city agent create .
|
|
29
|
+
city agent start <agent_id>
|
|
30
|
+
city agent token create <agent_id> --name local
|
|
31
|
+
city plugin action <plugin_name> <action_name> <agent_id> --input '{}'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`city agent start` 创建的 Agent 默认启用 `ask_question` Tool。使用
|
|
35
|
+
`city agent chat <agent_id>` 交互时,模型可以在缺少关键信息时显示文本、单选或多选问题;
|
|
36
|
+
回答会通过 Session Interaction 提交,并在同一轮模型执行中继续处理。
|
|
37
|
+
|
|
38
|
+
Agent 与 Plugin Binding 统一保存在全局数据库;Plugin 配置不进入 Agent SDK 的运行时 Plugin 对象。未传 `agent_id` 时,TTY 打开全局 Agent 选择器,非交互环境直接报错。
|
|
39
|
+
|
|
25
40
|
为独立产品后端登记 Bureau:
|
|
26
41
|
|
|
27
42
|
```bash
|
|
28
43
|
fed bureau token
|
|
29
44
|
```
|
|
30
45
|
|
|
31
|
-
|
|
46
|
+
命令打开 Bureau Token 交互式管理界面,可创建、查看和撤销 Token。创建时必须输入用途,也可以直接运行 `fed bureau token create`。CLI 在本地生成 `bureau_token`,Federation 保存用途和 hash,并将明文输出一次。把明文写入 Bureau 服务器的 `DOWNCITY_BUREAU_TOKEN` 环境变量;Federation 与 Bureau 不需要部署在同一台服务器。脚本中可用 `fed bureau token list` 查看,使用 `fed bureau token revoke <token_id>` 撤销。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentChat.d.ts","sourceRoot":"","sources":["../../../src/city/agent/AgentChat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentChat.d.ts","sourceRoot":"","sources":["../../../src/city/agent/AgentChat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAU1E;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsI7E"}
|
|
@@ -12,7 +12,6 @@ import { emitCliBlock } from "../../shared/CliReporter.js";
|
|
|
12
12
|
import { createRemoteChatSession, listRemoteChatSessions, } from "./AgentChatRemote.js";
|
|
13
13
|
import { run_agent_chat_tui } from "./AgentChatTui.js";
|
|
14
14
|
import { normalizeChatMessage, resolveAgentChatSessionOptions, resolveChatTargetAgentId, resolveInteractiveChatSession, runOneShotChat, runSdkPromptTurn, } from "./AgentChatHelpers.js";
|
|
15
|
-
import { session_messages_to_entries } from "./tui/history/HistoryLoader.js";
|
|
16
15
|
/**
|
|
17
16
|
* `city agent chat` 统一入口。
|
|
18
17
|
*/
|
|
@@ -26,13 +25,13 @@ export async function chatCommand(options) {
|
|
|
26
25
|
});
|
|
27
26
|
return;
|
|
28
27
|
}
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
28
|
+
const agent_id = await resolveChatTargetAgentId(options.to);
|
|
29
|
+
if (!agent_id)
|
|
31
30
|
return;
|
|
32
31
|
const oneShotMessage = normalizeChatMessage(String(options.message || ""));
|
|
33
32
|
if (oneShotMessage) {
|
|
34
33
|
await runOneShotChat({
|
|
35
|
-
|
|
34
|
+
agent_id,
|
|
36
35
|
message: oneShotMessage,
|
|
37
36
|
options,
|
|
38
37
|
});
|
|
@@ -55,7 +54,7 @@ export async function chatCommand(options) {
|
|
|
55
54
|
return;
|
|
56
55
|
}
|
|
57
56
|
const interactive = await resolveInteractiveChatSession({
|
|
58
|
-
|
|
57
|
+
agent_id,
|
|
59
58
|
options,
|
|
60
59
|
transport: {
|
|
61
60
|
host: options.host,
|
|
@@ -74,34 +73,55 @@ export async function chatCommand(options) {
|
|
|
74
73
|
}
|
|
75
74
|
try {
|
|
76
75
|
await run_agent_chat_tui({
|
|
77
|
-
agent_id:
|
|
78
|
-
session_id: interactive.target.
|
|
76
|
+
agent_id: agent_id,
|
|
77
|
+
session_id: interactive.target.session_id,
|
|
79
78
|
list_sessions: async () => await listRemoteChatSessions({
|
|
80
79
|
remote_agent: interactive.remote_agent,
|
|
81
80
|
}),
|
|
82
81
|
create_session: async () => await createRemoteChatSession({
|
|
83
82
|
remote_agent: interactive.remote_agent,
|
|
84
83
|
}),
|
|
85
|
-
|
|
84
|
+
load_session_context: async (session_id) => {
|
|
86
85
|
const session = await interactive.remote_agent.sessions.get(session_id);
|
|
87
|
-
const [info, messages] = await Promise.all([
|
|
86
|
+
const [info, messages, status, interactions] = await Promise.all([
|
|
88
87
|
session.get_info(),
|
|
89
88
|
session.messages(),
|
|
89
|
+
session.status(),
|
|
90
|
+
session.interactions(),
|
|
90
91
|
]);
|
|
91
92
|
const title = info.title?.trim() || "Untitled";
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
return {
|
|
94
|
+
title,
|
|
95
|
+
messages: messages.items,
|
|
96
|
+
security: status.security,
|
|
97
|
+
interactions,
|
|
98
|
+
};
|
|
94
99
|
},
|
|
95
|
-
|
|
100
|
+
get_session_status: async (session_id) => {
|
|
96
101
|
const session = await interactive.remote_agent.sessions.get(session_id);
|
|
97
|
-
return await session.
|
|
102
|
+
return await session.status();
|
|
103
|
+
},
|
|
104
|
+
set_session_security: async (session_id, mode) => {
|
|
105
|
+
const session = await interactive.remote_agent.sessions.get(session_id);
|
|
106
|
+
await session.set({ security: { approval_mode: mode } });
|
|
107
|
+
},
|
|
108
|
+
stop_session: async (session_id) => {
|
|
109
|
+
const session = await interactive.remote_agent.sessions.get(session_id);
|
|
110
|
+
return await session.stop();
|
|
111
|
+
},
|
|
112
|
+
respond_interaction: async (session_id, interaction_id, response) => {
|
|
113
|
+
const session = await interactive.remote_agent.sessions.get(session_id);
|
|
114
|
+
return await session.respond({
|
|
115
|
+
interaction_id,
|
|
116
|
+
response,
|
|
117
|
+
});
|
|
98
118
|
},
|
|
99
119
|
run_turn: async ({ session_id, message, interactive_renderer }) => {
|
|
100
120
|
const outcome = await runSdkPromptTurn({
|
|
101
|
-
|
|
121
|
+
agent_id,
|
|
102
122
|
message,
|
|
103
123
|
sessionOptions: {
|
|
104
|
-
|
|
124
|
+
session_id: session_id,
|
|
105
125
|
newSession: false,
|
|
106
126
|
},
|
|
107
127
|
transport: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentChat.js","sourceRoot":"","sources":["../../../src/city/agent/AgentChat.ts"],"names":[],"mappings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Op
|
|
|
13
13
|
import type { AgentChatInteractiveRendererPort } from "../types/AgentChatInteractive.js";
|
|
14
14
|
export type ResolvedAgentChatTarget = {
|
|
15
15
|
/** 目标 agent id。 */
|
|
16
|
-
|
|
16
|
+
agent_id: string;
|
|
17
17
|
/** 目标项目根目录。 */
|
|
18
|
-
|
|
19
|
-
/** 当前 chat 绑定的
|
|
20
|
-
|
|
18
|
+
project_root: string;
|
|
19
|
+
/** 当前 chat 绑定的 session_id。 */
|
|
20
|
+
session_id: string;
|
|
21
21
|
/** 当前 chat 是否要求创建全新的 session。 */
|
|
22
22
|
createNewSession: boolean;
|
|
23
23
|
};
|
|
@@ -49,11 +49,11 @@ export declare function resolveAgentChatTarget(agentIdInput: string, sessionOpti
|
|
|
49
49
|
}>;
|
|
50
50
|
export declare function printAssistantReply(replyText: string): void;
|
|
51
51
|
export declare function printAgentChatFailure(params: {
|
|
52
|
-
|
|
52
|
+
agent_id: string;
|
|
53
53
|
error?: string;
|
|
54
54
|
}): void;
|
|
55
55
|
export declare function resolveInteractiveChatSession(params: {
|
|
56
|
-
|
|
56
|
+
agent_id: string;
|
|
57
57
|
options: AgentChatCliOptions;
|
|
58
58
|
transport?: {
|
|
59
59
|
host?: string;
|
|
@@ -68,7 +68,7 @@ export declare function resolveInteractiveChatSession(params: {
|
|
|
68
68
|
error?: string;
|
|
69
69
|
}>;
|
|
70
70
|
export declare function runSdkPromptTurn(params: {
|
|
71
|
-
|
|
71
|
+
agent_id: string;
|
|
72
72
|
message: string;
|
|
73
73
|
sessionOptions?: AgentChatSessionOptions;
|
|
74
74
|
transport?: {
|
|
@@ -81,15 +81,15 @@ export declare function runSdkPromptTurn(params: {
|
|
|
81
81
|
success: boolean;
|
|
82
82
|
error?: string;
|
|
83
83
|
emittedVisibleText: boolean;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
session_id: string;
|
|
85
|
+
project_root?: string;
|
|
86
86
|
text?: string;
|
|
87
87
|
}>;
|
|
88
88
|
/**
|
|
89
89
|
* 向目标 agent 的 SDK actor session 发送一轮消息。
|
|
90
90
|
*/
|
|
91
91
|
export declare function executeAgentChatTurn(params: {
|
|
92
|
-
|
|
92
|
+
agent_id: string;
|
|
93
93
|
message: string;
|
|
94
94
|
sessionOptions?: AgentChatSessionOptions;
|
|
95
95
|
transport?: {
|
|
@@ -98,7 +98,7 @@ export declare function executeAgentChatTurn(params: {
|
|
|
98
98
|
};
|
|
99
99
|
}): Promise<AgentChatExecutionOutcome>;
|
|
100
100
|
export declare function runOneShotChat(params: {
|
|
101
|
-
|
|
101
|
+
agent_id: string;
|
|
102
102
|
message: string;
|
|
103
103
|
options: AgentChatCliOptions;
|
|
104
104
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentChatHelpers.d.ts","sourceRoot":"","sources":["../../../src/city/agent/AgentChatHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAgBzB,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAE7F,MAAM,MAAM,uBAAuB,GAAG;IACpC,mBAAmB;IACnB,
|
|
1
|
+
{"version":3,"file":"AgentChatHelpers.d.ts","sourceRoot":"","sources":["../../../src/city/agent/AgentChatHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAgBzB,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,sCAAsC,CAAC;AAE7F,MAAM,MAAM,uBAAuB,GAAG;IACpC,mBAAmB;IACnB,QAAQ,EAAE,MAAM,CAAC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O,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,mBAAmB,CAAC;CAC9B,GAAG,OAAO,CAAC,IAAI,CAAC,CAmDhB"}
|
|
@@ -12,7 +12,7 @@ import prompts from "../tui/Prompts.js";
|
|
|
12
12
|
import { emitCliBlock } from "../../shared/CliReporter.js";
|
|
13
13
|
import { printResult } from "../utils/cli/CliOutput.js";
|
|
14
14
|
import { resolveProjectRootByAgentId, validateAgentProjectRoot, } from "../shared/PluginTargetSupport.js";
|
|
15
|
-
import {
|
|
15
|
+
import { list_registered_agents_for_cli } from "./AgentSelection.js";
|
|
16
16
|
import { createAgentChatSessionId, createRemoteAgent, createRemoteChatSession, getOrCreateRemoteSession, buildAgentChatFailureText, listRemoteChatSessions, } from "./AgentChatRemote.js";
|
|
17
17
|
import { AGENT_CHAT_DEFAULT_SESSION_ID, } from "./AgentChatTypes.js";
|
|
18
18
|
export function normalizeChatMessage(input) {
|
|
@@ -27,7 +27,7 @@ export function normalizeChatMessage(input) {
|
|
|
27
27
|
* - `--session-id` 与 `--new-session` 互斥,避免“复用”和“新建”语义冲突。
|
|
28
28
|
*/
|
|
29
29
|
export function resolveAgentChatSessionOptions(input) {
|
|
30
|
-
const explicit_session_id = String(input?.
|
|
30
|
+
const explicit_session_id = String(input?.session_id || "").trim();
|
|
31
31
|
const should_create_new_session = input?.newSession === true;
|
|
32
32
|
if (explicit_session_id && should_create_new_session) {
|
|
33
33
|
return {
|
|
@@ -49,7 +49,7 @@ export function resolveAgentChatSessionOptions(input) {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
export function hasExplicitSessionSelection(input) {
|
|
52
|
-
return Boolean(String(input.
|
|
52
|
+
return Boolean(String(input.session_id || "").trim() || input.newSession === true);
|
|
53
53
|
}
|
|
54
54
|
export async function resolveChatTargetAgentId(inputId) {
|
|
55
55
|
const explicit = String(inputId || "").trim();
|
|
@@ -58,103 +58,103 @@ export async function resolveChatTargetAgentId(inputId) {
|
|
|
58
58
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
59
59
|
emitCliBlock({
|
|
60
60
|
tone: "error",
|
|
61
|
-
title: "Agent
|
|
61
|
+
title: "Agent ID is required",
|
|
62
62
|
note: "Use `city agent chat --to <id>` or run this command in an interactive terminal.",
|
|
63
63
|
});
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
66
|
+
const registered_agents = await list_registered_agents_for_cli();
|
|
67
|
+
if (registered_agents.length === 0) {
|
|
68
68
|
emitCliBlock({
|
|
69
69
|
tone: "error",
|
|
70
|
-
title: "No
|
|
71
|
-
note: "Run `city agent
|
|
70
|
+
title: "No managed agents",
|
|
71
|
+
note: "Run `city agent create <workspace_path>` first.",
|
|
72
72
|
});
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
75
|
const response = (await prompts({
|
|
76
76
|
type: "select",
|
|
77
|
-
name: "
|
|
77
|
+
name: "agent_id",
|
|
78
78
|
message: "选择要聊天的 Agent",
|
|
79
|
-
choices:
|
|
80
|
-
title: agent.
|
|
81
|
-
description: agent.
|
|
82
|
-
value: agent.
|
|
79
|
+
choices: registered_agents.map((agent) => ({
|
|
80
|
+
title: agent.agent_id,
|
|
81
|
+
description: `${agent.status} · ${agent.workspace_path}`,
|
|
82
|
+
value: agent.agent_id,
|
|
83
83
|
})),
|
|
84
84
|
initial: 0,
|
|
85
85
|
}));
|
|
86
|
-
const
|
|
87
|
-
if (!
|
|
86
|
+
const agent_id = String(response.agent_id || "").trim();
|
|
87
|
+
if (!agent_id) {
|
|
88
88
|
emitCliBlock({
|
|
89
89
|
tone: "info",
|
|
90
90
|
title: "Agent chat cancelled",
|
|
91
91
|
});
|
|
92
92
|
return null;
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return agent_id;
|
|
95
95
|
}
|
|
96
96
|
export async function resolveAgentChatTarget(agentIdInput, sessionOptions) {
|
|
97
|
-
const
|
|
97
|
+
const agent_id = String(agentIdInput || "").trim();
|
|
98
98
|
const resolved_session = resolveAgentChatSessionOptions(sessionOptions);
|
|
99
|
-
const
|
|
99
|
+
const session_id = resolved_session.success
|
|
100
100
|
? resolved_session.session_id
|
|
101
101
|
: AGENT_CHAT_DEFAULT_SESSION_ID;
|
|
102
102
|
if (!resolved_session.success) {
|
|
103
103
|
return {
|
|
104
104
|
success: false,
|
|
105
105
|
outcome: {
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
agent_id,
|
|
107
|
+
session_id,
|
|
108
108
|
success: false,
|
|
109
109
|
error: resolved_session.error,
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
if (!
|
|
113
|
+
if (!agent_id) {
|
|
114
114
|
return {
|
|
115
115
|
success: false,
|
|
116
116
|
outcome: {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
agent_id: "",
|
|
118
|
+
session_id,
|
|
119
119
|
success: false,
|
|
120
120
|
error: "Missing target agent id.",
|
|
121
121
|
},
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
const resolved = await resolveProjectRootByAgentId(
|
|
125
|
-
if (!resolved.
|
|
124
|
+
const resolved = await resolveProjectRootByAgentId(agent_id);
|
|
125
|
+
if (!resolved.project_root) {
|
|
126
126
|
return {
|
|
127
127
|
success: false,
|
|
128
128
|
outcome: {
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
agent_id,
|
|
130
|
+
session_id,
|
|
131
131
|
success: false,
|
|
132
132
|
error: resolved.error || "Failed to resolve agent project path",
|
|
133
133
|
},
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const pathError = validateAgentProjectRoot(resolved.
|
|
136
|
+
const pathError = validateAgentProjectRoot(resolved.project_root);
|
|
137
137
|
if (pathError) {
|
|
138
138
|
return {
|
|
139
139
|
success: false,
|
|
140
140
|
outcome: {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
agent_id,
|
|
142
|
+
project_root: resolved.project_root,
|
|
143
|
+
session_id,
|
|
144
144
|
success: false,
|
|
145
145
|
error: pathError,
|
|
146
146
|
},
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
const registeredAgents = await
|
|
150
|
-
const registeredAgent = registeredAgents.find((item) => item.
|
|
149
|
+
const registeredAgents = await list_registered_agents_for_cli();
|
|
150
|
+
const registeredAgent = registeredAgents.find((item) => item.workspace_path === resolved.project_root || item.agent_id === agent_id);
|
|
151
151
|
if (registeredAgent && registeredAgent.status !== "running") {
|
|
152
152
|
return {
|
|
153
153
|
success: false,
|
|
154
154
|
outcome: {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
agent_id,
|
|
156
|
+
project_root: resolved.project_root,
|
|
157
|
+
session_id,
|
|
158
158
|
success: false,
|
|
159
159
|
error: "Agent is not running. Run `city agent start` first.",
|
|
160
160
|
},
|
|
@@ -163,9 +163,9 @@ export async function resolveAgentChatTarget(agentIdInput, sessionOptions) {
|
|
|
163
163
|
return {
|
|
164
164
|
success: true,
|
|
165
165
|
target: {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
agent_id,
|
|
167
|
+
project_root: resolved.project_root,
|
|
168
|
+
session_id,
|
|
169
169
|
createNewSession: resolved_session.create_new_session,
|
|
170
170
|
},
|
|
171
171
|
};
|
|
@@ -189,7 +189,7 @@ export function printAgentChatFailure(params) {
|
|
|
189
189
|
facts: [
|
|
190
190
|
{
|
|
191
191
|
label: "agent",
|
|
192
|
-
value: params.
|
|
192
|
+
value: params.agent_id,
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
label: "error",
|
|
@@ -206,8 +206,8 @@ export async function resolveInteractiveChatSession(params) {
|
|
|
206
206
|
error: preselected_session.error,
|
|
207
207
|
};
|
|
208
208
|
}
|
|
209
|
-
const resolved = await resolveAgentChatTarget(params.
|
|
210
|
-
|
|
209
|
+
const resolved = await resolveAgentChatTarget(params.agent_id, {
|
|
210
|
+
session_id: preselected_session.session_id,
|
|
211
211
|
newSession: false,
|
|
212
212
|
});
|
|
213
213
|
if (!resolved.success) {
|
|
@@ -218,7 +218,7 @@ export async function resolveInteractiveChatSession(params) {
|
|
|
218
218
|
}
|
|
219
219
|
resolved.target.createNewSession = preselected_session.create_new_session;
|
|
220
220
|
const remote_agent = await createRemoteAgent({
|
|
221
|
-
|
|
221
|
+
agent_id: resolved.target.agent_id,
|
|
222
222
|
transport: params.transport,
|
|
223
223
|
});
|
|
224
224
|
if (hasExplicitSessionSelection(params.options)) {
|
|
@@ -227,7 +227,7 @@ export async function resolveInteractiveChatSession(params) {
|
|
|
227
227
|
remote_agent,
|
|
228
228
|
session_id: preselected_session.session_id,
|
|
229
229
|
});
|
|
230
|
-
resolved.target.
|
|
230
|
+
resolved.target.session_id = created.session_id;
|
|
231
231
|
resolved.target.createNewSession = false;
|
|
232
232
|
}
|
|
233
233
|
return {
|
|
@@ -241,7 +241,7 @@ export async function resolveInteractiveChatSession(params) {
|
|
|
241
241
|
// 用户仍可在 TUI 内通过 /session 命令随时切换。
|
|
242
242
|
const latest_session_id = await resolveLatestChatSessionId({ remote_agent });
|
|
243
243
|
if (latest_session_id) {
|
|
244
|
-
resolved.target.
|
|
244
|
+
resolved.target.session_id = latest_session_id;
|
|
245
245
|
}
|
|
246
246
|
return {
|
|
247
247
|
success: true,
|
|
@@ -253,7 +253,7 @@ export async function resolveInteractiveChatSession(params) {
|
|
|
253
253
|
* 解析最近活跃的 chat session id。
|
|
254
254
|
*
|
|
255
255
|
* 说明(中文)
|
|
256
|
-
* - 按 `
|
|
256
|
+
* - 按 `updated_at` 取最新的会话;缺失 `updated_at` 视为最旧。
|
|
257
257
|
* - 列表为空时返回 null,由调用方回落到默认 session。
|
|
258
258
|
*
|
|
259
259
|
* @param params.remote_agent 远程 agent 句柄。
|
|
@@ -272,11 +272,11 @@ async function resolveLatestChatSessionId(params) {
|
|
|
272
272
|
}
|
|
273
273
|
let latest = sessions[0];
|
|
274
274
|
for (const candidate of sessions) {
|
|
275
|
-
if ((candidate.
|
|
275
|
+
if ((candidate.updated_at ?? 0) > (latest.updated_at ?? 0)) {
|
|
276
276
|
latest = candidate;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
return latest.
|
|
279
|
+
return latest.session_id;
|
|
280
280
|
}
|
|
281
281
|
export async function runSdkPromptTurn(params) {
|
|
282
282
|
const message = normalizeChatMessage(params.message);
|
|
@@ -286,30 +286,30 @@ export async function runSdkPromptTurn(params) {
|
|
|
286
286
|
success: false,
|
|
287
287
|
error: "Chat message is required.",
|
|
288
288
|
emittedVisibleText: false,
|
|
289
|
-
|
|
289
|
+
session_id: resolved_session.success
|
|
290
290
|
? resolved_session.session_id
|
|
291
291
|
: AGENT_CHAT_DEFAULT_SESSION_ID,
|
|
292
292
|
text: "",
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
const resolved = await resolveAgentChatTarget(params.
|
|
295
|
+
const resolved = await resolveAgentChatTarget(params.agent_id, params.sessionOptions);
|
|
296
296
|
if (!resolved.success) {
|
|
297
297
|
return {
|
|
298
298
|
success: false,
|
|
299
299
|
error: resolved.outcome.error,
|
|
300
300
|
emittedVisibleText: false,
|
|
301
|
-
|
|
302
|
-
...(resolved.outcome.
|
|
301
|
+
session_id: resolved.outcome.session_id,
|
|
302
|
+
...(resolved.outcome.project_root ? { project_root: resolved.outcome.project_root } : {}),
|
|
303
303
|
text: "",
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
const remote_agent = await createRemoteAgent({
|
|
307
|
-
|
|
307
|
+
agent_id: resolved.target.agent_id,
|
|
308
308
|
transport: params.transport,
|
|
309
309
|
});
|
|
310
310
|
const session = await getOrCreateRemoteSession({
|
|
311
311
|
remote_agent,
|
|
312
|
-
session_id: resolved.target.
|
|
312
|
+
session_id: resolved.target.session_id,
|
|
313
313
|
create_new_session: resolved.target.createNewSession,
|
|
314
314
|
});
|
|
315
315
|
let printed_leading_newline = false;
|
|
@@ -371,8 +371,8 @@ export async function runSdkPromptTurn(params) {
|
|
|
371
371
|
success: result.success,
|
|
372
372
|
...(result.error ? { error: result.error } : {}),
|
|
373
373
|
emittedVisibleText: emitted_visible_text,
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
session_id: resolved.target.session_id,
|
|
375
|
+
project_root: resolved.target.project_root,
|
|
376
376
|
text: final_text,
|
|
377
377
|
};
|
|
378
378
|
}
|
|
@@ -388,8 +388,8 @@ export async function runSdkPromptTurn(params) {
|
|
|
388
388
|
success: false,
|
|
389
389
|
error: error instanceof Error ? error.message : String(error),
|
|
390
390
|
emittedVisibleText: emitted_visible_text,
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
session_id: resolved.target.session_id,
|
|
392
|
+
project_root: resolved.target.project_root,
|
|
393
393
|
text: final_text,
|
|
394
394
|
};
|
|
395
395
|
}
|
|
@@ -404,32 +404,32 @@ export async function runSdkPromptTurn(params) {
|
|
|
404
404
|
export async function executeAgentChatTurn(params) {
|
|
405
405
|
const message = normalizeChatMessage(params.message);
|
|
406
406
|
const resolved_session = resolveAgentChatSessionOptions(params.sessionOptions);
|
|
407
|
-
const
|
|
407
|
+
const session_id = resolved_session.success
|
|
408
408
|
? resolved_session.session_id
|
|
409
409
|
: AGENT_CHAT_DEFAULT_SESSION_ID;
|
|
410
410
|
if (!message) {
|
|
411
411
|
return {
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
agent_id: String(params.agent_id || "").trim(),
|
|
413
|
+
session_id,
|
|
414
414
|
success: false,
|
|
415
415
|
error: "Chat message is required.",
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
const outcome = await runSdkPromptTurn({
|
|
419
|
-
|
|
419
|
+
agent_id: params.agent_id,
|
|
420
420
|
message,
|
|
421
421
|
sessionOptions: params.sessionOptions,
|
|
422
422
|
transport: params.transport,
|
|
423
423
|
renderText: false,
|
|
424
424
|
});
|
|
425
425
|
return {
|
|
426
|
-
|
|
427
|
-
...(outcome.
|
|
428
|
-
|
|
426
|
+
agent_id: params.agent_id,
|
|
427
|
+
...(outcome.project_root ? { project_root: outcome.project_root } : {}),
|
|
428
|
+
session_id: outcome.session_id,
|
|
429
429
|
success: outcome.success,
|
|
430
430
|
payload: {
|
|
431
431
|
success: outcome.success,
|
|
432
|
-
|
|
432
|
+
session_id: outcome.session_id,
|
|
433
433
|
result: {
|
|
434
434
|
success: outcome.success,
|
|
435
435
|
userVisible: outcome.text || "",
|
|
@@ -443,10 +443,10 @@ export async function executeAgentChatTurn(params) {
|
|
|
443
443
|
export async function runOneShotChat(params) {
|
|
444
444
|
if (params.options.json === true) {
|
|
445
445
|
const outcome = await executeAgentChatTurn({
|
|
446
|
-
|
|
446
|
+
agent_id: params.agent_id,
|
|
447
447
|
message: params.message,
|
|
448
448
|
sessionOptions: {
|
|
449
|
-
|
|
449
|
+
session_id: params.options.session_id,
|
|
450
450
|
newSession: params.options.newSession,
|
|
451
451
|
},
|
|
452
452
|
transport: {
|
|
@@ -459,9 +459,9 @@ export async function runOneShotChat(params) {
|
|
|
459
459
|
success: outcome.success,
|
|
460
460
|
title: "agent chat",
|
|
461
461
|
payload: {
|
|
462
|
-
agent: params.
|
|
463
|
-
...(outcome.
|
|
464
|
-
|
|
462
|
+
agent: params.agent_id,
|
|
463
|
+
...(outcome.project_root ? { project_root: outcome.project_root } : {}),
|
|
464
|
+
session_id: outcome.session_id,
|
|
465
465
|
...(outcome.payload?.result ? { result: outcome.payload.result } : {}),
|
|
466
466
|
...(outcome.error ? { error: outcome.error } : {}),
|
|
467
467
|
},
|
|
@@ -469,10 +469,10 @@ export async function runOneShotChat(params) {
|
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
const outcome = await runSdkPromptTurn({
|
|
472
|
-
|
|
472
|
+
agent_id: params.agent_id,
|
|
473
473
|
message: params.message,
|
|
474
474
|
sessionOptions: {
|
|
475
|
-
|
|
475
|
+
session_id: params.options.session_id,
|
|
476
476
|
newSession: params.options.newSession,
|
|
477
477
|
},
|
|
478
478
|
transport: {
|
|
@@ -482,7 +482,7 @@ export async function runOneShotChat(params) {
|
|
|
482
482
|
});
|
|
483
483
|
if (!outcome.success) {
|
|
484
484
|
printAgentChatFailure({
|
|
485
|
-
|
|
485
|
+
agent_id: params.agent_id,
|
|
486
486
|
error: outcome.error,
|
|
487
487
|
});
|
|
488
488
|
return;
|