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,44 +1,57 @@
|
|
|
1
|
-
//
|
|
2
|
-
// ChatView
|
|
3
|
-
// MainAgent / Teammate
|
|
1
|
+
// Content classification and filtering rules.
|
|
2
|
+
// ChatView (chat mode) and AppHeader (user Prompt popup) share this module so the
|
|
3
|
+
// filtering logic stays consistent. MainAgent / Teammate detection also converges here for
|
|
4
|
+
// unified global use.
|
|
4
5
|
|
|
5
|
-
// ==============
|
|
6
|
+
// ============== request body helpers ==============
|
|
6
7
|
|
|
7
8
|
const SUBAGENT_SYSTEM_RE = /command execution specialist|file search specialist|planning specialist|general-purpose agent|security monitor|performing a web search/i;
|
|
8
9
|
|
|
9
|
-
// cc_version 2.1.181
|
|
10
|
-
//
|
|
11
|
-
//
|
|
10
|
+
// cc_version 2.1.181+: the CLI marks subagents explicitly in the billing header
|
|
11
|
+
// (cc_is_subagent=true); a true main agent omits this field (never =false). Such subagents
|
|
12
|
+
// inherit the full "You are Claude Code" prompt plus Edit/Bash/Agent tools, so they would
|
|
13
|
+
// trip the lightweight MainAgent heuristic — hence the explicit exclusion.
|
|
14
|
+
// Trailing \b anchor: only matches `=true` (followed by `;` / whitespace / end of string),
|
|
15
|
+
// avoiding false matches like `=truex`.
|
|
12
16
|
const SUBAGENT_BILLING_RE = /cc_is_subagent=true\b/;
|
|
13
17
|
|
|
14
|
-
// Teammate
|
|
18
|
+
// Teammate detection: system prompt contains the Agent Teammate Communication marker
|
|
19
|
+
// (external-process teammate)
|
|
15
20
|
const TEAMMATE_SYSTEM_RE = /running as an agent in a team|Agent Teammate Communication/i;
|
|
16
21
|
|
|
17
|
-
// Native teammate
|
|
22
|
+
// Native teammate detection (in-process Agent subagent); separate module for version
|
|
23
|
+
// compatibility
|
|
18
24
|
// Extensioned for server-side reuse (see requestType.js header note).
|
|
19
25
|
import { isNativeTeammate, extractNativeTeammateName } from './teammateDetector.js';
|
|
20
26
|
|
|
21
|
-
// ==============
|
|
22
|
-
// harness
|
|
23
|
-
//
|
|
24
|
-
//
|
|
27
|
+
// ============== cross-session / teammate "protocol notification" detection ==============
|
|
28
|
+
// The harness injects cross-session / teammate notifications into the main session as
|
|
29
|
+
// role=user text. Existing logic only recognized the <teammate-message> wrapper and the
|
|
30
|
+
// "Another Claude session sent a message:" prefix; this adds the "bare protocol JSON" form
|
|
31
|
+
// plus the newer caveat wording, classifying both as teammate status bubbles (not
|
|
32
|
+
// user-typed input). The type whitelist matches ChatMessage's ui.teammate.${type}
|
|
33
|
+
// rendering.
|
|
25
34
|
export const INTER_SESSION_NOTIFICATION_TYPES = new Set([
|
|
26
35
|
'idle_notification', 'shutdown_request', 'shutdown_response',
|
|
27
36
|
'shutdown_approved', 'teammate_terminated',
|
|
28
37
|
'plan_approval_request', 'plan_approval_response',
|
|
29
38
|
]);
|
|
30
39
|
|
|
31
|
-
// harness
|
|
40
|
+
// The harness-injected "cross-session wrapped text" marker (fixed English wording).
|
|
32
41
|
const INTER_SESSION_LEAD_RE = /^Another Claude session sent a message:/i;
|
|
33
|
-
//
|
|
34
|
-
//
|
|
42
|
+
// Trailing caveat (both old and new wordings). Deliberately not using /m: `(^|\n)` anchors
|
|
43
|
+
// at the start of a line and `$` marks the whole-string end — a multi-line caveat is
|
|
44
|
+
// stripped all the way to a blank line / end of string, not just the first line as lazy +
|
|
45
|
+
// /m would; the line-start anchor avoids stripping mid-body user quotes of this sentence.
|
|
35
46
|
const INTER_SESSION_CAVEAT_RES = [
|
|
36
47
|
/(^|\n)This came from another Claude session[\s\S]*?(?=\n\n|$)/i,
|
|
37
48
|
/(^|\n)IMPORTANT: This is NOT from your user[\s\S]*?(?=\n\n|$)/i,
|
|
38
49
|
];
|
|
39
50
|
|
|
40
|
-
//
|
|
41
|
-
//
|
|
51
|
+
// Braces-pairing scan to find top-level {...} candidate JSON segments (skipping braces
|
|
52
|
+
// inside string literals / escapes), returning { raw, start, end } ranges for the caller to
|
|
53
|
+
// strip in one pass (not one replace each, avoiding O(n²)). Pairing is used instead of a
|
|
54
|
+
// [^{}]* regex to correctly handle nesting.
|
|
42
55
|
function scanTopLevelJsonObjects(s) {
|
|
43
56
|
if (typeof s !== 'string' || s.indexOf('{') === -1) return [];
|
|
44
57
|
const out = [];
|
|
@@ -58,9 +71,11 @@ function scanTopLevelJsonObjects(s) {
|
|
|
58
71
|
return out;
|
|
59
72
|
}
|
|
60
73
|
|
|
61
|
-
//
|
|
62
|
-
//
|
|
63
|
-
//
|
|
74
|
+
// Identify whitelisted protocol-notification JSON in s, returning { statuses:[{type,from}],
|
|
75
|
+
// rest }, where rest = the remaining text after those JSON segments are removed. A single
|
|
76
|
+
// scan + range splicing (O(n)) avoids the O(n²) of a whole-string replace per hit (review
|
|
77
|
+
// S1) and unifies the two former replace/split-join strip implementations. Non-whitelisted
|
|
78
|
+
// or parse-failed {...} segments are kept as-is in rest.
|
|
64
79
|
function extractProtocolNotifications(s) {
|
|
65
80
|
const statuses = [];
|
|
66
81
|
let rest = '', cursor = 0;
|
|
@@ -77,13 +92,16 @@ function extractProtocolNotifications(s) {
|
|
|
77
92
|
return { statuses, rest };
|
|
78
93
|
}
|
|
79
94
|
|
|
80
|
-
//
|
|
81
|
-
//
|
|
95
|
+
// Parse a "bare protocol notification" text block (no <teammate-message> wrapper — the
|
|
96
|
+
// wrapped form is handled by the classifyUserContent main path). Returns
|
|
97
|
+
// { statuses:[{type,from}], rest } or null. It is only recognized as a notification if it
|
|
98
|
+
// carries a harness marker (lead / caveat) — see below.
|
|
82
99
|
export function parseInterSessionNotification(text) {
|
|
83
100
|
if (typeof text !== 'string') return null;
|
|
84
101
|
let body = text.trim();
|
|
85
102
|
if (!body) return null;
|
|
86
|
-
//
|
|
103
|
+
// Strip the <teammate-message> wrapper to avoid double counting with the
|
|
104
|
+
// classifyUserContent main path
|
|
87
105
|
body = body.replace(/<teammate-message[\s\S]*?<\/teammate-message>/gi, '').trim();
|
|
88
106
|
if (!body) return null;
|
|
89
107
|
|
|
@@ -93,9 +111,12 @@ export function parseInterSessionNotification(text) {
|
|
|
93
111
|
for (const cr of INTER_SESSION_CAVEAT_RES) {
|
|
94
112
|
if (cr.test(work)) { hadCaveat = true; work = work.replace(cr, ''); }
|
|
95
113
|
}
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
114
|
+
// Only recognized as a notification if it carries a harness marker (the "Another Claude
|
|
115
|
+
// session…" lead or a caveat segment). A real cross-session notification always has one
|
|
116
|
+
// of them (the bare <teammate-message> wrapper is handled separately by the
|
|
117
|
+
// classifyUserContent main path); accordingly, a user pasting a chunk of protocol-like
|
|
118
|
+
// JSON is never misclassified as hidden — fully removing the over-filter vector (review
|
|
119
|
+
// S2/F2, aligning with the user's "don't filter normal requests" request).
|
|
99
120
|
if (!hadLead && !hadCaveat) return null;
|
|
100
121
|
|
|
101
122
|
const { statuses, rest } = extractProtocolNotifications(work);
|
|
@@ -104,7 +125,7 @@ export function parseInterSessionNotification(text) {
|
|
|
104
125
|
}
|
|
105
126
|
|
|
106
127
|
/**
|
|
107
|
-
*
|
|
128
|
+
* Extract the system prompt text from a request body
|
|
108
129
|
*/
|
|
109
130
|
export function getSystemText(body) {
|
|
110
131
|
const system = body?.system;
|
|
@@ -119,20 +140,23 @@ export function getSystemText(body) {
|
|
|
119
140
|
const _isTeammateCache = new WeakMap();
|
|
120
141
|
|
|
121
142
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
143
|
+
* Determine whether a request comes from a Teammate subprocess.
|
|
144
|
+
* Supports two detection modes: interceptor mode (req.teammate field) and proxy mode
|
|
145
|
+
* (system prompt marker). The single global entry point, alongside isMainAgent.
|
|
125
146
|
*/
|
|
126
147
|
export function isTeammate(req) {
|
|
127
148
|
if (!req) return false;
|
|
128
149
|
const cached = _isTeammateCache.get(req);
|
|
129
150
|
if (cached !== undefined) return cached;
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
//
|
|
134
|
-
// -
|
|
135
|
-
// -
|
|
151
|
+
// [Highest priority] wire agent identity signals (x-claude-code-agent-id /
|
|
152
|
+
// cc_is_subagent, see agent-id.js). Since Claude Code 2.1.199 ordinary subagents are
|
|
153
|
+
// also granted the SendMessage tool, so isNativeTeammate's SendMessage criterion is no
|
|
154
|
+
// longer reliable — these two signals are hard criteria:
|
|
155
|
+
// - persistent named agent form (name@session-…) → always a Teammate;
|
|
156
|
+
// - persistent anonymous hex form → always a SubAgent (overrides the SendMessage
|
|
157
|
+
// criterion below);
|
|
158
|
+
// - cc_is_subagent=true (CLI self-reported billing marker, 2.1.181+) → always a
|
|
159
|
+
// SubAgent.
|
|
136
160
|
const agent = req.agent;
|
|
137
161
|
if (agent) {
|
|
138
162
|
if (agent.named) { _isTeammateCache.set(req, true); return true; }
|
|
@@ -140,20 +164,22 @@ export function isTeammate(req) {
|
|
|
140
164
|
}
|
|
141
165
|
const sysText = getSystemText(req.body || {});
|
|
142
166
|
if (SUBAGENT_BILLING_RE.test(sysText)) { _isTeammateCache.set(req, false); return false; }
|
|
143
|
-
// interceptor
|
|
167
|
+
// interceptor mode: teammate field written via process.argv
|
|
144
168
|
if (req.teammate) { _isTeammateCache.set(req, true); return true; }
|
|
145
|
-
// native teammate
|
|
169
|
+
// native teammate: in-process Agent subagent (system prompt contains "You are a Claude
|
|
170
|
+
// agent")
|
|
146
171
|
if (isNativeTeammate(req)) {
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
//
|
|
172
|
+
// Inject the teammate field for downstream requestType.js formatTeammateLabel use.
|
|
173
|
+
// The persistent wire agent name (x-claude-code-agent-id, see agent-id.js) takes
|
|
174
|
+
// priority — it does not depend on the in-window registry, so the name stays reliable
|
|
175
|
+
// on cold load / timing gaps.
|
|
150
176
|
if (!req.teammate) {
|
|
151
177
|
req.teammate = req.agent?.agentName || extractNativeTeammateName(req) || null;
|
|
152
178
|
}
|
|
153
179
|
_isTeammateCache.set(req, true);
|
|
154
180
|
return true;
|
|
155
181
|
}
|
|
156
|
-
// proxy
|
|
182
|
+
// proxy mode: detect via system prompt (external-process teammate)
|
|
157
183
|
const result = TEAMMATE_SYSTEM_RE.test(sysText);
|
|
158
184
|
_isTeammateCache.set(req, result);
|
|
159
185
|
return result;
|
|
@@ -163,8 +189,9 @@ export function isTeammate(req) {
|
|
|
163
189
|
const _isMainAgentCache = new WeakMap();
|
|
164
190
|
|
|
165
191
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
192
|
+
* Determine whether a request is a MainAgent request.
|
|
193
|
+
* Combines interceptor-marker validation + old/new architecture detection; the single
|
|
194
|
+
* global entry point.
|
|
168
195
|
*/
|
|
169
196
|
export function isMainAgent(req) {
|
|
170
197
|
if (!req) return false;
|
|
@@ -178,38 +205,42 @@ export function isMainAgent(req) {
|
|
|
178
205
|
function _isMainAgentImpl(req) {
|
|
179
206
|
if (!req) return false;
|
|
180
207
|
|
|
181
|
-
// Teammate
|
|
208
|
+
// A Teammate subprocess request is not a MainAgent, avoiding pollution of the main
|
|
209
|
+
// session view
|
|
182
210
|
if (isTeammate(req)) return false;
|
|
183
211
|
|
|
184
|
-
// cc_is_subagent=true ⇒
|
|
185
|
-
//
|
|
212
|
+
// cc_is_subagent=true ⇒ subagent, never a MainAgent (cc_version 2.1.181+). Must precede
|
|
213
|
+
// the req.mainAgent short-circuit below to cover on-disk old logs whose records were
|
|
214
|
+
// tagged mainAgent=true by the server (backward compat: old logs / true main agents do
|
|
215
|
+
// not carry this token).
|
|
186
216
|
if (SUBAGENT_BILLING_RE.test(getSystemText(req.body || {}))) return false;
|
|
187
217
|
|
|
188
218
|
if (req.mainAgent) {
|
|
189
|
-
//
|
|
219
|
+
// Exclude SubAgents that were mis-tagged (old-log compatibility)
|
|
190
220
|
const sysText = getSystemText(req.body || {});
|
|
191
221
|
if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
|
|
192
222
|
return true;
|
|
193
223
|
}
|
|
194
224
|
|
|
195
|
-
//
|
|
225
|
+
// Unified detection logic: supports old and new architectures
|
|
196
226
|
const body = req.body || {};
|
|
197
227
|
if (!body.system || !Array.isArray(body.tools)) return false;
|
|
198
228
|
|
|
199
229
|
const sysText = getSystemText(body);
|
|
200
230
|
|
|
201
|
-
//
|
|
202
|
-
|
|
231
|
+
// Must contain a MainAgent identity marker (SDK-mode base prompt includes "built on
|
|
232
|
+
// Anthropic's Claude Agent SDK.")
|
|
233
|
+
if (!sysText.includes('You are Claude Code') && !sysText.includes("built on Anthropic's Claude Agent SDK")) return false;
|
|
203
234
|
|
|
204
|
-
//
|
|
235
|
+
// Exclude SubAgents
|
|
205
236
|
if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
|
|
206
237
|
|
|
207
|
-
//
|
|
238
|
+
// New architecture detection (v2.1.69+): deferred tool loading
|
|
208
239
|
const isSystemArray = Array.isArray(body.system);
|
|
209
240
|
const hasToolSearch = body.tools.some(t => t.name === 'ToolSearch');
|
|
210
241
|
|
|
211
242
|
if (isSystemArray && hasToolSearch) {
|
|
212
|
-
//
|
|
243
|
+
// Check whether the first message contains <available-deferred-tools>
|
|
213
244
|
const messages = body.messages || [];
|
|
214
245
|
const firstMsgContent = messages.length > 0 ?
|
|
215
246
|
(typeof messages[0].content === 'string' ? messages[0].content :
|
|
@@ -219,7 +250,8 @@ function _isMainAgentImpl(req) {
|
|
|
219
250
|
}
|
|
220
251
|
}
|
|
221
252
|
|
|
222
|
-
// v2.1.81+:
|
|
253
|
+
// v2.1.81+: a lightweight MainAgent initial request may have < 10 tools; lower the
|
|
254
|
+
// threshold for compatibility
|
|
223
255
|
if (body.tools.length > 5) {
|
|
224
256
|
const hasEdit = body.tools.some(t => t.name === 'Edit');
|
|
225
257
|
const hasShell = body.tools.some(t => t.name === 'Bash' || t.name === 'PowerShell');
|
|
@@ -232,13 +264,14 @@ function _isMainAgentImpl(req) {
|
|
|
232
264
|
return false;
|
|
233
265
|
}
|
|
234
266
|
|
|
235
|
-
// /clear checkpoint
|
|
267
|
+
// /clear checkpoint detection: extracted into a standalone dependency-free module so it can
|
|
268
|
+
// be imported directly by node --test.
|
|
236
269
|
export { isPostClearCheckpoint, isCompactContinuation, isSessionBoundary } from './clearCheckpoint.js';
|
|
237
270
|
|
|
238
|
-
// ==============
|
|
271
|
+
// ============== text content filtering ==============
|
|
239
272
|
|
|
240
273
|
/**
|
|
241
|
-
*
|
|
274
|
+
* Determine whether text is Skill-loading content
|
|
242
275
|
*/
|
|
243
276
|
export function isSkillText(text) {
|
|
244
277
|
if (!text) return false;
|
|
@@ -246,7 +279,7 @@ export function isSkillText(text) {
|
|
|
246
279
|
}
|
|
247
280
|
|
|
248
281
|
/**
|
|
249
|
-
*
|
|
282
|
+
* Determine whether text is system-injected text (should not be shown as a user message)
|
|
250
283
|
*/
|
|
251
284
|
/**
|
|
252
285
|
* Strip known system/command tags from a text block, returning only user-authored content.
|
|
@@ -263,24 +296,32 @@ function stripSystemTags(text) {
|
|
|
263
296
|
.replace(/<command-args>[\s\S]*?<\/command-args>/gi, '')
|
|
264
297
|
.replace(/<teammate-message[\s\S]*?<\/teammate-message>/gi, '')
|
|
265
298
|
.replace(/<task-notification>[\s\S]*?<\/task-notification>/gi, '')
|
|
266
|
-
// harness
|
|
267
|
-
//
|
|
268
|
-
//
|
|
299
|
+
// harness-injected wrapper text for a teammate-message round: leading line + trailing
|
|
300
|
+
// IMPORTANT disclaimer segment. The trailing segment uses ^...m multiline anchoring —
|
|
301
|
+
// a paragraph must start at a line to be stripped, so mid-body user quotes of the
|
|
302
|
+
// sentence are unaffected; only the opening phrase is anchored, not the dash/wording
|
|
303
|
+
// after it (harness punctuation tweaks must not leak the trailing segment into a user
|
|
304
|
+
// bubble)
|
|
269
305
|
.replace(/^Another Claude session sent a message:\s*/i, '')
|
|
270
306
|
.replace(/^IMPORTANT: This is NOT from your user\b[\s\S]*?(?=\n\n|$)/im, '');
|
|
271
|
-
//
|
|
307
|
+
// Newer cross-session caveat (multi-line safe: line-start anchored, stripped to a blank
|
|
308
|
+
// line / end of string)
|
|
272
309
|
out = out.replace(/(^|\n)This came from another Claude session[\s\S]*?(?=\n\n|$)/i, '');
|
|
273
|
-
//
|
|
274
|
-
//
|
|
310
|
+
// Bare protocol-notification JSON (idle / shutdown_* / teammate_terminated /
|
|
311
|
+
// plan_approval_*, including nesting) — stripped in a single scan (O(n), review S1).
|
|
312
|
+
// Same kind as the protocol JSON in a <teammate-message> wrapper; after stripping, the
|
|
313
|
+
// second pass recovers only the user-appended body (empty if none)
|
|
275
314
|
out = extractProtocolNotifications(out).rest;
|
|
276
315
|
return out.trim();
|
|
277
316
|
}
|
|
278
317
|
|
|
279
|
-
// Claude Code
|
|
280
|
-
//
|
|
281
|
-
//
|
|
282
|
-
//
|
|
283
|
-
//
|
|
318
|
+
// Claude Code internal synthetic-prompt whitelist (recap/title/compact/topic/summary
|
|
319
|
+
// queries the CLI synthesizes in the main session — role=user over HTTP but not
|
|
320
|
+
// user-typed). Shares the same whitelist as requestType.js's Synthetic classification and
|
|
321
|
+
// is filtered uniformly in isSystemText → hidden across ChatView / Mobile / DetailPanel /
|
|
322
|
+
// teamModalBuilder. Matches the start of the last user message (`^` anchor + trim) to avoid
|
|
323
|
+
// harming user-quoted originals.
|
|
324
|
+
// KEEP IN SYNC: packages/core/test/synthetic-classification.test.js has an inline copy.
|
|
284
325
|
export const SYNTHETIC_PROMPTS = [
|
|
285
326
|
{ subType: 'Recap', pattern: /^The user stepped away and is coming back\. Recap in under/i },
|
|
286
327
|
{ subType: 'Title', pattern: /^(Based on the above conversation, generate a|Please write a)\s+(short|concise)\s+title/i },
|
|
@@ -299,12 +340,14 @@ export function isSyntheticPromptText(text) {
|
|
|
299
340
|
return false;
|
|
300
341
|
}
|
|
301
342
|
|
|
302
|
-
// UltraPlan
|
|
303
|
-
//
|
|
304
|
-
//
|
|
305
|
-
// stripSystemTags
|
|
306
|
-
//
|
|
307
|
-
//
|
|
343
|
+
// UltraPlan input detection: UltraPlanModal / the CLI /ultraplan both prepend the
|
|
344
|
+
// <system-reminder>[SCOPED INSTRUCTION]…</system-reminder> template assembled by
|
|
345
|
+
// ultraplanTemplates.js to the user prompt. Only ultraplanTemplates.js produces this
|
|
346
|
+
// marker, so it is a reliable "this round is UltraPlan input" signal. stripSystemTags would
|
|
347
|
+
// strip the block, so detection must run on the raw (unstripped) text; a negative
|
|
348
|
+
// lookahead ensures the marker sits inside the same <system-reminder>…</system-reminder>
|
|
349
|
+
// block (without crossing the closing tag), avoiding a false positive when the user body
|
|
350
|
+
// merely "mentions" the phrase after some unrelated reminder.
|
|
308
351
|
export function isUltraplanText(text) {
|
|
309
352
|
if (!text || typeof text !== 'string') return false;
|
|
310
353
|
return /<system-reminder>(?:(?!<\/system-reminder>)[\s\S])*?\[SCOPED INSTRUCTION\]/i.test(text);
|
|
@@ -314,53 +357,66 @@ export function isSystemText(text) {
|
|
|
314
357
|
if (!text) return true;
|
|
315
358
|
const trimmed = text.trim();
|
|
316
359
|
if (!trimmed) return true;
|
|
317
|
-
//
|
|
360
|
+
// A text block containing plan content should not be filtered (even with system tags at
|
|
361
|
+
// the start)
|
|
318
362
|
if (/Implement the following plan:/i.test(trimmed)) return false;
|
|
319
363
|
if (/^<[a-zA-Z_][\w-]*[\s>]/i.test(trimmed)) return true;
|
|
320
364
|
if (/^\[SUGGESTION MODE:/i.test(trimmed)) return true;
|
|
321
|
-
// Claude Code
|
|
365
|
+
// System message injected when Claude Code truncates its output
|
|
322
366
|
if (/^Your response was cut off because it exceeded the output token limit/i.test(trimmed)) return true;
|
|
323
|
-
// Skill
|
|
367
|
+
// Skill-loaded document content
|
|
324
368
|
if (/^Base directory for this skill:/i.test(trimmed)) return true;
|
|
325
|
-
// CLI
|
|
369
|
+
// CLI-internal synthetic prompts (Recap/Title/Compact/Topic/Summary)
|
|
326
370
|
if (isSyntheticPromptText(trimmed)) return true;
|
|
327
|
-
// harness
|
|
328
|
-
// teammate
|
|
371
|
+
// harness-injected teammate-message round: the wrapped text (lead + trailing IMPORTANT
|
|
372
|
+
// segment) is not user-typed; the teammate content itself is extracted by
|
|
373
|
+
// classifyUserContent into teammateBlocks and rendered separately
|
|
329
374
|
if (/^Another Claude session sent a message:/i.test(trimmed)) return true;
|
|
330
|
-
//
|
|
331
|
-
//
|
|
332
|
-
//
|
|
333
|
-
//
|
|
375
|
+
// Bare protocol notification (starts directly with protocol JSON, no "Another Claude
|
|
376
|
+
// session" lead): only counted as system text when parseInterSessionNotification matches
|
|
377
|
+
// whitelisted protocol JSON — pasted non-protocol JSON / bodies with appended text are
|
|
378
|
+
// not swallowed. The caveat is trailing chrome (the real form always has JSON first,
|
|
379
|
+
// caveat after), so a block that "starts with a caveat" is treated as user body to
|
|
380
|
+
// prevent the whole block from disappearing (review F1); its caveat chrome is handled by
|
|
381
|
+
// parse / stripSystemTags within blocks confirmed as notifications.
|
|
334
382
|
if (trimmed.startsWith('{') && parseInterSessionNotification(trimmed)) return true;
|
|
335
|
-
//
|
|
336
|
-
//
|
|
383
|
+
// Placeholder user message the CLI injects when the user rejects a tool / interrupts
|
|
384
|
+
// Claude — semantically duplicates the "✗ rejected" badge above. Covers the historical
|
|
385
|
+
// variants: "[Request interrupted by user for tool use]", "[Request interrupted by
|
|
386
|
+
// user]", "[Request interrupted...]"
|
|
337
387
|
if (/^\[Request interrupted/i.test(trimmed)) return true;
|
|
338
388
|
return false;
|
|
339
389
|
}
|
|
340
390
|
|
|
341
|
-
//
|
|
342
|
-
//
|
|
343
|
-
//
|
|
344
|
-
//
|
|
345
|
-
//
|
|
346
|
-
//
|
|
347
|
-
//
|
|
391
|
+
// The "displayable body" of a string-typed user/assistant message. Faithfully mirrors the
|
|
392
|
+
// two-pass semantics of classifyUserContent (its "first filter + stripSystemTags second
|
|
393
|
+
// recovery" steps), but operating on a string:
|
|
394
|
+
// Pass1: non-system text → returned as-is (preserving paired tags quoted mid-body by the
|
|
395
|
+
// user, word-for-word identical to current behavior, zero regression);
|
|
396
|
+
// Pass2: system blocks (judged true by isSystemText, e.g. starting with chrome tags) →
|
|
397
|
+
// strip known chrome, then re-judge; return the stripped body if it is still real
|
|
398
|
+
// body, otherwise '' (should be hidden).
|
|
399
|
+
// Fixes the case where a "system-tag-prefixed + real body" string was fully swallowed by
|
|
400
|
+
// isSystemText (the array path had this recovery; the string path previously did not).
|
|
401
|
+
// Note: a user-typed unclosed <system-reminder> (no pairing) is still judged system text
|
|
402
|
+
// and hidden — that current behavior is preserved; this function does not change it.
|
|
348
403
|
export function extractDisplayText(str) {
|
|
349
404
|
if (typeof str !== 'string' || !str.trim()) return '';
|
|
350
|
-
if (!isSystemText(str)) return str; // Pass1
|
|
351
|
-
const recovered = stripSystemTags(str); // Pass2
|
|
405
|
+
if (!isSystemText(str)) return str; // Pass1: already user text, as-is
|
|
406
|
+
const recovered = stripSystemTags(str); // Pass2: second-pass recovery
|
|
352
407
|
return (recovered && !isSystemText(recovered)) ? recovered : '';
|
|
353
408
|
}
|
|
354
409
|
|
|
355
410
|
/**
|
|
356
|
-
*
|
|
357
|
-
* @param {Array} content — message.content
|
|
411
|
+
* Classify and extract the various text blocks from a user message's content array.
|
|
412
|
+
* @param {Array} content — the message.content array
|
|
358
413
|
* @returns {{ commands: string[], textBlocks: Array, skillBlocks: Array, teammateBlocks: Array, taskNotificationBlocks: Array }}
|
|
359
|
-
* commands —
|
|
360
|
-
* textBlocks —
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
414
|
+
* commands — extracted slash command names (e.g. "/clear")
|
|
415
|
+
* textBlocks — filtered plain user text blocks (no system text, command
|
|
416
|
+
* blocks, or skill blocks)
|
|
417
|
+
* skillBlocks — skill-loaded text blocks
|
|
418
|
+
* teammateBlocks — parsed teammate-message blocks
|
|
419
|
+
* taskNotificationBlocks — parsed task-notification blocks
|
|
364
420
|
*/
|
|
365
421
|
export function classifyUserContent(content) {
|
|
366
422
|
if (!Array.isArray(content)) return { commands: [], textBlocks: [], skillBlocks: [], teammateBlocks: [], taskNotificationBlocks: [] };
|
|
@@ -401,17 +457,22 @@ export function classifyUserContent(content) {
|
|
|
401
457
|
}
|
|
402
458
|
}
|
|
403
459
|
|
|
404
|
-
//
|
|
405
|
-
// plan_approval_*
|
|
406
|
-
//
|
|
460
|
+
// Bare protocol notification (not wrapped in <teammate-message>): harness-injected idle /
|
|
461
|
+
// shutdown_* / teammate_terminated / plan_approval_* etc., extracted as teammate status
|
|
462
|
+
// bubbles (rendered the same as the wrapped form). Deduped by status|from to avoid a
|
|
463
|
+
// duplicate bubble alongside the wrapped form in the extreme case where one block has
|
|
464
|
+
// both a wrapper and bare JSON.
|
|
407
465
|
const seenStatus = new Set(teammateBlocks.filter(t => t.status).map(t => `${t.status}|${t.statusFrom}`));
|
|
408
466
|
for (const b of content) {
|
|
409
467
|
if (b.type !== 'text') continue;
|
|
410
468
|
const txt = b.text || '';
|
|
411
|
-
if (!txt.includes('"type"')) continue; //
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
469
|
+
if (!txt.includes('"type"')) continue; // cheap early exit: a protocol notification must
|
|
470
|
+
// contain JSON's "type"
|
|
471
|
+
// Only emit a status bubble for blocks that "start with a notification" (aligned with
|
|
472
|
+
// isSystemText's hide condition: lead prefix or bare-JSON start). A user quoting /
|
|
473
|
+
// reposting a whole notification in their body (caveat-start, prose-start) keeps that
|
|
474
|
+
// block as a user bubble — no extra ghost status bubble, no double rendering (review
|
|
475
|
+
// qa-A / auditor-F1).
|
|
415
476
|
const head = txt.trimStart();
|
|
416
477
|
if (!head.startsWith('{') && !INTER_SESSION_LEAD_RE.test(head)) continue;
|
|
417
478
|
const note = parseInterSessionNotification(txt);
|
|
@@ -456,7 +517,7 @@ export function classifyUserContent(content) {
|
|
|
456
517
|
|
|
457
518
|
const hasCommand = content.some(b => b.type === 'text' && /<command-message>/i.test(b.text || ''));
|
|
458
519
|
|
|
459
|
-
//
|
|
520
|
+
// Extract slash command names
|
|
460
521
|
const commands = [];
|
|
461
522
|
if (hasCommand) {
|
|
462
523
|
for (const b of content) {
|
|
@@ -469,13 +530,14 @@ export function classifyUserContent(content) {
|
|
|
469
530
|
}
|
|
470
531
|
}
|
|
471
532
|
|
|
472
|
-
//
|
|
533
|
+
// Filter out non-system text blocks
|
|
473
534
|
let textBlocks = content.filter(b => b.type === 'text' && !isSystemText(b.text));
|
|
474
535
|
|
|
475
|
-
//
|
|
476
|
-
// (e.g., /ultraplan
|
|
477
|
-
//
|
|
478
|
-
//
|
|
536
|
+
// Second-pass extraction: recover user text embedded in filtered system blocks
|
|
537
|
+
// (e.g., /ultraplan merges the skill instruction and the user input into the same
|
|
538
|
+
// <system-reminder> block). Run isSystemText once more after stripSystemTags — to avoid
|
|
539
|
+
// wrongly recovering pure-marker text like [Request interrupted ...] (nothing stripable)
|
|
540
|
+
// back into a user bubble
|
|
479
541
|
for (const b of content) {
|
|
480
542
|
if (b.type !== 'text' || !isSystemText(b.text)) continue;
|
|
481
543
|
const userText = stripSystemTags(b.text);
|
|
@@ -484,18 +546,21 @@ export function classifyUserContent(content) {
|
|
|
484
546
|
}
|
|
485
547
|
}
|
|
486
548
|
|
|
487
|
-
//
|
|
549
|
+
// Filter out command-related blocks
|
|
488
550
|
if (hasCommand) {
|
|
489
551
|
textBlocks = textBlocks.filter(b => !/<command-message>/i.test(b.text || ''));
|
|
490
552
|
}
|
|
491
553
|
|
|
492
|
-
//
|
|
493
|
-
//
|
|
494
|
-
//
|
|
554
|
+
// Skill text (isSkillText) is necessarily filtered first by the same regex in isSystemText
|
|
555
|
+
// ("Base directory for this skill:"), and both textBlocks entry paths (initial filter /
|
|
556
|
+
// second-pass recovery) require !isSystemText, so a skill block can never appear in
|
|
557
|
+
// textBlocks; the skillBlocks key is kept to preserve the returned shape (consumed by
|
|
558
|
+
// ChatView/ImConversationModal).
|
|
495
559
|
const skillBlocks = [];
|
|
496
560
|
|
|
497
|
-
//
|
|
498
|
-
//
|
|
561
|
+
// Whether this round is UltraPlan input (the raw text still contains the
|
|
562
|
+
// <system-reminder>[SCOPED INSTRUCTION] marker, not yet stripped by stripSystemTags).
|
|
563
|
+
// Consumers (ChatView) use this to render an [UltraPlan] tag above the user bubble.
|
|
499
564
|
const ultraplan = Array.isArray(content)
|
|
500
565
|
&& content.some(b => b && b.type === 'text' && isUltraplanText(b.text));
|
|
501
566
|
|
|
@@ -503,8 +568,8 @@ export function classifyUserContent(content) {
|
|
|
503
568
|
}
|
|
504
569
|
|
|
505
570
|
/**
|
|
506
|
-
*
|
|
507
|
-
*
|
|
571
|
+
* Extract a name from a teammate request's messages.
|
|
572
|
+
* Scans the SendMessage tool_result for the routing.sender field.
|
|
508
573
|
*/
|
|
509
574
|
export function extractTeammateName(body) {
|
|
510
575
|
const msgs = body?.messages;
|
|
@@ -528,9 +593,9 @@ export function extractTeammateName(body) {
|
|
|
528
593
|
return null;
|
|
529
594
|
}
|
|
530
595
|
|
|
531
|
-
// ============== Teammate
|
|
596
|
+
// ============== Teammate name resolution (prompt content matching) ==============
|
|
532
597
|
|
|
533
|
-
//
|
|
598
|
+
// Persistent registry: Agent tool_use prompt prefix → teammate name
|
|
534
599
|
const _promptRegistry = new Map();
|
|
535
600
|
// Requests whose response has been scanned for Agent tool_use blocks. A request
|
|
536
601
|
// is only added once its response is present, so a spawn turn that completes
|
|
@@ -539,14 +604,14 @@ const _promptRegistry = new Map();
|
|
|
539
604
|
// cursor skipped it forever. WeakSet cannot be cleared, so it is recreated on
|
|
540
605
|
// session switch.
|
|
541
606
|
let _registryScanned = new WeakSet();
|
|
542
|
-
//
|
|
607
|
+
// Identify the session by the first request's timestamp; auto-reset on switch
|
|
543
608
|
let _registrySessionKey = null;
|
|
544
609
|
|
|
545
610
|
const PROMPT_PREFIX_LEN = 60;
|
|
546
611
|
const TM_TAG_RE = /<teammate-message[^>]*>/;
|
|
547
612
|
|
|
548
613
|
/**
|
|
549
|
-
*
|
|
614
|
+
* Extract the prompt content after <teammate-message> from a teammate's first user message.
|
|
550
615
|
*/
|
|
551
616
|
function _extractSpawnPrompt(req) {
|
|
552
617
|
const msgs = req.body?.messages;
|
|
@@ -570,8 +635,9 @@ function _extractSpawnPrompt(req) {
|
|
|
570
635
|
}
|
|
571
636
|
|
|
572
637
|
/**
|
|
573
|
-
* v2.1.90+ Agent
|
|
574
|
-
*
|
|
638
|
+
* v2.1.90+ Agent mode: a native teammate's first user message is a raw prompt (no
|
|
639
|
+
* <teammate-message> wrapper). Extract the first user message's text directly for prompt
|
|
640
|
+
* prefix matching.
|
|
575
641
|
*/
|
|
576
642
|
function _extractRawPrompt(req) {
|
|
577
643
|
const msgs = req.body?.messages;
|
|
@@ -588,16 +654,16 @@ function _extractRawPrompt(req) {
|
|
|
588
654
|
}
|
|
589
655
|
|
|
590
656
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
657
|
+
* Pre-scan requests and inject req.teammate names by matching the MainAgent's Agent
|
|
658
|
+
* tool_use prompt against a native teammate's first message content.
|
|
593
659
|
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
660
|
+
* Must be called before classifyRequest (its result is WeakMap-cached). Version compatible:
|
|
661
|
+
* requests that already have req.teammate (interceptor mode) are unaffected.
|
|
596
662
|
*/
|
|
597
663
|
export function resolveTeammateNames(requests) {
|
|
598
664
|
if (!Array.isArray(requests) || requests.length === 0) return;
|
|
599
665
|
|
|
600
|
-
//
|
|
666
|
+
// Detect session switch via the first request's timestamp; auto-reset
|
|
601
667
|
const sessionKey = requests[0]?.timestamp || null;
|
|
602
668
|
if (sessionKey !== _registrySessionKey) {
|
|
603
669
|
_promptRegistry.clear();
|
|
@@ -628,22 +694,22 @@ export function resolveTeammateNames(requests) {
|
|
|
628
694
|
|
|
629
695
|
if (_promptRegistry.size === 0) return;
|
|
630
696
|
|
|
631
|
-
// Step 2:
|
|
697
|
+
// Step 2: inject req.teammate for native/proxy teammates that lack a name
|
|
632
698
|
for (const req of requests) {
|
|
633
699
|
if (req.teammate) continue;
|
|
634
700
|
if (!isNativeTeammate(req) && !TEAMMATE_SYSTEM_RE.test(getSystemText(req.body || {}))) continue;
|
|
635
701
|
|
|
636
702
|
let prompt = _extractSpawnPrompt(req);
|
|
637
|
-
// v2.1.90+ Agent
|
|
703
|
+
// v2.1.90+ Agent mode fallback: try the raw prompt when there is no <teammate-message>
|
|
638
704
|
if (!prompt && isNativeTeammate(req)) prompt = _extractRawPrompt(req);
|
|
639
705
|
if (!prompt) continue;
|
|
640
706
|
const prefix = prompt.slice(0, PROMPT_PREFIX_LEN);
|
|
641
707
|
|
|
642
|
-
//
|
|
708
|
+
// Exact prefix match
|
|
643
709
|
const name = _promptRegistry.get(prefix);
|
|
644
710
|
if (name) {
|
|
645
711
|
req.teammate = name;
|
|
646
|
-
//
|
|
712
|
+
// Clear any possibly-cached classifyRequest result (the old cache with subType null)
|
|
647
713
|
if (req._cachedTeammateName === null) req._cachedTeammateName = name;
|
|
648
714
|
}
|
|
649
715
|
}
|