cc-viewer 1.7.22 → 1.8.0
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 -0
- package/cli.js +92 -11
- package/concepts/ar/GlobalSettings.md +2 -2
- package/concepts/ar/Tool-Artifact.md +7 -0
- package/concepts/ar/Tool-EndConversation.md +35 -0
- package/concepts/ar/Tool-LSP.md +6 -1
- package/concepts/ar/Tool-ListAgents.md +35 -0
- package/concepts/ar/Tool-ListConnectors.md +34 -0
- package/concepts/ar/Tool-ListMcpResources.md +35 -0
- package/concepts/ar/Tool-ListPlugins.md +35 -0
- package/concepts/ar/Tool-ListSkills.md +37 -0
- package/concepts/ar/Tool-Monitor.md +7 -0
- package/concepts/ar/Tool-Projects.md +46 -0
- package/concepts/ar/Tool-ProposeGoal.md +43 -0
- package/concepts/ar/Tool-PushNotification.md +6 -0
- package/concepts/ar/Tool-REPL.md +47 -0
- package/concepts/ar/Tool-ReadMcpResource.md +32 -0
- package/concepts/ar/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ar/Tool-ReadNotifications.md +27 -0
- package/concepts/ar/Tool-RemoteTrigger.md +7 -0
- package/concepts/ar/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ar/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ar/Tool-SendFeedback.md +38 -0
- package/concepts/ar/Tool-SendFile.md +36 -0
- package/concepts/ar/Tool-SendMessage.md +5 -0
- package/concepts/ar/Tool-SendUserFile.md +38 -0
- package/concepts/ar/Tool-SendUserMessage.md +38 -0
- package/concepts/ar/Tool-SuggestConnectors.md +28 -0
- package/concepts/ar/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ar/Tool-SuggestSkills.md +33 -0
- package/concepts/ar/Tool-TaskCreate.md +6 -0
- package/concepts/ar/Tool-TaskGet.md +6 -0
- package/concepts/ar/Tool-TaskList.md +6 -0
- package/concepts/ar/Tool-TaskUpdate.md +6 -0
- package/concepts/ar/Tool-TodoWrite.md +43 -0
- package/concepts/ar/Tool-ToolSearch.md +5 -0
- package/concepts/ar/Tool-WebSearch.md +6 -0
- package/concepts/ar/Tools.md +26 -4
- package/concepts/da/GlobalSettings.md +2 -2
- package/concepts/da/Tool-Artifact.md +8 -1
- package/concepts/da/Tool-EndConversation.md +35 -0
- package/concepts/da/Tool-LSP.md +6 -1
- package/concepts/da/Tool-ListAgents.md +35 -0
- package/concepts/da/Tool-ListConnectors.md +34 -0
- package/concepts/da/Tool-ListMcpResources.md +35 -0
- package/concepts/da/Tool-ListPlugins.md +35 -0
- package/concepts/da/Tool-ListSkills.md +37 -0
- package/concepts/da/Tool-Monitor.md +7 -0
- package/concepts/da/Tool-Projects.md +46 -0
- package/concepts/da/Tool-ProposeGoal.md +43 -0
- package/concepts/da/Tool-PushNotification.md +6 -0
- package/concepts/da/Tool-REPL.md +47 -0
- package/concepts/da/Tool-ReadMcpResource.md +32 -0
- package/concepts/da/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/da/Tool-ReadNotifications.md +27 -0
- package/concepts/da/Tool-RemoteTrigger.md +7 -0
- package/concepts/da/Tool-ScheduleWakeup.md +5 -0
- package/concepts/da/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/da/Tool-SendFeedback.md +38 -0
- package/concepts/da/Tool-SendFile.md +36 -0
- package/concepts/da/Tool-SendMessage.md +5 -0
- package/concepts/da/Tool-SendUserFile.md +38 -0
- package/concepts/da/Tool-SendUserMessage.md +38 -0
- package/concepts/da/Tool-SuggestConnectors.md +28 -0
- package/concepts/da/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/da/Tool-SuggestSkills.md +33 -0
- package/concepts/da/Tool-TaskCreate.md +6 -0
- package/concepts/da/Tool-TaskGet.md +6 -0
- package/concepts/da/Tool-TaskList.md +6 -0
- package/concepts/da/Tool-TaskUpdate.md +6 -0
- package/concepts/da/Tool-TodoWrite.md +43 -0
- package/concepts/da/Tool-ToolSearch.md +5 -0
- package/concepts/da/Tool-WebSearch.md +6 -0
- package/concepts/da/Tools.md +26 -4
- package/concepts/de/GlobalSettings.md +2 -2
- package/concepts/de/Tool-Artifact.md +7 -0
- package/concepts/de/Tool-EndConversation.md +35 -0
- package/concepts/de/Tool-LSP.md +6 -1
- package/concepts/de/Tool-ListAgents.md +35 -0
- package/concepts/de/Tool-ListConnectors.md +34 -0
- package/concepts/de/Tool-ListMcpResources.md +35 -0
- package/concepts/de/Tool-ListPlugins.md +35 -0
- package/concepts/de/Tool-ListSkills.md +37 -0
- package/concepts/de/Tool-Monitor.md +7 -0
- package/concepts/de/Tool-Projects.md +46 -0
- package/concepts/de/Tool-ProposeGoal.md +43 -0
- package/concepts/de/Tool-PushNotification.md +6 -0
- package/concepts/de/Tool-REPL.md +47 -0
- package/concepts/de/Tool-ReadMcpResource.md +32 -0
- package/concepts/de/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/de/Tool-ReadNotifications.md +27 -0
- package/concepts/de/Tool-RemoteTrigger.md +7 -0
- package/concepts/de/Tool-ScheduleWakeup.md +5 -0
- package/concepts/de/Tool-SearchMcpRegistry.md +30 -0
- package/concepts/de/Tool-SendFeedback.md +38 -0
- package/concepts/de/Tool-SendFile.md +36 -0
- package/concepts/de/Tool-SendMessage.md +5 -0
- package/concepts/de/Tool-SendUserFile.md +38 -0
- package/concepts/de/Tool-SendUserMessage.md +38 -0
- package/concepts/de/Tool-SuggestConnectors.md +28 -0
- package/concepts/de/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/de/Tool-SuggestSkills.md +33 -0
- package/concepts/de/Tool-TaskCreate.md +6 -0
- package/concepts/de/Tool-TaskGet.md +6 -0
- package/concepts/de/Tool-TaskList.md +6 -0
- package/concepts/de/Tool-TaskUpdate.md +6 -0
- package/concepts/de/Tool-TodoWrite.md +43 -0
- package/concepts/de/Tool-ToolSearch.md +5 -0
- package/concepts/de/Tool-WebSearch.md +6 -0
- package/concepts/de/Tools.md +26 -4
- package/concepts/en/GlobalSettings.md +2 -2
- package/concepts/en/Tool-Artifact.md +7 -0
- package/concepts/en/Tool-EndConversation.md +35 -0
- package/concepts/en/Tool-LSP.md +5 -0
- package/concepts/en/Tool-ListAgents.md +35 -0
- package/concepts/en/Tool-ListConnectors.md +34 -0
- package/concepts/en/Tool-ListMcpResources.md +35 -0
- package/concepts/en/Tool-ListPlugins.md +35 -0
- package/concepts/en/Tool-ListSkills.md +37 -0
- package/concepts/en/Tool-Monitor.md +7 -0
- package/concepts/en/Tool-Projects.md +46 -0
- package/concepts/en/Tool-ProposeGoal.md +43 -0
- package/concepts/en/Tool-PushNotification.md +6 -0
- package/concepts/en/Tool-REPL.md +47 -0
- package/concepts/en/Tool-ReadMcpResource.md +32 -0
- package/concepts/en/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/en/Tool-ReadNotifications.md +27 -0
- package/concepts/en/Tool-RemoteTrigger.md +7 -0
- package/concepts/en/Tool-ScheduleWakeup.md +5 -0
- package/concepts/en/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/en/Tool-SendFeedback.md +38 -0
- package/concepts/en/Tool-SendFile.md +36 -0
- package/concepts/en/Tool-SendMessage.md +5 -0
- package/concepts/en/Tool-SendUserFile.md +38 -0
- package/concepts/en/Tool-SendUserMessage.md +38 -0
- package/concepts/en/Tool-SuggestConnectors.md +28 -0
- package/concepts/en/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/en/Tool-SuggestSkills.md +33 -0
- package/concepts/en/Tool-TaskCreate.md +6 -0
- package/concepts/en/Tool-TaskGet.md +6 -0
- package/concepts/en/Tool-TaskList.md +6 -0
- package/concepts/en/Tool-TaskUpdate.md +6 -0
- package/concepts/en/Tool-TodoWrite.md +43 -0
- package/concepts/en/Tool-ToolSearch.md +5 -0
- package/concepts/en/Tool-WebSearch.md +6 -0
- package/concepts/en/Tools.md +26 -4
- package/concepts/es/GlobalSettings.md +2 -2
- package/concepts/es/Tool-Artifact.md +7 -0
- package/concepts/es/Tool-EndConversation.md +35 -0
- package/concepts/es/Tool-LSP.md +5 -0
- package/concepts/es/Tool-ListAgents.md +35 -0
- package/concepts/es/Tool-ListConnectors.md +34 -0
- package/concepts/es/Tool-ListMcpResources.md +35 -0
- package/concepts/es/Tool-ListPlugins.md +35 -0
- package/concepts/es/Tool-ListSkills.md +37 -0
- package/concepts/es/Tool-Monitor.md +7 -0
- package/concepts/es/Tool-Projects.md +46 -0
- package/concepts/es/Tool-ProposeGoal.md +43 -0
- package/concepts/es/Tool-PushNotification.md +6 -0
- package/concepts/es/Tool-REPL.md +47 -0
- package/concepts/es/Tool-ReadMcpResource.md +32 -0
- package/concepts/es/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/es/Tool-ReadNotifications.md +27 -0
- package/concepts/es/Tool-RemoteTrigger.md +7 -0
- package/concepts/es/Tool-ScheduleWakeup.md +5 -0
- package/concepts/es/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/es/Tool-SendFeedback.md +38 -0
- package/concepts/es/Tool-SendFile.md +36 -0
- package/concepts/es/Tool-SendMessage.md +5 -0
- package/concepts/es/Tool-SendUserFile.md +38 -0
- package/concepts/es/Tool-SendUserMessage.md +38 -0
- package/concepts/es/Tool-SuggestConnectors.md +28 -0
- package/concepts/es/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/es/Tool-SuggestSkills.md +33 -0
- package/concepts/es/Tool-TaskCreate.md +6 -0
- package/concepts/es/Tool-TaskGet.md +6 -0
- package/concepts/es/Tool-TaskList.md +6 -0
- package/concepts/es/Tool-TaskUpdate.md +6 -0
- package/concepts/es/Tool-TodoWrite.md +43 -0
- package/concepts/es/Tool-ToolSearch.md +5 -0
- package/concepts/es/Tool-WebSearch.md +6 -0
- package/concepts/es/Tools.md +26 -4
- package/concepts/fr/GlobalSettings.md +2 -2
- package/concepts/fr/Tool-Artifact.md +7 -0
- package/concepts/fr/Tool-EndConversation.md +35 -0
- package/concepts/fr/Tool-LSP.md +5 -0
- package/concepts/fr/Tool-ListAgents.md +35 -0
- package/concepts/fr/Tool-ListConnectors.md +34 -0
- package/concepts/fr/Tool-ListMcpResources.md +35 -0
- package/concepts/fr/Tool-ListPlugins.md +35 -0
- package/concepts/fr/Tool-ListSkills.md +37 -0
- package/concepts/fr/Tool-Monitor.md +7 -0
- package/concepts/fr/Tool-Projects.md +46 -0
- package/concepts/fr/Tool-ProposeGoal.md +43 -0
- package/concepts/fr/Tool-PushNotification.md +6 -0
- package/concepts/fr/Tool-REPL.md +47 -0
- package/concepts/fr/Tool-ReadMcpResource.md +32 -0
- package/concepts/fr/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/fr/Tool-ReadNotifications.md +27 -0
- package/concepts/fr/Tool-RemoteTrigger.md +7 -0
- package/concepts/fr/Tool-ScheduleWakeup.md +5 -0
- package/concepts/fr/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/fr/Tool-SendFeedback.md +38 -0
- package/concepts/fr/Tool-SendFile.md +36 -0
- package/concepts/fr/Tool-SendMessage.md +5 -0
- package/concepts/fr/Tool-SendUserFile.md +38 -0
- package/concepts/fr/Tool-SendUserMessage.md +38 -0
- package/concepts/fr/Tool-SuggestConnectors.md +28 -0
- package/concepts/fr/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/fr/Tool-SuggestSkills.md +33 -0
- package/concepts/fr/Tool-TaskCreate.md +6 -0
- package/concepts/fr/Tool-TaskGet.md +6 -0
- package/concepts/fr/Tool-TaskList.md +6 -0
- package/concepts/fr/Tool-TaskUpdate.md +6 -0
- package/concepts/fr/Tool-TodoWrite.md +43 -0
- package/concepts/fr/Tool-ToolSearch.md +5 -0
- package/concepts/fr/Tool-WebSearch.md +6 -0
- package/concepts/fr/Tools.md +26 -4
- package/concepts/it/GlobalSettings.md +2 -2
- package/concepts/it/Tool-Artifact.md +7 -0
- package/concepts/it/Tool-EndConversation.md +35 -0
- package/concepts/it/Tool-LSP.md +5 -0
- package/concepts/it/Tool-ListAgents.md +35 -0
- package/concepts/it/Tool-ListConnectors.md +34 -0
- package/concepts/it/Tool-ListMcpResources.md +35 -0
- package/concepts/it/Tool-ListPlugins.md +35 -0
- package/concepts/it/Tool-ListSkills.md +37 -0
- package/concepts/it/Tool-Monitor.md +7 -0
- package/concepts/it/Tool-Projects.md +46 -0
- package/concepts/it/Tool-ProposeGoal.md +43 -0
- package/concepts/it/Tool-PushNotification.md +6 -0
- package/concepts/it/Tool-REPL.md +47 -0
- package/concepts/it/Tool-ReadMcpResource.md +32 -0
- package/concepts/it/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/it/Tool-ReadNotifications.md +27 -0
- package/concepts/it/Tool-RemoteTrigger.md +7 -0
- package/concepts/it/Tool-ScheduleWakeup.md +5 -0
- package/concepts/it/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/it/Tool-SendFeedback.md +38 -0
- package/concepts/it/Tool-SendFile.md +36 -0
- package/concepts/it/Tool-SendMessage.md +5 -0
- package/concepts/it/Tool-SendUserFile.md +38 -0
- package/concepts/it/Tool-SendUserMessage.md +38 -0
- package/concepts/it/Tool-SuggestConnectors.md +28 -0
- package/concepts/it/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/it/Tool-SuggestSkills.md +33 -0
- package/concepts/it/Tool-TaskCreate.md +6 -0
- package/concepts/it/Tool-TaskGet.md +6 -0
- package/concepts/it/Tool-TaskList.md +6 -0
- package/concepts/it/Tool-TaskUpdate.md +6 -0
- package/concepts/it/Tool-TodoWrite.md +43 -0
- package/concepts/it/Tool-ToolSearch.md +5 -0
- package/concepts/it/Tool-WebSearch.md +6 -0
- package/concepts/it/Tools.md +26 -4
- package/concepts/ja/GlobalSettings.md +2 -2
- package/concepts/ja/Tool-Artifact.md +7 -0
- package/concepts/ja/Tool-EndConversation.md +35 -0
- package/concepts/ja/Tool-LSP.md +5 -0
- package/concepts/ja/Tool-ListAgents.md +35 -0
- package/concepts/ja/Tool-ListConnectors.md +34 -0
- package/concepts/ja/Tool-ListMcpResources.md +35 -0
- package/concepts/ja/Tool-ListPlugins.md +35 -0
- package/concepts/ja/Tool-ListSkills.md +37 -0
- package/concepts/ja/Tool-Monitor.md +7 -0
- package/concepts/ja/Tool-Projects.md +46 -0
- package/concepts/ja/Tool-ProposeGoal.md +43 -0
- package/concepts/ja/Tool-PushNotification.md +6 -0
- package/concepts/ja/Tool-REPL.md +47 -0
- package/concepts/ja/Tool-ReadMcpResource.md +32 -0
- package/concepts/ja/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ja/Tool-ReadNotifications.md +27 -0
- package/concepts/ja/Tool-RemoteTrigger.md +7 -0
- package/concepts/ja/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ja/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ja/Tool-SendFeedback.md +38 -0
- package/concepts/ja/Tool-SendFile.md +36 -0
- package/concepts/ja/Tool-SendMessage.md +5 -0
- package/concepts/ja/Tool-SendUserFile.md +38 -0
- package/concepts/ja/Tool-SendUserMessage.md +38 -0
- package/concepts/ja/Tool-SuggestConnectors.md +28 -0
- package/concepts/ja/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ja/Tool-SuggestSkills.md +33 -0
- package/concepts/ja/Tool-TaskCreate.md +6 -0
- package/concepts/ja/Tool-TaskGet.md +6 -0
- package/concepts/ja/Tool-TaskList.md +6 -0
- package/concepts/ja/Tool-TaskUpdate.md +6 -0
- package/concepts/ja/Tool-TodoWrite.md +43 -0
- package/concepts/ja/Tool-ToolSearch.md +5 -0
- package/concepts/ja/Tool-WebSearch.md +6 -0
- package/concepts/ja/Tools.md +26 -4
- package/concepts/ko/GlobalSettings.md +2 -2
- package/concepts/ko/Tool-Artifact.md +7 -0
- package/concepts/ko/Tool-EndConversation.md +35 -0
- package/concepts/ko/Tool-LSP.md +5 -0
- package/concepts/ko/Tool-ListAgents.md +35 -0
- package/concepts/ko/Tool-ListConnectors.md +34 -0
- package/concepts/ko/Tool-ListMcpResources.md +35 -0
- package/concepts/ko/Tool-ListPlugins.md +35 -0
- package/concepts/ko/Tool-ListSkills.md +37 -0
- package/concepts/ko/Tool-Monitor.md +7 -0
- package/concepts/ko/Tool-Projects.md +46 -0
- package/concepts/ko/Tool-ProposeGoal.md +43 -0
- package/concepts/ko/Tool-PushNotification.md +6 -0
- package/concepts/ko/Tool-REPL.md +47 -0
- package/concepts/ko/Tool-ReadMcpResource.md +32 -0
- package/concepts/ko/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ko/Tool-ReadNotifications.md +27 -0
- package/concepts/ko/Tool-RemoteTrigger.md +7 -0
- package/concepts/ko/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ko/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ko/Tool-SendFeedback.md +38 -0
- package/concepts/ko/Tool-SendFile.md +36 -0
- package/concepts/ko/Tool-SendMessage.md +5 -0
- package/concepts/ko/Tool-SendUserFile.md +38 -0
- package/concepts/ko/Tool-SendUserMessage.md +38 -0
- package/concepts/ko/Tool-SuggestConnectors.md +28 -0
- package/concepts/ko/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ko/Tool-SuggestSkills.md +33 -0
- package/concepts/ko/Tool-TaskCreate.md +6 -0
- package/concepts/ko/Tool-TaskGet.md +6 -0
- package/concepts/ko/Tool-TaskList.md +6 -0
- package/concepts/ko/Tool-TaskUpdate.md +6 -0
- package/concepts/ko/Tool-TodoWrite.md +43 -0
- package/concepts/ko/Tool-ToolSearch.md +5 -0
- package/concepts/ko/Tool-WebSearch.md +6 -0
- package/concepts/ko/Tools.md +26 -4
- package/concepts/no/GlobalSettings.md +2 -2
- package/concepts/no/Tool-Artifact.md +7 -0
- package/concepts/no/Tool-EndConversation.md +35 -0
- package/concepts/no/Tool-LSP.md +7 -2
- package/concepts/no/Tool-ListAgents.md +35 -0
- package/concepts/no/Tool-ListConnectors.md +34 -0
- package/concepts/no/Tool-ListMcpResources.md +35 -0
- package/concepts/no/Tool-ListPlugins.md +35 -0
- package/concepts/no/Tool-ListSkills.md +37 -0
- package/concepts/no/Tool-Monitor.md +7 -0
- package/concepts/no/Tool-Projects.md +46 -0
- package/concepts/no/Tool-ProposeGoal.md +43 -0
- package/concepts/no/Tool-PushNotification.md +6 -0
- package/concepts/no/Tool-REPL.md +47 -0
- package/concepts/no/Tool-ReadMcpResource.md +32 -0
- package/concepts/no/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/no/Tool-ReadNotifications.md +27 -0
- package/concepts/no/Tool-RemoteTrigger.md +7 -0
- package/concepts/no/Tool-ScheduleWakeup.md +5 -0
- package/concepts/no/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/no/Tool-SendFeedback.md +38 -0
- package/concepts/no/Tool-SendFile.md +36 -0
- package/concepts/no/Tool-SendMessage.md +5 -0
- package/concepts/no/Tool-SendUserFile.md +38 -0
- package/concepts/no/Tool-SendUserMessage.md +38 -0
- package/concepts/no/Tool-SuggestConnectors.md +28 -0
- package/concepts/no/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/no/Tool-SuggestSkills.md +33 -0
- package/concepts/no/Tool-TaskCreate.md +6 -0
- package/concepts/no/Tool-TaskGet.md +6 -0
- package/concepts/no/Tool-TaskList.md +6 -0
- package/concepts/no/Tool-TaskUpdate.md +6 -0
- package/concepts/no/Tool-TodoWrite.md +43 -0
- package/concepts/no/Tool-ToolSearch.md +5 -0
- package/concepts/no/Tool-WebSearch.md +6 -0
- package/concepts/no/Tools.md +26 -4
- package/concepts/pl/GlobalSettings.md +2 -2
- package/concepts/pl/Tool-Artifact.md +7 -0
- package/concepts/pl/Tool-EndConversation.md +35 -0
- package/concepts/pl/Tool-LSP.md +5 -0
- package/concepts/pl/Tool-ListAgents.md +35 -0
- package/concepts/pl/Tool-ListConnectors.md +34 -0
- package/concepts/pl/Tool-ListMcpResources.md +35 -0
- package/concepts/pl/Tool-ListPlugins.md +35 -0
- package/concepts/pl/Tool-ListSkills.md +37 -0
- package/concepts/pl/Tool-Monitor.md +7 -0
- package/concepts/pl/Tool-Projects.md +46 -0
- package/concepts/pl/Tool-ProposeGoal.md +43 -0
- package/concepts/pl/Tool-PushNotification.md +6 -0
- package/concepts/pl/Tool-REPL.md +47 -0
- package/concepts/pl/Tool-ReadMcpResource.md +32 -0
- package/concepts/pl/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/pl/Tool-ReadNotifications.md +27 -0
- package/concepts/pl/Tool-RemoteTrigger.md +7 -0
- package/concepts/pl/Tool-ScheduleWakeup.md +5 -0
- package/concepts/pl/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/pl/Tool-SendFeedback.md +38 -0
- package/concepts/pl/Tool-SendFile.md +36 -0
- package/concepts/pl/Tool-SendMessage.md +5 -0
- package/concepts/pl/Tool-SendUserFile.md +38 -0
- package/concepts/pl/Tool-SendUserMessage.md +38 -0
- package/concepts/pl/Tool-SuggestConnectors.md +28 -0
- package/concepts/pl/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/pl/Tool-SuggestSkills.md +33 -0
- package/concepts/pl/Tool-TaskCreate.md +6 -0
- package/concepts/pl/Tool-TaskGet.md +6 -0
- package/concepts/pl/Tool-TaskList.md +6 -0
- package/concepts/pl/Tool-TaskUpdate.md +6 -0
- package/concepts/pl/Tool-TodoWrite.md +43 -0
- package/concepts/pl/Tool-ToolSearch.md +5 -0
- package/concepts/pl/Tool-WebSearch.md +6 -0
- package/concepts/pl/Tools.md +26 -4
- package/concepts/pt-BR/GlobalSettings.md +2 -2
- package/concepts/pt-BR/Tool-Artifact.md +7 -0
- package/concepts/pt-BR/Tool-EndConversation.md +35 -0
- package/concepts/pt-BR/Tool-LSP.md +5 -0
- package/concepts/pt-BR/Tool-ListAgents.md +35 -0
- package/concepts/pt-BR/Tool-ListConnectors.md +34 -0
- package/concepts/pt-BR/Tool-ListMcpResources.md +35 -0
- package/concepts/pt-BR/Tool-ListPlugins.md +35 -0
- package/concepts/pt-BR/Tool-ListSkills.md +37 -0
- package/concepts/pt-BR/Tool-Monitor.md +7 -0
- package/concepts/pt-BR/Tool-Projects.md +46 -0
- package/concepts/pt-BR/Tool-ProposeGoal.md +43 -0
- package/concepts/pt-BR/Tool-PushNotification.md +6 -0
- package/concepts/pt-BR/Tool-REPL.md +47 -0
- package/concepts/pt-BR/Tool-ReadMcpResource.md +32 -0
- package/concepts/pt-BR/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/pt-BR/Tool-ReadNotifications.md +27 -0
- package/concepts/pt-BR/Tool-RemoteTrigger.md +7 -0
- package/concepts/pt-BR/Tool-ScheduleWakeup.md +5 -0
- package/concepts/pt-BR/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/pt-BR/Tool-SendFeedback.md +38 -0
- package/concepts/pt-BR/Tool-SendFile.md +36 -0
- package/concepts/pt-BR/Tool-SendMessage.md +5 -0
- package/concepts/pt-BR/Tool-SendUserFile.md +38 -0
- package/concepts/pt-BR/Tool-SendUserMessage.md +38 -0
- package/concepts/pt-BR/Tool-SuggestConnectors.md +28 -0
- package/concepts/pt-BR/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/pt-BR/Tool-SuggestSkills.md +33 -0
- package/concepts/pt-BR/Tool-TaskCreate.md +6 -0
- package/concepts/pt-BR/Tool-TaskGet.md +6 -0
- package/concepts/pt-BR/Tool-TaskList.md +6 -0
- package/concepts/pt-BR/Tool-TaskUpdate.md +6 -0
- package/concepts/pt-BR/Tool-TodoWrite.md +43 -0
- package/concepts/pt-BR/Tool-ToolSearch.md +5 -0
- package/concepts/pt-BR/Tool-WebSearch.md +6 -0
- package/concepts/pt-BR/Tools.md +26 -4
- package/concepts/ru/GlobalSettings.md +2 -2
- package/concepts/ru/Tool-Artifact.md +7 -0
- package/concepts/ru/Tool-EndConversation.md +35 -0
- package/concepts/ru/Tool-LSP.md +5 -0
- package/concepts/ru/Tool-ListAgents.md +35 -0
- package/concepts/ru/Tool-ListConnectors.md +34 -0
- package/concepts/ru/Tool-ListMcpResources.md +35 -0
- package/concepts/ru/Tool-ListPlugins.md +35 -0
- package/concepts/ru/Tool-ListSkills.md +37 -0
- package/concepts/ru/Tool-Monitor.md +7 -0
- package/concepts/ru/Tool-Projects.md +46 -0
- package/concepts/ru/Tool-ProposeGoal.md +43 -0
- package/concepts/ru/Tool-PushNotification.md +6 -0
- package/concepts/ru/Tool-REPL.md +47 -0
- package/concepts/ru/Tool-ReadMcpResource.md +32 -0
- package/concepts/ru/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/ru/Tool-ReadNotifications.md +27 -0
- package/concepts/ru/Tool-RemoteTrigger.md +7 -0
- package/concepts/ru/Tool-ScheduleWakeup.md +5 -0
- package/concepts/ru/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/ru/Tool-SendFeedback.md +38 -0
- package/concepts/ru/Tool-SendFile.md +36 -0
- package/concepts/ru/Tool-SendMessage.md +5 -0
- package/concepts/ru/Tool-SendUserFile.md +38 -0
- package/concepts/ru/Tool-SendUserMessage.md +38 -0
- package/concepts/ru/Tool-SuggestConnectors.md +28 -0
- package/concepts/ru/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/ru/Tool-SuggestSkills.md +33 -0
- package/concepts/ru/Tool-TaskCreate.md +6 -0
- package/concepts/ru/Tool-TaskGet.md +6 -0
- package/concepts/ru/Tool-TaskList.md +6 -0
- package/concepts/ru/Tool-TaskUpdate.md +6 -0
- package/concepts/ru/Tool-TodoWrite.md +43 -0
- package/concepts/ru/Tool-ToolSearch.md +5 -0
- package/concepts/ru/Tool-WebSearch.md +6 -0
- package/concepts/ru/Tools.md +26 -4
- package/concepts/th/GlobalSettings.md +2 -2
- package/concepts/th/Tool-Artifact.md +7 -0
- package/concepts/th/Tool-EndConversation.md +35 -0
- package/concepts/th/Tool-LSP.md +5 -0
- package/concepts/th/Tool-ListAgents.md +35 -0
- package/concepts/th/Tool-ListConnectors.md +34 -0
- package/concepts/th/Tool-ListMcpResources.md +35 -0
- package/concepts/th/Tool-ListPlugins.md +35 -0
- package/concepts/th/Tool-ListSkills.md +37 -0
- package/concepts/th/Tool-Monitor.md +7 -0
- package/concepts/th/Tool-Projects.md +46 -0
- package/concepts/th/Tool-ProposeGoal.md +43 -0
- package/concepts/th/Tool-PushNotification.md +6 -0
- package/concepts/th/Tool-REPL.md +47 -0
- package/concepts/th/Tool-ReadMcpResource.md +32 -0
- package/concepts/th/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/th/Tool-ReadNotifications.md +27 -0
- package/concepts/th/Tool-RemoteTrigger.md +7 -0
- package/concepts/th/Tool-ScheduleWakeup.md +5 -0
- package/concepts/th/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/th/Tool-SendFeedback.md +38 -0
- package/concepts/th/Tool-SendFile.md +36 -0
- package/concepts/th/Tool-SendMessage.md +5 -0
- package/concepts/th/Tool-SendUserFile.md +38 -0
- package/concepts/th/Tool-SendUserMessage.md +38 -0
- package/concepts/th/Tool-SuggestConnectors.md +28 -0
- package/concepts/th/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/th/Tool-SuggestSkills.md +33 -0
- package/concepts/th/Tool-TaskCreate.md +6 -0
- package/concepts/th/Tool-TaskGet.md +6 -0
- package/concepts/th/Tool-TaskList.md +6 -0
- package/concepts/th/Tool-TaskUpdate.md +6 -0
- package/concepts/th/Tool-TodoWrite.md +43 -0
- package/concepts/th/Tool-ToolSearch.md +5 -0
- package/concepts/th/Tool-WebSearch.md +13 -7
- package/concepts/th/Tools.md +26 -4
- package/concepts/tr/GlobalSettings.md +2 -2
- package/concepts/tr/Tool-Artifact.md +7 -0
- package/concepts/tr/Tool-EndConversation.md +35 -0
- package/concepts/tr/Tool-LSP.md +5 -0
- package/concepts/tr/Tool-ListAgents.md +35 -0
- package/concepts/tr/Tool-ListConnectors.md +34 -0
- package/concepts/tr/Tool-ListMcpResources.md +35 -0
- package/concepts/tr/Tool-ListPlugins.md +35 -0
- package/concepts/tr/Tool-ListSkills.md +37 -0
- package/concepts/tr/Tool-Monitor.md +7 -0
- package/concepts/tr/Tool-Projects.md +46 -0
- package/concepts/tr/Tool-ProposeGoal.md +43 -0
- package/concepts/tr/Tool-PushNotification.md +6 -0
- package/concepts/tr/Tool-REPL.md +47 -0
- package/concepts/tr/Tool-ReadMcpResource.md +32 -0
- package/concepts/tr/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/tr/Tool-ReadNotifications.md +27 -0
- package/concepts/tr/Tool-RemoteTrigger.md +7 -0
- package/concepts/tr/Tool-ScheduleWakeup.md +5 -0
- package/concepts/tr/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/tr/Tool-SendFeedback.md +38 -0
- package/concepts/tr/Tool-SendFile.md +36 -0
- package/concepts/tr/Tool-SendMessage.md +5 -0
- package/concepts/tr/Tool-SendUserFile.md +38 -0
- package/concepts/tr/Tool-SendUserMessage.md +38 -0
- package/concepts/tr/Tool-SuggestConnectors.md +28 -0
- package/concepts/tr/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/tr/Tool-SuggestSkills.md +33 -0
- package/concepts/tr/Tool-TaskCreate.md +6 -0
- package/concepts/tr/Tool-TaskGet.md +6 -0
- package/concepts/tr/Tool-TaskList.md +6 -0
- package/concepts/tr/Tool-TaskUpdate.md +6 -0
- package/concepts/tr/Tool-TodoWrite.md +43 -0
- package/concepts/tr/Tool-ToolSearch.md +5 -0
- package/concepts/tr/Tool-WebSearch.md +6 -0
- package/concepts/tr/Tools.md +26 -4
- package/concepts/uk/GlobalSettings.md +2 -2
- package/concepts/uk/Tool-Artifact.md +7 -0
- package/concepts/uk/Tool-EndConversation.md +35 -0
- package/concepts/uk/Tool-LSP.md +5 -0
- package/concepts/uk/Tool-ListAgents.md +35 -0
- package/concepts/uk/Tool-ListConnectors.md +34 -0
- package/concepts/uk/Tool-ListMcpResources.md +35 -0
- package/concepts/uk/Tool-ListPlugins.md +35 -0
- package/concepts/uk/Tool-ListSkills.md +37 -0
- package/concepts/uk/Tool-Monitor.md +7 -0
- package/concepts/uk/Tool-Projects.md +46 -0
- package/concepts/uk/Tool-ProposeGoal.md +43 -0
- package/concepts/uk/Tool-PushNotification.md +6 -0
- package/concepts/uk/Tool-REPL.md +47 -0
- package/concepts/uk/Tool-ReadMcpResource.md +32 -0
- package/concepts/uk/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/uk/Tool-ReadNotifications.md +27 -0
- package/concepts/uk/Tool-RemoteTrigger.md +7 -0
- package/concepts/uk/Tool-ScheduleWakeup.md +5 -0
- package/concepts/uk/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/uk/Tool-SendFeedback.md +38 -0
- package/concepts/uk/Tool-SendFile.md +36 -0
- package/concepts/uk/Tool-SendMessage.md +5 -0
- package/concepts/uk/Tool-SendUserFile.md +38 -0
- package/concepts/uk/Tool-SendUserMessage.md +38 -0
- package/concepts/uk/Tool-SuggestConnectors.md +28 -0
- package/concepts/uk/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/uk/Tool-SuggestSkills.md +33 -0
- package/concepts/uk/Tool-TaskCreate.md +6 -0
- package/concepts/uk/Tool-TaskGet.md +6 -0
- package/concepts/uk/Tool-TaskList.md +6 -0
- package/concepts/uk/Tool-TaskUpdate.md +6 -0
- package/concepts/uk/Tool-TodoWrite.md +43 -0
- package/concepts/uk/Tool-ToolSearch.md +5 -0
- package/concepts/uk/Tool-WebSearch.md +6 -0
- package/concepts/uk/Tools.md +26 -4
- package/concepts/zh/GlobalSettings.md +2 -2
- package/concepts/zh/Tool-Artifact.md +7 -0
- package/concepts/zh/Tool-EndConversation.md +35 -0
- package/concepts/zh/Tool-LSP.md +5 -0
- package/concepts/zh/Tool-ListAgents.md +35 -0
- package/concepts/zh/Tool-ListConnectors.md +34 -0
- package/concepts/zh/Tool-ListMcpResources.md +35 -0
- package/concepts/zh/Tool-ListPlugins.md +35 -0
- package/concepts/zh/Tool-ListSkills.md +37 -0
- package/concepts/zh/Tool-Monitor.md +7 -0
- package/concepts/zh/Tool-Projects.md +46 -0
- package/concepts/zh/Tool-ProposeGoal.md +43 -0
- package/concepts/zh/Tool-PushNotification.md +6 -0
- package/concepts/zh/Tool-REPL.md +47 -0
- package/concepts/zh/Tool-ReadMcpResource.md +32 -0
- package/concepts/zh/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/zh/Tool-ReadNotifications.md +27 -0
- package/concepts/zh/Tool-RemoteTrigger.md +7 -0
- package/concepts/zh/Tool-ScheduleWakeup.md +5 -0
- package/concepts/zh/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/zh/Tool-SendFeedback.md +38 -0
- package/concepts/zh/Tool-SendFile.md +36 -0
- package/concepts/zh/Tool-SendMessage.md +5 -0
- package/concepts/zh/Tool-SendUserFile.md +38 -0
- package/concepts/zh/Tool-SendUserMessage.md +38 -0
- package/concepts/zh/Tool-SuggestConnectors.md +28 -0
- package/concepts/zh/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/zh/Tool-SuggestSkills.md +33 -0
- package/concepts/zh/Tool-TaskCreate.md +6 -0
- package/concepts/zh/Tool-TaskGet.md +6 -0
- package/concepts/zh/Tool-TaskList.md +6 -0
- package/concepts/zh/Tool-TaskUpdate.md +6 -0
- package/concepts/zh/Tool-TodoWrite.md +43 -0
- package/concepts/zh/Tool-ToolSearch.md +5 -0
- package/concepts/zh/Tool-WebSearch.md +6 -0
- package/concepts/zh/Tools.md +26 -4
- package/concepts/zh-TW/GlobalSettings.md +2 -2
- package/concepts/zh-TW/Tool-Artifact.md +7 -0
- package/concepts/zh-TW/Tool-EndConversation.md +35 -0
- package/concepts/zh-TW/Tool-LSP.md +5 -0
- package/concepts/zh-TW/Tool-ListAgents.md +35 -0
- package/concepts/zh-TW/Tool-ListConnectors.md +34 -0
- package/concepts/zh-TW/Tool-ListMcpResources.md +35 -0
- package/concepts/zh-TW/Tool-ListPlugins.md +35 -0
- package/concepts/zh-TW/Tool-ListSkills.md +37 -0
- package/concepts/zh-TW/Tool-Monitor.md +7 -0
- package/concepts/zh-TW/Tool-Projects.md +46 -0
- package/concepts/zh-TW/Tool-ProposeGoal.md +43 -0
- package/concepts/zh-TW/Tool-PushNotification.md +6 -0
- package/concepts/zh-TW/Tool-REPL.md +47 -0
- package/concepts/zh-TW/Tool-ReadMcpResource.md +32 -0
- package/concepts/zh-TW/Tool-ReadMcpResourceDir.md +32 -0
- package/concepts/zh-TW/Tool-ReadNotifications.md +27 -0
- package/concepts/zh-TW/Tool-RemoteTrigger.md +7 -0
- package/concepts/zh-TW/Tool-ScheduleWakeup.md +5 -0
- package/concepts/zh-TW/Tool-SearchMcpRegistry.md +31 -0
- package/concepts/zh-TW/Tool-SendFeedback.md +38 -0
- package/concepts/zh-TW/Tool-SendFile.md +36 -0
- package/concepts/zh-TW/Tool-SendMessage.md +5 -0
- package/concepts/zh-TW/Tool-SendUserFile.md +38 -0
- package/concepts/zh-TW/Tool-SendUserMessage.md +38 -0
- package/concepts/zh-TW/Tool-SuggestConnectors.md +28 -0
- package/concepts/zh-TW/Tool-SuggestPluginInstall.md +39 -0
- package/concepts/zh-TW/Tool-SuggestSkills.md +33 -0
- package/concepts/zh-TW/Tool-TaskCreate.md +6 -0
- package/concepts/zh-TW/Tool-TaskGet.md +6 -0
- package/concepts/zh-TW/Tool-TaskList.md +6 -0
- package/concepts/zh-TW/Tool-TaskUpdate.md +6 -0
- package/concepts/zh-TW/Tool-TodoWrite.md +43 -0
- package/concepts/zh-TW/Tool-ToolSearch.md +5 -0
- package/concepts/zh-TW/Tool-WebSearch.md +6 -0
- package/concepts/zh-TW/Tools.md +26 -4
- package/dist/assets/{App-BaKGIW0-.js → App-CCu0y2Cq.js} +2 -2
- package/dist/assets/{MdxEditorPanel-DG-UE0PC.js → MdxEditorPanel-BBhgTmDk.js} +1 -1
- package/dist/assets/{Mobile-CQaUYdaf.js → Mobile-vN4lyiaz.js} +1 -1
- package/dist/assets/{ProxyStatsModal-j-Aty9Lu.js → ProxyStatsModal-BOflqr0R.js} +1 -1
- package/dist/assets/index-C3BRHDVF.js +2 -0
- package/dist/assets/seqResourceLoaders-DI0G5nu1.css +41 -0
- package/dist/assets/seqResourceLoaders-DpYqp6SP.js +2 -0
- package/dist/index.html +1 -1
- package/findcc.js +17 -8
- package/node_modules/@ccv/core/package.json +13 -0
- package/{server/lib → node_modules/@ccv/core/src}/approval-modal-prefs.js +1 -1
- package/node_modules/@ccv/core/src/clearCheckpoint.js +7 -0
- package/{src/utils → node_modules/@ccv/core/src}/contentFilter.js +207 -141
- package/{server/lib → node_modules/@ccv/core/src}/context-rules.js +2 -2
- package/{server/lib → node_modules/@ccv/core/src}/delta-reconstructor.js +60 -4
- package/{server/lib → node_modules/@ccv/core/src}/error-report.js +5 -4
- package/{server/lib → node_modules/@ccv/core/src}/session-boundary.js +3 -3
- package/{src/utils → node_modules/@ccv/core/src}/teammateDetector.js +9 -0
- package/{server/lib → node_modules/@ccv/core/src}/tools-xml-formatter.js +3 -3
- package/{server/lib → node_modules/@ccv/core/src}/v2-transcript-normalizer.js +1 -1
- package/{server/lib → node_modules/@ccv/core/src}/voice-pack-events.js +2 -2
- package/package.json +11 -96
- package/server/_paths.js +28 -7
- package/server/i18n.js +60 -0
- package/server/interceptor.js +36 -11
- package/server/lib/adapters/dingtalk-adapter.js +2 -2
- package/server/lib/adapters/discord-adapter.js +2 -2
- package/server/lib/adapters/feishu-adapter.js +2 -2
- package/server/lib/adapters/wecom-adapter.js +2 -2
- package/server/lib/approval-policy.js +29 -0
- package/server/lib/{ask-store.js → ask/ask-store.js} +3 -3
- package/server/lib/{perm-bridge.js → ask/perm-bridge.js} +5 -5
- package/server/lib/chat-queue.js +341 -0
- package/server/lib/cli-inject.js +1 -1
- package/server/lib/context-watcher.js +3 -3
- package/server/lib/create_system_prompt.js +0 -9
- package/server/lib/enrich-plan-input.js +1 -1
- package/server/lib/ensure-hooks.js +2 -2
- package/server/lib/file-access-policy.js +6 -1
- package/server/lib/file-api.js +17 -1
- package/server/lib/{dingtalk-bridge.js → im/dingtalk-bridge.js} +1 -1
- package/server/lib/{im-append-system.js → im/im-append-system.js} +5 -13
- package/server/lib/{im-bridge-core.js → im/im-bridge-core.js} +12 -6
- package/server/lib/{im-config.js → im/im-config.js} +1 -1
- package/server/lib/im/im-deny.js +4 -0
- package/server/lib/{im-lang.js → im/im-lang.js} +1 -1
- package/server/lib/{im-lock.js → im/im-lock.js} +2 -2
- package/server/lib/{im-process-manager.js → im/im-process-manager.js} +1 -1
- package/server/lib/{im-senders.js → im/im-senders.js} +1 -1
- package/server/lib/{im-skills.js → im/im-skills.js} +2 -2
- package/server/lib/interceptor-core.js +8 -5
- package/server/lib/kv-cache-analyzer.js +6 -5
- package/server/lib/launch-config.js +321 -0
- package/server/lib/log-file-utils.js +21 -0
- package/server/lib/log-management.js +6 -17
- package/server/lib/log-stream.js +1 -1
- package/server/lib/log-watcher.js +1 -1
- package/server/lib/model-system-prompts.js +1 -1
- package/server/lib/prefs-store.js +2 -2
- package/server/lib/project-prefs.js +6 -6
- package/server/lib/project-state.js +15 -0
- package/server/lib/{proxy-retry.js → proxy/proxy-retry.js} +2 -2
- package/server/lib/{proxy-stats.js → proxy/proxy-stats.js} +3 -3
- package/server/lib/sdk-adapter.js +6 -74
- package/server/lib/sdk-manager.js +383 -278
- package/server/lib/skills-api.js +1 -1
- package/server/lib/spawn-model-resolver.js +21 -6
- package/server/lib/stats-worker.js +2 -2
- package/server/lib/system-prompt-files.js +11 -10
- package/server/lib/system-prompt-render.js +23 -7
- package/server/lib/system-prompt-snapshots.js +452 -0
- package/server/lib/updater.js +63 -3
- package/server/lib/user-prompt-extract.js +5 -5
- package/server/lib/v2/adapter.js +3 -3
- package/server/lib/v2/conversation-store.js +1 -1
- package/server/lib/v2/convert.js +3 -3
- package/server/lib/v2/jsonl-read.js +1 -1
- package/server/lib/v2/live-feed.js +3 -3
- package/server/lib/v2/meta-rows.js +3 -3
- package/server/lib/v2/replay.js +1 -1
- package/server/lib/v2/session-list.js +1 -1
- package/server/lib/v2/session-owner.js +1 -1
- package/server/lib/v2/v2-writer.js +26 -1
- package/server/lib/v2/verify.js +1 -1
- package/server/lib/voice-pack-manager.js +4 -5
- package/server/lib/wire-compress.js +1 -1
- package/server/proxy.js +5 -5
- package/server/pty-manager.js +282 -184
- package/server/routes/ask-perm.js +1 -1
- package/server/routes/dingtalk.js +3 -3
- package/server/routes/events.js +2 -2
- package/server/routes/im.js +5 -5
- package/server/routes/preferences.js +3 -3
- package/server/routes/workspaces.js +1 -1
- package/server/server.js +207 -58
- package/server/system-prompt-templates/systemPromptModel.md +0 -8
- package/server/system-prompt-templates/systemPromptVariables.ar.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.da.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.de.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.es.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.fr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.it.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ja.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ko.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.no.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pl.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.pt-BR.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.ru.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.th.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.tr.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.uk.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh-TW.md +0 -7
- package/server/system-prompt-templates/systemPromptVariables.zh.md +0 -7
- package/concepts/ar/Tool-TeamCreate.md +0 -53
- package/concepts/ar/Tool-TeamDelete.md +0 -44
- package/concepts/ar/Tool-executeCode.md +0 -47
- package/concepts/ar/Tool-getDiagnostics.md +0 -44
- package/concepts/da/Tool-TeamCreate.md +0 -53
- package/concepts/da/Tool-TeamDelete.md +0 -44
- package/concepts/da/Tool-executeCode.md +0 -47
- package/concepts/da/Tool-getDiagnostics.md +0 -44
- package/concepts/de/Tool-TeamCreate.md +0 -53
- package/concepts/de/Tool-TeamDelete.md +0 -44
- package/concepts/de/Tool-executeCode.md +0 -47
- package/concepts/de/Tool-getDiagnostics.md +0 -44
- package/concepts/en/Tool-TeamCreate.md +0 -53
- package/concepts/en/Tool-TeamDelete.md +0 -44
- package/concepts/en/Tool-executeCode.md +0 -47
- package/concepts/en/Tool-getDiagnostics.md +0 -44
- package/concepts/es/Tool-TeamCreate.md +0 -53
- package/concepts/es/Tool-TeamDelete.md +0 -44
- package/concepts/es/Tool-executeCode.md +0 -47
- package/concepts/es/Tool-getDiagnostics.md +0 -44
- package/concepts/fr/Tool-TeamCreate.md +0 -53
- package/concepts/fr/Tool-TeamDelete.md +0 -44
- package/concepts/fr/Tool-executeCode.md +0 -47
- package/concepts/fr/Tool-getDiagnostics.md +0 -44
- package/concepts/it/Tool-TeamCreate.md +0 -53
- package/concepts/it/Tool-TeamDelete.md +0 -44
- package/concepts/it/Tool-executeCode.md +0 -47
- package/concepts/it/Tool-getDiagnostics.md +0 -44
- package/concepts/ja/Tool-TeamCreate.md +0 -53
- package/concepts/ja/Tool-TeamDelete.md +0 -44
- package/concepts/ja/Tool-executeCode.md +0 -47
- package/concepts/ja/Tool-getDiagnostics.md +0 -44
- package/concepts/ko/Tool-TeamCreate.md +0 -53
- package/concepts/ko/Tool-TeamDelete.md +0 -44
- package/concepts/ko/Tool-executeCode.md +0 -47
- package/concepts/ko/Tool-getDiagnostics.md +0 -44
- package/concepts/no/Tool-TeamCreate.md +0 -53
- package/concepts/no/Tool-TeamDelete.md +0 -44
- package/concepts/no/Tool-executeCode.md +0 -47
- package/concepts/no/Tool-getDiagnostics.md +0 -44
- package/concepts/pl/Tool-TeamCreate.md +0 -53
- package/concepts/pl/Tool-TeamDelete.md +0 -44
- package/concepts/pl/Tool-executeCode.md +0 -47
- package/concepts/pl/Tool-getDiagnostics.md +0 -44
- package/concepts/pt-BR/Tool-TeamCreate.md +0 -53
- package/concepts/pt-BR/Tool-TeamDelete.md +0 -44
- package/concepts/pt-BR/Tool-executeCode.md +0 -47
- package/concepts/pt-BR/Tool-getDiagnostics.md +0 -44
- package/concepts/ru/Tool-TeamCreate.md +0 -53
- package/concepts/ru/Tool-TeamDelete.md +0 -44
- package/concepts/ru/Tool-executeCode.md +0 -47
- package/concepts/ru/Tool-getDiagnostics.md +0 -44
- package/concepts/th/Tool-TeamCreate.md +0 -53
- package/concepts/th/Tool-TeamDelete.md +0 -44
- package/concepts/th/Tool-executeCode.md +0 -41
- package/concepts/th/Tool-getDiagnostics.md +0 -32
- package/concepts/tr/Tool-TeamCreate.md +0 -53
- package/concepts/tr/Tool-TeamDelete.md +0 -44
- package/concepts/tr/Tool-executeCode.md +0 -47
- package/concepts/tr/Tool-getDiagnostics.md +0 -44
- package/concepts/uk/Tool-TeamCreate.md +0 -53
- package/concepts/uk/Tool-TeamDelete.md +0 -44
- package/concepts/uk/Tool-executeCode.md +0 -47
- package/concepts/uk/Tool-getDiagnostics.md +0 -44
- package/concepts/zh/Tool-TeamCreate.md +0 -53
- package/concepts/zh/Tool-TeamDelete.md +0 -44
- package/concepts/zh/Tool-executeCode.md +0 -47
- package/concepts/zh/Tool-getDiagnostics.md +0 -44
- package/concepts/zh-TW/Tool-TeamCreate.md +0 -53
- package/concepts/zh-TW/Tool-TeamDelete.md +0 -44
- package/concepts/zh-TW/Tool-executeCode.md +0 -47
- package/concepts/zh-TW/Tool-getDiagnostics.md +0 -44
- package/dist/assets/index-CyiyzBfV.js +0 -2
- package/dist/assets/seqResourceLoaders-BgD_Rwvc.css +0 -41
- package/dist/assets/seqResourceLoaders-XMiEIVyV.js +0 -2
- package/src/utils/apiUrl.js +0 -26
- package/src/utils/askFallback.js +0 -21
- package/src/utils/askOptionDesc.js +0 -55
- package/src/utils/askPortalMatcher.js +0 -54
- package/src/utils/autoApproveOptions.js +0 -27
- package/src/utils/avatarAnimationPostPass.js +0 -49
- package/src/utils/builtinPresets.js +0 -18
- package/src/utils/clearCheckpoint.js +0 -7
- package/src/utils/commandValidator.js +0 -45
- package/src/utils/contextRaw.js +0 -18
- package/src/utils/contextSidebarNavigation.js +0 -16
- package/src/utils/contextTurns.js +0 -117
- package/src/utils/displayScaleHelper.js +0 -47
- package/src/utils/effectiveModel.js +0 -17
- package/src/utils/entry-slim.js +0 -563
- package/src/utils/entryCache.js +0 -144
- package/src/utils/errorReport.js +0 -6
- package/src/utils/fileExpandedPathsStorage.js +0 -70
- package/src/utils/fileIcons.jsx +0 -36
- package/src/utils/fileOpen.js +0 -37
- package/src/utils/formatters.js +0 -48
- package/src/utils/gitApi.js +0 -50
- package/src/utils/gitTreeBuilder.js +0 -19
- package/src/utils/helpers.js +0 -854
- package/src/utils/identityHeal.js +0 -108
- package/src/utils/imConnState.js +0 -59
- package/src/utils/imOrigin.js +0 -24
- package/src/utils/imTr.js +0 -7
- package/src/utils/imageCompress.js +0 -83
- package/src/utils/imageDownscale.js +0 -28
- package/src/utils/imageResize.js +0 -112
- package/src/utils/ingestPipeline.js +0 -47
- package/src/utils/isProxyMode.js +0 -11
- package/src/utils/lazyWithReload.js +0 -53
- package/src/utils/markdown.js +0 -30
- package/src/utils/markdownIncremental.js +0 -39
- package/src/utils/markdownProfiler.js +0 -113
- package/src/utils/mdExtensionDetect.js +0 -64
- package/src/utils/memoryLinkParser.js +0 -44
- package/src/utils/modalMask.js +0 -15
- package/src/utils/modelSuggestions.js +0 -48
- package/src/utils/monotime.js +0 -6
- package/src/utils/pinnedMenu.js +0 -55
- package/src/utils/presetShortcuts.js +0 -14
- package/src/utils/projectAlias.js +0 -135
- package/src/utils/promptClassifier.js +0 -112
- package/src/utils/promptDetect.js +0 -196
- package/src/utils/promptNav.js +0 -60
- package/src/utils/ptyChunkBuilder.js +0 -251
- package/src/utils/quickMenuHoverIntent.js +0 -35
- package/src/utils/rateLimitParser.js +0 -119
- package/src/utils/readResultPool.js +0 -106
- package/src/utils/refreshCachedItemProp.js +0 -30
- package/src/utils/resizeCalc.js +0 -21
- package/src/utils/resolveLocalized.js +0 -17
- package/src/utils/searchApi.js +0 -47
- package/src/utils/searchReplace.js +0 -51
- package/src/utils/seqResourceLoaders.js +0 -79
- package/src/utils/sessionManager.js +0 -482
- package/src/utils/sessionMerge.js +0 -239
- package/src/utils/skillModalController.js +0 -111
- package/src/utils/skillsParser.js +0 -116
- package/src/utils/slashCommandLabels.js +0 -80
- package/src/utils/splitDragCalc.js +0 -73
- package/src/utils/stickyBottomController.js +0 -643
- package/src/utils/svgSanitize.js +0 -48
- package/src/utils/systemTags.js +0 -47
- package/src/utils/tClaude.js +0 -20
- package/src/utils/teamModalBuilder.js +0 -351
- package/src/utils/teamSessionParser.js +0 -190
- package/src/utils/teammateAvatars.js +0 -194
- package/src/utils/termDiag.js +0 -114
- package/src/utils/terminalClipboard.js +0 -117
- package/src/utils/terminalWriteQueue.js +0 -398
- package/src/utils/thinkingMerge.js +0 -49
- package/src/utils/toolCatalog.js +0 -29
- package/src/utils/toolResultBuilder.js +0 -411
- package/src/utils/toolResultClassifier.js +0 -16
- package/src/utils/toolResultCore.js +0 -194
- package/src/utils/toolsDiff.js +0 -44
- package/src/utils/toolsXmlFormatter.js +0 -3
- package/src/utils/ultraplanController.js +0 -109
- package/src/utils/ultraplanExperts.js +0 -86
- package/src/utils/ultraplanTemplates.js +0 -154
- package/src/utils/userImageRefs.js +0 -49
- package/src/utils/v3Assembler.js +0 -125
- package/src/utils/v3Rows.js +0 -49
- package/src/utils/voicePackPlayer.js +0 -233
- package/src/utils/webSearchGrouping.js +0 -111
- package/src/utils/workflowFormat.js +0 -52
- package/src/utils/workflowRuns.js +0 -118
- package/src/utils/workflowStore.js +0 -94
- /package/{src/utils → node_modules/@ccv/core/src}/requestType.js +0 -0
- /package/server/lib/{ask-bridge.js → ask/ask-bridge.js} +0 -0
- /package/server/lib/{ask-constants.js → ask/ask-constants.js} +0 -0
- /package/server/lib/{ask-reaper.js → ask/ask-reaper.js} +0 -0
- /package/server/lib/{dingtalk-config.js → im/dingtalk-config.js} +0 -0
- /package/server/lib/{im-log-watcher.js → im/im-log-watcher.js} +0 -0
- /package/server/lib/{proxy-env.js → proxy/proxy-env.js} +0 -0
- /package/server/lib/{proxy-errors.js → proxy/proxy-errors.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Ask / permission hook bridge routes (moved verbatim from server.js handleRequest).
|
|
2
|
-
import { loadAskStore, consumeIfFinal as askStoreConsumeIfFinal, markCancelled as askStoreMarkCancelled } from '../lib/ask-store.js';
|
|
2
|
+
import { loadAskStore, consumeIfFinal as askStoreConsumeIfFinal, markCancelled as askStoreMarkCancelled } from '../lib/ask/ask-store.js';
|
|
3
3
|
import { runWaterfallHook, runParallelHook } from '../lib/plugin-loader.js';
|
|
4
4
|
import { sendEventToClients } from '../lib/log-watcher.js';
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// DingTalk bridge config API. See server/lib/dingtalk-config.js (storage) and
|
|
2
|
-
// server/lib/dingtalk-bridge.js (the Stream client) for the underlying logic.
|
|
1
|
+
// DingTalk bridge config API. See server/lib/im/dingtalk-config.js (storage) and
|
|
2
|
+
// server/lib/im/dingtalk-bridge.js (the Stream client) for the underlying logic.
|
|
3
3
|
//
|
|
4
4
|
// GET /api/dingtalk/status — public; remote callers get only hasSecret, the local (admin)
|
|
5
5
|
// caller additionally gets the plaintext appSecret to view/copy.
|
|
6
6
|
// POST /api/dingtalk/config — loopback-only (!isLocal → 403); save creds, reload bridge.
|
|
7
7
|
// POST /api/dingtalk/test — loopback-only; validate creds (fetch an access token).
|
|
8
|
-
import { loadDingTalkState, saveDingTalkConfig, loadDingTalkConfig } from '../lib/dingtalk-config.js';
|
|
8
|
+
import { loadDingTalkState, saveDingTalkConfig, loadDingTalkConfig } from '../lib/im/dingtalk-config.js';
|
|
9
9
|
|
|
10
10
|
const JSON_HEADERS = { 'Content-Type': 'application/json' };
|
|
11
11
|
|
package/server/routes/events.js
CHANGED
|
@@ -5,7 +5,7 @@ import { _projectName, getLiveLogSource, isContinuedLaunch } from '../intercepto
|
|
|
5
5
|
import { LOG_DIR } from '../../findcc.js';
|
|
6
6
|
import { streamRawEntriesAsync } from '../lib/log-stream.js';
|
|
7
7
|
import { migrationStatus } from '../lib/v2/migrate-prompt.js';
|
|
8
|
-
import { reportSwallowed } from '
|
|
8
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
9
9
|
import { sseHead, sseWrite, needsDrain, wireEnd, awaitWireDrain } from '../lib/wire-compress.js';
|
|
10
10
|
import { readV2ColdBundle } from '../lib/v2/meta-rows.js';
|
|
11
11
|
import { readV2SingleEntry } from '../lib/v2/adapter.js';
|
|
@@ -13,7 +13,7 @@ import { enrichRawIfNeeded } from '../lib/enrich-plan-input.js';
|
|
|
13
13
|
import { validateLogPath } from '../lib/log-management.js';
|
|
14
14
|
import { isMainAgentEntry, extractCachedContent } from '../lib/kv-cache-analyzer.js';
|
|
15
15
|
import { CONTEXT_WINDOW_FILE, readModelContextSize, buildContextWindowEvent, getContextSizeForModel } from '../lib/context-watcher.js';
|
|
16
|
-
import { adaptContextWindow } from '
|
|
16
|
+
import { adaptContextWindow } from '@ccv/core/context-rules';
|
|
17
17
|
|
|
18
18
|
function turnEndNotify(req, res, parsedUrl, isLocal, deps) {
|
|
19
19
|
if (!isLocal) {
|
package/server/routes/im.js
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
// detached ccv worker (im-process-manager). In the MAIN process, status/process routes go through the
|
|
20
20
|
// manager (lock + loopback probe of the worker). In a WORKER process (CCV_IM_PLATFORM set), status
|
|
21
21
|
// reports its own in-process adapter (deps.im.getBridgeStatus) — that's what the manager probes.
|
|
22
|
-
import { getDescriptor, loadConfig, loadState, saveConfig } from '../lib/im-config.js';
|
|
22
|
+
import { getDescriptor, loadConfig, loadState, saveConfig } from '../lib/im/im-config.js';
|
|
23
23
|
import { findRecentLog } from '../lib/interceptor-core.js';
|
|
24
24
|
import { listV2Sessions } from '../lib/v2/adapter.js';
|
|
25
|
-
import { readSenders } from '../lib/im-senders.js';
|
|
26
|
-
import { readImAppendSystem, writeImAppendSystem, buildImAppendSystemPreset, MAX_IM_APPEND_SYSTEM_CHARS } from '../lib/im-append-system.js';
|
|
27
|
-
import { imDir } from '../lib/im-lock.js';
|
|
28
|
-
import { resolvePrefLang } from '../lib/im-lang.js';
|
|
25
|
+
import { readSenders } from '../lib/im/im-senders.js';
|
|
26
|
+
import { readImAppendSystem, writeImAppendSystem, buildImAppendSystemPreset, MAX_IM_APPEND_SYSTEM_CHARS } from '../lib/im/im-append-system.js';
|
|
27
|
+
import { imDir } from '../lib/im/im-lock.js';
|
|
28
|
+
import { resolvePrefLang } from '../lib/im/im-lang.js';
|
|
29
29
|
import { listSkills, moveSkill, deleteSkill } from '../lib/skills-api.js';
|
|
30
30
|
import { importSkillTo } from './skills.js';
|
|
31
31
|
import { LOG_DIR } from '../../findcc.js';
|
|
@@ -5,14 +5,14 @@ import { homedir } from 'node:os';
|
|
|
5
5
|
import { LOG_DIR, setLogDir, getClaudeConfigDir, discoverClaudeExecutables, resolveExplicitClaudePath, CLAUDE_EXECUTABLE_PREF_KEY } from '../../findcc.js';
|
|
6
6
|
import { PROFILE_PATH, _defaultConfig, getActiveProfileId, getStoredRoles, isOfficialDefaultEndpoint, setActiveProfileForWorkspace, _loadProxyProfile, RETRY_CONFIG_PATH, _retryConfigState, _loadRetryConfigState } from '../interceptor.js';
|
|
7
7
|
import { migrateProxyProfileList, isValidRoleValue, PROXY_ROLE_KEYS } from '../lib/interceptor-core.js';
|
|
8
|
-
import { DEFAULT_RETRY_CONFIG, validateRetryConfig, resolveRetryConfig } from '../lib/proxy-retry.js';
|
|
8
|
+
import { DEFAULT_RETRY_CONFIG, validateRetryConfig, resolveRetryConfig } from '../lib/proxy/proxy-retry.js';
|
|
9
9
|
import { discoverCcSwitchProviders, mergeImportedProfiles } from '../lib/ccswitch-import.js';
|
|
10
|
-
import { reportSwallowed } from '
|
|
10
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
11
11
|
import { setLang } from '../i18n.js';
|
|
12
12
|
import { reconcileVoicePackPrefs as vpReconcile } from '../lib/voice-pack-manager.js';
|
|
13
13
|
import { readClaudeProjectModel } from '../lib/context-watcher.js';
|
|
14
14
|
import { sendEventToClients } from '../lib/log-watcher.js';
|
|
15
|
-
import { listPlatforms } from '../lib/im-config.js';
|
|
15
|
+
import { listPlatforms } from '../lib/im/im-config.js';
|
|
16
16
|
import { mutatePrefs, applyPrefsPatch, readPrefsRaw } from '../lib/prefs-store.js';
|
|
17
17
|
import {
|
|
18
18
|
getCurrentProjectKey, getCurrentProjectName, hasFork, listForks, resolveScoped,
|
|
@@ -4,7 +4,7 @@ import { basename } from 'node:path';
|
|
|
4
4
|
import { initForWorkspace, resetWorkspace, getLiveLogSource, markContinuedLaunch, markForkSession, markResumeSession, isContinuedLaunch } from '../interceptor.js';
|
|
5
5
|
import { LOG_DIR } from '../../findcc.js';
|
|
6
6
|
import { migrationStatus } from '../lib/v2/migrate-prompt.js';
|
|
7
|
-
import { reportSwallowed } from '
|
|
7
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
8
8
|
|
|
9
9
|
// P2: claude continuation flags — the workspace launcher injects `-c` itself
|
|
10
10
|
// (WorkspaceList's logCount heuristic), so argv scanning in cli.js never sees
|
package/server/server.js
CHANGED
|
@@ -10,9 +10,9 @@ import { promisify } from 'node:util';
|
|
|
10
10
|
import { Worker } from 'node:worker_threads';
|
|
11
11
|
import { isPathContained } from './lib/file-api.js';
|
|
12
12
|
import { sseWrite, isWireV3Enabled } from './lib/wire-compress.js';
|
|
13
|
-
import { setEntry as askStoreSetEntry, deleteEntry as askStoreDeleteEntry, pruneStale as askStorePruneStale, markAnswered as askStoreMarkAnswered, markCancelled as askStoreMarkCancelled, loadAskStore as askStoreLoad } from './lib/ask-store.js';
|
|
14
|
-
import { ASK_TIMEOUT_MS, ASK_WAITER_REAP_INTERVAL_MS, ASK_WAITER_LIVENESS_MS } from './lib/ask-constants.js';
|
|
15
|
-
import { reapDeadAskWaiters, sweepOrphanedDiskAsks } from './lib/ask-reaper.js';
|
|
13
|
+
import { setEntry as askStoreSetEntry, deleteEntry as askStoreDeleteEntry, pruneStale as askStorePruneStale, markAnswered as askStoreMarkAnswered, markCancelled as askStoreMarkCancelled, loadAskStore as askStoreLoad } from './lib/ask/ask-store.js';
|
|
14
|
+
import { ASK_TIMEOUT_MS, ASK_WAITER_REAP_INTERVAL_MS, ASK_WAITER_LIVENESS_MS } from './lib/ask/ask-constants.js';
|
|
15
|
+
import { reapDeadAskWaiters, sweepOrphanedDiskAsks } from './lib/ask/ask-reaper.js';
|
|
16
16
|
import { sdkApprovalCloseType } from './lib/sdk-adapter.js';
|
|
17
17
|
import { DIST_DIR, NODE_MODULES } from './_paths.js';
|
|
18
18
|
import { createDispatcher } from './routes/_dispatch.js';
|
|
@@ -41,14 +41,16 @@ import { authRoutes } from './routes/auth.js';
|
|
|
41
41
|
import { dingtalkRoutes } from './routes/dingtalk.js';
|
|
42
42
|
import { imRoutes } from './routes/im.js';
|
|
43
43
|
import { proxyStatsRoutes } from './routes/proxy-stats.js';
|
|
44
|
-
import { setProxyStatsListener } from './lib/proxy-stats.js';
|
|
45
|
-
import * as imCore from './lib/im-bridge-core.js';
|
|
46
|
-
import * as imProcMgr from './lib/im-process-manager.js';
|
|
44
|
+
import { setProxyStatsListener } from './lib/proxy/proxy-stats.js';
|
|
45
|
+
import * as imCore from './lib/im/im-bridge-core.js';
|
|
46
|
+
import * as imProcMgr from './lib/im/im-process-manager.js';
|
|
47
|
+
import * as chatQueue from './lib/chat-queue.js';
|
|
48
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
47
49
|
import './lib/adapters/dingtalk-adapter.js'; // side-effect: registers the DingTalk adapter
|
|
48
50
|
import './lib/adapters/feishu-adapter.js'; // side-effect: registers the Feishu adapter
|
|
49
51
|
import './lib/adapters/wecom-adapter.js'; // side-effect: registers the WeCom adapter
|
|
50
52
|
import './lib/adapters/discord-adapter.js'; // side-effect: registers the Discord adapter
|
|
51
|
-
import { loadConfig } from './lib/im-config.js';
|
|
53
|
+
import { loadConfig } from './lib/im/im-config.js';
|
|
52
54
|
|
|
53
55
|
// Windows:git.exe / cmd.exe 等 console-subsystem 子进程从无控制台的 worker node.exe 启动时
|
|
54
56
|
// 会各弹一个可见控制台窗口(diff/status 轮询路径高频闪现)。在 promisify 包装层统一默认
|
|
@@ -83,7 +85,7 @@ import { V2LiveFeed } from './lib/v2/live-feed.js';
|
|
|
83
85
|
import { sanitizePathComponent } from './lib/v2/layout.js';
|
|
84
86
|
import { maybeResumeConvert } from './lib/v2/convert-manager.js';
|
|
85
87
|
import { LOG_DIR, setLogDir, getClaudeConfigDir, isBrowserOpenSuppressed } from '../findcc.js';
|
|
86
|
-
import { loadRetryConfig } from './lib/proxy-retry.js';
|
|
88
|
+
import { loadRetryConfig } from './lib/proxy/proxy-retry.js';
|
|
87
89
|
|
|
88
90
|
// 代理重试配置:由 interceptor._retryConfigState 提供(live binding,watchFile 热刷新)。
|
|
89
91
|
// mode 默认 off(向后兼容,不重试)。env 是启动默认/兜底,retry-config.json 覆盖 env。
|
|
@@ -97,8 +99,8 @@ import { loadAuthConfig, loadAuthState, saveAuthConfig, clearProjectOverride, ge
|
|
|
97
99
|
import { checkAndUpdate } from './lib/updater.js';
|
|
98
100
|
import { loadPlugins, runWaterfallHook, runParallelHook } from './lib/plugin-loader.js';
|
|
99
101
|
import { CONTEXT_WINDOW_FILE, readModelContextSize } from './lib/context-watcher.js';
|
|
100
|
-
import { sendEventToClients
|
|
101
|
-
import { createImLogWatcher } from './lib/im-log-watcher.js';
|
|
102
|
+
import { sendEventToClients } from './lib/log-watcher.js';
|
|
103
|
+
import { createImLogWatcher } from './lib/im/im-log-watcher.js';
|
|
102
104
|
import { unwatchAllWorkflows } from './lib/workflow-watcher.js';
|
|
103
105
|
import { backupConfigs } from './lib/config-backup.js';
|
|
104
106
|
import { normalizeBasePath, validateBasePath, stripBasePath } from './lib/base-path.js';
|
|
@@ -184,7 +186,7 @@ const pendingAskHooks = new Map(); // Map<id, { questions, res, timer, createdAt
|
|
|
184
186
|
const ASK_HOOK_MAP_MAX = 1000;
|
|
185
187
|
// 单一来源的"无超时"实质上限——延伸至 24h 兼顾防 entry 泄漏;
|
|
186
188
|
// 任何引用此值的地方(HOOK_TIMEOUT / REPLAY_HOOK_TIMEOUT / 广播 timeoutMs)都从这里取。
|
|
187
|
-
// 实际常量定义在 server/lib/ask-constants.js(hook 路径 + SDK 路径同源)。
|
|
189
|
+
// 实际常量定义在 server/lib/ask/ask-constants.js(hook 路径 + SDK 路径同源)。
|
|
188
190
|
const ASK_HOOK_TIMEOUT_MS = ASK_TIMEOUT_MS;
|
|
189
191
|
|
|
190
192
|
// 内存 Map 是权威源;ask-store 是镜像(best-effort)。崩溃时只丢"未落盘窗口"内的最新一次变更。
|
|
@@ -205,7 +207,7 @@ function _persistAskDelete(id) {
|
|
|
205
207
|
// until either an answer/cancel arrives or wait ms elapses (then 204).
|
|
206
208
|
const shortPollListeners = new Map(); // id -> Set<{ res, tid, finished }>
|
|
207
209
|
|
|
208
|
-
// Waiter-liveness tracking for short-poll asks (see server/lib/ask-reaper.js).
|
|
210
|
+
// Waiter-liveness tracking for short-poll asks (see server/lib/ask/ask-reaper.js).
|
|
209
211
|
// Memory-only BY DESIGN: persisting it would bump the ask-store SCHEMA_VERSION;
|
|
210
212
|
// the reaper's boot-time orphan sweep covers restarts instead.
|
|
211
213
|
const askWaiterLastPoll = new Map(); // id -> ms of last POST create / GET result poll
|
|
@@ -395,7 +397,7 @@ delete process.env.CCV_USE_PASSWORD;
|
|
|
395
397
|
delete process.env.CCV_PASSWORD;
|
|
396
398
|
|
|
397
399
|
let clients = [];
|
|
398
|
-
// 内存级缓存:30s 启动检查若发现「有新版」(major_available / deferred_busy / brew_managed),
|
|
400
|
+
// 内存级缓存:30s 启动检查若发现「有新版」(major_available / deferred_busy / brew_managed / pnpm_managed),
|
|
399
401
|
// 在此存下 {version, source},供 events 路由向新连接(刷新/新标签页)补推 update_major_available,
|
|
400
402
|
// 让版本徽标在本进程存续期内跨刷新持续显示。进程重启即归零(不落盘)。
|
|
401
403
|
let pendingMajorUpdate = null;
|
|
@@ -956,7 +958,7 @@ export async function startViewer() {
|
|
|
956
958
|
// Waiter-liveness reaper: resolves short-poll asks whose hook process (ask-bridge)
|
|
957
959
|
// died without notifying us (e.g. AskUserQuestion declined at the CLI → SIGTERM).
|
|
958
960
|
// Keys on waiter liveness, never on wall-clock ask age — the "GUI effectively
|
|
959
|
-
// no-timeout" contract is untouched. See server/lib/ask-reaper.js.
|
|
961
|
+
// no-timeout" contract is untouched. See server/lib/ask/ask-reaper.js.
|
|
960
962
|
const _reaperDeps = {
|
|
961
963
|
pendingAskHooks,
|
|
962
964
|
shortPollListeners,
|
|
@@ -1229,7 +1231,7 @@ export async function startViewer() {
|
|
|
1229
1231
|
async function setupTerminalWebSocket(httpServer) {
|
|
1230
1232
|
try {
|
|
1231
1233
|
const { WebSocketServer } = await import('ws');
|
|
1232
|
-
const { writeToPty, writeToPtySequential, resizePty, onPtyData, onPtyExit, getPtyState, getOutputBuffer, getCurrentWorkspace, spawnShell, findSafeSliceStart } = await import('./pty-manager.js');
|
|
1234
|
+
const { writeToPty, writeToPtySequential, resizePty, onPtyData, onPtyExit, getPtyState, getPtyKind, getOutputBuffer, getCurrentWorkspace, spawnShell, findSafeSliceStart } = await import('./pty-manager.js');
|
|
1233
1235
|
const {
|
|
1234
1236
|
spawnScratch,
|
|
1235
1237
|
writeScratch,
|
|
@@ -1247,6 +1249,20 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
1247
1249
|
const MAX_SCRATCH_PTYS = 16;
|
|
1248
1250
|
_writeToPty = writeToPty;
|
|
1249
1251
|
_onPtyData = onPtyData;
|
|
1252
|
+
// Chat-composer busy queue (terminal-hidden PTY mode): holds Enter-while-busy messages
|
|
1253
|
+
// and injects them via the same write path the IM bridge uses. SDK mode has no PTY —
|
|
1254
|
+
// sdk-manager owns its own queue there, so init is skipped entirely.
|
|
1255
|
+
if (!isSdkMode) {
|
|
1256
|
+
chatQueue.initChatQueue({
|
|
1257
|
+
writeToPty,
|
|
1258
|
+
writeToPtySequential,
|
|
1259
|
+
getPtyKind,
|
|
1260
|
+
isStreaming: () => streamingState.active,
|
|
1261
|
+
hasPendingApproval: () => pendingAskHooks.size > 0 || pendingPermHooks.size > 0,
|
|
1262
|
+
hasExternalInjection: () => imCore.anyActiveInjection(),
|
|
1263
|
+
broadcastWs: broadcastWsMessage,
|
|
1264
|
+
});
|
|
1265
|
+
}
|
|
1250
1266
|
const wss = new WebSocketServer({ noServer: true });
|
|
1251
1267
|
terminalWss = wss;
|
|
1252
1268
|
const wssScratch = new WebSocketServer({ noServer: true });
|
|
@@ -1531,6 +1547,48 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
1531
1547
|
} catch {}
|
|
1532
1548
|
}
|
|
1533
1549
|
|
|
1550
|
+
// Replay pending perm-hook 请求(PTY 与 SDK 模式同理):perm 广播原本是一次性的,
|
|
1551
|
+
// ws 断连期间打开的审批弹窗在重连后会孤儿化(server 端 long-poll/wait 仍在等,
|
|
1552
|
+
// 直到超时 silent deny)。连接时重发,前端 perm 分支按 id 去重,天然幂等。
|
|
1553
|
+
for (const [id, entry] of pendingPermHooks) {
|
|
1554
|
+
try {
|
|
1555
|
+
ws.send(JSON.stringify({ type: 'perm-hook-pending', id, toolName: entry.toolName, input: entry.input }));
|
|
1556
|
+
} catch {}
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
// Replay SDK 模式 pendings(sdk-manager canUseTool 的 ask/plan/perm):
|
|
1560
|
+
// 与上面 perm-hook 同理,但快照来自 sdk-manager(_pendingApprovals)。
|
|
1561
|
+
// ask 类带 startedAt/timeoutMs —— 与 ask-hook replay 同款剩余时间重算。
|
|
1562
|
+
if (isSdkMode && _sdkGetPendingApprovals) {
|
|
1563
|
+
for (const p of _sdkGetPendingApprovals() || []) {
|
|
1564
|
+
if (!p || !p.replay || !p.id) continue;
|
|
1565
|
+
const payload = { ...p.replay };
|
|
1566
|
+
if (p.kind === 'ask') {
|
|
1567
|
+
payload.startedAt = now; // 让前端按"还剩 remaining"起算
|
|
1568
|
+
payload.timeoutMs = p.remainingMs; // 剩余可用时间
|
|
1569
|
+
}
|
|
1570
|
+
try { ws.send(JSON.stringify(payload)); } catch {}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
// Replay sdk-init snapshot so a refreshed/reconnected page restores slash-command
|
|
1575
|
+
// surface and model info without waiting for the next session.
|
|
1576
|
+
if (isSdkMode && _sdkGetInitSnapshot) {
|
|
1577
|
+
const initSnap = _sdkGetInitSnapshot();
|
|
1578
|
+
if (initSnap) {
|
|
1579
|
+
try { ws.send(JSON.stringify(initSnap)); } catch {}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
// Replay the chat-composer busy queue so a refreshed/reconnected page restores the
|
|
1584
|
+
// floating queued-message bubbles (server is the source of truth in both modes).
|
|
1585
|
+
{
|
|
1586
|
+
const qItems = (isSdkMode && _sdkGetQueueSnapshot) ? _sdkGetQueueSnapshot() : chatQueue.getSnapshot();
|
|
1587
|
+
if (Array.isArray(qItems) && qItems.length) {
|
|
1588
|
+
try { ws.send(JSON.stringify({ type: 'queue-state', items: qItems })); } catch {}
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1534
1592
|
// 兜底重绘标记:claude TUI 在 alternate-screen 下只在收到 SIGWINCH 时重绘整屏。
|
|
1535
1593
|
// 若前端首次 resize 与 PTY 当前尺寸恰好相等,pty.resize noop 不发 SIGWINCH → 前端空白。
|
|
1536
1594
|
// 该 ws 收到第一条 resize 时(见 ws.on('message')),抖动 (rows+1) → (rows) 触发 SIGWINCH。
|
|
@@ -1656,6 +1714,13 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
1656
1714
|
ws.on('message', async (raw) => {
|
|
1657
1715
|
try {
|
|
1658
1716
|
const msg = JSON.parse(raw.toString());
|
|
1717
|
+
// SDK 模式没有 PTY:PTY 专属消息(input/sequential input/resync/resize)一律 no-op,
|
|
1718
|
+
// 否则 'input' 会在无会话时触发 spawnShell() 拉出一个用户看不见的裸 shell。
|
|
1719
|
+
// sdk-*/ask-*/perm-*/image-* 等控制消息不受影响。scratch WS 是独立 handler,不受此闸门影响。
|
|
1720
|
+
if (isSdkMode && (msg.type === 'input' || msg.type === 'input-sequential'
|
|
1721
|
+
|| msg.type === 'resync-request' || msg.type === 'resize')) {
|
|
1722
|
+
return;
|
|
1723
|
+
}
|
|
1659
1724
|
if (msg.type === 'input') {
|
|
1660
1725
|
// PTY 已退出时,自动 spawn 交互式 shell
|
|
1661
1726
|
const state = getPtyState();
|
|
@@ -1965,27 +2030,70 @@ async function setupTerminalWebSocket(httpServer) {
|
|
|
1965
2030
|
}
|
|
1966
2031
|
} else if (msg.type === 'sdk-interrupt') {
|
|
1967
2032
|
// Stop button in SDK mode — interrupt current turn, keep session alive.
|
|
1968
|
-
//
|
|
2033
|
+
// Streaming-state reconciliation comes from the wire path (proxy →
|
|
2034
|
+
// fetch hook → streamingState → SSE), same as PTY mode; sdk-manager
|
|
2035
|
+
// no longer emits its own streaming_status.
|
|
1969
2036
|
if (isSdkMode && _sdkInterruptTurn) {
|
|
1970
2037
|
const cancelled = _sdkInterruptTurn() || [];
|
|
1971
|
-
|
|
1972
|
-
// drained server-side; reuse each kind's existing resolve/cancel broadcast type).
|
|
1973
|
-
if (cancelled.length && terminalWss) {
|
|
1974
|
-
for (const { id, kind } of cancelled) {
|
|
1975
|
-
if (!id) continue;
|
|
1976
|
-
const type = sdkApprovalCloseType(kind);
|
|
1977
|
-
const m = JSON.stringify({ type, id, reason: 'Turn interrupted' });
|
|
1978
|
-
terminalWss.clients.forEach((c) => {
|
|
1979
|
-
if (c.readyState === 1) { try { c.send(m); } catch {} }
|
|
1980
|
-
});
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
2038
|
+
_broadcastApprovalCloses(cancelled, 'Turn interrupted');
|
|
1983
2039
|
} else {
|
|
1984
2040
|
// sdk-interrupt 收到却没生效:客户端按 props.sdkMode 发了中断,但本端不是 SDK 模式或
|
|
1985
2041
|
// _sdkInterruptTurn 未由 cli.js 接线(client/server sdkMode 配置漂移)。此时客户端会乐观
|
|
1986
2042
|
// 切非运行态并等 4s 兜底才翻回,输出仍在流 —— 打日志让这类错配可观测。
|
|
1987
2043
|
console.warn('[SDK] sdk-interrupt ignored: isSdkMode=%s, handler=%s', isSdkMode, !!_sdkInterruptTurn);
|
|
1988
2044
|
}
|
|
2045
|
+
} else if (msg.type === 'queue-message') {
|
|
2046
|
+
// Chat-composer busy-queue enqueue (terminal-hidden PTY mode). These queue-* types
|
|
2047
|
+
// are deliberately NOT in the SDK no-op gate above: each branch routes by mode.
|
|
2048
|
+
// SDK fallback: the frontend normally still sends sdk-user-message, which
|
|
2049
|
+
// self-queues server-side when busy — relay keeps the contract mode-agnostic.
|
|
2050
|
+
if (typeof msg.text === 'string' && msg.text) {
|
|
2051
|
+
if (isSdkMode) {
|
|
2052
|
+
if (_sdkSendUserMessage) {
|
|
2053
|
+
_sdkSendUserMessage(msg.text).catch(err => {
|
|
2054
|
+
console.error('[SDK] queue-message relay error:', err.message);
|
|
2055
|
+
});
|
|
2056
|
+
}
|
|
2057
|
+
} else {
|
|
2058
|
+
try { chatQueue.enqueue(msg.text); } catch (err) { reportSwallowed('server.queue-message', err); }
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
} else if (msg.type === 'queue-send-now') {
|
|
2062
|
+
// Bubble "send now": interrupt the running turn and inject this message first.
|
|
2063
|
+
const qid = (typeof msg.id === 'string' && /^[a-zA-Z0-9_-]{1,128}$/.test(msg.id)) ? msg.id : null;
|
|
2064
|
+
if (qid) {
|
|
2065
|
+
if (isSdkMode) {
|
|
2066
|
+
if (_sdkSendQueuedNow) {
|
|
2067
|
+
try { _broadcastApprovalCloses(_sdkSendQueuedNow(qid) || [], 'Queued message sent now'); }
|
|
2068
|
+
catch (err) { reportSwallowed('server.queue-send-now', err); }
|
|
2069
|
+
}
|
|
2070
|
+
} else {
|
|
2071
|
+
try { chatQueue.sendNow(qid); } catch (err) { reportSwallowed('server.queue-send-now', err); }
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
} else if (msg.type === 'queue-remove') {
|
|
2075
|
+
const qid = (typeof msg.id === 'string' && /^[a-zA-Z0-9_-]{1,128}$/.test(msg.id)) ? msg.id : null;
|
|
2076
|
+
if (qid) {
|
|
2077
|
+
if (isSdkMode) {
|
|
2078
|
+
if (_sdkRemoveQueued) { try { _sdkRemoveQueued(qid); } catch (err) { reportSwallowed('server.queue-remove', err); } }
|
|
2079
|
+
} else {
|
|
2080
|
+
try { chatQueue.remove(qid); } catch (err) { reportSwallowed('server.queue-remove', err); }
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
} else if (msg.type === 'queue-clear') {
|
|
2084
|
+
// Session/workspace switch: drop the parked queue WITHOUT interrupting a running
|
|
2085
|
+
// turn. (Stop semantics live elsewhere: PTY queue-suppress, SDK sdk-interrupt.)
|
|
2086
|
+
if (isSdkMode) {
|
|
2087
|
+
if (_sdkClearQueued) { try { _sdkClearQueued(); } catch (err) { reportSwallowed('server.queue-clear', err); } }
|
|
2088
|
+
} else {
|
|
2089
|
+
try { chatQueue.clear(); } catch (err) { reportSwallowed('server.queue-clear', err); }
|
|
2090
|
+
}
|
|
2091
|
+
} else if (msg.type === 'queue-suppress') {
|
|
2092
|
+
// PTY Stop pressed: park the queue — the coming turn-end must not auto-drain it.
|
|
2093
|
+
// (SDK mode handles this inside sdk-manager.interruptTurn; no PTY queue exists.)
|
|
2094
|
+
if (!isSdkMode) {
|
|
2095
|
+
try { chatQueue.suppressNextDrain(); } catch (err) { reportSwallowed('server.queue-suppress', err); }
|
|
2096
|
+
}
|
|
1989
2097
|
} else if (msg.type === 'image-remove-notify' || msg.type === 'image-upload-notify') {
|
|
1990
2098
|
// Security: only allow paths within upload directories, reject traversal
|
|
1991
2099
|
const p = msg.path;
|
|
@@ -2153,6 +2261,10 @@ function _emitTurnEnd(sessionId, ts, transcriptPath = null) {
|
|
|
2153
2261
|
// Forward the (clean) assistant reply for this turn to whichever IM bridge owns the in-flight
|
|
2154
2262
|
// turn, if any. Fire-and-forget: a bridge failure must never affect SSE broadcast.
|
|
2155
2263
|
try { imCore.notifyTurnEnd(sid, t, transcriptPath); } catch { /* best-effort */ }
|
|
2264
|
+
// chat-queue drain trigger #2: post-debounce idempotent retry of the trigger at
|
|
2265
|
+
// _scheduleTurnEndBroadcast entry. chatQueue no-ops internally when uninitialized
|
|
2266
|
+
// (SDK mode / tests that never ran startViewer).
|
|
2267
|
+
try { chatQueue.onTurnEnd(sid, t); } catch { /* best-effort */ }
|
|
2156
2268
|
if (typeof _onTurnEndBroadcastForTests === 'function') {
|
|
2157
2269
|
try { _onTurnEndBroadcastForTests({ sessionId: sid, ts: t }); }
|
|
2158
2270
|
catch (e) { if (process.env.NODE_ENV === 'test') throw e; /* prod 不让测试桩污染 */ }
|
|
@@ -2166,6 +2278,11 @@ function _scheduleTurnEndBroadcast(sessionId, ts, transcriptPath = null) {
|
|
|
2166
2278
|
if (_isStopping) return;
|
|
2167
2279
|
const sid = _normalizeKey(sessionId);
|
|
2168
2280
|
const t = ts || Date.now();
|
|
2281
|
+
// chat-queue drain trigger #1: the Stop-hook POST arrival IS the authoritative
|
|
2282
|
+
// "query() ended" signal — don't wait out the SSE debounce window (default 10s),
|
|
2283
|
+
// or freshly-parked bubbles would sit visibly inert after every turn. The queue's
|
|
2284
|
+
// internal idle poll absorbs the housekeeping/telemetry streaming tail.
|
|
2285
|
+
try { chatQueue.onTurnEnd(sid, t); } catch { /* best-effort */ }
|
|
2169
2286
|
// 注意:这里不再对 streamingState.active 做同步 race-guard。理由见上方 HISTORY 段。
|
|
2170
2287
|
// POST 一律入桶排 timer;真正「新一轮 query()」走 _observeStreamingTick 的 rising-edge
|
|
2171
2288
|
// cancel 兜底,不会让无效尾音播出来。
|
|
@@ -2192,6 +2309,9 @@ function _onStreamingActivated() {
|
|
|
2192
2309
|
// 不播放」,直接 cancel 所有 pending(**不** flush)。这正是用户键入「请等待 10 秒钟」
|
|
2193
2310
|
// 的本意:被打断就当没完成。
|
|
2194
2311
|
_cancelAllPendingTurnEndBroadcasts();
|
|
2312
|
+
// A new turn also lifts the chat-queue Stop-park: parked bubbles resume auto-draining
|
|
2313
|
+
// at the next turn end.
|
|
2314
|
+
try { chatQueue.onStreamingActivated(); } catch { /* best-effort */ }
|
|
2195
2315
|
}
|
|
2196
2316
|
|
|
2197
2317
|
// 统一的 streaming-state 观察入口。production polling 和 SDK push 都调它,测试也走它,
|
|
@@ -2259,11 +2379,12 @@ let _askOrphanSweepTimer = null;
|
|
|
2259
2379
|
// - .unref() 防止它把事件循环 keep-alive 30s(测试进程靠 --test-force-exit 兜底是时序侥幸);
|
|
2260
2380
|
// - _doStop 里 clearTimeout 防止 stop/start 循环(Electron tab / 测试)泄漏多个 pending 检查。
|
|
2261
2381
|
let _updateCheckTimer = null;
|
|
2262
|
-
|
|
2382
|
+
// Exported for tests: workspace-mode startViewer defers this timer to initPostLaunch, but
|
|
2383
|
+
// lifecycle tests need to drive the streaming_status poll directly (setSdkStreamingState
|
|
2384
|
+
// was retired in the wire architecture; the timer reads interceptor's streamingState).
|
|
2385
|
+
export function startStreamingStatusTimer() {
|
|
2263
2386
|
if (_streamingStatusTimer) return;
|
|
2264
2387
|
_streamingStatusTimer = setInterval(() => {
|
|
2265
|
-
// SDK mode uses its own streaming state (pushed directly via setSdkStreamingState)
|
|
2266
|
-
if (isSdkMode) return;
|
|
2267
2388
|
const isActive = streamingState.active;
|
|
2268
2389
|
const wasActive = _lastCliActive;
|
|
2269
2390
|
// 统一走 _observeStreamingTick:内部负责 rising-edge cancel(丢弃 pending turn_end,不 flush)+ 更新 _lastCliActive。
|
|
@@ -2291,6 +2412,9 @@ async function _doStop() {
|
|
|
2291
2412
|
// → 后续 await 期间 turn-end 状态机彻底冻结,无并发改 Map 的可能。
|
|
2292
2413
|
_isStopping = true;
|
|
2293
2414
|
_cancelAllPendingTurnEndBroadcasts();
|
|
2415
|
+
// Drop chat-queue timers (rescue / idle poll) so a stop/start cycle never injects a stale
|
|
2416
|
+
// queued message into a fresh PTY session.
|
|
2417
|
+
try { chatQueue.stop(); } catch { /* best-effort */ }
|
|
2294
2418
|
// 对称 startViewer:下一次启动后第一次 active 才算 rising edge
|
|
2295
2419
|
_lastSdkActive = false;
|
|
2296
2420
|
_lastCliActive = false;
|
|
@@ -2322,6 +2446,11 @@ async function _doStop() {
|
|
|
2322
2446
|
server.closeAllConnections();
|
|
2323
2447
|
server.close();
|
|
2324
2448
|
}
|
|
2449
|
+
// Tear down terminal WSS so stop/start cycles never leak a second listener on the same HTTP server.
|
|
2450
|
+
if (terminalWss) {
|
|
2451
|
+
terminalWss.close();
|
|
2452
|
+
terminalWss = null;
|
|
2453
|
+
}
|
|
2325
2454
|
if (statsWorker) {
|
|
2326
2455
|
statsWorker.terminate();
|
|
2327
2456
|
statsWorker = null;
|
|
@@ -2351,30 +2480,9 @@ async function _doStop() {
|
|
|
2351
2480
|
}
|
|
2352
2481
|
|
|
2353
2482
|
// ─── SDK Mode Exports ──────────────────────────────────────────
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
if (sendToClients) sendToClients(clients, entry);
|
|
2358
|
-
}
|
|
2359
|
-
|
|
2360
|
-
/**
|
|
2361
|
-
* Update streaming status (SDK mode). 调用约定:SDK 每个 chunk 都调一次 `{active:true,...}`,
|
|
2362
|
-
* turn 结束才调 `{active:false}`。rising-edge 检测统一走 `_observeStreamingTick`。
|
|
2363
|
-
* **SSE 推送只在 transition(edge)或仍 active 时发**,避免每 chunk 都放大 streaming_status 流量
|
|
2364
|
-
* (对齐 CLI polling 的 `changed || isActive` 闸门)。
|
|
2365
|
-
* `undefined`/`{}`/`null` 都会被当作 active=false。
|
|
2366
|
-
*/
|
|
2367
|
-
export function setSdkStreamingState(data) {
|
|
2368
|
-
const isActive = !!(data && data.active);
|
|
2369
|
-
const wasActive = _lastSdkActive;
|
|
2370
|
-
_observeStreamingTick(isActive, 'sdk');
|
|
2371
|
-
const changed = wasActive !== isActive;
|
|
2372
|
-
if (changed || isActive) {
|
|
2373
|
-
if (clients.length > 0 && sendEventToClients) {
|
|
2374
|
-
sendEventToClients(clients, 'streaming_status', data);
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
}
|
|
2483
|
+
// NOTE: SDK-mode display/streaming data flows through the same wire path as PTY
|
|
2484
|
+
// mode (loopback proxy → fetch hook → V2Writer → SSE / streamingState) — there
|
|
2485
|
+
// are intentionally no pushSdkEntry/setSdkStreamingState shortcuts anymore.
|
|
2378
2486
|
|
|
2379
2487
|
/** Broadcast a message to all terminal WS clients (for SDK canUseTool). */
|
|
2380
2488
|
export function broadcastWsMessage(msg) {
|
|
@@ -2394,6 +2502,23 @@ export function broadcastWsMessage(msg) {
|
|
|
2394
2502
|
}
|
|
2395
2503
|
}
|
|
2396
2504
|
|
|
2505
|
+
/**
|
|
2506
|
+
* Close open approval modals on every client after a server-side drain of canUseTool
|
|
2507
|
+
* approvals (sdk-interrupt Stop, or queue-send-now interrupting a turn mid-approval).
|
|
2508
|
+
* Reuses each kind's existing resolve/cancel broadcast type.
|
|
2509
|
+
*/
|
|
2510
|
+
function _broadcastApprovalCloses(cancelled, reason) {
|
|
2511
|
+
if (!Array.isArray(cancelled) || cancelled.length === 0 || !terminalWss) return;
|
|
2512
|
+
for (const { id, kind } of cancelled) {
|
|
2513
|
+
if (!id) continue;
|
|
2514
|
+
const type = sdkApprovalCloseType(kind);
|
|
2515
|
+
const m = JSON.stringify({ type, id, reason });
|
|
2516
|
+
terminalWss.clients.forEach((c) => {
|
|
2517
|
+
if (c.readyState === 1) { try { c.send(m); } catch {} }
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2397
2522
|
/** Reference to sdk-manager's resolveApproval (set by cli.js after import). */
|
|
2398
2523
|
let _sdkResolveApproval = null;
|
|
2399
2524
|
export function setSdkResolveApproval(fn) { _sdkResolveApproval = fn; }
|
|
@@ -2412,6 +2537,30 @@ export function setSdkSendUserMessage(fn) { _sdkSendUserMessage = fn; }
|
|
|
2412
2537
|
let _sdkInterruptTurn = null;
|
|
2413
2538
|
export function setSdkInterruptTurn(fn) { _sdkInterruptTurn = fn; }
|
|
2414
2539
|
|
|
2540
|
+
/** Reference to sdk-manager's getPendingApprovals (set by cli.js after import). */
|
|
2541
|
+
let _sdkGetPendingApprovals = null;
|
|
2542
|
+
export function setSdkGetPendingApprovals(fn) { _sdkGetPendingApprovals = fn; }
|
|
2543
|
+
|
|
2544
|
+
/** Reference to sdk-manager's getSdkInitSnapshot (set by cli.js after import). */
|
|
2545
|
+
let _sdkGetInitSnapshot = null;
|
|
2546
|
+
export function setSdkGetInitSnapshot(fn) { _sdkGetInitSnapshot = fn; }
|
|
2547
|
+
|
|
2548
|
+
/** Reference to sdk-manager's sendQueuedNow (set by cli.js after import). */
|
|
2549
|
+
let _sdkSendQueuedNow = null;
|
|
2550
|
+
export function setSdkSendQueuedNow(fn) { _sdkSendQueuedNow = fn; }
|
|
2551
|
+
|
|
2552
|
+
/** Reference to sdk-manager's removeQueued (set by cli.js after import). */
|
|
2553
|
+
let _sdkRemoveQueued = null;
|
|
2554
|
+
export function setSdkRemoveQueued(fn) { _sdkRemoveQueued = fn; }
|
|
2555
|
+
|
|
2556
|
+
/** Reference to sdk-manager's clearQueued (set by cli.js after import). */
|
|
2557
|
+
let _sdkClearQueued = null;
|
|
2558
|
+
export function setSdkClearQueued(fn) { _sdkClearQueued = fn; }
|
|
2559
|
+
|
|
2560
|
+
/** Reference to sdk-manager's getQueueSnapshot (set by cli.js after import). */
|
|
2561
|
+
let _sdkGetQueueSnapshot = null;
|
|
2562
|
+
export function setSdkGetQueueSnapshot(fn) { _sdkGetQueueSnapshot = fn; }
|
|
2563
|
+
|
|
2415
2564
|
// Auto-start the viewer after log file init completes
|
|
2416
2565
|
// 工作区模式下由 cli.js 直接 import server.js 触发启动,跳过 _initPromise 自动启动
|
|
2417
2566
|
if (!isWorkspaceMode) {
|
|
@@ -2433,11 +2582,11 @@ if (!isWorkspaceMode) {
|
|
|
2433
2582
|
const busy = clients.length > 0 || ptyRunning || _sdkResolveApproval !== null;
|
|
2434
2583
|
try {
|
|
2435
2584
|
const result = await checkAndUpdate({ busy, portRange: [START_PORT, MAX_PORT] });
|
|
2436
|
-
// major_available / deferred_busy / brew_managed 都是"有新版但这次不升级"——
|
|
2585
|
+
// major_available / deferred_busy / brew_managed / pnpm_managed 都是"有新版但这次不升级"——
|
|
2437
2586
|
// 共用 update_major_available 事件渲染 banner(前端不区分子类,命令在 i18n 文案里给)。
|
|
2438
|
-
// brew_managed 走这里至关重要:否则 Electron / GUI 用户看不到升级提示,
|
|
2587
|
+
// brew_managed / pnpm_managed 走这里至关重要:否则 Electron / GUI 用户看不到升级提示,
|
|
2439
2588
|
// 仅 stderr 一行 console.error 在桌面模式下不可见。
|
|
2440
|
-
if (result.status === 'major_available' || result.status === 'deferred_busy' || result.status === 'brew_managed') {
|
|
2589
|
+
if (result.status === 'major_available' || result.status === 'deferred_busy' || result.status === 'brew_managed' || result.status === 'pnpm_managed') {
|
|
2441
2590
|
// 先缓存:之后新连接的 SSE 客户端会在 events 路由里补推此事件
|
|
2442
2591
|
pendingMajorUpdate = { version: result.remoteVersion, source: result.status };
|
|
2443
2592
|
const payload = JSON.stringify(pendingMajorUpdate);
|
|
@@ -72,8 +72,6 @@ ${environment.workspaceRoots}
|
|
|
72
72
|
- Hostname: ${os.hostname}
|
|
73
73
|
- Available parallelism: ${os.availableParallelism}
|
|
74
74
|
- Total memory bytes: ${os.totalMemory}
|
|
75
|
-
- Free memory bytes: ${os.freeMemory}
|
|
76
|
-
- Uptime seconds: ${os.uptime}
|
|
77
75
|
|
|
78
76
|
# Runtime
|
|
79
77
|
- Node.js version: ${runtime.nodeVersion}
|
|
@@ -82,8 +80,6 @@ ${environment.workspaceRoots}
|
|
|
82
80
|
- Parent process ID: ${runtime.ppid}
|
|
83
81
|
|
|
84
82
|
# Time
|
|
85
|
-
- Current time: ${time.current}
|
|
86
|
-
- ISO time: ${time.iso}
|
|
87
83
|
- Current date: ${time.date}
|
|
88
84
|
- Timezone: ${time.timezone}
|
|
89
85
|
|
|
@@ -98,8 +94,6 @@ ${sandbox.writableRoots}
|
|
|
98
94
|
# Terminal
|
|
99
95
|
- TERM: ${terminal.term}
|
|
100
96
|
- COLORTERM: ${terminal.colorTerm}
|
|
101
|
-
- Columns: ${terminal.columns}
|
|
102
|
-
- Rows: ${terminal.rows}
|
|
103
97
|
|
|
104
98
|
# Filesystem
|
|
105
99
|
- Temporary directory: ${filesystem.tmpdir}
|
|
@@ -116,8 +110,6 @@ ${sandbox.writableRoots}
|
|
|
116
110
|
- Current branch: ${git.branch}
|
|
117
111
|
- Main branch: ${git.mainBranch}
|
|
118
112
|
- Git user: ${git.userName}
|
|
119
|
-
- Working tree status:
|
|
120
|
-
${git.status}
|
|
121
113
|
- Recent commits:
|
|
122
114
|
${git.recentCommits}
|
|
123
115
|
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
| `${os.hostname}` | اسم المضيف الحالي. | `MacBook-Pro.local` |
|
|
28
28
|
| `${os.availableParallelism}` | التوازي المتاح. | `10` |
|
|
29
29
|
| `${os.totalMemory}` | إجمالي ذاكرة النظام بالبايتات. | `34359738368` |
|
|
30
|
-
| `${os.freeMemory}` | الذاكرة المجانية بالبايتات. | `8589934592` |
|
|
31
|
-
| `${os.uptime}` | وقت تشغيل النظام بالثواني. | `123456` |
|
|
32
30
|
|
|
33
31
|
## بيئة تشغيل Node.js
|
|
34
32
|
|
|
@@ -43,8 +41,6 @@
|
|
|
43
41
|
|
|
44
42
|
| Variable | Description | Example |
|
|
45
43
|
|---|---|---|
|
|
46
|
-
| `${time.current}` | سلسلة الوقت المحلي الحالي. | `Thu Jul 09 2026 18:22:09 GMT+0800 (China Standard Time)` |
|
|
47
|
-
| `${time.iso}` | الوقت الحالي بصيغة ISO. | `2026-07-09T10:22:09.000Z` |
|
|
48
44
|
| `${time.date}` | التاريخ المحلي الحالي. | `2026-07-09` |
|
|
49
45
|
| `${time.timezone}` | المنطقة الزمنية للنظام الحالية. | `Asia/Shanghai` |
|
|
50
46
|
|
|
@@ -64,8 +60,6 @@
|
|
|
64
60
|
|---|---|---|
|
|
65
61
|
| `${terminal.term}` | TERM الحالي. | `xterm-256color` |
|
|
66
62
|
| `${terminal.colorTerm}` | COLORTERM الحالي. | `truecolor` |
|
|
67
|
-
| `${terminal.columns}` | عدد أعمدة المحطة الطرفية الحالي. | `120` |
|
|
68
|
-
| `${terminal.rows}` | عدد صفوف المحطة الطرفية الحالي. | `40` |
|
|
69
63
|
|
|
70
64
|
## نظام الملفات
|
|
71
65
|
|
|
@@ -91,7 +85,6 @@
|
|
|
91
85
|
| `${git.branch}` | فرع git الحالي أو تجزئة HEAD المختصرة. | `main` |
|
|
92
86
|
| `${git.mainBranch}` | الفرع الرئيسي الافتراضي، عادةً ما يُستخدم كهدف PR أو الدمج. | `main` |
|
|
93
87
|
| `${git.userName}` | اسم git `user.name` الحالي. | `Sky` |
|
|
94
|
-
| `${git.status}` | مخرجات `git status --short`. | `M src/index.ts` |
|
|
95
88
|
| `${git.recentCommits}` | ملخص الالتزامات الأخيرة. | `abc1234 Fix prompt builder` |
|
|
96
89
|
|
|
97
90
|
## الذاكرة
|
|
@@ -27,8 +27,6 @@ Denne fil dokumenterer kun variablerne i `systemPromptModel.md`, der skal løses
|
|
|
27
27
|
| `${os.hostname}` | Aktuelt værtsnavn. | `MacBook-Pro.local` |
|
|
28
28
|
| `${os.availableParallelism}` | Tilgængelig parallelisme. | `10` |
|
|
29
29
|
| `${os.totalMemory}` | Samlet systemhukommelse i bytes. | `34359738368` |
|
|
30
|
-
| `${os.freeMemory}` | Fri hukommelse i bytes. | `8589934592` |
|
|
31
|
-
| `${os.uptime}` | System oppetid i sekunder. | `123456` |
|
|
32
30
|
|
|
33
31
|
## Node.js-køretid
|
|
34
32
|
|
|
@@ -43,8 +41,6 @@ Denne fil dokumenterer kun variablerne i `systemPromptModel.md`, der skal løses
|
|
|
43
41
|
|
|
44
42
|
| Variable | Description | Example |
|
|
45
43
|
|---|---|---|
|
|
46
|
-
| `${time.current}` | Aktuel lokal tidsstreng. | `Thu Jul 09 2026 18:22:09 GMT+0800 (China Standard Time)` |
|
|
47
|
-
| `${time.iso}` | Aktuel ISO tid. | `2026-07-09T10:22:09.000Z` |
|
|
48
44
|
| `${time.date}` | Aktuel lokaldato. | `2026-07-09` |
|
|
49
45
|
| `${time.timezone}` | Aktuelt systemtidzone. | `Asia/Shanghai` |
|
|
50
46
|
|
|
@@ -64,8 +60,6 @@ Denne fil dokumenterer kun variablerne i `systemPromptModel.md`, der skal løses
|
|
|
64
60
|
|---|---|---|
|
|
65
61
|
| `${terminal.term}` | Aktuel TERM. | `xterm-256color` |
|
|
66
62
|
| `${terminal.colorTerm}` | Aktuel COLORTERM. | `truecolor` |
|
|
67
|
-
| `${terminal.columns}` | Aktuelt terminal kolonne antal. | `120` |
|
|
68
|
-
| `${terminal.rows}` | Aktuelt terminal rækkeantal. | `40` |
|
|
69
63
|
|
|
70
64
|
## Filsystem
|
|
71
65
|
|
|
@@ -91,7 +85,6 @@ Denne fil dokumenterer kun variablerne i `systemPromptModel.md`, der skal løses
|
|
|
91
85
|
| `${git.branch}` | Aktuel git gren eller kort HEAD hash. | `main` |
|
|
92
86
|
| `${git.mainBranch}` | Standard hoved gren, typisk brugt som PR eller sammensmeltnings mål. | `main` |
|
|
93
87
|
| `${git.userName}` | Aktuel git `user.name`. | `Sky` |
|
|
94
|
-
| `${git.status}` | Output af `git status --short`. | `M src/index.ts` |
|
|
95
88
|
| `${git.recentCommits}` | Oversigt over seneste commits. | `abc1234 Fix prompt builder` |
|
|
96
89
|
|
|
97
90
|
## Hukommelse
|