odant-work 1.0.92 → 1.0.94
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/#system/package-manifest.json +890 -930
- package/{MODELS/$ai → $server}/$folder/$class/$ai/class.js +12 -11
- package/{MODELS/$ai → $server}/$folder/$class/$ai/handlers/pages/form/system/ai/$handler/class.js +9 -5
- package/$server/$folder/$class/$data/$catalog/$virtual/class.js +1 -0
- package/$server/$folder/$class/$data/$catalog/class.js +1 -0
- package/$server/$folder/$class/$data/$operation/class.js +1 -0
- package/$server/$folder/$class/$data/$register/$account/class.js +1 -0
- package/$server/$folder/$class/$data/$register/class.js +1 -0
- package/$server/$folder/$class/$data/$struct/class.js +1 -0
- package/$server/$folder/$class/$domain/class.js +1 -0
- package/$server/$folder/$class/$domain/handlers/methods/restore/$handler/class.js +5 -5
- package/$server/$folder/$class/$domain/readme.md +1 -1
- package/$server/$folder/$class/$module/$mcp/class.js +343 -0
- package/$server/$folder/$class/$module/$mcp/handlers/pages/form/system/mcp/$handler/class.js +158 -0
- package/{MODELS/$ai/$folder/$class → $server/$folder/$class/$module}/$provider/class.js +2 -1
- package/{MODELS/$ai/$folder/$class → $server/$folder/$class/$module}/$provider/handlers/pages/form/system/ai/$handler/class.js +41 -8
- package/$server/$folder/$class/$module/$provider/readme.md +16 -0
- package/$server/$folder/$class/$module/class.js +8 -399
- package/$server/$folder/$class/$structure/$project/class.js +12 -8
- package/$server/$folder/$class/$structure/{$organization → $project}/handlers/pages/site/$handler/class.js +3 -3
- package/$server/$folder/$class/$structure/$project/readme.md +3 -11
- package/$server/$folder/$class/$structure/$server/class.js +1 -0
- package/$server/$folder/$class/$structure/$server/handlers/methods/distro/$handler/class.js +1 -1
- package/$server/$folder/$class/$structure/$server/handlers/pages/site/$handler/class.js +1 -1
- package/$server/$folder/$class/$structure/$user/class.js +2 -0
- package/$server/$folder/$class/$structure/ai/system.md +1 -1
- package/$server/$folder/$class/$structure/class.js +40 -1
- package/$server/$folder/$class/$structure/handlers/methods/archive/$handler/class.js +3 -3
- package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/chat-task.js +20 -6
- package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/class.js +23 -17
- package/$server/$folder/$class/$structure/handlers/pages/form/system/agent/$handler/class.js +35 -3
- package/$server/$folder/$class/$structure/handlers/pages/form/system/messengers/$handler/class.js +39 -4
- package/$server/$folder/$class/$structure/handlers/pages/form/system/skills/$handler/class.js +256 -0
- package/$server/$folder/$class/$structure/handlers/pages/form/system/staff/$handler/class.js +8 -8
- package/$server/$folder/$class/$structure/handlers/pages/site/$handler/class.js +3 -3
- package/$server/$folder/$class/$structure/handlers/pages/site/$handler/readme.md +1 -1
- package/$server/$folder/$class/$structure/readme.md +4 -4
- package/$server/$folder/$class/$users/class.js +1 -0
- package/$server/$folder/$class/ai/agents/builder.md +2 -2
- package/$server/$folder/$class/ai/agents/org-architect.md +5 -5
- package/$server/$folder/$class/ai/agents/readme.md +2 -2
- package/$server/$folder/$class/ai/agents/schema-validator.md +2 -2
- package/$server/$folder/$class/ai/config.js +3 -3
- package/$server/$folder/$class/ai/readme.md +1 -1
- package/$server/$folder/$class/ai/skills/accounting-design.md +1 -1
- package/$server/$folder/$class/ai/skills/data-modeling.md +1 -1
- package/$server/$folder/$class/ai/skills/import-table.md +1 -1
- package/$server/$folder/$class/ai/skills/org-structure.md +1 -1
- package/$server/$folder/$class/ai/skills/work-scenarios.md +9 -9
- package/$server/$folder/$class/ai/system.md +36 -36
- package/$server/$folder/$class/handlers/pages/form/system/requisites/$handler/class.js +95 -24
- package/$server/$folder/$class/handlers/pages/storage/$handler/class.js +22 -4
- package/$server/$folder/$file/$task/class.js +2 -2
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/class.js +4 -3
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/readme.md +2 -2
- package/$server/$folder/$file/$task/readme.md +1 -1
- package/$server/$folder/handlers/methods/create/$handler/class.js +35 -38
- package/$server/$folder/handlers/pages/form/$handler/class.js +81 -7
- package/$server/$folder/handlers/readme.md +1 -1
- package/$server/$folder/lib/chat-item/chat-item.js +2 -2
- package/$server/$folder/lib/class-picker/class-picker.js +8 -5
- package/$server/$folder/lib/consultant/consultant.js +5 -5
- package/$server/$folder/lib/explorer/explorer.js +2 -1
- package/$server/$folder/lib/icon/icon.js +2 -2
- package/$server/$folder/lib/item-data-grid/readme.md +1 -1
- package/$server/$folder/lib/item-form/readme.md +1 -1
- package/$server/$folder/lib/local-models-transfer/local-models-transfer.js +11 -11
- package/$server/$folder/lib/messenger-settings/messenger-settings.js +2 -2
- package/$server/$folder/lib/node/node.js +65 -36
- package/$server/$folder/lib/prompt-bar/prompt-bar.js +6 -4
- package/$server/$folder/lib/site-loc/site-loc.js +3 -3
- package/$server/$folder/lib/tree/tree.js +74 -30
- package/AGENTS.md +5 -5
- package/MODULES/$domain/$folder/$class/$module/class.js +5 -6
- package/MODULES/$domain/class.js +8 -31
- package/MODULES/$domain/handlers/pages/form/system/mcp/$handler/class.js +385 -3
- package/MODULES/$domain/readme.md +2 -2
- package/MODULES/MCP/.gitkeep +0 -0
- package/MODULES/{DaData → /320/224/320/260/320/275/320/275/321/213/320/265/DaData}/$module/class.js +2 -2
- package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}/$module/class.js +1 -0
- package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}/$module/readme.md +1 -1
- package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/223/320/265/320/276/321/202/320/276/321/207/320/272/320/270/$catalog/class.js +1 -1
- package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/232/320/260/321/200/321/202/320/260/$catalog/class.js +2 -2
- package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/232/320/260/321/200/321/202/320/260/$catalog/handlers/pages/form/map/$handler/class.js +1 -1
- package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/235/320/260/321/201/320/265/320/273/321/221/320/275/320/275/321/213/320/265 /320/277/321/203/320/275/320/272/321/202/321/213/$catalog/class.js" +1 -1
- package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/243/320/273/320/270/321/206/321/213/$catalog/class.js +1 -1
- package/MODULES/{1C → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/1C}/$module/class.js +1 -1
- package/MODULES/{Bitrix24 → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/Bitrix24}/$module/class.js +1 -1
- package/MODULES/{YandexDisk → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/YandexDisk}/$module/class.js +1 -1
- package/MODULES/{Marketplaces/Ozon/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/Ozon/$mcp}/class.js +1 -1
- package/MODULES/{Marketplaces/Wildberries/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/Wildberries/$mcp}/class.js +1 -1
- package/MODULES/{Marketplaces/YandexMarket/$module → /320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213/YandexMarket/$mcp}/class.js +1 -1
- package/{MODELS → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/GigaChat/$provider/readme.md +2 -2
- package/{MODELS → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/Local/$provider/$folder/$class/$ai/class.js +1 -1
- package/{MODELS → MODULES//320/234/320/276/320/264/320/265/320/273/320/270}/Local/$provider/class.js +1 -1
- package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/ai/$handler/class.js +3 -0
- package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/engine/$handler/class.js +445 -0
- package/{MODELS/Local/$provider/handlers/pages/form/system/ai → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/models}/$handler/class.js +10 -164
- package/MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Local/$provider/handlers/pages/form/system/training/$handler/class.js +244 -0
- package/MODULES/{Process/$module/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/readme.md" } +1 -1
- package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/class.js" +3 -3
- package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/gantt/$handler/class.js" +2 -2
- package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/227/320/260/320/264/320/260/321/207/320/270 /320/270 /321/215/321/202/320/260/320/277/321/213/$catalog/handlers/pages/form/scheduler/$handler/class.js" +3 -3
- package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/handlers/pages/form/bpmn/$handler/class.js" +1 -1
- package/MODULES/{Register/$module/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/class.js" } +1 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/objects/$handler/class.js" +3 -0
- package/MODULES/{Register/CATALOGS/$catalog/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/readme.md" } +1 -1
- package/MODULES/{Register/CATALOGS//320/224/320/276/320/263/320/276/320/262/320/276/321/200/321/213/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/224/320/276/320/263/320/276/320/262/320/276/321/200/321/213/$catalog/class.js" } +1 -1
- package/MODULES/{Register/CATALOGS//320/232/320/273/320/270/320/265/320/275/321/202/321/213/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/232/320/273/320/270/320/265/320/275/321/202/321/213/$virtual/class.js" } +2 -2
- package/MODULES/{Register/CATALOGS//320/235/320/276/320/274/320/265/320/275/320/272/320/273/320/260/321/202/321/203/321/200/320/260/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/235/320/276/320/274/320/265/320/275/320/272/320/273/320/260/321/202/321/203/321/200/320/260/$catalog/class.js" } +1 -1
- package/MODULES/{Register/CATALOGS//320/237/320/260/321/200/321/202/320/270/320/270/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/237/320/260/321/200/321/202/320/270/320/270/$catalog/class.js" } +2 -2
- package/MODULES/{Register/CATALOGS//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/270/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/270/$virtual/class.js" } +1 -1
- package/MODULES/{Register/CATALOGS//320/241/320/272/320/273/320/260/320/264/321/213/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/320/272/320/273/320/260/320/264/321/213/$catalog/class.js" } +2 -2
- package/MODULES/{Register/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/$folder/$class/$data/$catalog/$virtual/class.js" } +2 -2
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270//320/222 /320/276/321/202/320/277/321/203/321/201/320/272/320/265/$virtual/class.js" +1 -1
- package/MODULES/{Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/$folder/$class/$data/$catalog/class.js" } +2 -2
- package/MODULES/{Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/230/320/237/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/230/320/237/$catalog/class.js" } +2 -2
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/244/320/270/320/267. /320/273/320/270/321/206/320/260/$catalog/class.js" +2 -2
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213//320/256/321/200. /320/273/320/270/321/206/320/260/$catalog/class.js" +2 -2
- package/MODULES/{Register/CATALOGS//320/242/321/200/320/260/320/275/321/201/320/277/320/276/321/200/321/202/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS//320/242/321/200/320/260/320/275/321/201/320/277/320/276/321/200/321/202/$catalog/class.js" } +2 -2
- package/MODULES/{Register/OPERATIONS/$operation/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/readme.md" } +1 -1
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/224/320/276/321/201/321/202/320/260/320/262/320/272/320/260/$operation/class.js" +22 -0
- package/MODULES/{Register/OPERATIONS//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" } +7 -7
- package/MODULES/{Register/OPERATIONS//320/230/320/275/320/262/320/265/320/275/321/202/320/260/321/200/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/230/320/275/320/262/320/265/320/275/321/202/320/260/321/200/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js" } +9 -9
- package/MODULES/{Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/$folder/$class/$data/$operation/class.js" } +1 -1
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/222/320/265/321/200/320/275/321/203/321/202/321/214 /320/270/320/267 /320/276/321/202/320/277/321/203/321/201/320/272/320/260/$operation/class.js" +14 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/236/321/202/320/277/321/200/320/260/320/262/320/270/321/202/321/214 /320/262 /320/276/321/202/320/277/321/203/321/201/320/272/$operation/class.js" +15 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/237/321/200/320/270/321/221/320/274 /320/275/320/260 /321/200/320/260/320/261/320/276/321/202/321/203/$operation/class.js" +3 -3
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/243/320/262/320/276/320/273/321/214/320/275/320/265/320/275/320/270/320/265/$operation/class.js" +14 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/220/320/262/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /320/276/321/202/321/207/321/221/321/202/$operation/class.js" +17 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/237/320/232/320/236/$operation/class.js" +18 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/240/320/232/320/236/$operation/class.js" +17 -0
- package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/$folder/$class/$data/$operation/class.js" } +1 -1
- package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/227/320/262/320/276/320/275/320/276/320/272/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/227/320/262/320/276/320/275/320/276/320/272/$operation/class.js" } +2 -2
- package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/237/320/270/321/201/321/214/320/274/320/276/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270//320/237/320/270/321/201/321/214/320/274/320/276/$operation/class.js" } +2 -2
- package/MODULES/{Register/OPERATIONS//320/232/320/276/320/274/320/277/320/273/320/265/320/272/321/202/320/260/321/206/320/270/321/217/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/232/320/276/320/274/320/277/320/273/320/265/320/272/321/202/320/260/321/206/320/270/321/217/$operation/class.js" } +14 -14
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/235/320/260/321/207/320/270/321/201/320/273/320/265/320/275/320/270/320/265 /320/260/320/274/320/276/321/200/321/202/320/270/320/267/320/260/321/206/320/270/320/270/$operation/class.js" +3 -3
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /320/236/320/241/$operation/class.js" +30 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/321/200/320/270/320/275/321/217/321/202/320/270/320/265 /320/272 /321/203/321/207/321/221/321/202/321/203 /320/236/320/241/$operation/class.js" +3 -3
- package/MODULES/{Register/OPERATIONS//320/237/320/265/321/200/320/265/320/274/320/265/321/211/320/265/320/275/320/270/320/265/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/265/321/200/320/265/320/274/320/265/321/211/320/265/320/275/320/270/320/265/$operation/class.js" } +7 -7
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/$folder/$class/$data/$operation/class.js" +1 -1
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" +8 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/235/320/224/320/241/$operation/class.js" +1 -1
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/235/320/224/320/244/320/233/$operation/class.js" +1 -1
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/321/203/$operation/class.js" +11 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/241/321/202/321/200/320/260/321/205/320/276/320/262/321/213/320/265 /320/262/320/267/320/275/320/276/321/201/321/213/$operation/class.js" +1 -1
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /321/202/320/276/320/262/320/260/321/200/320/260/$operation/class.js" +9 -9
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202/$operation/$folder/$class/$data/$operation/class.js" +1 -1
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/260/$operation/class.js" +11 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/236/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +11 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/222/321/213/320/277/321/203/321/201/320/272 /320/263/320/276/321/202/320/276/320/262/320/276/320/271 /320/277/321/200/320/276/320/264/321/203/320/272/321/206/320/270/320/270/$operation/class.js" +4 -4
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/237/320/265/321/200/320/265/320/264/320/260/321/207/320/260 /320/274/320/260/321/202/320/265/321/200/320/270/320/260/320/273/320/276/320/262 /320/262 /320/277/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276/$operation/class.js" +4 -4
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276//320/241/320/277/320/270/321/201/320/260/320/275/320/270/320/265 /320/276/320/261/321/211/320/265/321/205/320/276/320/267/321/217/320/271/321/201/321/202/320/262/320/265/320/275/320/275/321/213/321/205 /320/267/320/260/321/202/321/200/320/260/321/202/$operation/class.js" +6 -6
- package/MODULES/{Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/$folder/$class/$data/$operation/class.js" } +5 -5
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +32 -0
- package/MODULES//320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/class.js" +32 -0
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/241/320/277/320/270/321/201/320/260/320/275/320/270/320/265 /320/242/320/234/320/246/$operation/class.js" +6 -6
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/243/321/201/321/202/320/260/320/275/320/276/320/262/320/272/320/260 /320/275/320/276/321/200/320/274/320/260/321/202/320/270/320/262/320/260/$operation/class.js" +4 -4
- package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/244/320/270/320/275/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/321/203/320/273/321/214/321/202/320/260/321/202//320/227/320/260/320/272/321/200/321/213/321/202/320/270/320/265 /320/274/320/265/321/201/321/217/321/206/320/260/$operation/class.js" +2 -2
- package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/readme.md" } +1 -1
- package/MODULES/{Register/REGISTER/$register/ai/skills/register-accounts.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/ai/skills/register-accounts.md" } +1 -1
- package/MODULES/{Register/REGISTER/$register/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/readme.md" } +1 -1
- package/MODULES/{Register/REGISTER/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/01/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/02/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/04/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/04/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/08/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/08/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/10/$account/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/$account/$folder/$class/$data/$register/$account/class.js" } +2 -2
- package/MODULES/{Register/REGISTER/10/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/01/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/10/05/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/05/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/41/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/41/$account/class.js" } +3 -3
- package/MODULES/{Register/REGISTER/43/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/43/$account/class.js" } +2 -2
- package/MODULES/{Register/REGISTER/44/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/44/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/60/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/60/$account/class.js" } +2 -2
- package/MODULES/{Register/REGISTER/62/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/62/$account/class.js" } +2 -2
- package/MODULES/{Register/REGISTER/70/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/70/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/71/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/71/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/73/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/73/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/76/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/76/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/90/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/01/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/90/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/02/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/90/03/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/03/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/91/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/91/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER/94/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/94/$account/class.js" } +2 -2
- package/MODULES/{Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/$folder/$class/$data/$register/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$account/class.js" } +1 -1
- package/MODULES/{Register/REGISTER//320/235/320/276/321/200/320/274/320/260/321/202/320/270/320/262/321/213/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER//320/235/320/276/321/200/320/274/320/260/321/202/320/270/320/262/321/213/$account/class.js" } +2 -2
- package/MODULES/{Register/STRUCTS//320/237/320/260/321/201/320/277/320/276/321/200/321/202/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS//320/237/320/260/321/201/320/277/320/276/321/200/321/202/$struct/class.js" } +2 -2
- package/PROJECTS/$domain/$folder/$class/$structure/$project/class.js +1 -2
- package/PROJECTS/$domain/readme.md +1 -1
- package/package.json +1 -1
- package/run.mjs +11 -0
- package/scripts/agent-eval.mjs +2 -2
- package/scripts/check-architecture.mjs +25 -16
- package/scripts/check-ignored-code.mjs +4 -4
- package/scripts/demo-seed.mjs +7 -7
- package/scripts/import-bis.mjs +133 -133
- package/scripts/import-delovaya.mjs +94 -94
- package/scripts/migrate-tree.mjs +25 -0
- package/sources/client/class.js +1 -1
- package/sources/data/api.js +5 -5
- package/sources/data/classes.js +3 -3
- package/sources/data/db.js +5 -6
- package/sources/data/print.js +2 -2
- package/sources/data/schema.js +5 -5
- package/sources/data/sql-inspector.js +8 -8
- package/sources/host/auto-updater.js +37 -31
- package/sources/host/tree-migration.js +580 -0
- package/sources/host/tree-migration.json +85 -0
- package/sources/host/watch.js +1 -1
- package/sources/modules/agent/extensions.js +57 -30
- package/sources/modules/agent/index.js +31 -18
- package/sources/modules/agent/node-rules.js +100 -51
- package/sources/modules/agent/permissions.js +1 -1
- package/sources/modules/agent/plugins.js +4 -3
- package/sources/modules/agent/scope.js +3 -3
- package/sources/modules/agent/session.js +22 -2
- package/sources/modules/agent/tools/meta.js +2 -2
- package/sources/modules/agent/tools/services.js +8 -2
- package/sources/modules/agent/tools/work/access.js +5 -5
- package/sources/modules/agent/tools/work/classes.js +24 -8
- package/sources/modules/agent/tools/work/common.js +6 -6
- package/sources/modules/agent/tools/work/data.js +2 -2
- package/sources/modules/agent/triggers.js +2 -2
- package/sources/modules/agent/twin-bus.js +5 -5
- package/sources/modules/agent/voice.js +14 -10
- package/sources/modules/kladr/index.js +4 -5
- package/sources/modules/license/index.js +5 -5
- package/sources/modules/notify/index.js +12 -12
- package/sources/modules/rag/embedder.js +3 -3
- package/sources/modules/rag/indexer.js +1 -1
- package/sources/modules/rag/scope.js +3 -3
- package/sources/modules/rag/search.js +1 -1
- package/sources/modules/trainer/dataset.js +11 -9
- package/sources/modules/trainer/halogen.js +46 -46
- package/sources/modules/trainer/huggingface.js +14 -14
- package/sources/modules/trainer/index.js +66 -41
- package/sources/modules/trainer/local-engine.js +26 -20
- package/sources/modules/trainer/paths.js +9 -2
- package/sources/modules/trainer/providers.js +126 -78
- package/sources/modules/trainer/runner.js +42 -19
- package/sources/modules/trainer/transfer.js +8 -8
- package/sources/server/access/gateway.js +1 -1
- package/sources/server/access/links.js +4 -4
- package/sources/server/access/workplaces.js +7 -7
- package/sources/server/chat-threads.js +10 -7
- package/sources/server/class/archive.js +7 -7
- package/sources/server/class/base-template.js +34 -29
- package/sources/server/class/distro.js +42 -34
- package/sources/server/class/module-status.js +380 -0
- package/sources/server/class/scaffold.js +2 -2
- package/sources/server/class/search.js +1 -1
- package/sources/server/class/security.js +24 -14
- package/sources/server/class.js +144 -123
- package/sources/server/folder.js +83 -12
- package/sources/server/logs.js +5 -6
- package/sources/server/node.js +1 -1
- package/sources/server/server.js +2 -0
- package/sources/server/user.js +85 -18
- package/$server/$folder/$class/$data/$catalog/$folder/$class/$data/$catalog/$virtual/class.js +0 -4
- package/$server/$folder/$class/$data/$catalog/$folder/$class/$data/$catalog/class.js +0 -4
- package/$server/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js +0 -4
- package/$server/$folder/$class/$data/$operation/$folder/$class/$data/$operation/class.js +0 -4
- package/$server/$folder/$class/$data/$register/$account/$folder/$class/$data/$register/$account/class.js +0 -4
- package/$server/$folder/$class/$data/$register/$folder/$class/$data/$register/$account/class.js +0 -4
- package/$server/$folder/$class/$data/$register/$folder/$class/$data/$register/class.js +0 -4
- package/$server/$folder/$class/$data/$struct/$folder/$class/$data/$struct/class.js +0 -4
- package/$server/$folder/$class/$domain/$folder/$class/$domain/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$data/$catalog/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$data/$operation/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$data/$register/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$data/$struct/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$domain/class.js +0 -4
- package/$server/$folder/$class/$module/$folder/$class/$module/class.js +0 -4
- package/$server/$folder/$class/$module/handlers/pages/form/system/mcp/$handler/class.js +0 -854
- package/$server/$folder/$class/$structure/$folder/$class/$structure/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$catalog/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$operation/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$register/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$struct/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$domain/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$module/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$structure/$organization/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$structure/class.js +0 -4
- package/$server/$folder/$class/$structure/$organization/class.js +0 -19
- package/$server/$folder/$class/$structure/$organization/icon.png +0 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$catalog/class.js +0 -4
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$operation/class.js +0 -4
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$register/class.js +0 -4
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$struct/class.js +0 -4
- package/$server/$folder/$class/$structure/$project/$folder/$class/$domain/class.js +0 -4
- package/$server/$folder/$class/$structure/$server/$folder/$class/$domain/class.js +0 -4
- package/$server/$folder/$class/$users/$folder/$class/$structure/$user/class.js +0 -4
- package/MODELS/$ai/$folder/$class/$provider/readme.md +0 -16
- package/MODELS/$ai/class.js +0 -169
- package/MODELS/$ai/handlers/pages/form/system/ai/$handler/class.js +0 -168
- package/MODELS/$ai/readme.md +0 -62
- package/MODELS/Local/$provider/handlers/methods/transfer/$handler/class.js +0 -41
- package/MODULES/Marketplaces/$domain/class.js +0 -9
- package/MODULES/Register/OPERATIONS//320/224/320/276/321/201/321/202/320/260/320/262/320/272/320/260/$operation/class.js +0 -22
- package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/222/320/265/321/200/320/275/321/203/321/202/321/214 /320/270/320/267 /320/276/321/202/320/277/321/203/321/201/320/272/320/260/$operation/class.js" +0 -14
- package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/236/321/202/320/277/321/200/320/260/320/262/320/270/321/202/321/214 /320/262 /320/276/321/202/320/277/321/203/321/201/320/272/$operation/class.js" +0 -15
- package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213//320/243/320/262/320/276/320/273/321/214/320/275/320/265/320/275/320/270/320/265/$operation/class.js +0 -14
- package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/220/320/262/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /320/276/321/202/321/207/321/221/321/202/$operation/class.js" +0 -17
- package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/237/320/232/320/236/$operation/class.js +0 -18
- package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260//320/240/320/232/320/236/$operation/class.js +0 -17
- package/MODULES/Register/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/320/265 /320/236/320/241/$operation/class.js" +0 -30
- package/MODULES/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/227/320/260/321/200/320/277/320/273/320/260/321/202/320/260/$operation/class.js" +0 -8
- package/MODULES/Register/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/321/203/$operation/class.js" +0 -11
- package/MODULES/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/260/$operation/class.js" +0 -11
- package/MODULES/Register/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202//320/236/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +0 -11
- package/MODULES/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/222/320/276/320/267/320/262/321/200/320/260/321/202 /320/276/321/202 /320/277/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/217/$operation/class.js" +0 -32
- package/MODULES/Register/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/class.js +0 -32
- package/ORGANIZATIONS/$domain/$folder/$class/$structure/$organization/class.js +0 -5
- package/ORGANIZATIONS/$domain/class.js +0 -5
- package/ORGANIZATIONS/$domain/readme.md +0 -10
- /package/{MODELS/$ai → $server}/$folder/$class/$ai/methods/chat/$method/class.js +0 -0
- /package/$server/$folder/$class/$structure/{$organization → $project}/handlers/pages/form/system/requisites/$handler/class.js +0 -0
- /package/{MODULES/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/objects → $server/$folder/$class/$structure/$user/handlers/pages/form/system/skills}/$handler/class.js +0 -0
- /package/MODULES/{CBR/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/CBR/$module/class.js"} +0 -0
- /package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/232/320/276/320/276/321/200/320/264/320/270/320/275/320/260/321/202/321/213/$struct/class.js" +0 -0
- /package/MODULES/{Geo → /320/224/320/260/320/275/320/275/321/213/320/265/Geo}//320/250/320/265/320/271/320/277/$struct/class.js" +0 -0
- /package/MODULES/{KLADR/$module/$folder/$class/$data/$catalog/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
- /package/MODULES/{KLADR/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/class.js"} +0 -0
- /package/MODULES/{KLADR/$module/handlers/pages/form/kladr/$handler/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/handlers/pages/form/kladr/$handler/class.js"} +0 -0
- /package/MODULES/{KLADR/$module/readme.md → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR/$module/readme.md"} +0 -0
- /package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/237/320/276/320/264/321/200/320/260/320/267/320/264/320/265/320/273/320/265/320/275/320/270/321/217 /320/234/320/222/320/224/$catalog/class.js" +0 -0
- /package/MODULES/{KLADR → /320/224/320/260/320/275/320/275/321/213/320/265/KLADR}//320/240/320/265/320/263/320/270/320/276/320/275/321/213/$catalog/class.js" +0 -0
- /package/MODULES/{RuCalendar/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/RuCalendar/$module/class.js"} +0 -0
- /package/MODULES/{Weather/$module/class.js → /320/224/320/260/320/275/320/275/321/213/320/265/Weather/$module/class.js"} +0 -0
- /package/MODULES/{2GIS/$module/class.js → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/2GIS/$mcp/class.js"} +0 -0
- /package/MODULES/{2GIS/$module/readme.md → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/2GIS/$mcp/readme.md"} +0 -0
- /package/MODULES/{Telegram/$module/class.js → /320/232/320/276/320/275/320/275/320/265/320/272/321/202/320/276/321/200/321/213/Telegram/$module/class.js"} +0 -0
- /package/{MODELS/GigaChat/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/$provider/$folder/$class/$ai/class.js"} +0 -0
- /package/{MODELS/GigaChat/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/$provider/class.js"} +0 -0
- /package/{MODELS/GigaChat/GigaChat 2 Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Lite/$ai/class.js"} +0 -0
- /package/{MODELS/GigaChat/GigaChat 2 Max/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Max/$ai/class.js"} +0 -0
- /package/{MODELS/GigaChat/GigaChat 2 Pro/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat 2 Pro/$ai/class.js"} +0 -0
- /package/{MODELS/GigaChat/GigaChat Embeddings/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/GigaChat/GigaChat Embeddings/$ai/class.js"} +0 -0
- /package/{MODELS/MTS-AI/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/$provider/$folder/$class/$ai/class.js"} +0 -0
- /package/{MODELS/MTS-AI/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/$provider/class.js"} +0 -0
- /package/{MODELS/MTS-AI/Cotype Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Lite/$ai/class.js"} +0 -0
- /package/{MODELS/MTS-AI/Cotype Pro 2/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Pro 2/$ai/class.js"} +0 -0
- /package/{MODELS/MTS-AI/Cotype Vision/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/MTS-AI/Cotype Vision/$ai/class.js"} +0 -0
- /package/{MODELS/T-Bank/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/$provider/$folder/$class/$ai/class.js"} +0 -0
- /package/{MODELS/T-Bank/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/$provider/class.js"} +0 -0
- /package/{MODELS/T-Bank/T-Lite 2.0/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-Lite 2.0/$ai/class.js"} +0 -0
- /package/{MODELS/T-Bank/T-Pro 2.0/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-Pro 2.0/$ai/class.js"} +0 -0
- /package/{MODELS/T-Bank/T-VoiceKit ASR/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-VoiceKit ASR/$ai/class.js"} +0 -0
- /package/{MODELS/T-Bank/T-VoiceKit TTS/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/T-Bank/T-VoiceKit TTS/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/$provider/$folder/$class/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/$provider/$folder/$class/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/$provider/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/$provider/class.js"} +0 -0
- /package/{MODELS/Yandex/Alice AI (YandexGPT 5 Pro)/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Alice AI (YandexGPT 5 Pro)/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/Yandex Embeddings/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex Embeddings/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/Yandex SpeechKit ASR/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex SpeechKit ASR/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/Yandex SpeechKit TTS/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/Yandex SpeechKit TTS/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/YandexART/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexART/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/YandexGPT 5 Lite/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexGPT 5 Lite/$ai/class.js"} +0 -0
- /package/{MODELS/Yandex/YandexGPT Reasoning/$ai/class.js → MODULES//320/234/320/276/320/264/320/265/320/273/320/270/Yandex/YandexGPT Reasoning/$ai/class.js"} +0 -0
- /package/MODULES/{DuckDuckGo/$module/class.js → /320/237/320/276/320/270/321/201/320/272/DuckDuckGo/$module/class.js"} +0 -0
- /package/MODULES/{SearXNG/$module/class.js → /320/237/320/276/320/270/321/201/320/272/SearXNG/$module/class.js"} +0 -0
- /package/MODULES/{Yandex/$module/class.js → /320/237/320/276/320/270/321/201/320/272/Yandex/$module/class.js"} +0 -0
- /package/MODULES/{Process/$module/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
- /package/MODULES/{Process/$module/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process/$module/class.js"} +0 -0
- /package/MODULES/{Process → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Process}//320/241/321/205/320/265/320/274/321/213 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/320/262/$catalog/class.js" +0 -0
- /package/MODULES/{Register/$module/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$catalog/class.js"} +0 -0
- /package/MODULES/{Register/$module/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$operation/class.js"} +0 -0
- /package/MODULES/{Register/$module/$folder/$class/$data/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$register/class.js"} +0 -0
- /package/MODULES/{Register/$module/$folder/$class/$data/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/$folder/$class/$data/$struct/class.js"} +0 -0
- /package/MODULES/{Register/$module/readme.md → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/$module/readme.md"} +0 -0
- /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js"} +0 -0
- /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/class.js"} +0 -0
- /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/virtual/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/$virtual/handlers/pages/form/virtual/$handler/class.js"} +0 -0
- /package/MODULES/{Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/class.js"} +0 -0
- /package/MODULES/{Register/CATALOGS/$catalog/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/CATALOGS/$catalog/class.js"} +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/222/320/270/320/264/321/213 /320/275/320/276/321/200/320/274/320/260/321/202/320/270/320/262/320/276/320/262/$catalog/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/224/320/276/320/273/320/266/320/275/320/276/321/201/321/202/320/270/$catalog/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/320/276/321/202/321/200/321/203/320/264/320/275/320/270/320/272/320/270/$virtual/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/class.js" +0 -0
- /package/MODULES/{Register/OPERATIONS/$operation/$folder/$class/$data/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/$folder/$class/$data/$operation/class.js"} +0 -0
- /package/MODULES/{Register/OPERATIONS/$operation/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/OPERATIONS/$operation/class.js"} +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/$folder/$class/$data/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/232/320/276/320/274/320/274/321/203/320/275/320/270/320/272/320/260/321/206/320/270/320/270/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/236/321/201/320/275/320/276/320/262/320/275/321/213/320/265 /321/201/321/200/320/265/320/264/321/201/321/202/320/262/320/260/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/$folder/$class/$data/$operation/print//320/237/320/273/320/260/321/202/321/221/320/266/320/275/320/276/320/265 /320/277/320/276/321/200/321/203/321/207/320/265/320/275/320/270/320/265.html" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/273/320/260/321/202/320/265/320/266/320/270 /321/201 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/320/276/320/263/320/276 /321/201/321/207/321/221/321/202/320/260/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/320/276/321/201/321/202/321/203/320/277/320/273/320/265/320/275/320/270/321/217 /320/275/320/260 /321/200/320/260/321/201/321/207/321/221/321/202/320/275/321/213/320/271 /321/201/321/207/321/221/321/202/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/321/201/321/202/320/262/320/276/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217/$operation/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/print//320/241/321/207/321/221/321/202 /320/275/320/260 /320/276/320/277/320/273/320/260/321/202/321/203.html" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/240/320/265/320/260/320/273/320/270/320/267/320/260/321/206/320/270/321/217//320/237/320/276/320/272/321/203/320/277/320/260/321/202/320/265/320/273/321/216/$operation/print//320/242/320/276/320/262/320/260/321/200/320/275/320/260/321/217 /320/275/320/260/320/272/320/273/320/260/320/264/320/275/320/260/321/217.html" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/OPERATIONS//320/244/320/270/320/275/320/260/320/275/321/201/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/321/203/320/273/321/214/321/202/320/260/321/202/$operation/class.js" +0 -0
- /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/analysis/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/analysis/$handler/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/postings/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/postings/$handler/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/turnovers/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/$account/handlers/pages/form/turnovers/$handler/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/$folder/$class/$data/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/$folder/$class/$data/$register/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/handlers/pages/form/journal/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/handlers/pages/form/journal/$handler/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/$register/handlers/pages/form/sheet/$handler/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/$register/handlers/pages/form/sheet/$handler/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/10/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/10/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/19/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/19/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/20/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/20/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/26/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/26/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/50/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/50/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/51/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/51/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/55/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/55/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/58/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/58/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/66/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/66/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/67/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/67/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/68/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/68/01/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/01/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/68/02/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/02/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/68/04/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/68/04/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/69/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/69/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/75/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/75/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/80/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/80/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/84/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/84/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/90/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/90/09/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/90/09/$account/class.js"} +0 -0
- /package/MODULES/{Register/REGISTER/99/$account/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/REGISTER/99/$account/class.js"} +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/320/276/320/262/321/213/320/271 /321/200/320/265/320/267/320/265/321/200/320/262/$account/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/321/213//320/222 /320/276/321/202/320/277/321/203/321/201/320/272/320/265/$account/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/232/320/260/320/264/321/200/321/213//320/240/320/260/320/261/320/276/321/202/320/260/321/216/321/202/$account/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/REGISTER//320/242/320/265/321/205/320/275/320/270/321/207/320/265/321/201/320/272/320/270/320/271/$account/class.js" +0 -0
- /package/MODULES/{Register/STRUCTS/$struct/$folder/$class/$data/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS/$struct/$folder/$class/$data/$struct/class.js"} +0 -0
- /package/MODULES/{Register/STRUCTS/$struct/class.js → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register/STRUCTS/$struct/class.js"} +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/220/320/264/321/200/320/265/321/201/$struct/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/221/320/260/320/275/320/272/320/276/320/262/321/201/320/272/320/270/320/271 /321/201/321/207/321/221/321/202/$struct/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/225/320/264/320/270/320/275/320/270/321/206/320/260 /320/270/320/267/320/274/320/265/321/200/320/265/320/275/320/270/321/217/$struct/class.js" +0 -0
- /package/MODULES/{Register → /320/243/321/207/321/221/321/202 /320/270 /320/277/321/200/320/276/321/206/320/265/321/201/321/201/321/213/Register}/STRUCTS//320/244/320/230/320/236/$struct/class.js" +0 -0
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Безопасная идемпотентная миграция дерева WORK под актуальную архитектуру (v1.0.93+):
|
|
3
|
+
* - перенос старых корней и плоских модулей по группам;
|
|
4
|
+
* - бережное слияние локальных моделей без затирания актуального провайдера;
|
|
5
|
+
* - переписывание путей в текстовых файлах и SQLite work.db.
|
|
6
|
+
*/
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
10
|
+
|
|
11
|
+
const CFG = JSON.parse(fs.readFileSync(new URL('./tree-migration.json', import.meta.url), 'utf8'));
|
|
12
|
+
|
|
13
|
+
export const MODULE_GROUP_MAP = Object.freeze(CFG.moduleGroupMap);
|
|
14
|
+
export const STANDARD_GROUPS = Object.freeze(CFG.standardGroups);
|
|
15
|
+
|
|
16
|
+
const R = CFG.roots;
|
|
17
|
+
const G = CFG.groups;
|
|
18
|
+
const T = CFG.types;
|
|
19
|
+
const RUNTIME_SUBDIRS = new Set(CFG.runtimeSubdirs);
|
|
20
|
+
const OBSOLETE_TYPIZER_DIRS = Array.isArray(CFG.obsoleteTypizerDirs) ? CFG.obsoleteTypizerDirs : [];
|
|
21
|
+
const SKIP_TEXT_DIRS = new Set(['node_modules', '.git', '.svn', '#weights', '#runtime', '#datasets', '#cache', '#tmp', '.RAG', 'logs', 'history']);
|
|
22
|
+
|
|
23
|
+
const escapeRe = (s) => String(s).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
24
|
+
const RE_ORG_PATH = new RegExp(`\\/${escapeRe(R.orgs)}(?=\\/|$|['"\`\\s),;\\]}])`, 'g');
|
|
25
|
+
const RE_ORG_TYPE = new RegExp(`(?<![A-Za-z0-9_])${escapeRe(T.organization)}(?![A-Za-z0-9_])`, 'g');
|
|
26
|
+
const RE_MODELS_PATH = new RegExp(`\\/${escapeRe(R.models)}(?=\\/|$|['"\`\\s),;\\]}])`, 'g');
|
|
27
|
+
const RE_MP_PATH = new RegExp(`\\/${escapeRe(R.modules)}\\/${escapeRe(G.marketplacesOld)}(?=\\/|$|['"\`\\s),;\\]}])`, 'g');
|
|
28
|
+
const MODULE_REWRITE_RULES = Object.entries(MODULE_GROUP_MAP).map(([modId, group]) => ({
|
|
29
|
+
re: new RegExp(`(\\/${escapeRe(R.modules)}\\/)${escapeRe(modId)}(?=\\/|$|['"\`\\s),;\\]}])`, 'g'),
|
|
30
|
+
replacement: `$1${group}/${modId}`,
|
|
31
|
+
}));
|
|
32
|
+
|
|
33
|
+
/** Переписать прежние WORK-пути внутри текста. */
|
|
34
|
+
export function rewriteWorkPaths(text) {
|
|
35
|
+
if (typeof text !== 'string' || !text)
|
|
36
|
+
return text;
|
|
37
|
+
let out = text;
|
|
38
|
+
out = out.replace(RE_ORG_PATH, '/' + R.projects);
|
|
39
|
+
out = out.replace(RE_ORG_TYPE, T.project);
|
|
40
|
+
out = out.replace(RE_MODELS_PATH, `/${R.modules}/${G.models}`);
|
|
41
|
+
out = out.replace(RE_MP_PATH, `/${R.modules}/${G.marketplacesNew}`);
|
|
42
|
+
for (const { re, replacement } of MODULE_REWRITE_RULES)
|
|
43
|
+
out = out.replace(re, replacement);
|
|
44
|
+
return out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function isDirEmptyOrMetaOnly(dir) {
|
|
48
|
+
if (!fs.existsSync(dir))
|
|
49
|
+
return true;
|
|
50
|
+
return fs.readdirSync(dir, { withFileTypes: true }).length === 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function removeIfEmpty(dir, dryRun) {
|
|
54
|
+
if (!fs.existsSync(dir))
|
|
55
|
+
return false;
|
|
56
|
+
try {
|
|
57
|
+
if (fs.readdirSync(dir).length === 0) {
|
|
58
|
+
if (!dryRun)
|
|
59
|
+
fs.rmdirSync(dir);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch { /* ignore */ }
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function mergeDirSafe(src, dst, dryRun, { overwrite = false, skipNames = null } = {}) {
|
|
68
|
+
if (!fs.existsSync(src) || src === dst)
|
|
69
|
+
return false;
|
|
70
|
+
if (dryRun)
|
|
71
|
+
return true;
|
|
72
|
+
|
|
73
|
+
if (!fs.existsSync(dst)) {
|
|
74
|
+
fs.mkdirSync(path.dirname(dst), { recursive: true });
|
|
75
|
+
try {
|
|
76
|
+
fs.renameSync(src, dst);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
fs.cpSync(src, dst, { recursive: true });
|
|
81
|
+
fs.rmSync(src, { recursive: true, force: true });
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
let movedAny = false;
|
|
87
|
+
for (const e of fs.readdirSync(src, { withFileTypes: true })) {
|
|
88
|
+
if (skipNames && skipNames.has(e.name))
|
|
89
|
+
continue;
|
|
90
|
+
const s = path.join(src, e.name);
|
|
91
|
+
const d = path.join(dst, e.name);
|
|
92
|
+
if (e.isDirectory()) {
|
|
93
|
+
if (mergeDirSafe(s, d, dryRun, { overwrite }))
|
|
94
|
+
movedAny = true;
|
|
95
|
+
removeIfEmpty(s, dryRun);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
if (!fs.existsSync(d) || overwrite) {
|
|
99
|
+
fs.mkdirSync(path.dirname(d), { recursive: true });
|
|
100
|
+
try {
|
|
101
|
+
if (fs.existsSync(d))
|
|
102
|
+
fs.rmSync(d, { force: true });
|
|
103
|
+
fs.renameSync(s, d);
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
fs.copyFileSync(s, d);
|
|
107
|
+
fs.rmSync(s, { force: true });
|
|
108
|
+
}
|
|
109
|
+
movedAny = true;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
try {
|
|
113
|
+
const sb = fs.readFileSync(s);
|
|
114
|
+
const db = fs.readFileSync(d);
|
|
115
|
+
if (sb.equals(db))
|
|
116
|
+
fs.rmSync(s, { force: true });
|
|
117
|
+
}
|
|
118
|
+
catch { /* оставляем на месте */ }
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
removeIfEmpty(src, dryRun);
|
|
123
|
+
return movedAny;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function migrateLocalProviderDir(srcLocalDir, dstLocalDir, dryRun) {
|
|
127
|
+
if (!fs.existsSync(srcLocalDir) || srcLocalDir === dstLocalDir)
|
|
128
|
+
return false;
|
|
129
|
+
if (dryRun)
|
|
130
|
+
return true;
|
|
131
|
+
|
|
132
|
+
fs.mkdirSync(dstLocalDir, { recursive: true });
|
|
133
|
+
let changed = false;
|
|
134
|
+
|
|
135
|
+
for (const e of fs.readdirSync(srcLocalDir, { withFileTypes: true })) {
|
|
136
|
+
const s = path.join(srcLocalDir, e.name);
|
|
137
|
+
const d = path.join(dstLocalDir, e.name);
|
|
138
|
+
if (e.name === T.provider) {
|
|
139
|
+
if (fs.existsSync(d)) {
|
|
140
|
+
for (const sub of fs.readdirSync(s, { withFileTypes: true })) {
|
|
141
|
+
if (sub.isDirectory() && RUNTIME_SUBDIRS.has(sub.name)) {
|
|
142
|
+
if (mergeDirSafe(path.join(s, sub.name), path.join(d, sub.name), dryRun))
|
|
143
|
+
changed = true;
|
|
144
|
+
}
|
|
145
|
+
else if (sub.isDirectory()) {
|
|
146
|
+
mergeDirSafe(path.join(s, sub.name), path.join(d, sub.name), dryRun, { overwrite: false });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
for (const sub of fs.readdirSync(s, { withFileTypes: true })) {
|
|
150
|
+
if (!sub.isDirectory() && fs.existsSync(path.join(d, sub.name))) {
|
|
151
|
+
fs.rmSync(path.join(s, sub.name), { force: true });
|
|
152
|
+
}
|
|
153
|
+
else if (sub.name === 'handlers' && fs.existsSync(path.join(d, 'handlers'))) {
|
|
154
|
+
fs.rmSync(path.join(s, sub.name), { recursive: true, force: true });
|
|
155
|
+
}
|
|
156
|
+
else if (sub.name === T.folder && fs.existsSync(path.join(d, T.folder))) {
|
|
157
|
+
fs.rmSync(path.join(s, sub.name), { recursive: true, force: true });
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
removeIfEmpty(s, dryRun);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
mergeDirSafe(s, d, dryRun);
|
|
164
|
+
changed = true;
|
|
165
|
+
}
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
if (e.isDirectory()) {
|
|
169
|
+
if (mergeDirSafe(s, d, dryRun))
|
|
170
|
+
changed = true;
|
|
171
|
+
}
|
|
172
|
+
else if (!fs.existsSync(d)) {
|
|
173
|
+
fs.renameSync(s, d);
|
|
174
|
+
changed = true;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
removeIfEmpty(srcLocalDir, dryRun);
|
|
178
|
+
return changed;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function rewriteTextFilesInDir(dir, dryRun) {
|
|
182
|
+
if (!fs.existsSync(dir))
|
|
183
|
+
return 0;
|
|
184
|
+
let changed = 0;
|
|
185
|
+
const walk = (cur) => {
|
|
186
|
+
for (const e of fs.readdirSync(cur, { withFileTypes: true })) {
|
|
187
|
+
if (SKIP_TEXT_DIRS.has(e.name))
|
|
188
|
+
continue;
|
|
189
|
+
const full = path.join(cur, e.name);
|
|
190
|
+
if (e.isDirectory()) {
|
|
191
|
+
walk(full);
|
|
192
|
+
}
|
|
193
|
+
else if (/\.(js|mjs|json|md|task)$/.test(e.name)) {
|
|
194
|
+
let stat;
|
|
195
|
+
try { stat = fs.statSync(full); }
|
|
196
|
+
catch { continue; }
|
|
197
|
+
if (stat.size > 2 * 1024 * 1024)
|
|
198
|
+
continue;
|
|
199
|
+
let orig;
|
|
200
|
+
try { orig = fs.readFileSync(full, 'utf8'); }
|
|
201
|
+
catch { continue; }
|
|
202
|
+
const next = rewriteWorkPaths(orig);
|
|
203
|
+
if (next !== orig) {
|
|
204
|
+
changed++;
|
|
205
|
+
if (!dryRun)
|
|
206
|
+
fs.writeFileSync(full, next, 'utf8');
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
walk(dir);
|
|
212
|
+
return changed;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export function migrateSqliteDb(dbPath, dryRun = false) {
|
|
216
|
+
if (!fs.existsSync(dbPath))
|
|
217
|
+
return 0;
|
|
218
|
+
if (dryRun)
|
|
219
|
+
return 1;
|
|
220
|
+
let db;
|
|
221
|
+
let updatedRows = 0;
|
|
222
|
+
try {
|
|
223
|
+
db = new DatabaseSync(dbPath);
|
|
224
|
+
db.exec('PRAGMA foreign_keys = OFF;');
|
|
225
|
+
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table'").all()
|
|
226
|
+
.map(r => r.name)
|
|
227
|
+
.filter(n => !n.startsWith('sqlite_') && !n.startsWith('objects_fts'));
|
|
228
|
+
db.exec('BEGIN TRANSACTION;');
|
|
229
|
+
for (const tbl of tables) {
|
|
230
|
+
const cols = db.prepare(`PRAGMA table_info("${tbl}")`).all();
|
|
231
|
+
const textCols = cols.filter(c => /TEXT|CHAR|CLOB/i.test(String(c.type || ''))).map(c => c.name);
|
|
232
|
+
if (!textCols.length)
|
|
233
|
+
continue;
|
|
234
|
+
const pkCols = cols.filter(c => c.pk > 0).sort((a, b) => a.pk - b.pk).map(c => c.name);
|
|
235
|
+
const usePk = pkCols.length > 0;
|
|
236
|
+
const selectCols = usePk
|
|
237
|
+
? [...new Set([...pkCols, ...textCols])]
|
|
238
|
+
: ['rowid', ...textCols];
|
|
239
|
+
const rows = db.prepare(`SELECT ${selectCols.map(c => c === 'rowid' ? 'rowid' : `"${c}"`).join(', ')} FROM "${tbl}"`).all();
|
|
240
|
+
for (const row of rows) {
|
|
241
|
+
const sets = [];
|
|
242
|
+
const vals = [];
|
|
243
|
+
for (const col of textCols) {
|
|
244
|
+
const v = row[col];
|
|
245
|
+
if (typeof v !== 'string' || !v)
|
|
246
|
+
continue;
|
|
247
|
+
const next = rewriteWorkPaths(v);
|
|
248
|
+
if (next !== v) {
|
|
249
|
+
sets.push(`"${col}" = ?`);
|
|
250
|
+
vals.push(next);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (sets.length) {
|
|
254
|
+
try {
|
|
255
|
+
if (usePk) {
|
|
256
|
+
const where = pkCols.map(c => `"${c}" = ?`).join(' AND ');
|
|
257
|
+
for (const c of pkCols) vals.push(row[c]);
|
|
258
|
+
db.prepare(`UPDATE "${tbl}" SET ${sets.join(', ')} WHERE ${where}`).run(...vals);
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
vals.push(row.rowid);
|
|
262
|
+
db.prepare(`UPDATE "${tbl}" SET ${sets.join(', ')} WHERE rowid = ?`).run(...vals);
|
|
263
|
+
}
|
|
264
|
+
updatedRows++;
|
|
265
|
+
}
|
|
266
|
+
catch (e) {
|
|
267
|
+
if (/UNIQUE/i.test(String(e?.message || ''))) {
|
|
268
|
+
if (usePk) {
|
|
269
|
+
const where = pkCols.map(c => `"${c}" = ?`).join(' AND ');
|
|
270
|
+
db.prepare(`DELETE FROM "${tbl}" WHERE ${where}`).run(...pkCols.map(c => row[c]));
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
db.prepare(`DELETE FROM "${tbl}" WHERE rowid = ?`).run(row.rowid);
|
|
274
|
+
}
|
|
275
|
+
updatedRows++;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
throw e;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
db.exec('COMMIT;');
|
|
285
|
+
db.exec('PRAGMA foreign_keys = ON;');
|
|
286
|
+
}
|
|
287
|
+
catch { /* ignore locked sqlite */ }
|
|
288
|
+
finally {
|
|
289
|
+
try { db?.close?.(); } catch { /* ignore */ }
|
|
290
|
+
}
|
|
291
|
+
return updatedRows;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
function isMcpModuleDir(modDir) {
|
|
295
|
+
const cls = path.join(modDir, T.module, 'class.js');
|
|
296
|
+
if (!fs.existsSync(cls))
|
|
297
|
+
return false;
|
|
298
|
+
try {
|
|
299
|
+
return /\bmcp\s*:\s*\{/.test(fs.readFileSync(cls, 'utf8'));
|
|
300
|
+
}
|
|
301
|
+
catch {
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** Быстрая O(1) проверка — нужна ли миграция раскладки на диске. */
|
|
307
|
+
export function needsTreeMigration(rootDir = '.') {
|
|
308
|
+
const absRoot = path.resolve(rootDir);
|
|
309
|
+
if (fs.existsSync(path.join(absRoot, R.models)))
|
|
310
|
+
return true;
|
|
311
|
+
if (fs.existsSync(path.join(absRoot, R.orgs)))
|
|
312
|
+
return true;
|
|
313
|
+
for (const rel of OBSOLETE_TYPIZER_DIRS) {
|
|
314
|
+
if (fs.existsSync(path.join(absRoot, rel)))
|
|
315
|
+
return true;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const modulesDir = path.join(absRoot, R.modules);
|
|
319
|
+
if (fs.existsSync(modulesDir)) {
|
|
320
|
+
if (fs.existsSync(path.join(modulesDir, G.marketplacesOld)) || fs.existsSync(path.join(modulesDir, G.halogen)))
|
|
321
|
+
return true;
|
|
322
|
+
if (fs.existsSync(path.join(modulesDir, G.models, G.halogen)))
|
|
323
|
+
return true;
|
|
324
|
+
try {
|
|
325
|
+
for (const e of fs.readdirSync(modulesDir, { withFileTypes: true })) {
|
|
326
|
+
if (e.isDirectory() && MODULE_GROUP_MAP[e.name])
|
|
327
|
+
return true;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
catch { /* ignore */ }
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const projsDir = path.join(absRoot, R.projects);
|
|
334
|
+
if (fs.existsSync(projsDir)) {
|
|
335
|
+
try {
|
|
336
|
+
for (const p of fs.readdirSync(projsDir, { withFileTypes: true })) {
|
|
337
|
+
if (!p.isDirectory() || p.name.startsWith('$') || p.name.startsWith('#'))
|
|
338
|
+
continue;
|
|
339
|
+
const pDir = path.join(projsDir, p.name);
|
|
340
|
+
if (fs.existsSync(path.join(pDir, T.organization)))
|
|
341
|
+
return true;
|
|
342
|
+
const pMods = path.join(pDir, R.modules);
|
|
343
|
+
if (fs.existsSync(pMods)) {
|
|
344
|
+
for (const me of fs.readdirSync(pMods, { withFileTypes: true })) {
|
|
345
|
+
if (me.isDirectory() && MODULE_GROUP_MAP[me.name])
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
catch { /* ignore */ }
|
|
352
|
+
}
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Безопасная идемпотентная миграция дерева под архитектуру v1.0.93+.
|
|
358
|
+
* Не удаляет пользовательские папки, если они не опустели после переноса.
|
|
359
|
+
*/
|
|
360
|
+
export function migrateTreeSync(rootDir = '.', { dryRun = false } = {}) {
|
|
361
|
+
const absRoot = path.resolve(rootDir);
|
|
362
|
+
const report = {
|
|
363
|
+
dryRun,
|
|
364
|
+
movedModules: [],
|
|
365
|
+
movedModels: [],
|
|
366
|
+
movedOrgs: [],
|
|
367
|
+
convertedMcp: [],
|
|
368
|
+
rewrittenFiles: 0,
|
|
369
|
+
updatedDbRows: 0,
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
const modelsDir = path.join(absRoot, R.models);
|
|
373
|
+
const modulesDir = path.join(absRoot, R.modules);
|
|
374
|
+
const projsDir = path.join(absRoot, R.projects);
|
|
375
|
+
const orgsDir = path.join(absRoot, R.orgs);
|
|
376
|
+
|
|
377
|
+
const orgTypeDir = path.join(absRoot, R.server, T.folder, T.class, T.structure, T.organization);
|
|
378
|
+
const projTypeDir = path.join(absRoot, R.server, T.folder, T.class, T.structure, T.project);
|
|
379
|
+
if (fs.existsSync(orgTypeDir) && fs.existsSync(projTypeDir) && !dryRun) {
|
|
380
|
+
fs.rmSync(orgTypeDir, { recursive: true, force: true });
|
|
381
|
+
}
|
|
382
|
+
if (!dryRun) {
|
|
383
|
+
for (const rel of OBSOLETE_TYPIZER_DIRS) {
|
|
384
|
+
const abs = path.resolve(absRoot, rel);
|
|
385
|
+
if (abs.startsWith(absRoot + path.sep + R.server + path.sep) && fs.existsSync(abs))
|
|
386
|
+
fs.rmSync(abs, { recursive: true, force: true });
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
const modTypeDir = path.join(absRoot, R.server, T.folder, T.class, T.module);
|
|
391
|
+
const providerTypeDst = path.join(modTypeDir, T.provider);
|
|
392
|
+
const aiTypeDst = path.join(providerTypeDst, T.folder, T.class, T.ai);
|
|
393
|
+
const oldModelsAiTypeDir = path.join(modelsDir, T.ai);
|
|
394
|
+
if (fs.existsSync(oldModelsAiTypeDir)) {
|
|
395
|
+
const oldProviderType = path.join(oldModelsAiTypeDir, T.folder, T.class, T.provider);
|
|
396
|
+
const oldAiType = path.join(oldModelsAiTypeDir, T.folder, T.class, T.ai);
|
|
397
|
+
if (fs.existsSync(oldProviderType))
|
|
398
|
+
mergeDirSafe(oldProviderType, providerTypeDst, dryRun, { overwrite: false });
|
|
399
|
+
if (fs.existsSync(oldAiType))
|
|
400
|
+
mergeDirSafe(oldAiType, aiTypeDst, dryRun, { overwrite: false });
|
|
401
|
+
if (!dryRun && fs.existsSync(providerTypeDst))
|
|
402
|
+
fs.rmSync(oldModelsAiTypeDir, { recursive: true, force: true });
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
if (fs.existsSync(modulesDir) || fs.existsSync(modelsDir)) {
|
|
406
|
+
if (!dryRun)
|
|
407
|
+
fs.mkdirSync(modulesDir, { recursive: true });
|
|
408
|
+
for (const g of STANDARD_GROUPS) {
|
|
409
|
+
const gDir = path.join(modulesDir, g);
|
|
410
|
+
if (!fs.existsSync(gDir) && !dryRun)
|
|
411
|
+
fs.mkdirSync(gDir, { recursive: true });
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
const oldMpDir = path.join(modulesDir, G.marketplacesOld);
|
|
415
|
+
if (fs.existsSync(oldMpDir)) {
|
|
416
|
+
for (const e of fs.readdirSync(oldMpDir, { withFileTypes: true })) {
|
|
417
|
+
if (!e.isDirectory() || e.name.startsWith('$'))
|
|
418
|
+
continue;
|
|
419
|
+
if (mergeDirSafe(path.join(oldMpDir, e.name), path.join(modulesDir, G.marketplacesNew, e.name), dryRun))
|
|
420
|
+
report.movedModules.push(`${G.marketplacesOld}/${e.name} -> ${G.marketplacesNew}/${e.name}`);
|
|
421
|
+
}
|
|
422
|
+
if (!dryRun && isDirEmptyOrMetaOnly(oldMpDir))
|
|
423
|
+
fs.rmSync(oldMpDir, { recursive: true, force: true });
|
|
424
|
+
else if (!dryRun) {
|
|
425
|
+
const rest = fs.readdirSync(oldMpDir).filter(n => !n.startsWith('$'));
|
|
426
|
+
if (rest.length === 0)
|
|
427
|
+
fs.rmSync(oldMpDir, { recursive: true, force: true });
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (fs.existsSync(modulesDir)) {
|
|
432
|
+
for (const e of fs.readdirSync(modulesDir, { withFileTypes: true })) {
|
|
433
|
+
if (!e.isDirectory() || e.name.startsWith('$') || e.name.startsWith('#'))
|
|
434
|
+
continue;
|
|
435
|
+
if (STANDARD_GROUPS.includes(e.name))
|
|
436
|
+
continue;
|
|
437
|
+
const src = path.join(modulesDir, e.name);
|
|
438
|
+
let group = MODULE_GROUP_MAP[e.name];
|
|
439
|
+
if (!group && (e.name.startsWith('plugin-') || isMcpModuleDir(src)))
|
|
440
|
+
group = G.mcp;
|
|
441
|
+
if (!group)
|
|
442
|
+
continue;
|
|
443
|
+
const dst = path.join(modulesDir, group, e.name);
|
|
444
|
+
if (mergeDirSafe(src, dst, dryRun))
|
|
445
|
+
report.movedModules.push(`${e.name} -> ${group}/${e.name}`);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const isLocalModelsProviderDir = (dir) => {
|
|
450
|
+
try {
|
|
451
|
+
for (const sub of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
452
|
+
if (!sub.isDirectory() || sub.name.startsWith('$') || sub.name.startsWith('#'))
|
|
453
|
+
continue;
|
|
454
|
+
const subDir = path.join(dir, sub.name);
|
|
455
|
+
if (fs.existsSync(path.join(subDir, T.ai, '#weights')) || fs.existsSync(path.join(subDir, '#weights')))
|
|
456
|
+
return true;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
catch { /* ignore */ }
|
|
460
|
+
return false;
|
|
461
|
+
};
|
|
462
|
+
const dstLocal = path.join(modulesDir, G.models, G.local);
|
|
463
|
+
if (fs.existsSync(modelsDir)) {
|
|
464
|
+
for (const e of fs.readdirSync(modelsDir, { withFileTypes: true })) {
|
|
465
|
+
if (!e.isDirectory() || e.name.startsWith('$') || e.name.startsWith('#'))
|
|
466
|
+
continue;
|
|
467
|
+
const src = path.join(modelsDir, e.name);
|
|
468
|
+
if (e.name === G.local || e.name === G.halogen || isLocalModelsProviderDir(src)) {
|
|
469
|
+
if (migrateLocalProviderDir(src, dstLocal, dryRun))
|
|
470
|
+
report.movedModels.push(`${R.models}/${e.name} -> ${R.modules}/${G.models}/${G.local}`);
|
|
471
|
+
continue;
|
|
472
|
+
}
|
|
473
|
+
const dst = path.join(modulesDir, G.models, e.name);
|
|
474
|
+
if (mergeDirSafe(src, dst, dryRun))
|
|
475
|
+
report.movedModels.push(`${R.models}/${e.name} -> ${R.modules}/${G.models}/${e.name}`);
|
|
476
|
+
}
|
|
477
|
+
removeIfEmpty(modelsDir, dryRun);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
for (const oldHal of [path.join(modulesDir, G.halogen), path.join(modulesDir, G.models, G.halogen)]) {
|
|
481
|
+
if (fs.existsSync(oldHal)) {
|
|
482
|
+
if (migrateLocalProviderDir(oldHal, dstLocal, dryRun))
|
|
483
|
+
report.movedModels.push(`${path.relative(absRoot, oldHal)} -> ${R.modules}/${G.models}/${G.local}`);
|
|
484
|
+
removeIfEmpty(oldHal, dryRun);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
for (const g of STANDARD_GROUPS) {
|
|
489
|
+
const gDir = path.join(modulesDir, g);
|
|
490
|
+
if (!fs.existsSync(gDir))
|
|
491
|
+
continue;
|
|
492
|
+
for (const e of fs.readdirSync(gDir, { withFileTypes: true })) {
|
|
493
|
+
if (!e.isDirectory() || e.name.startsWith('$'))
|
|
494
|
+
continue;
|
|
495
|
+
const modDir = path.join(gDir, e.name);
|
|
496
|
+
if (isMcpModuleDir(modDir)) {
|
|
497
|
+
const srcMeta = path.join(modDir, T.module);
|
|
498
|
+
const dstMeta = path.join(modDir, T.mcp);
|
|
499
|
+
if (mergeDirSafe(srcMeta, dstMeta, dryRun))
|
|
500
|
+
report.convertedMcp.push(`${g}/${e.name}`);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
if (fs.existsSync(orgsDir)) {
|
|
507
|
+
if (!dryRun)
|
|
508
|
+
fs.mkdirSync(projsDir, { recursive: true });
|
|
509
|
+
for (const e of fs.readdirSync(orgsDir, { withFileTypes: true })) {
|
|
510
|
+
if (e.name === T.domain) {
|
|
511
|
+
if (!dryRun && fs.existsSync(path.join(projsDir, T.domain)))
|
|
512
|
+
fs.rmSync(path.join(orgsDir, e.name), { recursive: true, force: true });
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
if (!e.isDirectory() || e.name.startsWith('$') || e.name.startsWith('#'))
|
|
516
|
+
continue;
|
|
517
|
+
const src = path.join(orgsDir, e.name);
|
|
518
|
+
const dst = path.join(projsDir, e.name);
|
|
519
|
+
if (mergeDirSafe(src, dst, dryRun)) {
|
|
520
|
+
report.movedOrgs.push(e.name);
|
|
521
|
+
const oldMeta = path.join(dst, T.organization);
|
|
522
|
+
const newMeta = path.join(dst, T.project);
|
|
523
|
+
if (fs.existsSync(oldMeta))
|
|
524
|
+
mergeDirSafe(oldMeta, newMeta, dryRun);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
removeIfEmpty(orgsDir, dryRun);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
if (fs.existsSync(projsDir)) {
|
|
531
|
+
for (const proj of fs.readdirSync(projsDir, { withFileTypes: true })) {
|
|
532
|
+
if (!proj.isDirectory() || proj.name.startsWith('$') || proj.name.startsWith('#'))
|
|
533
|
+
continue;
|
|
534
|
+
const pDir = path.join(projsDir, proj.name);
|
|
535
|
+
const oldMeta = path.join(pDir, T.organization);
|
|
536
|
+
const newMeta = path.join(pDir, T.project);
|
|
537
|
+
if (fs.existsSync(oldMeta))
|
|
538
|
+
mergeDirSafe(oldMeta, newMeta, dryRun);
|
|
539
|
+
|
|
540
|
+
const pMods = path.join(pDir, R.modules);
|
|
541
|
+
if (fs.existsSync(pMods)) {
|
|
542
|
+
for (const me of fs.readdirSync(pMods, { withFileTypes: true })) {
|
|
543
|
+
if (!me.isDirectory() || me.name.startsWith('$') || me.name.startsWith('#'))
|
|
544
|
+
continue;
|
|
545
|
+
if (STANDARD_GROUPS.includes(me.name))
|
|
546
|
+
continue;
|
|
547
|
+
const group = MODULE_GROUP_MAP[me.name];
|
|
548
|
+
if (group) {
|
|
549
|
+
mergeDirSafe(path.join(pMods, me.name), path.join(pMods, group, me.name), dryRun);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
const dbPath = path.join(pDir, T.project, '#system', 'work.db');
|
|
555
|
+
report.updatedDbRows += migrateSqliteDb(dbPath, dryRun);
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
report.rewrittenFiles += rewriteTextFilesInDir(modulesDir, dryRun);
|
|
560
|
+
report.rewrittenFiles += rewriteTextFilesInDir(projsDir, dryRun);
|
|
561
|
+
report.rewrittenFiles += rewriteTextFilesInDir(path.join(absRoot, R.users), dryRun);
|
|
562
|
+
report.rewrittenFiles += rewriteTextFilesInDir(providerTypeDst, dryRun);
|
|
563
|
+
|
|
564
|
+
const sysSettings = path.join(absRoot, '#system', 'settings.json');
|
|
565
|
+
if (fs.existsSync(sysSettings)) {
|
|
566
|
+
const orig = fs.readFileSync(sysSettings, 'utf8');
|
|
567
|
+
const next = rewriteWorkPaths(orig);
|
|
568
|
+
if (next !== orig) {
|
|
569
|
+
report.rewrittenFiles++;
|
|
570
|
+
if (!dryRun)
|
|
571
|
+
fs.writeFileSync(sysSettings, next, 'utf8');
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const rootDb = path.join(absRoot, '.data', 'work.db');
|
|
576
|
+
if (fs.existsSync(rootDb))
|
|
577
|
+
report.updatedDbRows += migrateSqliteDb(rootDb, dryRun);
|
|
578
|
+
|
|
579
|
+
return report;
|
|
580
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"moduleGroupMap": {
|
|
3
|
+
"DuckDuckGo": "Поиск",
|
|
4
|
+
"SearXNG": "Поиск",
|
|
5
|
+
"Yandex": "Поиск",
|
|
6
|
+
"CBR": "Данные",
|
|
7
|
+
"DaData": "Данные",
|
|
8
|
+
"Geo": "Данные",
|
|
9
|
+
"KLADR": "Данные",
|
|
10
|
+
"RuCalendar": "Данные",
|
|
11
|
+
"Weather": "Данные",
|
|
12
|
+
"1C": "Коннекторы",
|
|
13
|
+
"2GIS": "Коннекторы",
|
|
14
|
+
"Bitrix24": "Коннекторы",
|
|
15
|
+
"Telegram": "Коннекторы",
|
|
16
|
+
"YandexDisk": "Коннекторы",
|
|
17
|
+
"Ozon": "Маркетплейсы",
|
|
18
|
+
"Wildberries": "Маркетплейсы",
|
|
19
|
+
"YandexMarket": "Маркетплейсы",
|
|
20
|
+
"Register": "Учёт и процессы",
|
|
21
|
+
"Process": "Учёт и процессы"
|
|
22
|
+
},
|
|
23
|
+
"standardGroups": [
|
|
24
|
+
"Модели",
|
|
25
|
+
"Поиск",
|
|
26
|
+
"Данные",
|
|
27
|
+
"Коннекторы",
|
|
28
|
+
"Маркетплейсы",
|
|
29
|
+
"Учёт и процессы",
|
|
30
|
+
"MCP"
|
|
31
|
+
],
|
|
32
|
+
"roots": {
|
|
33
|
+
"models": "MODELS",
|
|
34
|
+
"modules": "MODULES",
|
|
35
|
+
"orgs": "ORGANIZATIONS",
|
|
36
|
+
"projects": "PROJECTS",
|
|
37
|
+
"users": "USERS",
|
|
38
|
+
"server": "$server"
|
|
39
|
+
},
|
|
40
|
+
"groups": {
|
|
41
|
+
"models": "Модели",
|
|
42
|
+
"marketplacesOld": "Marketplaces",
|
|
43
|
+
"marketplacesNew": "Маркетплейсы",
|
|
44
|
+
"mcp": "MCP",
|
|
45
|
+
"local": "Local",
|
|
46
|
+
"halogen": "Halogen"
|
|
47
|
+
},
|
|
48
|
+
"types": {
|
|
49
|
+
"folder": "$folder",
|
|
50
|
+
"class": "$class",
|
|
51
|
+
"domain": "$domain",
|
|
52
|
+
"structure": "$structure",
|
|
53
|
+
"organization": "$organization",
|
|
54
|
+
"project": "$project",
|
|
55
|
+
"module": "$module",
|
|
56
|
+
"provider": "$provider",
|
|
57
|
+
"mcp": "$mcp",
|
|
58
|
+
"ai": "$ai"
|
|
59
|
+
},
|
|
60
|
+
"runtimeSubdirs": [
|
|
61
|
+
"#runtime",
|
|
62
|
+
"#adapters",
|
|
63
|
+
"#datasets",
|
|
64
|
+
"#cache",
|
|
65
|
+
"#tmp",
|
|
66
|
+
"#weights",
|
|
67
|
+
"#downloads"
|
|
68
|
+
],
|
|
69
|
+
"obsoleteTypizerDirs": [
|
|
70
|
+
"$server/$folder/$class/$domain/$folder",
|
|
71
|
+
"$server/$folder/$class/$module/$folder",
|
|
72
|
+
"$server/$folder/$class/$structure/$folder",
|
|
73
|
+
"$server/$folder/$class/$structure/$server/$folder",
|
|
74
|
+
"$server/$folder/$class/$structure/$project/$folder/$class/$structure",
|
|
75
|
+
"$server/$folder/$class/$structure/$project/$folder/$class/$domain",
|
|
76
|
+
"$server/$folder/$class/$structure/$project/$folder/$class/$data",
|
|
77
|
+
"$server/$folder/$class/$users/$folder",
|
|
78
|
+
"$server/$folder/$class/$data/$catalog/$folder",
|
|
79
|
+
"$server/$folder/$class/$data/$catalog/$virtual/$folder",
|
|
80
|
+
"$server/$folder/$class/$data/$register/$folder",
|
|
81
|
+
"$server/$folder/$class/$data/$register/$account/$folder",
|
|
82
|
+
"$server/$folder/$class/$data/$operation/$folder",
|
|
83
|
+
"$server/$folder/$class/$data/$struct/$folder"
|
|
84
|
+
]
|
|
85
|
+
}
|
package/sources/host/watch.js
CHANGED
|
@@ -9,7 +9,7 @@ import path from 'node:path';
|
|
|
9
9
|
import { FS } from '../server/index.js';
|
|
10
10
|
import { markClassesDirty } from '../data/api.js';
|
|
11
11
|
|
|
12
|
-
const ROOTS = ['$server', 'sources', 'oda', 'MODULES', '
|
|
12
|
+
const ROOTS = ['$server', 'sources', 'oda', 'MODULES', 'PROJECTS', 'NODES'];
|
|
13
13
|
// DATA/INDEX — данные и производные агрегаты: их каждая запись объекта/проводки пишет в *.json,
|
|
14
14
|
// и без этого исключения сброс кэшей поднимался бы на каждую проводку (холодные запросы у всех клиентов).
|
|
15
15
|
// Но это только зона внутри метапапки ($тип/DATA, $тип/INDEX): корневой класс /DATA под правило не попадает.
|