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,198 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync, existsSync, statSync, readdirSync, unlinkSync, realpathSync, renameSync, appendFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { reconstructEntries } from './delta-reconstructor.js';
|
|
4
|
+
import { streamReconstructedEntries } from './log-stream.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Validate that a resolved file path is contained within logDir.
|
|
8
|
+
* Throws on invalid path (not found or path traversal).
|
|
9
|
+
* @param {string} logDir - base log directory
|
|
10
|
+
* @param {string} file - relative file path (e.g. "project/file.jsonl")
|
|
11
|
+
* @returns {string} the real (resolved) path
|
|
12
|
+
*/
|
|
13
|
+
export function validateLogPath(logDir, file) {
|
|
14
|
+
const filePath = join(logDir, file);
|
|
15
|
+
if (!existsSync(filePath)) {
|
|
16
|
+
const err = new Error('File not found');
|
|
17
|
+
err.code = 'NOT_FOUND';
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
const realPath = realpathSync(filePath);
|
|
21
|
+
const realLogDir = realpathSync(logDir);
|
|
22
|
+
if (!realPath.startsWith(realLogDir)) {
|
|
23
|
+
const err = new Error('Access denied');
|
|
24
|
+
err.code = 'ACCESS_DENIED';
|
|
25
|
+
throw err;
|
|
26
|
+
}
|
|
27
|
+
return realPath;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List local log files grouped by project.
|
|
32
|
+
* @param {string} logDir - base log directory
|
|
33
|
+
* @param {string} currentProjectName - current project name (may be empty)
|
|
34
|
+
* @returns {{ [project: string]: Array, _currentProject: string }}
|
|
35
|
+
*/
|
|
36
|
+
export function listLocalLogs(logDir, currentProjectName) {
|
|
37
|
+
const grouped = {};
|
|
38
|
+
if (existsSync(logDir)) {
|
|
39
|
+
const entries = readdirSync(logDir, { withFileTypes: true });
|
|
40
|
+
for (const entry of entries) {
|
|
41
|
+
if (!entry.isDirectory()) continue;
|
|
42
|
+
const project = entry.name;
|
|
43
|
+
const projectDir = join(logDir, project);
|
|
44
|
+
const files = readdirSync(projectDir)
|
|
45
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
46
|
+
.sort()
|
|
47
|
+
.reverse();
|
|
48
|
+
// 从项目统计缓存中读取 per-file 数据,避免逐文件扫描
|
|
49
|
+
let statsFiles = null;
|
|
50
|
+
try {
|
|
51
|
+
const statsFile = join(projectDir, `${project}.json`);
|
|
52
|
+
if (existsSync(statsFile)) {
|
|
53
|
+
statsFiles = JSON.parse(readFileSync(statsFile, 'utf-8')).files;
|
|
54
|
+
}
|
|
55
|
+
} catch { }
|
|
56
|
+
for (const f of files) {
|
|
57
|
+
const match = f.match(/^(.+?)_(\d{8}_\d{6})\.jsonl$/);
|
|
58
|
+
if (!match) continue;
|
|
59
|
+
const ts = match[2];
|
|
60
|
+
const filePath = join(projectDir, f);
|
|
61
|
+
const size = statSync(filePath).size;
|
|
62
|
+
if (size === 0) continue; // 跳过空文件
|
|
63
|
+
const turns = statsFiles?.[f]?.summary?.sessionCount || 0;
|
|
64
|
+
if (!grouped[project]) grouped[project] = [];
|
|
65
|
+
grouped[project].push({ file: `${project}/${f}`, timestamp: ts, size, turns, preview: statsFiles?.[f]?.preview || [] });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return { ...grouped, _currentProject: currentProjectName || '' };
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Read and parse a local log file.
|
|
74
|
+
* @param {string} logDir - base log directory
|
|
75
|
+
* @param {string} file - relative file path (e.g. "project/file.jsonl")
|
|
76
|
+
* @returns {Array<Object>} parsed entries
|
|
77
|
+
*/
|
|
78
|
+
export function readLocalLog(logDir, file) {
|
|
79
|
+
validateLogPath(logDir, file);
|
|
80
|
+
const filePath = join(logDir, file);
|
|
81
|
+
const content = readFileSync(filePath, 'utf-8');
|
|
82
|
+
const parsed = content.split('\n---\n').filter(line => line.trim()).map(entry => {
|
|
83
|
+
try { return JSON.parse(entry); } catch { return null; }
|
|
84
|
+
}).filter(Boolean);
|
|
85
|
+
// Delta storage: 先去重(timestamp|url),再重建 delta 条目
|
|
86
|
+
const map = new Map();
|
|
87
|
+
for (const entry of parsed) {
|
|
88
|
+
const key = `${entry.timestamp}|${entry.url}`;
|
|
89
|
+
map.set(key, entry);
|
|
90
|
+
}
|
|
91
|
+
return reconstructEntries(Array.from(map.values()));
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Delete log files. Returns per-file results.
|
|
96
|
+
* @param {string} logDir - base log directory
|
|
97
|
+
* @param {string[]} files - array of relative file paths
|
|
98
|
+
* @returns {Array<{ file: string, ok?: boolean, error?: string }>}
|
|
99
|
+
*/
|
|
100
|
+
export function deleteLogFiles(logDir, files) {
|
|
101
|
+
const results = [];
|
|
102
|
+
for (const file of files) {
|
|
103
|
+
if (!file || file.includes('..') || !file.endsWith('.jsonl')) {
|
|
104
|
+
results.push({ file, error: 'Invalid file name' });
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const filePath = join(logDir, file);
|
|
108
|
+
try {
|
|
109
|
+
if (!existsSync(filePath)) {
|
|
110
|
+
results.push({ file, error: 'Not found' });
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
const realPath = realpathSync(filePath);
|
|
114
|
+
const realLogDir = realpathSync(logDir);
|
|
115
|
+
if (!realPath.startsWith(realLogDir)) {
|
|
116
|
+
results.push({ file, error: 'Access denied' });
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
unlinkSync(realPath);
|
|
120
|
+
results.push({ file, ok: true });
|
|
121
|
+
} catch (err) {
|
|
122
|
+
results.push({ file, error: err.message });
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return results;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Merge multiple log files into the first one, deleting the rest.
|
|
130
|
+
* @param {string} logDir - base log directory
|
|
131
|
+
* @param {string[]} files - array of relative file paths (at least 2, same project, chronological order)
|
|
132
|
+
* @returns {string} the merged target file path (relative)
|
|
133
|
+
*/
|
|
134
|
+
export function mergeLogFiles(logDir, files) {
|
|
135
|
+
if (!Array.isArray(files) || files.length < 2) {
|
|
136
|
+
const err = new Error('At least 2 files required');
|
|
137
|
+
err.code = 'INVALID_INPUT';
|
|
138
|
+
throw err;
|
|
139
|
+
}
|
|
140
|
+
// 校验所有文件属于同一 project
|
|
141
|
+
const projects = new Set(files.map(f => f.split('/')[0]));
|
|
142
|
+
if (projects.size !== 1) {
|
|
143
|
+
const err = new Error('All files must belong to the same project');
|
|
144
|
+
err.code = 'INVALID_INPUT';
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
// 校验文件存在且无路径穿越
|
|
148
|
+
for (const f of files) {
|
|
149
|
+
if (f.includes('..')) {
|
|
150
|
+
const err = new Error('Invalid file path');
|
|
151
|
+
err.code = 'INVALID_INPUT';
|
|
152
|
+
throw err;
|
|
153
|
+
}
|
|
154
|
+
if (!existsSync(join(logDir, f))) {
|
|
155
|
+
const err = new Error(`File not found: ${f}`);
|
|
156
|
+
err.code = 'NOT_FOUND';
|
|
157
|
+
throw err;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
// 校验合并后总大小不超过 300MB
|
|
161
|
+
const MAX_MERGE_SIZE = 300 * 1024 * 1024;
|
|
162
|
+
let totalSize = 0;
|
|
163
|
+
for (const f of files) {
|
|
164
|
+
totalSize += statSync(join(logDir, f)).size;
|
|
165
|
+
}
|
|
166
|
+
if (totalSize > MAX_MERGE_SIZE) {
|
|
167
|
+
const err = new Error(`Merged size (${(totalSize / 1024 / 1024).toFixed(1)}MB) exceeds 300MB limit`);
|
|
168
|
+
err.code = 'INVALID_INPUT';
|
|
169
|
+
throw err;
|
|
170
|
+
}
|
|
171
|
+
// Delta storage: 流式合并 — 逐文件分段重建并直接写入目标文件,避免全量加载 OOM
|
|
172
|
+
const targetFile = files[0];
|
|
173
|
+
const targetPath = join(logDir, targetFile);
|
|
174
|
+
// 先写到临时文件,成功后再覆盖目标
|
|
175
|
+
const tmpPath = targetPath + '.merge-tmp';
|
|
176
|
+
writeFileSync(tmpPath, ''); // 创建空临时文件
|
|
177
|
+
for (const f of files) {
|
|
178
|
+
const filePath = join(logDir, f);
|
|
179
|
+
streamReconstructedEntries(filePath, (segment) => {
|
|
180
|
+
let chunk = '';
|
|
181
|
+
for (const entry of segment) {
|
|
182
|
+
delete entry._deltaFormat;
|
|
183
|
+
delete entry._totalMessageCount;
|
|
184
|
+
delete entry._conversationId;
|
|
185
|
+
delete entry._isCheckpoint;
|
|
186
|
+
chunk += JSON.stringify(entry) + '\n---\n';
|
|
187
|
+
}
|
|
188
|
+
appendFileSync(tmpPath, chunk);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
// 临时文件写入成功后原子覆盖目标(POSIX renameSync 自动替换)
|
|
192
|
+
renameSync(tmpPath, targetPath);
|
|
193
|
+
// 删除其余文件
|
|
194
|
+
for (let i = 1; i < files.length; i++) {
|
|
195
|
+
unlinkSync(join(logDir, files[i]));
|
|
196
|
+
}
|
|
197
|
+
return targetFile;
|
|
198
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log Stream — 流式分段读取模块
|
|
3
|
+
*
|
|
4
|
+
* 关键设计:server 不做 delta 重建,只做去重和流式发送。
|
|
5
|
+
* 重建交给客户端(浏览器内存更充裕)。
|
|
6
|
+
*
|
|
7
|
+
* 内存控制:
|
|
8
|
+
* - 文件读取:openSync + readSync 1MB 分块,generator 逐条 yield
|
|
9
|
+
* - 去重:用 regex 提取 key,不做 JSON.parse(存原始字符串)
|
|
10
|
+
* - 异步发送:逐条 write + 定期 setImmediate yield(GC + buffer drain)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { existsSync, statSync, openSync, readSync, closeSync } from 'node:fs';
|
|
14
|
+
import { isCheckpointEntry, isDeltaEntry, reconstructSegment } from './delta-reconstructor.js';
|
|
15
|
+
|
|
16
|
+
const READ_CHUNK_SIZE = 1024 * 1024; // 1MB
|
|
17
|
+
const SEPARATOR = '\n---\n';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Generator:分块读取 JSONL 文件,逐条 yield 原始 JSON 字符串。
|
|
21
|
+
* 内存 = 1MB buffer + pending。
|
|
22
|
+
*/
|
|
23
|
+
function* iterateRawEntries(filePath) {
|
|
24
|
+
const fileSize = statSync(filePath).size;
|
|
25
|
+
if (fileSize === 0) return;
|
|
26
|
+
|
|
27
|
+
const fd = openSync(filePath, 'r');
|
|
28
|
+
const buf = Buffer.alloc(Math.min(READ_CHUNK_SIZE, fileSize));
|
|
29
|
+
let offset = 0;
|
|
30
|
+
let pending = '';
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
while (offset < fileSize) {
|
|
34
|
+
const toRead = Math.min(buf.length, fileSize - offset);
|
|
35
|
+
const bytesRead = readSync(fd, buf, 0, toRead, offset);
|
|
36
|
+
if (bytesRead === 0) break;
|
|
37
|
+
offset += bytesRead;
|
|
38
|
+
|
|
39
|
+
const raw = pending + buf.toString('utf-8', 0, bytesRead);
|
|
40
|
+
const parts = raw.split(SEPARATOR);
|
|
41
|
+
pending = parts.pop() || '';
|
|
42
|
+
|
|
43
|
+
for (const part of parts) {
|
|
44
|
+
const trimmed = part.trim();
|
|
45
|
+
if (trimmed) yield trimmed;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (pending.trim()) {
|
|
50
|
+
yield pending.trim();
|
|
51
|
+
}
|
|
52
|
+
} finally {
|
|
53
|
+
closeSync(fd);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 轻量预扫描:统计条目总数(原始条目数,不去重)。
|
|
59
|
+
* 用于 SSE load_start 的 total 字段(进度显示)。
|
|
60
|
+
*/
|
|
61
|
+
export function countLogEntries(filePath) {
|
|
62
|
+
if (!existsSync(filePath)) return 0;
|
|
63
|
+
let count = 0;
|
|
64
|
+
for (const _ of iterateRawEntries(filePath)) { count++; }
|
|
65
|
+
return count;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** 用 regex 从原始 JSON 字符串中提取 timestamp(不做 JSON.parse) */
|
|
69
|
+
function extractTimestamp(raw) {
|
|
70
|
+
const m = raw.match(/"timestamp"\s*:\s*"([^"]+)"/);
|
|
71
|
+
return m ? m[1] : null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** 用 regex 从原始 JSON 字符串中提取 timestamp|url 去重 key(不做 JSON.parse) */
|
|
75
|
+
function extractDedupKey(raw) {
|
|
76
|
+
const ts = extractTimestamp(raw);
|
|
77
|
+
const urlMatch = raw.match(/"url"\s*:\s*"([^"]+)"/);
|
|
78
|
+
if (ts && urlMatch) return `${ts}|${urlMatch[1]}`;
|
|
79
|
+
// fallback: 无法提取 key 则用内容哈希
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 对原始 JSON 字符串用 regex 检测是否为 checkpoint(不做 JSON.parse)。
|
|
85
|
+
* - 匹配 `"_isCheckpoint":true` → 显式 checkpoint
|
|
86
|
+
* - 或不包含 `"_deltaFormat"` → 旧格式全量条目,天然 checkpoint
|
|
87
|
+
*/
|
|
88
|
+
function isCheckpointRaw(raw) {
|
|
89
|
+
if (/"_isCheckpoint"\s*:\s*true/.test(raw)) return true;
|
|
90
|
+
if (!raw.includes('"_deltaFormat"')) return true;
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function isSegmentBoundary(entry) {
|
|
95
|
+
if (!entry.mainAgent) return false;
|
|
96
|
+
if (!entry._deltaFormat) return true;
|
|
97
|
+
return isCheckpointEntry(entry);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// 同步 API — 用于 mergeLogFiles(合并需要重建为全量格式写入磁盘)
|
|
102
|
+
// ============================================================================
|
|
103
|
+
|
|
104
|
+
export function streamReconstructedEntries(filePath, onSegment, opts = {}) {
|
|
105
|
+
if (!existsSync(filePath)) return 0;
|
|
106
|
+
const stat = statSync(filePath);
|
|
107
|
+
if (stat.size === 0) return 0;
|
|
108
|
+
|
|
109
|
+
const sinceMs = opts.since ? new Date(opts.since).getTime() : 0;
|
|
110
|
+
let currentSegment = [];
|
|
111
|
+
let dedup = new Map();
|
|
112
|
+
let sentCount = 0;
|
|
113
|
+
|
|
114
|
+
function flushSegment(nextCp) {
|
|
115
|
+
if (currentSegment.length === 0) return;
|
|
116
|
+
const dedupedSegment = Array.from(dedup.values());
|
|
117
|
+
reconstructSegment(dedupedSegment, nextCp);
|
|
118
|
+
|
|
119
|
+
let toSend = dedupedSegment;
|
|
120
|
+
if (sinceMs) {
|
|
121
|
+
toSend = dedupedSegment.filter(e => {
|
|
122
|
+
const ts = e.timestamp ? new Date(e.timestamp).getTime() : 0;
|
|
123
|
+
return ts > sinceMs;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (toSend.length > 0) {
|
|
127
|
+
onSegment(toSend);
|
|
128
|
+
sentCount += toSend.length;
|
|
129
|
+
}
|
|
130
|
+
currentSegment = [];
|
|
131
|
+
dedup = new Map();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
for (const rawEntry of iterateRawEntries(filePath)) {
|
|
135
|
+
let entry;
|
|
136
|
+
try { entry = JSON.parse(rawEntry); } catch { continue; }
|
|
137
|
+
|
|
138
|
+
if (isSegmentBoundary(entry) && currentSegment.length > 0) {
|
|
139
|
+
const key = `${entry.timestamp}|${entry.url}`;
|
|
140
|
+
const last = currentSegment[currentSegment.length - 1];
|
|
141
|
+
const lastKey = `${last.timestamp}|${last.url}`;
|
|
142
|
+
if (key !== lastKey) {
|
|
143
|
+
flushSegment(entry);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const key = `${entry.timestamp}|${entry.url}`;
|
|
148
|
+
dedup.set(key, entry);
|
|
149
|
+
currentSegment.push(entry);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
flushSegment(null);
|
|
153
|
+
return sentCount;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// 异步 API — 用于 SSE/HTTP:不做重建,直接发原始 JSON 字符串
|
|
158
|
+
// ============================================================================
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* 异步流式发送原始条目(不重建 delta)。
|
|
162
|
+
*
|
|
163
|
+
* - 用 generator 逐条读取原始 JSON 字符串
|
|
164
|
+
* - regex 提取 key 去重(后出现的覆盖先出现的)
|
|
165
|
+
* - 逐条调用 onRawEntry(rawJsonString)
|
|
166
|
+
* - 每 N 条 setImmediate yield 让 GC + write buffer drain
|
|
167
|
+
*
|
|
168
|
+
* server 不做 JSON.parse / JSON.stringify / reconstruct = 内存峰值极低。
|
|
169
|
+
* 客户端收到后自行 reconstructEntries()。
|
|
170
|
+
*
|
|
171
|
+
* @param {string} filePath
|
|
172
|
+
* @param {(rawJson: string) => void} onRawEntry - 原始 JSON 字符串回调
|
|
173
|
+
* @param {object} [opts]
|
|
174
|
+
* @param {string} [opts.since] - ISO 时间戳,只发送 timestamp >= since 的条目
|
|
175
|
+
* @param {number} [opts.limit] - 只发送最新 N 条(去重后),向前扩展到 checkpoint 边界
|
|
176
|
+
* @param {(raw: string) => void} [opts.onScan] - Pass 1 中对每条原始条目调用(不受 since 影响)
|
|
177
|
+
* @param {(info: {totalCount: number, hasMore?: boolean, oldestTs?: string}) => void} [opts.onReady] - Pass 1 完成、Pass 2 开始前调用
|
|
178
|
+
* @returns {Promise<{sentCount: number, totalCount: number}>}
|
|
179
|
+
*/
|
|
180
|
+
export async function streamRawEntriesAsync(filePath, onRawEntry, opts = {}) {
|
|
181
|
+
const empty = { sentCount: 0, totalCount: 0 };
|
|
182
|
+
if (!existsSync(filePath)) { if (opts.onReady) opts.onReady({ totalCount: 0 }); return empty; }
|
|
183
|
+
const stat = statSync(filePath);
|
|
184
|
+
if (stat.size === 0) { if (opts.onReady) opts.onReady({ totalCount: 0 }); return empty; }
|
|
185
|
+
|
|
186
|
+
const sinceFilter = opts.since || null;
|
|
187
|
+
const onScan = opts.onScan || null;
|
|
188
|
+
const onReady = opts.onReady || null;
|
|
189
|
+
|
|
190
|
+
// 第一遍:generator 逐条读取 → dedup Map 存原始字符串(不 parse)
|
|
191
|
+
// 内存 = 去重后的原始字符串总量 ≈ 文件大小的一半(inProgress 被 completed 覆盖)
|
|
192
|
+
const dedup = new Map();
|
|
193
|
+
for (const raw of iterateRawEntries(filePath)) {
|
|
194
|
+
if (onScan) onScan(raw);
|
|
195
|
+
const key = extractDedupKey(raw);
|
|
196
|
+
if (key) {
|
|
197
|
+
dedup.set(key, raw);
|
|
198
|
+
} else {
|
|
199
|
+
// 无法提取 key 的条目直接保留(用自增 id 避免被覆盖)
|
|
200
|
+
dedup.set(`__nokey_${dedup.size}`, raw);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const totalCount = dedup.size;
|
|
205
|
+
|
|
206
|
+
// limit 裁剪:只保留最新 N 条,向前扩展到 checkpoint 边界
|
|
207
|
+
let sendMap = dedup;
|
|
208
|
+
let hasMore = false;
|
|
209
|
+
let oldestTs = null;
|
|
210
|
+
const limitVal = opts.limit;
|
|
211
|
+
|
|
212
|
+
if (limitVal && limitVal > 0 && totalCount > limitVal) {
|
|
213
|
+
const allEntries = Array.from(dedup.entries());
|
|
214
|
+
let startIdx = Math.max(0, allEntries.length - limitVal);
|
|
215
|
+
// 向前扩展到最近的 checkpoint 边界
|
|
216
|
+
while (startIdx > 0 && !isCheckpointRaw(allEntries[startIdx][1])) {
|
|
217
|
+
startIdx--;
|
|
218
|
+
}
|
|
219
|
+
hasMore = startIdx > 0;
|
|
220
|
+
const sliced = allEntries.slice(startIdx);
|
|
221
|
+
sendMap = new Map(sliced);
|
|
222
|
+
// 提取最早条目的 timestamp
|
|
223
|
+
if (sliced.length > 0) {
|
|
224
|
+
oldestTs = extractTimestamp(sliced[0][1]);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Pass 1 完成,通知调用方(server 可在此时发送 load_start)
|
|
229
|
+
if (onReady) onReady({ totalCount, hasMore, oldestTs });
|
|
230
|
+
|
|
231
|
+
// 第二遍:逐条发送 + 定期 yield + since 过滤
|
|
232
|
+
let sentCount = 0;
|
|
233
|
+
const YIELD_INTERVAL = 20; // 每 20 条 yield 一次
|
|
234
|
+
|
|
235
|
+
for (const [key, raw] of sendMap) {
|
|
236
|
+
// since 过滤:只发送 timestamp >= since 的条目
|
|
237
|
+
// 注:字符串比较对 ISO 8601 等长格式(YYYY-MM-DDTHH:mm:ss.SSSZ)天然正确,
|
|
238
|
+
// 此处 since 和 ts 均来自同一 interceptor 的 new Date().toISOString(),格式一致。
|
|
239
|
+
if (sinceFilter && !key.startsWith('__nokey_')) {
|
|
240
|
+
const ts = extractTimestamp(raw);
|
|
241
|
+
if (ts && ts < sinceFilter) continue;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
onRawEntry(raw);
|
|
245
|
+
sentCount++;
|
|
246
|
+
if (sentCount % YIELD_INTERVAL === 0) {
|
|
247
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// 最终 yield 确保最后一批 buffer drain
|
|
252
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
253
|
+
|
|
254
|
+
return { sentCount, totalCount };
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* 读取分页历史条目(用于 /api/entries/page REST 端点)。
|
|
259
|
+
*
|
|
260
|
+
* 复用 iterateRawEntries + extractDedupKey 去重,
|
|
261
|
+
* 过滤 timestamp < before 的条目,从末尾取最后 limit 条,
|
|
262
|
+
* 向前扩展到 checkpoint 边界。
|
|
263
|
+
*
|
|
264
|
+
* @param {string} filePath
|
|
265
|
+
* @param {{ before: string, limit: number }} opts
|
|
266
|
+
* @returns {{ entries: string[], hasMore: boolean, oldestTimestamp: string, count: number }}
|
|
267
|
+
*/
|
|
268
|
+
export function readPagedEntries(filePath, { before, limit }) {
|
|
269
|
+
if (!existsSync(filePath)) return { entries: [], hasMore: false, oldestTimestamp: '', count: 0 };
|
|
270
|
+
const stat = statSync(filePath);
|
|
271
|
+
if (stat.size === 0) return { entries: [], hasMore: false, oldestTimestamp: '', count: 0 };
|
|
272
|
+
|
|
273
|
+
// 去重
|
|
274
|
+
const dedup = new Map();
|
|
275
|
+
for (const raw of iterateRawEntries(filePath)) {
|
|
276
|
+
const key = extractDedupKey(raw);
|
|
277
|
+
if (key) {
|
|
278
|
+
dedup.set(key, raw);
|
|
279
|
+
} else {
|
|
280
|
+
dedup.set(`__nokey_${dedup.size}`, raw);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// 过滤 timestamp < before
|
|
285
|
+
const filtered = [];
|
|
286
|
+
for (const [key, raw] of dedup) {
|
|
287
|
+
if (key.startsWith('__nokey_')) continue; // 无 key 条目跳过(无法确定 timestamp)
|
|
288
|
+
const ts = extractTimestamp(raw);
|
|
289
|
+
if (ts && ts < before) {
|
|
290
|
+
filtered.push(raw);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if (filtered.length === 0) {
|
|
295
|
+
return { entries: [], hasMore: false, oldestTimestamp: '', count: 0 };
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// 从末尾取最后 limit 条
|
|
299
|
+
let startIdx = Math.max(0, filtered.length - limit);
|
|
300
|
+
// 向前扩展到 checkpoint 边界
|
|
301
|
+
while (startIdx > 0 && !isCheckpointRaw(filtered[startIdx])) {
|
|
302
|
+
startIdx--;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const hasMore = startIdx > 0;
|
|
306
|
+
const sliced = filtered.slice(startIdx);
|
|
307
|
+
const oldestTimestamp = extractTimestamp(sliced[0]) || '';
|
|
308
|
+
|
|
309
|
+
return { entries: sliced, hasMore, oldestTimestamp, count: sliced.length };
|
|
310
|
+
}
|