cx-viewer 1.0.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/LICENSE.md +21 -0
- package/README.md +221 -0
- package/cli.js +735 -0
- package/concepts/ar/BodyDiffJSON.md +32 -0
- package/concepts/ar/BodyFields.md +42 -0
- package/concepts/ar/CacheRebuild.md +36 -0
- package/concepts/ar/GlobalSettings.md +232 -0
- package/concepts/ar/KVCacheContent.md +49 -0
- package/concepts/ar/MainAgent.md +23 -0
- package/concepts/ar/ProxySwitch.md +50 -0
- package/concepts/ar/QRCode.md +25 -0
- package/concepts/ar/ResponseFields.md +50 -0
- package/concepts/ar/SubAgent-Search.md +20 -0
- package/concepts/ar/Teammate.md +26 -0
- package/concepts/ar/Tool-Agent.md +125 -0
- package/concepts/ar/Tool-AskUserQuestion.md +75 -0
- package/concepts/ar/Tool-Bash.md +167 -0
- package/concepts/ar/Tool-Edit.md +46 -0
- package/concepts/ar/Tool-EnterPlanMode.md +128 -0
- package/concepts/ar/Tool-EnterWorktree.md +56 -0
- package/concepts/ar/Tool-ExitPlanMode.md +62 -0
- package/concepts/ar/Tool-Glob.md +39 -0
- package/concepts/ar/Tool-Grep.md +57 -0
- package/concepts/ar/Tool-NotebookEdit.md +33 -0
- package/concepts/ar/Tool-Read.md +56 -0
- package/concepts/ar/Tool-SendMessage.md +41 -0
- package/concepts/ar/Tool-Skill.md +56 -0
- package/concepts/ar/Tool-Task.md +51 -0
- package/concepts/ar/Tool-TaskCreate.md +78 -0
- package/concepts/ar/Tool-TaskGet.md +56 -0
- package/concepts/ar/Tool-TaskList.md +56 -0
- package/concepts/ar/Tool-TaskOutput.md +40 -0
- package/concepts/ar/Tool-TaskStop.md +32 -0
- package/concepts/ar/Tool-TaskUpdate.md +123 -0
- package/concepts/ar/Tool-TeamCreate.md +38 -0
- package/concepts/ar/Tool-TeamDelete.md +30 -0
- package/concepts/ar/Tool-WebFetch.md +55 -0
- package/concepts/ar/Tool-WebSearch.md +58 -0
- package/concepts/ar/Tool-Write.md +39 -0
- package/concepts/ar/Tool-executeCode.md +41 -0
- package/concepts/ar/Tool-getDiagnostics.md +32 -0
- package/concepts/ar/Tools.md +67 -0
- package/concepts/ar/ToolsFirst.md +77 -0
- package/concepts/ar/TranslateContextPollution.md +46 -0
- package/concepts/ar/UltraPlan.md +55 -0
- package/concepts/da/BodyDiffJSON.md +32 -0
- package/concepts/da/BodyFields.md +42 -0
- package/concepts/da/CacheRebuild.md +36 -0
- package/concepts/da/GlobalSettings.md +232 -0
- package/concepts/da/KVCacheContent.md +49 -0
- package/concepts/da/MainAgent.md +23 -0
- package/concepts/da/ProxySwitch.md +50 -0
- package/concepts/da/QRCode.md +25 -0
- package/concepts/da/ResponseFields.md +50 -0
- package/concepts/da/SubAgent-Search.md +20 -0
- package/concepts/da/Teammate.md +26 -0
- package/concepts/da/Tool-Agent.md +125 -0
- package/concepts/da/Tool-AskUserQuestion.md +75 -0
- package/concepts/da/Tool-Bash.md +167 -0
- package/concepts/da/Tool-Edit.md +46 -0
- package/concepts/da/Tool-EnterPlanMode.md +128 -0
- package/concepts/da/Tool-EnterWorktree.md +56 -0
- package/concepts/da/Tool-ExitPlanMode.md +62 -0
- package/concepts/da/Tool-Glob.md +39 -0
- package/concepts/da/Tool-Grep.md +57 -0
- package/concepts/da/Tool-NotebookEdit.md +33 -0
- package/concepts/da/Tool-Read.md +56 -0
- package/concepts/da/Tool-SendMessage.md +41 -0
- package/concepts/da/Tool-Skill.md +56 -0
- package/concepts/da/Tool-Task.md +51 -0
- package/concepts/da/Tool-TaskCreate.md +78 -0
- package/concepts/da/Tool-TaskGet.md +56 -0
- package/concepts/da/Tool-TaskList.md +56 -0
- package/concepts/da/Tool-TaskOutput.md +40 -0
- package/concepts/da/Tool-TaskStop.md +32 -0
- package/concepts/da/Tool-TaskUpdate.md +123 -0
- package/concepts/da/Tool-TeamCreate.md +38 -0
- package/concepts/da/Tool-TeamDelete.md +30 -0
- package/concepts/da/Tool-WebFetch.md +55 -0
- package/concepts/da/Tool-WebSearch.md +58 -0
- package/concepts/da/Tool-Write.md +39 -0
- package/concepts/da/Tool-executeCode.md +41 -0
- package/concepts/da/Tool-getDiagnostics.md +32 -0
- package/concepts/da/Tools.md +67 -0
- package/concepts/da/ToolsFirst.md +77 -0
- package/concepts/da/TranslateContextPollution.md +46 -0
- package/concepts/da/UltraPlan.md +55 -0
- package/concepts/de/BodyDiffJSON.md +32 -0
- package/concepts/de/BodyFields.md +42 -0
- package/concepts/de/CacheRebuild.md +36 -0
- package/concepts/de/GlobalSettings.md +232 -0
- package/concepts/de/KVCacheContent.md +49 -0
- package/concepts/de/MainAgent.md +23 -0
- package/concepts/de/ProxySwitch.md +50 -0
- package/concepts/de/QRCode.md +25 -0
- package/concepts/de/ResponseFields.md +50 -0
- package/concepts/de/SubAgent-Search.md +20 -0
- package/concepts/de/Teammate.md +26 -0
- package/concepts/de/Tool-Agent.md +125 -0
- package/concepts/de/Tool-AskUserQuestion.md +75 -0
- package/concepts/de/Tool-Bash.md +167 -0
- package/concepts/de/Tool-Edit.md +46 -0
- package/concepts/de/Tool-EnterPlanMode.md +128 -0
- package/concepts/de/Tool-EnterWorktree.md +56 -0
- package/concepts/de/Tool-ExitPlanMode.md +62 -0
- package/concepts/de/Tool-Glob.md +39 -0
- package/concepts/de/Tool-Grep.md +57 -0
- package/concepts/de/Tool-NotebookEdit.md +33 -0
- package/concepts/de/Tool-Read.md +56 -0
- package/concepts/de/Tool-SendMessage.md +41 -0
- package/concepts/de/Tool-Skill.md +56 -0
- package/concepts/de/Tool-Task.md +51 -0
- package/concepts/de/Tool-TaskCreate.md +78 -0
- package/concepts/de/Tool-TaskGet.md +56 -0
- package/concepts/de/Tool-TaskList.md +56 -0
- package/concepts/de/Tool-TaskOutput.md +40 -0
- package/concepts/de/Tool-TaskStop.md +32 -0
- package/concepts/de/Tool-TaskUpdate.md +123 -0
- package/concepts/de/Tool-TeamCreate.md +38 -0
- package/concepts/de/Tool-TeamDelete.md +30 -0
- package/concepts/de/Tool-WebFetch.md +55 -0
- package/concepts/de/Tool-WebSearch.md +58 -0
- package/concepts/de/Tool-Write.md +39 -0
- package/concepts/de/Tool-executeCode.md +41 -0
- package/concepts/de/Tool-getDiagnostics.md +32 -0
- package/concepts/de/Tools.md +67 -0
- package/concepts/de/ToolsFirst.md +77 -0
- package/concepts/de/TranslateContextPollution.md +46 -0
- package/concepts/de/UltraPlan.md +55 -0
- package/concepts/en/BodyDiffJSON.md +32 -0
- package/concepts/en/BodyFields.md +42 -0
- package/concepts/en/CacheRebuild.md +36 -0
- package/concepts/en/GlobalSettings.md +232 -0
- package/concepts/en/KVCacheContent.md +49 -0
- package/concepts/en/MainAgent.md +23 -0
- package/concepts/en/ProxySwitch.md +50 -0
- package/concepts/en/QRCode.md +29 -0
- package/concepts/en/ResponseFields.md +50 -0
- package/concepts/en/SubAgent-Search.md +20 -0
- package/concepts/en/Teammate.md +26 -0
- package/concepts/en/Tool-Agent.md +125 -0
- package/concepts/en/Tool-AskUserQuestion.md +75 -0
- package/concepts/en/Tool-Bash.md +167 -0
- package/concepts/en/Tool-Edit.md +46 -0
- package/concepts/en/Tool-EnterPlanMode.md +128 -0
- package/concepts/en/Tool-EnterWorktree.md +56 -0
- package/concepts/en/Tool-ExitPlanMode.md +62 -0
- package/concepts/en/Tool-Glob.md +39 -0
- package/concepts/en/Tool-Grep.md +57 -0
- package/concepts/en/Tool-NotebookEdit.md +33 -0
- package/concepts/en/Tool-Read.md +56 -0
- package/concepts/en/Tool-SendMessage.md +41 -0
- package/concepts/en/Tool-Skill.md +56 -0
- package/concepts/en/Tool-Task.md +51 -0
- package/concepts/en/Tool-TaskCreate.md +78 -0
- package/concepts/en/Tool-TaskGet.md +56 -0
- package/concepts/en/Tool-TaskList.md +56 -0
- package/concepts/en/Tool-TaskOutput.md +40 -0
- package/concepts/en/Tool-TaskStop.md +32 -0
- package/concepts/en/Tool-TaskUpdate.md +123 -0
- package/concepts/en/Tool-TeamCreate.md +38 -0
- package/concepts/en/Tool-TeamDelete.md +30 -0
- package/concepts/en/Tool-WebFetch.md +55 -0
- package/concepts/en/Tool-WebSearch.md +58 -0
- package/concepts/en/Tool-Write.md +39 -0
- package/concepts/en/Tool-executeCode.md +41 -0
- package/concepts/en/Tool-getDiagnostics.md +32 -0
- package/concepts/en/Tools.md +67 -0
- package/concepts/en/ToolsFirst.md +77 -0
- package/concepts/en/TranslateContextPollution.md +46 -0
- package/concepts/en/UltraPlan.md +55 -0
- package/concepts/es/BodyDiffJSON.md +32 -0
- package/concepts/es/BodyFields.md +42 -0
- package/concepts/es/CacheRebuild.md +36 -0
- package/concepts/es/GlobalSettings.md +232 -0
- package/concepts/es/KVCacheContent.md +49 -0
- package/concepts/es/MainAgent.md +23 -0
- package/concepts/es/ProxySwitch.md +50 -0
- package/concepts/es/QRCode.md +25 -0
- package/concepts/es/ResponseFields.md +50 -0
- package/concepts/es/SubAgent-Search.md +20 -0
- package/concepts/es/Teammate.md +26 -0
- package/concepts/es/Tool-Agent.md +125 -0
- package/concepts/es/Tool-AskUserQuestion.md +75 -0
- package/concepts/es/Tool-Bash.md +167 -0
- package/concepts/es/Tool-Edit.md +46 -0
- package/concepts/es/Tool-EnterPlanMode.md +128 -0
- package/concepts/es/Tool-EnterWorktree.md +56 -0
- package/concepts/es/Tool-ExitPlanMode.md +62 -0
- package/concepts/es/Tool-Glob.md +39 -0
- package/concepts/es/Tool-Grep.md +57 -0
- package/concepts/es/Tool-NotebookEdit.md +33 -0
- package/concepts/es/Tool-Read.md +56 -0
- package/concepts/es/Tool-SendMessage.md +41 -0
- package/concepts/es/Tool-Skill.md +56 -0
- package/concepts/es/Tool-Task.md +51 -0
- package/concepts/es/Tool-TaskCreate.md +78 -0
- package/concepts/es/Tool-TaskGet.md +56 -0
- package/concepts/es/Tool-TaskList.md +56 -0
- package/concepts/es/Tool-TaskOutput.md +40 -0
- package/concepts/es/Tool-TaskStop.md +32 -0
- package/concepts/es/Tool-TaskUpdate.md +123 -0
- package/concepts/es/Tool-TeamCreate.md +38 -0
- package/concepts/es/Tool-TeamDelete.md +30 -0
- package/concepts/es/Tool-WebFetch.md +55 -0
- package/concepts/es/Tool-WebSearch.md +58 -0
- package/concepts/es/Tool-Write.md +39 -0
- package/concepts/es/Tool-executeCode.md +41 -0
- package/concepts/es/Tool-getDiagnostics.md +32 -0
- package/concepts/es/Tools.md +67 -0
- package/concepts/es/ToolsFirst.md +77 -0
- package/concepts/es/TranslateContextPollution.md +46 -0
- package/concepts/es/UltraPlan.md +55 -0
- package/concepts/fr/BodyDiffJSON.md +32 -0
- package/concepts/fr/BodyFields.md +42 -0
- package/concepts/fr/CacheRebuild.md +36 -0
- package/concepts/fr/GlobalSettings.md +232 -0
- package/concepts/fr/KVCacheContent.md +49 -0
- package/concepts/fr/MainAgent.md +23 -0
- package/concepts/fr/ProxySwitch.md +50 -0
- package/concepts/fr/QRCode.md +25 -0
- package/concepts/fr/ResponseFields.md +50 -0
- package/concepts/fr/SubAgent-Search.md +20 -0
- package/concepts/fr/Teammate.md +26 -0
- package/concepts/fr/Tool-Agent.md +125 -0
- package/concepts/fr/Tool-AskUserQuestion.md +75 -0
- package/concepts/fr/Tool-Bash.md +167 -0
- package/concepts/fr/Tool-Edit.md +46 -0
- package/concepts/fr/Tool-EnterPlanMode.md +128 -0
- package/concepts/fr/Tool-EnterWorktree.md +56 -0
- package/concepts/fr/Tool-ExitPlanMode.md +62 -0
- package/concepts/fr/Tool-Glob.md +39 -0
- package/concepts/fr/Tool-Grep.md +57 -0
- package/concepts/fr/Tool-NotebookEdit.md +33 -0
- package/concepts/fr/Tool-Read.md +56 -0
- package/concepts/fr/Tool-SendMessage.md +41 -0
- package/concepts/fr/Tool-Skill.md +56 -0
- package/concepts/fr/Tool-Task.md +51 -0
- package/concepts/fr/Tool-TaskCreate.md +78 -0
- package/concepts/fr/Tool-TaskGet.md +56 -0
- package/concepts/fr/Tool-TaskList.md +56 -0
- package/concepts/fr/Tool-TaskOutput.md +40 -0
- package/concepts/fr/Tool-TaskStop.md +32 -0
- package/concepts/fr/Tool-TaskUpdate.md +123 -0
- package/concepts/fr/Tool-TeamCreate.md +38 -0
- package/concepts/fr/Tool-TeamDelete.md +30 -0
- package/concepts/fr/Tool-WebFetch.md +55 -0
- package/concepts/fr/Tool-WebSearch.md +58 -0
- package/concepts/fr/Tool-Write.md +39 -0
- package/concepts/fr/Tool-executeCode.md +41 -0
- package/concepts/fr/Tool-getDiagnostics.md +32 -0
- package/concepts/fr/Tools.md +67 -0
- package/concepts/fr/ToolsFirst.md +77 -0
- package/concepts/fr/TranslateContextPollution.md +46 -0
- package/concepts/fr/UltraPlan.md +55 -0
- package/concepts/it/BodyDiffJSON.md +32 -0
- package/concepts/it/BodyFields.md +42 -0
- package/concepts/it/CacheRebuild.md +36 -0
- package/concepts/it/GlobalSettings.md +232 -0
- package/concepts/it/KVCacheContent.md +49 -0
- package/concepts/it/MainAgent.md +23 -0
- package/concepts/it/ProxySwitch.md +50 -0
- package/concepts/it/QRCode.md +25 -0
- package/concepts/it/ResponseFields.md +50 -0
- package/concepts/it/SubAgent-Search.md +20 -0
- package/concepts/it/Teammate.md +26 -0
- package/concepts/it/Tool-Agent.md +125 -0
- package/concepts/it/Tool-AskUserQuestion.md +75 -0
- package/concepts/it/Tool-Bash.md +167 -0
- package/concepts/it/Tool-Edit.md +46 -0
- package/concepts/it/Tool-EnterPlanMode.md +128 -0
- package/concepts/it/Tool-EnterWorktree.md +56 -0
- package/concepts/it/Tool-ExitPlanMode.md +62 -0
- package/concepts/it/Tool-Glob.md +39 -0
- package/concepts/it/Tool-Grep.md +57 -0
- package/concepts/it/Tool-NotebookEdit.md +33 -0
- package/concepts/it/Tool-Read.md +56 -0
- package/concepts/it/Tool-SendMessage.md +41 -0
- package/concepts/it/Tool-Skill.md +56 -0
- package/concepts/it/Tool-Task.md +51 -0
- package/concepts/it/Tool-TaskCreate.md +78 -0
- package/concepts/it/Tool-TaskGet.md +56 -0
- package/concepts/it/Tool-TaskList.md +56 -0
- package/concepts/it/Tool-TaskOutput.md +40 -0
- package/concepts/it/Tool-TaskStop.md +32 -0
- package/concepts/it/Tool-TaskUpdate.md +123 -0
- package/concepts/it/Tool-TeamCreate.md +38 -0
- package/concepts/it/Tool-TeamDelete.md +30 -0
- package/concepts/it/Tool-WebFetch.md +55 -0
- package/concepts/it/Tool-WebSearch.md +58 -0
- package/concepts/it/Tool-Write.md +39 -0
- package/concepts/it/Tool-executeCode.md +41 -0
- package/concepts/it/Tool-getDiagnostics.md +32 -0
- package/concepts/it/Tools.md +67 -0
- package/concepts/it/ToolsFirst.md +77 -0
- package/concepts/it/TranslateContextPollution.md +46 -0
- package/concepts/it/UltraPlan.md +55 -0
- package/concepts/ja/BodyDiffJSON.md +32 -0
- package/concepts/ja/BodyFields.md +42 -0
- package/concepts/ja/CacheRebuild.md +36 -0
- package/concepts/ja/GlobalSettings.md +232 -0
- package/concepts/ja/KVCacheContent.md +49 -0
- package/concepts/ja/MainAgent.md +23 -0
- package/concepts/ja/ProxySwitch.md +50 -0
- package/concepts/ja/QRCode.md +25 -0
- package/concepts/ja/ResponseFields.md +50 -0
- package/concepts/ja/SubAgent-Search.md +20 -0
- package/concepts/ja/Teammate.md +26 -0
- package/concepts/ja/Tool-Agent.md +125 -0
- package/concepts/ja/Tool-AskUserQuestion.md +75 -0
- package/concepts/ja/Tool-Bash.md +167 -0
- package/concepts/ja/Tool-Edit.md +46 -0
- package/concepts/ja/Tool-EnterPlanMode.md +128 -0
- package/concepts/ja/Tool-EnterWorktree.md +56 -0
- package/concepts/ja/Tool-ExitPlanMode.md +62 -0
- package/concepts/ja/Tool-Glob.md +39 -0
- package/concepts/ja/Tool-Grep.md +57 -0
- package/concepts/ja/Tool-NotebookEdit.md +33 -0
- package/concepts/ja/Tool-Read.md +56 -0
- package/concepts/ja/Tool-SendMessage.md +41 -0
- package/concepts/ja/Tool-Skill.md +56 -0
- package/concepts/ja/Tool-Task.md +51 -0
- package/concepts/ja/Tool-TaskCreate.md +78 -0
- package/concepts/ja/Tool-TaskGet.md +56 -0
- package/concepts/ja/Tool-TaskList.md +56 -0
- package/concepts/ja/Tool-TaskOutput.md +40 -0
- package/concepts/ja/Tool-TaskStop.md +32 -0
- package/concepts/ja/Tool-TaskUpdate.md +123 -0
- package/concepts/ja/Tool-TeamCreate.md +38 -0
- package/concepts/ja/Tool-TeamDelete.md +30 -0
- package/concepts/ja/Tool-WebFetch.md +55 -0
- package/concepts/ja/Tool-WebSearch.md +58 -0
- package/concepts/ja/Tool-Write.md +39 -0
- package/concepts/ja/Tool-executeCode.md +41 -0
- package/concepts/ja/Tool-getDiagnostics.md +32 -0
- package/concepts/ja/Tools.md +67 -0
- package/concepts/ja/ToolsFirst.md +77 -0
- package/concepts/ja/TranslateContextPollution.md +46 -0
- package/concepts/ja/UltraPlan.md +55 -0
- package/concepts/ko/BodyDiffJSON.md +32 -0
- package/concepts/ko/BodyFields.md +42 -0
- package/concepts/ko/CacheRebuild.md +36 -0
- package/concepts/ko/GlobalSettings.md +232 -0
- package/concepts/ko/KVCacheContent.md +49 -0
- package/concepts/ko/MainAgent.md +23 -0
- package/concepts/ko/ProxySwitch.md +50 -0
- package/concepts/ko/QRCode.md +25 -0
- package/concepts/ko/ResponseFields.md +50 -0
- package/concepts/ko/SubAgent-Search.md +20 -0
- package/concepts/ko/Teammate.md +26 -0
- package/concepts/ko/Tool-Agent.md +125 -0
- package/concepts/ko/Tool-AskUserQuestion.md +75 -0
- package/concepts/ko/Tool-Bash.md +167 -0
- package/concepts/ko/Tool-Edit.md +46 -0
- package/concepts/ko/Tool-EnterPlanMode.md +128 -0
- package/concepts/ko/Tool-EnterWorktree.md +56 -0
- package/concepts/ko/Tool-ExitPlanMode.md +62 -0
- package/concepts/ko/Tool-Glob.md +39 -0
- package/concepts/ko/Tool-Grep.md +57 -0
- package/concepts/ko/Tool-NotebookEdit.md +33 -0
- package/concepts/ko/Tool-Read.md +56 -0
- package/concepts/ko/Tool-SendMessage.md +41 -0
- package/concepts/ko/Tool-Skill.md +56 -0
- package/concepts/ko/Tool-Task.md +51 -0
- package/concepts/ko/Tool-TaskCreate.md +78 -0
- package/concepts/ko/Tool-TaskGet.md +56 -0
- package/concepts/ko/Tool-TaskList.md +56 -0
- package/concepts/ko/Tool-TaskOutput.md +40 -0
- package/concepts/ko/Tool-TaskStop.md +32 -0
- package/concepts/ko/Tool-TaskUpdate.md +123 -0
- package/concepts/ko/Tool-TeamCreate.md +38 -0
- package/concepts/ko/Tool-TeamDelete.md +30 -0
- package/concepts/ko/Tool-WebFetch.md +55 -0
- package/concepts/ko/Tool-WebSearch.md +58 -0
- package/concepts/ko/Tool-Write.md +39 -0
- package/concepts/ko/Tool-executeCode.md +41 -0
- package/concepts/ko/Tool-getDiagnostics.md +32 -0
- package/concepts/ko/Tools.md +67 -0
- package/concepts/ko/ToolsFirst.md +77 -0
- package/concepts/ko/TranslateContextPollution.md +46 -0
- package/concepts/ko/UltraPlan.md +55 -0
- package/concepts/no/BodyDiffJSON.md +32 -0
- package/concepts/no/BodyFields.md +42 -0
- package/concepts/no/CacheRebuild.md +36 -0
- package/concepts/no/GlobalSettings.md +232 -0
- package/concepts/no/KVCacheContent.md +49 -0
- package/concepts/no/MainAgent.md +23 -0
- package/concepts/no/ProxySwitch.md +50 -0
- package/concepts/no/QRCode.md +25 -0
- package/concepts/no/ResponseFields.md +50 -0
- package/concepts/no/SubAgent-Search.md +20 -0
- package/concepts/no/Teammate.md +26 -0
- package/concepts/no/Tool-Agent.md +125 -0
- package/concepts/no/Tool-AskUserQuestion.md +75 -0
- package/concepts/no/Tool-Bash.md +167 -0
- package/concepts/no/Tool-Edit.md +46 -0
- package/concepts/no/Tool-EnterPlanMode.md +128 -0
- package/concepts/no/Tool-EnterWorktree.md +56 -0
- package/concepts/no/Tool-ExitPlanMode.md +62 -0
- package/concepts/no/Tool-Glob.md +39 -0
- package/concepts/no/Tool-Grep.md +57 -0
- package/concepts/no/Tool-NotebookEdit.md +33 -0
- package/concepts/no/Tool-Read.md +56 -0
- package/concepts/no/Tool-SendMessage.md +41 -0
- package/concepts/no/Tool-Skill.md +56 -0
- package/concepts/no/Tool-Task.md +51 -0
- package/concepts/no/Tool-TaskCreate.md +78 -0
- package/concepts/no/Tool-TaskGet.md +56 -0
- package/concepts/no/Tool-TaskList.md +56 -0
- package/concepts/no/Tool-TaskOutput.md +40 -0
- package/concepts/no/Tool-TaskStop.md +32 -0
- package/concepts/no/Tool-TaskUpdate.md +123 -0
- package/concepts/no/Tool-TeamCreate.md +38 -0
- package/concepts/no/Tool-TeamDelete.md +30 -0
- package/concepts/no/Tool-WebFetch.md +55 -0
- package/concepts/no/Tool-WebSearch.md +58 -0
- package/concepts/no/Tool-Write.md +39 -0
- package/concepts/no/Tool-executeCode.md +41 -0
- package/concepts/no/Tool-getDiagnostics.md +32 -0
- package/concepts/no/Tools.md +67 -0
- package/concepts/no/ToolsFirst.md +77 -0
- package/concepts/no/TranslateContextPollution.md +46 -0
- package/concepts/no/UltraPlan.md +55 -0
- package/concepts/pl/BodyDiffJSON.md +32 -0
- package/concepts/pl/BodyFields.md +42 -0
- package/concepts/pl/CacheRebuild.md +36 -0
- package/concepts/pl/GlobalSettings.md +232 -0
- package/concepts/pl/KVCacheContent.md +49 -0
- package/concepts/pl/MainAgent.md +23 -0
- package/concepts/pl/ProxySwitch.md +50 -0
- package/concepts/pl/QRCode.md +25 -0
- package/concepts/pl/ResponseFields.md +50 -0
- package/concepts/pl/SubAgent-Search.md +20 -0
- package/concepts/pl/Teammate.md +26 -0
- package/concepts/pl/Tool-Agent.md +125 -0
- package/concepts/pl/Tool-AskUserQuestion.md +75 -0
- package/concepts/pl/Tool-Bash.md +167 -0
- package/concepts/pl/Tool-Edit.md +46 -0
- package/concepts/pl/Tool-EnterPlanMode.md +128 -0
- package/concepts/pl/Tool-EnterWorktree.md +56 -0
- package/concepts/pl/Tool-ExitPlanMode.md +62 -0
- package/concepts/pl/Tool-Glob.md +39 -0
- package/concepts/pl/Tool-Grep.md +57 -0
- package/concepts/pl/Tool-NotebookEdit.md +33 -0
- package/concepts/pl/Tool-Read.md +56 -0
- package/concepts/pl/Tool-SendMessage.md +41 -0
- package/concepts/pl/Tool-Skill.md +56 -0
- package/concepts/pl/Tool-Task.md +51 -0
- package/concepts/pl/Tool-TaskCreate.md +78 -0
- package/concepts/pl/Tool-TaskGet.md +56 -0
- package/concepts/pl/Tool-TaskList.md +56 -0
- package/concepts/pl/Tool-TaskOutput.md +40 -0
- package/concepts/pl/Tool-TaskStop.md +32 -0
- package/concepts/pl/Tool-TaskUpdate.md +123 -0
- package/concepts/pl/Tool-TeamCreate.md +38 -0
- package/concepts/pl/Tool-TeamDelete.md +30 -0
- package/concepts/pl/Tool-WebFetch.md +55 -0
- package/concepts/pl/Tool-WebSearch.md +58 -0
- package/concepts/pl/Tool-Write.md +39 -0
- package/concepts/pl/Tool-executeCode.md +41 -0
- package/concepts/pl/Tool-getDiagnostics.md +32 -0
- package/concepts/pl/Tools.md +67 -0
- package/concepts/pl/ToolsFirst.md +77 -0
- package/concepts/pl/TranslateContextPollution.md +46 -0
- package/concepts/pl/UltraPlan.md +55 -0
- package/concepts/pt-BR/BodyDiffJSON.md +32 -0
- package/concepts/pt-BR/BodyFields.md +42 -0
- package/concepts/pt-BR/CacheRebuild.md +36 -0
- package/concepts/pt-BR/GlobalSettings.md +232 -0
- package/concepts/pt-BR/KVCacheContent.md +49 -0
- package/concepts/pt-BR/MainAgent.md +23 -0
- package/concepts/pt-BR/ProxySwitch.md +50 -0
- package/concepts/pt-BR/QRCode.md +25 -0
- package/concepts/pt-BR/ResponseFields.md +50 -0
- package/concepts/pt-BR/SubAgent-Search.md +20 -0
- package/concepts/pt-BR/Teammate.md +26 -0
- package/concepts/pt-BR/Tool-Agent.md +125 -0
- package/concepts/pt-BR/Tool-AskUserQuestion.md +75 -0
- package/concepts/pt-BR/Tool-Bash.md +167 -0
- package/concepts/pt-BR/Tool-Edit.md +46 -0
- package/concepts/pt-BR/Tool-EnterPlanMode.md +128 -0
- package/concepts/pt-BR/Tool-EnterWorktree.md +56 -0
- package/concepts/pt-BR/Tool-ExitPlanMode.md +62 -0
- package/concepts/pt-BR/Tool-Glob.md +39 -0
- package/concepts/pt-BR/Tool-Grep.md +57 -0
- package/concepts/pt-BR/Tool-NotebookEdit.md +33 -0
- package/concepts/pt-BR/Tool-Read.md +56 -0
- package/concepts/pt-BR/Tool-SendMessage.md +41 -0
- package/concepts/pt-BR/Tool-Skill.md +56 -0
- package/concepts/pt-BR/Tool-Task.md +51 -0
- package/concepts/pt-BR/Tool-TaskCreate.md +78 -0
- package/concepts/pt-BR/Tool-TaskGet.md +56 -0
- package/concepts/pt-BR/Tool-TaskList.md +56 -0
- package/concepts/pt-BR/Tool-TaskOutput.md +40 -0
- package/concepts/pt-BR/Tool-TaskStop.md +32 -0
- package/concepts/pt-BR/Tool-TaskUpdate.md +123 -0
- package/concepts/pt-BR/Tool-TeamCreate.md +38 -0
- package/concepts/pt-BR/Tool-TeamDelete.md +30 -0
- package/concepts/pt-BR/Tool-WebFetch.md +55 -0
- package/concepts/pt-BR/Tool-WebSearch.md +58 -0
- package/concepts/pt-BR/Tool-Write.md +39 -0
- package/concepts/pt-BR/Tool-executeCode.md +41 -0
- package/concepts/pt-BR/Tool-getDiagnostics.md +32 -0
- package/concepts/pt-BR/Tools.md +67 -0
- package/concepts/pt-BR/ToolsFirst.md +77 -0
- package/concepts/pt-BR/TranslateContextPollution.md +46 -0
- package/concepts/pt-BR/UltraPlan.md +55 -0
- package/concepts/ru/BodyDiffJSON.md +32 -0
- package/concepts/ru/BodyFields.md +42 -0
- package/concepts/ru/CacheRebuild.md +36 -0
- package/concepts/ru/GlobalSettings.md +232 -0
- package/concepts/ru/KVCacheContent.md +49 -0
- package/concepts/ru/MainAgent.md +23 -0
- package/concepts/ru/ProxySwitch.md +50 -0
- package/concepts/ru/QRCode.md +25 -0
- package/concepts/ru/ResponseFields.md +50 -0
- package/concepts/ru/SubAgent-Search.md +20 -0
- package/concepts/ru/Teammate.md +26 -0
- package/concepts/ru/Tool-Agent.md +125 -0
- package/concepts/ru/Tool-AskUserQuestion.md +75 -0
- package/concepts/ru/Tool-Bash.md +167 -0
- package/concepts/ru/Tool-Edit.md +46 -0
- package/concepts/ru/Tool-EnterPlanMode.md +128 -0
- package/concepts/ru/Tool-EnterWorktree.md +56 -0
- package/concepts/ru/Tool-ExitPlanMode.md +62 -0
- package/concepts/ru/Tool-Glob.md +39 -0
- package/concepts/ru/Tool-Grep.md +57 -0
- package/concepts/ru/Tool-NotebookEdit.md +33 -0
- package/concepts/ru/Tool-Read.md +56 -0
- package/concepts/ru/Tool-SendMessage.md +41 -0
- package/concepts/ru/Tool-Skill.md +56 -0
- package/concepts/ru/Tool-Task.md +51 -0
- package/concepts/ru/Tool-TaskCreate.md +78 -0
- package/concepts/ru/Tool-TaskGet.md +56 -0
- package/concepts/ru/Tool-TaskList.md +56 -0
- package/concepts/ru/Tool-TaskOutput.md +40 -0
- package/concepts/ru/Tool-TaskStop.md +32 -0
- package/concepts/ru/Tool-TaskUpdate.md +123 -0
- package/concepts/ru/Tool-TeamCreate.md +38 -0
- package/concepts/ru/Tool-TeamDelete.md +30 -0
- package/concepts/ru/Tool-WebFetch.md +55 -0
- package/concepts/ru/Tool-WebSearch.md +58 -0
- package/concepts/ru/Tool-Write.md +39 -0
- package/concepts/ru/Tool-executeCode.md +41 -0
- package/concepts/ru/Tool-getDiagnostics.md +32 -0
- package/concepts/ru/Tools.md +67 -0
- package/concepts/ru/ToolsFirst.md +77 -0
- package/concepts/ru/TranslateContextPollution.md +46 -0
- package/concepts/ru/UltraPlan.md +55 -0
- package/concepts/th/BodyDiffJSON.md +32 -0
- package/concepts/th/BodyFields.md +42 -0
- package/concepts/th/CacheRebuild.md +36 -0
- package/concepts/th/GlobalSettings.md +232 -0
- package/concepts/th/KVCacheContent.md +49 -0
- package/concepts/th/MainAgent.md +23 -0
- package/concepts/th/ProxySwitch.md +50 -0
- package/concepts/th/QRCode.md +25 -0
- package/concepts/th/ResponseFields.md +50 -0
- package/concepts/th/SubAgent-Search.md +20 -0
- package/concepts/th/Teammate.md +26 -0
- package/concepts/th/Tool-Agent.md +125 -0
- package/concepts/th/Tool-AskUserQuestion.md +75 -0
- package/concepts/th/Tool-Bash.md +167 -0
- package/concepts/th/Tool-Edit.md +46 -0
- package/concepts/th/Tool-EnterPlanMode.md +128 -0
- package/concepts/th/Tool-EnterWorktree.md +56 -0
- package/concepts/th/Tool-ExitPlanMode.md +62 -0
- package/concepts/th/Tool-Glob.md +39 -0
- package/concepts/th/Tool-Grep.md +57 -0
- package/concepts/th/Tool-NotebookEdit.md +33 -0
- package/concepts/th/Tool-Read.md +56 -0
- package/concepts/th/Tool-SendMessage.md +41 -0
- package/concepts/th/Tool-Skill.md +56 -0
- package/concepts/th/Tool-Task.md +51 -0
- package/concepts/th/Tool-TaskCreate.md +78 -0
- package/concepts/th/Tool-TaskGet.md +56 -0
- package/concepts/th/Tool-TaskList.md +56 -0
- package/concepts/th/Tool-TaskOutput.md +40 -0
- package/concepts/th/Tool-TaskStop.md +32 -0
- package/concepts/th/Tool-TaskUpdate.md +123 -0
- package/concepts/th/Tool-TeamCreate.md +38 -0
- package/concepts/th/Tool-TeamDelete.md +30 -0
- package/concepts/th/Tool-WebFetch.md +55 -0
- package/concepts/th/Tool-WebSearch.md +58 -0
- package/concepts/th/Tool-Write.md +39 -0
- package/concepts/th/Tool-executeCode.md +41 -0
- package/concepts/th/Tool-getDiagnostics.md +32 -0
- package/concepts/th/Tools.md +67 -0
- package/concepts/th/ToolsFirst.md +77 -0
- package/concepts/th/TranslateContextPollution.md +46 -0
- package/concepts/th/UltraPlan.md +55 -0
- package/concepts/tr/BodyDiffJSON.md +32 -0
- package/concepts/tr/BodyFields.md +42 -0
- package/concepts/tr/CacheRebuild.md +36 -0
- package/concepts/tr/GlobalSettings.md +232 -0
- package/concepts/tr/KVCacheContent.md +49 -0
- package/concepts/tr/MainAgent.md +23 -0
- package/concepts/tr/ProxySwitch.md +50 -0
- package/concepts/tr/QRCode.md +25 -0
- package/concepts/tr/ResponseFields.md +50 -0
- package/concepts/tr/SubAgent-Search.md +20 -0
- package/concepts/tr/Teammate.md +26 -0
- package/concepts/tr/Tool-Agent.md +125 -0
- package/concepts/tr/Tool-AskUserQuestion.md +75 -0
- package/concepts/tr/Tool-Bash.md +167 -0
- package/concepts/tr/Tool-Edit.md +46 -0
- package/concepts/tr/Tool-EnterPlanMode.md +128 -0
- package/concepts/tr/Tool-EnterWorktree.md +56 -0
- package/concepts/tr/Tool-ExitPlanMode.md +62 -0
- package/concepts/tr/Tool-Glob.md +39 -0
- package/concepts/tr/Tool-Grep.md +57 -0
- package/concepts/tr/Tool-NotebookEdit.md +33 -0
- package/concepts/tr/Tool-Read.md +56 -0
- package/concepts/tr/Tool-SendMessage.md +41 -0
- package/concepts/tr/Tool-Skill.md +56 -0
- package/concepts/tr/Tool-Task.md +51 -0
- package/concepts/tr/Tool-TaskCreate.md +78 -0
- package/concepts/tr/Tool-TaskGet.md +56 -0
- package/concepts/tr/Tool-TaskList.md +56 -0
- package/concepts/tr/Tool-TaskOutput.md +40 -0
- package/concepts/tr/Tool-TaskStop.md +32 -0
- package/concepts/tr/Tool-TaskUpdate.md +123 -0
- package/concepts/tr/Tool-TeamCreate.md +38 -0
- package/concepts/tr/Tool-TeamDelete.md +30 -0
- package/concepts/tr/Tool-WebFetch.md +55 -0
- package/concepts/tr/Tool-WebSearch.md +58 -0
- package/concepts/tr/Tool-Write.md +39 -0
- package/concepts/tr/Tool-executeCode.md +41 -0
- package/concepts/tr/Tool-getDiagnostics.md +32 -0
- package/concepts/tr/Tools.md +67 -0
- package/concepts/tr/ToolsFirst.md +77 -0
- package/concepts/tr/TranslateContextPollution.md +46 -0
- package/concepts/tr/UltraPlan.md +55 -0
- package/concepts/uk/BodyDiffJSON.md +32 -0
- package/concepts/uk/BodyFields.md +42 -0
- package/concepts/uk/CacheRebuild.md +36 -0
- package/concepts/uk/GlobalSettings.md +232 -0
- package/concepts/uk/KVCacheContent.md +49 -0
- package/concepts/uk/MainAgent.md +23 -0
- package/concepts/uk/ProxySwitch.md +50 -0
- package/concepts/uk/QRCode.md +25 -0
- package/concepts/uk/ResponseFields.md +50 -0
- package/concepts/uk/SubAgent-Search.md +20 -0
- package/concepts/uk/Teammate.md +26 -0
- package/concepts/uk/Tool-Agent.md +125 -0
- package/concepts/uk/Tool-AskUserQuestion.md +75 -0
- package/concepts/uk/Tool-Bash.md +167 -0
- package/concepts/uk/Tool-Edit.md +46 -0
- package/concepts/uk/Tool-EnterPlanMode.md +128 -0
- package/concepts/uk/Tool-EnterWorktree.md +56 -0
- package/concepts/uk/Tool-ExitPlanMode.md +62 -0
- package/concepts/uk/Tool-Glob.md +39 -0
- package/concepts/uk/Tool-Grep.md +57 -0
- package/concepts/uk/Tool-NotebookEdit.md +33 -0
- package/concepts/uk/Tool-Read.md +56 -0
- package/concepts/uk/Tool-SendMessage.md +41 -0
- package/concepts/uk/Tool-Skill.md +56 -0
- package/concepts/uk/Tool-Task.md +51 -0
- package/concepts/uk/Tool-TaskCreate.md +78 -0
- package/concepts/uk/Tool-TaskGet.md +56 -0
- package/concepts/uk/Tool-TaskList.md +56 -0
- package/concepts/uk/Tool-TaskOutput.md +40 -0
- package/concepts/uk/Tool-TaskStop.md +32 -0
- package/concepts/uk/Tool-TaskUpdate.md +123 -0
- package/concepts/uk/Tool-TeamCreate.md +38 -0
- package/concepts/uk/Tool-TeamDelete.md +30 -0
- package/concepts/uk/Tool-WebFetch.md +55 -0
- package/concepts/uk/Tool-WebSearch.md +58 -0
- package/concepts/uk/Tool-Write.md +39 -0
- package/concepts/uk/Tool-executeCode.md +41 -0
- package/concepts/uk/Tool-getDiagnostics.md +32 -0
- package/concepts/uk/Tools.md +67 -0
- package/concepts/uk/ToolsFirst.md +77 -0
- package/concepts/uk/TranslateContextPollution.md +46 -0
- package/concepts/uk/UltraPlan.md +55 -0
- package/concepts/zh/BodyDiffJSON.md +32 -0
- package/concepts/zh/BodyFields.md +42 -0
- package/concepts/zh/CacheRebuild.md +36 -0
- package/concepts/zh/GlobalSettings.md +232 -0
- package/concepts/zh/KVCacheContent.md +49 -0
- package/concepts/zh/MainAgent.md +23 -0
- package/concepts/zh/ProxySwitch.md +50 -0
- package/concepts/zh/QRCode.md +29 -0
- package/concepts/zh/ResponseFields.md +50 -0
- package/concepts/zh/SubAgent-Search.md +20 -0
- package/concepts/zh/Teammate.md +26 -0
- package/concepts/zh/Tool-Agent.md +125 -0
- package/concepts/zh/Tool-AskUserQuestion.md +75 -0
- package/concepts/zh/Tool-Bash.md +167 -0
- package/concepts/zh/Tool-Edit.md +46 -0
- package/concepts/zh/Tool-EnterPlanMode.md +128 -0
- package/concepts/zh/Tool-EnterWorktree.md +56 -0
- package/concepts/zh/Tool-ExitPlanMode.md +62 -0
- package/concepts/zh/Tool-Glob.md +39 -0
- package/concepts/zh/Tool-Grep.md +57 -0
- package/concepts/zh/Tool-NotebookEdit.md +33 -0
- package/concepts/zh/Tool-Read.md +56 -0
- package/concepts/zh/Tool-SendMessage.md +41 -0
- package/concepts/zh/Tool-Skill.md +56 -0
- package/concepts/zh/Tool-Task.md +51 -0
- package/concepts/zh/Tool-TaskCreate.md +78 -0
- package/concepts/zh/Tool-TaskGet.md +56 -0
- package/concepts/zh/Tool-TaskList.md +56 -0
- package/concepts/zh/Tool-TaskOutput.md +40 -0
- package/concepts/zh/Tool-TaskStop.md +32 -0
- package/concepts/zh/Tool-TaskUpdate.md +123 -0
- package/concepts/zh/Tool-TeamCreate.md +38 -0
- package/concepts/zh/Tool-TeamDelete.md +30 -0
- package/concepts/zh/Tool-WebFetch.md +55 -0
- package/concepts/zh/Tool-WebSearch.md +58 -0
- package/concepts/zh/Tool-Write.md +39 -0
- package/concepts/zh/Tool-executeCode.md +41 -0
- package/concepts/zh/Tool-getDiagnostics.md +32 -0
- package/concepts/zh/Tools.md +67 -0
- package/concepts/zh/ToolsFirst.md +77 -0
- package/concepts/zh/TranslateContextPollution.md +46 -0
- package/concepts/zh/UltraPlan.md +55 -0
- package/concepts/zh-TW/BodyDiffJSON.md +32 -0
- package/concepts/zh-TW/BodyFields.md +42 -0
- package/concepts/zh-TW/CacheRebuild.md +36 -0
- package/concepts/zh-TW/GlobalSettings.md +232 -0
- package/concepts/zh-TW/KVCacheContent.md +49 -0
- package/concepts/zh-TW/MainAgent.md +23 -0
- package/concepts/zh-TW/ProxySwitch.md +50 -0
- package/concepts/zh-TW/QRCode.md +25 -0
- package/concepts/zh-TW/ResponseFields.md +50 -0
- package/concepts/zh-TW/SubAgent-Search.md +20 -0
- package/concepts/zh-TW/Teammate.md +26 -0
- package/concepts/zh-TW/Tool-Agent.md +125 -0
- package/concepts/zh-TW/Tool-AskUserQuestion.md +75 -0
- package/concepts/zh-TW/Tool-Bash.md +167 -0
- package/concepts/zh-TW/Tool-Edit.md +46 -0
- package/concepts/zh-TW/Tool-EnterPlanMode.md +128 -0
- package/concepts/zh-TW/Tool-EnterWorktree.md +56 -0
- package/concepts/zh-TW/Tool-ExitPlanMode.md +62 -0
- package/concepts/zh-TW/Tool-Glob.md +39 -0
- package/concepts/zh-TW/Tool-Grep.md +57 -0
- package/concepts/zh-TW/Tool-NotebookEdit.md +33 -0
- package/concepts/zh-TW/Tool-Read.md +56 -0
- package/concepts/zh-TW/Tool-SendMessage.md +41 -0
- package/concepts/zh-TW/Tool-Skill.md +56 -0
- package/concepts/zh-TW/Tool-Task.md +51 -0
- package/concepts/zh-TW/Tool-TaskCreate.md +78 -0
- package/concepts/zh-TW/Tool-TaskGet.md +56 -0
- package/concepts/zh-TW/Tool-TaskList.md +56 -0
- package/concepts/zh-TW/Tool-TaskOutput.md +40 -0
- package/concepts/zh-TW/Tool-TaskStop.md +32 -0
- package/concepts/zh-TW/Tool-TaskUpdate.md +123 -0
- package/concepts/zh-TW/Tool-TeamCreate.md +38 -0
- package/concepts/zh-TW/Tool-TeamDelete.md +30 -0
- package/concepts/zh-TW/Tool-WebFetch.md +55 -0
- package/concepts/zh-TW/Tool-WebSearch.md +58 -0
- package/concepts/zh-TW/Tool-Write.md +39 -0
- package/concepts/zh-TW/Tool-executeCode.md +41 -0
- package/concepts/zh-TW/Tool-getDiagnostics.md +32 -0
- package/concepts/zh-TW/Tools.md +67 -0
- package/concepts/zh-TW/ToolsFirst.md +77 -0
- package/concepts/zh-TW/TranslateContextPollution.md +46 -0
- package/concepts/zh-TW/UltraPlan.md +55 -0
- package/dist/assets/App-BzrN42Qt.js +41 -0
- package/dist/assets/App-fG2r3jFq.css +1 -0
- package/dist/assets/AppHeader-B3hrnZr-.css +41 -0
- package/dist/assets/AppHeader.module-BMU2vyC4.js +1246 -0
- package/dist/assets/Mobile-BnDkLcBv.css +1 -0
- package/dist/assets/Mobile-C9wxQTXV.js +10 -0
- package/dist/assets/_baseUniq-CXWHShmB.js +1 -0
- package/dist/assets/arc-qbol0NJo.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-COZebb1N.js +36 -0
- package/dist/assets/blockDiagram-DXYQGD6D-COCgzPKy.js +132 -0
- package/dist/assets/c4Diagram-AHTNJAMY-Bs5XvLEo.js +10 -0
- package/dist/assets/channel-DvLUZ3Xf.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-CyGriz9d.js +1 -0
- package/dist/assets/chunk-4TB4RGXK-DlT_q-fl.js +206 -0
- package/dist/assets/chunk-55IACEB6-NHN99ZNC.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-fK4f9Na9.js +1 -0
- package/dist/assets/chunk-FMBD7UC4-DL-dQIq1.js +15 -0
- package/dist/assets/chunk-OYMX7WX6-6uruB4VY.js +231 -0
- package/dist/assets/chunk-QZHKN3VN-CCWIqLO8.js +1 -0
- package/dist/assets/chunk-YZCP3GAM-Cu84DMJo.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-ByKhp2Tk.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-ByKhp2Tk.js +1 -0
- package/dist/assets/clone-DZHpE494.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-Dqi4iU3-.js +1 -0
- package/dist/assets/cytoscape.esm-DxGcaOPV.js +331 -0
- package/dist/assets/dagre-KV5264BT-Dl-EJ9rb.js +4 -0
- package/dist/assets/default-avatar-CT9tlZjd.svg +1 -0
- package/dist/assets/default-model-avatar-DlbUPjyv.svg +1 -0
- package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-BYtyzF0D.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-BuETHFNU.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-Z02oZp6I.js +43 -0
- package/dist/assets/diagram-TYMM5635-BpGlKv8l.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-C4YngeQh.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-BWddFffg.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-Bg0jOD4m.js +292 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Bz-3sTXZ.js +106 -0
- package/dist/assets/graph-XiH8DkIu.js +1 -0
- package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
- package/dist/assets/index-BuUsWKGZ.js +41 -0
- package/dist/assets/index-DCtZ2KSX.css +1 -0
- package/dist/assets/infoDiagram-42DDH7IO-DLo-lOCE.js +2 -0
- package/dist/assets/init-Gi6I4Gst.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-BsIzT5eO.js +70 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-C3bOkKqv.js +139 -0
- package/dist/assets/kanban-definition-6JOO6SKY-D-rJRNbp.js +89 -0
- package/dist/assets/katex-DkKDou_j.js +257 -0
- package/dist/assets/layout-Bqp8Hh1c.js +1 -0
- package/dist/assets/linear-BWRSipGb.js +1 -0
- package/dist/assets/loading-pet-12a9GTQC.gif +0 -0
- package/dist/assets/mermaid.core-CJa7klhs.js +308 -0
- package/dist/assets/min-CQ_VyzMd.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-Bnj7DDSx.js +96 -0
- package/dist/assets/model-deepseek-LDuqTN2N.svg +2 -0
- package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-CC8a7Ylw.js +30 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-CrmL1WUV.js +7 -0
- package/dist/assets/requirementDiagram-MS252O5E-TfkX4u_6.js +84 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-DMwBbND7.js +10 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-CFghMYsm.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-1H6JIM7l.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CtXMaKcb.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-DnLMBlVa.js +120 -0
- package/dist/assets/vennDiagram-DHZGUBPP-DoIkY_KL.js +34 -0
- package/dist/assets/wardley-RL74JXVD-3n5XmOD5.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-UMOq3ofC.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-CNDuQ5Cg.js +7 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +15 -0
- package/findcx.js +204 -0
- package/i18n.js +2413 -0
- package/interceptor.js +698 -0
- package/lib/appserver-bridge.js +584 -0
- package/lib/ask-bridge.js +126 -0
- package/lib/codex-config.js +146 -0
- package/lib/constants.js +26 -0
- package/lib/context-watcher.js +85 -0
- package/lib/cxv-editor.js +73 -0
- package/lib/delta-reconstructor.js +256 -0
- package/lib/ensure-hooks.js +88 -0
- package/lib/extract-plugin-name.mjs +18 -0
- package/lib/file-api.js +128 -0
- package/lib/git-diff.js +89 -0
- package/lib/interceptor-core.js +270 -0
- package/lib/kv-cache-analyzer.js +164 -0
- package/lib/log-management.js +198 -0
- package/lib/log-stream.js +310 -0
- package/lib/log-watcher.js +245 -0
- package/lib/otel-adapter.js +251 -0
- package/lib/otel-receiver.js +198 -0
- package/lib/perm-bridge.js +142 -0
- package/lib/plugin-loader.js +161 -0
- package/lib/plugin-manager.js +118 -0
- package/lib/proxy-env.js +23 -0
- package/lib/proxy-errors.js +18 -0
- package/lib/sdk-adapter.js +77 -0
- package/lib/sdk-manager.js +464 -0
- package/lib/stats-worker.js +384 -0
- package/lib/updater.js +123 -0
- package/lib/user-profile.js +43 -0
- package/package.json +115 -0
- package/proxy.js +369 -0
- package/pty-manager.js +407 -0
- package/server.js +3226 -0
- package/workspace-registry.js +151 -0
package/lib/file-api.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File API business logic — extracted from server.js
|
|
3
|
+
* Provides path validation, file read/write with security checks.
|
|
4
|
+
*/
|
|
5
|
+
import { resolve, join } from 'node:path';
|
|
6
|
+
import { realpathSync, existsSync, statSync, readFileSync, writeFileSync } from 'node:fs';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Check whether targetPath is contained within the project root directory.
|
|
10
|
+
* Resolves symlinks via realpathSync. Returns false on any error.
|
|
11
|
+
* @param {string} targetPath - absolute path to check
|
|
12
|
+
* @param {string} [root] - project root (defaults to CXV_PROJECT_DIR or cwd)
|
|
13
|
+
* @returns {boolean}
|
|
14
|
+
*/
|
|
15
|
+
export function isPathContained(targetPath, root) {
|
|
16
|
+
try {
|
|
17
|
+
const resolvedRoot = realpathSync(resolve(root || process.env.CXV_PROJECT_DIR || process.cwd()));
|
|
18
|
+
const real = realpathSync(resolve(targetPath));
|
|
19
|
+
return real === resolvedRoot || real.startsWith(resolvedRoot + '/');
|
|
20
|
+
} catch { return false; }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Custom error with a code property for HTTP status mapping */
|
|
24
|
+
class FileApiError extends Error {
|
|
25
|
+
constructor(code, message) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.code = code;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Resolve and validate a file path. Used by readFileContent and file-raw handler.
|
|
33
|
+
* @param {string} cwd - project working directory
|
|
34
|
+
* @param {string} reqPath - requested path (relative or absolute)
|
|
35
|
+
* @param {boolean} isEditorSession - whether this is an editor session
|
|
36
|
+
* @returns {string} resolved absolute file path
|
|
37
|
+
* @throws {FileApiError} with code 'INVALID_PATH'
|
|
38
|
+
*/
|
|
39
|
+
export function resolveFilePath(cwd, reqPath, isEditorSession) {
|
|
40
|
+
if (!reqPath) {
|
|
41
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
42
|
+
}
|
|
43
|
+
if (!isEditorSession && (reqPath.startsWith('/') || reqPath.includes('..'))) {
|
|
44
|
+
const resolved = resolve(reqPath.startsWith('/') ? reqPath : join(cwd, reqPath));
|
|
45
|
+
if (!isPathContained(resolved, cwd)) {
|
|
46
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
47
|
+
}
|
|
48
|
+
return resolve(resolved);
|
|
49
|
+
}
|
|
50
|
+
return resolve((isEditorSession && reqPath.startsWith('/')) ? reqPath : join(cwd, reqPath));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Read file content with size limit and security checks.
|
|
55
|
+
* @param {string} cwd - project working directory
|
|
56
|
+
* @param {string} reqPath - requested path
|
|
57
|
+
* @param {boolean} isEditorSession
|
|
58
|
+
* @returns {{ path: string, content: string, size: number }}
|
|
59
|
+
*/
|
|
60
|
+
export function readFileContent(cwd, reqPath, isEditorSession) {
|
|
61
|
+
if (!reqPath) {
|
|
62
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// For non-editor sessions with absolute / ".." paths that are within project dir,
|
|
66
|
+
// return the relative path from project root
|
|
67
|
+
if (!isEditorSession && (reqPath.startsWith('/') || reqPath.includes('..'))) {
|
|
68
|
+
const resolved = resolve(reqPath);
|
|
69
|
+
if (isPathContained(resolved, cwd)) {
|
|
70
|
+
const root = realpathSync(resolve(cwd));
|
|
71
|
+
const relPath = realpathSync(resolved).slice(root.length + 1);
|
|
72
|
+
const targetFile = realpathSync(resolved);
|
|
73
|
+
return _readAndReturn(targetFile, relPath);
|
|
74
|
+
}
|
|
75
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const targetFile = (isEditorSession && reqPath.startsWith('/')) ? reqPath : join(cwd, reqPath);
|
|
79
|
+
return _readAndReturn(targetFile, reqPath);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function _readAndReturn(targetFile, displayPath) {
|
|
83
|
+
if (!existsSync(targetFile)) {
|
|
84
|
+
throw new FileApiError('NOT_FOUND', `File not found: ${targetFile}`);
|
|
85
|
+
}
|
|
86
|
+
const stat = statSync(targetFile);
|
|
87
|
+
if (!stat.isFile()) {
|
|
88
|
+
throw new FileApiError('NOT_FILE', 'Not a file');
|
|
89
|
+
}
|
|
90
|
+
if (stat.size > 5 * 1024 * 1024) {
|
|
91
|
+
throw new FileApiError('TOO_LARGE', 'File too large');
|
|
92
|
+
}
|
|
93
|
+
const content = readFileSync(targetFile, 'utf-8');
|
|
94
|
+
return { path: displayPath, content, size: stat.size };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Write file content.
|
|
99
|
+
* @param {string} cwd - project working directory
|
|
100
|
+
* @param {string} reqPath - requested path
|
|
101
|
+
* @param {string} content - file content to write
|
|
102
|
+
* @param {boolean} isEditorSession
|
|
103
|
+
* @returns {{ path: string, size: number }}
|
|
104
|
+
*/
|
|
105
|
+
export function writeFileContent(cwd, reqPath, content, isEditorSession) {
|
|
106
|
+
if (!reqPath) {
|
|
107
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
108
|
+
}
|
|
109
|
+
if (!isEditorSession && (reqPath.startsWith('/') || reqPath.includes('..'))) {
|
|
110
|
+
throw new FileApiError('INVALID_PATH', 'Invalid path');
|
|
111
|
+
}
|
|
112
|
+
if (typeof content !== 'string') {
|
|
113
|
+
throw new FileApiError('INVALID_CONTENT', 'Content must be a string');
|
|
114
|
+
}
|
|
115
|
+
const targetFile = (isEditorSession && reqPath.startsWith('/')) ? reqPath : join(cwd, reqPath);
|
|
116
|
+
writeFileSync(targetFile, content, 'utf-8');
|
|
117
|
+
const stat = statSync(targetFile);
|
|
118
|
+
return { path: reqPath, size: stat.size };
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Map FileApiError codes to HTTP status codes */
|
|
122
|
+
export const ERROR_STATUS_MAP = {
|
|
123
|
+
INVALID_PATH: 400,
|
|
124
|
+
NOT_FOUND: 404,
|
|
125
|
+
NOT_FILE: 400,
|
|
126
|
+
TOO_LARGE: 413,
|
|
127
|
+
INVALID_CONTENT: 400,
|
|
128
|
+
};
|
package/lib/git-diff.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { readFileSync, existsSync, statSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { execFile } from 'node:child_process';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
|
|
6
|
+
const execFileAsync = promisify(execFile);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Get git diffs for a list of files.
|
|
10
|
+
* @param {string} cwd - working directory (git repo root)
|
|
11
|
+
* @param {string[]} files - relative file paths
|
|
12
|
+
* @returns {Promise<Array>} diffs array
|
|
13
|
+
*/
|
|
14
|
+
export async function getGitDiffs(cwd, files) {
|
|
15
|
+
const diffs = [];
|
|
16
|
+
|
|
17
|
+
for (const file of files) {
|
|
18
|
+
// 安全检查:防止路径穿越
|
|
19
|
+
if (file.includes('..') || file.startsWith('/')) continue;
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const { stdout: statusOutput } = await execFileAsync('git', ['status', '--porcelain', '--', file], { cwd, encoding: 'utf-8', timeout: 3000 });
|
|
23
|
+
if (!statusOutput.trim()) continue;
|
|
24
|
+
|
|
25
|
+
const status = statusOutput.substring(0, 2).trim();
|
|
26
|
+
const is_new = status === 'A' || status === '??';
|
|
27
|
+
const is_deleted = status === 'D';
|
|
28
|
+
|
|
29
|
+
// 检查是否为二进制文件(已删除文件跳过)
|
|
30
|
+
let is_binary = false;
|
|
31
|
+
if (!is_deleted) {
|
|
32
|
+
try {
|
|
33
|
+
const { stdout: diffCheck } = await execFileAsync('git', ['diff', '--numstat', 'HEAD', '--', file], { cwd, encoding: 'utf-8', timeout: 3000 });
|
|
34
|
+
if (diffCheck.includes('-\t-\t')) {
|
|
35
|
+
is_binary = true;
|
|
36
|
+
}
|
|
37
|
+
} catch {}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let old_content = '';
|
|
41
|
+
let new_content = '';
|
|
42
|
+
|
|
43
|
+
if (!is_binary) {
|
|
44
|
+
// 获取旧内容(HEAD 版本)
|
|
45
|
+
if (!is_new) {
|
|
46
|
+
try {
|
|
47
|
+
const { stdout } = await execFileAsync('git', ['show', `HEAD:${file}`], { cwd, encoding: 'utf-8', timeout: 5000, maxBuffer: 5 * 1024 * 1024 });
|
|
48
|
+
old_content = stdout;
|
|
49
|
+
} catch {
|
|
50
|
+
old_content = '';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 获取新内容(工作区版本)
|
|
55
|
+
if (!is_deleted) {
|
|
56
|
+
try {
|
|
57
|
+
const filePath = join(cwd, file);
|
|
58
|
+
if (existsSync(filePath)) {
|
|
59
|
+
const stat = statSync(filePath);
|
|
60
|
+
if (stat.size > 5 * 1024 * 1024) {
|
|
61
|
+
// 文件过大
|
|
62
|
+
diffs.push({ file, status, is_large: true, size: stat.size });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
new_content = readFileSync(filePath, 'utf-8');
|
|
66
|
+
}
|
|
67
|
+
} catch {
|
|
68
|
+
new_content = '';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
diffs.push({
|
|
74
|
+
file,
|
|
75
|
+
status,
|
|
76
|
+
old_content,
|
|
77
|
+
new_content,
|
|
78
|
+
is_binary,
|
|
79
|
+
is_new,
|
|
80
|
+
is_deleted
|
|
81
|
+
});
|
|
82
|
+
} catch (err) {
|
|
83
|
+
// 跳过无法处理的文件
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return diffs;
|
|
89
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { appendFileSync, existsSync, readdirSync, readFileSync, renameSync, statSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
const SUBAGENT_SYSTEM_RE = /(?:command execution|file search|planning) specialist|general-purpose agent/i;
|
|
5
|
+
|
|
6
|
+
export function getSystemText(body) {
|
|
7
|
+
const system = body?.system;
|
|
8
|
+
if (typeof system === 'string') return system;
|
|
9
|
+
if (Array.isArray(system)) {
|
|
10
|
+
return system.map(s => (s && s.text) || '').join('');
|
|
11
|
+
}
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function isMainAgentRequest(body) {
|
|
16
|
+
if (!body?.system || !Array.isArray(body?.tools)) return false;
|
|
17
|
+
|
|
18
|
+
const sysText = getSystemText(body);
|
|
19
|
+
if (!sysText.includes('You are Codex')) return false;
|
|
20
|
+
if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
|
|
21
|
+
|
|
22
|
+
const isSystemArray = Array.isArray(body.system);
|
|
23
|
+
const hasToolSearch = body.tools.some(t => t.name === 'ToolSearch');
|
|
24
|
+
|
|
25
|
+
if (isSystemArray && hasToolSearch) {
|
|
26
|
+
const messages = body.messages || [];
|
|
27
|
+
const firstMsgContent = messages.length > 0 ?
|
|
28
|
+
(typeof messages[0].content === 'string' ? messages[0].content :
|
|
29
|
+
Array.isArray(messages[0].content) ? messages[0].content.map(c => c.text || '').join('') : '') : '';
|
|
30
|
+
if (firstMsgContent.includes('<available-deferred-tools>')) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// v2.1.81+: 轻量 MainAgent 初始请求工具数可能 < 10,降低阈值兼容
|
|
36
|
+
if (body.tools.length > 5) {
|
|
37
|
+
const hasEdit = body.tools.some(t => t.name === 'Edit');
|
|
38
|
+
const hasBash = body.tools.some(t => t.name === 'Bash');
|
|
39
|
+
const hasTaskOrAgent = body.tools.some(t => t.name === 'Task' || t.name === 'Agent');
|
|
40
|
+
if (hasEdit && hasBash && hasTaskOrAgent) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function isPreflightEntry(entry) {
|
|
49
|
+
if (entry.mainAgent || entry.isHeartbeat || entry.isCountTokens) return false;
|
|
50
|
+
const body = entry.body || {};
|
|
51
|
+
if (Array.isArray(body.tools) && body.tools.length > 0) return false;
|
|
52
|
+
const msgs = body.messages || [];
|
|
53
|
+
if (msgs.length !== 1 || msgs[0].role !== 'user') return false;
|
|
54
|
+
const sysText = typeof body.system === 'string' ? body.system :
|
|
55
|
+
Array.isArray(body.system) ? body.system.map(s => s?.text || '').join('') : '';
|
|
56
|
+
return sysText.includes('Codex');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function isOpenAiApiPath(urlStr) {
|
|
60
|
+
try {
|
|
61
|
+
const pathname = new URL(urlStr).pathname;
|
|
62
|
+
return /^\/v1\/messages(\/count_tokens)?$/.test(pathname)
|
|
63
|
+
|| /^\/v1\/chat\/completions$/.test(pathname)
|
|
64
|
+
|| /^\/v1\/completions$/.test(pathname)
|
|
65
|
+
|| /^\/v1\/embeddings$/.test(pathname)
|
|
66
|
+
|| /^\/v1\/batches(\/.*)?$/.test(pathname);
|
|
67
|
+
} catch {
|
|
68
|
+
return /\/v1\/messages/.test(urlStr) || /\/v1\/chat\/completions/.test(urlStr);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export function assembleStreamMessage(events) {
|
|
74
|
+
let message = null;
|
|
75
|
+
const contentBlocks = [];
|
|
76
|
+
let currentBlockIndex = -1;
|
|
77
|
+
|
|
78
|
+
for (const event of events) {
|
|
79
|
+
if (!event || typeof event !== 'object' || !event.type) continue;
|
|
80
|
+
|
|
81
|
+
switch (event.type) {
|
|
82
|
+
case 'message_start':
|
|
83
|
+
message = { ...event.message };
|
|
84
|
+
message.content = [];
|
|
85
|
+
break;
|
|
86
|
+
|
|
87
|
+
case 'content_block_start':
|
|
88
|
+
currentBlockIndex = event.index;
|
|
89
|
+
contentBlocks[currentBlockIndex] = { ...event.content_block };
|
|
90
|
+
if (contentBlocks[currentBlockIndex].type === 'text') {
|
|
91
|
+
contentBlocks[currentBlockIndex].text = '';
|
|
92
|
+
} else if (contentBlocks[currentBlockIndex].type === 'thinking') {
|
|
93
|
+
contentBlocks[currentBlockIndex].thinking = '';
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
|
|
97
|
+
case 'content_block_delta':
|
|
98
|
+
if (event.index >= 0 && contentBlocks[event.index] && event.delta) {
|
|
99
|
+
if (event.delta.type === 'text_delta' && event.delta.text) {
|
|
100
|
+
contentBlocks[event.index].text += event.delta.text;
|
|
101
|
+
} else if (event.delta.type === 'input_json_delta' && event.delta.partial_json) {
|
|
102
|
+
if (typeof contentBlocks[event.index]._inputJson !== 'string') {
|
|
103
|
+
contentBlocks[event.index]._inputJson = '';
|
|
104
|
+
}
|
|
105
|
+
contentBlocks[event.index]._inputJson += event.delta.partial_json;
|
|
106
|
+
} else if (event.delta.type === 'thinking_delta' && event.delta.thinking) {
|
|
107
|
+
contentBlocks[event.index].thinking += event.delta.thinking;
|
|
108
|
+
} else if (event.delta.type === 'signature_delta' && event.delta.signature) {
|
|
109
|
+
contentBlocks[event.index].signature = event.delta.signature;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
break;
|
|
113
|
+
|
|
114
|
+
case 'content_block_stop':
|
|
115
|
+
if (event.index >= 0 && contentBlocks[event.index]) {
|
|
116
|
+
if (contentBlocks[event.index].type === 'tool_use' && typeof contentBlocks[event.index]._inputJson === 'string') {
|
|
117
|
+
try {
|
|
118
|
+
contentBlocks[event.index].input = JSON.parse(contentBlocks[event.index]._inputJson);
|
|
119
|
+
} catch {
|
|
120
|
+
contentBlocks[event.index].input = contentBlocks[event.index]._inputJson;
|
|
121
|
+
}
|
|
122
|
+
delete contentBlocks[event.index]._inputJson;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
break;
|
|
126
|
+
|
|
127
|
+
case 'message_delta':
|
|
128
|
+
if (message && event.delta) {
|
|
129
|
+
if (event.delta.stop_reason) {
|
|
130
|
+
message.stop_reason = event.delta.stop_reason;
|
|
131
|
+
}
|
|
132
|
+
if (event.delta.stop_sequence !== undefined) {
|
|
133
|
+
message.stop_sequence = event.delta.stop_sequence;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (message && event.usage) {
|
|
137
|
+
message.usage = { ...message.usage, ...event.usage };
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
140
|
+
|
|
141
|
+
case 'message_stop':
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (message) {
|
|
147
|
+
message.content = contentBlocks.filter(block => block !== undefined);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return message;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export function findRecentLog(dir, projectName) {
|
|
154
|
+
try {
|
|
155
|
+
const files = readdirSync(dir)
|
|
156
|
+
.filter(f => f.startsWith(projectName + '_') && f.endsWith('.jsonl'))
|
|
157
|
+
.sort()
|
|
158
|
+
.reverse();
|
|
159
|
+
if (files.length === 0) return null;
|
|
160
|
+
return join(dir, files[0]);
|
|
161
|
+
} catch (err) {
|
|
162
|
+
if (process.env.CXV_DEBUG) console.warn('[CX-Viewer] findRecentLog error:', err.message);
|
|
163
|
+
}
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function cleanupTempFiles(dir, projectName) {
|
|
168
|
+
try {
|
|
169
|
+
const tempFiles = readdirSync(dir)
|
|
170
|
+
.filter(f => f.startsWith(projectName + '_') && f.endsWith('_temp.jsonl'));
|
|
171
|
+
for (const f of tempFiles) {
|
|
172
|
+
try {
|
|
173
|
+
const tempPath = join(dir, f);
|
|
174
|
+
const newPath = tempPath.replace('_temp.jsonl', '.jsonl');
|
|
175
|
+
if (existsSync(newPath)) {
|
|
176
|
+
const tempContent = readFileSync(tempPath, 'utf-8');
|
|
177
|
+
if (tempContent.trim()) {
|
|
178
|
+
appendFileSync(newPath, tempContent);
|
|
179
|
+
}
|
|
180
|
+
unlinkSync(tempPath);
|
|
181
|
+
} else {
|
|
182
|
+
// 只有非空 temp 文件才 rename,空文件直接删除
|
|
183
|
+
const sz = statSync(tempPath).size;
|
|
184
|
+
if (sz > 0) {
|
|
185
|
+
renameSync(tempPath, newPath);
|
|
186
|
+
} else {
|
|
187
|
+
unlinkSync(tempPath);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
} catch { }
|
|
191
|
+
}
|
|
192
|
+
} catch { }
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function migrateConversationContext(oldFile, newFile) {
|
|
196
|
+
try {
|
|
197
|
+
const content = readFileSync(oldFile, 'utf-8');
|
|
198
|
+
if (!content.trim()) return;
|
|
199
|
+
|
|
200
|
+
const parts = content.split('\n---\n').filter(p => p.trim());
|
|
201
|
+
if (parts.length === 0) return;
|
|
202
|
+
|
|
203
|
+
let originIndex = -1;
|
|
204
|
+
for (let i = parts.length - 1; i >= 0; i--) {
|
|
205
|
+
if (!/"mainAgent"\s*:\s*true/.test(parts[i])) continue;
|
|
206
|
+
try {
|
|
207
|
+
const entry = JSON.parse(parts[i]);
|
|
208
|
+
if (entry.mainAgent) {
|
|
209
|
+
const msgs = entry.body?.messages;
|
|
210
|
+
// Delta storage: 使用 _totalMessageCount(delta 条目)或 msgs.length(旧格式)
|
|
211
|
+
const msgCount = entry._totalMessageCount || (Array.isArray(msgs) ? msgs.length : 0);
|
|
212
|
+
if (msgCount === 1) {
|
|
213
|
+
originIndex = i;
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
} catch { }
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (originIndex < 0) return;
|
|
221
|
+
|
|
222
|
+
let migrationStart = originIndex;
|
|
223
|
+
if (originIndex > 0) {
|
|
224
|
+
try {
|
|
225
|
+
const prevContent = parts[originIndex - 1];
|
|
226
|
+
if (prevContent.trim().startsWith('{')) {
|
|
227
|
+
const prev = JSON.parse(prevContent);
|
|
228
|
+
if (isPreflightEntry(prev)) {
|
|
229
|
+
migrationStart = originIndex - 1;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
} catch { }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const migratedParts = parts.slice(migrationStart);
|
|
236
|
+
writeFileSync(newFile, migratedParts.join('\n---\n') + '\n---\n');
|
|
237
|
+
|
|
238
|
+
const remainingParts = parts.slice(0, migrationStart);
|
|
239
|
+
if (remainingParts.length > 0) {
|
|
240
|
+
writeFileSync(oldFile, remainingParts.join('\n---\n') + '\n---\n');
|
|
241
|
+
} else {
|
|
242
|
+
// 所有内容已迁移到新文件,清空旧文件(不能删除,watcher 需要检测 truncation 来触发轮转)
|
|
243
|
+
writeFileSync(oldFile, '');
|
|
244
|
+
}
|
|
245
|
+
} catch { }
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Rotate log file when it exceeds maxSize.
|
|
250
|
+
* Creates an empty new file (no content migration) and appends '\n' to old file
|
|
251
|
+
* to trigger fs.watchFile callback for watcher migration.
|
|
252
|
+
*
|
|
253
|
+
* @param {string} currentFile - current log file path
|
|
254
|
+
* @param {string} newFile - new log file path to rotate to
|
|
255
|
+
* @param {number} maxSize - max file size in bytes
|
|
256
|
+
* @returns {{ rotated: boolean, oldFile?: string, newFile?: string }}
|
|
257
|
+
*/
|
|
258
|
+
export function rotateLogFile(currentFile, newFile, maxSize) {
|
|
259
|
+
try {
|
|
260
|
+
if (!existsSync(currentFile)) return { rotated: false };
|
|
261
|
+
const size = statSync(currentFile).size;
|
|
262
|
+
if (size < maxSize) return { rotated: false };
|
|
263
|
+
// 不迁移旧内容,创建空新文件(立即创建,避免 watcher 时序窗口)
|
|
264
|
+
try { writeFileSync(newFile, ''); } catch { }
|
|
265
|
+
// 触发旧文件 watcher 回调,使其检测到文件变更并切换到新文件
|
|
266
|
+
try { appendFileSync(currentFile, '\n'); } catch { }
|
|
267
|
+
return { rotated: true, oldFile: currentFile, newFile };
|
|
268
|
+
} catch { }
|
|
269
|
+
return { rotated: false };
|
|
270
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-side KV-Cache content analyzer.
|
|
3
|
+
* Ported from src/utils/helpers.js + src/utils/contentFilter.js
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const SUBAGENT_SYSTEM_RE = /command execution specialist|file search specialist|planning specialist|general-purpose agent/i;
|
|
7
|
+
const TEAMMATE_SYSTEM_RE = /running as an agent in a team|Agent Teammate Communication/i;
|
|
8
|
+
|
|
9
|
+
function getSystemText(body) {
|
|
10
|
+
const system = body?.system;
|
|
11
|
+
if (typeof system === 'string') return system;
|
|
12
|
+
if (Array.isArray(system)) {
|
|
13
|
+
return system.map(s => (s && s.text) || '').join('');
|
|
14
|
+
}
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Determine if a log entry is from the MainAgent (not a teammate or subagent).
|
|
20
|
+
*/
|
|
21
|
+
export function isMainAgentEntry(entry) {
|
|
22
|
+
if (!entry) return false;
|
|
23
|
+
|
|
24
|
+
// Teammate subprocess requests are not MainAgent
|
|
25
|
+
if (entry.teammate) return false;
|
|
26
|
+
const sysText = getSystemText(entry.body || {});
|
|
27
|
+
if (TEAMMATE_SYSTEM_RE.test(sysText)) return false;
|
|
28
|
+
|
|
29
|
+
if (entry.mainAgent === true) {
|
|
30
|
+
if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Fallback detection for entries without mainAgent flag
|
|
35
|
+
const body = entry.body || {};
|
|
36
|
+
if (!body.system || !Array.isArray(body.tools)) return false;
|
|
37
|
+
|
|
38
|
+
if (!sysText.includes('You are Codex')) return false;
|
|
39
|
+
if (SUBAGENT_SYSTEM_RE.test(sysText)) return false;
|
|
40
|
+
|
|
41
|
+
// New architecture (v2.1.69+): deferred tool loading
|
|
42
|
+
const isSystemArray = Array.isArray(body.system);
|
|
43
|
+
const hasToolSearch = body.tools.some(t => t.name === 'ToolSearch');
|
|
44
|
+
if (isSystemArray && hasToolSearch) {
|
|
45
|
+
const messages = body.messages || [];
|
|
46
|
+
const firstMsgContent = messages.length > 0
|
|
47
|
+
? (typeof messages[0].content === 'string' ? messages[0].content
|
|
48
|
+
: Array.isArray(messages[0].content) ? messages[0].content.map(c => c.text || '').join('') : '')
|
|
49
|
+
: '';
|
|
50
|
+
if (firstMsgContent.includes('<available-deferred-tools>')) return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// v2.1.81+: lightweight MainAgent may have < 10 tools, lowered threshold
|
|
54
|
+
if (body.tools.length > 5) {
|
|
55
|
+
const hasEdit = body.tools.some(t => t.name === 'Edit');
|
|
56
|
+
const hasBash = body.tools.some(t => t.name === 'Bash');
|
|
57
|
+
const hasTaskOrAgent = body.tools.some(t => t.name === 'Task' || t.name === 'Agent');
|
|
58
|
+
if (hasEdit && hasBash && hasTaskOrAgent) return true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Extract text from a tool_result content block.
|
|
66
|
+
*/
|
|
67
|
+
export function extractToolResultText(toolResult) {
|
|
68
|
+
if (!toolResult.content) return String(toolResult.content ?? '');
|
|
69
|
+
if (typeof toolResult.content === 'string') return toolResult.content;
|
|
70
|
+
if (Array.isArray(toolResult.content)) {
|
|
71
|
+
return toolResult.content
|
|
72
|
+
.filter(b => b.type === 'text')
|
|
73
|
+
.map(b => b.text)
|
|
74
|
+
.join('\n');
|
|
75
|
+
}
|
|
76
|
+
return JSON.stringify(toolResult.content);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Extract cached content from a single log entry (MainAgent or SubAgent).
|
|
81
|
+
* Returns null if the entry has no body; returns object with empty arrays
|
|
82
|
+
* if no cache_control markers are found.
|
|
83
|
+
*/
|
|
84
|
+
export function extractCachedContent(entry) {
|
|
85
|
+
if (!entry?.body) return null;
|
|
86
|
+
|
|
87
|
+
const body = entry.body;
|
|
88
|
+
const usage = entry.response?.body?.usage;
|
|
89
|
+
|
|
90
|
+
const result = {
|
|
91
|
+
system: [],
|
|
92
|
+
messages: [],
|
|
93
|
+
tools: [],
|
|
94
|
+
cacheCreateTokens: usage?.cache_creation_input_tokens || 0,
|
|
95
|
+
cacheReadTokens: usage?.cache_read_input_tokens || 0,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// system: find last block with cache_control, collect 0..lastIndex
|
|
99
|
+
if (Array.isArray(body.system)) {
|
|
100
|
+
let lastCacheIndex = -1;
|
|
101
|
+
for (let i = body.system.length - 1; i >= 0; i--) {
|
|
102
|
+
if (body.system[i].cache_control) { lastCacheIndex = i; break; }
|
|
103
|
+
}
|
|
104
|
+
if (lastCacheIndex >= 0) {
|
|
105
|
+
for (let i = 0; i <= lastCacheIndex; i++) {
|
|
106
|
+
const block = body.system[i];
|
|
107
|
+
if (block.type === 'text' && block.text) result.system.push(block.text);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// messages: find last message with cache_control in content, collect 0..lastIndex
|
|
113
|
+
// Fallback: delta reconstruction + slim restore may lose cache_control markers,
|
|
114
|
+
// but cacheReadTokens > 0 proves messages were cached — extract all as approximation
|
|
115
|
+
if (Array.isArray(body.messages)) {
|
|
116
|
+
let lastCacheIndex = -1;
|
|
117
|
+
for (let i = body.messages.length - 1; i >= 0; i--) {
|
|
118
|
+
const content = body.messages[i].content;
|
|
119
|
+
if (Array.isArray(content)) {
|
|
120
|
+
for (const block of content) {
|
|
121
|
+
if (block.cache_control) { lastCacheIndex = i; break; }
|
|
122
|
+
}
|
|
123
|
+
if (lastCacheIndex >= 0) break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (lastCacheIndex < 0 && result.cacheReadTokens > 0 && body.messages.length > 0) {
|
|
127
|
+
lastCacheIndex = body.messages.length - 1;
|
|
128
|
+
}
|
|
129
|
+
if (lastCacheIndex >= 0) {
|
|
130
|
+
for (let i = 0; i <= lastCacheIndex; i++) {
|
|
131
|
+
const msg = body.messages[i];
|
|
132
|
+
const content = msg.content;
|
|
133
|
+
if (typeof content === 'string') {
|
|
134
|
+
result.messages.push(`[${msg.role}] ${content}`);
|
|
135
|
+
} else if (Array.isArray(content)) {
|
|
136
|
+
for (const block of content) {
|
|
137
|
+
if (block.type === 'text' && block.text) {
|
|
138
|
+
result.messages.push(`[${msg.role}] ${block.text}`);
|
|
139
|
+
} else if (block.type === 'tool_use') {
|
|
140
|
+
const inputStr = block.input ? JSON.stringify(block.input) : '';
|
|
141
|
+
const preview = inputStr.length > 200 ? inputStr.substring(0, 200) + '...' : inputStr;
|
|
142
|
+
result.messages.push(`[${msg.role}] ${block.name}(${preview})`);
|
|
143
|
+
} else if (block.type === 'tool_result') {
|
|
144
|
+
const toolText = extractToolResultText(block);
|
|
145
|
+
if (toolText) result.messages.push(`[tool_result: ${block.tool_use_id}] ${toolText}`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// tools: API caches in order tools → system → messages.
|
|
154
|
+
// Tools are implicitly cached as part of the prefix (no cache_control needed on tools themselves).
|
|
155
|
+
// Show tools when system has cached content (indicating a cache prefix exists).
|
|
156
|
+
// Keep in sync with src/utils/helpers.js extractCachedContent
|
|
157
|
+
if (Array.isArray(body.tools) && body.tools.length > 0 && result.system.length > 0) {
|
|
158
|
+
for (const tool of body.tools) {
|
|
159
|
+
result.tools.push(`${tool.name}: ${tool.description || ''}`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return result;
|
|
164
|
+
}
|