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/src/utils/svgSanitize.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
// SVG sanitize: allow SMIL animation tags through DOMPurify's strict svg profile so previewed
|
|
2
|
-
// *.svg files animate, but reject <set>/<animate*> retargeting onto on*/href/style — defending
|
|
3
|
-
// against post-sanitize attribute injection via the SMIL animation engine.
|
|
4
|
-
//
|
|
5
|
-
// Uses a PRIVATE DOMPurify instance so the SMIL guard hook stays scoped to SVG sanitize calls
|
|
6
|
-
// (no leakage into the markdown / Mermaid sanitize pipelines that share the default singleton).
|
|
7
|
-
|
|
8
|
-
import DOMPurify from 'dompurify';
|
|
9
|
-
|
|
10
|
-
export const SMIL_TAGS = new Set(['set', 'animate', 'animatemotion', 'animatetransform']);
|
|
11
|
-
export const FORBIDDEN_ANIM_TARGET = /^(on|href$|xlink:href$|style$)/i;
|
|
12
|
-
|
|
13
|
-
export function isHostileAnimAttr(tagName, attrName, attrValue) {
|
|
14
|
-
// DOMPurify lowercases attrName before passing to hooks; the explicit toLowerCase is cheap
|
|
15
|
-
// insurance against version drift / direct callers (unit tests).
|
|
16
|
-
if (String(attrName || '').toLowerCase() !== 'attributename') return false;
|
|
17
|
-
if (!SMIL_TAGS.has((tagName || '').toLowerCase())) return false;
|
|
18
|
-
return FORBIDDEN_ANIM_TARGET.test(String(attrValue || '').trim());
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const SVG_SANITIZE_CONFIG = Object.freeze({
|
|
22
|
-
USE_PROFILES: { svg: true },
|
|
23
|
-
ADD_TAGS: ['animate', 'animateMotion', 'animateTransform', 'set', 'mpath'],
|
|
24
|
-
ADD_ATTR: [
|
|
25
|
-
'attributeName', 'attributeType', 'calcMode', 'values', 'keyTimes', 'keySplines',
|
|
26
|
-
'dur', 'repeatCount', 'repeatDur', 'begin', 'end', 'from', 'to', 'by',
|
|
27
|
-
'restart', 'min', 'max', 'additive', 'accumulate', 'path', 'rotate',
|
|
28
|
-
'fill', 'href', 'xlink:href', 'type', 'origin',
|
|
29
|
-
],
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// DOMPurify default export is both an instance and a factory: calling it with a window returns a
|
|
33
|
-
// fresh instance whose hook chain is independent. In SSR / node:test (no window) the default
|
|
34
|
-
// instance is a stub without addHook/sanitize — guard so this module is import-safe everywhere.
|
|
35
|
-
const svgPurify = typeof window !== 'undefined' ? DOMPurify(window) : DOMPurify;
|
|
36
|
-
|
|
37
|
-
if (typeof svgPurify.addHook === 'function') {
|
|
38
|
-
svgPurify.addHook('uponSanitizeAttribute', (node, data) => {
|
|
39
|
-
if (isHostileAnimAttr(node && node.nodeName, data && data.attrName, data && data.attrValue)) {
|
|
40
|
-
data.keepAttr = false;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function sanitizeSvg(text) {
|
|
46
|
-
if (typeof svgPurify.sanitize !== 'function') return text;
|
|
47
|
-
return svgPurify.sanitize(text, SVG_SANITIZE_CONFIG);
|
|
48
|
-
}
|
package/src/utils/systemTags.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export const SYSTEM_TAGS = [
|
|
2
|
-
'system-reminder', 'local-command-caveat', 'project-reminder',
|
|
3
|
-
'important-instruction-reminders', 'file-modified-reminder', 'todo-reminder',
|
|
4
|
-
'user-prompt-submit-hook', 'local-command-stdout', 'command-name',
|
|
5
|
-
'task-notification', 'environment_details', 'context'
|
|
6
|
-
];
|
|
7
|
-
|
|
8
|
-
export function parseSystemTags(text) {
|
|
9
|
-
if (!text) return { segments: [] };
|
|
10
|
-
const tagPattern = new RegExp(
|
|
11
|
-
'<(' + SYSTEM_TAGS.join('|') + ')\\b[^>]*>([\\s\\S]*?)</\\1>',
|
|
12
|
-
'gi'
|
|
13
|
-
);
|
|
14
|
-
const segments = [];
|
|
15
|
-
let lastIndex = 0;
|
|
16
|
-
let match;
|
|
17
|
-
while ((match = tagPattern.exec(text)) !== null) {
|
|
18
|
-
if (match.index > lastIndex) {
|
|
19
|
-
const before = text.slice(lastIndex, match.index).trim();
|
|
20
|
-
if (before) segments.push({ type: 'text', content: before });
|
|
21
|
-
}
|
|
22
|
-
segments.push({ type: 'system-tag', tag: match[1], content: match[2].trim() });
|
|
23
|
-
lastIndex = match.index + match[0].length;
|
|
24
|
-
}
|
|
25
|
-
if (lastIndex < text.length) {
|
|
26
|
-
const rest = text.slice(lastIndex).trim();
|
|
27
|
-
if (rest) segments.push({ type: 'text', content: rest });
|
|
28
|
-
}
|
|
29
|
-
return { segments };
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const _tagCache = new Map();
|
|
33
|
-
const _TAG_CACHE_MAX = 512;
|
|
34
|
-
|
|
35
|
-
export function renderAssistantText(text) {
|
|
36
|
-
if (!text) return { segments: [] };
|
|
37
|
-
const hit = _tagCache.get(text);
|
|
38
|
-
if (hit) return hit;
|
|
39
|
-
|
|
40
|
-
const result = parseSystemTags(text);
|
|
41
|
-
|
|
42
|
-
if (_tagCache.size >= _TAG_CACHE_MAX) {
|
|
43
|
-
_tagCache.delete(_tagCache.keys().next().value);
|
|
44
|
-
}
|
|
45
|
-
_tagCache.set(text, result);
|
|
46
|
-
return result;
|
|
47
|
-
}
|
package/src/utils/tClaude.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// Claude 配置目录感知的 i18n 包装。由 AppBase 在 /api/preferences 响应里调
|
|
2
|
-
// setClaudeConfigDir() 注入;tc(key) 在调用时把 {configDir} 占位符替换成
|
|
3
|
-
// home-friendly 展示路径(默认 "~/.claude",设了 CLAUDE_CONFIG_DIR 时为绝对路径)。
|
|
4
|
-
|
|
5
|
-
import { t } from '../i18n';
|
|
6
|
-
|
|
7
|
-
let _configDir = '~/.claude';
|
|
8
|
-
|
|
9
|
-
export function setClaudeConfigDir(path) {
|
|
10
|
-
if (typeof path === 'string' && path.length > 0) _configDir = path;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function getClaudeConfigDir() {
|
|
14
|
-
return _configDir;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// 注入的 configDir 不可被 params 覆盖——UI 必须反映真实的配置目录。
|
|
18
|
-
export function tc(key, params) {
|
|
19
|
-
return t(key, { ...params, configDir: _configDir });
|
|
20
|
-
}
|
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build team modal visualization data from requests and sessions.
|
|
3
|
-
* Pure function — no React/state dependencies.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { classifyUserContent, isMainAgent, extractDisplayText } from './contentFilter';
|
|
7
|
-
import { restoreSlimmedEntry } from './entry-slim.js';
|
|
8
|
-
import { classifyRequest, formatRequestTag, formatTeammateLabel } from './requestType';
|
|
9
|
-
import { getModelInfo, getEffectiveModel } from './helpers';
|
|
10
|
-
import { getTeammateAvatar } from './teammateAvatars';
|
|
11
|
-
import { buildSubAgentResultMap, buildGlobalToolResultIndex } from './toolResultBuilder';
|
|
12
|
-
|
|
13
|
-
export function buildTeamModalData(team, requests, mainAgentSessions) {
|
|
14
|
-
const startIdx = team.requestIndex;
|
|
15
|
-
const endIdx = team.endRequestIndex != null ? team.endRequestIndex + 1 : requests.length;
|
|
16
|
-
const teamRequests = requests.slice(startIdx, endIdx);
|
|
17
|
-
const teamStartTime = team.startTime;
|
|
18
|
-
const teamEndTime = team.endTime || (requests[endIdx - 1]?.response?.timestamp || requests[endIdx - 1]?.timestamp);
|
|
19
|
-
|
|
20
|
-
// 构建 tsToIndex 和 modelInfo
|
|
21
|
-
const tsToIndex = {};
|
|
22
|
-
let modelName = null;
|
|
23
|
-
for (let i = startIdx; i < endIdx && i < requests.length; i++) {
|
|
24
|
-
const req = requests[i];
|
|
25
|
-
if (req.timestamp) tsToIndex[req.timestamp] = i;
|
|
26
|
-
const effective = getEffectiveModel(req);
|
|
27
|
-
if (effective) modelName = effective;
|
|
28
|
-
}
|
|
29
|
-
const modelInfo = getModelInfo(modelName);
|
|
30
|
-
|
|
31
|
-
// 用户消息提取:展示触发 team 的用户 prompt,帮助理解 team 要解决什么问题。
|
|
32
|
-
const entries = [];
|
|
33
|
-
let hasUserMsg = false;
|
|
34
|
-
|
|
35
|
-
// 策略 1:从 mainAgentSessions 按时间范围提取
|
|
36
|
-
if (mainAgentSessions) {
|
|
37
|
-
let closestBeforeTs = null;
|
|
38
|
-
for (const session of mainAgentSessions) {
|
|
39
|
-
for (const msg of session.messages || []) {
|
|
40
|
-
const ts = msg._timestamp;
|
|
41
|
-
if (!ts || msg.role !== 'user') continue;
|
|
42
|
-
if (ts <= teamStartTime && (!closestBeforeTs || ts > closestBeforeTs)) {
|
|
43
|
-
closestBeforeTs = ts;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
const effectiveStart = closestBeforeTs || teamStartTime;
|
|
48
|
-
for (const session of mainAgentSessions) {
|
|
49
|
-
for (const msg of session.messages || []) {
|
|
50
|
-
const ts = msg._timestamp;
|
|
51
|
-
if (!ts || ts < effectiveStart) continue;
|
|
52
|
-
if (teamEndTime && ts > teamEndTime) continue;
|
|
53
|
-
if (msg.role !== 'user') continue;
|
|
54
|
-
const content = msg.content;
|
|
55
|
-
if (Array.isArray(content)) {
|
|
56
|
-
const { textBlocks } = classifyUserContent(content);
|
|
57
|
-
for (const tb of textBlocks) {
|
|
58
|
-
if (tb.text && tb.text.trim()) {
|
|
59
|
-
entries.push({ type: 'user', text: tb.text, timestamp: ts });
|
|
60
|
-
hasUserMsg = true;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
} else if (typeof content === 'string') {
|
|
64
|
-
const dispText = extractDisplayText(content);
|
|
65
|
-
if (dispText) {
|
|
66
|
-
entries.push({ type: 'user', text: dispText, timestamp: ts });
|
|
67
|
-
hasUserMsg = true;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// 策略 2:从 TeamCreate request 的 body.messages 直接提取
|
|
75
|
-
if (!hasUserMsg) {
|
|
76
|
-
const tcRaw = requests[team.requestIndex];
|
|
77
|
-
const tcReq = tcRaw?._slimmed ? restoreSlimmedEntry(tcRaw, requests) : tcRaw;
|
|
78
|
-
const tcMsgs = tcReq?.body?.messages || [];
|
|
79
|
-
for (let m = tcMsgs.length - 1; m >= 0; m--) {
|
|
80
|
-
if (tcMsgs[m].role !== 'user') continue;
|
|
81
|
-
const c = tcMsgs[m].content;
|
|
82
|
-
if (Array.isArray(c)) {
|
|
83
|
-
const { textBlocks } = classifyUserContent(c);
|
|
84
|
-
for (const tb of textBlocks) {
|
|
85
|
-
if (tb.text && tb.text.trim()) {
|
|
86
|
-
entries.push({ type: 'user', text: tb.text, timestamp: teamStartTime });
|
|
87
|
-
hasUserMsg = true;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
} else if (typeof c === 'string') {
|
|
91
|
-
const dispText = extractDisplayText(c);
|
|
92
|
-
if (dispText) {
|
|
93
|
-
entries.push({ type: 'user', text: dispText, timestamp: teamStartTime });
|
|
94
|
-
hasUserMsg = true;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
if (hasUserMsg) break;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// 策略 3 兜底:/clear 后 messages=[] 时,用首条 assistant 文本作为上下文
|
|
102
|
-
if (!hasUserMsg) {
|
|
103
|
-
for (let i = 0; i < teamRequests.length; i++) {
|
|
104
|
-
const resp = teamRequests[i].response?.body?.content;
|
|
105
|
-
if (!Array.isArray(resp)) continue;
|
|
106
|
-
for (const block of resp) {
|
|
107
|
-
if (block.type === 'text' && block.text && block.text.trim()) {
|
|
108
|
-
entries.push({ type: 'context', text: block.text.trim(), timestamp: teamRequests[i].response?.timestamp || teamRequests[i].timestamp });
|
|
109
|
-
hasUserMsg = true;
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (hasUserMsg) break;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// 全局 tool_result 索引(team 范围内):并行 sub-agent 请求穿插,K+1 不可预测;
|
|
118
|
-
// 一次性建 id → result 索引,O(1) 查询。
|
|
119
|
-
const teamGlobalIndex = buildGlobalToolResultIndex(teamRequests);
|
|
120
|
-
|
|
121
|
-
// 收集 assistant + sub-agent 条目
|
|
122
|
-
for (let i = 0; i < teamRequests.length; i++) {
|
|
123
|
-
const req = teamRequests[i];
|
|
124
|
-
const respContent = req.response?.body?.content;
|
|
125
|
-
if (!Array.isArray(respContent) || respContent.length === 0) continue;
|
|
126
|
-
const cls = classifyRequest(req, teamRequests[i + 1]);
|
|
127
|
-
const isMA = isMainAgent(req);
|
|
128
|
-
const isSub = cls.type === 'SubAgent' || cls.type === 'Teammate';
|
|
129
|
-
|
|
130
|
-
if (isMA) {
|
|
131
|
-
entries.push({ type: 'assistant', content: respContent, timestamp: req.response?.timestamp || req.timestamp, requestIndex: startIdx + i, modelInfo });
|
|
132
|
-
} else if (isSub) {
|
|
133
|
-
const subToolResultMap = buildSubAgentResultMap(req, teamGlobalIndex);
|
|
134
|
-
entries.push({
|
|
135
|
-
type: 'sub-agent',
|
|
136
|
-
content: respContent,
|
|
137
|
-
toolResultMap: subToolResultMap,
|
|
138
|
-
label: cls.type === 'Teammate' ? formatTeammateLabel(cls.subType, req.body?.model) : formatRequestTag(cls.type, cls.subType),
|
|
139
|
-
isTeammate: cls.type === 'Teammate',
|
|
140
|
-
timestamp: req.timestamp,
|
|
141
|
-
requestIndex: startIdx + i,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// 按时间排序
|
|
147
|
-
entries.sort((a, b) => (a.timestamp || '').localeCompare(b.timestamp || ''));
|
|
148
|
-
|
|
149
|
-
// 提取每个 agent 的时间数据(用于状态卡片和甘特图)
|
|
150
|
-
const palette = ['#1668dc', '#52c41a', '#faad14', '#eb2f96', '#722ed1', '#13c2c2', '#fa541c', '#2f54eb'];
|
|
151
|
-
const teamAgents = [];
|
|
152
|
-
const agentMap = new Map();
|
|
153
|
-
const teamTotalStart = new Date(teamStartTime).getTime();
|
|
154
|
-
const teamTotalEnd = new Date(teamEndTime || Date.now()).getTime();
|
|
155
|
-
const leadSegments = [];
|
|
156
|
-
let lastLeadTs = teamTotalStart;
|
|
157
|
-
const _taskCreateSubjects = new Map();
|
|
158
|
-
const _taskOwnerMap = new Map();
|
|
159
|
-
let _taskCreateCounter = 1;
|
|
160
|
-
|
|
161
|
-
for (let i = 0; i < teamRequests.length; i++) {
|
|
162
|
-
const req = teamRequests[i];
|
|
163
|
-
const resp = req.response?.body?.content;
|
|
164
|
-
if (!Array.isArray(resp)) continue;
|
|
165
|
-
const tsStr = req.response?.timestamp || req.timestamp;
|
|
166
|
-
const ts = tsStr;
|
|
167
|
-
const tsMs = new Date(tsStr).getTime();
|
|
168
|
-
const isMA = isMainAgent(req);
|
|
169
|
-
for (const block of resp) {
|
|
170
|
-
if (block.type !== 'tool_use') continue;
|
|
171
|
-
const n = block.name;
|
|
172
|
-
const inp = typeof block.input === 'string' ? (() => { try { return JSON.parse(block.input); } catch { return {}; } })() : (block.input || {});
|
|
173
|
-
if (n === 'Agent' && inp.name) {
|
|
174
|
-
const idx = teamAgents.length;
|
|
175
|
-
teamAgents.push({
|
|
176
|
-
name: inp.name,
|
|
177
|
-
color: palette[idx % palette.length],
|
|
178
|
-
type: inp.subagent_type?.split(':').pop() || '',
|
|
179
|
-
spawnTime: ts,
|
|
180
|
-
claimTime: null,
|
|
181
|
-
doneTime: null,
|
|
182
|
-
shutdownTime: null,
|
|
183
|
-
taskSubject: null,
|
|
184
|
-
events: [{ ts: tsMs, label: 'spawn' }],
|
|
185
|
-
});
|
|
186
|
-
agentMap.set(inp.name, idx);
|
|
187
|
-
} else if (n === 'TaskCreate') {
|
|
188
|
-
if (inp.subject) {
|
|
189
|
-
const tId = String(inp.taskId || _taskCreateCounter++);
|
|
190
|
-
_taskCreateSubjects.set(tId, inp.subject);
|
|
191
|
-
}
|
|
192
|
-
} else if (n === 'TaskUpdate') {
|
|
193
|
-
const owner = inp.owner;
|
|
194
|
-
const taskId = inp.taskId != null ? String(inp.taskId) : null;
|
|
195
|
-
if (owner && taskId) _taskOwnerMap.set(taskId, owner);
|
|
196
|
-
|
|
197
|
-
let targetAg = null;
|
|
198
|
-
if (owner && agentMap.has(owner)) {
|
|
199
|
-
targetAg = teamAgents[agentMap.get(owner)];
|
|
200
|
-
} else if (taskId) {
|
|
201
|
-
const prevOwner = _taskOwnerMap.get(taskId);
|
|
202
|
-
if (prevOwner && agentMap.has(prevOwner)) {
|
|
203
|
-
targetAg = teamAgents[agentMap.get(prevOwner)];
|
|
204
|
-
} else {
|
|
205
|
-
const taskNum = parseInt(taskId, 10);
|
|
206
|
-
if (taskNum > 0 && taskNum <= teamAgents.length) {
|
|
207
|
-
targetAg = teamAgents[taskNum - 1];
|
|
208
|
-
_taskOwnerMap.set(taskId, targetAg.name);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (targetAg) {
|
|
213
|
-
if (inp.status === 'in_progress' && !targetAg.claimTime) {
|
|
214
|
-
targetAg.claimTime = ts;
|
|
215
|
-
targetAg.events.push({ ts: tsMs, label: 'claim' });
|
|
216
|
-
}
|
|
217
|
-
if (inp.status === 'completed' && !targetAg.doneTime) {
|
|
218
|
-
targetAg.doneTime = ts;
|
|
219
|
-
targetAg.events.push({ ts: tsMs, label: 'done' });
|
|
220
|
-
}
|
|
221
|
-
if (taskId && _taskCreateSubjects.has(taskId) && !targetAg.taskSubject) {
|
|
222
|
-
targetAg.taskSubject = _taskCreateSubjects.get(taskId);
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
} else if (n === 'SendMessage') {
|
|
226
|
-
if (inp.message?.type === 'shutdown_request' && inp.to && agentMap.has(inp.to)) {
|
|
227
|
-
const ag = teamAgents[agentMap.get(inp.to)];
|
|
228
|
-
ag.shutdownTime = ts;
|
|
229
|
-
ag.events.push({ ts: tsMs, label: 'shutdown' });
|
|
230
|
-
} else if (inp.message?.type === 'shutdown_response' && agentMap.has(inp.to === 'team-lead' ? '' : inp.to)) {
|
|
231
|
-
// skip
|
|
232
|
-
} else if (inp.to && inp.to !== 'team-lead' && agentMap.has(inp.to)) {
|
|
233
|
-
teamAgents[agentMap.get(inp.to)].events.push({ ts: tsMs, label: 'msg-in' });
|
|
234
|
-
} else if (inp.to === 'team-lead') {
|
|
235
|
-
if (typeof inp.message === 'string' || (inp.message && !inp.message.type)) {
|
|
236
|
-
if (tsMs > lastLeadTs) {
|
|
237
|
-
leadSegments.push({ start: lastLeadTs, end: tsMs, label: 'report-received', color: '#52c41a' });
|
|
238
|
-
lastLeadTs = tsMs;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (isMA && (n === 'TeamCreate' || n === 'TaskCreate' || n === 'Agent' || n === 'SendMessage' || n === 'TeamDelete')) {
|
|
244
|
-
const label = n === 'TeamCreate' ? 'create' : n === 'TaskCreate' ? 'tasks' : n === 'Agent' ? 'spawn' : n === 'SendMessage' ? 'msg' : 'cleanup';
|
|
245
|
-
if (tsMs > lastLeadTs) {
|
|
246
|
-
leadSegments.push({ start: lastLeadTs, end: tsMs, label, color: n === 'TeamDelete' ? '#52c41a' : n === 'SendMessage' ? '#ff4d4f' : '#1668dc' });
|
|
247
|
-
lastLeadTs = tsMs;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
if (isMA) {
|
|
252
|
-
for (const block of resp) {
|
|
253
|
-
if (block.type === 'text' && block.text) {
|
|
254
|
-
if (tsMs > lastLeadTs) {
|
|
255
|
-
leadSegments.push({ start: lastLeadTs, end: tsMs, label: 'text', color: '#196ae1' });
|
|
256
|
-
lastLeadTs = tsMs;
|
|
257
|
-
}
|
|
258
|
-
} else if (block.type === 'thinking') {
|
|
259
|
-
if (tsMs > lastLeadTs) {
|
|
260
|
-
leadSegments.push({ start: lastLeadTs, end: tsMs, label: 'thinking', color: '#722ed1' });
|
|
261
|
-
lastLeadTs = tsMs;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
// Second pass: teammate own tool calls (non-MainAgent requests)
|
|
268
|
-
for (let i = 0; i < teamRequests.length; i++) {
|
|
269
|
-
const req = teamRequests[i];
|
|
270
|
-
if (isMainAgent(req)) continue;
|
|
271
|
-
const resp = req.response?.body?.content;
|
|
272
|
-
if (!Array.isArray(resp)) continue;
|
|
273
|
-
const tsStr = req.response?.timestamp || req.timestamp;
|
|
274
|
-
const tsMs = new Date(tsStr).getTime();
|
|
275
|
-
const cls = classifyRequest(req, teamRequests[i + 1]);
|
|
276
|
-
const label = cls.type === 'Teammate' ? cls.subType : null;
|
|
277
|
-
if (label) {
|
|
278
|
-
let agIdx = agentMap.has(label) ? agentMap.get(label) : undefined;
|
|
279
|
-
if (agIdx === undefined) {
|
|
280
|
-
for (const [name, idx] of agentMap) {
|
|
281
|
-
if (label.includes(name) || name.includes(label)) { agIdx = idx; break; }
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
if (agIdx !== undefined) {
|
|
285
|
-
const ag = teamAgents[agIdx];
|
|
286
|
-
for (const block of resp) {
|
|
287
|
-
if (block.type === 'tool_use' && block.name) {
|
|
288
|
-
ag.events.push({ ts: tsMs, label: 'tool:' + block.name });
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// 提取 <teammate-message> 报告内容
|
|
296
|
-
const teammateMessageRe = /<teammate-message\s+teammate_id="([^"]+)"[^>]*summary="([^"]*)"[^>]*>([\s\S]*?)<\/teammate-message>/g;
|
|
297
|
-
const seenTmMsg = new Set();
|
|
298
|
-
teamAgents.forEach(ag => { ag.teammateMessages = []; });
|
|
299
|
-
for (let i = 0; i < teamRequests.length; i++) {
|
|
300
|
-
const raw = teamRequests[i];
|
|
301
|
-
const req = raw?._slimmed ? restoreSlimmedEntry(raw, requests) : raw;
|
|
302
|
-
const msgs = req.body?.messages || [];
|
|
303
|
-
for (const m of msgs) {
|
|
304
|
-
if (m.role !== 'user' || !Array.isArray(m.content)) continue;
|
|
305
|
-
for (const b of m.content) {
|
|
306
|
-
if (b.type !== 'text' || !b.text) continue;
|
|
307
|
-
let match;
|
|
308
|
-
teammateMessageRe.lastIndex = 0;
|
|
309
|
-
while ((match = teammateMessageRe.exec(b.text)) !== null) {
|
|
310
|
-
const [, tid, summary, content] = match;
|
|
311
|
-
if (tid === 'system' || tid === 'team-lead') continue;
|
|
312
|
-
const dedupKey = tid + '|' + summary + '|' + content.trim().slice(0, 100);
|
|
313
|
-
if (seenTmMsg.has(dedupKey)) continue;
|
|
314
|
-
seenTmMsg.add(dedupKey);
|
|
315
|
-
for (const ag of teamAgents) {
|
|
316
|
-
if (tid === ag.name || tid.includes(ag.name) || ag.name.includes(tid)) {
|
|
317
|
-
if (summary && content.trim()) {
|
|
318
|
-
ag.teammateMessages.push({ summary, content: content.trim() });
|
|
319
|
-
const reqTs = req.timestamp || req.response?.timestamp;
|
|
320
|
-
entries.push({ type: 'teammate-report', agentName: ag.name, agentColor: getTeammateAvatar(ag.name).color, summary, content: content.trim(), timestamp: reqTs });
|
|
321
|
-
}
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
// 闭合 lead 最后一段
|
|
331
|
-
if (lastLeadTs < teamTotalEnd) {
|
|
332
|
-
leadSegments.push({ start: lastLeadTs, end: teamTotalEnd, label: 'idle', color: '#333' });
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
// 从事件节点构建每个 agent 的分段 + 计算持续时间
|
|
336
|
-
const segColors = { spawn: '#555', claim: '#faad14', done: '#52c41a', shutdown: '#ff4d4f', 'msg-in': '#1668dc', report: '#52c41a', 'report-received': '#52c41a', text: '#196ae1', thinking: '#722ed1' };
|
|
337
|
-
teamAgents.forEach(ag => {
|
|
338
|
-
const start = new Date(ag.spawnTime).getTime();
|
|
339
|
-
const end = new Date(ag.doneTime || ag.shutdownTime || teamEndTime || Date.now()).getTime();
|
|
340
|
-
ag.duration = end - start;
|
|
341
|
-
ag.events.sort((a, b) => a.ts - b.ts);
|
|
342
|
-
ag.segments = [];
|
|
343
|
-
for (let e = 0; e < ag.events.length; e++) {
|
|
344
|
-
const ev = ag.events[e];
|
|
345
|
-
const nextTs = ag.events[e + 1]?.ts || (ag.shutdownTime ? new Date(ag.shutdownTime).getTime() : teamTotalEnd);
|
|
346
|
-
ag.segments.push({ start: ev.ts, end: nextTs, label: ev.label, color: segColors[ev.label] || (ev.label.startsWith('tool:') ? '#888' : ag.color) });
|
|
347
|
-
}
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
return { entries, teamAgents, leadSegments, teamTotalStart, teamTotalEnd, modelInfo, teamRequests };
|
|
351
|
-
}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parse team lifecycle (TeamCreate → TeamDelete) from requests.
|
|
3
|
-
* Pure function, no React/state dependencies.
|
|
4
|
-
*
|
|
5
|
-
* endReason 取值(详见 END_REASON 常量):
|
|
6
|
-
* 'deleteConfirmed' — TeamDelete 返回 success(强证据,终态 ✓)
|
|
7
|
-
* 'successorCreate' — 新 TeamCreate 顶掉旧的(强证据,lead 已转移,等同 ✓)
|
|
8
|
-
* 'shutdownRequest' — 没看到 TeamDelete,但有 shutdown_request(弱证据,待 runtime 收敛)
|
|
9
|
-
* 'logTail' — 纯 log 末尾兜底(弱证据,待 runtime 收敛)
|
|
10
|
-
*
|
|
11
|
-
* _hasInferredEnd 派生含义:**只要 endReason 存在且不是 deleteConfirmed 就为 true**
|
|
12
|
-
* ⚠️ 注意:此字段**同时覆盖强证据 (successorCreate) 和弱证据 (shutdownRequest/logTail)**,
|
|
13
|
-
* 仅用于"是否经过推断流程结束"的存在性提示,不能用来判断强弱。
|
|
14
|
-
* **判断强弱证据请用 `isStrongTerminal(team)`**(它是权威的 API)。
|
|
15
|
-
* 旧代码里的 `_inferredEnd` 已重命名为 `_hasInferredEnd` 以避免"inferred 一定是弱证据"的直觉误读。
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
import { restoreSlimmedEntry } from './entry-slim.js';
|
|
19
|
-
|
|
20
|
-
export const END_REASON = Object.freeze({
|
|
21
|
-
DELETE_CONFIRMED: 'deleteConfirmed',
|
|
22
|
-
SUCCESSOR_CREATE: 'successorCreate',
|
|
23
|
-
SHUTDOWN_REQUEST: 'shutdownRequest',
|
|
24
|
-
LOG_TAIL: 'logTail',
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export function isStrongTerminal(team) {
|
|
28
|
-
if (!team) return false;
|
|
29
|
-
return team.endReason === END_REASON.DELETE_CONFIRMED
|
|
30
|
-
|| team.endReason === END_REASON.SUCCESSOR_CREATE;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// 从 requests 中提取 Team 会话列表
|
|
34
|
-
export function extractTeamSessions(requests) {
|
|
35
|
-
const teams = [];
|
|
36
|
-
let currentTeamIdx = -1; // 当前唯一打开的 team 在 teams[] 中的 index
|
|
37
|
-
|
|
38
|
-
// 查找 tool_use 对应的 tool_result(在后续 request 的 messages 中)
|
|
39
|
-
// 搜索窗口扩大到 10 以应对空行/非主agent请求插入导致的距离增大
|
|
40
|
-
function findToolResult(toolUseId, fromRequestIdx) {
|
|
41
|
-
for (let j = fromRequestIdx + 1; j < requests.length && j <= fromRequestIdx + 10; j++) {
|
|
42
|
-
const entry = requests[j]?._slimmed ? restoreSlimmedEntry(requests[j], requests) : requests[j];
|
|
43
|
-
const msgs = entry?.body?.messages;
|
|
44
|
-
if (!Array.isArray(msgs)) continue;
|
|
45
|
-
for (const msg of msgs) {
|
|
46
|
-
const blocks = msg.role === 'user' && Array.isArray(msg.content) ? msg.content : [];
|
|
47
|
-
for (const b of blocks) {
|
|
48
|
-
if (b.type === 'tool_result' && b.tool_use_id === toolUseId) {
|
|
49
|
-
return typeof b.content === 'string' ? b.content : JSON.stringify(b.content || '');
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function isDeleteSuccessful(resultText) {
|
|
58
|
-
// tool_result 可能因 entry-slim/delta 压缩而不可达,默认视为成功
|
|
59
|
-
// 只有明确包含 "Cannot cleanup" 才判定失败
|
|
60
|
-
if (!resultText) return true;
|
|
61
|
-
if (resultText.includes('"success":true') || resultText.includes('"success": true')) return true;
|
|
62
|
-
if (resultText.includes('Cleaned up')) return true;
|
|
63
|
-
if (resultText.includes('Cannot cleanup')) return false;
|
|
64
|
-
// 没有明确失败标记的默认视为成功
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
for (let i = 0; i < requests.length; i++) {
|
|
69
|
-
const req = requests[i];
|
|
70
|
-
const respContent = req.response?.body?.content;
|
|
71
|
-
if (!Array.isArray(respContent)) continue;
|
|
72
|
-
for (const block of respContent) {
|
|
73
|
-
if (block.type !== 'tool_use') continue;
|
|
74
|
-
const name = block.name;
|
|
75
|
-
const input = typeof block.input === 'string' ? (() => { try { return JSON.parse(block.input); } catch { return {}; } })() : (block.input || {});
|
|
76
|
-
if (name === 'TeamCreate') {
|
|
77
|
-
// 检查 TeamCreate 是否成功(tool_result 中不能有错误标记)
|
|
78
|
-
const createResult = findToolResult(block.id, i);
|
|
79
|
-
if (createResult && (createResult.includes('"error":') || createResult.includes('"error" :') || createResult.includes('Already leading team'))) continue;
|
|
80
|
-
const teamName = input.team_name || input.teamName || 'unknown';
|
|
81
|
-
const ts = req.timestamp || req.response?.timestamp;
|
|
82
|
-
// 新 TeamCreate 出现时,自动关闭前一个未关闭的 team(避免孤立)
|
|
83
|
-
if (currentTeamIdx >= 0 && !teams[currentTeamIdx].endTime) {
|
|
84
|
-
teams[currentTeamIdx].endTime = ts;
|
|
85
|
-
teams[currentTeamIdx].endRequestIndex = Math.max(teams[currentTeamIdx].requestIndex, i - 1);
|
|
86
|
-
teams[currentTeamIdx].endReason = END_REASON.SUCCESSOR_CREATE;
|
|
87
|
-
teams[currentTeamIdx]._hasInferredEnd = true;
|
|
88
|
-
}
|
|
89
|
-
const team = { name: teamName, startTime: ts, endTime: null, requestIndex: i, endRequestIndex: null, taskCount: 0, teammateCount: 0, _teammates: new Set() };
|
|
90
|
-
teams.push(team);
|
|
91
|
-
currentTeamIdx = teams.length - 1;
|
|
92
|
-
} else if (name === 'TeamDelete') {
|
|
93
|
-
const resultText = findToolResult(block.id, i);
|
|
94
|
-
if (!isDeleteSuccessful(resultText)) continue; // 失败的 TeamDelete 不关闭 team
|
|
95
|
-
const ts = req.timestamp || req.response?.timestamp;
|
|
96
|
-
if (currentTeamIdx < 0) {
|
|
97
|
-
// Cross-file: TeamCreate 在上一个 JSONL 中,从 tool_result 反向推断 team
|
|
98
|
-
let teamName = 'unknown';
|
|
99
|
-
try { const parsed = JSON.parse(resultText); teamName = parsed.team_name || teamName; } catch {}
|
|
100
|
-
// 回溯寻找最早的关联 Agent 调用作为 startTime
|
|
101
|
-
let startIdx = 0;
|
|
102
|
-
let startTs = requests[0]?.timestamp || requests[0]?.response?.timestamp;
|
|
103
|
-
for (let k = 0; k < i; k++) {
|
|
104
|
-
const kResp = requests[k]?.response?.body?.content;
|
|
105
|
-
if (!Array.isArray(kResp)) continue;
|
|
106
|
-
for (const kb of kResp) {
|
|
107
|
-
if (kb.type === 'tool_use' && kb.name === 'Agent') {
|
|
108
|
-
const kInp = typeof kb.input === 'string' ? (() => { try { return JSON.parse(kb.input); } catch { return {}; } })() : (kb.input || {});
|
|
109
|
-
if ((kInp.team_name || kInp.teamName) === teamName) {
|
|
110
|
-
startIdx = k;
|
|
111
|
-
startTs = requests[k]?.timestamp || requests[k]?.response?.timestamp;
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
if (startIdx > 0) break;
|
|
117
|
-
}
|
|
118
|
-
const team = { name: teamName, startTime: startTs, endTime: ts, endReason: END_REASON.DELETE_CONFIRMED, requestIndex: startIdx, endRequestIndex: i, taskCount: 0, teammateCount: 0, _teammates: new Set(), _inferredStart: true };
|
|
119
|
-
// 回填 teammate 和 task 计数
|
|
120
|
-
for (let k = startIdx; k < i; k++) {
|
|
121
|
-
const kResp = requests[k]?.response?.body?.content;
|
|
122
|
-
if (!Array.isArray(kResp)) continue;
|
|
123
|
-
for (const kb of kResp) {
|
|
124
|
-
if (kb.type !== 'tool_use') continue;
|
|
125
|
-
if (kb.name === 'Agent') {
|
|
126
|
-
const kInp = typeof kb.input === 'string' ? (() => { try { return JSON.parse(kb.input); } catch { return {}; } })() : (kb.input || {});
|
|
127
|
-
const an = kInp.name || '';
|
|
128
|
-
if (!team._teammates.has(an)) { team._teammates.add(an); team.teammateCount++; }
|
|
129
|
-
} else if (kb.name === 'TaskCreate' || kb.name === 'TaskUpdate') {
|
|
130
|
-
team.taskCount++;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
teams.push(team);
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
teams[currentTeamIdx].endTime = ts;
|
|
138
|
-
teams[currentTeamIdx].endRequestIndex = i;
|
|
139
|
-
teams[currentTeamIdx].endReason = END_REASON.DELETE_CONFIRMED;
|
|
140
|
-
currentTeamIdx = -1; // 清理:team 已关闭
|
|
141
|
-
} else if (name === 'SendMessage') {
|
|
142
|
-
// 跟踪 shutdown_request 作为备用结束信号
|
|
143
|
-
if (currentTeamIdx >= 0 && input.message?.type === 'shutdown_request') {
|
|
144
|
-
const shutdownTs = req.timestamp || req.response?.timestamp;
|
|
145
|
-
teams[currentTeamIdx]._lastShutdownTime = shutdownTs;
|
|
146
|
-
teams[currentTeamIdx]._lastShutdownRequestIdx = i;
|
|
147
|
-
}
|
|
148
|
-
} else if (name === 'TaskCreate' || name === 'TaskUpdate') {
|
|
149
|
-
if (currentTeamIdx >= 0) teams[currentTeamIdx].taskCount++;
|
|
150
|
-
} else if (name === 'Agent') {
|
|
151
|
-
const teamName = input.team_name || input.teamName;
|
|
152
|
-
const agentName = input.name || '';
|
|
153
|
-
let targetIdx = -1;
|
|
154
|
-
if (teamName) {
|
|
155
|
-
// 按 team_name 精确匹配(使用反向搜索,优先匹配最近的同名 team)
|
|
156
|
-
for (let ti = teams.length - 1; ti >= 0; ti--) {
|
|
157
|
-
if (teams[ti].name === teamName && !teams[ti].endTime) { targetIdx = ti; break; }
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
// fallback:如果没有 team_name 但有唯一打开的 team
|
|
161
|
-
if (targetIdx < 0 && currentTeamIdx >= 0) targetIdx = currentTeamIdx;
|
|
162
|
-
if (targetIdx >= 0) {
|
|
163
|
-
const t = teams[targetIdx];
|
|
164
|
-
if (!t._teammates.has(agentName)) { t._teammates.add(agentName); t.teammateCount++; }
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
// 后处理:为未关闭的 team 推断 endTime
|
|
170
|
-
for (const team of teams) {
|
|
171
|
-
if (team.endTime) continue;
|
|
172
|
-
// 优先使用 shutdown_request 时间戳,其次使用最后一条请求的时间戳
|
|
173
|
-
if (team._lastShutdownTime) {
|
|
174
|
-
team.endTime = team._lastShutdownTime;
|
|
175
|
-
team.endRequestIndex = team._lastShutdownRequestIdx;
|
|
176
|
-
team.endReason = END_REASON.SHUTDOWN_REQUEST;
|
|
177
|
-
team._hasInferredEnd = true;
|
|
178
|
-
} else {
|
|
179
|
-
const lastReq = requests[requests.length - 1];
|
|
180
|
-
const lastTs = lastReq?.response?.timestamp || lastReq?.timestamp;
|
|
181
|
-
if (lastTs && team.startTime !== lastTs) {
|
|
182
|
-
team.endTime = lastTs;
|
|
183
|
-
team.endRequestIndex = requests.length - 1;
|
|
184
|
-
team.endReason = END_REASON.LOG_TAIL;
|
|
185
|
-
team._hasInferredEnd = true;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return teams;
|
|
190
|
-
}
|