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
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* appserver-bridge.js — Codex App-Server WebSocket 中间代理
|
|
3
|
+
*
|
|
4
|
+
* 架构:
|
|
5
|
+
* codex TUI (--remote ws://127.0.0.1:PROXY_PORT)
|
|
6
|
+
* ↕ WebSocket (JSON-RPC)
|
|
7
|
+
* cxv WS proxy (本模块) ← 记录所有双向消息 → LOG_FILE
|
|
8
|
+
* ↕ WebSocket (JSON-RPC)
|
|
9
|
+
* codex app-server (--listen ws://127.0.0.1:SERVER_PORT)
|
|
10
|
+
*
|
|
11
|
+
* cxv 作为中间代理转发所有消息,同时解析 server→client 的 notifications
|
|
12
|
+
* 并转换为 cx-viewer entry 格式写入 LOG_FILE。
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { spawn, execSync } from 'node:child_process';
|
|
16
|
+
import { createServer } from 'node:http';
|
|
17
|
+
import { appendFileSync } from 'node:fs';
|
|
18
|
+
import { basename } from 'node:path';
|
|
19
|
+
import { BINARY_NAME } from '../findcx.js';
|
|
20
|
+
import WebSocket, { WebSocketServer } from 'ws';
|
|
21
|
+
|
|
22
|
+
let _appServerProcess = null;
|
|
23
|
+
let _proxyServer = null;
|
|
24
|
+
let _upstreamWs = null;
|
|
25
|
+
let _logFile = null;
|
|
26
|
+
let _currentModel = null;
|
|
27
|
+
let _currentProject = null;
|
|
28
|
+
let _messages = []; // 累积 messages 用于 MainAgent entry
|
|
29
|
+
let _pendingContent = []; // 当前 turn 的 assistant content blocks
|
|
30
|
+
let _turnStartTime = null;
|
|
31
|
+
|
|
32
|
+
// 丰富的上下文信息
|
|
33
|
+
let _threadId = null;
|
|
34
|
+
let _turnId = null;
|
|
35
|
+
let _cwd = null;
|
|
36
|
+
let _systemPrompt = null;
|
|
37
|
+
let _serverInfo = null; // initialize 响应
|
|
38
|
+
let _turnContext = {}; // turn/start 的完整 params
|
|
39
|
+
let _threadMeta = {}; // thread/started 的完整信息
|
|
40
|
+
let _lastTokenUsage = null; // 最近的 token usage
|
|
41
|
+
let _turnStatus = null; // turn 完成状态
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 找一个空闲端口
|
|
45
|
+
*/
|
|
46
|
+
function findFreePort() {
|
|
47
|
+
return new Promise((resolve, reject) => {
|
|
48
|
+
const srv = createServer();
|
|
49
|
+
srv.listen(0, '127.0.0.1', () => {
|
|
50
|
+
const port = srv.address().port;
|
|
51
|
+
srv.close(() => resolve(port));
|
|
52
|
+
});
|
|
53
|
+
srv.on('error', reject);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 等待 app-server 就绪
|
|
59
|
+
*/
|
|
60
|
+
async function waitForReady(url, timeoutMs = 15000) {
|
|
61
|
+
const start = Date.now();
|
|
62
|
+
while (Date.now() - start < timeoutMs) {
|
|
63
|
+
try {
|
|
64
|
+
const res = await fetch(url);
|
|
65
|
+
if (res.ok) return true;
|
|
66
|
+
} catch {}
|
|
67
|
+
await new Promise(r => setTimeout(r, 300));
|
|
68
|
+
}
|
|
69
|
+
throw new Error(`App-server not ready after ${timeoutMs}ms`);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 写入一条 entry 到 LOG_FILE
|
|
74
|
+
*/
|
|
75
|
+
function writeEntry(entry) {
|
|
76
|
+
if (!entry || !_logFile) return;
|
|
77
|
+
try {
|
|
78
|
+
appendFileSync(_logFile, JSON.stringify(entry) + '\n---\n');
|
|
79
|
+
} catch {}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 构建完整的 request body(包含所有可用上下文)
|
|
84
|
+
*/
|
|
85
|
+
function buildFullRequestBody() {
|
|
86
|
+
return {
|
|
87
|
+
model: _currentModel,
|
|
88
|
+
system: _systemPrompt || 'You are Codex',
|
|
89
|
+
messages: _messages.map(m => ({ ...m })),
|
|
90
|
+
tools: [{ name: 'Bash' }, { name: 'Edit' }, { name: 'Task' }],
|
|
91
|
+
// turn/start 中的完整参数
|
|
92
|
+
...(_turnContext.approvalPolicy ? { approval_policy: _turnContext.approvalPolicy } : {}),
|
|
93
|
+
...(_turnContext.effort ? { reasoning_effort: _turnContext.effort } : {}),
|
|
94
|
+
...(_turnContext.summary ? { reasoning_summary: _turnContext.summary } : {}),
|
|
95
|
+
...(_turnContext.sandboxPolicy ? { sandbox_policy: _turnContext.sandboxPolicy } : {}),
|
|
96
|
+
// 线程和 turn 元数据
|
|
97
|
+
metadata: {
|
|
98
|
+
thread_id: _threadId,
|
|
99
|
+
turn_id: _turnId,
|
|
100
|
+
cwd: _cwd || _currentProject,
|
|
101
|
+
...(_threadMeta.preview ? { thread_preview: _threadMeta.preview } : {}),
|
|
102
|
+
...(_serverInfo ? { server: _serverInfo } : {}),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 构建完整的 response body
|
|
109
|
+
*/
|
|
110
|
+
function buildFullResponseBody(responseContent, turnMeta) {
|
|
111
|
+
const usage = _lastTokenUsage?.last;
|
|
112
|
+
const totalUsage = _lastTokenUsage?.total;
|
|
113
|
+
return {
|
|
114
|
+
content: responseContent,
|
|
115
|
+
model: _currentModel,
|
|
116
|
+
stop_reason: _turnStatus || 'end_turn',
|
|
117
|
+
...(usage ? {
|
|
118
|
+
usage: {
|
|
119
|
+
input_tokens: usage.inputTokens || 0,
|
|
120
|
+
output_tokens: usage.outputTokens || 0,
|
|
121
|
+
cache_read_input_tokens: usage.cachedInputTokens || 0,
|
|
122
|
+
reasoning_output_tokens: usage.reasoningOutputTokens || 0,
|
|
123
|
+
total_tokens: usage.totalTokens || 0,
|
|
124
|
+
},
|
|
125
|
+
} : {}),
|
|
126
|
+
...(totalUsage ? {
|
|
127
|
+
total_usage: {
|
|
128
|
+
input_tokens: totalUsage.inputTokens || 0,
|
|
129
|
+
output_tokens: totalUsage.outputTokens || 0,
|
|
130
|
+
cache_read_input_tokens: totalUsage.cachedInputTokens || 0,
|
|
131
|
+
reasoning_output_tokens: totalUsage.reasoningOutputTokens || 0,
|
|
132
|
+
total_tokens: totalUsage.totalTokens || 0,
|
|
133
|
+
},
|
|
134
|
+
} : {}),
|
|
135
|
+
...(_lastTokenUsage?.modelContextWindow ? { context_window: _lastTokenUsage.modelContextWindow } : {}),
|
|
136
|
+
...(turnMeta ? {
|
|
137
|
+
turn: {
|
|
138
|
+
id: turnMeta.id,
|
|
139
|
+
status: turnMeta.status,
|
|
140
|
+
started_at: turnMeta.startedAt,
|
|
141
|
+
completed_at: turnMeta.completedAt,
|
|
142
|
+
duration_ms: turnMeta.durationMs,
|
|
143
|
+
},
|
|
144
|
+
} : {}),
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 发出累积式 MainAgent entry
|
|
150
|
+
*/
|
|
151
|
+
function emitMainAgentEntry(timestamp, responseContent, turnMeta) {
|
|
152
|
+
const entry = {
|
|
153
|
+
timestamp,
|
|
154
|
+
project: _currentProject || 'codex',
|
|
155
|
+
url: `codex://api/${_currentModel || 'codex'}`,
|
|
156
|
+
method: 'POST',
|
|
157
|
+
headers: {},
|
|
158
|
+
body: buildFullRequestBody(),
|
|
159
|
+
response: {
|
|
160
|
+
status: 200,
|
|
161
|
+
statusText: 'OK',
|
|
162
|
+
headers: {},
|
|
163
|
+
body: buildFullResponseBody(responseContent, turnMeta),
|
|
164
|
+
},
|
|
165
|
+
duration: turnMeta?.durationMs || (_turnStartTime ? Date.now() - _turnStartTime : 0),
|
|
166
|
+
isStream: true,
|
|
167
|
+
mainAgent: true,
|
|
168
|
+
_appServerSource: true,
|
|
169
|
+
};
|
|
170
|
+
writeEntry(entry);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* 解析 app-server → client 的 JSON-RPC notification
|
|
175
|
+
*/
|
|
176
|
+
function parseServerMessage(msg) {
|
|
177
|
+
if (!msg) return;
|
|
178
|
+
|
|
179
|
+
// 捕获 initialize response 中的服务端信息
|
|
180
|
+
if (msg.id !== undefined && msg.result && !_serverInfo) {
|
|
181
|
+
if (msg.result.userAgent || msg.result.codexHome) {
|
|
182
|
+
_serverInfo = {
|
|
183
|
+
userAgent: msg.result.userAgent,
|
|
184
|
+
codexHome: msg.result.codexHome,
|
|
185
|
+
platform: msg.result.platformFamily,
|
|
186
|
+
os: msg.result.platformOs,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (!msg.method) return; // 只处理 notifications(有 method)
|
|
192
|
+
if (msg.id !== undefined && msg.id !== null) return; // 忽略 request responses
|
|
193
|
+
|
|
194
|
+
const params = msg.params || {};
|
|
195
|
+
const ts = new Date().toISOString();
|
|
196
|
+
const base = {
|
|
197
|
+
timestamp: ts,
|
|
198
|
+
project: _currentProject || 'codex',
|
|
199
|
+
headers: {},
|
|
200
|
+
isStream: false,
|
|
201
|
+
_appServerSource: true,
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const method = msg.method;
|
|
205
|
+
|
|
206
|
+
// thread/started — 捕获线程元数据
|
|
207
|
+
if (method === 'thread/started') {
|
|
208
|
+
const thread = params.thread || {};
|
|
209
|
+
_threadId = thread.id;
|
|
210
|
+
_threadMeta = thread;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// turn/started — 捕获 turn 元数据
|
|
215
|
+
if (method === 'turn/started') {
|
|
216
|
+
_turnStartTime = Date.now();
|
|
217
|
+
_pendingContent = [];
|
|
218
|
+
_turnId = params.turn?.id;
|
|
219
|
+
_threadId = params.threadId || _threadId;
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// turn/completed — 发出 MainAgent entry(带 turn 元数据和 token usage)
|
|
224
|
+
if (method === 'turn/completed') {
|
|
225
|
+
const turn = params.turn || {};
|
|
226
|
+
_turnStatus = turn.status;
|
|
227
|
+
if (_pendingContent.length > 0) {
|
|
228
|
+
_messages.push({ role: 'assistant', content: _pendingContent });
|
|
229
|
+
emitMainAgentEntry(ts, _pendingContent, turn);
|
|
230
|
+
_pendingContent = [];
|
|
231
|
+
}
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// thread/tokenUsageUpdated — 缓存 token usage(供 emitMainAgentEntry 使用)
|
|
236
|
+
if (method === 'thread/tokenUsageUpdated') {
|
|
237
|
+
_lastTokenUsage = params.tokenUsage || null;
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// item/completed — ResponseItem 完成(包含 message、function_call、function_call_output、reasoning 等)
|
|
242
|
+
if (method === 'item/completed' || method === 'rawResponseItem/completed' || method === 'rawResponseItemCompleted') {
|
|
243
|
+
const item = params.item || {};
|
|
244
|
+
const type = item.type;
|
|
245
|
+
|
|
246
|
+
// userMessage — 用户输入(也通过 item/completed 到达)
|
|
247
|
+
if (type === 'userMessage') {
|
|
248
|
+
const content = item.content || [];
|
|
249
|
+
for (const block of content) {
|
|
250
|
+
if ((block.type === 'text' || block.type === 'input_text') && block.text) {
|
|
251
|
+
_messages.push({ role: 'user', content: block.text });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// message (assistant text)
|
|
258
|
+
if (type === 'message') {
|
|
259
|
+
const content = item.content || [];
|
|
260
|
+
for (const block of content) {
|
|
261
|
+
if (block.type === 'output_text' || block.type === 'text') {
|
|
262
|
+
_pendingContent.push({ type: 'text', text: block.text || '' });
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// 如果有 end_turn,立即 flush
|
|
266
|
+
if (item.end_turn) {
|
|
267
|
+
_messages.push({ role: 'assistant', content: _pendingContent });
|
|
268
|
+
emitMainAgentEntry(ts, [..._pendingContent], null);
|
|
269
|
+
_pendingContent = [];
|
|
270
|
+
}
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// reasoning
|
|
275
|
+
if (type === 'reasoning') {
|
|
276
|
+
const text = (item.content || []).map(c => c.text || '').join('');
|
|
277
|
+
if (text) {
|
|
278
|
+
_pendingContent.push({ type: 'thinking', thinking: text, summary: item.summary });
|
|
279
|
+
}
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// function_call
|
|
284
|
+
if (type === 'function_call') {
|
|
285
|
+
let args = item.arguments;
|
|
286
|
+
if (typeof args === 'string') {
|
|
287
|
+
try { args = JSON.parse(args); } catch {}
|
|
288
|
+
}
|
|
289
|
+
_pendingContent.push({
|
|
290
|
+
type: 'tool_use',
|
|
291
|
+
id: item.call_id || item.id,
|
|
292
|
+
name: item.name || 'unknown',
|
|
293
|
+
input: args || {},
|
|
294
|
+
});
|
|
295
|
+
writeEntry({
|
|
296
|
+
...base,
|
|
297
|
+
url: `codex://tool/${item.name || 'unknown'}`,
|
|
298
|
+
method: 'TOOL',
|
|
299
|
+
body: { tool_name: item.name, tool_input: args, _callId: item.call_id },
|
|
300
|
+
response: null,
|
|
301
|
+
duration: 0,
|
|
302
|
+
mainAgent: false,
|
|
303
|
+
});
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// function_call_output
|
|
308
|
+
if (type === 'function_call_output') {
|
|
309
|
+
// Flush pending assistant content
|
|
310
|
+
if (_pendingContent.length > 0) {
|
|
311
|
+
_messages.push({ role: 'assistant', content: _pendingContent });
|
|
312
|
+
_pendingContent = [];
|
|
313
|
+
}
|
|
314
|
+
_messages.push({
|
|
315
|
+
role: 'user',
|
|
316
|
+
content: [{
|
|
317
|
+
type: 'tool_result',
|
|
318
|
+
tool_use_id: item.call_id,
|
|
319
|
+
content: typeof item.output === 'string' ? item.output : JSON.stringify(item.output),
|
|
320
|
+
}],
|
|
321
|
+
});
|
|
322
|
+
writeEntry({
|
|
323
|
+
...base,
|
|
324
|
+
url: `codex://tool_result/${item.call_id || ''}`,
|
|
325
|
+
method: 'TOOL_RESULT',
|
|
326
|
+
body: { _callId: item.call_id },
|
|
327
|
+
response: {
|
|
328
|
+
status: 200, statusText: 'OK', headers: {},
|
|
329
|
+
body: { output: item.output },
|
|
330
|
+
},
|
|
331
|
+
duration: 0,
|
|
332
|
+
mainAgent: false,
|
|
333
|
+
});
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// custom_tool_call (MCP)
|
|
338
|
+
if (type === 'custom_tool_call') {
|
|
339
|
+
_pendingContent.push({
|
|
340
|
+
type: 'tool_use',
|
|
341
|
+
id: item.call_id || item.id,
|
|
342
|
+
name: item.name || 'unknown',
|
|
343
|
+
input: item.input || {},
|
|
344
|
+
});
|
|
345
|
+
writeEntry({
|
|
346
|
+
...base,
|
|
347
|
+
url: `codex://mcp_tool/${item.name || 'unknown'}`,
|
|
348
|
+
method: 'TOOL',
|
|
349
|
+
body: { tool_name: item.name, tool_input: item.input, _callId: item.call_id, _source: 'mcp' },
|
|
350
|
+
response: null,
|
|
351
|
+
duration: 0,
|
|
352
|
+
mainAgent: false,
|
|
353
|
+
});
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// custom_tool_call_output
|
|
358
|
+
if (type === 'custom_tool_call_output') {
|
|
359
|
+
if (_pendingContent.length > 0) {
|
|
360
|
+
_messages.push({ role: 'assistant', content: _pendingContent });
|
|
361
|
+
_pendingContent = [];
|
|
362
|
+
}
|
|
363
|
+
_messages.push({
|
|
364
|
+
role: 'user',
|
|
365
|
+
content: [{ type: 'tool_result', tool_use_id: item.call_id, content: typeof item.output === 'string' ? item.output : JSON.stringify(item.output) }],
|
|
366
|
+
});
|
|
367
|
+
writeEntry({
|
|
368
|
+
...base,
|
|
369
|
+
url: `codex://mcp_tool_result/${item.call_id || ''}`,
|
|
370
|
+
method: 'TOOL_RESULT',
|
|
371
|
+
body: { _callId: item.call_id },
|
|
372
|
+
response: { status: 200, statusText: 'OK', headers: {}, body: { output: item.output } },
|
|
373
|
+
duration: 0,
|
|
374
|
+
mainAgent: false,
|
|
375
|
+
});
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// agentMessage/delta or agentMessageDelta — 流式文本(可选记录)
|
|
381
|
+
if (method === 'agentMessage/delta' || method === 'agentMessageDelta') {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// error — 错误通知
|
|
386
|
+
if (method === 'error') {
|
|
387
|
+
writeEntry({
|
|
388
|
+
...base,
|
|
389
|
+
url: 'codex://error',
|
|
390
|
+
method: 'POST',
|
|
391
|
+
body: buildFullRequestBody(),
|
|
392
|
+
response: {
|
|
393
|
+
status: 500, statusText: 'Error', headers: {},
|
|
394
|
+
body: { error: params.error || params },
|
|
395
|
+
},
|
|
396
|
+
duration: _turnStartTime ? Date.now() - _turnStartTime : 0,
|
|
397
|
+
mainAgent: true,
|
|
398
|
+
_appServerSource: true,
|
|
399
|
+
});
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* 解析 client → server 的 JSON-RPC request(提取用户输入)
|
|
406
|
+
*/
|
|
407
|
+
function parseClientMessage(msg) {
|
|
408
|
+
if (!msg || !msg.method) return;
|
|
409
|
+
|
|
410
|
+
// turn/start — 用户发起新 turn(捕获完整上下文)
|
|
411
|
+
if (msg.method === 'turn/start') {
|
|
412
|
+
const params = msg.params || {};
|
|
413
|
+
_currentModel = params.model || _currentModel;
|
|
414
|
+
_turnStartTime = Date.now();
|
|
415
|
+
_pendingContent = [];
|
|
416
|
+
_threadId = params.threadId || _threadId;
|
|
417
|
+
// 保存完整 turn 参数供 buildFullRequestBody 使用
|
|
418
|
+
_turnContext = {
|
|
419
|
+
approvalPolicy: params.approvalPolicy,
|
|
420
|
+
effort: params.effort,
|
|
421
|
+
summary: params.summary,
|
|
422
|
+
sandboxPolicy: params.sandboxPolicy,
|
|
423
|
+
cwd: params.cwd,
|
|
424
|
+
model: params.model,
|
|
425
|
+
outputSchema: params.outputSchema,
|
|
426
|
+
};
|
|
427
|
+
if (params.cwd) _cwd = params.cwd;
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
// thread/start — 新会话
|
|
432
|
+
if (msg.method === 'thread/start') {
|
|
433
|
+
const params = msg.params || {};
|
|
434
|
+
_cwd = params.cwd || _cwd;
|
|
435
|
+
_currentProject = params.cwd ? basename(params.cwd) : _currentProject;
|
|
436
|
+
_messages = [];
|
|
437
|
+
_pendingContent = [];
|
|
438
|
+
_threadMeta = {};
|
|
439
|
+
_turnContext = {};
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* 启动 App-Server Bridge
|
|
446
|
+
*
|
|
447
|
+
* @param {object} options
|
|
448
|
+
* @param {string} options.cwd - 工作目录
|
|
449
|
+
* @param {string} options.codexPath - codex 二进制路径
|
|
450
|
+
* @param {string} options.logFile - LOG_FILE 路径
|
|
451
|
+
* @param {object} [options.env] - 环境变量
|
|
452
|
+
* @returns {Promise<{ proxyPort: number, appServerPort: number, stop: Function }>}
|
|
453
|
+
*/
|
|
454
|
+
export async function startAppServerBridge(options) {
|
|
455
|
+
const { cwd, codexPath, logFile, env = process.env } = options;
|
|
456
|
+
_logFile = logFile;
|
|
457
|
+
_currentModel = null;
|
|
458
|
+
_currentProject = cwd ? basename(cwd) : 'codex';
|
|
459
|
+
_cwd = cwd;
|
|
460
|
+
_messages = [];
|
|
461
|
+
_pendingContent = [];
|
|
462
|
+
_threadId = null;
|
|
463
|
+
_turnId = null;
|
|
464
|
+
_serverInfo = null;
|
|
465
|
+
_turnContext = {};
|
|
466
|
+
_threadMeta = {};
|
|
467
|
+
_systemPrompt = null;
|
|
468
|
+
_lastTokenUsage = null;
|
|
469
|
+
_turnStatus = null;
|
|
470
|
+
|
|
471
|
+
// 1. 找两个空闲端口
|
|
472
|
+
const appServerPort = await findFreePort();
|
|
473
|
+
const proxyPort = await findFreePort();
|
|
474
|
+
|
|
475
|
+
// 2. 启动 codex app-server(确保代理环境变量传递)
|
|
476
|
+
const appEnv = { ...env };
|
|
477
|
+
if (!appEnv.HTTPS_PROXY && !appEnv.HTTP_PROXY && !appEnv.https_proxy && !appEnv.http_proxy) {
|
|
478
|
+
try {
|
|
479
|
+
const shell = process.env.SHELL || '/bin/zsh';
|
|
480
|
+
const funcBody = execSync(
|
|
481
|
+
`${shell} -ic 'declare -f ${BINARY_NAME} 2>/dev/null || type ${BINARY_NAME} 2>/dev/null'`,
|
|
482
|
+
{ encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'] }
|
|
483
|
+
);
|
|
484
|
+
const proxyRe = /\b(HTTPS?_PROXY|https?_proxy|ALL_PROXY|all_proxy|NO_PROXY|no_proxy)=(\S+)/g;
|
|
485
|
+
let m;
|
|
486
|
+
while ((m = proxyRe.exec(funcBody)) !== null) {
|
|
487
|
+
appEnv[m[1]] = m[2];
|
|
488
|
+
}
|
|
489
|
+
} catch {}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
let command = codexPath;
|
|
493
|
+
let appServerArgs = ['app-server', '--listen', `ws://127.0.0.1:${appServerPort}`];
|
|
494
|
+
// npm 版 codex 是 .js 文件,需要 node 运行
|
|
495
|
+
if (codexPath.endsWith('.js')) {
|
|
496
|
+
command = process.execPath;
|
|
497
|
+
appServerArgs = [codexPath, ...appServerArgs];
|
|
498
|
+
}
|
|
499
|
+
_appServerProcess = spawn(command, appServerArgs, {
|
|
500
|
+
cwd,
|
|
501
|
+
env: appEnv,
|
|
502
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
503
|
+
});
|
|
504
|
+
|
|
505
|
+
_appServerProcess.stdout.on('data', (data) => {
|
|
506
|
+
if (process.env.CXV_DEBUG) process.stderr.write(`[app-server] ${data}`);
|
|
507
|
+
});
|
|
508
|
+
_appServerProcess.stderr.on('data', (data) => {
|
|
509
|
+
if (process.env.CXV_DEBUG) process.stderr.write(`[app-server] ${data}`);
|
|
510
|
+
});
|
|
511
|
+
|
|
512
|
+
// 3. 等待就绪
|
|
513
|
+
await waitForReady(`http://127.0.0.1:${appServerPort}/readyz`);
|
|
514
|
+
|
|
515
|
+
// 4. 启动 WebSocket proxy server
|
|
516
|
+
const httpServer = createServer((req, res) => {
|
|
517
|
+
res.writeHead(404);
|
|
518
|
+
res.end();
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
const wss = new WebSocketServer({ server: httpServer });
|
|
522
|
+
|
|
523
|
+
wss.on('connection', (clientWs) => {
|
|
524
|
+
// 为每个 TUI 客户端连接创建到 app-server 的上游连接
|
|
525
|
+
const upstream = new WebSocket(`ws://127.0.0.1:${appServerPort}`);
|
|
526
|
+
_upstreamWs = upstream;
|
|
527
|
+
const pendingQueue = []; // 上游未就绪时暂存的消息
|
|
528
|
+
let upstreamReady = false;
|
|
529
|
+
|
|
530
|
+
upstream.on('open', () => {
|
|
531
|
+
upstreamReady = true;
|
|
532
|
+
for (const m of pendingQueue) upstream.send(m);
|
|
533
|
+
pendingQueue.length = 0;
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
// client → proxy → upstream
|
|
537
|
+
clientWs.on('message', (data) => {
|
|
538
|
+
const str = typeof data === 'string' ? data : data.toString();
|
|
539
|
+
try {
|
|
540
|
+
parseClientMessage(JSON.parse(str));
|
|
541
|
+
} catch {}
|
|
542
|
+
|
|
543
|
+
if (upstreamReady) {
|
|
544
|
+
upstream.send(str);
|
|
545
|
+
} else {
|
|
546
|
+
pendingQueue.push(str);
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// upstream → proxy → client(记录 server notifications)
|
|
551
|
+
upstream.on('message', (data) => {
|
|
552
|
+
const str = typeof data === 'string' ? data : data.toString();
|
|
553
|
+
try {
|
|
554
|
+
parseServerMessage(JSON.parse(str));
|
|
555
|
+
} catch {}
|
|
556
|
+
|
|
557
|
+
if (clientWs.readyState === WebSocket.OPEN) {
|
|
558
|
+
clientWs.send(str);
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
|
|
562
|
+
// 清理
|
|
563
|
+
clientWs.on('close', () => { upstream.close(); _upstreamWs = null; });
|
|
564
|
+
upstream.on('close', () => clientWs.close());
|
|
565
|
+
clientWs.on('error', () => upstream.close());
|
|
566
|
+
upstream.on('error', () => clientWs.close());
|
|
567
|
+
});
|
|
568
|
+
|
|
569
|
+
await new Promise((resolve, reject) => {
|
|
570
|
+
httpServer.listen(proxyPort, '127.0.0.1', () => resolve());
|
|
571
|
+
httpServer.on('error', reject);
|
|
572
|
+
});
|
|
573
|
+
_proxyServer = httpServer;
|
|
574
|
+
|
|
575
|
+
return {
|
|
576
|
+
proxyPort,
|
|
577
|
+
appServerPort,
|
|
578
|
+
stop() {
|
|
579
|
+
if (_proxyServer) { _proxyServer.close(); _proxyServer = null; }
|
|
580
|
+
if (_upstreamWs) { _upstreamWs.close(); _upstreamWs = null; }
|
|
581
|
+
if (_appServerProcess) { _appServerProcess.kill(); _appServerProcess = null; }
|
|
582
|
+
},
|
|
583
|
+
};
|
|
584
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* ask-bridge.js — PreToolUse hook bridge for AskUserQuestion.
|
|
4
|
+
*
|
|
5
|
+
* Called by Codex when AskUserQuestion tool is about to execute.
|
|
6
|
+
* Reads hook payload from stdin, forwards questions to cx-viewer server
|
|
7
|
+
* via long-poll HTTP, waits for user answers, then outputs updatedInput
|
|
8
|
+
* with answers to bypass the terminal UI.
|
|
9
|
+
*
|
|
10
|
+
* Exit 0 = success (stdout contains hookSpecificOutput with updatedInput)
|
|
11
|
+
* Exit 1 = fallback (Codex proceeds with normal terminal UI)
|
|
12
|
+
*
|
|
13
|
+
* Hook config in ~/.codex/settings.json:
|
|
14
|
+
* {
|
|
15
|
+
* "hooks": {
|
|
16
|
+
* "PreToolUse": [{
|
|
17
|
+
* "matcher": "AskUserQuestion",
|
|
18
|
+
* "hooks": [{ "type": "command", "command": "node /path/to/ask-bridge.js" }]
|
|
19
|
+
* }]
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { readFileSync } from 'node:fs';
|
|
25
|
+
import http from 'node:http';
|
|
26
|
+
|
|
27
|
+
const port = process.env.CXVIEWER_PORT;
|
|
28
|
+
if (!port) {
|
|
29
|
+
// cx-viewer not running — fall back to terminal UI silently (exit 0)
|
|
30
|
+
// exit(1) causes Codex to log "hook error" on every AskUserQuestion call
|
|
31
|
+
process.stdout.write(JSON.stringify({ continue: true, suppressOutput: true }) + '\n');
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let stdinData;
|
|
36
|
+
try {
|
|
37
|
+
stdinData = readFileSync(0, 'utf-8');
|
|
38
|
+
} catch {
|
|
39
|
+
process.stderr.write('ask-bridge: failed to read stdin\n');
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (!stdinData || !stdinData.trim()) {
|
|
44
|
+
process.stderr.write('ask-bridge: empty stdin\n');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let payload;
|
|
49
|
+
try {
|
|
50
|
+
payload = JSON.parse(stdinData);
|
|
51
|
+
} catch {
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const questions = payload?.tool_input?.questions;
|
|
56
|
+
if (!Array.isArray(questions) || questions.length === 0) {
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const TIMEOUT_MS = 5 * 60 * 1000; // 5 minutes
|
|
61
|
+
|
|
62
|
+
function postToViewer() {
|
|
63
|
+
return new Promise((resolve, reject) => {
|
|
64
|
+
const body = JSON.stringify({ questions });
|
|
65
|
+
const req = http.request({
|
|
66
|
+
hostname: '127.0.0.1',
|
|
67
|
+
port: Number(port),
|
|
68
|
+
path: '/api/ask-hook',
|
|
69
|
+
method: 'POST',
|
|
70
|
+
headers: {
|
|
71
|
+
'Content-Type': 'application/json',
|
|
72
|
+
'Content-Length': Buffer.byteLength(body),
|
|
73
|
+
},
|
|
74
|
+
}, (res) => {
|
|
75
|
+
let data = '';
|
|
76
|
+
res.on('data', (chunk) => { data += chunk; });
|
|
77
|
+
res.on('end', () => {
|
|
78
|
+
if (res.statusCode === 200) {
|
|
79
|
+
try {
|
|
80
|
+
resolve(JSON.parse(data));
|
|
81
|
+
} catch {
|
|
82
|
+
reject(new Error('Invalid response JSON'));
|
|
83
|
+
}
|
|
84
|
+
} else {
|
|
85
|
+
reject(new Error(`HTTP ${res.statusCode}`));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
req.on('error', reject);
|
|
90
|
+
req.setTimeout(TIMEOUT_MS, () => {
|
|
91
|
+
req.destroy();
|
|
92
|
+
reject(new Error('Timeout'));
|
|
93
|
+
});
|
|
94
|
+
req.write(body);
|
|
95
|
+
req.end();
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
try {
|
|
100
|
+
const data = await postToViewer();
|
|
101
|
+
if (!data.answers || typeof data.answers !== 'object' || Array.isArray(data.answers)) {
|
|
102
|
+
// No valid answers → fall back to terminal UI
|
|
103
|
+
process.stderr.write('ask-bridge: No answers in response (falling back to terminal UI)\n');
|
|
104
|
+
process.stdout.write(JSON.stringify({ continue: true, suppressOutput: true }) + '\n');
|
|
105
|
+
process.exit(0);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const output = {
|
|
109
|
+
hookSpecificOutput: {
|
|
110
|
+
hookEventName: 'PreToolUse',
|
|
111
|
+
permissionDecision: 'allow',
|
|
112
|
+
updatedInput: {
|
|
113
|
+
questions,
|
|
114
|
+
answers: data.answers,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
process.stdout.write(JSON.stringify(output) + '\n');
|
|
120
|
+
process.exit(0);
|
|
121
|
+
} catch (err) {
|
|
122
|
+
// Server unreachable → fall back to terminal UI (not auto-allow)
|
|
123
|
+
process.stderr.write(`ask-bridge: ${err.message} (falling back to terminal UI)\n`);
|
|
124
|
+
process.stdout.write(JSON.stringify({ continue: true, suppressOutput: true }) + '\n');
|
|
125
|
+
process.exit(0);
|
|
126
|
+
}
|