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,464 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sdk-manager.js — Agent SDK session lifecycle manager.
|
|
3
|
+
*
|
|
4
|
+
* Wraps @openai/codex query() to provide:
|
|
5
|
+
* - Structured message processing → JSONL entries for the frontend
|
|
6
|
+
* - canUseTool callback for AskUserQuestion + permission approval
|
|
7
|
+
* - Streaming status tracking
|
|
8
|
+
* - Multi-turn conversation via session resume
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { sdkToJSONLEntry, buildStreamingStatus } from './sdk-adapter.js';
|
|
12
|
+
|
|
13
|
+
let _query;
|
|
14
|
+
try {
|
|
15
|
+
const sdk = await import('@openai/codex');
|
|
16
|
+
_query = sdk.query;
|
|
17
|
+
} catch (err) {
|
|
18
|
+
console.warn('[SDK] Codex SDK not available:', err.message);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Interactive tool names — filtered from entries, handled via canUseTool → WS
|
|
22
|
+
const INTERACTIVE_TOOLS = new Set(['AskUserQuestion', 'ExitPlanMode']);
|
|
23
|
+
|
|
24
|
+
// Session state
|
|
25
|
+
let _sessionId = null;
|
|
26
|
+
let _model = null;
|
|
27
|
+
let _cwd = null;
|
|
28
|
+
let _projectName = null;
|
|
29
|
+
let _permissionMode = 'default';
|
|
30
|
+
let _accumulatedMessages = [];
|
|
31
|
+
let _activeQuery = null;
|
|
32
|
+
let _queryBusy = false; // concurrency guard
|
|
33
|
+
let _sdkTools = null; // real tools list from SDKSystemMessage
|
|
34
|
+
|
|
35
|
+
// Stable timestamp per conversation turn — used as dedup key by frontend
|
|
36
|
+
let _turnTimestamp = null;
|
|
37
|
+
|
|
38
|
+
// Streaming accumulation state
|
|
39
|
+
let _streamingContent = [];
|
|
40
|
+
let _currentBlockData = null;
|
|
41
|
+
let _streamingRequestId = null;
|
|
42
|
+
let _streamThrottleTimer = null;
|
|
43
|
+
|
|
44
|
+
// Callbacks registered by server.js
|
|
45
|
+
let _onEntry = null;
|
|
46
|
+
let _onStreamingStatus = null;
|
|
47
|
+
let _broadcastWs = null;
|
|
48
|
+
|
|
49
|
+
// Pending canUseTool promises: id → { resolve }
|
|
50
|
+
const _pendingApprovals = new Map();
|
|
51
|
+
|
|
52
|
+
// Message queue for messages sent while a query is running
|
|
53
|
+
let _messageQueue = [];
|
|
54
|
+
|
|
55
|
+
export function isSdkAvailable() {
|
|
56
|
+
return typeof _query === 'function';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Initialize SDK session.
|
|
61
|
+
* Does NOT start a query — waits for the first user message via sendUserMessage().
|
|
62
|
+
*/
|
|
63
|
+
export function initSdkSession(cwd, projectName, { onEntry, onStreamingStatus, broadcastWs, permissionMode }) {
|
|
64
|
+
_cwd = cwd;
|
|
65
|
+
_projectName = projectName;
|
|
66
|
+
_onEntry = onEntry;
|
|
67
|
+
_onStreamingStatus = onStreamingStatus;
|
|
68
|
+
_broadcastWs = broadcastWs;
|
|
69
|
+
_permissionMode = permissionMode || 'default';
|
|
70
|
+
_resetFullState();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Send a user message. Starts a new query (or resumes existing session).
|
|
75
|
+
* Queues the message if a query is already running.
|
|
76
|
+
*/
|
|
77
|
+
export async function sendUserMessage(text) {
|
|
78
|
+
if (!_query) throw new Error('Agent SDK not available');
|
|
79
|
+
|
|
80
|
+
// If a query is already running, queue this message and return
|
|
81
|
+
if (_queryBusy) {
|
|
82
|
+
_messageQueue.push(text);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
_queryBusy = true;
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
await _executeQuery(text);
|
|
90
|
+
|
|
91
|
+
// Process any queued messages
|
|
92
|
+
while (_messageQueue.length > 0) {
|
|
93
|
+
const next = _messageQueue.shift();
|
|
94
|
+
await _executeQuery(next);
|
|
95
|
+
}
|
|
96
|
+
} finally {
|
|
97
|
+
_queryBusy = false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Execute a single query for one user message.
|
|
103
|
+
*/
|
|
104
|
+
async function _executeQuery(text) {
|
|
105
|
+
// Generate stable timestamp for this turn — all entries share it for dedup
|
|
106
|
+
_turnTimestamp = new Date().toISOString();
|
|
107
|
+
_streamingRequestId = `sdk_${Date.now()}`;
|
|
108
|
+
|
|
109
|
+
// Accumulate user message BEFORE creating entries (this is the request)
|
|
110
|
+
_accumulatedMessages.push({ role: 'user', content: text });
|
|
111
|
+
|
|
112
|
+
const options = {
|
|
113
|
+
cwd: _cwd,
|
|
114
|
+
includePartialMessages: true,
|
|
115
|
+
permissionMode: _permissionMode,
|
|
116
|
+
canUseTool: _permissionMode === 'bypassPermissions' ? undefined : _handleCanUseTool,
|
|
117
|
+
..._permissionMode === 'bypassPermissions' && { allowDangerouslySkipPermissions: true },
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
if (_sessionId) {
|
|
121
|
+
options.resume = _sessionId;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (_onStreamingStatus) _onStreamingStatus(buildStreamingStatus(true, { model: _model }));
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
_activeQuery = _query({ prompt: text, options });
|
|
128
|
+
|
|
129
|
+
for await (const msg of _activeQuery) {
|
|
130
|
+
_processMessage(msg);
|
|
131
|
+
}
|
|
132
|
+
} catch (err) {
|
|
133
|
+
if (err.name !== 'AbortError') {
|
|
134
|
+
console.error('[SDK] Query error:', err.message);
|
|
135
|
+
}
|
|
136
|
+
} finally {
|
|
137
|
+
_resetStreamingState();
|
|
138
|
+
_activeQuery = null;
|
|
139
|
+
if (_onStreamingStatus) _onStreamingStatus(buildStreamingStatus(false));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Process a single SDK message.
|
|
145
|
+
*/
|
|
146
|
+
function _processMessage(msg) {
|
|
147
|
+
switch (msg.type) {
|
|
148
|
+
case 'system':
|
|
149
|
+
if (msg.session_id) _sessionId = msg.session_id;
|
|
150
|
+
if (msg.model) _model = msg.model;
|
|
151
|
+
// Capture real tools from init message (tools is string[], convert to {name} format)
|
|
152
|
+
if (msg.subtype === 'init') {
|
|
153
|
+
if (Array.isArray(msg.tools)) _sdkTools = msg.tools.map(name => ({ name }));
|
|
154
|
+
}
|
|
155
|
+
// Handle compact boundary: reset accumulated messages since SDK compacted internally
|
|
156
|
+
if (msg.subtype === 'compact_boundary') {
|
|
157
|
+
_accumulatedMessages = [];
|
|
158
|
+
}
|
|
159
|
+
break;
|
|
160
|
+
|
|
161
|
+
case 'assistant':
|
|
162
|
+
// Main agent message (not sub-agent)
|
|
163
|
+
if (!msg.parent_tool_use_id && msg.message) {
|
|
164
|
+
_resetStreamingState();
|
|
165
|
+
|
|
166
|
+
// Snapshot messages BEFORE adding assistant (body.messages = request history, unfiltered)
|
|
167
|
+
const requestMessages = [..._accumulatedMessages];
|
|
168
|
+
|
|
169
|
+
// Accumulate the assistant response for future turns
|
|
170
|
+
// Merge with previous if both are assistant (same API turn, multiple content blocks)
|
|
171
|
+
const lastMsg = _accumulatedMessages[_accumulatedMessages.length - 1];
|
|
172
|
+
if (lastMsg && lastMsg.role === 'assistant' && Array.isArray(lastMsg.content) && Array.isArray(msg.message.content)) {
|
|
173
|
+
lastMsg.content = [...lastMsg.content, ...msg.message.content];
|
|
174
|
+
} else {
|
|
175
|
+
_accumulatedMessages.push({ role: 'assistant', content: msg.message.content });
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Only filter interactive tools from the RESPONSE content (Last Response rendering),
|
|
179
|
+
// NOT from body.messages (history) — filtering history creates orphaned tool_results
|
|
180
|
+
const filteredContent = _filterInteractiveContent(msg.message.content);
|
|
181
|
+
const displayMsg = { ...msg, message: { ...msg.message, content: filteredContent } };
|
|
182
|
+
|
|
183
|
+
// Convert to JSONL entry with stable turn timestamp and real SDK metadata
|
|
184
|
+
const entry = sdkToJSONLEntry(displayMsg, requestMessages, _model, _projectName, {
|
|
185
|
+
timestamp: _turnTimestamp,
|
|
186
|
+
tools: _sdkTools,
|
|
187
|
+
});
|
|
188
|
+
if (_onEntry) _onEntry(entry);
|
|
189
|
+
}
|
|
190
|
+
if (msg.session_id) _sessionId = msg.session_id;
|
|
191
|
+
break;
|
|
192
|
+
|
|
193
|
+
case 'user':
|
|
194
|
+
// Tool results from tool execution — accumulate (skip replays)
|
|
195
|
+
if (msg.message && !msg.isReplay) {
|
|
196
|
+
// Merge with previous if both are user (consecutive tool_results for same turn)
|
|
197
|
+
const lastUserMsg = _accumulatedMessages[_accumulatedMessages.length - 1];
|
|
198
|
+
if (lastUserMsg && lastUserMsg.role === 'user' && Array.isArray(lastUserMsg.content) && Array.isArray(msg.message.content)) {
|
|
199
|
+
lastUserMsg.content = [...lastUserMsg.content, ...msg.message.content];
|
|
200
|
+
} else {
|
|
201
|
+
_accumulatedMessages.push({ role: 'user', content: msg.message.content });
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
break;
|
|
205
|
+
|
|
206
|
+
case 'stream_event':
|
|
207
|
+
if (_onStreamingStatus) {
|
|
208
|
+
_onStreamingStatus(buildStreamingStatus(true, { model: _model }));
|
|
209
|
+
}
|
|
210
|
+
if (!msg.parent_tool_use_id) {
|
|
211
|
+
_processStreamEvent(msg.event);
|
|
212
|
+
}
|
|
213
|
+
break;
|
|
214
|
+
|
|
215
|
+
case 'result':
|
|
216
|
+
if (msg.session_id) _sessionId = msg.session_id;
|
|
217
|
+
if (_onStreamingStatus) _onStreamingStatus(buildStreamingStatus(false));
|
|
218
|
+
break;
|
|
219
|
+
|
|
220
|
+
default:
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Filter interactive tool_use blocks from an array of content blocks.
|
|
227
|
+
*/
|
|
228
|
+
function _filterInteractiveContent(content) {
|
|
229
|
+
return Array.isArray(content)
|
|
230
|
+
? content.filter(b => b.type !== 'tool_use' || !INTERACTIVE_TOOLS.has(b.name))
|
|
231
|
+
: content;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Process a single streaming event.
|
|
236
|
+
* Accumulates content blocks and pushes throttled in-progress entries.
|
|
237
|
+
*/
|
|
238
|
+
function _processStreamEvent(event) {
|
|
239
|
+
if (!event) return;
|
|
240
|
+
const type = event.type;
|
|
241
|
+
|
|
242
|
+
if (type === 'message_start') {
|
|
243
|
+
_streamingContent = [];
|
|
244
|
+
_currentBlockData = null;
|
|
245
|
+
} else if (type === 'content_block_start') {
|
|
246
|
+
const block = event.content_block;
|
|
247
|
+
if (!block) return;
|
|
248
|
+
if (block.type === 'text') {
|
|
249
|
+
_currentBlockData = { type: 'text', text: block.text || '' };
|
|
250
|
+
} else if (block.type === 'thinking') {
|
|
251
|
+
_currentBlockData = { type: 'thinking', thinking: block.thinking || '' };
|
|
252
|
+
} else if (block.type === 'tool_use') {
|
|
253
|
+
if (INTERACTIVE_TOOLS.has(block.name)) {
|
|
254
|
+
_currentBlockData = null;
|
|
255
|
+
} else {
|
|
256
|
+
_currentBlockData = { type: 'tool_use', id: block.id, name: block.name, input: {} };
|
|
257
|
+
}
|
|
258
|
+
} else {
|
|
259
|
+
_currentBlockData = null;
|
|
260
|
+
}
|
|
261
|
+
} else if (type === 'content_block_delta') {
|
|
262
|
+
const delta = event.delta;
|
|
263
|
+
if (!delta || !_currentBlockData) return;
|
|
264
|
+
if (delta.type === 'text_delta' && _currentBlockData.type === 'text') {
|
|
265
|
+
_currentBlockData.text += delta.text || '';
|
|
266
|
+
_pushStreamingEntry();
|
|
267
|
+
} else if (delta.type === 'thinking_delta' && _currentBlockData.type === 'thinking') {
|
|
268
|
+
_currentBlockData.thinking += delta.thinking || '';
|
|
269
|
+
} else if (delta.type === 'input_json_delta' && _currentBlockData.type === 'tool_use') {
|
|
270
|
+
if (!_currentBlockData._rawInput) _currentBlockData._rawInput = '';
|
|
271
|
+
_currentBlockData._rawInput += delta.partial_json || '';
|
|
272
|
+
}
|
|
273
|
+
} else if (type === 'content_block_stop') {
|
|
274
|
+
if (_currentBlockData) {
|
|
275
|
+
if (_currentBlockData.type === 'tool_use' && _currentBlockData._rawInput) {
|
|
276
|
+
try { _currentBlockData.input = JSON.parse(_currentBlockData._rawInput); } catch {}
|
|
277
|
+
delete _currentBlockData._rawInput;
|
|
278
|
+
}
|
|
279
|
+
_streamingContent.push(_currentBlockData);
|
|
280
|
+
_currentBlockData = null;
|
|
281
|
+
_pushStreamingEntry();
|
|
282
|
+
}
|
|
283
|
+
} else if (type === 'message_stop') {
|
|
284
|
+
_resetStreamingState();
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Push a throttled in-progress entry with accumulated streaming content.
|
|
290
|
+
*/
|
|
291
|
+
function _pushStreamingEntry() {
|
|
292
|
+
if (_streamThrottleTimer) return;
|
|
293
|
+
_streamThrottleTimer = setTimeout(() => {
|
|
294
|
+
_streamThrottleTimer = null;
|
|
295
|
+
_flushStreamingEntry();
|
|
296
|
+
}, 100);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
function _flushStreamingEntry() {
|
|
300
|
+
if (!_onEntry) return;
|
|
301
|
+
const content = [..._streamingContent];
|
|
302
|
+
if (_currentBlockData) {
|
|
303
|
+
const clone = { ..._currentBlockData };
|
|
304
|
+
if (clone._rawInput) delete clone._rawInput;
|
|
305
|
+
content.push(clone);
|
|
306
|
+
}
|
|
307
|
+
if (content.length === 0) return;
|
|
308
|
+
|
|
309
|
+
const syntheticMsg = {
|
|
310
|
+
message: {
|
|
311
|
+
id: _streamingRequestId,
|
|
312
|
+
type: 'message',
|
|
313
|
+
role: 'assistant',
|
|
314
|
+
model: _model,
|
|
315
|
+
content,
|
|
316
|
+
stop_reason: null,
|
|
317
|
+
usage: { input_tokens: 0, output_tokens: 0 },
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
// Use the SAME stable turn timestamp so in-progress entries dedup with the final entry
|
|
321
|
+
const entry = sdkToJSONLEntry(syntheticMsg, [..._accumulatedMessages], _model, _projectName, {
|
|
322
|
+
inProgress: true,
|
|
323
|
+
tools: _sdkTools,
|
|
324
|
+
requestId: _streamingRequestId,
|
|
325
|
+
timestamp: _turnTimestamp,
|
|
326
|
+
});
|
|
327
|
+
_onEntry(entry);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
function _resetStreamingState() {
|
|
331
|
+
_streamingContent = [];
|
|
332
|
+
_currentBlockData = null;
|
|
333
|
+
if (_streamThrottleTimer) {
|
|
334
|
+
clearTimeout(_streamThrottleTimer);
|
|
335
|
+
_streamThrottleTimer = null;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* canUseTool callback — handles AskUserQuestion + permission approval.
|
|
341
|
+
*/
|
|
342
|
+
async function _handleCanUseTool(toolName, input, options) {
|
|
343
|
+
const id = options?.toolUseID || `sdk_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
|
|
344
|
+
|
|
345
|
+
if (toolName === 'ExitPlanMode') {
|
|
346
|
+
if (_broadcastWs) {
|
|
347
|
+
_broadcastWs({ type: 'sdk-plan-pending', id, input });
|
|
348
|
+
}
|
|
349
|
+
const result = await _waitForApproval(id, 5 * 60 * 1000);
|
|
350
|
+
if (result === null) {
|
|
351
|
+
return { behavior: 'deny', message: 'Timeout waiting for plan approval' };
|
|
352
|
+
}
|
|
353
|
+
if (typeof result === 'object' && result.approve === false) {
|
|
354
|
+
return { behavior: 'deny', message: result.feedback || 'User rejected the plan' };
|
|
355
|
+
}
|
|
356
|
+
return { behavior: 'allow', updatedInput: input };
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (toolName === 'AskUserQuestion') {
|
|
360
|
+
if (_broadcastWs) {
|
|
361
|
+
_broadcastWs({ type: 'sdk-ask-pending', id, questions: input.questions });
|
|
362
|
+
}
|
|
363
|
+
const answers = await _waitForApproval(id, 5 * 60 * 1000);
|
|
364
|
+
if (answers === null) {
|
|
365
|
+
return { behavior: 'deny', message: 'Timeout waiting for user answer' };
|
|
366
|
+
}
|
|
367
|
+
return { behavior: 'allow', updatedInput: { questions: input.questions, answers } };
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// Tools that need explicit user approval via Web UI (mutating or external access)
|
|
371
|
+
const APPROVAL_TOOLS = new Set(['Bash', 'Edit', 'Write', 'NotebookEdit', 'WebFetch', 'WebSearch']);
|
|
372
|
+
if (!APPROVAL_TOOLS.has(toolName)) {
|
|
373
|
+
return { behavior: 'allow', updatedInput: input };
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// Permission approval for mutating tools
|
|
377
|
+
const suggestions = options?.suggestions;
|
|
378
|
+
if (_broadcastWs) {
|
|
379
|
+
_broadcastWs({ type: 'perm-hook-pending', id, toolName, input });
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
const result = await _waitForApproval(id, 5 * 60 * 1000);
|
|
383
|
+
if (result === null) {
|
|
384
|
+
return { behavior: 'deny', message: 'Timeout waiting for user approval' };
|
|
385
|
+
}
|
|
386
|
+
const decision = typeof result === 'object' ? result.decision : result;
|
|
387
|
+
const allowSession = typeof result === 'object' && result.allowSession;
|
|
388
|
+
if (decision === 'deny') {
|
|
389
|
+
return { behavior: 'deny', message: 'User denied via cx-viewer' };
|
|
390
|
+
}
|
|
391
|
+
const response = { behavior: 'allow', updatedInput: input };
|
|
392
|
+
if (allowSession && Array.isArray(suggestions) && suggestions.length > 0) {
|
|
393
|
+
response.updatedPermissions = suggestions;
|
|
394
|
+
}
|
|
395
|
+
return response;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function _waitForApproval(id, timeoutMs) {
|
|
399
|
+
return new Promise((resolve) => {
|
|
400
|
+
const timer = setTimeout(() => {
|
|
401
|
+
_pendingApprovals.delete(id);
|
|
402
|
+
resolve(null);
|
|
403
|
+
}, timeoutMs);
|
|
404
|
+
_pendingApprovals.set(id, {
|
|
405
|
+
resolve: (value) => {
|
|
406
|
+
clearTimeout(timer);
|
|
407
|
+
_pendingApprovals.delete(id);
|
|
408
|
+
resolve(value);
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Resolve a pending canUseTool approval.
|
|
416
|
+
* Called by server.js when a WS message arrives.
|
|
417
|
+
*/
|
|
418
|
+
export function resolveApproval(id, value) {
|
|
419
|
+
const pending = _pendingApprovals.get(id);
|
|
420
|
+
if (pending) {
|
|
421
|
+
pending.resolve(value);
|
|
422
|
+
return true;
|
|
423
|
+
}
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Stop the active SDK session.
|
|
429
|
+
*/
|
|
430
|
+
export function stopSession() {
|
|
431
|
+
// Use close() instead of interrupt() — works in all modes
|
|
432
|
+
if (_activeQuery && typeof _activeQuery.close === 'function') {
|
|
433
|
+
_activeQuery.close();
|
|
434
|
+
}
|
|
435
|
+
_resetFullState();
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Reset all session state.
|
|
440
|
+
*/
|
|
441
|
+
function _resetFullState() {
|
|
442
|
+
_activeQuery = null;
|
|
443
|
+
_sessionId = null;
|
|
444
|
+
_model = null;
|
|
445
|
+
_sdkTools = null;
|
|
446
|
+
_queryBusy = false;
|
|
447
|
+
_accumulatedMessages = [];
|
|
448
|
+
_turnTimestamp = null;
|
|
449
|
+
_messageQueue = [];
|
|
450
|
+
_resetStreamingState();
|
|
451
|
+
_streamingRequestId = null;
|
|
452
|
+
// Reject all pending approvals
|
|
453
|
+
for (const [, pending] of _pendingApprovals) {
|
|
454
|
+
pending.resolve(null);
|
|
455
|
+
}
|
|
456
|
+
_pendingApprovals.clear();
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Get current session ID (for resume).
|
|
461
|
+
*/
|
|
462
|
+
export function getSessionId() {
|
|
463
|
+
return _sessionId;
|
|
464
|
+
}
|