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/interceptor.js
ADDED
|
@@ -0,0 +1,698 @@
|
|
|
1
|
+
// LLM Request Interceptor
|
|
2
|
+
// 拦截并记录所有Codex API请求
|
|
3
|
+
|
|
4
|
+
// 非交互命令(如 codex -v, codex --help)不需要启动 cxv
|
|
5
|
+
const _cxvSkipArgs = ['--version', '-v', '--v', '--help', '-h', 'doctor', 'install', 'update', 'upgrade', 'auth', 'setup-token', 'agents', 'plugin', 'plugins', 'mcp'];
|
|
6
|
+
const _cxvSkip = _cxvSkipArgs.includes(process.argv[2]);
|
|
7
|
+
|
|
8
|
+
import './lib/proxy-env.js';
|
|
9
|
+
import { appendFileSync, mkdirSync, readFileSync, statSync, renameSync, unlinkSync, existsSync, watchFile } from 'node:fs';
|
|
10
|
+
import { homedir } from 'node:os';
|
|
11
|
+
import { fileURLToPath } from 'node:url';
|
|
12
|
+
import { dirname, join, basename } from 'node:path';
|
|
13
|
+
import { LOG_DIR } from './findcx.js';
|
|
14
|
+
import { assembleStreamMessage, cleanupTempFiles, findRecentLog, isOpenAiApiPath, isMainAgentRequest, rotateLogFile } from './lib/interceptor-core.js';
|
|
15
|
+
import { MAX_LOG_SIZE as _MAX_LOG_SIZE, CHECKPOINT_INTERVAL as _CHECKPOINT_INTERVAL } from './lib/constants.js';
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
20
|
+
const __dirname = dirname(__filename);
|
|
21
|
+
|
|
22
|
+
// 流式请求的实时状态(供 server.js SSE 推送)
|
|
23
|
+
export const streamingState = { active: false, requestId: null, startTime: null, model: null, bytesReceived: 0, chunksReceived: 0 };
|
|
24
|
+
export function resetStreamingState() {
|
|
25
|
+
streamingState.active = false;
|
|
26
|
+
streamingState.requestId = null;
|
|
27
|
+
streamingState.startTime = null;
|
|
28
|
+
streamingState.model = null;
|
|
29
|
+
streamingState.bytesReceived = 0;
|
|
30
|
+
streamingState.chunksReceived = 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 缓存从请求 headers 中提取的 API Key 或 Authorization header
|
|
34
|
+
export let _cachedApiKey = null;
|
|
35
|
+
export let _cachedAuthHeader = null;
|
|
36
|
+
// 缓存从请求 body 中提取的模型名,供翻译接口使用
|
|
37
|
+
export let _cachedModel = null;
|
|
38
|
+
// 缓存 haiku 模型名(从实际请求中捕获),翻译接口优先使用
|
|
39
|
+
export let _cachedHaikuModel = null;
|
|
40
|
+
|
|
41
|
+
// Proxy profile hot-switch support
|
|
42
|
+
const PROFILE_PATH = join(homedir(), '.codex', 'cx-viewer', 'profile.json');
|
|
43
|
+
let _activeProfile = null; // { id, name, baseURL?, apiKey?, models?, activeModel? }
|
|
44
|
+
|
|
45
|
+
// 启动时捕获的原始配置(首次 API 请求时记录,不可变)
|
|
46
|
+
let _defaultConfig = null; // { origin, authType, model }
|
|
47
|
+
|
|
48
|
+
function _loadProxyProfile() {
|
|
49
|
+
try {
|
|
50
|
+
const data = JSON.parse(readFileSync(PROFILE_PATH, 'utf-8'));
|
|
51
|
+
const active = data.profiles?.find(p => p.id === data.active);
|
|
52
|
+
_activeProfile = (active && active.id !== 'max') ? active : null;
|
|
53
|
+
} catch {
|
|
54
|
+
_activeProfile = null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_loadProxyProfile();
|
|
59
|
+
try { watchFile(PROFILE_PATH, { interval: 1500 }, _loadProxyProfile); } catch { }
|
|
60
|
+
|
|
61
|
+
export { _activeProfile, _defaultConfig, _loadProxyProfile, PROFILE_PATH };
|
|
62
|
+
|
|
63
|
+
// 生成新的日志文件路径
|
|
64
|
+
function generateNewLogFilePath() {
|
|
65
|
+
const now = new Date();
|
|
66
|
+
const ts = now.getFullYear().toString()
|
|
67
|
+
+ String(now.getMonth() + 1).padStart(2, '0')
|
|
68
|
+
+ String(now.getDate()).padStart(2, '0')
|
|
69
|
+
+ '_'
|
|
70
|
+
+ String(now.getHours()).padStart(2, '0')
|
|
71
|
+
+ String(now.getMinutes()).padStart(2, '0')
|
|
72
|
+
+ String(now.getSeconds()).padStart(2, '0');
|
|
73
|
+
let cwd;
|
|
74
|
+
try { cwd = process.cwd(); } catch { cwd = homedir(); }
|
|
75
|
+
const projectName = basename(cwd).replace(/[^a-zA-Z0-9_\-\.]/g, '_');
|
|
76
|
+
const dir = join(LOG_DIR, projectName);
|
|
77
|
+
try { mkdirSync(dir, { recursive: true }); } catch (err) { console.warn('[CX-Viewer] mkdirSync failed:', dir, err.message); }
|
|
78
|
+
return { filePath: join(dir, `${projectName}_${ts}.jsonl`), dir, projectName };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Resume 状态(供 server.js 使用)
|
|
82
|
+
let _resumeState = null;
|
|
83
|
+
let _resolveChoice = null;
|
|
84
|
+
const _choicePromise = new Promise(resolve => { _resolveChoice = resolve; });
|
|
85
|
+
|
|
86
|
+
function resolveResumeChoice(choice) {
|
|
87
|
+
if (!_resumeState) return;
|
|
88
|
+
const { recentFile, tempFile } = _resumeState;
|
|
89
|
+
try {
|
|
90
|
+
if (choice === 'continue') {
|
|
91
|
+
// 将临时文件内容追加到旧日志
|
|
92
|
+
if (existsSync(tempFile)) {
|
|
93
|
+
const tempContent = readFileSync(tempFile, 'utf-8');
|
|
94
|
+
if (tempContent.trim()) {
|
|
95
|
+
appendFileSync(recentFile, tempContent);
|
|
96
|
+
}
|
|
97
|
+
unlinkSync(tempFile);
|
|
98
|
+
}
|
|
99
|
+
LOG_FILE = recentFile;
|
|
100
|
+
} else {
|
|
101
|
+
// new: 将临时文件 rename 为正式新日志文件名(空文件直接删除)
|
|
102
|
+
const newPath = tempFile.replace('_temp.jsonl', '.jsonl');
|
|
103
|
+
if (existsSync(tempFile)) {
|
|
104
|
+
const sz = statSync(tempFile).size;
|
|
105
|
+
if (sz > 0) {
|
|
106
|
+
renameSync(tempFile, newPath);
|
|
107
|
+
} else {
|
|
108
|
+
try { unlinkSync(tempFile); } catch { }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
LOG_FILE = newPath;
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
console.error('[CX Viewer] resolveResumeChoice error:', err);
|
|
115
|
+
}
|
|
116
|
+
const result = { logFile: LOG_FILE };
|
|
117
|
+
_resumeState = null;
|
|
118
|
+
_resolveChoice(result);
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Delta storage: 增量存储开关和状态(默认开启,设置 CXV_DISABLE_DELTA=1 关闭)
|
|
123
|
+
// 注意:delta 计算依赖 mainAgent 请求串行(Codex CLI 保证),不做并发互斥
|
|
124
|
+
const _deltaStorageEnabled = process.env.CXV_DISABLE_DELTA !== '1';
|
|
125
|
+
let _lastMessagesCount = 0; // 上一次 mainAgent 写入的完整 messages 数量
|
|
126
|
+
let _mainAgentDeltaCount = 0; // mainAgent 请求计数器(用于触发定期 checkpoint)
|
|
127
|
+
const CHECKPOINT_INTERVAL = _CHECKPOINT_INTERVAL;
|
|
128
|
+
|
|
129
|
+
/** Delta storage: completed 写入成功后更新状态 */
|
|
130
|
+
function _commitDeltaState(originalLength) {
|
|
131
|
+
if (_deltaStorageEnabled && originalLength > 0) {
|
|
132
|
+
_lastMessagesCount = originalLength;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Teammate 子进程检测:--parent-session-id(旧模式)或 --agent-name(原生 team 模式)
|
|
137
|
+
const _isTeammate = process.argv.includes('--parent-session-id') || process.argv.includes('--agent-name');
|
|
138
|
+
// 提取 teammate 元数据(--agent-name worker-1 --team-name fix-ts-errors)
|
|
139
|
+
let _teammateName = null;
|
|
140
|
+
let _teamName = null;
|
|
141
|
+
{
|
|
142
|
+
const args = process.argv;
|
|
143
|
+
const nameIdx = args.indexOf('--agent-name');
|
|
144
|
+
if (nameIdx !== -1 && nameIdx + 1 < args.length) _teammateName = args[nameIdx + 1];
|
|
145
|
+
const teamIdx = args.indexOf('--team-name');
|
|
146
|
+
if (teamIdx !== -1 && teamIdx + 1 < args.length) _teamName = args[teamIdx + 1];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 初始化日志文件路径(异步,支持用户交互)
|
|
150
|
+
// 工作区模式下延迟到选择工作区后再初始化
|
|
151
|
+
let _newLogFile, _logDir, _projectName;
|
|
152
|
+
if (process.env.CXV_WORKSPACE_MODE === '1') {
|
|
153
|
+
_newLogFile = '';
|
|
154
|
+
_logDir = '';
|
|
155
|
+
_projectName = '';
|
|
156
|
+
} else if (_isTeammate) {
|
|
157
|
+
// Teammate 子进程:只需 projectName 和 logDir 来查找 leader 日志,不生成新文件路径
|
|
158
|
+
let cwd;
|
|
159
|
+
try { cwd = process.cwd(); } catch { cwd = homedir(); }
|
|
160
|
+
_projectName = basename(cwd).replace(/[^a-zA-Z0-9_\-\.]/g, '_');
|
|
161
|
+
_logDir = join(LOG_DIR, _projectName);
|
|
162
|
+
const _leaderLog = findRecentLog(_logDir, _projectName);
|
|
163
|
+
_newLogFile = _leaderLog || ''; // 没有 leader 日志时不写入
|
|
164
|
+
} else {
|
|
165
|
+
({ filePath: _newLogFile, dir: _logDir, projectName: _projectName } = generateNewLogFilePath());
|
|
166
|
+
// 启动时清理残留临时文件
|
|
167
|
+
cleanupTempFiles(_logDir, _projectName);
|
|
168
|
+
}
|
|
169
|
+
let LOG_FILE = _newLogFile;
|
|
170
|
+
|
|
171
|
+
const _initPromise = (async () => {
|
|
172
|
+
if (!_logDir || !_projectName) return; // 工作区模式下跳过
|
|
173
|
+
if (_isTeammate) return; // Teammate 已在上方同步初始化,跳过 async resume 流程
|
|
174
|
+
try {
|
|
175
|
+
const recentLog = findRecentLog(_logDir, _projectName);
|
|
176
|
+
if (recentLog) {
|
|
177
|
+
// Leader / 普通进程:走 resume 交互流程
|
|
178
|
+
const tempFile = _newLogFile.replace('.jsonl', '_temp.jsonl');
|
|
179
|
+
LOG_FILE = tempFile;
|
|
180
|
+
_resumeState = {
|
|
181
|
+
recentFile: recentLog,
|
|
182
|
+
recentFileName: basename(recentLog),
|
|
183
|
+
tempFile,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
} catch (err) { console.warn('[CX-Viewer] Log init error:', err.message); }
|
|
187
|
+
})();
|
|
188
|
+
|
|
189
|
+
export { LOG_FILE, _initPromise, _resumeState, _choicePromise, resolveResumeChoice, _projectName, _logDir };
|
|
190
|
+
|
|
191
|
+
// 工作区模式:动态初始化指定路径的日志文件
|
|
192
|
+
// 如果有 1 小时内的最近日志,自动复用(与单目录模式行为一致)
|
|
193
|
+
export function initForWorkspace(projectPath, { forceNew = false } = {}) {
|
|
194
|
+
const projectName = basename(projectPath).replace(/[^a-zA-Z0-9_\-\.]/g, '_');
|
|
195
|
+
const dir = join(LOG_DIR, projectName);
|
|
196
|
+
try { mkdirSync(dir, { recursive: true }); } catch (err) { console.warn('[CX-Viewer] mkdirSync failed:', dir, err.message); }
|
|
197
|
+
|
|
198
|
+
cleanupTempFiles(dir, projectName);
|
|
199
|
+
|
|
200
|
+
// 检查是否有最近的日志文件可以复用(始终复用最新日志)
|
|
201
|
+
// forceNew: Electron multi-tab 模式下强制创建新文件,避免与已有 cxv 实例共享日志
|
|
202
|
+
const recentLog = !forceNew && findRecentLog(dir, projectName);
|
|
203
|
+
if (recentLog) {
|
|
204
|
+
_projectName = projectName;
|
|
205
|
+
_logDir = dir;
|
|
206
|
+
LOG_FILE = recentLog;
|
|
207
|
+
return { filePath: recentLog, dir, projectName, resumed: true };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 没有最近日志,创建新文件
|
|
211
|
+
const now = new Date();
|
|
212
|
+
const ts = now.getFullYear().toString()
|
|
213
|
+
+ String(now.getMonth() + 1).padStart(2, '0')
|
|
214
|
+
+ String(now.getDate()).padStart(2, '0')
|
|
215
|
+
+ '_'
|
|
216
|
+
+ String(now.getHours()).padStart(2, '0')
|
|
217
|
+
+ String(now.getMinutes()).padStart(2, '0')
|
|
218
|
+
+ String(now.getSeconds()).padStart(2, '0');
|
|
219
|
+
|
|
220
|
+
const filePath = join(dir, `${projectName}_${ts}.jsonl`);
|
|
221
|
+
|
|
222
|
+
_projectName = projectName;
|
|
223
|
+
_logDir = dir;
|
|
224
|
+
LOG_FILE = filePath;
|
|
225
|
+
|
|
226
|
+
return { filePath, dir, projectName, resumed: false };
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// 工作区模式:重置日志状态(返回工作区列表时调用)
|
|
230
|
+
export function resetWorkspace() {
|
|
231
|
+
_projectName = '';
|
|
232
|
+
_logDir = '';
|
|
233
|
+
LOG_FILE = '';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const MAX_LOG_SIZE = _MAX_LOG_SIZE;
|
|
237
|
+
|
|
238
|
+
function checkAndRotateLogFile() {
|
|
239
|
+
// Teammate 不做日志轮转,由 leader 负责
|
|
240
|
+
if (_isTeammate) return;
|
|
241
|
+
try {
|
|
242
|
+
if (!existsSync(LOG_FILE) || statSync(LOG_FILE).size < MAX_LOG_SIZE) return;
|
|
243
|
+
} catch { return; }
|
|
244
|
+
const { filePath } = generateNewLogFilePath();
|
|
245
|
+
const result = rotateLogFile(LOG_FILE, filePath, MAX_LOG_SIZE);
|
|
246
|
+
if (result.rotated) {
|
|
247
|
+
LOG_FILE = result.newFile;
|
|
248
|
+
// 重置 delta 状态,强制下一条 mainAgent 请求写完整 checkpoint
|
|
249
|
+
if (_deltaStorageEnabled) {
|
|
250
|
+
_lastMessagesCount = 0;
|
|
251
|
+
_mainAgentDeltaCount = 0;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// 从环境变量 OPENAI_BASE_URL 提取域名用于请求匹配
|
|
257
|
+
function getBaseUrlHost() {
|
|
258
|
+
try {
|
|
259
|
+
const baseUrl = process.env.OPENAI_BASE_URL;
|
|
260
|
+
if (baseUrl) {
|
|
261
|
+
return new URL(baseUrl).hostname;
|
|
262
|
+
}
|
|
263
|
+
} catch { }
|
|
264
|
+
return null;
|
|
265
|
+
}
|
|
266
|
+
const CUSTOM_API_HOST = getBaseUrlHost();
|
|
267
|
+
|
|
268
|
+
// 保存 viewer 模块引用
|
|
269
|
+
let viewerModule = null;
|
|
270
|
+
|
|
271
|
+
export function setupInterceptor() {
|
|
272
|
+
// 避免重复拦截
|
|
273
|
+
if (globalThis._cxViewerInterceptorInstalled) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
globalThis._cxViewerInterceptorInstalled = true;
|
|
277
|
+
|
|
278
|
+
// 启动 viewer 服务(优先根目录 server.js,fallback 到 lib/server.js)
|
|
279
|
+
// Teammate 子进程跳过,避免端口冲突(leader 已启动 viewer)
|
|
280
|
+
if (!_isTeammate) {
|
|
281
|
+
const rootServerPath = join(__dirname, 'server.js');
|
|
282
|
+
const libServerPath = join(__dirname, 'lib', 'server.js');
|
|
283
|
+
import(rootServerPath).then(module => {
|
|
284
|
+
viewerModule = module;
|
|
285
|
+
}).catch(() => {
|
|
286
|
+
import(libServerPath).then(module => {
|
|
287
|
+
viewerModule = module;
|
|
288
|
+
}).catch(() => {
|
|
289
|
+
// Silently fail if viewer service cannot start
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// 注册退出处理器
|
|
295
|
+
const cleanupViewer = async () => {
|
|
296
|
+
if (viewerModule && typeof viewerModule.stopViewer === 'function') {
|
|
297
|
+
try {
|
|
298
|
+
await viewerModule.stopViewer();
|
|
299
|
+
} catch (err) {
|
|
300
|
+
// Silently fail
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
process.on('SIGINT', () => {
|
|
306
|
+
cleanupViewer().finally(() => process.exit(0));
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
process.on('SIGTERM', () => {
|
|
310
|
+
cleanupViewer().finally(() => process.exit(0));
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
process.on('beforeExit', () => {
|
|
314
|
+
cleanupViewer();
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
const _originalFetch = globalThis.fetch;
|
|
318
|
+
|
|
319
|
+
globalThis.fetch = async function (url, options) {
|
|
320
|
+
// cx-viewer 内部请求(翻译等)直接透传,不拦截
|
|
321
|
+
const internalHeader = options?.headers?.['x-cx-viewer-internal']
|
|
322
|
+
|| (options?.headers instanceof Headers && options.headers.get('x-cx-viewer-internal'));
|
|
323
|
+
if (internalHeader) {
|
|
324
|
+
return _originalFetch.apply(this, arguments);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const startTime = Date.now();
|
|
328
|
+
let requestEntry = null;
|
|
329
|
+
|
|
330
|
+
try {
|
|
331
|
+
const urlStr = typeof url === 'string' ? url : url?.url || String(url);
|
|
332
|
+
// 检查 headers 中是否包含 x-cx-viewer-trace 标记
|
|
333
|
+
const headers = options?.headers || {};
|
|
334
|
+
const isProxyTrace = headers['x-cx-viewer-trace'] === 'true' || headers['x-cx-viewer-trace'] === true;
|
|
335
|
+
|
|
336
|
+
// 如果是 proxy 转发的,或者符合 URL 规则
|
|
337
|
+
if (isProxyTrace || urlStr.includes('codex') || (CUSTOM_API_HOST && urlStr.includes(CUSTOM_API_HOST)) || isOpenAiApiPath(urlStr)) {
|
|
338
|
+
// 如果是 proxy 转发的,需要清理掉标记 header 避免发给上游
|
|
339
|
+
if (isProxyTrace && options?.headers) {
|
|
340
|
+
delete options.headers['x-cx-viewer-trace'];
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
const timestamp = new Date().toISOString();
|
|
344
|
+
let body = null;
|
|
345
|
+
if (options?.body) {
|
|
346
|
+
try {
|
|
347
|
+
body = JSON.parse(options.body);
|
|
348
|
+
} catch {
|
|
349
|
+
body = String(options.body).slice(0, 500);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// 转换 headers 为普通对象(支持 Request 对象、options.headers、Headers 实例)
|
|
354
|
+
let headers = {};
|
|
355
|
+
const rawHeaders = options?.headers || (url instanceof Request ? url.headers : null);
|
|
356
|
+
if (rawHeaders) {
|
|
357
|
+
if (rawHeaders instanceof Headers) {
|
|
358
|
+
headers = Object.fromEntries(rawHeaders.entries());
|
|
359
|
+
} else if (typeof rawHeaders === 'object') {
|
|
360
|
+
headers = { ...rawHeaders };
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// 缓存 API Key / Authorization 供翻译接口使用(缓存原始值)
|
|
365
|
+
if (headers['x-api-key'] && !_cachedApiKey) {
|
|
366
|
+
_cachedApiKey = headers['x-api-key'];
|
|
367
|
+
}
|
|
368
|
+
if (headers['authorization'] && !_cachedAuthHeader) {
|
|
369
|
+
_cachedAuthHeader = headers['authorization'];
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// 首次 API 请求时捕获原始配置(仅一次,用于 Default profile 展示和自动匹配)
|
|
373
|
+
if (!_defaultConfig) {
|
|
374
|
+
try {
|
|
375
|
+
const _u = new URL(urlStr);
|
|
376
|
+
_defaultConfig = {
|
|
377
|
+
origin: _u.origin,
|
|
378
|
+
authType: headers['authorization'] ? 'OAuth' : headers['x-api-key'] ? 'API Key' : 'Unknown',
|
|
379
|
+
apiKey: headers['x-api-key'] || null,
|
|
380
|
+
model: body?.model || null,
|
|
381
|
+
};
|
|
382
|
+
} catch { }
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// 缓存请求中的模型名(仅 mainAgent 请求,避免 SubAgent 覆盖)
|
|
386
|
+
// 注意:写入移到 requestEntry 构建之后
|
|
387
|
+
|
|
388
|
+
// 脱敏敏感 headers,避免写入日志泄漏凭证
|
|
389
|
+
const safeHeaders = { ...headers };
|
|
390
|
+
if (safeHeaders['x-api-key']) {
|
|
391
|
+
const k = safeHeaders['x-api-key'];
|
|
392
|
+
safeHeaders['x-api-key'] = k.length > 12 ? k.slice(0, 8) + '****' + k.slice(-4) : '****';
|
|
393
|
+
}
|
|
394
|
+
if (safeHeaders['authorization']) {
|
|
395
|
+
const v = safeHeaders['authorization'];
|
|
396
|
+
const spaceIdx = v.indexOf(' ');
|
|
397
|
+
if (spaceIdx > 0) {
|
|
398
|
+
const scheme = v.slice(0, spaceIdx);
|
|
399
|
+
const token = v.slice(spaceIdx + 1);
|
|
400
|
+
safeHeaders['authorization'] = scheme + ' ' + (token.length > 12 ? token.slice(0, 8) + '****' + token.slice(-4) : '****');
|
|
401
|
+
} else {
|
|
402
|
+
safeHeaders['authorization'] = '****';
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
requestEntry = {
|
|
407
|
+
timestamp,
|
|
408
|
+
project: (() => { try { return basename(process.cwd()); } catch { return 'unknown'; } })(),
|
|
409
|
+
url: urlStr,
|
|
410
|
+
method: options?.method || 'GET',
|
|
411
|
+
headers: safeHeaders,
|
|
412
|
+
body: body,
|
|
413
|
+
response: null,
|
|
414
|
+
duration: 0,
|
|
415
|
+
isStream: body?.stream === true,
|
|
416
|
+
isHeartbeat: /\/api\/eval\/sdk-/.test(urlStr),
|
|
417
|
+
isCountTokens: /\/messages\/count_tokens/.test(urlStr),
|
|
418
|
+
mainAgent: isMainAgentRequest(body),
|
|
419
|
+
...(_isTeammate && { teammate: _teammateName, teamName: _teamName })
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
} catch (err) {
|
|
423
|
+
if (process.env.CXV_DEBUG) console.warn('[CX-Viewer] Request interception error:', err.message);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// 用户新指令边界:检查日志文件大小,超过 250MB 则切换新文件
|
|
427
|
+
if (requestEntry?.mainAgent) {
|
|
428
|
+
checkAndRotateLogFile();
|
|
429
|
+
// 仅 mainAgent 请求时缓存模型名,避免 SubAgent 覆盖
|
|
430
|
+
if (requestEntry.body?.model && typeof requestEntry.body.model === 'string') {
|
|
431
|
+
_cachedModel = requestEntry.body.model;
|
|
432
|
+
// 捕获 haiku 模型名供翻译接口使用
|
|
433
|
+
if (/haiku/i.test(requestEntry.body.model)) {
|
|
434
|
+
_cachedHaikuModel = requestEntry.body.model;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// Delta storage:仅 mainAgent 且开关启用时,将 body.messages 转为增量格式
|
|
440
|
+
let _deltaOriginalMessagesLength = 0; // 缓存本次请求的原始 messages 长度,用于 completed 后更新状态
|
|
441
|
+
if (_deltaStorageEnabled && requestEntry?.mainAgent && Array.isArray(requestEntry.body?.messages)) {
|
|
442
|
+
const messages = requestEntry.body.messages;
|
|
443
|
+
_deltaOriginalMessagesLength = messages.length;
|
|
444
|
+
_mainAgentDeltaCount++;
|
|
445
|
+
|
|
446
|
+
// 判断是否需要写 checkpoint
|
|
447
|
+
const needsCheckpoint =
|
|
448
|
+
_lastMessagesCount === 0 || // 进程重启 / 首次请求
|
|
449
|
+
messages.length < _lastMessagesCount || // messages 缩短(/clear、context 压缩)
|
|
450
|
+
(_mainAgentDeltaCount % CHECKPOINT_INTERVAL === 0); // 定期 checkpoint
|
|
451
|
+
|
|
452
|
+
if (needsCheckpoint) {
|
|
453
|
+
// checkpoint:保持完整 messages,标记 _isCheckpoint
|
|
454
|
+
requestEntry._deltaFormat = 1;
|
|
455
|
+
requestEntry._totalMessageCount = messages.length;
|
|
456
|
+
requestEntry._conversationId = 'mainAgent';
|
|
457
|
+
requestEntry._isCheckpoint = true;
|
|
458
|
+
} else {
|
|
459
|
+
// delta:只保留新增的 messages
|
|
460
|
+
const delta = messages.slice(_lastMessagesCount);
|
|
461
|
+
requestEntry._deltaFormat = 1;
|
|
462
|
+
requestEntry._totalMessageCount = messages.length;
|
|
463
|
+
requestEntry._conversationId = 'mainAgent';
|
|
464
|
+
requestEntry._isCheckpoint = false;
|
|
465
|
+
requestEntry.body.messages = delta;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// 生成唯一请求 ID,用于关联在途请求和完成请求
|
|
470
|
+
const requestId = `${Date.now()}_${Math.random().toString(36).substring(2, 11)}`;
|
|
471
|
+
if (requestEntry) {
|
|
472
|
+
requestEntry.requestId = requestId;
|
|
473
|
+
requestEntry.inProgress = true; // 标记为在途请求
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// 在发起请求前先写入一条未完成的条目,让前端可以检测在途请求
|
|
477
|
+
if (requestEntry) {
|
|
478
|
+
try {
|
|
479
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
480
|
+
} catch (err) {
|
|
481
|
+
if (process.env.CXV_DEBUG) console.warn('[CX-Viewer] Log write error:', err.message);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// 流式请求状态追踪(仅对 Codex API 流式请求)
|
|
486
|
+
if (requestEntry?.isStream) {
|
|
487
|
+
streamingState.active = true;
|
|
488
|
+
streamingState.requestId = requestId;
|
|
489
|
+
streamingState.startTime = Date.now();
|
|
490
|
+
streamingState.model = requestEntry.body?.model || '';
|
|
491
|
+
streamingState.bytesReceived = 0;
|
|
492
|
+
streamingState.chunksReceived = 0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// Proxy profile request rewriting
|
|
496
|
+
let _fetchUrl = url;
|
|
497
|
+
let _fetchOpts = options;
|
|
498
|
+
if (_activeProfile && _activeProfile.baseURL && requestEntry) {
|
|
499
|
+
try {
|
|
500
|
+
// 1. URL 重写: 用 baseURL 替换 origin,智能处理路径重叠
|
|
501
|
+
// baseURL="https://proxy.com/v1" + pathname="/v1/messages" → "https://proxy.com/v1/messages"(去重 /v1)
|
|
502
|
+
// baseURL="https://proxy.com" + pathname="/v1/messages" → "https://proxy.com/v1/messages"(无重叠)
|
|
503
|
+
if (typeof _fetchUrl === 'string') {
|
|
504
|
+
const _origUrl = new URL(_fetchUrl);
|
|
505
|
+
const _baseUrl = new URL(_activeProfile.baseURL);
|
|
506
|
+
const _basePath = _baseUrl.pathname.replace(/\/+$/, '');
|
|
507
|
+
const _origPath = _origUrl.pathname;
|
|
508
|
+
// 如果原始路径以 baseURL 的路径开头(如都有 /v1/),去掉重叠部分
|
|
509
|
+
// 使用 _basePath + '/' 避免 /api 误匹配 /api-v2
|
|
510
|
+
const _finalPath = (!_basePath || _origPath === _basePath || _origPath.startsWith(_basePath + '/')) ? _origPath : _basePath + _origPath;
|
|
511
|
+
_fetchUrl = _baseUrl.origin + _finalPath + _origUrl.search;
|
|
512
|
+
}
|
|
513
|
+
// 2. Auth 替换
|
|
514
|
+
if (_activeProfile.apiKey && _fetchOpts?.headers) {
|
|
515
|
+
const h = _fetchOpts.headers;
|
|
516
|
+
if (typeof h === 'object' && !(h instanceof Headers)) {
|
|
517
|
+
_fetchOpts = { ..._fetchOpts, headers: { ...h } };
|
|
518
|
+
if (h['x-api-key']) _fetchOpts.headers['x-api-key'] = _activeProfile.apiKey;
|
|
519
|
+
if (h['authorization']) _fetchOpts.headers['authorization'] = `Bearer ${_activeProfile.apiKey}`;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
// 3. Model 替换
|
|
523
|
+
if (_activeProfile.activeModel && _fetchOpts?.body) {
|
|
524
|
+
try {
|
|
525
|
+
const _b = JSON.parse(_fetchOpts.body);
|
|
526
|
+
if (_b.model) {
|
|
527
|
+
_b.model = _activeProfile.activeModel;
|
|
528
|
+
_fetchOpts = { ..._fetchOpts, body: JSON.stringify(_b) };
|
|
529
|
+
}
|
|
530
|
+
} catch { }
|
|
531
|
+
}
|
|
532
|
+
// 记录 proxy 信息到日志条目
|
|
533
|
+
requestEntry.proxyProfile = _activeProfile.name;
|
|
534
|
+
requestEntry.proxyUrl = _fetchUrl;
|
|
535
|
+
} catch (err) {
|
|
536
|
+
if (process.env.CXV_DEBUG) console.warn('[CX-Viewer] Proxy URL rewrite error:', err.message);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
let response;
|
|
541
|
+
try {
|
|
542
|
+
response = await _originalFetch.call(this, _fetchUrl, _fetchOpts);
|
|
543
|
+
} catch (err) {
|
|
544
|
+
if (requestEntry?.isStream) resetStreamingState();
|
|
545
|
+
throw err;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (requestEntry) {
|
|
549
|
+
const duration = Date.now() - startTime;
|
|
550
|
+
requestEntry.duration = duration;
|
|
551
|
+
|
|
552
|
+
// 对于流式响应,拦截并捕获内容
|
|
553
|
+
if (requestEntry.isStream) {
|
|
554
|
+
try {
|
|
555
|
+
requestEntry.response = {
|
|
556
|
+
status: response.status,
|
|
557
|
+
statusText: response.statusText,
|
|
558
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
559
|
+
body: { events: [] }
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
const originalBody = response.body;
|
|
563
|
+
const reader = originalBody.getReader();
|
|
564
|
+
const decoder = new TextDecoder();
|
|
565
|
+
let streamedContent = '';
|
|
566
|
+
|
|
567
|
+
const stream = new ReadableStream({
|
|
568
|
+
async start(controller) {
|
|
569
|
+
try {
|
|
570
|
+
while (true) {
|
|
571
|
+
const { done, value } = await reader.read();
|
|
572
|
+
if (done) {
|
|
573
|
+
// flush decoder 残留字节
|
|
574
|
+
streamedContent += decoder.decode();
|
|
575
|
+
// 流结束,组装完整的消息对象
|
|
576
|
+
try {
|
|
577
|
+
const events = streamedContent.split('\n\n')
|
|
578
|
+
.filter(block => block.trim())
|
|
579
|
+
.map(block => {
|
|
580
|
+
// SSE 块可能包含多行: event: xxx\ndata: {...}
|
|
581
|
+
const lines = block.split('\n');
|
|
582
|
+
const dataLine = lines.find(l => l.startsWith('data:'));
|
|
583
|
+
if (dataLine) {
|
|
584
|
+
// 处理 "data:" 或 "data: " 两种格式
|
|
585
|
+
const jsonStr = dataLine.startsWith('data: ')
|
|
586
|
+
? dataLine.substring(6)
|
|
587
|
+
: dataLine.substring(5);
|
|
588
|
+
try {
|
|
589
|
+
return JSON.parse(jsonStr);
|
|
590
|
+
} catch {
|
|
591
|
+
return jsonStr;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
return null;
|
|
595
|
+
})
|
|
596
|
+
.filter(Boolean);
|
|
597
|
+
|
|
598
|
+
// 组装完整的 message 对象(GLM 使用标准格式,但 data: 后无空格)
|
|
599
|
+
const assembledMessage = assembleStreamMessage(events);
|
|
600
|
+
|
|
601
|
+
// 直接使用组装后的 message 对象作为 response.body
|
|
602
|
+
// 如果组装失败(例如非标准 SSE),则使用原始流内容
|
|
603
|
+
requestEntry.response.body = assembledMessage || streamedContent;
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
// 移除在途请求标记,保持原始报文
|
|
607
|
+
delete requestEntry.inProgress;
|
|
608
|
+
delete requestEntry.requestId;
|
|
609
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
610
|
+
_commitDeltaState(_deltaOriginalMessagesLength);
|
|
611
|
+
// Release memory: clear large objects after disk write
|
|
612
|
+
streamedContent = '';
|
|
613
|
+
requestEntry.response = null;
|
|
614
|
+
resetStreamingState();
|
|
615
|
+
} catch (err) {
|
|
616
|
+
requestEntry.response.body = streamedContent.slice(0, 1000);
|
|
617
|
+
delete requestEntry.inProgress;
|
|
618
|
+
delete requestEntry.requestId;
|
|
619
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
620
|
+
_commitDeltaState(_deltaOriginalMessagesLength);
|
|
621
|
+
streamedContent = '';
|
|
622
|
+
requestEntry.response = null;
|
|
623
|
+
resetStreamingState();
|
|
624
|
+
}
|
|
625
|
+
controller.close();
|
|
626
|
+
break;
|
|
627
|
+
}
|
|
628
|
+
streamingState.bytesReceived += value.byteLength;
|
|
629
|
+
streamingState.chunksReceived++;
|
|
630
|
+
const chunk = decoder.decode(value, { stream: true });
|
|
631
|
+
streamedContent += chunk;
|
|
632
|
+
controller.enqueue(value);
|
|
633
|
+
}
|
|
634
|
+
} catch (err) {
|
|
635
|
+
resetStreamingState();
|
|
636
|
+
controller.error(err);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
// 返回带有代理流的新响应
|
|
642
|
+
return new Response(stream, {
|
|
643
|
+
status: response.status,
|
|
644
|
+
statusText: response.statusText,
|
|
645
|
+
headers: response.headers
|
|
646
|
+
});
|
|
647
|
+
} catch (err) {
|
|
648
|
+
requestEntry.response = {
|
|
649
|
+
status: response.status,
|
|
650
|
+
statusText: response.statusText,
|
|
651
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
652
|
+
body: '[Streaming Response - Capture failed]'
|
|
653
|
+
};
|
|
654
|
+
delete requestEntry.inProgress;
|
|
655
|
+
delete requestEntry.requestId;
|
|
656
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
657
|
+
_commitDeltaState(_deltaOriginalMessagesLength);
|
|
658
|
+
resetStreamingState();
|
|
659
|
+
}
|
|
660
|
+
} else {
|
|
661
|
+
// 对于非流式响应,可以安全读取body
|
|
662
|
+
try {
|
|
663
|
+
const clonedResponse = response.clone();
|
|
664
|
+
const responseText = await clonedResponse.text();
|
|
665
|
+
let responseData = null;
|
|
666
|
+
|
|
667
|
+
try {
|
|
668
|
+
responseData = JSON.parse(responseText);
|
|
669
|
+
} catch {
|
|
670
|
+
responseData = responseText.slice(0, 1000);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
requestEntry.response = {
|
|
674
|
+
status: response.status,
|
|
675
|
+
statusText: response.statusText,
|
|
676
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
677
|
+
body: responseData
|
|
678
|
+
};
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
delete requestEntry.inProgress;
|
|
682
|
+
delete requestEntry.requestId;
|
|
683
|
+
|
|
684
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
685
|
+
_commitDeltaState(_deltaOriginalMessagesLength);
|
|
686
|
+
} catch (err) {
|
|
687
|
+
delete requestEntry.inProgress;
|
|
688
|
+
delete requestEntry.requestId;
|
|
689
|
+
appendFileSync(LOG_FILE, JSON.stringify(requestEntry) + '\n---\n');
|
|
690
|
+
_commitDeltaState(_deltaOriginalMessagesLength);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
return response;
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
|