cx-viewer 1.0.3 → 1.0.4
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/README.md +49 -20
- package/build.js +15 -0
- package/cli.js +102 -18
- package/concepts/ar/BodyDiffJSON.md +1 -1
- package/concepts/ar/BodyFields.md +30 -33
- package/concepts/ar/GlobalSettings.md +165 -167
- package/concepts/ar/MainAgent.md +3 -4
- package/concepts/ar/ProxySwitch.md +3 -3
- package/concepts/ar/QRCode.md +1 -1
- package/concepts/ar/ResponseFields.md +29 -41
- package/concepts/ar/SubAgent-Search.md +12 -12
- package/concepts/ar/Teammate.md +16 -16
- package/concepts/ar/ToolsFirst.md +42 -48
- package/concepts/ar/TranslateContextPollution.md +9 -9
- package/concepts/ar/UltraPlan.md +38 -38
- package/concepts/da/BodyDiffJSON.md +2 -2
- package/concepts/da/BodyFields.md +30 -33
- package/concepts/da/GlobalSettings.md +165 -167
- package/concepts/da/MainAgent.md +3 -4
- package/concepts/da/ProxySwitch.md +3 -3
- package/concepts/da/QRCode.md +1 -1
- package/concepts/da/ResponseFields.md +29 -41
- package/concepts/da/SubAgent-Search.md +11 -11
- package/concepts/da/Teammate.md +16 -16
- package/concepts/da/ToolsFirst.md +42 -48
- package/concepts/da/TranslateContextPollution.md +9 -9
- package/concepts/da/UltraPlan.md +38 -38
- package/concepts/de/BodyDiffJSON.md +2 -2
- package/concepts/de/BodyFields.md +30 -33
- package/concepts/de/GlobalSettings.md +165 -167
- package/concepts/de/MainAgent.md +3 -4
- package/concepts/de/ProxySwitch.md +3 -3
- package/concepts/de/QRCode.md +1 -1
- package/concepts/de/ResponseFields.md +29 -41
- package/concepts/de/SubAgent-Search.md +11 -11
- package/concepts/de/Teammate.md +15 -15
- package/concepts/de/ToolsFirst.md +41 -47
- package/concepts/de/TranslateContextPollution.md +9 -9
- package/concepts/de/UltraPlan.md +38 -38
- package/concepts/en/BodyDiffJSON.md +5 -5
- package/concepts/en/BodyFields.md +17 -20
- package/concepts/en/GlobalSettings.md +49 -51
- package/concepts/en/MainAgent.md +8 -8
- package/concepts/en/ProxySwitch.md +3 -3
- package/concepts/en/QRCode.md +6 -6
- package/concepts/en/ResponseFields.md +7 -19
- package/concepts/en/SubAgent-Search.md +2 -2
- package/concepts/en/Teammate.md +4 -4
- package/concepts/en/Tool-apply_patch.md +11 -0
- package/concepts/en/Tool-create_goal.md +8 -0
- package/concepts/en/Tool-exec.md +88 -0
- package/concepts/en/Tool-followup_task.md +10 -0
- package/concepts/en/Tool-get_goal.md +5 -0
- package/concepts/en/Tool-image_generation.md +5 -0
- package/concepts/en/Tool-interrupt_agent.md +9 -0
- package/concepts/en/Tool-list_agents.md +9 -0
- package/concepts/en/Tool-list_mcp_resource_templates.md +8 -0
- package/concepts/en/Tool-list_mcp_resources.md +8 -0
- package/concepts/en/Tool-read_mcp_resource.md +10 -0
- package/concepts/en/Tool-request_user_input.md +9 -0
- package/concepts/en/Tool-send_message.md +10 -0
- package/concepts/en/Tool-shell_command.md +12 -0
- package/concepts/en/Tool-spawn_agent.md +11 -0
- package/concepts/en/Tool-tool_search.md +12 -0
- package/concepts/en/Tool-update_goal.md +9 -0
- package/concepts/en/Tool-update_plan.md +9 -0
- package/concepts/en/Tool-view_image.md +10 -0
- package/concepts/en/Tool-wait.md +12 -0
- package/concepts/en/Tool-wait_agent.md +9 -0
- package/concepts/en/Tool-web_search.md +11 -0
- package/concepts/en/Tools.md +29 -58
- package/concepts/en/ToolsFirst.md +24 -30
- package/concepts/en/TranslateContextPollution.md +10 -38
- package/concepts/en/UltraPlan.md +7 -7
- package/concepts/es/BodyDiffJSON.md +1 -1
- package/concepts/es/BodyFields.md +35 -38
- package/concepts/es/GlobalSettings.md +165 -167
- package/concepts/es/MainAgent.md +3 -4
- package/concepts/es/ProxySwitch.md +3 -3
- package/concepts/es/QRCode.md +1 -1
- package/concepts/es/ResponseFields.md +28 -40
- package/concepts/es/SubAgent-Search.md +12 -12
- package/concepts/es/Teammate.md +17 -17
- package/concepts/es/ToolsFirst.md +41 -47
- package/concepts/es/TranslateContextPollution.md +9 -9
- package/concepts/es/UltraPlan.md +38 -38
- package/concepts/fr/BodyDiffJSON.md +2 -2
- package/concepts/fr/BodyFields.md +35 -38
- package/concepts/fr/GlobalSettings.md +165 -167
- package/concepts/fr/MainAgent.md +3 -4
- package/concepts/fr/ProxySwitch.md +3 -3
- package/concepts/fr/QRCode.md +1 -1
- package/concepts/fr/ResponseFields.md +25 -37
- package/concepts/fr/SubAgent-Search.md +12 -12
- package/concepts/fr/Teammate.md +16 -16
- package/concepts/fr/ToolsFirst.md +40 -46
- package/concepts/fr/TranslateContextPollution.md +9 -9
- package/concepts/fr/UltraPlan.md +38 -38
- package/concepts/it/BodyDiffJSON.md +2 -2
- package/concepts/it/BodyFields.md +35 -38
- package/concepts/it/GlobalSettings.md +165 -167
- package/concepts/it/MainAgent.md +3 -4
- package/concepts/it/ProxySwitch.md +3 -3
- package/concepts/it/QRCode.md +1 -1
- package/concepts/it/ResponseFields.md +28 -40
- package/concepts/it/SubAgent-Search.md +12 -12
- package/concepts/it/Teammate.md +17 -17
- package/concepts/it/ToolsFirst.md +41 -47
- package/concepts/it/TranslateContextPollution.md +9 -9
- package/concepts/it/UltraPlan.md +38 -38
- package/concepts/ja/BodyDiffJSON.md +1 -1
- package/concepts/ja/BodyFields.md +30 -33
- package/concepts/ja/GlobalSettings.md +165 -167
- package/concepts/ja/MainAgent.md +3 -4
- package/concepts/ja/ProxySwitch.md +3 -3
- package/concepts/ja/QRCode.md +1 -1
- package/concepts/ja/ResponseFields.md +29 -41
- package/concepts/ja/SubAgent-Search.md +12 -12
- package/concepts/ja/Teammate.md +17 -17
- package/concepts/ja/ToolsFirst.md +41 -47
- package/concepts/ja/TranslateContextPollution.md +9 -9
- package/concepts/ja/UltraPlan.md +38 -38
- package/concepts/ko/BodyDiffJSON.md +1 -1
- package/concepts/ko/BodyFields.md +30 -33
- package/concepts/ko/GlobalSettings.md +165 -167
- package/concepts/ko/MainAgent.md +3 -4
- package/concepts/ko/ProxySwitch.md +3 -3
- package/concepts/ko/QRCode.md +1 -1
- package/concepts/ko/ResponseFields.md +29 -41
- package/concepts/ko/SubAgent-Search.md +12 -12
- package/concepts/ko/Teammate.md +17 -17
- package/concepts/ko/ToolsFirst.md +41 -47
- package/concepts/ko/TranslateContextPollution.md +9 -9
- package/concepts/ko/UltraPlan.md +38 -38
- package/concepts/no/BodyDiffJSON.md +2 -2
- package/concepts/no/BodyFields.md +30 -33
- package/concepts/no/GlobalSettings.md +165 -167
- package/concepts/no/MainAgent.md +3 -4
- package/concepts/no/ProxySwitch.md +3 -3
- package/concepts/no/QRCode.md +1 -1
- package/concepts/no/ResponseFields.md +29 -41
- package/concepts/no/SubAgent-Search.md +12 -12
- package/concepts/no/Teammate.md +17 -17
- package/concepts/no/ToolsFirst.md +42 -48
- package/concepts/no/TranslateContextPollution.md +9 -9
- package/concepts/no/UltraPlan.md +38 -38
- package/concepts/pl/BodyDiffJSON.md +2 -2
- package/concepts/pl/BodyFields.md +30 -33
- package/concepts/pl/GlobalSettings.md +165 -167
- package/concepts/pl/MainAgent.md +3 -4
- package/concepts/pl/ProxySwitch.md +3 -3
- package/concepts/pl/QRCode.md +1 -1
- package/concepts/pl/ResponseFields.md +29 -41
- package/concepts/pl/SubAgent-Search.md +12 -12
- package/concepts/pl/Teammate.md +17 -17
- package/concepts/pl/ToolsFirst.md +42 -48
- package/concepts/pl/TranslateContextPollution.md +9 -9
- package/concepts/pl/UltraPlan.md +38 -38
- package/concepts/pt-BR/BodyDiffJSON.md +2 -2
- package/concepts/pt-BR/BodyFields.md +30 -33
- package/concepts/pt-BR/GlobalSettings.md +165 -167
- package/concepts/pt-BR/MainAgent.md +3 -4
- package/concepts/pt-BR/ProxySwitch.md +3 -3
- package/concepts/pt-BR/QRCode.md +1 -1
- package/concepts/pt-BR/ResponseFields.md +29 -41
- package/concepts/pt-BR/SubAgent-Search.md +12 -12
- package/concepts/pt-BR/Teammate.md +17 -17
- package/concepts/pt-BR/ToolsFirst.md +41 -47
- package/concepts/pt-BR/TranslateContextPollution.md +9 -9
- package/concepts/pt-BR/UltraPlan.md +38 -38
- package/concepts/ru/BodyDiffJSON.md +1 -1
- package/concepts/ru/BodyFields.md +30 -33
- package/concepts/ru/GlobalSettings.md +165 -167
- package/concepts/ru/MainAgent.md +3 -4
- package/concepts/ru/ProxySwitch.md +3 -3
- package/concepts/ru/QRCode.md +1 -1
- package/concepts/ru/ResponseFields.md +29 -41
- package/concepts/ru/SubAgent-Search.md +12 -12
- package/concepts/ru/Teammate.md +17 -17
- package/concepts/ru/ToolsFirst.md +41 -47
- package/concepts/ru/TranslateContextPollution.md +9 -9
- package/concepts/ru/UltraPlan.md +38 -38
- package/concepts/th/BodyDiffJSON.md +1 -1
- package/concepts/th/BodyFields.md +30 -33
- package/concepts/th/GlobalSettings.md +165 -167
- package/concepts/th/MainAgent.md +3 -4
- package/concepts/th/ProxySwitch.md +3 -3
- package/concepts/th/QRCode.md +1 -1
- package/concepts/th/ResponseFields.md +29 -41
- package/concepts/th/SubAgent-Search.md +12 -12
- package/concepts/th/Teammate.md +17 -17
- package/concepts/th/ToolsFirst.md +42 -48
- package/concepts/th/TranslateContextPollution.md +9 -9
- package/concepts/th/UltraPlan.md +38 -38
- package/concepts/tr/BodyDiffJSON.md +1 -1
- package/concepts/tr/BodyFields.md +30 -33
- package/concepts/tr/GlobalSettings.md +165 -167
- package/concepts/tr/MainAgent.md +3 -4
- package/concepts/tr/ProxySwitch.md +3 -3
- package/concepts/tr/QRCode.md +1 -1
- package/concepts/tr/ResponseFields.md +29 -41
- package/concepts/tr/SubAgent-Search.md +12 -12
- package/concepts/tr/Teammate.md +16 -16
- package/concepts/tr/ToolsFirst.md +42 -48
- package/concepts/tr/TranslateContextPollution.md +9 -9
- package/concepts/tr/UltraPlan.md +38 -38
- package/concepts/uk/BodyDiffJSON.md +1 -1
- package/concepts/uk/BodyFields.md +30 -33
- package/concepts/uk/GlobalSettings.md +165 -167
- package/concepts/uk/MainAgent.md +3 -4
- package/concepts/uk/ProxySwitch.md +3 -3
- package/concepts/uk/QRCode.md +1 -1
- package/concepts/uk/ResponseFields.md +29 -41
- package/concepts/uk/SubAgent-Search.md +12 -12
- package/concepts/uk/Teammate.md +17 -17
- package/concepts/uk/ToolsFirst.md +42 -48
- package/concepts/uk/TranslateContextPollution.md +9 -9
- package/concepts/uk/UltraPlan.md +38 -38
- package/concepts/zh/BodyDiffJSON.md +4 -4
- package/concepts/zh/BodyFields.md +17 -20
- package/concepts/zh/GlobalSettings.md +26 -28
- package/concepts/zh/MainAgent.md +6 -6
- package/concepts/zh/ProxySwitch.md +1 -1
- package/concepts/zh/ResponseFields.md +7 -18
- package/concepts/zh/SubAgent-Search.md +2 -2
- package/concepts/zh/Teammate.md +4 -4
- package/concepts/zh/Tool-apply_patch.md +11 -0
- package/concepts/zh/Tool-create_goal.md +8 -0
- package/concepts/zh/Tool-exec.md +88 -0
- package/concepts/zh/Tool-followup_task.md +10 -0
- package/concepts/zh/Tool-get_goal.md +5 -0
- package/concepts/zh/Tool-image_generation.md +5 -0
- package/concepts/zh/Tool-interrupt_agent.md +9 -0
- package/concepts/zh/Tool-list_agents.md +9 -0
- package/concepts/zh/Tool-list_mcp_resource_templates.md +8 -0
- package/concepts/zh/Tool-list_mcp_resources.md +8 -0
- package/concepts/zh/Tool-read_mcp_resource.md +10 -0
- package/concepts/zh/Tool-request_user_input.md +9 -0
- package/concepts/zh/Tool-send_message.md +10 -0
- package/concepts/zh/Tool-shell_command.md +12 -0
- package/concepts/zh/Tool-spawn_agent.md +11 -0
- package/concepts/zh/Tool-tool_search.md +12 -0
- package/concepts/zh/Tool-update_goal.md +9 -0
- package/concepts/zh/Tool-update_plan.md +9 -0
- package/concepts/zh/Tool-view_image.md +10 -0
- package/concepts/zh/Tool-wait.md +12 -0
- package/concepts/zh/Tool-wait_agent.md +9 -0
- package/concepts/zh/Tool-web_search.md +11 -0
- package/concepts/zh/Tools.md +29 -58
- package/concepts/zh/ToolsFirst.md +21 -27
- package/concepts/zh/TranslateContextPollution.md +10 -38
- package/concepts/zh/UltraPlan.md +7 -7
- package/concepts/zh-TW/BodyFields.md +27 -30
- package/concepts/zh-TW/GlobalSettings.md +26 -28
- package/concepts/zh-TW/MainAgent.md +0 -1
- package/concepts/zh-TW/ProxySwitch.md +22 -22
- package/concepts/zh-TW/ResponseFields.md +29 -40
- package/concepts/zh-TW/SubAgent-Search.md +12 -12
- package/concepts/zh-TW/Teammate.md +16 -16
- package/concepts/zh-TW/ToolsFirst.md +41 -47
- package/concepts/zh-TW/UltraPlan.md +38 -38
- package/dist/assets/App-BZ9oclBj.js +2 -0
- package/dist/assets/App-rWON7PuS.css +1 -0
- package/dist/assets/MdxEditorPanel-B4lZ7Z_A.js +1 -0
- package/dist/assets/MdxEditorPanel-Da_ceLFo.css +1 -0
- package/dist/assets/Mobile-B5V_-6Hc.css +1 -0
- package/dist/assets/Mobile-C7Hy-TIM.js +1 -0
- package/dist/assets/abnfDiagram-VRR7QNED-DYYppIQV.js +1 -0
- package/dist/assets/apl-B8ZmNFqK.js +1 -0
- package/dist/assets/arc-BT3um7r4.js +1 -0
- package/dist/assets/architectureDiagram-ZJ3FMSHR-uweBqnh-.js +1 -0
- package/dist/assets/asciiarmor-CIte6N-S.js +1 -0
- package/dist/assets/asn1-Ax1-z1nk.js +1 -0
- package/dist/assets/asterisk-CLHf-iRz.js +1 -0
- package/dist/assets/blockDiagram-677ZJIJ3-DzeI4GyV.js +1 -0
- package/dist/assets/brainfuck-CdLnmYpe.js +1 -0
- package/dist/assets/c4Diagram-LMCZKHZV-DBI0K7wS.js +1 -0
- package/dist/assets/channel-BrN6yx0e.js +1 -0
- package/dist/assets/chunk-2Q5K7J3B-DK9JA8Ct.js +1 -0
- package/dist/assets/chunk-32BRIVSS-VNg3Ylzs.js +1 -0
- package/dist/assets/chunk-5VM5RSS4-DFhufY9o.js +1 -0
- package/dist/assets/chunk-EX3LRPZG-B93MHNBT.js +1 -0
- package/dist/assets/chunk-JWPE2WC7-C54OW1iN.js +1 -0
- package/dist/assets/chunk-MOJQB5TN-lKhWWIDe.js +1 -0
- package/dist/assets/chunk-RYQCIY6F-BK2jDXwB.js +1 -0
- package/dist/assets/chunk-V7JOEXUC-aLHBmfOc.js +1 -0
- package/dist/assets/chunk-VR4S4FIN-Bomuor1h.js +1 -0
- package/dist/assets/chunk-XXDRQBXY-BPj05P7g.js +1 -0
- package/dist/assets/classDiagram-OUVF2IWQ-COm0X4uJ.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-COm0X4uJ.js +1 -0
- package/dist/assets/clike-BDgEuk0n.js +1 -0
- package/dist/assets/clojure-CrPxgQZl.js +1 -0
- package/dist/assets/cmake-BknZiLBu.js +1 -0
- package/dist/assets/cobol-DN1mHbgw.js +1 -0
- package/dist/assets/coffeescript-DTAwRC7M.js +1 -0
- package/dist/assets/commonlisp-B4DJ--Bo.js +1 -0
- package/dist/assets/cose-bilkent-JH36ORCC-DU44QHSb.js +1 -0
- package/dist/assets/crystal-DoipYOOv.js +1 -0
- package/dist/assets/css-BeQRP3p5.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-C0dowxsF.js +15 -0
- package/dist/assets/cynefinDiagram-TSTJHNR4-C6vNWPUV.js +1 -0
- package/dist/assets/cypher-BzELKutH.js +1 -0
- package/dist/assets/cytoscape.esm-D0POlJZ1.js +9 -0
- package/dist/assets/d-Mh2Rawoc.js +1 -0
- package/dist/assets/dagre-VKFMJZFB-aLG4uEb-.js +1 -0
- package/dist/assets/defaultLocale-DZ7E7S9R.js +1 -0
- package/dist/assets/diagram-FQU43EPY-D5C8GfdU.js +1 -0
- package/dist/assets/diagram-G47NLZAW-C9tRw_xi.js +1 -0
- package/dist/assets/diagram-NH7WQ7WH-AYxTxwJ2.js +1 -0
- package/dist/assets/diagram-OA4YK3LP-BuBE5n9n.js +1 -0
- package/dist/assets/diagram-WEI45ONY-Cda7zYeO.js +1 -0
- package/dist/assets/diff-B1OtBbfz.js +1 -0
- package/dist/assets/dockerfile-Du7niAGi.js +1 -0
- package/dist/assets/dtd-So5hjSa8.js +1 -0
- package/dist/assets/dylan-Co15g-RX.js +1 -0
- package/dist/assets/ebnf-DWrAnno4.js +1 -0
- package/dist/assets/ebnfDiagram-CCIWWBDH-DC_OGyoh.js +1 -0
- package/dist/assets/ecl-8tbf0rUT.js +1 -0
- package/dist/assets/eiffel-BXtlUtEg.js +1 -0
- package/dist/assets/elm-BwiUluiH.js +1 -0
- package/dist/assets/erDiagram-Q63AITRT-D2G21PVY.js +1 -0
- package/dist/assets/erlang-CrHBLi-m.js +1 -0
- package/dist/assets/factor-C7nC06Ta.js +1 -0
- package/dist/assets/fcl-DKWfryFT.js +1 -0
- package/dist/assets/flowDiagram-23GEKE2U-CEQPYHrk.js +1 -0
- package/dist/assets/forth-Cg8ASoTj.js +1 -0
- package/dist/assets/fortran-BHf_qfFx.js +1 -0
- package/dist/assets/ganttDiagram-NO4QXBWP-JStxUtFR.js +1 -0
- package/dist/assets/gas-cj_2N_z1.js +1 -0
- package/dist/assets/gherkin-BiuTaH40.js +1 -0
- package/dist/assets/gitGraphDiagram-IHSO6WYX-BiojPH-V.js +1 -0
- package/dist/assets/graph-CnJdn47S.js +1 -0
- package/dist/assets/groovy-Bq8cXYUU.js +1 -0
- package/dist/assets/haskell-1ANuaeie.js +1 -0
- package/dist/assets/haxe-BUNSvWf_.js +1 -0
- package/dist/assets/html2canvas.esm-HFdlUwfn.js +20 -0
- package/dist/assets/http-DPC2IRQA.js +1 -0
- package/dist/assets/idl-DDbIciu_.js +1 -0
- package/dist/assets/index-BEyKG3O5.css +1 -0
- package/dist/assets/index-BduJoLQ5.js +1 -0
- package/dist/assets/index-BqwR8F0v.js +1 -0
- package/dist/assets/index-BsycQyrv.js +1 -0
- package/dist/assets/index-CFSDxZyA.js +1 -0
- package/dist/assets/index-CunNLTHc.js +1 -0
- package/dist/assets/index-OGkDFNTK.js +1 -0
- package/dist/assets/index-oxOyrL07.js +2 -0
- package/dist/assets/index-wvaycTGT.js +1 -0
- package/dist/assets/infoDiagram-FWYZ7A6U-Csl_aBIC.js +1 -0
- package/dist/assets/init-DMZMl1PR.js +1 -0
- package/dist/assets/ishikawaDiagram-FXEZZL3T-CjgGuMwr.js +1 -0
- package/dist/assets/javascript-Cet1BUca.js +1 -0
- package/dist/assets/journeyDiagram-5HDEW3XC-DUOy1PCq.js +1 -0
- package/dist/assets/jszip.min-BxIXdRg4.js +12 -0
- package/dist/assets/julia-CdxLCr68.js +1 -0
- package/dist/assets/kanban-definition-HUTT4EX6-Cx7GSrSj.js +1 -0
- package/dist/assets/katex-CfXf84Fz.js +1 -0
- package/dist/assets/layout-CCUE9ZRw.js +1 -0
- package/dist/assets/linear-GeBi6jJp.js +1 -0
- package/dist/assets/livescript-Bw1Vw7Ae.js +1 -0
- package/dist/assets/lua-DM1wbcnc.js +1 -0
- package/dist/assets/map-DQeg2hXV.js +1 -0
- package/dist/assets/mathematica-BXSv1_O1.js +1 -0
- package/dist/assets/mbox-CWY0keg3.js +1 -0
- package/dist/assets/mermaid.core-Cy9iVxov.js +7 -0
- package/dist/assets/mindmap-definition-LN4V7U3C-CUVxVkK5.js +1 -0
- package/dist/assets/mirc-CMLrLVMT.js +1 -0
- package/dist/assets/mllike-naqhAFf1.js +1 -0
- package/dist/assets/modelica-BvadsaHY.js +1 -0
- package/dist/assets/mscgen-DOr-Q10p.js +1 -0
- package/dist/assets/mumps-DKTl5Nyj.js +1 -0
- package/dist/assets/nginx-DWR90-d1.js +1 -0
- package/dist/assets/nsis-ooFGduGn.js +1 -0
- package/dist/assets/ntriples-q5jkU4X1.js +1 -0
- package/dist/assets/octave-Deu9Ci7_.js +1 -0
- package/dist/assets/orbiting-BCD4Vuij.svg +7 -0
- package/dist/assets/ordinal-DA-_8pMy.js +1 -0
- package/dist/assets/oz-cTQm1aoB.js +1 -0
- package/dist/assets/pascal-Oh3VmczP.js +1 -0
- package/dist/assets/pegDiagram-2B236MQR-BCF1byLY.js +1 -0
- package/dist/assets/perl-BddWF1HQ.js +1 -0
- package/dist/assets/pieDiagram-ENE6RG2P-D2cZTo8-.js +1 -0
- package/dist/assets/pig-g5ZQNIDr.js +1 -0
- package/dist/assets/powershell-CNmQNFVJ.js +1 -0
- package/dist/assets/properties-B41DXfv6.js +1 -0
- package/dist/assets/protobuf-eEBl31OJ.js +1 -0
- package/dist/assets/pug-DRSo4eCK.js +1 -0
- package/dist/assets/puppet-ClfRubAD.js +1 -0
- package/dist/assets/python-BSflc812.js +1 -0
- package/dist/assets/q-BBDx3N9Y.js +1 -0
- package/dist/assets/quadrantDiagram-ABIIQ3AL-Bwsn2--F.js +1 -0
- package/dist/assets/r-CByC1eO8.js +1 -0
- package/dist/assets/railroadDiagram-RFXS5EU6-CLGLpWHs.js +1 -0
- package/dist/assets/requirementDiagram-TGXJPOKE-BfmBYwZl.js +1 -0
- package/dist/assets/rpm-8t935XkD.js +1 -0
- package/dist/assets/ruby-CAgbkLZh.js +1 -0
- package/dist/assets/sankeyDiagram-HTMAVEWB-CqZhbyFn.js +1 -0
- package/dist/assets/sas-C-JWcRvo.js +1 -0
- package/dist/assets/scheme-D7o9RjUX.js +1 -0
- package/dist/assets/seqResourceLoaders-Bkh2Rb9i.js +2 -0
- package/dist/assets/seqResourceLoaders-Do7Kqg3B.css +41 -0
- package/dist/assets/sequenceDiagram-DBY2YBRQ-CcOdXkN2.js +1 -0
- package/dist/assets/shell-BXA79DV6.js +1 -0
- package/dist/assets/shimmer-BBDejmDf.svg +7 -0
- package/dist/assets/sieve-DNwyl0rd.js +1 -0
- package/dist/assets/simple-mode-CoQRusFX.js +1 -0
- package/dist/assets/sizeCapture-X5ZJPWSS-B4OVmPqu.js +1 -0
- package/dist/assets/smalltalk-DggktV6S.js +1 -0
- package/dist/assets/solr-D7NRuIPM.js +1 -0
- package/dist/assets/sparql-Cr71deJQ.js +1 -0
- package/dist/assets/spreadsheet-BMD3tYqw.js +1 -0
- package/dist/assets/sql-CbOjXfBR.js +1 -0
- package/dist/assets/stateDiagram-2N3HPSRC-Dysun0oO.js +1 -0
- package/dist/assets/stateDiagram-v2-6OUMAXLB-BFet8xAz.js +1 -0
- package/dist/assets/stex-iDPIkRmr.js +1 -0
- package/dist/assets/stylus-nWZizI-c.js +1 -0
- package/dist/assets/swift-DOhLK5SG.js +1 -0
- package/dist/assets/swimlanes-5IMT3BWC-_30OXwXy.js +2 -0
- package/dist/assets/swimlanesDiagram-G3AALYLV-C19viY0G.js +1 -0
- package/dist/assets/tcl-CQhJd1WY.js +1 -0
- package/dist/assets/textile-D9XqfVtL.js +1 -0
- package/dist/assets/tiddlywiki-DfOYgVky.js +1 -0
- package/dist/assets/tiki-a0_YLWvV.js +1 -0
- package/dist/assets/timeline-definition-FHXFAJF6-X1Xk3onD.js +1 -0
- package/dist/assets/toml-ekl3F1YB.js +1 -0
- package/dist/assets/troff-Bh_pcXF1.js +1 -0
- package/dist/assets/ttcn-M6363IRW.js +1 -0
- package/dist/assets/ttcn-cfg-7I2DgJEN.js +1 -0
- package/dist/assets/turtle-B5jdxH6D.js +1 -0
- package/dist/assets/vb-DM-xPmVv.js +1 -0
- package/dist/assets/vbscript-B0qu41Yc.js +1 -0
- package/dist/assets/velocity-FCgsuVHf.js +1 -0
- package/dist/assets/vendor-antd-Bzi1WuBb.js +17 -0
- package/dist/assets/vendor-codemirror-CKTrJd47.js +1 -0
- package/dist/assets/vendor-highlight-IFTJ9nxW.js +1 -0
- package/dist/assets/vendor-markdown-BN3QLsBu.js +3 -0
- package/dist/assets/vendor-mdxeditor-4PbKH6K7.js +2 -0
- package/dist/assets/vendor-qrcode-Bnjm0rcu.js +6 -0
- package/dist/assets/vendor-react-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-virtuoso-2P4SowHC.js +1 -0
- package/dist/assets/vendor-xterm-DckPrCx1.js +37 -0
- package/dist/assets/vennDiagram-L72KCM5P-D3fQnGq7.js +1 -0
- package/dist/assets/verilog-nrfFvR12.js +1 -0
- package/dist/assets/vhdl-WlDXtV-W.js +1 -0
- package/dist/assets/wardleyDiagram-EHGQE667-CRhqI6-g.js +1 -0
- package/dist/assets/webidl-RIQoSXDx.js +1 -0
- package/dist/assets/xquery-BN45G3lJ.js +1 -0
- package/dist/assets/xychartDiagram-FW5EYKEG-Cmtgmmtg.js +1 -0
- package/dist/assets/yacas-U6gaIVhD.js +1 -0
- package/dist/assets/z80-CFe5BHbK.js +1 -0
- package/dist/index.html +25 -6
- package/dist/voice-packs/default/A_choice_for_your_consideration_sir.MP3 +0 -0
- package/dist/voice-packs/default/It_is_done_sir.MP3 +0 -0
- package/dist/voice-packs/default/The_plan_awaits_your_approval_sir.MP3 +0 -0
- package/dist/voice-packs/default/pack.json +24 -0
- package/dist/voice-packs/sanguo/ask.MP3 +0 -0
- package/dist/voice-packs/sanguo/end.MP3 +0 -0
- package/dist/voice-packs/sanguo/pack.json +24 -0
- package/dist/voice-packs/sanguo/plan.MP3 +0 -0
- package/electron/diag.js +110 -0
- package/electron/main.js +1432 -0
- package/electron/menu-model.js +107 -0
- package/electron/tab-bar.html +575 -0
- package/electron/tab-content-preload.js +66 -0
- package/electron/tab-preload.js +24 -0
- package/electron/tab-worker.js +142 -0
- package/electron/window-state.js +60 -0
- package/electron/workspace-preload.js +19 -0
- package/findcx.js +4 -0
- package/i18n.js +3 -423
- package/index.html +30 -0
- package/interceptor.js +144 -70
- package/jsconfig.json +25 -0
- package/lib/approval-reviewer.js +23 -0
- package/lib/appserver-bridge.js +1753 -237
- package/lib/ask-bridge.js +5 -5
- package/lib/cli-args.js +1 -0
- package/lib/codex-config.js +157 -18
- package/lib/context-watcher.js +6 -65
- package/lib/delta-reconstructor.js +74 -52
- package/lib/ensure-hooks.js +37 -30
- package/lib/interceptor-core.js +490 -43
- package/lib/log-watcher.js +3 -8
- package/lib/main-agent-entry.js +68 -0
- package/lib/openai-body.js +95 -0
- package/lib/otel-adapter.js +3 -2
- package/lib/otel-receiver.js +1 -2
- package/lib/perm-bridge.js +84 -44
- package/lib/proxy-env.js +45 -1
- package/lib/sdk-adapter.js +241 -51
- package/lib/sdk-manager.js +523 -370
- package/lib/skills-api.js +364 -0
- package/lib/stats-worker.js +21 -21
- package/lib/token-usage.js +29 -0
- package/lib/updater.js +3 -7
- package/package.json +27 -6
- package/plugins/.gitkeep +0 -0
- package/plugins/README.md +8 -0
- package/proxy.js +187 -241
- package/pty-manager.js +17 -1
- package/public/favicon.ico +0 -0
- package/public/voice-packs/default/A_choice_for_your_consideration_sir.MP3 +0 -0
- package/public/voice-packs/default/It_is_done_sir.MP3 +0 -0
- package/public/voice-packs/default/The_plan_awaits_your_approval_sir.MP3 +0 -0
- package/public/voice-packs/default/pack.json +24 -0
- package/public/voice-packs/sanguo/ask.MP3 +0 -0
- package/public/voice-packs/sanguo/end.MP3 +0 -0
- package/public/voice-packs/sanguo/pack.json +24 -0
- package/public/voice-packs/sanguo/plan.MP3 +0 -0
- package/scripts/check-no-control-bytes.js +130 -0
- package/scripts/check-sign-config.sh +85 -0
- package/scripts/gen-default-voicepack.js +176 -0
- package/scripts/mac-sign.sh +47 -0
- package/scripts/npm-pack-dry-run.mjs +20 -0
- package/server/lib/approval-modal-prefs.js +72 -0
- package/server/lib/context-rules.js +70 -0
- package/server/lib/delta-reconstructor.js +403 -0
- package/server/lib/tools-xml-formatter.js +91 -0
- package/server/lib/voice-pack-events.js +79 -0
- package/server.js +420 -86
- package/src/App.jsx +638 -0
- package/src/App.module.css +1088 -0
- package/src/AppBase.jsx +2803 -0
- package/src/Mobile.jsx +1348 -0
- package/src/components/approval/ApprovalModal.jsx +319 -0
- package/src/components/approval/ApprovalModal.module.css +160 -0
- package/src/components/approval/ToolApprovalPanel.jsx +111 -0
- package/src/components/approval/ToolApprovalPanel.module.css +250 -0
- package/src/components/chat/ApprovalPortalContext.js +26 -0
- package/src/components/chat/AskQuestionForm.jsx +279 -0
- package/src/components/chat/AskTimeoutCountdown.jsx +113 -0
- package/src/components/chat/ChatInputBar.jsx +584 -0
- package/src/components/chat/ChatInputBar.module.css +656 -0
- package/src/components/chat/ChatMessage.jsx +1587 -0
- package/src/components/chat/ChatMessage.module.css +1560 -0
- package/src/components/chat/ChatView.jsx +3533 -0
- package/src/components/chat/ChatView.module.css +418 -0
- package/src/components/chat/DiffView.jsx +111 -0
- package/src/components/chat/DiffView.module.css +141 -0
- package/src/components/chat/RoleFilterBar.jsx +35 -0
- package/src/components/chat/RoleFilterBar.module.css +62 -0
- package/src/components/chat/controllers/askFlowController.js +789 -0
- package/src/components/chat/controllers/permissionController.js +84 -0
- package/src/components/chat/controllers/ptyPromptController.js +166 -0
- package/src/components/chat/controllers/scrollHighlightController.js +50 -0
- package/src/components/chat/controllers/splitDragController.js +135 -0
- package/src/components/chat/controllers/toolFileChangeController.js +216 -0
- package/src/components/chat/interactionOwnership.js +106 -0
- package/src/components/chat/uploadDeferLogic.js +46 -0
- package/src/components/common/ConceptHelp.jsx +97 -0
- package/src/components/common/ConceptHelp.module.css +151 -0
- package/src/components/common/ConfirmRemoveButton.jsx +78 -0
- package/src/components/common/CountryFlag.jsx +105 -0
- package/src/components/common/CountryFlag.module.css +36 -0
- package/src/components/common/DingTalkIcon.jsx +20 -0
- package/src/components/common/DiscordIcon.jsx +21 -0
- package/src/components/common/FeishuIcon.jsx +23 -0
- package/src/components/common/HoverPreviewTip.jsx +62 -0
- package/src/components/common/HoverPreviewTip.module.css +21 -0
- package/src/components/common/ImageLightbox.jsx +244 -0
- package/src/components/common/ImageLightbox.module.css +120 -0
- package/src/components/common/MemoryDetailModal.jsx +75 -0
- package/src/components/common/OpenFolderIcon.jsx +53 -0
- package/src/components/common/OpenFolderIcon.module.css +7 -0
- package/src/components/common/PanelResizer.jsx +48 -0
- package/src/components/common/PanelResizer.module.css +11 -0
- package/src/components/common/QuickAutoApproveRows.jsx +66 -0
- package/src/components/common/RefreshIcon.jsx +50 -0
- package/src/components/common/RefreshIcon.module.css +26 -0
- package/src/components/common/SnapLineOverlay.jsx +47 -0
- package/src/components/common/SnapLineOverlay.module.css +31 -0
- package/src/components/common/ToolsHelp.jsx +113 -0
- package/src/components/common/ToolsHelp.module.css +85 -0
- package/src/components/common/WeComIcon.jsx +22 -0
- package/src/components/common/quickMenuIcons.jsx +99 -0
- package/src/components/common/sharedChrome.module.css +274 -0
- package/src/components/dashboard/AppHeader.jsx +2085 -0
- package/src/components/dashboard/AppHeader.module.css +676 -0
- package/src/components/dashboard/CachePopoverContent.jsx +538 -0
- package/src/components/dashboard/CachePopoverContent.module.css +191 -0
- package/src/components/dashboard/ContextTab.jsx +769 -0
- package/src/components/dashboard/ContextTab.module.css +565 -0
- package/src/components/dashboard/DetailPanel.jsx +813 -0
- package/src/components/dashboard/DetailPanel.module.css +513 -0
- package/src/components/dashboard/LiveTagPopover.jsx +89 -0
- package/src/components/dashboard/LiveTagPopover.module.css +67 -0
- package/src/components/dashboard/RequestList.jsx +146 -0
- package/src/components/dashboard/RequestList.module.css +146 -0
- package/src/components/dashboard/TeamSessionPanel.jsx +584 -0
- package/src/components/dashboard/TeamSessionPanel.module.css +457 -0
- package/src/components/dashboard/UsageWindowPill.jsx +166 -0
- package/src/components/dashboard/UsageWindowPill.module.css +140 -0
- package/src/components/dashboard/WorkflowRunsPanel.jsx +108 -0
- package/src/components/dashboard/WorkflowRunsPanel.module.css +72 -0
- package/src/components/dashboard/WorkspaceList.jsx +410 -0
- package/src/components/dashboard/WorkspaceList.module.css +254 -0
- package/src/components/files/FileContentView.jsx +1013 -0
- package/src/components/files/FileContentView.module.css +418 -0
- package/src/components/files/FileExplorer.jsx +937 -0
- package/src/components/files/FileExplorer.module.css +173 -0
- package/src/components/files/MdxEditorPanel.base.css +9 -0
- package/src/components/files/MdxEditorPanel.jsx +181 -0
- package/src/components/files/MdxEditorPanel.module.css +917 -0
- package/src/components/git/DiffMiniMap.jsx +98 -0
- package/src/components/git/DiffMiniMap.module.css +17 -0
- package/src/components/git/FullFileDiffView.jsx +265 -0
- package/src/components/git/FullFileDiffView.module.css +176 -0
- package/src/components/git/GitChanges.jsx +461 -0
- package/src/components/git/GitChanges.module.css +337 -0
- package/src/components/git/GitDiffView.jsx +161 -0
- package/src/components/git/GitDiffView.module.css +205 -0
- package/src/components/mobile/MobileDrawerCloseButton.jsx +18 -0
- package/src/components/mobile/MobileFileExplorer.jsx +231 -0
- package/src/components/mobile/MobileFileExplorer.module.css +171 -0
- package/src/components/mobile/MobileGitDiff.jsx +293 -0
- package/src/components/mobile/MobileGitDiff.module.css +317 -0
- package/src/components/mobile/MobileStats.jsx +211 -0
- package/src/components/mobile/MobileStats.module.css +75 -0
- package/src/components/settings/ImAppendSystemModal.jsx +104 -0
- package/src/components/settings/ImConversationModal.jsx +328 -0
- package/src/components/settings/ImConversationModal.module.css +49 -0
- package/src/components/settings/ImPlatformSettings.jsx +453 -0
- package/src/components/settings/ImPlatformSettings.module.css +110 -0
- package/src/components/settings/ImSkillsModal.jsx +94 -0
- package/src/components/settings/ImStatusChip.jsx +80 -0
- package/src/components/settings/ImStatusChip.module.css +36 -0
- package/src/components/settings/MessagingModal.jsx +65 -0
- package/src/components/settings/MessagingModal.module.css +95 -0
- package/src/components/settings/ModelPromptTabs.jsx +118 -0
- package/src/components/settings/PluginModal.jsx +423 -0
- package/src/components/settings/PluginModal.module.css +136 -0
- package/src/components/settings/PreferencesForm.jsx +104 -0
- package/src/components/settings/PreferencesForm.module.css +27 -0
- package/src/components/settings/ProcessModal.jsx +175 -0
- package/src/components/settings/ProcessModal.module.css +21 -0
- package/src/components/settings/ProjectAliasEditor.jsx +138 -0
- package/src/components/settings/ProjectAliasEditor.module.css +87 -0
- package/src/components/settings/ProjectPrefsManagerModal.jsx +123 -0
- package/src/components/settings/ProjectPrefsManagerModal.module.css +52 -0
- package/src/components/settings/ProxyModal.jsx +286 -0
- package/src/components/settings/ProxyModal.module.css +141 -0
- package/src/components/settings/SkillsManagerModal.jsx +143 -0
- package/src/components/settings/SkillsManagerModal.module.css +143 -0
- package/src/components/settings/SystemTextModal.jsx +312 -0
- package/src/components/settings/SystemTextModal.module.css +331 -0
- package/src/components/settings/VoicePackSettings.jsx +319 -0
- package/src/components/settings/VoicePackSettings.module.css +151 -0
- package/src/components/settings/imPlatforms.js +177 -0
- package/src/components/terminal/CustomUltraplanEditModal.jsx +227 -0
- package/src/components/terminal/CustomUltraplanEditModal.module.css +189 -0
- package/src/components/terminal/PresetExpertPickerModal.jsx +116 -0
- package/src/components/terminal/PresetExpertPickerModal.module.css +90 -0
- package/src/components/terminal/PresetModal.jsx +118 -0
- package/src/components/terminal/ScratchTerminal.jsx +359 -0
- package/src/components/terminal/TerminalPanel.jsx +2021 -0
- package/src/components/terminal/TerminalPanel.module.css +872 -0
- package/src/components/terminal/TerminalWsContext.jsx +226 -0
- package/src/components/terminal/UltraPlanModal.jsx +328 -0
- package/src/components/terminal/UltraPlanModal.module.css +527 -0
- package/src/components/terminal/UltraplanExpertManagerModal.jsx +114 -0
- package/src/components/terminal/UltraplanExpertManagerModal.module.css +91 -0
- package/src/components/terminal/UltraplanPanel.jsx +307 -0
- package/src/components/terminal/UltraplanPanel.module.css +540 -0
- package/src/components/terminal/terminalThemes.js +33 -0
- package/src/components/viewers/ImageViewer.jsx +288 -0
- package/src/components/viewers/ImageViewer.module.css +203 -0
- package/src/components/viewers/JsonViewer.jsx +40 -0
- package/src/components/viewers/JsonViewer.module.css +9 -0
- package/src/components/viewers/LogTable.jsx +131 -0
- package/src/components/viewers/MarkdownBlock.jsx +112 -0
- package/src/components/viewers/MarkdownBlock.module.css +157 -0
- package/src/components/viewers/ToolResultView.jsx +389 -0
- package/src/components/viewers/ToolResultView.module.css +108 -0
- package/src/components/viewers/WebResultsView.jsx +74 -0
- package/src/components/viewers/WebResultsView.module.css +85 -0
- package/src/components/viewers/WorkflowLiveHud.jsx +153 -0
- package/src/components/viewers/WorkflowLiveHud.module.css +256 -0
- package/src/components/viewers/WorkflowPanel.jsx +243 -0
- package/src/components/viewers/WorkflowPanel.module.css +265 -0
- package/src/components/viewers/WorkflowTimeline.jsx +83 -0
- package/src/components/viewers/WorkflowTimeline.module.css +116 -0
- package/src/contexts/SettingsContext.jsx +140 -0
- package/src/env.js +54 -0
- package/src/global.css +607 -0
- package/src/hooks/useMarkdownExport.js +146 -0
- package/src/hooks/useMermaidRender.js +193 -0
- package/src/hooks/useProjectAlias.js +29 -0
- package/src/hooks/useSessionStoragePersistedSet.js +41 -0
- package/src/i18n/mdxTranslations.js +472 -0
- package/src/i18n.js +12409 -0
- package/src/img/ccv-logo.png +0 -0
- package/src/img/codex/entrance.svg +7 -0
- package/src/img/codex/exit.svg +7 -0
- package/src/img/codex/orbiting.svg +7 -0
- package/src/img/codex/shimmer.svg +7 -0
- package/src/img/codex/thinking.svg +7 -0
- package/src/img/codex/tickle.svg +7 -0
- package/src/img/codex/waiting.svg +7 -0
- package/src/img/codex/writing.svg +7 -0
- package/src/img/default-avatar.svg +1 -0
- package/src/img/default-model-avatar.svg +1 -0
- package/src/img/loading-pet.gif +0 -0
- package/src/img/model-codex.svg +2 -0
- package/src/img/model-deepseek.svg +2 -0
- package/src/img/model-gemini.svg +2 -0
- package/src/img/model-glm.svg +2 -0
- package/src/img/model-kimi.svg +2 -0
- package/src/img/model-minimax.svg +2 -0
- package/src/img/model-openai.svg +2 -0
- package/src/img/model-qwen.svg +2 -0
- package/src/img/teammates/DESIGN.md +165 -0
- package/src/img/teammates/analyst.svg +32 -0
- package/src/img/teammates/auditor.svg +28 -0
- package/src/img/teammates/builder.svg +33 -0
- package/src/img/teammates/default.svg +25 -0
- package/src/img/teammates/designer.svg +25 -0
- package/src/img/teammates/executor.svg +31 -0
- package/src/img/teammates/expert.svg +30 -0
- package/src/img/teammates/explorer.svg +30 -0
- package/src/img/teammates/implementer.svg +34 -0
- package/src/img/teammates/investigator.svg +29 -0
- package/src/img/teammates/marvel/analyst.svg +26 -0
- package/src/img/teammates/marvel/auditor.svg +28 -0
- package/src/img/teammates/marvel/builder.svg +15 -0
- package/src/img/teammates/marvel/default.svg +25 -0
- package/src/img/teammates/marvel/designer.svg +21 -0
- package/src/img/teammates/marvel/executor.svg +25 -0
- package/src/img/teammates/marvel/expert.svg +31 -0
- package/src/img/teammates/marvel/explorer.svg +22 -0
- package/src/img/teammates/marvel/implementer.svg +30 -0
- package/src/img/teammates/marvel/investigator.svg +21 -0
- package/src/img/teammates/marvel/researcher.svg +30 -0
- package/src/img/teammates/marvel/reviewer.svg +21 -0
- package/src/img/teammates/marvel/scanner.svg +23 -0
- package/src/img/teammates/marvel/security.svg +30 -0
- package/src/img/teammates/marvel/tracer.svg +19 -0
- package/src/img/teammates/marvel/translator.svg +24 -0
- package/src/img/teammates/marvel/worker.svg +16 -0
- package/src/img/teammates/researcher.svg +35 -0
- package/src/img/teammates/reviewer.svg +23 -0
- package/src/img/teammates/scanner.svg +31 -0
- package/src/img/teammates/security.svg +31 -0
- package/src/img/teammates/tracer.svg +30 -0
- package/src/img/teammates/translator.svg +32 -0
- package/src/img/teammates/worker.svg +29 -0
- package/src/main.jsx +30 -0
- package/src/tokenInterceptor.js +60 -0
- package/src/utils/apiUrl.js +26 -0
- package/src/utils/approvalReviewerOptions.js +27 -0
- package/src/utils/askFallback.js +21 -0
- package/src/utils/askOptionDesc.js +55 -0
- package/src/utils/askPortalMatcher.js +54 -0
- package/src/utils/autoApproveOptions.js +23 -0
- package/src/utils/avatarAnimationPostPass.js +46 -0
- package/src/utils/builtinPresets.js +18 -0
- package/src/utils/clearCheckpoint.js +154 -0
- package/src/utils/commandValidator.js +45 -0
- package/src/utils/contentFilter.js +675 -0
- package/src/utils/contextRaw.js +17 -0
- package/src/utils/contextSidebarNavigation.js +16 -0
- package/src/utils/conversationEntryNormalize.js +497 -0
- package/src/utils/displayScaleHelper.js +47 -0
- package/src/utils/entry-slim.js +594 -0
- package/src/utils/entryCache.js +179 -0
- package/src/utils/errorReport.js +40 -0
- package/src/utils/fileExpandedPathsStorage.js +70 -0
- package/src/utils/fileIcons.jsx +36 -0
- package/src/utils/fileOpen.js +37 -0
- package/src/utils/formatters.js +48 -0
- package/src/utils/gitApi.js +50 -0
- package/src/utils/gitTreeBuilder.js +19 -0
- package/src/utils/helpers.js +462 -0
- package/src/utils/identityHeal.js +83 -0
- package/src/utils/imOrigin.js +24 -0
- package/src/utils/imTr.js +7 -0
- package/src/utils/imageCompress.js +83 -0
- package/src/utils/imageDownscale.js +28 -0
- package/src/utils/imageResize.js +112 -0
- package/src/utils/ingestPipeline.js +47 -0
- package/src/utils/lazyWithReload.js +53 -0
- package/src/utils/markdown.js +30 -0
- package/src/utils/markdownIncremental.js +39 -0
- package/src/utils/markdownProfiler.js +113 -0
- package/src/utils/mdExtensionDetect.js +64 -0
- package/src/utils/memoryLinkParser.js +44 -0
- package/src/utils/modalMask.js +15 -0
- package/src/utils/monotime.js +6 -0
- package/src/utils/pinnedMenu.js +55 -0
- package/src/utils/presetShortcuts.js +14 -0
- package/src/utils/projectAlias.js +135 -0
- package/src/utils/promptClassifier.js +111 -0
- package/src/utils/promptDetect.js +196 -0
- package/src/utils/promptNav.js +60 -0
- package/src/utils/ptyChunkBuilder.js +251 -0
- package/src/utils/quickMenuHoverIntent.js +35 -0
- package/src/utils/rateLimitParser.js +249 -0
- package/src/utils/readResultPool.js +106 -0
- package/src/utils/refreshCachedItemProp.js +32 -0
- package/src/utils/requestTools.js +19 -0
- package/src/utils/requestType.js +284 -0
- package/src/utils/resizeCalc.js +21 -0
- package/src/utils/resolveLocalized.js +17 -0
- package/src/utils/seqResourceLoaders.js +79 -0
- package/src/utils/sessionManager.js +694 -0
- package/src/utils/sessionMerge.js +290 -0
- package/src/utils/skillModalController.js +111 -0
- package/src/utils/skillsParser.js +116 -0
- package/src/utils/slashCommandLabels.js +80 -0
- package/src/utils/splitDragCalc.js +73 -0
- package/src/utils/stickyBottomController.js +643 -0
- package/src/utils/svgSanitize.js +48 -0
- package/src/utils/systemTags.js +47 -0
- package/src/utils/tCodex.js +20 -0
- package/src/utils/teamModalBuilder.js +347 -0
- package/src/utils/teamSessionParser.js +186 -0
- package/src/utils/teammateAvatars.js +194 -0
- package/src/utils/teammateDetector.js +106 -0
- package/src/utils/termDiag.js +114 -0
- package/src/utils/terminalClipboard.js +117 -0
- package/src/utils/terminalWriteQueue.js +398 -0
- package/src/utils/thinkingMerge.js +49 -0
- package/src/utils/tokenUsage.js +1 -0
- package/src/utils/toolCatalog.js +31 -0
- package/src/utils/toolNameAliases.js +13 -0
- package/src/utils/toolResultBuilder.js +312 -0
- package/src/utils/toolResultClassifier.js +16 -0
- package/src/utils/toolResultCore.js +161 -0
- package/src/utils/toolsDiff.js +44 -0
- package/src/utils/toolsXmlFormatter.js +3 -0
- package/src/utils/ultraplanController.js +109 -0
- package/src/utils/ultraplanExperts.js +86 -0
- package/src/utils/ultraplanTemplates.js +152 -0
- package/src/utils/userImageRefs.js +49 -0
- package/src/utils/voicePackPlayer.js +233 -0
- package/src/utils/webResultGrouping.js +111 -0
- package/src/utils/workflowFormat.js +52 -0
- package/src/utils/workflowRuns.js +118 -0
- package/src/utils/workflowStore.js +94 -0
- package/vite.config.js +106 -0
- package/concepts/ar/CacheRebuild.md +0 -36
- package/concepts/ar/KVCacheContent.md +0 -49
- package/concepts/ar/Tool-Agent.md +0 -125
- package/concepts/ar/Tool-AskUserQuestion.md +0 -75
- package/concepts/ar/Tool-Bash.md +0 -167
- package/concepts/ar/Tool-Edit.md +0 -46
- package/concepts/ar/Tool-EnterPlanMode.md +0 -128
- package/concepts/ar/Tool-EnterWorktree.md +0 -56
- package/concepts/ar/Tool-ExitPlanMode.md +0 -62
- package/concepts/ar/Tool-Glob.md +0 -39
- package/concepts/ar/Tool-Grep.md +0 -57
- package/concepts/ar/Tool-NotebookEdit.md +0 -33
- package/concepts/ar/Tool-Read.md +0 -56
- package/concepts/ar/Tool-SendMessage.md +0 -41
- package/concepts/ar/Tool-Skill.md +0 -56
- package/concepts/ar/Tool-Task.md +0 -51
- package/concepts/ar/Tool-TaskCreate.md +0 -78
- package/concepts/ar/Tool-TaskGet.md +0 -56
- package/concepts/ar/Tool-TaskList.md +0 -56
- package/concepts/ar/Tool-TaskOutput.md +0 -40
- package/concepts/ar/Tool-TaskStop.md +0 -32
- package/concepts/ar/Tool-TaskUpdate.md +0 -123
- package/concepts/ar/Tool-TeamCreate.md +0 -38
- package/concepts/ar/Tool-TeamDelete.md +0 -30
- package/concepts/ar/Tool-WebFetch.md +0 -55
- package/concepts/ar/Tool-WebSearch.md +0 -58
- package/concepts/ar/Tool-Write.md +0 -39
- package/concepts/ar/Tool-executeCode.md +0 -41
- package/concepts/ar/Tool-getDiagnostics.md +0 -32
- package/concepts/ar/Tools.md +0 -67
- package/concepts/da/CacheRebuild.md +0 -36
- package/concepts/da/KVCacheContent.md +0 -49
- package/concepts/da/Tool-Agent.md +0 -125
- package/concepts/da/Tool-AskUserQuestion.md +0 -75
- package/concepts/da/Tool-Bash.md +0 -167
- package/concepts/da/Tool-Edit.md +0 -46
- package/concepts/da/Tool-EnterPlanMode.md +0 -128
- package/concepts/da/Tool-EnterWorktree.md +0 -56
- package/concepts/da/Tool-ExitPlanMode.md +0 -62
- package/concepts/da/Tool-Glob.md +0 -39
- package/concepts/da/Tool-Grep.md +0 -57
- package/concepts/da/Tool-NotebookEdit.md +0 -33
- package/concepts/da/Tool-Read.md +0 -56
- package/concepts/da/Tool-SendMessage.md +0 -41
- package/concepts/da/Tool-Skill.md +0 -56
- package/concepts/da/Tool-Task.md +0 -51
- package/concepts/da/Tool-TaskCreate.md +0 -78
- package/concepts/da/Tool-TaskGet.md +0 -56
- package/concepts/da/Tool-TaskList.md +0 -56
- package/concepts/da/Tool-TaskOutput.md +0 -40
- package/concepts/da/Tool-TaskStop.md +0 -32
- package/concepts/da/Tool-TaskUpdate.md +0 -123
- package/concepts/da/Tool-TeamCreate.md +0 -38
- package/concepts/da/Tool-TeamDelete.md +0 -30
- package/concepts/da/Tool-WebFetch.md +0 -55
- package/concepts/da/Tool-WebSearch.md +0 -58
- package/concepts/da/Tool-Write.md +0 -39
- package/concepts/da/Tool-executeCode.md +0 -41
- package/concepts/da/Tool-getDiagnostics.md +0 -32
- package/concepts/da/Tools.md +0 -67
- package/concepts/de/CacheRebuild.md +0 -36
- package/concepts/de/KVCacheContent.md +0 -49
- package/concepts/de/Tool-Agent.md +0 -125
- package/concepts/de/Tool-AskUserQuestion.md +0 -75
- package/concepts/de/Tool-Bash.md +0 -167
- package/concepts/de/Tool-Edit.md +0 -46
- package/concepts/de/Tool-EnterPlanMode.md +0 -128
- package/concepts/de/Tool-EnterWorktree.md +0 -56
- package/concepts/de/Tool-ExitPlanMode.md +0 -62
- package/concepts/de/Tool-Glob.md +0 -39
- package/concepts/de/Tool-Grep.md +0 -57
- package/concepts/de/Tool-NotebookEdit.md +0 -33
- package/concepts/de/Tool-Read.md +0 -56
- package/concepts/de/Tool-SendMessage.md +0 -41
- package/concepts/de/Tool-Skill.md +0 -56
- package/concepts/de/Tool-Task.md +0 -51
- package/concepts/de/Tool-TaskCreate.md +0 -78
- package/concepts/de/Tool-TaskGet.md +0 -56
- package/concepts/de/Tool-TaskList.md +0 -56
- package/concepts/de/Tool-TaskOutput.md +0 -40
- package/concepts/de/Tool-TaskStop.md +0 -32
- package/concepts/de/Tool-TaskUpdate.md +0 -123
- package/concepts/de/Tool-TeamCreate.md +0 -38
- package/concepts/de/Tool-TeamDelete.md +0 -30
- package/concepts/de/Tool-WebFetch.md +0 -55
- package/concepts/de/Tool-WebSearch.md +0 -58
- package/concepts/de/Tool-Write.md +0 -39
- package/concepts/de/Tool-executeCode.md +0 -41
- package/concepts/de/Tool-getDiagnostics.md +0 -32
- package/concepts/de/Tools.md +0 -67
- package/concepts/en/CacheRebuild.md +0 -36
- package/concepts/en/KVCacheContent.md +0 -49
- package/concepts/en/Tool-Agent.md +0 -125
- package/concepts/en/Tool-AskUserQuestion.md +0 -75
- package/concepts/en/Tool-Bash.md +0 -167
- package/concepts/en/Tool-Edit.md +0 -46
- package/concepts/en/Tool-EnterPlanMode.md +0 -128
- package/concepts/en/Tool-EnterWorktree.md +0 -56
- package/concepts/en/Tool-ExitPlanMode.md +0 -62
- package/concepts/en/Tool-Glob.md +0 -39
- package/concepts/en/Tool-Grep.md +0 -57
- package/concepts/en/Tool-NotebookEdit.md +0 -33
- package/concepts/en/Tool-Read.md +0 -56
- package/concepts/en/Tool-SendMessage.md +0 -41
- package/concepts/en/Tool-Skill.md +0 -56
- package/concepts/en/Tool-Task.md +0 -51
- package/concepts/en/Tool-TaskCreate.md +0 -78
- package/concepts/en/Tool-TaskGet.md +0 -56
- package/concepts/en/Tool-TaskList.md +0 -56
- package/concepts/en/Tool-TaskOutput.md +0 -40
- package/concepts/en/Tool-TaskStop.md +0 -32
- package/concepts/en/Tool-TaskUpdate.md +0 -123
- package/concepts/en/Tool-TeamCreate.md +0 -38
- package/concepts/en/Tool-TeamDelete.md +0 -30
- package/concepts/en/Tool-WebFetch.md +0 -55
- package/concepts/en/Tool-WebSearch.md +0 -58
- package/concepts/en/Tool-Write.md +0 -39
- package/concepts/en/Tool-executeCode.md +0 -41
- package/concepts/en/Tool-getDiagnostics.md +0 -32
- package/concepts/es/CacheRebuild.md +0 -36
- package/concepts/es/KVCacheContent.md +0 -49
- package/concepts/es/Tool-Agent.md +0 -125
- package/concepts/es/Tool-AskUserQuestion.md +0 -75
- package/concepts/es/Tool-Bash.md +0 -167
- package/concepts/es/Tool-Edit.md +0 -46
- package/concepts/es/Tool-EnterPlanMode.md +0 -128
- package/concepts/es/Tool-EnterWorktree.md +0 -56
- package/concepts/es/Tool-ExitPlanMode.md +0 -62
- package/concepts/es/Tool-Glob.md +0 -39
- package/concepts/es/Tool-Grep.md +0 -57
- package/concepts/es/Tool-NotebookEdit.md +0 -33
- package/concepts/es/Tool-Read.md +0 -56
- package/concepts/es/Tool-SendMessage.md +0 -41
- package/concepts/es/Tool-Skill.md +0 -56
- package/concepts/es/Tool-Task.md +0 -51
- package/concepts/es/Tool-TaskCreate.md +0 -78
- package/concepts/es/Tool-TaskGet.md +0 -56
- package/concepts/es/Tool-TaskList.md +0 -56
- package/concepts/es/Tool-TaskOutput.md +0 -40
- package/concepts/es/Tool-TaskStop.md +0 -32
- package/concepts/es/Tool-TaskUpdate.md +0 -123
- package/concepts/es/Tool-TeamCreate.md +0 -38
- package/concepts/es/Tool-TeamDelete.md +0 -30
- package/concepts/es/Tool-WebFetch.md +0 -55
- package/concepts/es/Tool-WebSearch.md +0 -58
- package/concepts/es/Tool-Write.md +0 -39
- package/concepts/es/Tool-executeCode.md +0 -41
- package/concepts/es/Tool-getDiagnostics.md +0 -32
- package/concepts/es/Tools.md +0 -67
- package/concepts/fr/CacheRebuild.md +0 -36
- package/concepts/fr/KVCacheContent.md +0 -49
- package/concepts/fr/Tool-Agent.md +0 -125
- package/concepts/fr/Tool-AskUserQuestion.md +0 -75
- package/concepts/fr/Tool-Bash.md +0 -167
- package/concepts/fr/Tool-Edit.md +0 -46
- package/concepts/fr/Tool-EnterPlanMode.md +0 -128
- package/concepts/fr/Tool-EnterWorktree.md +0 -56
- package/concepts/fr/Tool-ExitPlanMode.md +0 -62
- package/concepts/fr/Tool-Glob.md +0 -39
- package/concepts/fr/Tool-Grep.md +0 -57
- package/concepts/fr/Tool-NotebookEdit.md +0 -33
- package/concepts/fr/Tool-Read.md +0 -56
- package/concepts/fr/Tool-SendMessage.md +0 -41
- package/concepts/fr/Tool-Skill.md +0 -56
- package/concepts/fr/Tool-Task.md +0 -51
- package/concepts/fr/Tool-TaskCreate.md +0 -78
- package/concepts/fr/Tool-TaskGet.md +0 -56
- package/concepts/fr/Tool-TaskList.md +0 -56
- package/concepts/fr/Tool-TaskOutput.md +0 -40
- package/concepts/fr/Tool-TaskStop.md +0 -32
- package/concepts/fr/Tool-TaskUpdate.md +0 -123
- package/concepts/fr/Tool-TeamCreate.md +0 -38
- package/concepts/fr/Tool-TeamDelete.md +0 -30
- package/concepts/fr/Tool-WebFetch.md +0 -55
- package/concepts/fr/Tool-WebSearch.md +0 -58
- package/concepts/fr/Tool-Write.md +0 -39
- package/concepts/fr/Tool-executeCode.md +0 -41
- package/concepts/fr/Tool-getDiagnostics.md +0 -32
- package/concepts/fr/Tools.md +0 -67
- package/concepts/it/CacheRebuild.md +0 -36
- package/concepts/it/KVCacheContent.md +0 -49
- package/concepts/it/Tool-Agent.md +0 -125
- package/concepts/it/Tool-AskUserQuestion.md +0 -75
- package/concepts/it/Tool-Bash.md +0 -167
- package/concepts/it/Tool-Edit.md +0 -46
- package/concepts/it/Tool-EnterPlanMode.md +0 -128
- package/concepts/it/Tool-EnterWorktree.md +0 -56
- package/concepts/it/Tool-ExitPlanMode.md +0 -62
- package/concepts/it/Tool-Glob.md +0 -39
- package/concepts/it/Tool-Grep.md +0 -57
- package/concepts/it/Tool-NotebookEdit.md +0 -33
- package/concepts/it/Tool-Read.md +0 -56
- package/concepts/it/Tool-SendMessage.md +0 -41
- package/concepts/it/Tool-Skill.md +0 -56
- package/concepts/it/Tool-Task.md +0 -51
- package/concepts/it/Tool-TaskCreate.md +0 -78
- package/concepts/it/Tool-TaskGet.md +0 -56
- package/concepts/it/Tool-TaskList.md +0 -56
- package/concepts/it/Tool-TaskOutput.md +0 -40
- package/concepts/it/Tool-TaskStop.md +0 -32
- package/concepts/it/Tool-TaskUpdate.md +0 -123
- package/concepts/it/Tool-TeamCreate.md +0 -38
- package/concepts/it/Tool-TeamDelete.md +0 -30
- package/concepts/it/Tool-WebFetch.md +0 -55
- package/concepts/it/Tool-WebSearch.md +0 -58
- package/concepts/it/Tool-Write.md +0 -39
- package/concepts/it/Tool-executeCode.md +0 -41
- package/concepts/it/Tool-getDiagnostics.md +0 -32
- package/concepts/it/Tools.md +0 -67
- package/concepts/ja/CacheRebuild.md +0 -36
- package/concepts/ja/KVCacheContent.md +0 -49
- package/concepts/ja/Tool-Agent.md +0 -125
- package/concepts/ja/Tool-AskUserQuestion.md +0 -75
- package/concepts/ja/Tool-Bash.md +0 -167
- package/concepts/ja/Tool-Edit.md +0 -46
- package/concepts/ja/Tool-EnterPlanMode.md +0 -128
- package/concepts/ja/Tool-EnterWorktree.md +0 -56
- package/concepts/ja/Tool-ExitPlanMode.md +0 -62
- package/concepts/ja/Tool-Glob.md +0 -39
- package/concepts/ja/Tool-Grep.md +0 -57
- package/concepts/ja/Tool-NotebookEdit.md +0 -33
- package/concepts/ja/Tool-Read.md +0 -56
- package/concepts/ja/Tool-SendMessage.md +0 -41
- package/concepts/ja/Tool-Skill.md +0 -56
- package/concepts/ja/Tool-Task.md +0 -51
- package/concepts/ja/Tool-TaskCreate.md +0 -78
- package/concepts/ja/Tool-TaskGet.md +0 -56
- package/concepts/ja/Tool-TaskList.md +0 -56
- package/concepts/ja/Tool-TaskOutput.md +0 -40
- package/concepts/ja/Tool-TaskStop.md +0 -32
- package/concepts/ja/Tool-TaskUpdate.md +0 -123
- package/concepts/ja/Tool-TeamCreate.md +0 -38
- package/concepts/ja/Tool-TeamDelete.md +0 -30
- package/concepts/ja/Tool-WebFetch.md +0 -55
- package/concepts/ja/Tool-WebSearch.md +0 -58
- package/concepts/ja/Tool-Write.md +0 -39
- package/concepts/ja/Tool-executeCode.md +0 -41
- package/concepts/ja/Tool-getDiagnostics.md +0 -32
- package/concepts/ja/Tools.md +0 -67
- package/concepts/ko/CacheRebuild.md +0 -36
- package/concepts/ko/KVCacheContent.md +0 -49
- package/concepts/ko/Tool-Agent.md +0 -125
- package/concepts/ko/Tool-AskUserQuestion.md +0 -75
- package/concepts/ko/Tool-Bash.md +0 -167
- package/concepts/ko/Tool-Edit.md +0 -46
- package/concepts/ko/Tool-EnterPlanMode.md +0 -128
- package/concepts/ko/Tool-EnterWorktree.md +0 -56
- package/concepts/ko/Tool-ExitPlanMode.md +0 -62
- package/concepts/ko/Tool-Glob.md +0 -39
- package/concepts/ko/Tool-Grep.md +0 -57
- package/concepts/ko/Tool-NotebookEdit.md +0 -33
- package/concepts/ko/Tool-Read.md +0 -56
- package/concepts/ko/Tool-SendMessage.md +0 -41
- package/concepts/ko/Tool-Skill.md +0 -56
- package/concepts/ko/Tool-Task.md +0 -51
- package/concepts/ko/Tool-TaskCreate.md +0 -78
- package/concepts/ko/Tool-TaskGet.md +0 -56
- package/concepts/ko/Tool-TaskList.md +0 -56
- package/concepts/ko/Tool-TaskOutput.md +0 -40
- package/concepts/ko/Tool-TaskStop.md +0 -32
- package/concepts/ko/Tool-TaskUpdate.md +0 -123
- package/concepts/ko/Tool-TeamCreate.md +0 -38
- package/concepts/ko/Tool-TeamDelete.md +0 -30
- package/concepts/ko/Tool-WebFetch.md +0 -55
- package/concepts/ko/Tool-WebSearch.md +0 -58
- package/concepts/ko/Tool-Write.md +0 -39
- package/concepts/ko/Tool-executeCode.md +0 -41
- package/concepts/ko/Tool-getDiagnostics.md +0 -32
- package/concepts/ko/Tools.md +0 -67
- package/concepts/no/CacheRebuild.md +0 -36
- package/concepts/no/KVCacheContent.md +0 -49
- package/concepts/no/Tool-Agent.md +0 -125
- package/concepts/no/Tool-AskUserQuestion.md +0 -75
- package/concepts/no/Tool-Bash.md +0 -167
- package/concepts/no/Tool-Edit.md +0 -46
- package/concepts/no/Tool-EnterPlanMode.md +0 -128
- package/concepts/no/Tool-EnterWorktree.md +0 -56
- package/concepts/no/Tool-ExitPlanMode.md +0 -62
- package/concepts/no/Tool-Glob.md +0 -39
- package/concepts/no/Tool-Grep.md +0 -57
- package/concepts/no/Tool-NotebookEdit.md +0 -33
- package/concepts/no/Tool-Read.md +0 -56
- package/concepts/no/Tool-SendMessage.md +0 -41
- package/concepts/no/Tool-Skill.md +0 -56
- package/concepts/no/Tool-Task.md +0 -51
- package/concepts/no/Tool-TaskCreate.md +0 -78
- package/concepts/no/Tool-TaskGet.md +0 -56
- package/concepts/no/Tool-TaskList.md +0 -56
- package/concepts/no/Tool-TaskOutput.md +0 -40
- package/concepts/no/Tool-TaskStop.md +0 -32
- package/concepts/no/Tool-TaskUpdate.md +0 -123
- package/concepts/no/Tool-TeamCreate.md +0 -38
- package/concepts/no/Tool-TeamDelete.md +0 -30
- package/concepts/no/Tool-WebFetch.md +0 -55
- package/concepts/no/Tool-WebSearch.md +0 -58
- package/concepts/no/Tool-Write.md +0 -39
- package/concepts/no/Tool-executeCode.md +0 -41
- package/concepts/no/Tool-getDiagnostics.md +0 -32
- package/concepts/no/Tools.md +0 -67
- package/concepts/pl/CacheRebuild.md +0 -36
- package/concepts/pl/KVCacheContent.md +0 -49
- package/concepts/pl/Tool-Agent.md +0 -125
- package/concepts/pl/Tool-AskUserQuestion.md +0 -75
- package/concepts/pl/Tool-Bash.md +0 -167
- package/concepts/pl/Tool-Edit.md +0 -46
- package/concepts/pl/Tool-EnterPlanMode.md +0 -128
- package/concepts/pl/Tool-EnterWorktree.md +0 -56
- package/concepts/pl/Tool-ExitPlanMode.md +0 -62
- package/concepts/pl/Tool-Glob.md +0 -39
- package/concepts/pl/Tool-Grep.md +0 -57
- package/concepts/pl/Tool-NotebookEdit.md +0 -33
- package/concepts/pl/Tool-Read.md +0 -56
- package/concepts/pl/Tool-SendMessage.md +0 -41
- package/concepts/pl/Tool-Skill.md +0 -56
- package/concepts/pl/Tool-Task.md +0 -51
- package/concepts/pl/Tool-TaskCreate.md +0 -78
- package/concepts/pl/Tool-TaskGet.md +0 -56
- package/concepts/pl/Tool-TaskList.md +0 -56
- package/concepts/pl/Tool-TaskOutput.md +0 -40
- package/concepts/pl/Tool-TaskStop.md +0 -32
- package/concepts/pl/Tool-TaskUpdate.md +0 -123
- package/concepts/pl/Tool-TeamCreate.md +0 -38
- package/concepts/pl/Tool-TeamDelete.md +0 -30
- package/concepts/pl/Tool-WebFetch.md +0 -55
- package/concepts/pl/Tool-WebSearch.md +0 -58
- package/concepts/pl/Tool-Write.md +0 -39
- package/concepts/pl/Tool-executeCode.md +0 -41
- package/concepts/pl/Tool-getDiagnostics.md +0 -32
- package/concepts/pl/Tools.md +0 -67
- package/concepts/pt-BR/CacheRebuild.md +0 -36
- package/concepts/pt-BR/KVCacheContent.md +0 -49
- package/concepts/pt-BR/Tool-Agent.md +0 -125
- package/concepts/pt-BR/Tool-AskUserQuestion.md +0 -75
- package/concepts/pt-BR/Tool-Bash.md +0 -167
- package/concepts/pt-BR/Tool-Edit.md +0 -46
- package/concepts/pt-BR/Tool-EnterPlanMode.md +0 -128
- package/concepts/pt-BR/Tool-EnterWorktree.md +0 -56
- package/concepts/pt-BR/Tool-ExitPlanMode.md +0 -62
- package/concepts/pt-BR/Tool-Glob.md +0 -39
- package/concepts/pt-BR/Tool-Grep.md +0 -57
- package/concepts/pt-BR/Tool-NotebookEdit.md +0 -33
- package/concepts/pt-BR/Tool-Read.md +0 -56
- package/concepts/pt-BR/Tool-SendMessage.md +0 -41
- package/concepts/pt-BR/Tool-Skill.md +0 -56
- package/concepts/pt-BR/Tool-Task.md +0 -51
- package/concepts/pt-BR/Tool-TaskCreate.md +0 -78
- package/concepts/pt-BR/Tool-TaskGet.md +0 -56
- package/concepts/pt-BR/Tool-TaskList.md +0 -56
- package/concepts/pt-BR/Tool-TaskOutput.md +0 -40
- package/concepts/pt-BR/Tool-TaskStop.md +0 -32
- package/concepts/pt-BR/Tool-TaskUpdate.md +0 -123
- package/concepts/pt-BR/Tool-TeamCreate.md +0 -38
- package/concepts/pt-BR/Tool-TeamDelete.md +0 -30
- package/concepts/pt-BR/Tool-WebFetch.md +0 -55
- package/concepts/pt-BR/Tool-WebSearch.md +0 -58
- package/concepts/pt-BR/Tool-Write.md +0 -39
- package/concepts/pt-BR/Tool-executeCode.md +0 -41
- package/concepts/pt-BR/Tool-getDiagnostics.md +0 -32
- package/concepts/pt-BR/Tools.md +0 -67
- package/concepts/ru/CacheRebuild.md +0 -36
- package/concepts/ru/KVCacheContent.md +0 -49
- package/concepts/ru/Tool-Agent.md +0 -125
- package/concepts/ru/Tool-AskUserQuestion.md +0 -75
- package/concepts/ru/Tool-Bash.md +0 -167
- package/concepts/ru/Tool-Edit.md +0 -46
- package/concepts/ru/Tool-EnterPlanMode.md +0 -128
- package/concepts/ru/Tool-EnterWorktree.md +0 -56
- package/concepts/ru/Tool-ExitPlanMode.md +0 -62
- package/concepts/ru/Tool-Glob.md +0 -39
- package/concepts/ru/Tool-Grep.md +0 -57
- package/concepts/ru/Tool-NotebookEdit.md +0 -33
- package/concepts/ru/Tool-Read.md +0 -56
- package/concepts/ru/Tool-SendMessage.md +0 -41
- package/concepts/ru/Tool-Skill.md +0 -56
- package/concepts/ru/Tool-Task.md +0 -51
- package/concepts/ru/Tool-TaskCreate.md +0 -78
- package/concepts/ru/Tool-TaskGet.md +0 -56
- package/concepts/ru/Tool-TaskList.md +0 -56
- package/concepts/ru/Tool-TaskOutput.md +0 -40
- package/concepts/ru/Tool-TaskStop.md +0 -32
- package/concepts/ru/Tool-TaskUpdate.md +0 -123
- package/concepts/ru/Tool-TeamCreate.md +0 -38
- package/concepts/ru/Tool-TeamDelete.md +0 -30
- package/concepts/ru/Tool-WebFetch.md +0 -55
- package/concepts/ru/Tool-WebSearch.md +0 -58
- package/concepts/ru/Tool-Write.md +0 -39
- package/concepts/ru/Tool-executeCode.md +0 -41
- package/concepts/ru/Tool-getDiagnostics.md +0 -32
- package/concepts/ru/Tools.md +0 -67
- package/concepts/th/CacheRebuild.md +0 -36
- package/concepts/th/KVCacheContent.md +0 -49
- package/concepts/th/Tool-Agent.md +0 -125
- package/concepts/th/Tool-AskUserQuestion.md +0 -75
- package/concepts/th/Tool-Bash.md +0 -167
- package/concepts/th/Tool-Edit.md +0 -46
- package/concepts/th/Tool-EnterPlanMode.md +0 -128
- package/concepts/th/Tool-EnterWorktree.md +0 -56
- package/concepts/th/Tool-ExitPlanMode.md +0 -62
- package/concepts/th/Tool-Glob.md +0 -39
- package/concepts/th/Tool-Grep.md +0 -57
- package/concepts/th/Tool-NotebookEdit.md +0 -33
- package/concepts/th/Tool-Read.md +0 -56
- package/concepts/th/Tool-SendMessage.md +0 -41
- package/concepts/th/Tool-Skill.md +0 -56
- package/concepts/th/Tool-Task.md +0 -51
- package/concepts/th/Tool-TaskCreate.md +0 -78
- package/concepts/th/Tool-TaskGet.md +0 -56
- package/concepts/th/Tool-TaskList.md +0 -56
- package/concepts/th/Tool-TaskOutput.md +0 -40
- package/concepts/th/Tool-TaskStop.md +0 -32
- package/concepts/th/Tool-TaskUpdate.md +0 -123
- package/concepts/th/Tool-TeamCreate.md +0 -38
- package/concepts/th/Tool-TeamDelete.md +0 -30
- package/concepts/th/Tool-WebFetch.md +0 -55
- package/concepts/th/Tool-WebSearch.md +0 -58
- package/concepts/th/Tool-Write.md +0 -39
- package/concepts/th/Tool-executeCode.md +0 -41
- package/concepts/th/Tool-getDiagnostics.md +0 -32
- package/concepts/th/Tools.md +0 -67
- package/concepts/tr/CacheRebuild.md +0 -36
- package/concepts/tr/KVCacheContent.md +0 -49
- package/concepts/tr/Tool-Agent.md +0 -125
- package/concepts/tr/Tool-AskUserQuestion.md +0 -75
- package/concepts/tr/Tool-Bash.md +0 -167
- package/concepts/tr/Tool-Edit.md +0 -46
- package/concepts/tr/Tool-EnterPlanMode.md +0 -128
- package/concepts/tr/Tool-EnterWorktree.md +0 -56
- package/concepts/tr/Tool-ExitPlanMode.md +0 -62
- package/concepts/tr/Tool-Glob.md +0 -39
- package/concepts/tr/Tool-Grep.md +0 -57
- package/concepts/tr/Tool-NotebookEdit.md +0 -33
- package/concepts/tr/Tool-Read.md +0 -56
- package/concepts/tr/Tool-SendMessage.md +0 -41
- package/concepts/tr/Tool-Skill.md +0 -56
- package/concepts/tr/Tool-Task.md +0 -51
- package/concepts/tr/Tool-TaskCreate.md +0 -78
- package/concepts/tr/Tool-TaskGet.md +0 -56
- package/concepts/tr/Tool-TaskList.md +0 -56
- package/concepts/tr/Tool-TaskOutput.md +0 -40
- package/concepts/tr/Tool-TaskStop.md +0 -32
- package/concepts/tr/Tool-TaskUpdate.md +0 -123
- package/concepts/tr/Tool-TeamCreate.md +0 -38
- package/concepts/tr/Tool-TeamDelete.md +0 -30
- package/concepts/tr/Tool-WebFetch.md +0 -55
- package/concepts/tr/Tool-WebSearch.md +0 -58
- package/concepts/tr/Tool-Write.md +0 -39
- package/concepts/tr/Tool-executeCode.md +0 -41
- package/concepts/tr/Tool-getDiagnostics.md +0 -32
- package/concepts/tr/Tools.md +0 -67
- package/concepts/uk/CacheRebuild.md +0 -36
- package/concepts/uk/KVCacheContent.md +0 -49
- package/concepts/uk/Tool-Agent.md +0 -125
- package/concepts/uk/Tool-AskUserQuestion.md +0 -75
- package/concepts/uk/Tool-Bash.md +0 -167
- package/concepts/uk/Tool-Edit.md +0 -46
- package/concepts/uk/Tool-EnterPlanMode.md +0 -128
- package/concepts/uk/Tool-EnterWorktree.md +0 -56
- package/concepts/uk/Tool-ExitPlanMode.md +0 -62
- package/concepts/uk/Tool-Glob.md +0 -39
- package/concepts/uk/Tool-Grep.md +0 -57
- package/concepts/uk/Tool-NotebookEdit.md +0 -33
- package/concepts/uk/Tool-Read.md +0 -56
- package/concepts/uk/Tool-SendMessage.md +0 -41
- package/concepts/uk/Tool-Skill.md +0 -56
- package/concepts/uk/Tool-Task.md +0 -51
- package/concepts/uk/Tool-TaskCreate.md +0 -78
- package/concepts/uk/Tool-TaskGet.md +0 -56
- package/concepts/uk/Tool-TaskList.md +0 -56
- package/concepts/uk/Tool-TaskOutput.md +0 -40
- package/concepts/uk/Tool-TaskStop.md +0 -32
- package/concepts/uk/Tool-TaskUpdate.md +0 -123
- package/concepts/uk/Tool-TeamCreate.md +0 -38
- package/concepts/uk/Tool-TeamDelete.md +0 -30
- package/concepts/uk/Tool-WebFetch.md +0 -55
- package/concepts/uk/Tool-WebSearch.md +0 -58
- package/concepts/uk/Tool-Write.md +0 -39
- package/concepts/uk/Tool-executeCode.md +0 -41
- package/concepts/uk/Tool-getDiagnostics.md +0 -32
- package/concepts/uk/Tools.md +0 -67
- package/concepts/zh/CacheRebuild.md +0 -36
- package/concepts/zh/KVCacheContent.md +0 -49
- package/concepts/zh/Tool-Agent.md +0 -125
- package/concepts/zh/Tool-AskUserQuestion.md +0 -75
- package/concepts/zh/Tool-Bash.md +0 -167
- package/concepts/zh/Tool-Edit.md +0 -46
- package/concepts/zh/Tool-EnterPlanMode.md +0 -128
- package/concepts/zh/Tool-EnterWorktree.md +0 -56
- package/concepts/zh/Tool-ExitPlanMode.md +0 -62
- package/concepts/zh/Tool-Glob.md +0 -39
- package/concepts/zh/Tool-Grep.md +0 -57
- package/concepts/zh/Tool-NotebookEdit.md +0 -33
- package/concepts/zh/Tool-Read.md +0 -56
- package/concepts/zh/Tool-SendMessage.md +0 -41
- package/concepts/zh/Tool-Skill.md +0 -56
- package/concepts/zh/Tool-Task.md +0 -51
- package/concepts/zh/Tool-TaskCreate.md +0 -78
- package/concepts/zh/Tool-TaskGet.md +0 -56
- package/concepts/zh/Tool-TaskList.md +0 -56
- package/concepts/zh/Tool-TaskOutput.md +0 -40
- package/concepts/zh/Tool-TaskStop.md +0 -32
- package/concepts/zh/Tool-TaskUpdate.md +0 -123
- package/concepts/zh/Tool-TeamCreate.md +0 -38
- package/concepts/zh/Tool-TeamDelete.md +0 -30
- package/concepts/zh/Tool-WebFetch.md +0 -55
- package/concepts/zh/Tool-WebSearch.md +0 -58
- package/concepts/zh/Tool-Write.md +0 -39
- package/concepts/zh/Tool-executeCode.md +0 -41
- package/concepts/zh/Tool-getDiagnostics.md +0 -32
- package/concepts/zh-TW/CacheRebuild.md +0 -36
- package/concepts/zh-TW/KVCacheContent.md +0 -49
- package/concepts/zh-TW/Tool-Agent.md +0 -125
- package/concepts/zh-TW/Tool-AskUserQuestion.md +0 -75
- package/concepts/zh-TW/Tool-Bash.md +0 -167
- package/concepts/zh-TW/Tool-Edit.md +0 -46
- package/concepts/zh-TW/Tool-EnterPlanMode.md +0 -128
- package/concepts/zh-TW/Tool-EnterWorktree.md +0 -56
- package/concepts/zh-TW/Tool-ExitPlanMode.md +0 -62
- package/concepts/zh-TW/Tool-Glob.md +0 -39
- package/concepts/zh-TW/Tool-Grep.md +0 -57
- package/concepts/zh-TW/Tool-NotebookEdit.md +0 -33
- package/concepts/zh-TW/Tool-Read.md +0 -56
- package/concepts/zh-TW/Tool-SendMessage.md +0 -41
- package/concepts/zh-TW/Tool-Skill.md +0 -56
- package/concepts/zh-TW/Tool-Task.md +0 -51
- package/concepts/zh-TW/Tool-TaskCreate.md +0 -78
- package/concepts/zh-TW/Tool-TaskGet.md +0 -56
- package/concepts/zh-TW/Tool-TaskList.md +0 -56
- package/concepts/zh-TW/Tool-TaskOutput.md +0 -40
- package/concepts/zh-TW/Tool-TaskStop.md +0 -32
- package/concepts/zh-TW/Tool-TaskUpdate.md +0 -123
- package/concepts/zh-TW/Tool-TeamCreate.md +0 -38
- package/concepts/zh-TW/Tool-TeamDelete.md +0 -30
- package/concepts/zh-TW/Tool-WebFetch.md +0 -55
- package/concepts/zh-TW/Tool-WebSearch.md +0 -58
- package/concepts/zh-TW/Tool-Write.md +0 -39
- package/concepts/zh-TW/Tool-executeCode.md +0 -41
- package/concepts/zh-TW/Tool-getDiagnostics.md +0 -32
- package/concepts/zh-TW/Tools.md +0 -67
- package/dist/assets/App-BN2YmKSu.js +0 -41
- package/dist/assets/App-fG2r3jFq.css +0 -1
- package/dist/assets/AppHeader-BqUGBbBx.css +0 -41
- package/dist/assets/AppHeader.module-CvH9GQQ2.js +0 -1250
- package/dist/assets/Mobile-BnDkLcBv.css +0 -1
- package/dist/assets/Mobile-CbC8YD3O.js +0 -10
- package/dist/assets/_baseUniq-B2ddYY2A.js +0 -1
- package/dist/assets/arc-DFPOHgcd.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-1tuXixQv.js +0 -36
- package/dist/assets/blockDiagram-DXYQGD6D-BfVKQPAV.js +0 -132
- package/dist/assets/c4Diagram-AHTNJAMY-Bua8O4-1.js +0 -10
- package/dist/assets/channel-Cf9uPxYW.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-YOIkSNn_.js +0 -1
- package/dist/assets/chunk-4TB4RGXK-CjZt-To5.js +0 -206
- package/dist/assets/chunk-55IACEB6-BAEfMF5S.js +0 -1
- package/dist/assets/chunk-EDXVE4YY-BUYDmLXU.js +0 -1
- package/dist/assets/chunk-FMBD7UC4-Cw_LDap-.js +0 -15
- package/dist/assets/chunk-OYMX7WX6-PlfZFFxd.js +0 -231
- package/dist/assets/chunk-QZHKN3VN-C2ReFZl_.js +0 -1
- package/dist/assets/chunk-YZCP3GAM-B7IVGkPB.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-DdwVeNLZ.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-DdwVeNLZ.js +0 -1
- package/dist/assets/clone-C8Lz0121.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-M6rBKf0y.js +0 -1
- package/dist/assets/cytoscape.esm-DxGcaOPV.js +0 -331
- package/dist/assets/dagre-KV5264BT-UPacTWnL.js +0 -4
- package/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/dist/assets/diagram-5BDNPKRD-Cjjtnh0e.js +0 -10
- package/dist/assets/diagram-G4DWMVQ6-CjXILMP0.js +0 -24
- package/dist/assets/diagram-MMDJMWI5-C_-XZ9gc.js +0 -43
- package/dist/assets/diagram-TYMM5635-Dxe2GxUR.js +0 -24
- package/dist/assets/erDiagram-SMLLAGMA-1w-wtgMd.js +0 -85
- package/dist/assets/flowDiagram-DWJPFMVM-B9naMGCj.js +0 -162
- package/dist/assets/ganttDiagram-T4ZO3ILL-BPZBdhPv.js +0 -292
- package/dist/assets/gitGraphDiagram-UUTBAWPF-_P9PdiGG.js +0 -106
- package/dist/assets/graph-CjOY8lRz.js +0 -1
- package/dist/assets/html2canvas.esm-QH1iLAAe.js +0 -22
- package/dist/assets/index-BcCW9op4.js +0 -41
- package/dist/assets/index-DCtZ2KSX.css +0 -1
- package/dist/assets/infoDiagram-42DDH7IO-Ch8SOTtq.js +0 -2
- package/dist/assets/init-Gi6I4Gst.js +0 -1
- package/dist/assets/ishikawaDiagram-UXIWVN3A-XLscQrJT.js +0 -70
- package/dist/assets/journeyDiagram-VCZTEJTY-C3FQ_QPk.js +0 -139
- package/dist/assets/kanban-definition-6JOO6SKY-DIQDTOi3.js +0 -89
- package/dist/assets/katex-DkKDou_j.js +0 -257
- package/dist/assets/layout-DO9W0X_b.js +0 -1
- package/dist/assets/linear-ClCJqwn1.js +0 -1
- package/dist/assets/mermaid.core-BW02B1TS.js +0 -308
- package/dist/assets/min-BuzClhio.js +0 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-DuCaTeZu.js +0 -96
- package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-BZoZ6CI1.js +0 -30
- package/dist/assets/quadrantDiagram-34T5L4WZ-DFNwvtmc.js +0 -7
- package/dist/assets/requirementDiagram-MS252O5E-DPG-7raV.js +0 -84
- package/dist/assets/sankeyDiagram-XADWPNL6-Bp92e1ie.js +0 -10
- package/dist/assets/sequenceDiagram-FGHM5R23-C6ADwqJY.js +0 -157
- package/dist/assets/stateDiagram-FHFEXIEX-BfrwZGmF.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-4gBW7EPI.js +0 -1
- package/dist/assets/timeline-definition-GMOUNBTQ-Bb-TxYx2.js +0 -120
- package/dist/assets/vennDiagram-DHZGUBPP-DTRiNXJu.js +0 -34
- package/dist/assets/wardley-RL74JXVD-C8j_kjXS.js +0 -162
- package/dist/assets/wardleyDiagram-NUSXRM2D-CvICMc3N.js +0 -20
- package/dist/assets/xychartDiagram-5P7HB3ND-DI0bBGwq.js +0 -7
- package/lib/kv-cache-analyzer.js +0 -164
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Guard: reject raw C0 control bytes (except TAB / LF / CR) and DEL in tracked text source.
|
|
4
|
+
*
|
|
5
|
+
* Why this exists: a single stray control byte — most notably NUL (0x00) — makes the ENTIRE file
|
|
6
|
+
* be classified as "binary" by grep/ripgrep (so `grep -I` / `rg` silently skip it), by editor
|
|
7
|
+
* global-search, and by code-review diff tools. A file can then become invisible to search while
|
|
8
|
+
* looking completely normal when opened. We hit exactly this: a NUL used as a delimiter in
|
|
9
|
+
* `ChatView.jsx` hid the whole file from grep for an entire debugging session.
|
|
10
|
+
*
|
|
11
|
+
* The fix is free: write control characters as escapes in the source (e.g. `\x00`, `\x01`, `\x1b`).
|
|
12
|
+
* The JS parser turns the escape into the same byte at runtime, so behaviour is byte-identical,
|
|
13
|
+
* but the source file stays pure text and remains searchable by every tool.
|
|
14
|
+
*
|
|
15
|
+
* Scans git-tracked files with a code/text extension; skips build output and binary assets.
|
|
16
|
+
* If git is unavailable or this is not a git work tree (extracted tarball, clean-room CI), the
|
|
17
|
+
* check skips gracefully (exit 0) rather than breaking `npm test`.
|
|
18
|
+
* Exit 0 = clean (or skipped), exit 1 = violations (printed as path:line:col (offset) + byte).
|
|
19
|
+
*
|
|
20
|
+
* Invoked as a pretest hook via package.json "pretest" to ensure the codebase stays
|
|
21
|
+
* grep-friendly.
|
|
22
|
+
*/
|
|
23
|
+
import { execSync } from 'node:child_process';
|
|
24
|
+
import { readFileSync } from 'node:fs';
|
|
25
|
+
import { pathToFileURL } from 'node:url';
|
|
26
|
+
|
|
27
|
+
// Only scan real source / docs / config. Binary assets (mp3, png, icns, fonts, …) are excluded by
|
|
28
|
+
// simply not being on this list, so we never false-positive on legitimately-binary files.
|
|
29
|
+
export const TEXT_EXT = new Set([
|
|
30
|
+
'js', 'jsx', 'mjs', 'cjs', 'ts', 'tsx',
|
|
31
|
+
'css', 'scss', 'less',
|
|
32
|
+
'json', 'jsonc', 'html', 'htm',
|
|
33
|
+
'md', 'markdown', 'txt',
|
|
34
|
+
'sh', 'bash', 'zsh',
|
|
35
|
+
'yml', 'yaml', 'vue',
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
// Build output / generated dirs are not source — don't scan them.
|
|
39
|
+
export const SKIP_PREFIX = ['dist/', 'build/', 'node_modules/'];
|
|
40
|
+
|
|
41
|
+
// Allowed control bytes: TAB (0x09), LF (0x0a), CR (0x0d). Forbidden: every other C0 byte + DEL.
|
|
42
|
+
export const isForbidden = (b) =>
|
|
43
|
+
b <= 0x08 || b === 0x0b || b === 0x0c || (b >= 0x0e && b <= 0x1f) || b === 0x7f;
|
|
44
|
+
|
|
45
|
+
export const extOf = (f) => {
|
|
46
|
+
const m = f.toLowerCase().match(/\.([^./]+)$/);
|
|
47
|
+
return m ? m[1] : '';
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @returns {string[]|null} source text files to scan (tracked + untracked-but-not-ignored),
|
|
52
|
+
* or null if not a git work tree / git missing.
|
|
53
|
+
*/
|
|
54
|
+
export function listScannableTextFiles() {
|
|
55
|
+
let tracked, untracked;
|
|
56
|
+
try {
|
|
57
|
+
tracked = execSync('git ls-files', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });
|
|
58
|
+
// Also scan untracked-but-not-ignored files: a stray control byte is almost always introduced
|
|
59
|
+
// in a NEW or freshly-edited file, and `git ls-files` (tracked only) would skip it until the
|
|
60
|
+
// file is `git add`-ed — exactly the case this guard most needs to catch.
|
|
61
|
+
untracked = execSync('git ls-files --others --exclude-standard', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });
|
|
62
|
+
} catch {
|
|
63
|
+
return null; // git unavailable or not inside a git work tree
|
|
64
|
+
}
|
|
65
|
+
const all = (tracked + '\n' + untracked).split('\n').filter(Boolean);
|
|
66
|
+
return [...new Set(all)]
|
|
67
|
+
.filter((f) => !SKIP_PREFIX.some((p) => f.startsWith(p)))
|
|
68
|
+
.filter((f) => TEXT_EXT.has(extOf(f)));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @returns {{line:number, col:number, offset:number, byte:number}[]} forbidden-byte hits in a file.
|
|
73
|
+
*/
|
|
74
|
+
export function scanFile(path) {
|
|
75
|
+
let buf;
|
|
76
|
+
try {
|
|
77
|
+
buf = readFileSync(path);
|
|
78
|
+
} catch {
|
|
79
|
+
return [];
|
|
80
|
+
}
|
|
81
|
+
const hits = [];
|
|
82
|
+
let line = 1;
|
|
83
|
+
let col = 0;
|
|
84
|
+
for (let i = 0; i < buf.length; i++) {
|
|
85
|
+
const b = buf[i];
|
|
86
|
+
if (b === 0x0a) {
|
|
87
|
+
line++;
|
|
88
|
+
col = 0;
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
col++;
|
|
92
|
+
if (isForbidden(b)) hits.push({ line, col, offset: i, byte: b });
|
|
93
|
+
}
|
|
94
|
+
return hits;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function main() {
|
|
98
|
+
const files = listScannableTextFiles();
|
|
99
|
+
if (files === null) {
|
|
100
|
+
console.warn('⚠ check-no-control-bytes: not a git work tree / git unavailable — skipping.');
|
|
101
|
+
process.exit(0);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const violations = [];
|
|
105
|
+
for (const f of files) {
|
|
106
|
+
for (const h of scanFile(f)) {
|
|
107
|
+
const hex = h.byte.toString(16).padStart(2, '0').toUpperCase();
|
|
108
|
+
violations.push(`${f}:${h.line}:${h.col} (offset ${h.offset}) raw byte 0x${hex}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (violations.length > 0) {
|
|
113
|
+
console.error('✗ raw control byte(s) found in tracked source:');
|
|
114
|
+
for (const v of violations) console.error(' ' + v);
|
|
115
|
+
console.error(
|
|
116
|
+
`\n${violations.length} violation(s). A NUL/control byte makes the file be treated as binary ` +
|
|
117
|
+
`(grep -I / ripgrep / editor search will silently skip it).\n` +
|
|
118
|
+
`Write the character as an escape instead — e.g. \\x00, \\x01, \\x1b — same runtime value, searchable source.`,
|
|
119
|
+
);
|
|
120
|
+
process.exit(1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
console.log(`✓ no raw control bytes in ${files.length} tracked text files`);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Run the check only when invoked directly (e.g. `node scripts/check-no-control-bytes.js`),
|
|
127
|
+
// so unit tests can import the helpers above without triggering the scan / process.exit.
|
|
128
|
+
if (import.meta.url === pathToFileURL(process.argv[1] || '').href) {
|
|
129
|
+
main();
|
|
130
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# 签名配置检查工具
|
|
4
|
+
|
|
5
|
+
echo "🔍 CX Viewer 签名配置检查"
|
|
6
|
+
echo "================================"
|
|
7
|
+
echo ""
|
|
8
|
+
|
|
9
|
+
# 检查证书
|
|
10
|
+
echo "1️⃣ 检查代码签名证书..."
|
|
11
|
+
IDENTITIES=$(security find-identity -v -p codesigning | grep "Developer ID Application")
|
|
12
|
+
|
|
13
|
+
if [ -z "$IDENTITIES" ]; then
|
|
14
|
+
echo " ❌ 未找到 Developer ID Application 证书"
|
|
15
|
+
echo " 📖 请在 Apple Developer 账户中申请 Developer ID Application 证书"
|
|
16
|
+
echo ""
|
|
17
|
+
else
|
|
18
|
+
echo " ✅ 找到证书:"
|
|
19
|
+
echo "$IDENTITIES" | sed 's/^/ /'
|
|
20
|
+
echo ""
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# 检查环境变量
|
|
24
|
+
echo "2️⃣ 检查环境变量配置..."
|
|
25
|
+
echo ""
|
|
26
|
+
|
|
27
|
+
check_env() {
|
|
28
|
+
local var_name=$1
|
|
29
|
+
local display_name=$2
|
|
30
|
+
local is_required=$3
|
|
31
|
+
|
|
32
|
+
if [ -n "${!var_name}" ]; then
|
|
33
|
+
echo " ✅ $display_name: 已设置"
|
|
34
|
+
else
|
|
35
|
+
if [ "$is_required" = "true" ]; then
|
|
36
|
+
echo " ❌ $display_name: 未设置 (必需)"
|
|
37
|
+
else
|
|
38
|
+
echo " ⚠️ $display_name: 未设置 (可选,用于公证)"
|
|
39
|
+
fi
|
|
40
|
+
fi
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
echo " 签名配置:"
|
|
44
|
+
check_env "CSC_LINK" "CSC_LINK (证书路径)" "true"
|
|
45
|
+
check_env "CSC_KEY_PASSWORD" "CSC_KEY_PASSWORD (证书密码)" "true"
|
|
46
|
+
|
|
47
|
+
echo ""
|
|
48
|
+
echo " 公证配置:"
|
|
49
|
+
check_env "APPLE_ID" "APPLE_ID" "false"
|
|
50
|
+
check_env "APPLE_APP_SPECIFIC_PASSWORD" "APPLE_APP_SPECIFIC_PASSWORD" "false"
|
|
51
|
+
check_env "APPLE_TEAM_ID" "APPLE_TEAM_ID" "false"
|
|
52
|
+
|
|
53
|
+
echo ""
|
|
54
|
+
|
|
55
|
+
# 检查证书文件
|
|
56
|
+
if [ -n "$CSC_LINK" ]; then
|
|
57
|
+
echo "3️⃣ 检查证书文件..."
|
|
58
|
+
if [ -f "$CSC_LINK" ]; then
|
|
59
|
+
echo " ✅ 证书文件存在: $CSC_LINK"
|
|
60
|
+
else
|
|
61
|
+
echo " ❌ 证书文件不存在: $CSC_LINK"
|
|
62
|
+
fi
|
|
63
|
+
echo ""
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# 总结
|
|
67
|
+
echo "================================"
|
|
68
|
+
echo ""
|
|
69
|
+
|
|
70
|
+
if [ -n "$IDENTITIES" ] && [ -n "$CSC_LINK" ] && [ -n "$CSC_KEY_PASSWORD" ]; then
|
|
71
|
+
echo "✅ 签名配置完成!可以执行:"
|
|
72
|
+
echo " npm run electron:build # 仅签名"
|
|
73
|
+
|
|
74
|
+
if [ -n "$APPLE_ID" ] && [ -n "$APPLE_APP_SPECIFIC_PASSWORD" ] && [ -n "$APPLE_TEAM_ID" ]; then
|
|
75
|
+
echo " npm run electron:sign # 签名 + 公证 (推荐)"
|
|
76
|
+
else
|
|
77
|
+
echo ""
|
|
78
|
+
echo "⚠️ 公证配置未完成,应用将仅签名"
|
|
79
|
+
echo " 要启用公证,请设置 APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID"
|
|
80
|
+
fi
|
|
81
|
+
else
|
|
82
|
+
echo "❌ 配置未完成,请设置 CSC_LINK / CSC_KEY_PASSWORD 等环境变量后重试"
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
echo ""
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Generate a chiptune mascot voice pack ("default-pixel-buddy") — 8-bit-style cues
|
|
3
|
+
// covering every voice-pack event — into public/voice-packs/default/.
|
|
4
|
+
//
|
|
5
|
+
// ⚠️ The pack CURRENTLY shipped in that dir is a different, hand-maintained one
|
|
6
|
+
// ("default-butler", recorded .MP3s). Running this script overwrites it with the
|
|
7
|
+
// chiptune set + rewrites pack.json's name to default-pixel-buddy. To avoid an
|
|
8
|
+
// accidental clobber, this script REFUSES to run when the dir already holds a
|
|
9
|
+
// differently-named pack.json — pass --force to regenerate the chiptune pack anyway.
|
|
10
|
+
//
|
|
11
|
+
// Usage:
|
|
12
|
+
// node scripts/gen-default-voicepack.js [--force]
|
|
13
|
+
|
|
14
|
+
import { writeFileSync, mkdirSync, existsSync, readFileSync } from 'node:fs';
|
|
15
|
+
import { dirname, join } from 'node:path';
|
|
16
|
+
import { fileURLToPath } from 'node:url';
|
|
17
|
+
import { EVENT_KEYS } from '../server/lib/voice-pack-events.js';
|
|
18
|
+
|
|
19
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const OUT_DIR = join(__dirname, '..', 'public', 'voice-packs', 'default');
|
|
21
|
+
|
|
22
|
+
const SAMPLE_RATE = 22050;
|
|
23
|
+
const BITS = 16;
|
|
24
|
+
const CHANNELS = 1;
|
|
25
|
+
const ATTACK_SECONDS = 0.005; // very fast attack — gives chiptune "pluck" character
|
|
26
|
+
const RELEASE_SECONDS = 0.025; // slightly longer release with quadratic curve below
|
|
27
|
+
|
|
28
|
+
// Each pattern is an array of segments:
|
|
29
|
+
// { wave: 'sine'|'square', freq, freqEnd?, ms, vol }
|
|
30
|
+
// freqEnd (optional) glides the pitch linearly from `freq` to `freqEnd` over the
|
|
31
|
+
// segment's duration — that's how "Bi-poop?" gets its rising inquiry inflection
|
|
32
|
+
// and how "Wee-doo~" gets its falling tail.
|
|
33
|
+
//
|
|
34
|
+
// Volumes are deliberately low (≈ 0.20-0.28). Square waves are harmonic-rich
|
|
35
|
+
// and read louder than sines at the same numeric volume.
|
|
36
|
+
const PATTERNS = {
|
|
37
|
+
// "Bi-poop?" — short low chirp, gap, rising "poop?" inquiry
|
|
38
|
+
planApproval: [
|
|
39
|
+
{ wave: 'square', freq: 587, ms: 120, vol: 0.22 },
|
|
40
|
+
{ freq: 0, ms: 50, vol: 0 },
|
|
41
|
+
{ wave: 'square', freq: 659, freqEnd: 880, ms: 200, vol: 0.22 },
|
|
42
|
+
],
|
|
43
|
+
// "Pip pip!" — two identical bouncy chirps, high pitch
|
|
44
|
+
askQuestion: [
|
|
45
|
+
{ wave: 'square', freq: 1175, ms: 75, vol: 0.24 },
|
|
46
|
+
{ freq: 0, ms: 70, vol: 0 },
|
|
47
|
+
{ wave: 'square', freq: 1175, ms: 75, vol: 0.24 },
|
|
48
|
+
],
|
|
49
|
+
// "Wee-doo~ ♪" — descending arpeggio with a glide tail for the satisfied finish.
|
|
50
|
+
// 659Hz 起点是历史值(曾为避让已删除的 timeoutWarning60s 880Hz 警报刻意降调),
|
|
51
|
+
// 现可自由调整;保留是因为现有 default-pack 音色已稳定,不必无故 churn。
|
|
52
|
+
turnEnd: [
|
|
53
|
+
{ wave: 'square', freq: 659, ms: 110, vol: 0.24 },
|
|
54
|
+
{ freq: 0, ms: 30, vol: 0 },
|
|
55
|
+
{ wave: 'square', freq: 523, ms: 110, vol: 0.24 },
|
|
56
|
+
{ freq: 0, ms: 30, vol: 0 },
|
|
57
|
+
{ wave: 'square', freq: 440, freqEnd: 330, ms: 280, vol: 0.24 },
|
|
58
|
+
],
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Defensive: PATTERNS must cover every EVENT_KEYS entry so the bundled default
|
|
62
|
+
// pack is complete. If someone adds a new event to voice-pack-events.js but
|
|
63
|
+
// forgets to add a pattern here, fail loudly at script run time.
|
|
64
|
+
{
|
|
65
|
+
const missing = EVENT_KEYS.filter((k) => !(k in PATTERNS));
|
|
66
|
+
if (missing.length > 0) {
|
|
67
|
+
console.error(`[voice-pack] gen-default-voicepack.js missing PATTERNS for: ${missing.join(', ')}`);
|
|
68
|
+
process.exit(1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Phase-accumulating oscillator with linear pitch glide + AR envelope (fast
|
|
73
|
+
// linear attack, quadratic release). Phase carries across frequency changes
|
|
74
|
+
// inside a segment so glides don't pop at the boundary.
|
|
75
|
+
function buildPcm(pattern) {
|
|
76
|
+
const totalSamples = pattern.reduce((n, seg) => n + Math.round(SAMPLE_RATE * seg.ms / 1000), 0);
|
|
77
|
+
const pcm = Buffer.alloc(totalSamples * 2);
|
|
78
|
+
let cursor = 0;
|
|
79
|
+
let phase = 0;
|
|
80
|
+
for (const seg of pattern) {
|
|
81
|
+
const count = Math.round(SAMPLE_RATE * seg.ms / 1000);
|
|
82
|
+
const attackSamples = Math.min(Math.floor(SAMPLE_RATE * ATTACK_SECONDS), Math.floor(count / 8));
|
|
83
|
+
const releaseSamples = Math.min(Math.floor(SAMPLE_RATE * RELEASE_SECONDS), Math.floor(count / 3));
|
|
84
|
+
const wave = seg.wave || 'sine';
|
|
85
|
+
const freqStart = seg.freq;
|
|
86
|
+
const freqEnd = seg.freqEnd != null ? seg.freqEnd : seg.freq;
|
|
87
|
+
for (let i = 0; i < count; i++) {
|
|
88
|
+
const t = count > 1 ? i / (count - 1) : 0;
|
|
89
|
+
const currentFreq = freqStart + (freqEnd - freqStart) * t;
|
|
90
|
+
// Silence segments still advance the cursor but contribute zero amplitude.
|
|
91
|
+
if (freqStart === 0 && freqEnd === 0) {
|
|
92
|
+
pcm.writeInt16LE(0, cursor); cursor += 2;
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
phase += (2 * Math.PI * currentFreq) / SAMPLE_RATE;
|
|
96
|
+
let sample;
|
|
97
|
+
if (wave === 'square') {
|
|
98
|
+
sample = ((phase % (2 * Math.PI)) < Math.PI) ? 1 : -1;
|
|
99
|
+
} else {
|
|
100
|
+
sample = Math.sin(phase);
|
|
101
|
+
}
|
|
102
|
+
// AR envelope — linear attack, quadratic release (cubic feels too quick;
|
|
103
|
+
// linear release has audible cutoff). Sustain is implicit at peak volume.
|
|
104
|
+
let env = seg.vol;
|
|
105
|
+
if (i < attackSamples) {
|
|
106
|
+
env *= i / attackSamples;
|
|
107
|
+
} else if (i > count - releaseSamples) {
|
|
108
|
+
const rt = (count - i) / releaseSamples;
|
|
109
|
+
env *= rt * rt;
|
|
110
|
+
}
|
|
111
|
+
const v = Math.max(-1, Math.min(1, sample * env)) * 0x7FFF;
|
|
112
|
+
pcm.writeInt16LE(v | 0, cursor);
|
|
113
|
+
cursor += 2;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return pcm;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function buildWav(pcm) {
|
|
120
|
+
const byteRate = SAMPLE_RATE * CHANNELS * BITS / 8;
|
|
121
|
+
const blockAlign = CHANNELS * BITS / 8;
|
|
122
|
+
const header = Buffer.alloc(44);
|
|
123
|
+
header.write('RIFF', 0);
|
|
124
|
+
header.writeUInt32LE(36 + pcm.length, 4);
|
|
125
|
+
header.write('WAVE', 8);
|
|
126
|
+
header.write('fmt ', 12);
|
|
127
|
+
header.writeUInt32LE(16, 16);
|
|
128
|
+
header.writeUInt16LE(1, 20);
|
|
129
|
+
header.writeUInt16LE(CHANNELS, 22);
|
|
130
|
+
header.writeUInt32LE(SAMPLE_RATE, 24);
|
|
131
|
+
header.writeUInt32LE(byteRate, 28);
|
|
132
|
+
header.writeUInt16LE(blockAlign, 32);
|
|
133
|
+
header.writeUInt16LE(BITS, 34);
|
|
134
|
+
header.write('data', 36);
|
|
135
|
+
header.writeUInt32LE(pcm.length, 40);
|
|
136
|
+
return Buffer.concat([header, pcm]);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// 防误覆盖:若目标目录已存在「异名」pack.json(如随仓发布的 default-butler),需显式 --force 才覆盖。
|
|
140
|
+
const FORCE = process.argv.includes('--force');
|
|
141
|
+
const existingPackPath = join(OUT_DIR, 'pack.json');
|
|
142
|
+
if (!FORCE && existsSync(existingPackPath)) {
|
|
143
|
+
let existingName = '';
|
|
144
|
+
try { existingName = JSON.parse(readFileSync(existingPackPath, 'utf-8')).name || ''; } catch { /* 坏文件视为无名,放行 */ }
|
|
145
|
+
if (existingName && existingName !== 'default-pixel-buddy') {
|
|
146
|
+
console.error(`[voice-pack] public/voice-packs/default/ 已存在异名默认包「${existingName}」,本脚本会用 default-pixel-buddy 覆盖它。`);
|
|
147
|
+
console.error('[voice-pack] 如确需重新生成 chiptune 占位包,请加 --force:node scripts/gen-default-voicepack.js --force');
|
|
148
|
+
process.exit(1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
mkdirSync(OUT_DIR, { recursive: true });
|
|
153
|
+
const manifest = {
|
|
154
|
+
name: 'default-pixel-buddy',
|
|
155
|
+
displayName: 'Pixel Buddy · 像素小宠物 (默认)',
|
|
156
|
+
// Intentional chiptune SFX (not silent placeholders); placeholder:false marks them as real audio.
|
|
157
|
+
// Note: the dir's currently-shipped pack is default-butler, not this one (see header).
|
|
158
|
+
placeholder: false,
|
|
159
|
+
events: {},
|
|
160
|
+
// Onomatopoeia table — what each cue is meant to sound like, for anyone
|
|
161
|
+
// generating their own replacements.
|
|
162
|
+
cues: {
|
|
163
|
+
planApproval: 'Bi-poop? (短低 + 上扬"问"句)',
|
|
164
|
+
askQuestion: 'Pip pip! (两短促跳跳)',
|
|
165
|
+
turnEnd: 'Wee-doo~ ♪ (下行小调,满足)',
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
for (const [eventKey, pattern] of Object.entries(PATTERNS)) {
|
|
169
|
+
const wav = buildWav(buildPcm(pattern));
|
|
170
|
+
const path = join(OUT_DIR, `${eventKey}.wav`);
|
|
171
|
+
writeFileSync(path, wav);
|
|
172
|
+
manifest.events[eventKey] = { file: `${eventKey}.wav`, size: wav.length };
|
|
173
|
+
console.log(`[voice-pack] wrote ${path} (${wav.length} bytes)`);
|
|
174
|
+
}
|
|
175
|
+
writeFileSync(join(OUT_DIR, 'pack.json'), JSON.stringify(manifest, null, 2));
|
|
176
|
+
console.log(`[voice-pack] wrote ${join(OUT_DIR, 'pack.json')}`);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# macOS 应用签名和公证脚本
|
|
4
|
+
# 使用前请先运行 scripts/check-sign-config.sh 检查证书与环境变量配置
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
echo "🔐 macOS 应用签名和公证流程"
|
|
9
|
+
echo "================================"
|
|
10
|
+
echo ""
|
|
11
|
+
|
|
12
|
+
# 检查必需的环境变量
|
|
13
|
+
if [ -z "$CSC_LINK" ]; then
|
|
14
|
+
echo "❌ 错误: 缺少 CSC_LINK 环境变量"
|
|
15
|
+
echo " 请设置为你的 .p12 证书文件路径"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
if [ -z "$CSC_KEY_PASSWORD" ]; then
|
|
20
|
+
echo "❌ 错误: 缺少 CSC_KEY_PASSWORD 环境变量"
|
|
21
|
+
echo " 请设置为你的 .p12 证书密码"
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
echo "✅ 证书配置检查通过"
|
|
26
|
+
echo ""
|
|
27
|
+
|
|
28
|
+
# 可选:公证配置检查
|
|
29
|
+
if [ -n "$APPLE_ID" ] && [ -n "$APPLE_APP_SPECIFIC_PASSWORD" ] && [ -n "$APPLE_TEAM_ID" ]; then
|
|
30
|
+
echo "✅ 公证配置检查通过"
|
|
31
|
+
echo " 应用将在签名后自动公证"
|
|
32
|
+
else
|
|
33
|
+
echo "⚠️ 未配置公证参数,将仅签名不公证"
|
|
34
|
+
echo " 如需公证,请设置: APPLE_ID, APPLE_APP_SPECIFIC_PASSWORD, APPLE_TEAM_ID"
|
|
35
|
+
fi
|
|
36
|
+
|
|
37
|
+
echo ""
|
|
38
|
+
echo "📦 开始构建和签名..."
|
|
39
|
+
echo ""
|
|
40
|
+
|
|
41
|
+
# 执行构建
|
|
42
|
+
npm run build && electron-builder --mac
|
|
43
|
+
|
|
44
|
+
echo ""
|
|
45
|
+
echo "✅ 完成!"
|
|
46
|
+
echo ""
|
|
47
|
+
echo "输出目录: electron-dist/"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
|
|
7
|
+
const cacheDir = process.env.NPM_CONFIG_CACHE || join(tmpdir(), 'cx-viewer-npm-cache');
|
|
8
|
+
|
|
9
|
+
// Keep package previews independent from a maintainer's global npm cache state.
|
|
10
|
+
// This avoids false release-check failures caused by root-owned files in ~/.npm.
|
|
11
|
+
const result = spawnSync(
|
|
12
|
+
'npm',
|
|
13
|
+
['pack', '--dry-run', '--cache', cacheDir],
|
|
14
|
+
{
|
|
15
|
+
stdio: 'inherit',
|
|
16
|
+
shell: process.platform === 'win32',
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
process.exit(result.status ?? 1);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// CLIENT-SAFE: no node deps. Imported by src/ — do not add fs/process/node: imports.
|
|
2
|
+
// Approval-modal preferences merge logic.
|
|
3
|
+
//
|
|
4
|
+
// Lives here (not in voice-pack-manager) because it merges *generic* approvalModal
|
|
5
|
+
// fields (modalEnabled, soundEnabled, notifyOnlyWhenHidden) plus the voicePack subtree.
|
|
6
|
+
// voice-pack-manager.js stays focused on the file/audio backing store.
|
|
7
|
+
//
|
|
8
|
+
// Both server/routes/preferences.js (handles POST /api/preferences) and src/AppBase.jsx (hydrate +
|
|
9
|
+
// handleVoicePackChange) use this so the merge contract is single-sourced.
|
|
10
|
+
|
|
11
|
+
import { EVENT_KEYS } from './voice-pack-events.js';
|
|
12
|
+
|
|
13
|
+
// Whitelist guard: only keys from EVENT_KEYS land in the merged events map.
|
|
14
|
+
// Defense-in-depth against a malicious/buggy client posting `{ events: { constructor: ... } }`
|
|
15
|
+
// or other unexpected keys that would persist to preferences.json and surface in
|
|
16
|
+
// dropdown rendering().
|
|
17
|
+
function _filterEvents(events) {
|
|
18
|
+
if (!events || typeof events !== 'object') return {};
|
|
19
|
+
const out = {};
|
|
20
|
+
for (const k of EVENT_KEYS) {
|
|
21
|
+
if (k in events) out[k] = events[k];
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Deep-merge an incoming voicePack patch into the base voicePack subtree.
|
|
28
|
+
* Pure function — no I/O, no reconcile. Caller decides whether to run a
|
|
29
|
+
* reconcile pass over the result.
|
|
30
|
+
*
|
|
31
|
+
* Contract:
|
|
32
|
+
* - top-level fields (enabled, volume, …) shallow-merged
|
|
33
|
+
* - events map merged key-by-key, filtered through EVENT_KEYS whitelist
|
|
34
|
+
* - returns a new object; inputs untouched
|
|
35
|
+
*/
|
|
36
|
+
export function mergeVoicePackInto(baseVP, incVP) {
|
|
37
|
+
const base = (baseVP && typeof baseVP === 'object') ? baseVP : {};
|
|
38
|
+
if (!incVP || typeof incVP !== 'object') {
|
|
39
|
+
// Still pass base.events through the whitelist so persisted-but-stale keys
|
|
40
|
+
// get cleaned up on the next save.
|
|
41
|
+
return { ...base, events: _filterEvents(base.events) };
|
|
42
|
+
}
|
|
43
|
+
const { events: incEvents, ...incRest } = incVP;
|
|
44
|
+
const mergedEvents = {
|
|
45
|
+
..._filterEvents(base.events),
|
|
46
|
+
..._filterEvents(incEvents),
|
|
47
|
+
};
|
|
48
|
+
return { ...base, ...incRest, events: mergedEvents };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Deep-merge an incoming approvalModal patch into the base approvalModal subtree.
|
|
53
|
+
* Top-level approvalModal fields shallow-merge; the voicePack subtree goes
|
|
54
|
+
* through mergeVoicePackInto.
|
|
55
|
+
*
|
|
56
|
+
* `reconcile` is an optional callback `(voicePack) => voicePack` — typically
|
|
57
|
+
* voice-pack-manager.reconcileVoicePackPrefs(logDir, …) — applied to the
|
|
58
|
+
* merged voicePack to strip references to audio ids that no longer exist on disk.
|
|
59
|
+
*/
|
|
60
|
+
export function mergeApprovalModalPrefs(baseAM, incAM, { reconcile = null } = {}) {
|
|
61
|
+
if (!incAM || typeof incAM !== 'object') return baseAM;
|
|
62
|
+
const base = (baseAM && typeof baseAM === 'object') ? baseAM : {};
|
|
63
|
+
const { voicePack: incVP, ...incAMRest } = incAM;
|
|
64
|
+
const merged = { ...base, ...incAMRest };
|
|
65
|
+
if (incVP && typeof incVP === 'object') {
|
|
66
|
+
merged.voicePack = mergeVoicePackInto(base.voicePack, incVP);
|
|
67
|
+
if (typeof reconcile === 'function') {
|
|
68
|
+
merged.voicePack = reconcile(merged.voicePack);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return merged;
|
|
72
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// CLIENT-SAFE: no node deps. Imported by src/ — do not add fs/process/node: imports.
|
|
2
|
+
//
|
|
3
|
+
// 上下文相关规则唯一事实源(前后端同源):
|
|
4
|
+
// - 血条总量固定为 CODEX_CONTEXT_WINDOW_TOKENS
|
|
5
|
+
// - 模型窗口 helper 仅供 workflow 等非血条视图展示模型能力标签
|
|
6
|
+
//
|
|
7
|
+
export const CODEX_CONTEXT_WINDOW_TOKENS = 258000;
|
|
8
|
+
|
|
9
|
+
// [Nk]/[Nm] 显式窗口后缀,如 gpt-5[1m]、codex-large[200k]、[500k]。
|
|
10
|
+
// 显式 opt-in 优先级最高,胜过一切家族规则。
|
|
11
|
+
const SIZE_SUFFIX_RE = /\[(\d+)([km])\]/i;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 解析模型名里的 [Nk]/[Nm] 窗口后缀。
|
|
15
|
+
* @param {string} modelName
|
|
16
|
+
* @returns {number|null} 解析出的窗口 token 数,无后缀返回 null
|
|
17
|
+
*/
|
|
18
|
+
export function parseContextSizeSuffix(modelName) {
|
|
19
|
+
if (!modelName || typeof modelName !== 'string') return null;
|
|
20
|
+
const m = modelName.match(SIZE_SUFFIX_RE);
|
|
21
|
+
if (!m) return null;
|
|
22
|
+
const num = parseInt(m[1], 10);
|
|
23
|
+
return m[2].toLowerCase() === 'm' ? num * 1000000 : num * 1000;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 模型家族 → 窗口档位表(有序,首条命中)。后缀解析在表外先行(见 getModelMaxTokens)。
|
|
27
|
+
// 仅保留稳定且通用的公开模型族粗略估算,避免从旧项目模型名推断 Codex 窗口。
|
|
28
|
+
const MODEL_CONTEXT_SIZES = [
|
|
29
|
+
{ match: /codex/i, tokens: 200000 },
|
|
30
|
+
{ match: /gpt-4o|o1|o3|o4/i, tokens: 128000 },
|
|
31
|
+
{ match: /gpt-4/i, tokens: 128000 },
|
|
32
|
+
{ match: /gpt-3/i, tokens: 16000 },
|
|
33
|
+
{ match: /deepseek/i, tokens: 128000 },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 模型名 → 上下文窗口 token 数。后缀优先,其次家族档位表,默认 200K。
|
|
38
|
+
* @param {string|null|undefined} modelName
|
|
39
|
+
* @returns {number}
|
|
40
|
+
*/
|
|
41
|
+
export function getModelMaxTokens(modelName) {
|
|
42
|
+
if (!modelName) return 200000;
|
|
43
|
+
const suffix = parseContextSizeSuffix(modelName);
|
|
44
|
+
if (suffix) return suffix;
|
|
45
|
+
for (const entry of MODEL_CONTEXT_SIZES) {
|
|
46
|
+
if (entry.match.test(modelName)) return entry.tokens;
|
|
47
|
+
}
|
|
48
|
+
return 200000;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* 输入侧上下文用量(不含 output_tokens)。
|
|
53
|
+
* @param {object|null|undefined} usage
|
|
54
|
+
* @returns {number}
|
|
55
|
+
*/
|
|
56
|
+
export function sumUsageInputTokens(usage) {
|
|
57
|
+
if (!usage) return 0;
|
|
58
|
+
return usage.input_tokens || 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 血条分子统一口径:输入侧 + 末轮 output_tokens,对齐 Codex /context 的
|
|
63
|
+
* "当前上下文占用"语义(末轮回复已进入下一轮上下文)。
|
|
64
|
+
* @param {object|null|undefined} usage
|
|
65
|
+
* @returns {number}
|
|
66
|
+
*/
|
|
67
|
+
export function sumUsageContextTokens(usage) {
|
|
68
|
+
if (!usage) return 0;
|
|
69
|
+
return sumUsageInputTokens(usage) + (usage.output_tokens || 0);
|
|
70
|
+
}
|