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
|
@@ -798,13 +798,13 @@ function normalizeMcpServerId(rawId) {
|
|
|
798
798
|
.trim()
|
|
799
799
|
.replace(/\\/g, '/')
|
|
800
800
|
.split('/')
|
|
801
|
-
.map(seg => seg.trim().replace(/[
|
|
801
|
+
.map(seg => seg.trim().replace(/[^\p{L}\p{N}_\s-]+/gu, '-').replace(/^-+|-+$/g, ''))
|
|
802
802
|
.filter(Boolean);
|
|
803
803
|
if (!parts.length || parts.length > 2)
|
|
804
|
-
throw new Error(`Недопустимое имя MCP-сервера «${rawId}» (
|
|
804
|
+
throw new Error(`Недопустимое имя MCP-сервера «${rawId}» (буквы, цифры, дефис, подчёркивание; допускается 1 папка-группа)`);
|
|
805
805
|
for (const seg of parts) {
|
|
806
|
-
if (!/^[
|
|
807
|
-
throw new Error(`Недопустимое имя MCP-сервера «${rawId}
|
|
806
|
+
if (!/^[\p{L}\p{N}][\p{L}\p{N}_\s-]{0,48}$/u.test(seg))
|
|
807
|
+
throw new Error(`Недопустимое имя MCP-сервера «${rawId}»`);
|
|
808
808
|
}
|
|
809
809
|
return parts.join('/');
|
|
810
810
|
}
|
|
@@ -912,8 +912,11 @@ export async function listMcpCatalog() {
|
|
|
912
912
|
catch { /* fallback to reading class.js */ }
|
|
913
913
|
|
|
914
914
|
if (!data) {
|
|
915
|
-
const
|
|
916
|
-
|
|
915
|
+
const modDir = path.join(modulesDir, ...relId.split('/'));
|
|
916
|
+
const clsFile = ['$mcp', MODULE_META]
|
|
917
|
+
.map(m => path.join(modDir, m, 'class.js'))
|
|
918
|
+
.find(f => fs.existsSync(f));
|
|
919
|
+
if (clsFile) {
|
|
917
920
|
try {
|
|
918
921
|
const raw = await fsp.readFile(clsFile, 'utf-8');
|
|
919
922
|
const m = raw.match(/export\s+default\s+(\{[\s\S]*\})\s*;?\s*$/);
|
|
@@ -991,7 +994,7 @@ export async function listMcpCatalog() {
|
|
|
991
994
|
};
|
|
992
995
|
}
|
|
993
996
|
|
|
994
|
-
/** Установить один или несколько MCP-серверов в `/MODULES/<id>/$
|
|
997
|
+
/** Установить один или несколько MCP-серверов в `/MODULES/MCP/<id>/$mcp/class.js`. */
|
|
995
998
|
export async function installMcpServers(input = {}, ctx = {}) {
|
|
996
999
|
if (ctx?.session && !(await isAdmin(ctx.session)))
|
|
997
1000
|
throw new Error('Доступ запрещён: устанавливать MCP-серверы может только руководитель (BOSS)');
|
|
@@ -1002,15 +1005,11 @@ export async function installMcpServers(input = {}, ctx = {}) {
|
|
|
1002
1005
|
const installed = [];
|
|
1003
1006
|
|
|
1004
1007
|
for (const spec of specs) {
|
|
1005
|
-
const
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
await fsp.writeFile(path.join(parentDir, DOMAIN_META, 'class.js'), `export default { label: ${JSON.stringify(segs[0])} };\n`, 'utf-8');
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
const srvDir = path.join(modulesDir, ...segs, MODULE_META);
|
|
1008
|
+
const rawSegs = spec.id.split('/');
|
|
1009
|
+
// Если группа не указана явно — устанавливаем в обычную папку /MODULES/MCP/
|
|
1010
|
+
const segs = rawSegs.length === 1 ? ['MCP', rawSegs[0]] : rawSegs;
|
|
1011
|
+
const fullRelId = segs.join('/');
|
|
1012
|
+
const srvDir = path.join(modulesDir, ...segs, '$mcp');
|
|
1014
1013
|
const secretDir = path.join(srvDir, '#secret');
|
|
1015
1014
|
await fsp.mkdir(srvDir, { recursive: true });
|
|
1016
1015
|
|
|
@@ -1037,9 +1036,9 @@ export async function installMcpServers(input = {}, ctx = {}) {
|
|
|
1037
1036
|
enabled: spec.enabled !== false,
|
|
1038
1037
|
mcp: spec.mcp,
|
|
1039
1038
|
};
|
|
1040
|
-
const code = `/** MCP-сервер ${spec.label} (/MODULES/${
|
|
1039
|
+
const code = `/** MCP-сервер ${spec.label} (/MODULES/${fullRelId}). */\nexport default ${JSON.stringify(classData, null, 4)};\n`;
|
|
1041
1040
|
await fsp.writeFile(path.join(srvDir, 'class.js'), code, 'utf-8');
|
|
1042
|
-
installed.push({ id:
|
|
1041
|
+
installed.push({ id: fullRelId, path: '/MODULES/' + fullRelId, label: spec.label, mcp: spec.mcp });
|
|
1043
1042
|
}
|
|
1044
1043
|
|
|
1045
1044
|
resetServiceRegistry();
|
|
@@ -1052,13 +1051,35 @@ export async function installMcpServers(input = {}, ctx = {}) {
|
|
|
1052
1051
|
return { installed };
|
|
1053
1052
|
}
|
|
1054
1053
|
|
|
1055
|
-
|
|
1054
|
+
function resolveExistingModuleRelId(rawId) {
|
|
1055
|
+
const cleanId = normalizeMcpServerId(rawId);
|
|
1056
|
+
const modulesDir = path.join(process.cwd(), 'MODULES');
|
|
1057
|
+
const directDir = path.join(modulesDir, ...cleanId.split('/'));
|
|
1058
|
+
for (const meta of ['$mcp', MODULE_META, '$provider']) {
|
|
1059
|
+
const f = path.join(directDir, meta, 'class.js');
|
|
1060
|
+
if (fs.existsSync(f))
|
|
1061
|
+
return { cleanId, clsFile: f, meta, targetDir: directDir };
|
|
1062
|
+
}
|
|
1063
|
+
if (!cleanId.includes('/') && fs.existsSync(modulesDir)) {
|
|
1064
|
+
const groups = ['MCP', ...fs.readdirSync(modulesDir).filter(g => g !== 'MCP' && !/^[$.#]/.test(g))];
|
|
1065
|
+
for (const g of groups) {
|
|
1066
|
+
const candDir = path.join(modulesDir, g, cleanId);
|
|
1067
|
+
for (const meta of ['$mcp', MODULE_META, '$provider']) {
|
|
1068
|
+
const f = path.join(candDir, meta, 'class.js');
|
|
1069
|
+
if (fs.existsSync(f))
|
|
1070
|
+
return { cleanId: `${g}/${cleanId}`, clsFile: f, meta, targetDir: candDir };
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
return { cleanId, clsFile: '', meta: '$mcp', targetDir: directDir };
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/** Включить или выключить модуль-коннектор / MCP-сервер в `/MODULES/<группа>/<id>`. */
|
|
1056
1078
|
export async function setMcpServerEnabled({ id, enabled }, ctx = {}) {
|
|
1057
1079
|
if (ctx?.session && !(await isAdmin(ctx.session)))
|
|
1058
1080
|
throw new Error('Доступ запрещён: управлять модулями и MCP может только руководитель (BOSS)');
|
|
1059
|
-
const cleanId =
|
|
1060
|
-
|
|
1061
|
-
if (!fs.existsSync(clsFile))
|
|
1081
|
+
const { cleanId, clsFile } = resolveExistingModuleRelId(id);
|
|
1082
|
+
if (!clsFile)
|
|
1062
1083
|
throw new Error(`Модуль /MODULES/${cleanId} не найден`);
|
|
1063
1084
|
|
|
1064
1085
|
const item = await globalThis.WORK?.get_item?.('/MODULES/' + cleanId).catch(() => null);
|
|
@@ -1089,12 +1110,11 @@ export async function setMcpServerEnabled({ id, enabled }, ctx = {}) {
|
|
|
1089
1110
|
return { id: cleanId, enabled: updated.enabled };
|
|
1090
1111
|
}
|
|
1091
1112
|
|
|
1092
|
-
/** Удалить MCP-сервер `/MODULES
|
|
1113
|
+
/** Удалить MCP-сервер `/MODULES/<группа>/<id>`. */
|
|
1093
1114
|
export async function removeMcpServer({ id }, ctx = {}) {
|
|
1094
1115
|
if (ctx?.session && !(await isAdmin(ctx.session)))
|
|
1095
1116
|
throw new Error('Доступ запрещён: удалять MCP-серверы может только руководитель (BOSS)');
|
|
1096
|
-
const cleanId =
|
|
1097
|
-
const targetDir = path.join(process.cwd(), 'MODULES', ...cleanId.split('/'));
|
|
1117
|
+
const { cleanId, targetDir } = resolveExistingModuleRelId(id);
|
|
1098
1118
|
if (!fs.existsSync(targetDir))
|
|
1099
1119
|
throw new Error(`MCP-сервер /MODULES/${cleanId} не найден`);
|
|
1100
1120
|
await fsp.rm(targetDir, { recursive: true, force: true });
|
|
@@ -1107,19 +1127,26 @@ export async function removeMcpServer({ id }, ctx = {}) {
|
|
|
1107
1127
|
return { id: cleanId, removed: true };
|
|
1108
1128
|
}
|
|
1109
1129
|
|
|
1110
|
-
/** Проверить соединение с MCP-сервером `/MODULES
|
|
1130
|
+
/** Проверить соединение с MCP-сервером `/MODULES/<группа>/<id>` и получить список его инструментов (`mcp_list_tools`). */
|
|
1111
1131
|
export async function inspectMcpServer({ id, place }, ctx = {}) {
|
|
1112
|
-
const cleanId =
|
|
1132
|
+
const { cleanId } = resolveExistingModuleRelId(id);
|
|
1113
1133
|
const modRoot = await globalThis.WORK?.get_item?.('/MODULES').catch(() => null);
|
|
1114
1134
|
modRoot?.reset?.();
|
|
1115
|
-
const
|
|
1135
|
+
const workPath = '/MODULES/' + cleanId;
|
|
1136
|
+
const item = await globalThis.WORK?.get_item?.(workPath);
|
|
1116
1137
|
if (!item || Array.isArray(item))
|
|
1117
|
-
throw new Error(`MCP-сервер
|
|
1138
|
+
throw new Error(`MCP-сервер ${workPath} не найден`);
|
|
1118
1139
|
await item.init;
|
|
1119
1140
|
const res = await item.mcp_list_tools({
|
|
1120
|
-
place: place ||
|
|
1141
|
+
place: place || workPath,
|
|
1121
1142
|
session: ctx?.session,
|
|
1122
1143
|
});
|
|
1144
|
+
try {
|
|
1145
|
+
const { reportModuleConnect } = await import('../../server/class/module-status.js');
|
|
1146
|
+
reportModuleConnect(workPath, !res?.error, res?.error || '');
|
|
1147
|
+
item.reset?.();
|
|
1148
|
+
}
|
|
1149
|
+
catch { /* ignore */ }
|
|
1123
1150
|
if (res?.error)
|
|
1124
1151
|
return { id: cleanId, ok: false, error: String(res.error), tools: [] };
|
|
1125
1152
|
const tools = Array.isArray(res?.tools) ? res.tools.map(t => ({
|
|
@@ -72,7 +72,7 @@ export * as voice from './voice.js';
|
|
|
72
72
|
export { resetServiceRegistry } from './tools/services.js';
|
|
73
73
|
|
|
74
74
|
/** Запасная модель, если ни один слой ai/config.js её не задал. */
|
|
75
|
-
export const DEFAULT_MODEL = '/
|
|
75
|
+
export const DEFAULT_MODEL = '/MODULES/Модели/odant/Qwen3.8 27b';
|
|
76
76
|
|
|
77
77
|
/** Инструменты, которых у субагентов нет: диалог с человеком, план, перенос, настройки подключений, плагинов и расписаний. */
|
|
78
78
|
const SUBAGENT_DENY = new Set(['ask_user', 'move_task', 'todo_write', 'save_skill', 'connect_service', 'disconnect_service', 'schedule', 'git_push', 'plugin']);
|
|
@@ -149,12 +149,25 @@ function restrictCall(tool, methods) {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
const MODELS_ROOT = '/' + DEFAULT_MODEL.split('/').filter(Boolean).slice(0, 2).join('/');
|
|
153
|
+
|
|
154
|
+
/** Преобразовать прежний путь модели в актуальный. */
|
|
155
|
+
export function remapModelPath(modelPath) {
|
|
156
|
+
const raw = String(modelPath || '').trim().replace(/\\/g, '/');
|
|
157
|
+
if (!raw)
|
|
158
|
+
return '';
|
|
159
|
+
const norm = raw.startsWith('/') ? raw : '/' + raw;
|
|
160
|
+
if (/^\/MODELS(?:\/|$)/i.test(norm))
|
|
161
|
+
return MODELS_ROOT + norm.slice('/MODELS'.length);
|
|
162
|
+
return raw;
|
|
163
|
+
}
|
|
164
|
+
|
|
152
165
|
/** Модель WORK → адаптер llm для цикла.
|
|
153
166
|
* @param {string} modelPath
|
|
154
167
|
* @returns {Promise<LLM>}
|
|
155
168
|
*/
|
|
156
169
|
export async function llmFor(modelPath) {
|
|
157
|
-
const path =
|
|
170
|
+
const path = remapModelPath(modelPath);
|
|
158
171
|
if (!path)
|
|
159
172
|
throw new Error('модель не задана (ai/config.js model или выбор в задаче)');
|
|
160
173
|
const item = await WORK.get_item(path);
|
|
@@ -176,7 +189,7 @@ export async function llmFor(modelPath) {
|
|
|
176
189
|
contextTokens: Number(item.maxTokens) || 32000,
|
|
177
190
|
vision: caps.includes('vision'),
|
|
178
191
|
fork: caps.includes('fork') || item.protocol === 'halogen',
|
|
179
|
-
// 9.2: тарифы модели ($ за миллион токенов) — карточка
|
|
192
|
+
// 9.2: тарифы модели ($ за миллион токенов) — карточка модели pricing: { input, output }
|
|
180
193
|
pricing: item.pricing && typeof item.pricing === 'object' ? item.pricing : null,
|
|
181
194
|
stream({ messages, tools, signal, effort, halogenKeep, halogenFrom, continueFinalMessage }) {
|
|
182
195
|
/** @type {{ messages: any, temperature?: number, signal?: AbortSignal, tools?: any, maxOutput?: number, effort?: string, halogenKeep?: string, halogenFrom?: string, continueFinalMessage?: boolean }} */
|
|
@@ -263,9 +276,9 @@ export async function llmWithFallback(primaryPath, fallbackPaths = []) {
|
|
|
263
276
|
};
|
|
264
277
|
return adapter;
|
|
265
278
|
}
|
|
266
|
-
/** Первая доступная чат-модель в /
|
|
279
|
+
/** Первая доступная чат-модель в /MODULES/Модели (активная приоритетно), когда дефолтная модель отсутствует. */
|
|
267
280
|
async function findFirstAvailableChatModel() {
|
|
268
|
-
const root = await WORK.get_item('/
|
|
281
|
+
const root = await WORK.get_item('/MODULES/Модели').catch(() => null);
|
|
269
282
|
let firstAny = '';
|
|
270
283
|
for (const provider of (await root?.items) || []) {
|
|
271
284
|
for (const m of (await provider.items) || []) {
|
|
@@ -281,9 +294,9 @@ async function findFirstAvailableChatModel() {
|
|
|
281
294
|
}
|
|
282
295
|
return firstAny;
|
|
283
296
|
}
|
|
284
|
-
/** Найти активную локальную модель в /
|
|
297
|
+
/** Найти активную локальную модель в /MODULES/Модели/Local по capabilities (или id). */
|
|
285
298
|
async function findActiveLocalModel({ caps = [], ids = [], method = '' } = {}) {
|
|
286
|
-
const local = await WORK.get_item('/
|
|
299
|
+
const local = await WORK.get_item('/MODULES/Модели/Local').catch(() => null);
|
|
287
300
|
const items = (await local?.items) || [];
|
|
288
301
|
const wantCaps = new Set(caps.map(s => String(s).toLowerCase()));
|
|
289
302
|
const wantIds = new Set(ids.map(s => String(s).toLowerCase()));
|
|
@@ -318,7 +331,7 @@ async function findImageModel(config) {
|
|
|
318
331
|
const localImg = await findActiveLocalModel({ caps: ['image'], ids: ['Z-Image-Turbo', 'Flux2-Klein-NPU'], method: 'generateImage' });
|
|
319
332
|
if (localImg)
|
|
320
333
|
return localImg;
|
|
321
|
-
const root = await WORK.get_item('/
|
|
334
|
+
const root = await WORK.get_item('/MODULES/Модели').catch(() => null);
|
|
322
335
|
for (const provider of (await root?.items) || []) {
|
|
323
336
|
for (const m of (await provider.items) || []) {
|
|
324
337
|
await m.init;
|
|
@@ -338,7 +351,7 @@ const ENV_GUIDE = `# Среда WORK
|
|
|
338
351
|
- Моделирование и структура: create_class, update_class (предпочитай вместо сырой правки class.js), inspect_class_tree, move_class, delete_class, assign (рабочие места в #security.ROLES и LINKS), escalate.
|
|
339
352
|
- Учёт и данные: describe_class, find_objects, register_operation, report (для БД организаций), write_table, read_table, import_objects, create_office_file, export_presentation, render_doc.
|
|
340
353
|
- Планирование и оркестрация: todo_write (в т.ч. задаёт effort: off|low|medium|high), task (субагент с effort), agent_start/status/message/stop, schema → call (прочие методы).
|
|
341
|
-
- Ссылки в ответах — только фактическими WORK-путями из результатов (в т.ч. .task/). Код/настройки системы ($server, sources, oda,
|
|
354
|
+
- Ссылки в ответах — только фактическими WORK-путями из результатов (в т.ч. .task/). Код/настройки системы ($server, sources, oda, MODULES, *.js) меняй только с объяснением и подтверждением.
|
|
342
355
|
# Внешние сервисы (аккаунты пользователя)
|
|
343
356
|
- API сервисов: connections → http_request (GET сразу, изменения с подтверждением в reason); нет подключения — connect_service (пароли и токены в чате не проси).
|
|
344
357
|
- Сайты без API: только в песочнице (browser_*) или Chrome пользователя (chrome_*) по явной просьбе; для паролей/2FA/капч — chrome_handoff; иначе open_page.
|
|
@@ -588,10 +601,13 @@ export async function createEnv({ place, contextPath, session, host, tz, locatio
|
|
|
588
601
|
return [stable, volatile].filter(Boolean).join('\n\n');
|
|
589
602
|
},
|
|
590
603
|
async defaultModel() {
|
|
591
|
-
const candidate = config.model || DEFAULT_MODEL;
|
|
604
|
+
const candidate = remapModelPath(config.model || DEFAULT_MODEL);
|
|
592
605
|
const item = await WORK.get_item(candidate).catch(() => null);
|
|
593
|
-
if (item)
|
|
594
|
-
|
|
606
|
+
if (item) {
|
|
607
|
+
await item.init?.catch?.(() => {});
|
|
608
|
+
if (typeof item.streamChat === 'function')
|
|
609
|
+
return candidate;
|
|
610
|
+
}
|
|
595
611
|
return (await findFirstAvailableChatModel()) || candidate;
|
|
596
612
|
},
|
|
597
613
|
/** Память изменена инструментом memory — пересобрать блок на следующем ходе. */
|
|
@@ -649,11 +665,8 @@ async function placeBlock(place, session, location, contextPath) {
|
|
|
649
665
|
const orgName = cone?.[1] || '';
|
|
650
666
|
lines.push(`- Твоя идентичность (субъект): ты — цифровой двойник подразделения «${label}»${orgName ? ` (организация «${orgName}»)` : ''}, путь ${place.path}. Отвечай и действуй от первого лица этого подразделения.`);
|
|
651
667
|
}
|
|
652
|
-
else if (pt === '$organization') {
|
|
653
|
-
lines.push(`- Твоя идентичность (субъект): ты — цифровой двойник организации «${label}» (${place.path}). Отвечай и действуй от первого лица этой организации.`);
|
|
654
|
-
}
|
|
655
668
|
else if (pt === '$project') {
|
|
656
|
-
lines.push(`- Твоя идентичность (субъект): ты — цифровой двойник
|
|
669
|
+
lines.push(`- Твоя идентичность (субъект): ты — цифровой двойник проекта/организации «${label}» (${place.path}). Отвечай и действуй от первого лица этого проекта.`);
|
|
657
670
|
}
|
|
658
671
|
else if (pt === '$server') {
|
|
659
672
|
lines.push(`- Твоя идентичность (субъект): ты — цифровой двойник системы WORK (корневой узел /). Отвечай и действуй от первого лица системы WORK.`);
|
|
@@ -667,8 +680,8 @@ async function placeBlock(place, session, location, contextPath) {
|
|
|
667
680
|
if (cone) {
|
|
668
681
|
const scopeDesc = cone.length > 2
|
|
669
682
|
? `подразделение «/${cone.join('/')}» организации «${cone[1]}»`
|
|
670
|
-
: `организация «${cone[1]}» (/
|
|
671
|
-
lines.push(`- Границы контекста: ${scopeDesc}. Движение разрешено только «вниз» (дочерние элементы точки) или «вверх» (учётные модули своей организации /
|
|
683
|
+
: `организация «${cone[1]}» (/PROJECTS/${cone[1]})`;
|
|
684
|
+
lines.push(`- Границы контекста: ${scopeDesc}. Движение разрешено только «вниз» (дочерние элементы точки) или «вверх» (учётные модули своей организации /PROJECTS/${cone[1]}/MODULES и общие данные уровня WORK). Выход «влево-вправо» в другие организации или соседние подразделения запрещён; если данных в этом контексте нет — сообщи, что в данной организации/подразделении их нет.`);
|
|
672
685
|
}
|
|
673
686
|
if ((place.path || '/') !== '/') {
|
|
674
687
|
lines.push('- Перенос задачи: если запрос требует системных действий (ОС, процессы, сеть, ядро WORK, /$server, /MODULES, /USERS, /NODES) или работы в другом подразделении/организации — не выполняй его здесь, вызови `move_task` (для системных — в `/`, для другого узла — в его путь), чтобы перенести задачу с разрешения пользователя и продолжить там.');
|
|
@@ -317,7 +317,7 @@ export async function collectQuietDigest(storage) {
|
|
|
317
317
|
const lastDigestDayByNode = new Map();
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
|
-
* Проверить узлы $
|
|
320
|
+
* Проверить узлы $project/$project/$structure и отправить тихую сводку BOSS только при наличии реальных событий.
|
|
321
321
|
*/
|
|
322
322
|
export async function runQuietDigests({ now = Date.now(), nodes = null } = {}) {
|
|
323
323
|
const WORK = globalThis.WORK;
|
|
@@ -339,7 +339,7 @@ export async function runQuietDigests({ now = Date.now(), nodes = null } = {}) {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
await collectTargets('/
|
|
342
|
+
await collectTargets('/PROJECTS');
|
|
343
343
|
await collectTargets('/PROJECTS');
|
|
344
344
|
}
|
|
345
345
|
|
|
@@ -390,7 +390,7 @@ export async function runMailAutoRefresh({ nodes = null } = {}) {
|
|
|
390
390
|
for (const item of items) {
|
|
391
391
|
if (!item || item.id?.[0] === '$') continue;
|
|
392
392
|
list.push(item);
|
|
393
|
-
if (item.type === '$
|
|
393
|
+
if (item.type === '$project' || item.type === '$project') {
|
|
394
394
|
const sub = (await item.items) || [];
|
|
395
395
|
for (const child of sub) {
|
|
396
396
|
if (child && child.type === '$structure' && child.id?.[0] !== '$')
|
|
@@ -399,7 +399,7 @@ export async function runMailAutoRefresh({ nodes = null } = {}) {
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
-
await collectTargets('/
|
|
402
|
+
await collectTargets('/PROJECTS');
|
|
403
403
|
await collectTargets('/PROJECTS');
|
|
404
404
|
await collectTargets('/USERS');
|
|
405
405
|
}
|
|
@@ -581,7 +581,7 @@ export async function listNodeAvailableClasses(storage, params = {}) {
|
|
|
581
581
|
return { roots: [] };
|
|
582
582
|
|
|
583
583
|
const p = String(storage?.path || '/');
|
|
584
|
-
const m = /^(\/(?:
|
|
584
|
+
const m = /^(\/(?:PROJECTS)\/[^/]+)/.exec(p);
|
|
585
585
|
const baseModPath = m ? m[1] + '/MODULES' : '';
|
|
586
586
|
const candidateRoots = [];
|
|
587
587
|
if (baseModPath)
|
|
@@ -667,8 +667,8 @@ export async function listNodeStructures(storage, params = {}) {
|
|
|
667
667
|
if (!WORK)
|
|
668
668
|
return { structures: [] };
|
|
669
669
|
const selfPath = String(storage?.path || '/').replace(/\/+$/, '') || '/';
|
|
670
|
-
const m = /^(\/(?:
|
|
671
|
-
const rootsToScan = m ? [m[1]] : ['/
|
|
670
|
+
const m = /^(\/(?:PROJECTS)\/[^/]+)/.exec(selfPath);
|
|
671
|
+
const rootsToScan = m ? [m[1]] : ['/PROJECTS'];
|
|
672
672
|
const out = [];
|
|
673
673
|
const seen = new Set();
|
|
674
674
|
const visit = async (node, depth = 0) => {
|
|
@@ -676,7 +676,7 @@ export async function listNodeStructures(storage, params = {}) {
|
|
|
676
676
|
return;
|
|
677
677
|
await node.init?.catch?.(() => {});
|
|
678
678
|
const p = String(node.path || '').replace(/\/+$/, '') || '/';
|
|
679
|
-
if (['$
|
|
679
|
+
if (['$project', '$structure'].includes(node.type) && p !== selfPath && !seen.has(p)) {
|
|
680
680
|
seen.add(p);
|
|
681
681
|
out.push({
|
|
682
682
|
path: p,
|
|
@@ -691,7 +691,7 @@ export async function listNodeStructures(storage, params = {}) {
|
|
|
691
691
|
if (!ch || ch.id?.[0] === '$')
|
|
692
692
|
continue;
|
|
693
693
|
await ch.init?.catch?.(() => {});
|
|
694
|
-
if (['$domain', '$
|
|
694
|
+
if (['$domain', '$project', '$structure'].includes(ch.type))
|
|
695
695
|
await visit(ch, depth + 1);
|
|
696
696
|
}
|
|
697
697
|
};
|
|
@@ -737,9 +737,9 @@ export async function listNodeNetworkNodes(storage, params = {}) {
|
|
|
737
737
|
}
|
|
738
738
|
|
|
739
739
|
/**
|
|
740
|
-
* Единый контекст для вкладки «Пользователи» и «Классы и модули» подразделения / $
|
|
740
|
+
* Единый контекст для вкладки «Пользователи» и «Классы и модули» подразделения / $project:
|
|
741
741
|
* реальные пользователи, подразделения, серверы сети, унаследованный BOSS,
|
|
742
|
-
* полное дерево классов вышестоящего $
|
|
742
|
+
* полное дерево классов вышестоящего $project и доступные модули /MODULES.
|
|
743
743
|
*/
|
|
744
744
|
export async function getNodeStaffContext(storage, params = {}) {
|
|
745
745
|
await assertBoss(storage, params);
|
|
@@ -831,7 +831,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
831
831
|
}
|
|
832
832
|
catch { /* ignore */ }
|
|
833
833
|
|
|
834
|
-
// 3. Подразделения (деревья /
|
|
834
|
+
// 3. Подразделения (деревья /PROJECTS и /PROJECTS + плоский structures) и серверы сети
|
|
835
835
|
const selfPath = String(storage?.path || '/').replace(/\/+$/, '') || '/';
|
|
836
836
|
const flatStructures = [];
|
|
837
837
|
const seenStructPaths = new Set();
|
|
@@ -845,7 +845,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
845
845
|
await node.init?.catch?.(() => {});
|
|
846
846
|
if (!node.id || node.id[0] === '$')
|
|
847
847
|
return null;
|
|
848
|
-
if (!['$
|
|
848
|
+
if (!['$project', '$structure'].includes(node.type))
|
|
849
849
|
return null;
|
|
850
850
|
// Проверяем видимость для текущего пользователя (не показываем чужие скрытые организации)
|
|
851
851
|
if (typeof node.canSee === 'function') {
|
|
@@ -859,7 +859,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
859
859
|
path: p,
|
|
860
860
|
label: node.DATA?.label || node.label || node.id,
|
|
861
861
|
type: node.type,
|
|
862
|
-
icon: node.DATA?.icon || node.icon || (node.type === '$
|
|
862
|
+
icon: node.DATA?.icon || node.icon || (node.type === '$project' ? 'odant:base' : node.type === '$project' ? 'odant:project' : 'odant:structure'),
|
|
863
863
|
isSelf: p === selfPath,
|
|
864
864
|
children: [],
|
|
865
865
|
};
|
|
@@ -872,7 +872,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
872
872
|
if (!ch || ch.id?.[0] === '$')
|
|
873
873
|
continue;
|
|
874
874
|
await ch.init?.catch?.(() => {});
|
|
875
|
-
if (['$
|
|
875
|
+
if (['$project', '$structure'].includes(ch.type)) {
|
|
876
876
|
const built = await visit(ch, depth + 1);
|
|
877
877
|
if (built)
|
|
878
878
|
entry.children.push(built);
|
|
@@ -892,17 +892,17 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
892
892
|
return res;
|
|
893
893
|
};
|
|
894
894
|
const [organizationsTree, projectsTree, netRes] = await Promise.all([
|
|
895
|
-
walkStructureDomain('/
|
|
895
|
+
walkStructureDomain('/PROJECTS').catch(() => []),
|
|
896
896
|
walkStructureDomain('/PROJECTS').catch(() => []),
|
|
897
897
|
listNodeNetworkNodes(storage, params).catch(() => ({ nodes: [] })),
|
|
898
898
|
]);
|
|
899
899
|
|
|
900
|
-
// 4. Полное дерево всех классов, установленных в вышестоящий $
|
|
901
|
-
const baseMatch = /^(\/
|
|
900
|
+
// 4. Полное дерево всех классов, установленных в вышестоящий $project
|
|
901
|
+
const baseMatch = /^(\/PROJECTS\/[^/]+)/.exec(selfPath);
|
|
902
902
|
const basePath = baseMatch ? baseMatch[1] : '';
|
|
903
903
|
const modRootPath = basePath ? `${basePath}/MODULES` : '/MODULES';
|
|
904
904
|
const baseClasses = [];
|
|
905
|
-
const
|
|
905
|
+
const installedModPaths = new Set();
|
|
906
906
|
|
|
907
907
|
const walkClasses = async (node, depth = 0) => {
|
|
908
908
|
if (!node || depth > 7)
|
|
@@ -911,11 +911,15 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
911
911
|
if (!node.id || node.id[0] === '$')
|
|
912
912
|
return null;
|
|
913
913
|
const t = node.type;
|
|
914
|
-
const
|
|
914
|
+
const isMod = t === '$module' || t === '$provider' || t === '$mcp';
|
|
915
|
+
const isAllowed = DATA_CLASS_TYPES.has(t) || isMod || t === '$domain' || t === '$class' || t === '$folder';
|
|
915
916
|
if (!isAllowed)
|
|
916
917
|
return null;
|
|
917
|
-
if (
|
|
918
|
-
|
|
918
|
+
if (isMod) {
|
|
919
|
+
const rel = String(node.path || '').replace(/^.*?\/MODULES\//, '');
|
|
920
|
+
installedModPaths.add(rel);
|
|
921
|
+
installedModPaths.add(node.id);
|
|
922
|
+
}
|
|
919
923
|
const items = await Promise.resolve(node.items).catch(() => []) || [];
|
|
920
924
|
const children = [];
|
|
921
925
|
for (const ch of items) {
|
|
@@ -931,7 +935,7 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
931
935
|
path: node.path,
|
|
932
936
|
label: node.DATA?.label || node.label || node.id,
|
|
933
937
|
type: t,
|
|
934
|
-
icon: node.DATA?.icon || node.icon || (
|
|
938
|
+
icon: node.DATA?.icon || node.icon || (isMod ? 'odant:module' : 'odant:class'),
|
|
935
939
|
children,
|
|
936
940
|
};
|
|
937
941
|
};
|
|
@@ -949,30 +953,45 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
949
953
|
}
|
|
950
954
|
baseClasses.sort(compareTreeLabels);
|
|
951
955
|
|
|
952
|
-
// 5. Доступные эталонные модули в корневом /MODULES
|
|
956
|
+
// 5. Доступные эталонные модули в корневом /MODULES (рекурсивно по группам-папкам)
|
|
953
957
|
const systemModules = [];
|
|
954
958
|
const sysModRoot = await WORK.get_item('/MODULES').catch(() => null);
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
+
const collectSysModules = async (folder, groupName = '', depth = 0) => {
|
|
960
|
+
if (!folder || depth > 3)
|
|
961
|
+
return;
|
|
962
|
+
const kids = await Promise.resolve(folder.items).catch(() => []) || [];
|
|
963
|
+
for (const sm of kids) {
|
|
964
|
+
if (!sm || !sm.id || sm.id[0] === '$' || sm.id[0] === '#' || sm.id[0] === '.')
|
|
959
965
|
continue;
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
966
|
+
const isMod = sm.type === '$module' || sm.type === '$provider' || sm.type === '$mcp';
|
|
967
|
+
if (isMod) {
|
|
968
|
+
await sm.init?.catch?.(() => {});
|
|
969
|
+
const relPath = groupName ? `${groupName}/${sm.id}` : sm.id;
|
|
970
|
+
systemModules.push({
|
|
971
|
+
id: relPath,
|
|
972
|
+
name: sm.id,
|
|
973
|
+
group: groupName,
|
|
974
|
+
type: sm.type,
|
|
975
|
+
path: sm.path,
|
|
976
|
+
label: sm.DATA?.label || sm.label || sm.id,
|
|
977
|
+
icon: sm.DATA?.icon || sm.icon || 'odant:module',
|
|
978
|
+
installed: installedModPaths.has(relPath),
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
else if (sm.type === '$folder' || sm.type === '$domain') {
|
|
982
|
+
const nextGroup = groupName ? `${groupName}/${sm.id}` : sm.id;
|
|
983
|
+
await collectSysModules(sm, nextGroup, depth + 1);
|
|
984
|
+
}
|
|
968
985
|
}
|
|
969
|
-
}
|
|
986
|
+
};
|
|
987
|
+
if (sysModRoot)
|
|
988
|
+
await collectSysModules(sysModRoot, '', 0);
|
|
970
989
|
|
|
971
990
|
return {
|
|
972
991
|
users,
|
|
973
992
|
usersTree,
|
|
974
993
|
structures: flatStructures,
|
|
975
|
-
organizationsTree,
|
|
994
|
+
organizationsTree: [],
|
|
976
995
|
projectsTree,
|
|
977
996
|
networkNodes: netRes.nodes || [],
|
|
978
997
|
inheritedBoss,
|
|
@@ -984,21 +1003,28 @@ export async function getNodeStaffContext(storage, params = {}) {
|
|
|
984
1003
|
}
|
|
985
1004
|
|
|
986
1005
|
/**
|
|
987
|
-
* Подключить эталонный модуль из `/MODULES
|
|
1006
|
+
* Подключить эталонный модуль из `/MODULES/<группа>/<id>` в `<$project>/MODULES/<группа>/<id>`.
|
|
988
1007
|
*/
|
|
989
1008
|
export async function installBaseModule(storage, params = {}) {
|
|
990
1009
|
await assertBoss(storage, params);
|
|
991
1010
|
const post = (typeof params.post === 'string' ? JSON.parse(params.post) : params.post) || params;
|
|
992
|
-
const
|
|
993
|
-
if (!
|
|
1011
|
+
const rawSpec = String(post.moduleId || post.id || '').trim().replace(/^\/MODULES\//, '').replace(/^\/+|\/+$/g, '');
|
|
1012
|
+
if (!rawSpec || /[\\.$#]/.test(rawSpec))
|
|
994
1013
|
throw new Error('Укажите корректный идентификатор модуля');
|
|
995
1014
|
const selfPath = String(storage?.path || '/').replace(/\/+$/, '') || '/';
|
|
996
|
-
const baseMatch = /^(\/
|
|
1015
|
+
const baseMatch = /^(\/PROJECTS\/[^/]+)/.exec(selfPath);
|
|
997
1016
|
if (!baseMatch)
|
|
998
|
-
throw new Error('Подключение модулей выполняется в контексте
|
|
1017
|
+
throw new Error('Подключение модулей выполняется в контексте проекта');
|
|
999
1018
|
const baseItem = await globalThis.WORK.get_item(baseMatch[1]).catch(() => null);
|
|
1000
1019
|
if (!baseItem)
|
|
1001
|
-
throw new Error('Не найден корневой объект
|
|
1020
|
+
throw new Error('Не найден корневой объект проекта');
|
|
1021
|
+
const { scanModulesDirSync } = await import('../../server/class/module-status.js');
|
|
1022
|
+
const modsRootAbs = path.resolve(globalThis.WORK?.real_dir || process.cwd(), 'MODULES');
|
|
1023
|
+
const allSys = scanModulesDirSync(modsRootAbs);
|
|
1024
|
+
const entry = allSys.find(m => m.relPath === rawSpec || m.id === rawSpec);
|
|
1025
|
+
if (!entry)
|
|
1026
|
+
throw new Error(`Эталонный модуль «${rawSpec}» не найден в /MODULES`);
|
|
1027
|
+
|
|
1002
1028
|
let modDomain = await globalThis.WORK.get_item(`${baseMatch[1]}/MODULES`).catch(() => null);
|
|
1003
1029
|
if (!modDomain && typeof baseItem.create === 'function') {
|
|
1004
1030
|
await baseItem.create({ ...params, id: 'MODULES', type: '$domain', label: 'Модули' });
|
|
@@ -1006,19 +1032,42 @@ export async function installBaseModule(storage, params = {}) {
|
|
|
1006
1032
|
}
|
|
1007
1033
|
if (!modDomain)
|
|
1008
1034
|
throw new Error('Не найден домен MODULES');
|
|
1009
|
-
|
|
1035
|
+
|
|
1036
|
+
const targetWorkPath = `${baseMatch[1]}/MODULES/${entry.relPath}`;
|
|
1037
|
+
const exists = await globalThis.WORK.get_item(targetWorkPath).catch(() => null);
|
|
1010
1038
|
if (exists)
|
|
1011
1039
|
return { ok: true, alreadyInstalled: true, path: exists.path };
|
|
1012
|
-
|
|
1040
|
+
|
|
1041
|
+
// Гарантируем обычную папку-группу внутри <проект>/MODULES/<группа>
|
|
1042
|
+
let parentContainer = modDomain;
|
|
1043
|
+
if (entry.group) {
|
|
1044
|
+
const grpAbs = path.join(modDomain.real_dir, ...entry.group.split('/'));
|
|
1045
|
+
fs.mkdirSync(grpAbs, { recursive: true });
|
|
1046
|
+
modDomain.reset?.();
|
|
1047
|
+
parentContainer = await globalThis.WORK.get_item(`${baseMatch[1]}/MODULES/${entry.group}`).catch(() => null);
|
|
1048
|
+
if (!parentContainer)
|
|
1049
|
+
throw new Error(`Не удалось открыть группу ${entry.group} в ${baseMatch[1]}/MODULES`);
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
const { extractStubClassJsSync, scaffoldModuleTreeSync } = await import('../../server/class/scaffold.js');
|
|
1053
|
+
const srcCls = path.join(entry.metaDir, 'class.js');
|
|
1054
|
+
const dstDir = path.join(parentContainer.real_dir, entry.id);
|
|
1055
|
+
const dstCls = path.join(dstDir, entry.type, 'class.js');
|
|
1056
|
+
fs.mkdirSync(path.dirname(dstCls), { recursive: true });
|
|
1057
|
+
fs.writeFileSync(dstCls, extractStubClassJsSync(srcCls, entry.id, true, entry.workPath), 'utf-8');
|
|
1058
|
+
scaffoldModuleTreeSync(entry.absDir, dstDir, entry.workPath);
|
|
1059
|
+
parentContainer.reset?.();
|
|
1060
|
+
modDomain.reset?.();
|
|
1061
|
+
|
|
1013
1062
|
await recordBossSettingTask(storage, params, {
|
|
1014
|
-
title: `Подключён модуль «${
|
|
1015
|
-
summary: `В ${baseMatch[1]} подключён модуль
|
|
1063
|
+
title: `Подключён модуль «${entry.relPath}»`,
|
|
1064
|
+
summary: `В ${baseMatch[1]} подключён модуль ${entry.workPath}.`,
|
|
1016
1065
|
});
|
|
1017
|
-
return { ok: true, path:
|
|
1066
|
+
return { ok: true, path: targetWorkPath };
|
|
1018
1067
|
}
|
|
1019
1068
|
|
|
1020
1069
|
/**
|
|
1021
|
-
* Создать новый класс или подкласс внутри `<$
|
|
1070
|
+
* Создать новый класс или подкласс внутри `<$project>/MODULES`.
|
|
1022
1071
|
*/
|
|
1023
1072
|
export async function createBaseClass(storage, params = {}) {
|
|
1024
1073
|
await assertBoss(storage, params);
|
|
@@ -1030,7 +1079,7 @@ export async function createBaseClass(storage, params = {}) {
|
|
|
1030
1079
|
if (!id)
|
|
1031
1080
|
throw new Error('Укажите название класса');
|
|
1032
1081
|
const selfPath = String(storage?.path || '/').replace(/\/+$/, '') || '/';
|
|
1033
|
-
const baseMatch = /^(\/(?:
|
|
1082
|
+
const baseMatch = /^(\/(?:PROJECTS)\/[^/]+)/.exec(selfPath);
|
|
1034
1083
|
const modMatch = /^(\/MODULES\/[^/]+)/.exec(selfPath);
|
|
1035
1084
|
const rootScope = baseMatch
|
|
1036
1085
|
? `${baseMatch[1]}/MODULES`
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { isOutbound } from './taint.js';
|
|
17
17
|
|
|
18
18
|
/** Зоны самоизменения системы: правки только с подтверждением. */
|
|
19
|
-
export const PROTECTED_PREFIXES = ['/$server', '/sources', '/oda', '/MODULES', '/
|
|
19
|
+
export const PROTECTED_PREFIXES = ['/$server', '/sources', '/oda', '/MODULES', '/MODULES/Модели', '/NODES', '/torus'];
|
|
20
20
|
|
|
21
21
|
/** Канонический WORK-путь для проверок: прямые слэши, без пустых и «.» сегментов, «..» свёрнуты.
|
|
22
22
|
* null — путь вылезает выше корня (неканонизируемый): проверки обязаны считать его защищённым. */
|