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
package/server/pty-manager.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { resolveNativePath, LOG_DIR } from '../findcc.js';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { join, dirname, sep } from 'node:path';
|
|
4
|
-
import { chmodSync, statSync
|
|
4
|
+
import { chmodSync, statSync } from 'node:fs';
|
|
5
5
|
import { platform, arch, homedir } from 'node:os';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
7
|
import { prepareEmbeddedShellSpawn, stripClaudeNoFlickerUnlessOptedIn, applyClaudeAltScreenPref } from './lib/terminal-env.js';
|
|
8
8
|
import { killPtyTree } from './lib/term-signals.js';
|
|
9
9
|
import { findSafeSliceStart, splitTrailingIncomplete } from './lib/ansi-safe-slice.js';
|
|
10
|
-
import { buildSystemPromptFileArgs } from './lib/system-prompt-files.js';
|
|
11
|
-
import { renderSystemPromptFileArgs } from './lib/system-prompt-render.js';
|
|
12
|
-
import { MODEL_PROMPT_DIR } from './lib/model-system-prompts.js';
|
|
13
10
|
import { resolveSpawnModel } from './lib/spawn-model-resolver.js';
|
|
14
11
|
import { mergeSettingsIntoArgs } from './lib/settings-merge.js';
|
|
12
|
+
import { MODEL_PROMPT_DIR } from './lib/model-system-prompts.js';
|
|
13
|
+
// Launch-time system-prompt/thinking-display pipeline lives in lib/launch-config.js
|
|
14
|
+
// (shared with the SDK link). Re-exported here for existing consumers/tests.
|
|
15
|
+
import { withDefaultThinkingDisplay, resolveLaunchSystemPrompt } from './lib/launch-config.js';
|
|
16
|
+
export { withDefaultThinkingDisplay } from './lib/launch-config.js';
|
|
15
17
|
import { t, tFor } from './i18n.js';
|
|
16
18
|
|
|
17
19
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -30,20 +32,24 @@ let exitListeners = [];
|
|
|
30
32
|
let lastExitCode = null;
|
|
31
33
|
let outputBuffer = '';
|
|
32
34
|
let currentWorkspacePath = null;
|
|
33
|
-
let lastWorkspacePath = null; //
|
|
35
|
+
let lastWorkspacePath = null; // kept after process exit, used for respawn shell
|
|
34
36
|
let lastPtyCols = 120;
|
|
35
37
|
let lastPtyRows = 30;
|
|
36
|
-
//
|
|
37
|
-
//
|
|
38
|
-
//
|
|
38
|
+
// In-flight guard for the main PTY spawn: the guard runs before `await getPty` and
|
|
39
|
+
// ptyProcess is assigned after the await, so two synchronously-arriving input messages
|
|
40
|
+
// could both pass the guard and double-spawn (the first pty loses its reference → leak +
|
|
41
|
+
// output cross-talk). Synchronously reserve a promise and reuse it across concurrent calls,
|
|
42
|
+
// never spawning twice (mirrors scratch-pty-manager._spawnInflight).
|
|
39
43
|
let _spawnInflight = null;
|
|
40
|
-
//
|
|
41
|
-
//
|
|
44
|
+
// cols/rows clamp range at the resize entry: the upper bound is wide enough (4K-display
|
|
45
|
+
// ultra-wide terminals), the lower bound is ≥2 cols/1 row to keep FitAddon's 2×1 (from a
|
|
46
|
+
// 0-size container) or a malformed client's NaN/negative from poisoning lastPtyCols/Rows.
|
|
42
47
|
const PTY_COLS_MIN = 2, PTY_COLS_MAX = 1000;
|
|
43
48
|
const PTY_ROWS_MIN = 1, PTY_ROWS_MAX = 1000;
|
|
44
49
|
const MAX_BUFFER = 200000;
|
|
45
|
-
//
|
|
46
|
-
//
|
|
50
|
+
// Trim hysteresis: once MAX_BUFFER is exceeded, trim once down to TRIM_TO rather than to
|
|
51
|
+
// MAX_BUFFER on every chunk — dropping the ~200KB slice reallocation frequency from once
|
|
52
|
+
// per chunk to once per ~20KB of new output.
|
|
47
53
|
const BUFFER_TRIM_TO = 180000;
|
|
48
54
|
let batchBuffer = '';
|
|
49
55
|
let batchScheduled = false;
|
|
@@ -53,25 +59,31 @@ export function _setPtyImportForTests(fn) {
|
|
|
53
59
|
_ptyImportForTests = fn;
|
|
54
60
|
}
|
|
55
61
|
|
|
56
|
-
// spawn
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// At spawn time, resolve the model id under the "currently effective config" for
|
|
63
|
+
// model-customized system prompt matching (resolveSpawnModel: merged --settings launch
|
|
64
|
+
// object > env CLAUDE_MODEL/ANTHROPIC_MODEL > settings.json > active third-party proxy
|
|
65
|
+
// profile model mapping; no live config signal → null → no model entry injected).
|
|
66
|
+
// The old criterion read lastModelUsage from ~/.claude.json — that is usage stats from the
|
|
67
|
+
// previous session, not config, so a stale record could force the third-party model's
|
|
68
|
+
// override prompt onto an official-model session (review round: deepseek residual-record
|
|
69
|
+
// incident). The NODE_TEST_CONTEXT barrier is kept: resolveSpawnModel reads process.env
|
|
70
|
+
// model vars, so a dev-machine shell export could leak into unit tests (machine-state
|
|
71
|
+
// dependency); tests inject explicitly via _setSpawnModelReaderForTests. env/reader/opts
|
|
72
|
+
// are parameterized only for testability (see the guard unit test in
|
|
73
|
+
// packages/app/test/pty-manager.test.js).
|
|
74
|
+
export function _defaultSpawnModelReader(c, env = process.env, reader = resolveSpawnModel, opts) {
|
|
75
|
+
return env.NODE_TEST_CONTEXT ? null : reader(c, env, opts);
|
|
66
76
|
}
|
|
67
77
|
let _spawnModelReader = _defaultSpawnModelReader;
|
|
68
78
|
export function _setSpawnModelReaderForTests(fn) {
|
|
69
79
|
_spawnModelReader = fn || _defaultSpawnModelReader;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
//
|
|
73
|
-
// 5s
|
|
74
|
-
//
|
|
82
|
+
// Boot-fallback clock and window: a death within the window after spawn is treated as a
|
|
83
|
+
// "boot-period death". Real boot crashes are <1s, so 5s is plenty; a longer window only
|
|
84
|
+
// widens the false-positive surface for "user quickly exits on purpose" (review value).
|
|
85
|
+
// _now is injectable: the fallback tests need to steer the clock to simulate "exits after
|
|
86
|
+
// surviving past the window".
|
|
75
87
|
const SYS_PROMPT_BOOT_WINDOW_MS = 5000;
|
|
76
88
|
let _now = Date.now;
|
|
77
89
|
export function _setNowForTests(fn) {
|
|
@@ -86,22 +98,26 @@ async function getPty() {
|
|
|
86
98
|
return ptyMod.default || ptyMod;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
|
-
// ANSI
|
|
90
|
-
//
|
|
101
|
+
// ANSI-safe slice start: the implementation moved to lib/ansi-safe-slice.js (anchor-scan
|
|
102
|
+
// algorithm; see that file's doc). Kept exported from this module — server.js destructures
|
|
103
|
+
// it for the flood rate-limiter and unit tests import it from here.
|
|
91
104
|
export { findSafeSliceStart };
|
|
92
105
|
|
|
93
106
|
// DEC Private Mode 2026 (Synchronized Output) markers.
|
|
94
|
-
// xterm.js 6.0+
|
|
95
|
-
//
|
|
107
|
+
// xterm.js 6.0+ supports these natively: it buffers all writes after BEGIN and renders once
|
|
108
|
+
// on END, eliminating mid-batch frame flicker. Terminals that do not support them ignore
|
|
109
|
+
// the sequences.
|
|
96
110
|
const SYNC_BEGIN = '\x1b[?2026h';
|
|
97
111
|
const SYNC_END = '\x1b[?2026l';
|
|
98
112
|
|
|
99
113
|
function flushBatch(force = false) {
|
|
100
114
|
batchScheduled = false;
|
|
101
115
|
if (!batchBuffer) return;
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
116
|
+
// Batch-boundary half-sequence carry: every batch is wrapped in SYNC markers, so if a
|
|
117
|
+
// batch boundary splits an escape sequence the injected markers would eat its ESC and
|
|
118
|
+
// render the tail literally (the root cause of fragments like `[9m`/`8;2;102m`). The
|
|
119
|
+
// half tail is carried to the next batch (PTY continuation always completes it); when
|
|
120
|
+
// force=true (process exit) nothing is carried and all residue is flushed.
|
|
105
121
|
let safe = batchBuffer;
|
|
106
122
|
let carry = '';
|
|
107
123
|
if (!force) [safe, carry] = splitTrailingIncomplete(batchBuffer);
|
|
@@ -113,8 +129,10 @@ function flushBatch(force = false) {
|
|
|
113
129
|
}
|
|
114
130
|
}
|
|
115
131
|
|
|
116
|
-
//
|
|
117
|
-
//
|
|
132
|
+
// Inject a synthetic notice line into the embedded terminal (not claude output). Appending
|
|
133
|
+
// to outputBuffer lets newly-connected / reconnected clients see it in the snapshot
|
|
134
|
+
// (server.js's data-resync reads getOutputBuffer), then broadcast live to the current
|
|
135
|
+
// dataListeners.
|
|
118
136
|
function emitSpawnNotice(line) {
|
|
119
137
|
const chunk = `\x1b[2m${line}\x1b[0m\r\n`;
|
|
120
138
|
outputBuffer += chunk;
|
|
@@ -123,9 +141,10 @@ function emitSpawnNotice(line) {
|
|
|
123
141
|
}
|
|
124
142
|
}
|
|
125
143
|
|
|
126
|
-
//
|
|
127
|
-
// pnpm / yarn
|
|
128
|
-
//
|
|
144
|
+
// Use createRequire().resolve rather than join(__dirname, '..', 'node_modules', ...) —
|
|
145
|
+
// when pnpm / yarn workspaces hoist node-pty into an upper node_modules the relative path
|
|
146
|
+
// would not resolve, silently failing chmod → EACCES when running the PTY, with no log to
|
|
147
|
+
// debug.
|
|
129
148
|
function fixSpawnHelperPermissions() {
|
|
130
149
|
const os = platform();
|
|
131
150
|
const cpu = arch();
|
|
@@ -135,7 +154,8 @@ function fixSpawnHelperPermissions() {
|
|
|
135
154
|
const req = createRequire(import.meta.url);
|
|
136
155
|
helperPath = req.resolve(subPath);
|
|
137
156
|
} catch (err) {
|
|
138
|
-
// node-pty
|
|
157
|
+
// node-pty not installed / no prebuild for this platform: skip; spawn will raise its
|
|
158
|
+
// own error
|
|
139
159
|
return;
|
|
140
160
|
}
|
|
141
161
|
try {
|
|
@@ -148,66 +168,86 @@ function fixSpawnHelperPermissions() {
|
|
|
148
168
|
}
|
|
149
169
|
}
|
|
150
170
|
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const hasFlag = args.some(a =>
|
|
156
|
-
a === '--thinking-display' || (typeof a === 'string' && a.startsWith('--thinking-display='))
|
|
157
|
-
);
|
|
158
|
-
return hasFlag ? args : [...args, '--thinking-display', 'summarized'];
|
|
159
|
-
}
|
|
171
|
+
// withDefaultThinkingDisplay / parseResumeArgs / materializePinnedEntries /
|
|
172
|
+
// suppressManuallyFlaggedPinned / injectionConfigured have moved to lib/launch-config.js
|
|
173
|
+
// (the SDK path shares the same launch-config pipeline); withDefaultThinkingDisplay is kept
|
|
174
|
+
// compatible via the top re-export.
|
|
160
175
|
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
176
|
+
// Always try injecting `--thinking-display summarized` by default; if the target claude (or
|
|
177
|
+
// a claude-compatible CLI/fork/wrapper) does not recognize the flag, spawnClaude's onExit
|
|
178
|
+
// detects the "unknown option" error, marks claudePath into this set, and skips injection
|
|
179
|
+
// on the next spawn — based entirely on live runtime feedback, not version numbers or
|
|
180
|
+
// brand.
|
|
164
181
|
const _thinkingDisplayRejectedPaths = new Set();
|
|
165
182
|
|
|
166
|
-
//
|
|
167
|
-
//
|
|
168
|
-
//
|
|
169
|
-
//
|
|
183
|
+
// CC_SYSTEM.md / CC_APPEND_SYSTEM.md in the launch dir are auto-injected as
|
|
184
|
+
// --system-prompt-file/--append-system-prompt-file. If the target claude (or third-party
|
|
185
|
+
// fork/wrapper) does not recognize the flag, onExit detects "unknown option" and records
|
|
186
|
+
// claudePath into this set; the next spawn skips injection and restarts without the flag
|
|
187
|
+
// (self-heals like _thinkingDisplayRejectedPaths). Semantics: permanent (process-level) —
|
|
188
|
+
// "unknown option" is a deterministic capability signal that this binary does not support
|
|
189
|
+
// the flag.
|
|
170
190
|
const _systemPromptFileRejectedPaths = new Set();
|
|
171
191
|
|
|
172
|
-
//
|
|
173
|
-
// (API key
|
|
174
|
-
//
|
|
175
|
-
//
|
|
192
|
+
// One-shot skip token: the relaxed branch of boot-fallback tier 1 (non-signal exit≠0
|
|
193
|
+
// within the boot window) covers **transient** crashes (expired API key / network jitter /
|
|
194
|
+
// an unrelated instant exit) and must not be written into the permanent rejection set
|
|
195
|
+
// above — otherwise a single transient fault would silently disable injection for that
|
|
196
|
+
// binary for the whole ccv process lifetime (review P1). The token is consumed (delete) on
|
|
197
|
+
// the next spawn: guaranteeing exactly one de-injection retry, after which normal injection
|
|
198
|
+
// attempts resume.
|
|
176
199
|
const _skipInjectionOncePaths = new Set();
|
|
177
200
|
|
|
178
|
-
//
|
|
201
|
+
// Suppress one injection notice on internal restarts (-c retry / flag self-heal) so the
|
|
202
|
+
// terminal does not print the same line repeatedly.
|
|
179
203
|
let _suppressNextSpawnNotice = false;
|
|
180
204
|
|
|
181
|
-
//
|
|
205
|
+
// ─── System-prompt pinning (resume launches must not re-render variables) ────────
|
|
206
|
+
// Re-rendering ${...} variables on a `-c`/`-r` launch makes the system text diverge
|
|
207
|
+
// byte-for-byte from the resumed conversation's original → the entire prompt-prefix
|
|
208
|
+
// KV cache is invalidated. Instead, pin the content the RESUMED conversation was
|
|
209
|
+
// launched with:
|
|
210
|
+
// target identified + snapshot record → re-inject the recorded bytes verbatim
|
|
211
|
+
// (build+render skipped entirely);
|
|
212
|
+
// target identified + no record → inject NOTHING this launch (never alter the
|
|
213
|
+
// system text an existing context already has);
|
|
214
|
+
// target unidentifiable (-c with no transcripts, bare -r picker) → normal pipeline.
|
|
215
|
+
// Store/binding semantics: server/lib/system-prompt-snapshots.js header.
|
|
216
|
+
// Implementation: lib/launch-config.js (resolveLaunchSystemPrompt).
|
|
217
|
+
|
|
218
|
+
// Test/internal only: clear the rejection set
|
|
182
219
|
export function _clearThinkingDisplayRejectedPaths() {
|
|
183
220
|
_thinkingDisplayRejectedPaths.clear();
|
|
184
221
|
}
|
|
185
222
|
|
|
186
|
-
//
|
|
223
|
+
// Test only: query whether a path has been marked unsupported
|
|
187
224
|
export function _isThinkingDisplayRejected(claudePath) {
|
|
188
225
|
return _thinkingDisplayRejectedPaths.has(claudePath);
|
|
189
226
|
}
|
|
190
227
|
|
|
191
|
-
//
|
|
228
|
+
// Test only: force a path into the rejection set, bypassing the first crash
|
|
192
229
|
export function _markThinkingDisplayRejected(claudePath) {
|
|
193
230
|
_thinkingDisplayRejectedPaths.add(claudePath);
|
|
194
231
|
}
|
|
195
232
|
|
|
196
|
-
//
|
|
233
|
+
// Test/internal only: clear the system-prompt-file rejection set (along with the
|
|
234
|
+
// one-shot skip tokens, keeping cases clean)
|
|
197
235
|
export function _clearSystemPromptFileRejectedPaths() {
|
|
198
236
|
_systemPromptFileRejectedPaths.clear();
|
|
199
237
|
_skipInjectionOncePaths.clear();
|
|
200
238
|
}
|
|
201
239
|
|
|
202
|
-
//
|
|
240
|
+
// Test only: query whether a path has been marked unsupported for --system-prompt-file
|
|
203
241
|
export function _isSystemPromptFileRejected(claudePath) {
|
|
204
242
|
return _systemPromptFileRejectedPaths.has(claudePath);
|
|
205
243
|
}
|
|
206
244
|
|
|
207
245
|
export async function spawnClaude(proxyPort, cwd, extraArgs = [], claudePath = null, isNpmVersion = false, serverPort = null, serverProtocol = 'http', internalToken = null) {
|
|
208
|
-
//
|
|
209
|
-
//
|
|
210
|
-
//
|
|
246
|
+
// Wait for any in-flight spawn to finish before kill+spawn, avoiding a double-spawn /
|
|
247
|
+
// cross-talk with spawnShell (self-serializing). while rather than if: with ≥3 concurrent
|
|
248
|
+
// spawns, after A finishes B sets a new inflight=pB, and a single if's C would not re-check
|
|
249
|
+
// pB before kill+spawn, letting implB/implC double-spawn — loop until there is genuinely
|
|
250
|
+
// no inflight before proceeding.
|
|
211
251
|
while (_spawnInflight) { try { await _spawnInflight; } catch { } }
|
|
212
252
|
if (ptyProcess) {
|
|
213
253
|
killPty();
|
|
@@ -222,7 +262,7 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
222
262
|
|
|
223
263
|
fixSpawnHelperPermissions();
|
|
224
264
|
|
|
225
|
-
//
|
|
265
|
+
// If claudePath was not provided, try to find it automatically
|
|
226
266
|
if (!claudePath) {
|
|
227
267
|
claudePath = resolveNativePath();
|
|
228
268
|
if (!claudePath) {
|
|
@@ -235,22 +275,27 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
235
275
|
// behind that configuration (especially on enterprise allowlisted machines).
|
|
236
276
|
env.DISABLE_AUTOUPDATER = '1';
|
|
237
277
|
env.ANTHROPIC_BASE_URL = `http://127.0.0.1:${proxyPort}`;
|
|
238
|
-
env.CCV_PROXY_MODE = '1'; //
|
|
239
|
-
env.CCV_LOG_DIR = LOG_DIR; //
|
|
240
|
-
//
|
|
278
|
+
env.CCV_PROXY_MODE = '1'; // tell interceptor.js not to start a server again
|
|
279
|
+
env.CCV_LOG_DIR = LOG_DIR; // let the forked Claude Code process find the same
|
|
280
|
+
// profile.json etc. resources
|
|
281
|
+
// Strip cc-viewer's internal short-circuit switch so it does not leak to the claude child
|
|
241
282
|
delete env.CCV_SKIP_THINKING_DISPLAY;
|
|
242
|
-
//
|
|
243
|
-
//
|
|
244
|
-
//
|
|
245
|
-
//
|
|
283
|
+
// Strip server-only mode markers: a spawned claude (especially teammate subprocesses,
|
|
284
|
+
// which install a fetch hook) is not the ccv server — inheriting CCV_WORKSPACE_MODE would
|
|
285
|
+
// leave the interceptor's workspace binding permanently empty (teammate role assignment
|
|
286
|
+
// silently fails); CCV_ELECTRON_MULTITAB likewise should only be held by the server
|
|
287
|
+
// process (im-process-manager already strips the same for IM workers).
|
|
246
288
|
delete env.CCV_WORKSPACE_MODE;
|
|
247
289
|
delete env.CCV_ELECTRON_MULTITAB;
|
|
248
|
-
// Claude Code NO_FLICKER
|
|
249
|
-
// cc-viewer
|
|
290
|
+
// Claude Code's NO_FLICKER makes the embedded xterm use the alt screen and lose
|
|
291
|
+
// scrollback. cc-viewer strips the inherited value by default; set
|
|
292
|
+
// CCV_KEEP_CLAUDE_CODE_NO_FLICKER=1 explicitly when it is actually needed.
|
|
250
293
|
stripClaudeNoFlickerUnlessOptedIn(env);
|
|
251
|
-
//
|
|
252
|
-
//
|
|
253
|
-
//
|
|
294
|
+
// Newer Claude Code renders fullscreen by default (in-place redraw of the whole screen) →
|
|
295
|
+
// the terminal is left with one screen and no scroll-back into history. cc-viewer
|
|
296
|
+
// injects CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 by default so claude returns to classic
|
|
297
|
+
// streaming rendering with scrollable history; users who want fullscreen flicker-free
|
|
298
|
+
// rendering opt out with CCV_KEEP_CLAUDE_FULLSCREEN=1.
|
|
254
299
|
applyClaudeAltScreenPref(env);
|
|
255
300
|
|
|
256
301
|
// Resolve real Node.js path (Electron's process.execPath is the Electron binary)
|
|
@@ -281,22 +326,25 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
281
326
|
}
|
|
282
327
|
}
|
|
283
328
|
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
//
|
|
329
|
+
// Disable Claude Code CLI mouse-event capture to preserve native text selection
|
|
330
|
+
// (copy/paste) in the xterm panel. Without this, Claude enables SGR mouse tracking
|
|
331
|
+
// (DECSET ?1000/1006) and steals the xterm's mouse events. ??= respects an explicit user
|
|
332
|
+
// export (e.g. to see mouse events while debugging).
|
|
287
333
|
env.CLAUDE_CODE_DISABLE_MOUSE ??= '1';
|
|
288
334
|
|
|
289
|
-
//
|
|
290
|
-
//
|
|
335
|
+
// Inject ANTHROPIC_BASE_URL via --settings to guarantee it overrides what settings.json
|
|
336
|
+
// contains. Only overrides env.ANTHROPIC_BASE_URL; other settings fields are untouched.
|
|
291
337
|
const settingsObj = {
|
|
292
338
|
env: {
|
|
293
339
|
ANTHROPIC_BASE_URL: env.ANTHROPIC_BASE_URL
|
|
294
340
|
}
|
|
295
341
|
};
|
|
296
|
-
//
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
342
|
+
// Inject permissions.deny as a second line of defense for IM workers (skip-permissions;
|
|
343
|
+
// see plan §security 3). Only appends deny rules (deny has the highest precedence and
|
|
344
|
+
// only tightens, never loosens), so it does not break the user's existing permissions.
|
|
345
|
+
// Note: under bypass mode whether deny is still honored depends on Claude Code's
|
|
346
|
+
// behavior; the truly reliable enforcement layer is perm-bridge.js's PreToolUse deny
|
|
347
|
+
// (CCV_IM_DENY). This is a best-effort defense-in-depth layer.
|
|
300
348
|
if (process.env.CCV_IM_DENY === '1') {
|
|
301
349
|
const home = homedir();
|
|
302
350
|
settingsObj.permissions = {
|
|
@@ -305,17 +353,19 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
305
353
|
'Bash(git push:*)', 'Bash(npm publish:*)', 'Bash(ssh:*)', 'Bash(scp:*)',
|
|
306
354
|
`Read(${home}/.ssh/**)`, `Edit(${home}/.ssh/**)`, `Write(${home}/.ssh/**)`,
|
|
307
355
|
`Read(${home}/.aws/**)`, `Edit(${home}/.aws/**)`, `Write(${home}/.aws/**)`,
|
|
308
|
-
//
|
|
309
|
-
//
|
|
356
|
+
// File-precise: protect the deny mechanism itself (settings/hooks) and the IM
|
|
357
|
+
// credential store (preferences.json), but do not block all of ~/.claude — the
|
|
358
|
+
// worker's working directory sits under ~/.claude/cc-viewer/IM_<id>/ and must stay
|
|
359
|
+
// writable.
|
|
310
360
|
`Edit(${home}/.claude/settings.json)`, `Write(${home}/.claude/settings.json)`,
|
|
311
361
|
`Edit(${home}/.claude/settings.local.json)`, `Write(${home}/.claude/settings.local.json)`,
|
|
312
362
|
`Edit(${home}/.claude/cc-viewer/preferences.json)`, `Write(${home}/.claude/cc-viewer/preferences.json)`,
|
|
313
363
|
],
|
|
314
364
|
};
|
|
315
365
|
}
|
|
316
|
-
//
|
|
317
|
-
// -
|
|
318
|
-
// -
|
|
366
|
+
// Inject --thinking-display summarized; skip injection when either of these holds:
|
|
367
|
+
// - the path is in the rejection set (it crashed because of this last time)
|
|
368
|
+
// - env CCV_SKIP_THINKING_DISPLAY=1 (user global opt-out, consistent with cli.js)
|
|
319
369
|
const shouldInjectThinkingDisplay = !_thinkingDisplayRejectedPaths.has(claudePath)
|
|
320
370
|
&& process.env.CCV_SKIP_THINKING_DISPLAY !== '1';
|
|
321
371
|
|
|
@@ -337,55 +387,59 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
337
387
|
const userArgs = settingsMerge.args;
|
|
338
388
|
const finalExtraArgs = shouldInjectThinkingDisplay ? withDefaultThinkingDisplay(userArgs) : userArgs;
|
|
339
389
|
|
|
340
|
-
//
|
|
341
|
-
// --system-prompt-file / --append-system-prompt-file(
|
|
342
|
-
//
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
// IM
|
|
347
|
-
//
|
|
348
|
-
//
|
|
390
|
+
// When the launch dir has a non-empty CC_SYSTEM.md / CC_APPEND_SYSTEM.md, auto-append
|
|
391
|
+
// --system-prompt-file / --append-system-prompt-file (each independent; skipped if the
|
|
392
|
+
// user already passed the synonymous flag). Model customization: fuzzy-match against
|
|
393
|
+
// <cwd>/system_prompt/ and <LOG_DIR>/system_prompt/ using "the model used on the last
|
|
394
|
+
// launch"; a matched entry wholly replaces the two default sentinels above.
|
|
395
|
+
// Note: currentWorkspacePath is only assigned below, so the cwd param decides the launch
|
|
396
|
+
// dir here. Spawns inside LOG_DIR (IM worker working dir = <LOG_DIR>/IM_<id>/) skip model
|
|
397
|
+
// matching: the IM persona relies on the default sentinel CC_APPEND_SYSTEM.md injection,
|
|
398
|
+
// and a global model entry must not silently replace it. (spawnDir was already assigned
|
|
399
|
+
// at the settings merge above.) insideLogDir stays outside the try: the onExit boot
|
|
400
|
+
// fallback gating below also uses it.
|
|
349
401
|
const insideLogDir = spawnDir === LOG_DIR || spawnDir.startsWith(LOG_DIR + sep);
|
|
350
|
-
//
|
|
351
|
-
// buildSystemPromptFileArgs
|
|
352
|
-
//
|
|
353
|
-
//
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
//
|
|
402
|
+
// The whole system-prompt build + render pipeline is wrapped in try-catch (PR#128): any
|
|
403
|
+
// unexpected throw (model resolution, a buildSystemPromptFileArgs filesystem race, a
|
|
404
|
+
// render git-subprocess error) falls back to treating it as "no entry matched" — the
|
|
405
|
+
// launch carries no --system-prompt-file/--append-system-prompt-file and claude starts
|
|
406
|
+
// with its own default system prompt. An injection failure must never block the spawn.
|
|
407
|
+
let sysPrompt = { args: [], loaded: [], model: null, entries: [] };
|
|
408
|
+
// The skip-once token is consumed unconditionally BEFORE the pipeline (exactly-once
|
|
409
|
+
// semantics — a leftover token would silently skip the NEXT spawn's injection too).
|
|
357
410
|
const skipOnce = _skipInjectionOncePaths.delete(claudePath);
|
|
358
411
|
try {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
412
|
+
// The whole system-prompt pipeline (resume pin / fresh sentinel+model match /
|
|
413
|
+
// ${...} render / pending record for wire-side Bind A) lives in
|
|
414
|
+
// lib/launch-config.js, shared with the SDK link. PTY-side inputs here: the
|
|
415
|
+
// rejected-binary set + skip-once token (suppressInjection) and the test-seam
|
|
416
|
+
// model reader. settingsJson is always valid JSON (from mergeSettingsIntoArgs).
|
|
417
|
+
const r = resolveLaunchSystemPrompt({
|
|
418
|
+
spawnDir,
|
|
419
|
+
extraArgs: finalExtraArgs,
|
|
420
|
+
env: process.env,
|
|
421
|
+
launchSettings: JSON.parse(settingsJson),
|
|
422
|
+
modelReader: (d, e, o) => _spawnModelReader(d, e, resolveSpawnModel, o),
|
|
423
|
+
insideLogDir,
|
|
424
|
+
logDir: LOG_DIR,
|
|
425
|
+
suppressInjection: _systemPromptFileRejectedPaths.has(claudePath) || skipOnce,
|
|
363
426
|
});
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
// but the resolved model matched no entry (likely a misnamed file). Intentional
|
|
370
|
-
// skips (CCV_DISABLE_AUTO_SYSTEM_PROMPT=1, or a manual --system-prompt flag
|
|
371
|
-
// suppressing a matched entry) carry `suppressed` and stay quiet. The
|
|
372
|
-
// successful-injection notice is emitted below via emitSpawnNotice (with
|
|
373
|
-
// internal-restart suppression); no-modelId spawns are the normal quiet path.
|
|
374
|
-
console.warn(`[CC Viewer] model-specific prompt: modelId="${resolvedModelId}" resolved from active config but no matching entry found in workspace or global ${MODEL_PROMPT_DIR}/`);
|
|
427
|
+
sysPrompt = r.sysPrompt;
|
|
428
|
+
if (r.diagnostic === 'no-match') {
|
|
429
|
+
console.warn(`[CC Viewer] model-specific prompt: modelId="${r.resolvedModelId}" resolved from active config but no matching entry found in workspace or global ${MODEL_PROMPT_DIR}/`);
|
|
430
|
+
} else if (r.diagnostic === 'no-model') {
|
|
431
|
+
console.warn(`[CC Viewer] model-specific prompt: no model id resolved from active config (--settings / env / settings.json / proxy profile) — entries in ${MODEL_PROMPT_DIR}/ skipped for this launch`);
|
|
375
432
|
}
|
|
376
|
-
// Resolve `${...}` template variables in the injected files (editor stores them literal —
|
|
377
|
-
// the substitution documented by the editor's parameter reference happens here, at launch).
|
|
378
|
-
sysPrompt = renderSystemPromptFileArgs(sysPrompt, { cwd: spawnDir, modelId: resolvedModelId });
|
|
379
433
|
} catch (err) {
|
|
380
434
|
console.warn('[CC Viewer] system prompt build/render failed, launching without injected prompt:', err?.message || err);
|
|
381
|
-
sysPrompt = { args: [], loaded: [], model: null };
|
|
435
|
+
sysPrompt = { args: [], loaded: [], model: null, entries: [] };
|
|
382
436
|
}
|
|
383
437
|
const launchArgs = sysPrompt.args.length ? [...finalExtraArgs, ...sysPrompt.args] : finalExtraArgs;
|
|
384
438
|
|
|
385
439
|
let command = claudePath;
|
|
386
440
|
let args = ['--settings', settingsJson, ...launchArgs];
|
|
387
441
|
|
|
388
|
-
//
|
|
442
|
+
// If it is the npm version (cli.js), it must run under node
|
|
389
443
|
if (isNpmVersion && claudePath.endsWith('.js')) {
|
|
390
444
|
command = nodePath;
|
|
391
445
|
args = [claudePath, '--settings', settingsJson, ...launchArgs];
|
|
@@ -410,8 +464,10 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
410
464
|
// --allow-dangerously-skip-permissions only enables a later toggle, so it must NOT count.
|
|
411
465
|
ptySkipPermissions = extraArgs.includes('--dangerously-skip-permissions');
|
|
412
466
|
|
|
413
|
-
// PTY
|
|
414
|
-
//
|
|
467
|
+
// PTY event handlers must be registered immediately after spawn (PR#128): if the child
|
|
468
|
+
// exits before onExit is mounted (missing binary / instant crash / rejected injection
|
|
469
|
+
// flag), the exit event is lost — after the handle is released the event loop may drain.
|
|
470
|
+
// The injection notice is moved to after registration.
|
|
415
471
|
ptyProcess.onData((data) => {
|
|
416
472
|
outputBuffer += data;
|
|
417
473
|
if (outputBuffer.length > MAX_BUFFER) {
|
|
@@ -432,14 +488,17 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
432
488
|
ptyProcess = null;
|
|
433
489
|
ptyKind = null;
|
|
434
490
|
ptySkipPermissions = false;
|
|
435
|
-
//
|
|
436
|
-
//
|
|
491
|
+
// Boot-period death: an exit within the window after spawn. Any exit outside the window
|
|
492
|
+
// is never part of the "injection dragged the boot into a crash" fallback scope. A
|
|
493
|
+
// single _now() read (review): tiers 1/2 share the same instant, so the injected fake
|
|
494
|
+
// clock cannot diverge between branches.
|
|
437
495
|
const elapsedMs = _now() - spawnedAt;
|
|
438
496
|
const diedInBootWindow = elapsedMs < SYS_PROMPT_BOOT_WINDOW_MS;
|
|
439
497
|
|
|
440
498
|
// Auto-retry without -c/--continue if "No conversation found"
|
|
441
|
-
//
|
|
442
|
-
//
|
|
499
|
+
// Note: an early return skips the exitListeners broadcast below — the first failed pty's
|
|
500
|
+
// death is transparent to consumers. Once the new pty starts normally it reports its own
|
|
501
|
+
// state/exit. This keeps the frontend from seeing a spurious exit event.
|
|
443
502
|
const hasContinue = extraArgs.includes('-c') || extraArgs.includes('--continue');
|
|
444
503
|
if (hasContinue && exitCode !== 0 && outputBuffer.includes('No conversation found')) {
|
|
445
504
|
console.error('[CC Viewer] -c failed (no conversation), retrying without -c');
|
|
@@ -449,11 +508,13 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
449
508
|
return;
|
|
450
509
|
}
|
|
451
510
|
|
|
452
|
-
//
|
|
453
|
-
//
|
|
454
|
-
//
|
|
455
|
-
//
|
|
456
|
-
//
|
|
511
|
+
// Post-hoc fallback: if we injected --thinking-display and claude crashed with "unknown
|
|
512
|
+
// option", add that claudePath to the rejection set and restart once without the flag —
|
|
513
|
+
// this self-heals older claude / third-party CLI forks / GLM wrappers. Only triggers in
|
|
514
|
+
// the "we injected it" case: extraArgs lacks the flag but finalExtraArgs has it → it was
|
|
515
|
+
// injected; a crash from the user's own --thinking-display is left alone to avoid
|
|
516
|
+
// overriding user intent. Like the -c retry, an early return skips the exitListeners
|
|
517
|
+
// broadcast so the first spurious failure is transparent to consumers.
|
|
457
518
|
const weInjectedFlag = shouldInjectThinkingDisplay
|
|
458
519
|
&& !extraArgs.some(a => a === '--thinking-display' || (typeof a === 'string' && a.startsWith('--thinking-display=')));
|
|
459
520
|
const flagRejected = weInjectedFlag && exitCode !== 0
|
|
@@ -466,21 +527,33 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
466
527
|
return;
|
|
467
528
|
}
|
|
468
529
|
|
|
469
|
-
//
|
|
470
|
-
// (
|
|
471
|
-
//
|
|
472
|
-
//
|
|
473
|
-
//
|
|
474
|
-
//
|
|
475
|
-
//
|
|
476
|
-
//
|
|
477
|
-
//
|
|
478
|
-
//
|
|
479
|
-
//
|
|
480
|
-
//
|
|
481
|
-
//
|
|
482
|
-
//
|
|
483
|
-
//
|
|
530
|
+
// Post-hoc fallback tier 1: when a claude that had a system-prompt file injected dies
|
|
531
|
+
// abnormally, skip injection and restart once (aligned with the --thinking-display
|
|
532
|
+
// self-heal above; this confirmed branch must come first — with a user-supplied
|
|
533
|
+
// --thinking-display plus injection, this wastes at most one de-injection retry, then
|
|
534
|
+
// the second time broadcasts the real error). The two branches have **different
|
|
535
|
+
// persistence**:
|
|
536
|
+
// - exact branch (original semantics): output contains "unknown option
|
|
537
|
+
// --system-prompt-file" — confirms this binary does not support the flag (a stable
|
|
538
|
+
// capability signal) → write the permanent rejection set; heals in every scenario
|
|
539
|
+
// (including IM workers, which would otherwise never start).
|
|
540
|
+
// - relaxed branch (boot fallback): exit≠0 within the boot window — the injection
|
|
541
|
+
// **may** be what dragged the boot into a crash (or it may be an unrelated transient
|
|
542
|
+
// fault) → emit only a one-shot skip token, never write the permanent set (review
|
|
543
|
+
// P1: a single transient crash must not silently disable injection for the whole
|
|
544
|
+
// process lifetime). Gated by !signal (user Ctrl-C / closing a tab / switching
|
|
545
|
+
// workspace via killPtyTree are signal terminations, not boot crashes — blindly
|
|
546
|
+
// restarting would force-pull a session the user just closed; Windows ConPTY has no
|
|
547
|
+
// POSIX signal semantics — known limitation: Ctrl-C may cause one harmless extra
|
|
548
|
+
// retry) and !insideLogDir (an IM worker's "de-injection restart" = surviving after
|
|
549
|
+
// stripping the CC_APPEND_SYSTEM.md persona, which is harder to debug than a crash —
|
|
550
|
+
// an IM instant exit only broadcasts the real error).
|
|
551
|
+
// No infinite loop: on respawn the rejection set / token empties loaded → this branch
|
|
552
|
+
// no longer hits, retrying exactly once.
|
|
553
|
+
// Tier-1 retry only removes the injection, leaving the rest of the args as-is; when the
|
|
554
|
+
// root cause is something else (e.g. an expired API key), the first error already
|
|
555
|
+
// streamed into the terminal scrollback without loss, and the second death broadcasts
|
|
556
|
+
// as usual.
|
|
484
557
|
const unknownSysFileFlag = /unknown option ['"]--(append-)?system-prompt-file/i.test(outputBuffer);
|
|
485
558
|
const injectedBootCrash = !insideLogDir && !signal && diedInBootWindow;
|
|
486
559
|
const sysFileRejected = sysPrompt.loaded.length > 0 && exitCode !== 0
|
|
@@ -494,33 +567,51 @@ async function _spawnClaudeImpl(proxyPort, cwd, extraArgs = [], claudePath = nul
|
|
|
494
567
|
_skipInjectionOncePaths.add(claudePath);
|
|
495
568
|
}
|
|
496
569
|
_suppressNextSpawnNotice = true;
|
|
497
|
-
//
|
|
570
|
+
// Wording leaves room (review): a boot-period death may be unrelated to the injection
|
|
571
|
+
// (API key / network etc.); do not assert causation.
|
|
498
572
|
emitSpawnNotice(`[CC Viewer] claude exited during boot (code ${exitCode}); the injected system prompt may or may not be the cause — retrying once without ${sysPrompt.loaded.join(', ')}`);
|
|
499
573
|
spawnClaude(proxyPort, cwd, extraArgs, claudePath, isNpmVersion, serverPort, serverProtocol, internalToken);
|
|
500
574
|
return;
|
|
501
575
|
}
|
|
502
576
|
|
|
503
|
-
//
|
|
504
|
-
//
|
|
505
|
-
//
|
|
506
|
-
//
|
|
577
|
+
// Post-hoc fallback tier 2: injected and an instant exit with exit=0 — indistinguishable
|
|
578
|
+
// from "the user quickly /exits" (a frequent daily action), so it only prints a
|
|
579
|
+
// diagnostic, does not auto-restart, and does not touch the rejection set (auto-stop
|
|
580
|
+
// would silently disable injection based on usage habits; rejected in review). It also
|
|
581
|
+
// does not early-return — it broadcasts exit as usual, so the frontend exit-banner path
|
|
582
|
+
// is exactly the same as a normal user /exit.
|
|
583
|
+
// !insideLogDir: an IM worker's pty data stream may be relayed via the bridge, so the
|
|
584
|
+
// diagnostic line must not leak into the IM session (review).
|
|
507
585
|
if (sysPrompt.loaded.length > 0 && exitCode === 0 && diedInBootWindow && !insideLogDir) {
|
|
508
586
|
emitSpawnNotice(`[CC Viewer] claude exited ${Math.round(elapsedMs / 1000)}s after launch with an injected system prompt (${sysPrompt.loaded.join(', ')}). If this keeps happening the injected prompt may be incompatible — remove the entry or set CCV_DISABLE_AUTO_SYSTEM_PROMPT=1 to skip injection.`);
|
|
509
587
|
}
|
|
510
588
|
|
|
511
|
-
//
|
|
589
|
+
// Keep lastWorkspacePath (do not clear) for respawn
|
|
512
590
|
currentWorkspacePath = null;
|
|
513
591
|
for (const cb of exitListeners) {
|
|
514
592
|
try { cb(exitCode); } catch { }
|
|
515
593
|
}
|
|
516
594
|
});
|
|
517
595
|
|
|
518
|
-
//
|
|
519
|
-
//
|
|
520
|
-
|
|
596
|
+
// Print a notice line to the terminal when a system-prompt file was injected (visibility /
|
|
597
|
+
// security); suppressed on internal restarts to avoid repetition. Must be printed after
|
|
598
|
+
// onData/onExit are registered (PR#128) to shrink the window for losing the event when
|
|
599
|
+
// the child exits before the handlers are mounted.
|
|
600
|
+
if (sysPrompt.loaded.length && !sysPrompt.pinned && !_suppressNextSpawnNotice) {
|
|
521
601
|
const modelSuffix = sysPrompt.model ? ` (model match: ${sysPrompt.model})` : '';
|
|
522
602
|
emitSpawnNotice(`[CC Viewer] loaded ${sysPrompt.loaded.join(', ')} as system prompt${modelSuffix}`);
|
|
523
603
|
}
|
|
604
|
+
// Pin visibility: a snapshot hit re-injects verbatim; a no-record resume (F2)
|
|
605
|
+
// injects nothing — surfaced ONLY when injection is configured right now
|
|
606
|
+
// (noRecordNotice), otherwise the line would nag feature-less users on every -c.
|
|
607
|
+
// Mutually exclusive with the loaded notice above (the pinned path never prints it).
|
|
608
|
+
if (sysPrompt.pinned && !_suppressNextSpawnNotice) {
|
|
609
|
+
if (sysPrompt.noRecord) {
|
|
610
|
+
if (sysPrompt.noRecordNotice) emitSpawnNotice(`[CC Viewer] ${t('cli.systemPromptResumeNoSnapshot')}`);
|
|
611
|
+
} else if (sysPrompt.loaded.length) {
|
|
612
|
+
emitSpawnNotice(`[CC Viewer] ${t('cli.systemPromptPinned', { files: sysPrompt.loaded.join(', ') })}`);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
524
615
|
// Settings-merge failures surface via emitSpawnNotice too: console.warn only reaches
|
|
525
616
|
// the server stdout, invisible in the embedded terminal. Localized here (the console.warn
|
|
526
617
|
// above stays English for greppable server logs). Must be emitted after spawn — the
|
|
@@ -581,9 +672,11 @@ export function writeToPtySequential(chunks, onComplete, opts = {}) {
|
|
|
581
672
|
const chunk = chunks[idx];
|
|
582
673
|
idx++;
|
|
583
674
|
|
|
584
|
-
//
|
|
585
|
-
// pty.write
|
|
586
|
-
//
|
|
675
|
+
// Defensive depth (server.js's entry already validates every(string); this is the second
|
|
676
|
+
// line): a non-string chunk makes pty.write throw ERR_INVALID_ARG_TYPE, and the
|
|
677
|
+
// chunk.endsWith below would also throw — inside a setTimeout context with no try/catch
|
|
678
|
+
// that would become an uncaughtException that crashes the whole process. Uniformly catch
|
|
679
|
+
// it and report a failure.
|
|
587
680
|
if (typeof chunk !== 'string') {
|
|
588
681
|
cleanup();
|
|
589
682
|
if (onComplete) onComplete(false);
|
|
@@ -610,12 +703,12 @@ export function writeToPtySequential(chunks, onComplete, opts = {}) {
|
|
|
610
703
|
}
|
|
611
704
|
|
|
612
705
|
/**
|
|
613
|
-
*
|
|
614
|
-
*
|
|
706
|
+
* After the process exits, auto-spawn an interactive shell so the terminal becomes usable
|
|
707
|
+
* again. Returns true if spawned successfully, false if unnecessary or failed.
|
|
615
708
|
*/
|
|
616
709
|
export async function spawnShell() {
|
|
617
|
-
if (ptyProcess) return false; //
|
|
618
|
-
if (_spawnInflight) return _spawnInflight; //
|
|
710
|
+
if (ptyProcess) return false; // a process is already running
|
|
711
|
+
if (_spawnInflight) return _spawnInflight; // reuse the in-flight spawn to avoid double
|
|
619
712
|
const p = _spawnShellImpl();
|
|
620
713
|
_spawnInflight = p;
|
|
621
714
|
try { return await p; } finally { if (_spawnInflight === p) _spawnInflight = null; }
|
|
@@ -635,16 +728,18 @@ async function _spawnShellImpl() {
|
|
|
635
728
|
|
|
636
729
|
// Clean env: remove cc-viewer specific vars so child shells don't inherit them
|
|
637
730
|
// (prevents CCVIEWER_PORT/CCVIEWER_PROTOCOL leaking to non-cc-viewer Claude instances;
|
|
638
|
-
// 115c48b
|
|
731
|
+
// 115c48b added CCVIEWER_PROTOCOL but only updated spawnClaude; aligning here)
|
|
639
732
|
const shellEnv = { ...process.env };
|
|
640
733
|
delete shellEnv.CCVIEWER_PORT;
|
|
641
734
|
delete shellEnv.CCV_EDITOR_PORT;
|
|
642
735
|
delete shellEnv.CCVIEWER_PROTOCOL;
|
|
643
736
|
delete shellEnv.CCVIEWER_INTERNAL_TOKEN;
|
|
644
|
-
//
|
|
737
|
+
// Also disable the mouse for claude typed by hand in the interactive shell; same reason
|
|
738
|
+
// as spawnClaude.
|
|
645
739
|
shellEnv.CLAUDE_CODE_DISABLE_MOUSE ??= '1';
|
|
646
|
-
//
|
|
647
|
-
// CCV_KEEP_CLAUDE_FULLSCREEN=1
|
|
740
|
+
// By default let a hand-typed claude in the shell also return to classic streaming render
|
|
741
|
+
// (scrollable history); same reason as spawnClaude; CCV_KEEP_CLAUDE_FULLSCREEN=1 can opt
|
|
742
|
+
// out.
|
|
648
743
|
applyClaudeAltScreenPref(shellEnv);
|
|
649
744
|
const shellSpawn = prepareEmbeddedShellSpawn(shell, shellEnv);
|
|
650
745
|
|
|
@@ -687,9 +782,11 @@ async function _spawnShellImpl() {
|
|
|
687
782
|
return true;
|
|
688
783
|
}
|
|
689
784
|
|
|
690
|
-
// cols/rows
|
|
691
|
-
// NaN/0
|
|
692
|
-
//
|
|
785
|
+
// cols/rows clamped to finite positive integers: FitAddon computes 2×1 in a 0-size
|
|
786
|
+
// container, and a malformed client may send NaN/0/negative — storing those unvalidated
|
|
787
|
+
// into lastPtyCols/Rows would poison a later pty.spawn (cols:NaN throws, spawnShell's
|
|
788
|
+
// exception is swallowed → the terminal never comes up, with no log). Non-finite values
|
|
789
|
+
// fall back to the last valid value.
|
|
693
790
|
function _clampDim(v, min, max, fallback) {
|
|
694
791
|
const n = Math.floor(Number(v));
|
|
695
792
|
if (!Number.isFinite(n)) return fallback;
|
|
@@ -709,11 +806,12 @@ export function killPty() {
|
|
|
709
806
|
flushBatch(true);
|
|
710
807
|
batchBuffer = '';
|
|
711
808
|
batchScheduled = false;
|
|
712
|
-
// Windows
|
|
713
|
-
//
|
|
714
|
-
//
|
|
715
|
-
//
|
|
716
|
-
//
|
|
809
|
+
// Windows: node-pty's ConPTY kill has a known synchronous-hang issue
|
|
810
|
+
// (microsoft/node-pty#454); a hang would also take down the Ctrl+C exit-chain watchdog.
|
|
811
|
+
// Instead use spawnSync taskkill /T /F to reap the whole process tree (ConPTY agent +
|
|
812
|
+
// claude), bounded (timeout 2s) and providing "dead on return" semantics (which
|
|
813
|
+
// spawnClaude's internal kill→respawn and workspaces stop→launch rely on). ptyProcess
|
|
814
|
+
// .kill() is fully skipped on win32. Non-Windows behavior is unchanged.
|
|
717
815
|
if (!killPtyTree(ptyProcess.pid)) {
|
|
718
816
|
try { ptyProcess.kill(); } catch { }
|
|
719
817
|
}
|