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
|
// Discord adapter — the platform-specific half of the Discord bridge. The generic orchestration
|
|
2
|
-
// (dedup, access control, queue, inject, chunk, turn-end reply) lives in server/lib/im-bridge-core.js;
|
|
2
|
+
// (dedup, access control, queue, inject, chunk, turn-end reply) lives in server/lib/im/im-bridge-core.js;
|
|
3
3
|
// this module only knows discord.js's Gateway client, inbound message shape, and outbound send.
|
|
4
4
|
//
|
|
5
5
|
// Uses discord.js v14: the bot dials OUT to Discord's Gateway WebSocket (no public URL). Credential is
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// Console prerequisite (no code equivalent — surfaced in the UI help): in the Discord Developer Portal,
|
|
13
13
|
// create an app + bot, ENABLE the Message Content Intent (else message.content is silently empty), copy
|
|
14
14
|
// the bot token, and invite the bot with the `bot`+`applications.commands` scopes and View/Send perms.
|
|
15
|
-
import { registerAdapter } from '../im-bridge-core.js';
|
|
15
|
+
import { registerAdapter } from '../im/im-bridge-core.js';
|
|
16
16
|
|
|
17
17
|
// ─── test seam: a fake discord.js factory (zero real gateway / socket) ───
|
|
18
18
|
let sdkFactory = null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Feishu/Lark adapter — the platform-specific half of the Feishu bridge. The generic
|
|
2
2
|
// orchestration (dedup, access control, queue, inject, chunk, turn-end reply) lives in
|
|
3
|
-
// server/lib/im-bridge-core.js; this module only knows Feishu's WebSocket long-connection event
|
|
3
|
+
// server/lib/im/im-bridge-core.js; this module only knows Feishu's WebSocket long-connection event
|
|
4
4
|
// client, inbound payload shape, and outbound send.
|
|
5
5
|
//
|
|
6
6
|
// Inbound uses the official SDK's WSClient long-connection (NOT a webhook) so it works on
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// Console prerequisite (no code equivalent — surfaced to the user in the UI/README): the custom
|
|
12
12
|
// app must set Event Subscription to "long connection", subscribe `im.message.receive_v1`, grant
|
|
13
13
|
// the `im:message` send scope, and be published.
|
|
14
|
-
import { registerAdapter } from '../im-bridge-core.js';
|
|
14
|
+
import { registerAdapter } from '../im/im-bridge-core.js';
|
|
15
15
|
|
|
16
16
|
// ─── test seam: a fake SDK factory ({ Client, WSClient, EventDispatcher, Domain, LoggerLevel })
|
|
17
17
|
// so unit tests never import the real SDK or open a socket. ───
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 企业微信 (WeCom) adapter — the platform-specific half of the WeCom bridge. The generic
|
|
2
2
|
// orchestration (dedup, access control, queue, inject, chunk, turn-end reply) lives in
|
|
3
|
-
// server/lib/im-bridge-core.js; this module only knows WeCom's smart-robot long-connection client,
|
|
3
|
+
// server/lib/im/im-bridge-core.js; this module only knows WeCom's smart-robot long-connection client,
|
|
4
4
|
// inbound frame shape, and outbound send.
|
|
5
5
|
//
|
|
6
6
|
// Uses the 企业微信智能机器人长连接 (Smart Robot long-connection) mode via @wecom/aibot-node-sdk:
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// Console prerequisite (no code equivalent — surfaced in the UI help/README): create a 智能机器人,
|
|
13
13
|
// set its API 接收模式 to 长连接, copy the botId + secret, and add the bot to a chat.
|
|
14
14
|
import { randomUUID } from 'node:crypto';
|
|
15
|
-
import { registerAdapter } from '../im-bridge-core.js';
|
|
15
|
+
import { registerAdapter } from '../im/im-bridge-core.js';
|
|
16
16
|
|
|
17
17
|
// ─── test seam: a fake SDK factory (zero real SDK / socket) ───
|
|
18
18
|
let sdkFactory = null;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* approval-policy.js — Shared approval-policy predicates for the two approval paths.
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for:
|
|
5
|
+
* - APPROVAL_TOOLS: the six mutating/external tools that require explicit user
|
|
6
|
+
* approval (previously duplicated literally at ask/perm-bridge.js and
|
|
7
|
+
* sdk-manager.js).
|
|
8
|
+
* - isPublishCommand: the npm-publish hard gate. `npm publish` is the one
|
|
9
|
+
* irreversible outward-facing command (commits can be rewritten, pushes
|
|
10
|
+
* force-pushed back) — it must NEVER be auto-allowed, even under
|
|
11
|
+
* --dangerously-skip-permissions. Both consumers force it through the Web UI
|
|
12
|
+
* approval modal: perm-bridge.js exempts it from the CCV_BYPASS_PERMISSIONS
|
|
13
|
+
* auto-allow; sdk-manager.js routes it into the perm approval branch even in
|
|
14
|
+
* bypassPermissions mode.
|
|
15
|
+
*
|
|
16
|
+
* Pure leaf module (L1-lib): no imports, no I/O — importable from both L1-lib
|
|
17
|
+
* (sdk-manager.js) and L1-sub (ask/perm-bridge.js) without boundary-gate edges.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const APPROVAL_TOOLS = new Set(['Bash', 'Edit', 'Write', 'NotebookEdit', 'WebFetch', 'WebSearch']);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} toolName
|
|
24
|
+
* @param {object} [input] — tool input ({ command } for Bash)
|
|
25
|
+
* @returns {boolean} true when the call is an `npm publish` invocation
|
|
26
|
+
*/
|
|
27
|
+
export function isPublishCommand(toolName, input) {
|
|
28
|
+
return toolName === 'Bash' && typeof input?.command === 'string' && /npm\s+publish/i.test(input.command);
|
|
29
|
+
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, unlinkSync } from 'node:fs';
|
|
13
13
|
import { join } from 'node:path';
|
|
14
14
|
import { randomBytes } from 'node:crypto';
|
|
15
|
-
import { renameSyncWithRetry } from '
|
|
16
|
-
import { withFileLockAsync } from '
|
|
17
|
-
import { LOG_DIR } from '
|
|
15
|
+
import { renameSyncWithRetry } from '../file-api.js';
|
|
16
|
+
import { withFileLockAsync } from '../async-file-lock.js';
|
|
17
|
+
import { LOG_DIR } from '../../../findcc.js';
|
|
18
18
|
|
|
19
19
|
const SCHEMA_VERSION = 1;
|
|
20
20
|
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
import { readFileSync } from 'node:fs';
|
|
15
15
|
import http from 'node:http';
|
|
16
16
|
import https from 'node:https';
|
|
17
|
-
import { evaluateImDeny } from '
|
|
17
|
+
import { evaluateImDeny } from '../im-deny.js';
|
|
18
|
+
import { APPROVAL_TOOLS, isPublishCommand } from '../approval-policy.js';
|
|
18
19
|
|
|
19
20
|
const port = process.env.CCVIEWER_PORT;
|
|
20
21
|
const rawProtocol = process.env.CCVIEWER_PROTOCOL;
|
|
@@ -59,9 +60,8 @@ if (!toolName || !toolInput) {
|
|
|
59
60
|
// 硬拦截:npm publish 即使在 --d (bypass) 模式下也强制走 Web UI 审批
|
|
60
61
|
// 这是安全底线,不受 --dangerously-skip-permissions 影响
|
|
61
62
|
// 注:git commit / git push 不在硬拦截范围内 —— 提交可重写、push 可 force-push 回退,
|
|
62
|
-
// 真正不可撤销的对外发布(npm publish)
|
|
63
|
-
const isPublishCmd = toolName
|
|
64
|
-
/npm\s+publish/i.test(toolInput.command);
|
|
63
|
+
// 真正不可撤销的对外发布(npm publish)才走硬闸。谓词共享自 approval-policy.js(SDK 链路同用)。
|
|
64
|
+
const isPublishCmd = isPublishCommand(toolName, toolInput);
|
|
65
65
|
|
|
66
66
|
// IM worker (skip-permissions) 硬拦截 —— 必须在下面的 bypass auto-allow 之前求值,
|
|
67
67
|
// 否则 CCV_BYPASS_PERMISSIONS=1 会把一切先放行(见 plan §安全 2)。仅对 IM worker 生效。
|
|
@@ -95,7 +95,7 @@ if (toolName === 'AskUserQuestion') {
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
// These tools need explicit user approval via Web UI (mutating or external access).
|
|
98
|
-
|
|
98
|
+
// The six-tool set is shared with the SDK canUseTool path via approval-policy.js.
|
|
99
99
|
if (!APPROVAL_TOOLS.has(toolName)) {
|
|
100
100
|
process.stdout.write(JSON.stringify({
|
|
101
101
|
hookSpecificOutput: { hookEventName: 'PreToolUse', permissionDecision: 'allow' },
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* chat-queue.js — Server-side busy queue for chat-composer messages (PTY / terminal-hidden mode).
|
|
3
|
+
*
|
|
4
|
+
* When Claude is mid-run and the user presses Enter in the web chat composer, the message is
|
|
5
|
+
* held here instead of being typed into the TUI immediately. The server broadcasts the queue
|
|
6
|
+
* (`queue-state`) so every client can render floating bubbles above the composer, and drains
|
|
7
|
+
* the queue into the PTY (bracketed paste + Enter) once the turn really ends.
|
|
8
|
+
*
|
|
9
|
+
* Per-bubble actions:
|
|
10
|
+
* - "Send now" (queue-send-now) interrupts the running turn (focus-in + ESC, same bytes as the
|
|
11
|
+
* web Stop button) and injects that message as soon as the TUI is observably idle.
|
|
12
|
+
* - "Remove" (queue-remove) drops it.
|
|
13
|
+
* Stop keeps the queue parked (product decision): `suppressNextDrain()` blocks the automatic
|
|
14
|
+
* turn-end drain until a NEW turn starts (streaming rising edge) or a message is sent now.
|
|
15
|
+
*
|
|
16
|
+
* Design notes:
|
|
17
|
+
* - This module NEVER imports pty-manager / server.js. All PTY access + state probes are
|
|
18
|
+
* injected via initChatQueue(deps), so unit tests run without node-pty (im-bridge-core
|
|
19
|
+
* convention).
|
|
20
|
+
* - Injection is single-flight (`_injecting`) and mutually exclusive with the IM bridge's
|
|
21
|
+
* own injection slot via the injected `hasExternalInjection` probe (im-bridge-core's
|
|
22
|
+
* anyActiveInjection).
|
|
23
|
+
* - Known limitation: keystrokes typed directly into a VISIBLE terminal are not serialized
|
|
24
|
+
* against an in-flight inject (same accepted risk class as the IM bridge today).
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { reportSwallowed } from '@ccv/core/error-report';
|
|
28
|
+
import { bracketPasteSubmit, sanitizeInbound } from './im/im-bridge-core.js';
|
|
29
|
+
|
|
30
|
+
const MAX_ITEMS = 50; // im-bridge-core MAX_QUEUE parity
|
|
31
|
+
const STOP_ESC_DELAY_MS = 50; // focus-in → ESC gap, mirrors ChatView's STOP_FOCUS_IN_ESC_DELAY_MS
|
|
32
|
+
const INJECT_POLL_MS = 100; // idle poll cadence before injecting
|
|
33
|
+
const INJECT_POLL_MAX_MS = 2000; // give up polling after this; NEVER inject unconditionally
|
|
34
|
+
const RESCUE_AFTER_MS = 3000; // stale-busy rescue: frontend guessed busy while the turn already ended
|
|
35
|
+
|
|
36
|
+
// Injected deps (see initChatQueue). Null until wired; every public entry no-ops safely then.
|
|
37
|
+
let _deps = null;
|
|
38
|
+
let _items = []; // [{ id, text, ts }] FIFO
|
|
39
|
+
let _injecting = false; // single-flight guard around one bracket-paste inject sequence
|
|
40
|
+
let _rescueTimer = null; // stale-busy rescue timer
|
|
41
|
+
let _pollTimer = null; // active idle-poll interval (single slot — see _pollUntilSafe)
|
|
42
|
+
let _escTimer = null; // sendNow's focus-in → ESC gap timer
|
|
43
|
+
let _suppressDrain = false; // Stop pressed → park the queue until a new turn starts
|
|
44
|
+
let _gen = 0; // generation counter: clear()/stop() invalidate in-flight injects
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {object} deps
|
|
48
|
+
* @param {function} deps.writeToPty — (data:string) => void
|
|
49
|
+
* @param {function} deps.writeToPtySequential — (chunks:string[], onComplete:(ok:boolean)=>void, opts?) => void
|
|
50
|
+
* @param {function} deps.getPtyKind — () => 'claude' | 'shell' | null
|
|
51
|
+
* @param {function} deps.isStreaming — () => boolean (per-API-call streaming flag; flickers between tool calls)
|
|
52
|
+
* @param {function} deps.hasPendingApproval — () => boolean (web-visible ask/perm modal open)
|
|
53
|
+
* @param {function} [deps.hasExternalInjection] — () => boolean (IM bridge injection slot busy)
|
|
54
|
+
* @param {function} deps.broadcastWs — (msg:object) => void
|
|
55
|
+
*/
|
|
56
|
+
export function initChatQueue(deps) {
|
|
57
|
+
_deps = deps;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function getSnapshot() {
|
|
61
|
+
return _items.map(({ id, text, ts }) => ({ id, text, ts }));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function _broadcast() {
|
|
65
|
+
if (!_deps || !_deps.broadcastWs) return;
|
|
66
|
+
try { _deps.broadcastWs({ type: 'queue-state', items: getSnapshot() }); }
|
|
67
|
+
catch (err) { reportSwallowed('chat-queue.broadcast', err); }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function _makeItem(text) {
|
|
71
|
+
return {
|
|
72
|
+
id: 'q_' + Date.now().toString(36) + '_' + Math.random().toString(36).slice(2, 8),
|
|
73
|
+
text,
|
|
74
|
+
ts: Date.now(),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function _clearRescueTimer() {
|
|
79
|
+
if (_rescueTimer) { clearTimeout(_rescueTimer); _rescueTimer = null; }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function _clearPollTimer() {
|
|
83
|
+
if (_pollTimer) { clearInterval(_pollTimer); _pollTimer = null; }
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function _clearEscTimer() {
|
|
87
|
+
if (_escTimer) { clearTimeout(_escTimer); _escTimer = null; }
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* True only when injecting is observably safe: claude TUI (not a bare shell), no API call in
|
|
92
|
+
* flight, no web-visible approval modal, no external (IM) injection holding the PTY.
|
|
93
|
+
* NOTE: a TUI-native fallback question (ask-bridge terminal fallback) is invisible to
|
|
94
|
+
* hasPendingApproval — which is why poll timeouts must NEVER fall through to an inject.
|
|
95
|
+
* NOTE 2: `isStreaming` (streamingState.active) flickers false between tool calls mid-turn;
|
|
96
|
+
* injecting into that gap is harmless (the TUI natively queues the paste) but it means an
|
|
97
|
+
* "immediate" inject can land inside the current turn's chain — accepted risk class.
|
|
98
|
+
*/
|
|
99
|
+
function _safeToInject() {
|
|
100
|
+
if (!_deps) return false;
|
|
101
|
+
if (_injecting) return false;
|
|
102
|
+
// A throwing probe means the wiring regressed — fail safe (no inject) but never silently:
|
|
103
|
+
// an untagged swallow here would wedge the whole queue with no diagnostic.
|
|
104
|
+
try { if (_deps.getPtyKind && _deps.getPtyKind() !== 'claude') return false; }
|
|
105
|
+
catch (err) { reportSwallowed('chat-queue.probe', err); return false; }
|
|
106
|
+
try { if (_deps.isStreaming && _deps.isStreaming()) return false; }
|
|
107
|
+
catch (err) { reportSwallowed('chat-queue.probe', err); return false; }
|
|
108
|
+
try { if (_deps.hasPendingApproval && _deps.hasPendingApproval()) return false; }
|
|
109
|
+
catch (err) { reportSwallowed('chat-queue.probe', err); return false; }
|
|
110
|
+
try { if (_deps.hasExternalInjection && _deps.hasExternalInjection()) return false; }
|
|
111
|
+
catch (err) { reportSwallowed('chat-queue.probe', err); return false; }
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Inject the head item. Caller must have verified _safeToInject() first (except the internal
|
|
117
|
+
* re-checks here, which keep this self-guarding for direct calls).
|
|
118
|
+
* Broadcasts on shift (so the bubble disappears the moment the message starts typing into the
|
|
119
|
+
* TUI) and again if the write fails and the item returns to the head.
|
|
120
|
+
*/
|
|
121
|
+
function _injectHead() {
|
|
122
|
+
if (!_safeToInject()) return false;
|
|
123
|
+
const item = _items.shift();
|
|
124
|
+
if (!item) return false;
|
|
125
|
+
_broadcast();
|
|
126
|
+
_injecting = true;
|
|
127
|
+
const gen = _gen; // invalidate on clear()/stop(): a stale completion must not re-park
|
|
128
|
+
try {
|
|
129
|
+
_deps.writeToPtySequential(bracketPasteSubmit(item.text), (ok) => {
|
|
130
|
+
_injecting = false;
|
|
131
|
+
if (gen !== _gen) return;
|
|
132
|
+
if (!ok) {
|
|
133
|
+
// Dead PTY / write failure — never lose the message silently; put it back.
|
|
134
|
+
_items.unshift(item);
|
|
135
|
+
_broadcast();
|
|
136
|
+
}
|
|
137
|
+
}, { settleMs: 250 });
|
|
138
|
+
} catch (err) {
|
|
139
|
+
_injecting = false;
|
|
140
|
+
if (gen === _gen) {
|
|
141
|
+
_items.unshift(item);
|
|
142
|
+
_broadcast();
|
|
143
|
+
}
|
|
144
|
+
reportSwallowed('chat-queue.inject', err);
|
|
145
|
+
}
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Poll (≤ INJECT_POLL_MAX_MS) until _safeToInject(), then run fn. On timeout: do NOT inject —
|
|
151
|
+
* invoke onTimeout instead (caller decides: keep queued / restore item). A timed-out blind
|
|
152
|
+
* write could land in a TUI-native question prompt and be submitted as its answer.
|
|
153
|
+
* Tick-counted (not Date-based) so mock.timers without Date mocking can drive it in tests.
|
|
154
|
+
*/
|
|
155
|
+
function _pollUntilSafe(fn, onTimeout) {
|
|
156
|
+
_clearPollTimer();
|
|
157
|
+
const maxTicks = Math.ceil(INJECT_POLL_MAX_MS / INJECT_POLL_MS);
|
|
158
|
+
let ticks = 0;
|
|
159
|
+
_pollTimer = setInterval(() => {
|
|
160
|
+
ticks += 1;
|
|
161
|
+
if (ticks > maxTicks) {
|
|
162
|
+
_clearPollTimer();
|
|
163
|
+
if (onTimeout) onTimeout();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (!_safeToInject()) return;
|
|
167
|
+
_clearPollTimer();
|
|
168
|
+
fn();
|
|
169
|
+
}, INJECT_POLL_MS);
|
|
170
|
+
if (typeof _pollTimer.unref === 'function') _pollTimer.unref();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Enqueue a chat-composer message (Claude believed busy). Sanitizes control bytes (a crafted
|
|
175
|
+
* `\x1b[201~` would otherwise break the paste frame), broadcasts, and arms a rescue timer for
|
|
176
|
+
* the stale-busy case (frontend's isStreaming lags the real turn end by up to its debounce).
|
|
177
|
+
*/
|
|
178
|
+
export function enqueue(text) {
|
|
179
|
+
if (!_deps) return null;
|
|
180
|
+
const clean = sanitizeInbound(text == null ? '' : String(text)).trim();
|
|
181
|
+
if (!clean) return null;
|
|
182
|
+
if (_items.length >= MAX_ITEMS) {
|
|
183
|
+
// Negative ack: the frontend cleared the composer optimistically — never fail silently.
|
|
184
|
+
console.warn('[chat-queue] queue full, rejecting message');
|
|
185
|
+
try { _deps.broadcastWs({ type: 'queue-rejected', reason: 'full' }); }
|
|
186
|
+
catch (err) { reportSwallowed('chat-queue.reject-broadcast', err); }
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const item = _makeItem(clean);
|
|
190
|
+
_items.push(item);
|
|
191
|
+
_clearRescueTimer();
|
|
192
|
+
_broadcast();
|
|
193
|
+
let streaming = false;
|
|
194
|
+
try { streaming = !!(_deps.isStreaming && _deps.isStreaming()); } catch { streaming = false; }
|
|
195
|
+
if (!streaming) {
|
|
196
|
+
// Frontend guessed busy but the server sees no API call in flight: the turn may have ended
|
|
197
|
+
// just before enqueue and its turn-end hook already ran. Rescue after a short settle —
|
|
198
|
+
// falling back to the idle poll (not a single shot) so a transient busy/approval state
|
|
199
|
+
// retries within the poll budget instead of stranding the item.
|
|
200
|
+
_rescueTimer = setTimeout(() => {
|
|
201
|
+
_rescueTimer = null;
|
|
202
|
+
if (_suppressDrain || _pollTimer) return; // parked, or a drain/send-now poll already owns it
|
|
203
|
+
if (_safeToInject()) { _injectHead(); return; }
|
|
204
|
+
_pollUntilSafe(() => { if (!_suppressDrain) _injectHead(); }, () => { /* keep queued */ });
|
|
205
|
+
}, RESCUE_AFTER_MS);
|
|
206
|
+
if (typeof _rescueTimer.unref === 'function') _rescueTimer.unref();
|
|
207
|
+
}
|
|
208
|
+
return item;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Remove one queued item by id. Returns true when found. */
|
|
212
|
+
export function remove(id) {
|
|
213
|
+
const idx = _items.findIndex((it) => it.id === id);
|
|
214
|
+
if (idx < 0) return false;
|
|
215
|
+
_items.splice(idx, 1);
|
|
216
|
+
_broadcast();
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** Drop all queued items (session switch). Also cancels pending timers and invalidates any
|
|
221
|
+
* in-flight inject (gen bump) so an old-session message can never land in a fresh PTY.
|
|
222
|
+
* Cannot cancel bytes already written to the PTY (best-effort, ~330ms window). */
|
|
223
|
+
export function clear() {
|
|
224
|
+
_gen++;
|
|
225
|
+
_clearRescueTimer();
|
|
226
|
+
_clearPollTimer();
|
|
227
|
+
_clearEscTimer();
|
|
228
|
+
if (_items.length === 0) return;
|
|
229
|
+
_items = [];
|
|
230
|
+
_broadcast();
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Send-now: interrupt the running turn and inject this item immediately.
|
|
235
|
+
* Guard order matters (review P0): refuse BEFORE touching the queue when an inject is in
|
|
236
|
+
* flight, so a double-action can never strand a removed-but-unsent message.
|
|
237
|
+
*/
|
|
238
|
+
export function sendNow(id) {
|
|
239
|
+
if (!_deps) return false;
|
|
240
|
+
// Guard order matters (review P0): refuse BEFORE touching the queue. `_injecting` covers an
|
|
241
|
+
// in-flight paste; `_pollTimer` covers a prior send-now still in its ESC/idle-poll phase —
|
|
242
|
+
// a second poll would clobber the first one's timer and strand its already-removed item.
|
|
243
|
+
if (_injecting || _pollTimer) return false;
|
|
244
|
+
try { if (_deps.hasExternalInjection && _deps.hasExternalInjection()) return false; } catch { return false; }
|
|
245
|
+
const idx = _items.findIndex((it) => it.id === id);
|
|
246
|
+
if (idx < 0) return false;
|
|
247
|
+
const [item] = _items.splice(idx, 1);
|
|
248
|
+
_clearRescueTimer();
|
|
249
|
+
_broadcast();
|
|
250
|
+
|
|
251
|
+
const gen = _gen; // a clear()/stop() mid-flight invalidates the completion handler below
|
|
252
|
+
const inject = () => {
|
|
253
|
+
_injecting = true;
|
|
254
|
+
try {
|
|
255
|
+
_deps.writeToPtySequential(bracketPasteSubmit(item.text), (ok) => {
|
|
256
|
+
_injecting = false;
|
|
257
|
+
if (gen !== _gen) return;
|
|
258
|
+
if (!ok) { _items.unshift(item); _broadcast(); }
|
|
259
|
+
}, { settleMs: 250 });
|
|
260
|
+
} catch (err) {
|
|
261
|
+
_injecting = false;
|
|
262
|
+
if (gen === _gen) {
|
|
263
|
+
_items.unshift(item);
|
|
264
|
+
_broadcast();
|
|
265
|
+
}
|
|
266
|
+
reportSwallowed('chat-queue.send-now.inject', err);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
const restore = () => {
|
|
270
|
+
// Never blind-inject (see _pollUntilSafe). Park the item back at the head.
|
|
271
|
+
if (gen !== _gen) return;
|
|
272
|
+
if (!_items.some((it) => it.id === item.id)) {
|
|
273
|
+
_items.unshift(item);
|
|
274
|
+
_broadcast();
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
let streaming = false;
|
|
279
|
+
try { streaming = !!(_deps.isStreaming && _deps.isStreaming()); } catch { streaming = false; }
|
|
280
|
+
if (streaming) {
|
|
281
|
+
// Interrupt first: focus-in (a hidden xterm is unfocused; Ink ignores ESC then) then ESC —
|
|
282
|
+
// byte-identical to the web Stop button (ChatView handleInputStop). The gap timer is
|
|
283
|
+
// tracked so stop()/clear() can cancel it before it lands in a fresh PTY.
|
|
284
|
+
try { _deps.writeToPty('\x1b[I'); } catch (err) { reportSwallowed('chat-queue.send-now.focus', err); }
|
|
285
|
+
_escTimer = setTimeout(() => {
|
|
286
|
+
_escTimer = null;
|
|
287
|
+
try { _deps.writeToPty('\x1b'); } catch (err) { reportSwallowed('chat-queue.send-now.esc', err); }
|
|
288
|
+
_pollUntilSafe(inject, restore);
|
|
289
|
+
}, STOP_ESC_DELAY_MS);
|
|
290
|
+
if (typeof _escTimer.unref === 'function') _escTimer.unref();
|
|
291
|
+
} else if (_safeToInject()) {
|
|
292
|
+
// Idle / parked queue (e.g. after Stop): no interrupt needed — inject right away.
|
|
293
|
+
inject();
|
|
294
|
+
} else {
|
|
295
|
+
_pollUntilSafe(inject, restore);
|
|
296
|
+
}
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Turn-end hook (Stop-hook POST arrival + debounced emit; idempotent). Drains the head item
|
|
302
|
+
* once the TUI is observably idle. Suppressed after a user Stop until a new turn starts.
|
|
303
|
+
*/
|
|
304
|
+
export function onTurnEnd() {
|
|
305
|
+
if (!_deps || _items.length === 0 || _injecting) return;
|
|
306
|
+
// A send-now poll is already pending — it owns the next inject; let it finish rather than
|
|
307
|
+
// clear its timer out from under it (clearing would strand the removed item).
|
|
308
|
+
if (_pollTimer) return;
|
|
309
|
+
_clearRescueTimer();
|
|
310
|
+
if (_suppressDrain) return;
|
|
311
|
+
if (_safeToInject()) { _injectHead(); return; }
|
|
312
|
+
_pollUntilSafe(() => { if (!_suppressDrain) _injectHead(); }, () => { /* keep queued; next turn-end retries */ });
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/** Park the queue: the next turn-end(s) must not auto-drain (user pressed Stop). */
|
|
316
|
+
export function suppressNextDrain() {
|
|
317
|
+
_suppressDrain = true;
|
|
318
|
+
_clearRescueTimer();
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/** A new turn started (streaming rising edge): re-arm automatic draining. */
|
|
322
|
+
export function onStreamingActivated() {
|
|
323
|
+
_suppressDrain = false;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** Server shutdown: drop timers AND queue state — parked items belong to the dying session
|
|
327
|
+
* and must not drain into the fresh PTY after a stop/start cycle. */
|
|
328
|
+
export function stop() {
|
|
329
|
+
_clearRescueTimer();
|
|
330
|
+
_clearPollTimer();
|
|
331
|
+
_clearEscTimer();
|
|
332
|
+
_injecting = false;
|
|
333
|
+
_items = [];
|
|
334
|
+
_suppressDrain = false;
|
|
335
|
+
_gen++;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export function __resetForTests() {
|
|
339
|
+
stop();
|
|
340
|
+
_deps = null;
|
|
341
|
+
}
|
package/server/lib/cli-inject.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// * buildInjectBlockRegex 用 `\r?\n` 匹配,可同时识别两种形式的历史 marker;
|
|
17
17
|
// * 改成参数化 EOL 会破坏 LEGACY 形式的回归匹配(老 marker 是 `\n` 写入的)。
|
|
18
18
|
// - 因此注入后 CRLF 文件**会含混合 EOL**(块内 LF + 块外 CRLF),这是已知的、
|
|
19
|
-
// 被 test/cli-inject.test.js 'CRLF 文件注入后原 CRLF 部分被保留' 用例固化的行为。
|
|
19
|
+
// 被 packages/app/test/cli-inject.test.js 'CRLF 文件注入后原 CRLF 部分被保留' 用例固化的行为。
|
|
20
20
|
|
|
21
21
|
import { readFileSync, writeFileSync, existsSync } from 'node:fs';
|
|
22
22
|
|
|
@@ -2,7 +2,7 @@ import { readFileSync, existsSync, realpathSync } from 'node:fs';
|
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { getClaudeConfigDir } from '../../findcc.js';
|
|
5
|
-
import { getModelMaxTokens, adaptContextWindow, sumUsageInputTokens, sumUsageContextTokens, getCalibrationModel } from '
|
|
5
|
+
import { getModelMaxTokens, adaptContextWindow, sumUsageInputTokens, sumUsageContextTokens, getCalibrationModel } from '@ccv/core/context-rules';
|
|
6
6
|
|
|
7
7
|
export const CONTEXT_WINDOW_FILE = join(getClaudeConfigDir(), 'context-window.json');
|
|
8
8
|
export const CLAUDE_SETTINGS_FILE = join(getClaudeConfigDir(), 'settings.json');
|
|
@@ -27,7 +27,7 @@ export function readModelContextSize() {
|
|
|
27
27
|
const modelId = data?.model?.id || null;
|
|
28
28
|
let contextSize = 200000;
|
|
29
29
|
if (modelId) {
|
|
30
|
-
// [Nk]/[Nm] 后缀与家族档位统一走共享规则表(
|
|
30
|
+
// [Nk]/[Nm] 后缀与家族档位统一走共享规则表(@ccv/core/context-rules)
|
|
31
31
|
contextSize = getModelMaxTokens(modelId);
|
|
32
32
|
// Cache the base name → size mapping
|
|
33
33
|
const base = modelId.toLowerCase().replace(/^claude-/i, '').replace(/\[.*\]/, '').trim();
|
|
@@ -70,7 +70,7 @@ export function getContextSizeForModel(modelOrEntry) {
|
|
|
70
70
|
if (_startupModelBase && base === _startupModelBase) {
|
|
71
71
|
return _startupContextSize;
|
|
72
72
|
}
|
|
73
|
-
// 完整档位表见
|
|
73
|
+
// 完整档位表见 @ccv/core/context-rules(与前端同源;含 haiku/旧 opus/3-opus 200K、
|
|
74
74
|
// deepseek-v4 1M、kimi/moonshot 256K、gpt/deepseek 等三方档位,默认 200K)
|
|
75
75
|
return getModelMaxTokens(apiModelName);
|
|
76
76
|
}
|
|
@@ -181,9 +181,6 @@ export function createSystemPromptVariables(overrides = {}, opts = {}) {
|
|
|
181
181
|
userName: isGitRepository
|
|
182
182
|
? commandOutput('git', ['config', 'user.name'], cwd)
|
|
183
183
|
: '',
|
|
184
|
-
status: isGitRepository
|
|
185
|
-
? commandOutput('git', ['status', '--short'], cwd)
|
|
186
|
-
: '',
|
|
187
184
|
recentCommits: isGitRepository
|
|
188
185
|
? commandOutput('git', ['log', '--oneline', '-5'], cwd)
|
|
189
186
|
: '',
|
|
@@ -198,8 +195,6 @@ export function createSystemPromptVariables(overrides = {}, opts = {}) {
|
|
|
198
195
|
hostname: stringOrEmpty(() => os.hostname()),
|
|
199
196
|
availableParallelism: numberOrEmpty(() => os.availableParallelism()),
|
|
200
197
|
totalMemory: numberOrEmpty(() => os.totalmem()),
|
|
201
|
-
freeMemory: numberOrEmpty(() => os.freemem()),
|
|
202
|
-
uptime: numberOrEmpty(() => os.uptime()),
|
|
203
198
|
},
|
|
204
199
|
runtime: {
|
|
205
200
|
nodeVersion: stringOrEmpty(() => process.version),
|
|
@@ -208,8 +203,6 @@ export function createSystemPromptVariables(overrides = {}, opts = {}) {
|
|
|
208
203
|
ppid: numberOrEmpty(() => process.ppid),
|
|
209
204
|
},
|
|
210
205
|
time: {
|
|
211
|
-
current: stringOrEmpty(() => now.toString()),
|
|
212
|
-
iso: stringOrEmpty(() => now.toISOString()),
|
|
213
206
|
date: currentDate(timeZone, now),
|
|
214
207
|
timezone: timeZone,
|
|
215
208
|
},
|
|
@@ -234,8 +227,6 @@ export function createSystemPromptVariables(overrides = {}, opts = {}) {
|
|
|
234
227
|
terminal: {
|
|
235
228
|
term: envString('TERM'),
|
|
236
229
|
colorTerm: envString('COLORTERM'),
|
|
237
|
-
columns: numberOrEmpty(() => process.stdout.columns),
|
|
238
|
-
rows: numberOrEmpty(() => process.stdout.rows),
|
|
239
230
|
},
|
|
240
231
|
filesystem: {
|
|
241
232
|
tmpdir: stringOrEmpty(() => os.tmpdir()),
|
|
@@ -48,7 +48,7 @@ function findEmptyExitPlanModeBlocks(content, out) {
|
|
|
48
48
|
* - Header 名规范:interceptor 走 fetch Headers.entries() 全小写(WHATWG 规范),
|
|
49
49
|
* 只查小写键即可。
|
|
50
50
|
* - In-place mutation by design:用 Object.assign(blk.input, patch) 而非
|
|
51
|
-
* `blk.input = {...}`。增量重建器 (
|
|
51
|
+
* `blk.input = {...}`。增量重建器 (@ccv/core/delta-reconstructor) 会让同一 tool_use
|
|
52
52
|
* block 在多个 entry 间共享对象引用;in-place mutate 让后续 entry 的「Object.keys
|
|
53
53
|
* (inp).length === 0」预检自动跳过——正是我们想要的 (相同 plan,不重新查盘)。
|
|
54
54
|
* 注意:此优化仅在 SSE / live 路径(共享对象)生效;REST 路径 raw → JSON.parse
|
|
@@ -138,7 +138,7 @@ export function ensureHooks() {
|
|
|
138
138
|
|
|
139
139
|
// AskUserQuestion hook → ask-bridge.js
|
|
140
140
|
// Guard: only execute when CCVIEWER_PORT is set (i.e. launched by cc-viewer)
|
|
141
|
-
const askBridgePath = resolve(SERVER_LIB, 'ask-bridge.js');
|
|
141
|
+
const askBridgePath = resolve(SERVER_LIB, 'ask', 'ask-bridge.js');
|
|
142
142
|
const askCmd = `[ -n "$CCVIEWER_PORT" ] && node "${askBridgePath}" || true ${CCV_HOOK_MARKER}`;
|
|
143
143
|
const askDesired = _buildHookObj(askCmd);
|
|
144
144
|
const askExisting = settings.hooks.PreToolUse.find(h => h.matcher === 'AskUserQuestion');
|
|
@@ -157,7 +157,7 @@ export function ensureHooks() {
|
|
|
157
157
|
|
|
158
158
|
// Permission approval hook → perm-bridge.js (matcher: "" = match all tools)
|
|
159
159
|
// Guard: only execute when CCVIEWER_PORT is set (i.e. launched by cc-viewer)
|
|
160
|
-
const permBridgePath = resolve(SERVER_LIB, 'perm-bridge.js');
|
|
160
|
+
const permBridgePath = resolve(SERVER_LIB, 'ask', 'perm-bridge.js');
|
|
161
161
|
const permCmd = `[ -n "$CCVIEWER_PORT" ] && node "${permBridgePath}" || true ${CCV_HOOK_MARKER}`;
|
|
162
162
|
const permMatcher = '';
|
|
163
163
|
// Clean up legacy entries
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { realpathSync } from 'node:fs';
|
|
14
14
|
import { resolve, basename, sep, join } from 'node:path';
|
|
15
15
|
import { homedir, platform, tmpdir } from 'node:os';
|
|
16
|
-
import { getClaudeConfigDir } from '../../findcc.js';
|
|
16
|
+
import { getClaudeConfigDir, onLogDirChange } from '../../findcc.js';
|
|
17
17
|
import { loadWorkspaces } from '../workspace-registry.js';
|
|
18
18
|
|
|
19
19
|
const osPlatform = platform();
|
|
@@ -105,6 +105,11 @@ export function bumpWorkspacesVersion() {
|
|
|
105
105
|
_rootsCache = null;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
// LOG_DIR changes relocate the workspace registry file — the allowlist cache
|
|
109
|
+
// (including registered workspaces) must be invalidated. Registered at module
|
|
110
|
+
// load so findcc (a leaf) never imports this module.
|
|
111
|
+
onLogDirChange(() => bumpWorkspacesVersion());
|
|
112
|
+
|
|
108
113
|
/**
|
|
109
114
|
* 测试 / 多 process 场景显式重置 —— 测试可在更换 HOME env 后调,policy 重新解析。
|
|
110
115
|
*/
|
package/server/lib/file-api.js
CHANGED
|
@@ -5,6 +5,22 @@
|
|
|
5
5
|
import { resolve, join, sep, isAbsolute } from 'node:path';
|
|
6
6
|
import { realpathSync, existsSync, statSync, readFileSync, writeFileSync, renameSync } from 'node:fs';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* A path counts as a non-empty file only if it exists, is a regular file, and
|
|
10
|
+
* has size > 0 (an empty file would blank the system prompt — skipping is safer).
|
|
11
|
+
* Bad symlinks / missing paths / directories → statSync throws or isFile()=false → false.
|
|
12
|
+
* Shared leaf home (moved from system-prompt-files.js to break the
|
|
13
|
+
* model-system-prompts.js ↔ system-prompt-files.js static cycle).
|
|
14
|
+
*/
|
|
15
|
+
export function isNonEmptyFile(p) {
|
|
16
|
+
try {
|
|
17
|
+
const st = statSync(p);
|
|
18
|
+
return st.isFile() && st.size > 0;
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
8
24
|
/**
|
|
9
25
|
* Check whether targetPath is contained within the project root directory.
|
|
10
26
|
* Resolves symlinks via realpathSync. Returns false on any error.
|
|
@@ -31,7 +47,7 @@ class FileApiError extends Error {
|
|
|
31
47
|
/**
|
|
32
48
|
* Resolve and validate a file path. No production callers (readFileContent does its own inline
|
|
33
49
|
* path validation); kept as a standalone, path-traversal-defending helper covered by
|
|
34
|
-
* test/file-api-gap.test.js — don't delete as "dead code" without removing that test.
|
|
50
|
+
* packages/app/test/file-api-gap.test.js — don't delete as "dead code" without removing that test.
|
|
35
51
|
* @param {string} cwd - project working directory
|
|
36
52
|
* @param {string} reqPath - requested path (relative or absolute)
|
|
37
53
|
* @param {boolean} isEditorSession - whether this is an editor session
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// and the existing dingtalk-bridge tests keep working unchanged. Importing it registers the
|
|
7
7
|
// DingTalk adapter with the core.
|
|
8
8
|
import * as core from './im-bridge-core.js';
|
|
9
|
-
import { __setClientFactory } from '
|
|
9
|
+
import { __setClientFactory } from '../adapters/dingtalk-adapter.js';
|
|
10
10
|
|
|
11
11
|
const ID = 'dingtalk';
|
|
12
12
|
|