odant-work 1.0.90 → 1.0.91
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/certs/russian_trusted_root_ca.pem +32 -32
- package/#system/mail.json.example +9 -9
- package/#system/package-manifest.json +546 -476
- package/#system/settings.json.example +3 -3
- package/$server/$folder/$class/$data/$catalog/$folder/$class/$data/$catalog/$virtual/class.js +4 -0
- package/$server/$folder/$class/$data/$catalog/$folder/$class/$data/$catalog/class.js +4 -0
- package/$server/$folder/$class/$data/$catalog/$virtual/$folder/$class/$data/$catalog/$virtual/class.js +4 -0
- package/$server/$folder/$class/$data/$catalog/$virtual/class.js +8 -0
- package/{MODULES/Register/CATALOGS/$catalog/$folder/$class → $server/$folder/$class/$data}/$catalog/class.js +1 -0
- package/$server/$folder/$class/$data/$operation/$folder/$class/$data/$operation/class.js +4 -0
- package/{MODULES/Register/OPERATIONS/$operation/$folder/$class → $server/$folder/$class/$data}/$operation/class.js +1 -0
- package/$server/$folder/$class/$data/$register/$account/$folder/$class/$data/$register/$account/class.js +4 -0
- package/$server/$folder/$class/$data/$register/$account/class.js +8 -0
- package/$server/$folder/$class/$data/$register/$folder/$class/$data/$register/$account/class.js +4 -0
- package/$server/$folder/$class/$data/$register/$folder/$class/$data/$register/class.js +4 -0
- package/$server/$folder/$class/$data/$register/class.js +8 -0
- package/$server/$folder/$class/$data/$struct/$folder/$class/$data/$struct/class.js +4 -0
- package/$server/$folder/$class/$data/$struct/class.js +5 -0
- package/$server/$folder/$class/$data/class.js +5 -0
- package/$server/$folder/$class/$domain/$folder/$class/$domain/class.js +4 -0
- package/$server/$folder/$class/$domain/class.js +4 -4
- 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/$handler/$method/class.js +4 -0
- package/$server/$folder/$class/$handler/$timer/class.js +4 -0
- package/$server/$folder/$class/$handler/$trigger/class.js +3 -3
- package/$server/$folder/$class/$handler/class.js +9 -9
- package/$server/$folder/$class/$handler/handlers/pages/editor/$handler/class.js +5 -5
- package/$server/$folder/$class/$handler/readme.md +23 -23
- package/$server/$folder/$class/$module/$folder/$class/$data/$catalog/class.js +4 -0
- package/$server/$folder/$class/$module/$folder/$class/$data/$operation/class.js +4 -0
- package/$server/$folder/$class/$module/$folder/$class/$data/$register/class.js +4 -0
- package/$server/$folder/$class/$module/$folder/$class/$data/$struct/class.js +4 -0
- package/$server/$folder/$class/$module/$folder/$class/$domain/class.js +4 -0
- package/$server/$folder/$class/$module/$folder/$class/$module/class.js +4 -0
- package/$server/$folder/$class/$module/class.js +418 -6
- package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/mcp/$handler/class.js +9 -0
- package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $module/handlers/pages/form/system/$handler/tabs/mcp/$handler}/mcp.js +15 -15
- package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/modules/$handler/class.js +6 -0
- package/$server/$folder/$class/$module/handlers/pages/form/system/$handler/tabs/modules/$handler/modules.js +1 -0
- package/$server/$folder/$class/$structure/$folder/$class/$structure/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$catalog/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$operation/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$register/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$data/$struct/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$domain/class.js +4 -0
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$module/class.js +4 -0
- package/{ORGANIZATIONS/$domain/$folder/$class/$base → $server/$folder/$class/$structure/$organization/$folder/$class/$structure/$organization}/class.js +4 -5
- package/$server/$folder/$class/$structure/$organization/$folder/$class/$structure/class.js +4 -0
- package/{ORGANIZATIONS/$domain/$folder/$class/$base/$folder/$class/$structure/$base → $server/$folder/$class/$structure/$organization}/class.js +19 -17
- package/$server/$folder/$class/$structure/$organization/handlers/pages/form/system/$handler/tabs/requisites/$handler/class.js +3 -0
- package/$server/$folder/$class/$structure/{$base → $organization}/handlers/pages/site/$handler/site.js +3 -3
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$catalog/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$operation/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$register/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$data/$struct/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$domain/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/$folder/$class/$module/class.js +4 -0
- package/$server/$folder/$class/$structure/$project/class.js +1 -0
- package/$server/$folder/$class/$structure/$project/readme.md +1 -1
- package/$server/$folder/$class/$structure/$server/$folder/$class/$domain/class.js +4 -0
- package/$server/$folder/$class/$structure/$server/handlers/pages/form/system/$handler/tabs/database/$handler/class.js +3 -0
- package/$server/$folder/$class/$structure/$server/handlers/pages/form/system/$handler/tabs/license/$handler/class.js +6 -0
- package/$server/$folder/$class/$structure/$server/handlers/pages/site/$handler/site.js +2 -2
- package/$server/$folder/$class/$structure/$user/class.js +2 -2
- package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/agent/$handler/class.js +3 -0
- package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/messengers/$handler/class.js +3 -0
- package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/modules/$handler/class.js +3 -0
- package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/profile/$handler/class.js +5 -0
- package/$server/$folder/$class/$structure/$user/handlers/pages/form/system/$handler/tabs/profile/$handler/profile.js +14 -0
- package/$server/$folder/$class/$structure/ai/system.md +1 -1
- package/$server/$folder/$class/$structure/class.js +1 -1
- package/$server/$folder/$class/$structure/handlers/methods/archive/$handler/class.js +3 -3
- package/$server/$folder/$class/$structure/handlers/pages/data/$handler/class.js +1 -3
- package/$server/$folder/$class/$structure/handlers/pages/explorer/$handler/class.js +4 -4
- package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/class.js +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/form/calendar/$handler/readme.md +40 -40
- package/$server/$folder/$class/$structure/handlers/pages/form/chat/$handler/chat.js +1 -123
- package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/class.js +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/form/email/$handler/methods/refresh/$method/class.js +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/form/search/$handler/class.js +1 -5
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/agent/$handler/class.js +6 -0
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/database/$handler/class.js +9 -0
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/messengers/$handler/class.js +6 -0
- package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/handlers/pages/form/system/$handler/tabs/messengers/$handler}/messengers.js +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/modules/$handler/class.js +5 -0
- package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/handlers/pages/form/system/$handler/tabs/modules/$handler}/modules.js +56 -19
- package/$server/$folder/$class/$structure/handlers/pages/form/system/$handler/tabs/staff/$handler/class.js +5 -0
- package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/handlers/pages/form/system/$handler/tabs/staff/$handler}/staff.js +10 -10
- package/$server/$folder/$class/$structure/handlers/pages/site/$handler/class.js +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/site/$handler/readme.md +1 -1
- package/$server/$folder/$class/$structure/handlers/pages/site/$handler/site.js +4 -4
- package/$server/$folder/$class/$structure/readme.md +3 -3
- package/$server/$folder/$class/$users/$folder/$class/$structure/$user/class.js +4 -0
- package/$server/$folder/$class/$users/class.js +4 -0
- package/$server/$folder/$class/ai/agents/integrator-1c.md +1 -1
- package/$server/$folder/$class/ai/agents/it-admin.md +1 -1
- package/$server/$folder/$class/ai/agents/org-architect.md +4 -4
- package/$server/$folder/$class/ai/agents/readme.md +1 -1
- package/$server/$folder/$class/ai/agents/schema-validator.md +2 -2
- package/$server/$folder/$class/ai/config.js +19 -19
- package/$server/$folder/$class/ai/prompt/$method/class.js +41 -41
- package/$server/$folder/$class/ai/skills/approval-flow.md +14 -14
- package/$server/$folder/$class/ai/skills/backup-check.md +13 -13
- package/$server/$folder/$class/ai/skills/computer.md +27 -27
- package/$server/$folder/$class/ai/skills/delegate-task.md +15 -15
- package/$server/$folder/$class/ai/skills/external-signup.md +14 -14
- package/$server/$folder/$class/ai/skills/lan-inventory.md +2 -2
- package/$server/$folder/$class/ai/skills/onboarding.md +15 -15
- package/$server/$folder/$class/ai/skills/orchestration.md +41 -41
- package/$server/$folder/$class/ai/skills/org-structure.md +1 -1
- package/$server/$folder/$class/ai/skills/printer-setup.md +1 -1
- package/$server/$folder/$class/ai/skills/telegram-notify.md +2 -2
- package/$server/$folder/$class/ai/skills/work-scenarios.md +3 -3
- package/$server/$folder/$class/ai/system.md +14 -8
- package/$server/$folder/$class/class.js +2 -3
- package/$server/$folder/$class/handlers/pages/form/object/$handler/class.js +0 -1
- package/$server/$folder/$class/handlers/pages/form/objects/$handler/class.js +0 -1
- package/$server/$folder/$class/handlers/pages/form/system/$handler/system.js +147 -222
- package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/files/$handler/class.js +5 -0
- package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/files/$handler/files.js +17 -0
- package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/requisites/$handler/class.js +16 -0
- package/$server/$folder/$class/handlers/pages/form/system/$handler/tabs/requisites/$handler/requisites.js +93 -0
- package/$server/$folder/$file/$audio/handlers/preview/$handler/class.js +3 -3
- package/$server/$folder/$file/$audio/handlers/preview/$handler/preview.js +88 -88
- package/$server/$folder/$file/$call/class.js +10 -10
- package/$server/$folder/$file/$call/handlers/preview/$handler/class.js +4 -4
- package/$server/$folder/$file/$call/triggers/on_save/$trigger/class.js +48 -48
- package/$server/$folder/$file/$data/class.js +16 -16
- package/$server/$folder/$file/$data/handlers/pages/form/editor/$handler/class.js +5 -5
- package/$server/$folder/$file/$data/handlers/pages/form/editor/$handler/editor.js +26 -26
- package/$server/$folder/$file/$devs/$js/class.js +2 -2
- package/$server/$folder/$file/$devs/$json/class.js +2 -2
- package/$server/$folder/$file/$devs/$ts/class.js +2 -2
- package/$server/$folder/$file/$devs/handlers/pages/form/file/$handler/class.js +3 -3
- package/$server/$folder/$file/$devs/handlers/pages/form/file/$handler/file.js +30 -30
- package/$server/$folder/$file/$eml/class.js +17 -17
- package/$server/$folder/$file/$ics/class.js +44 -44
- package/$server/$folder/$file/$ics/handlers/pages/form/file/$handler/class.js +3 -3
- package/$server/$folder/$file/$ics/handlers/pages/form/file/$handler/file.js +10 -10
- package/$server/$folder/$file/$ics/handlers/preview/$handler/class.js +3 -3
- package/$server/$folder/$file/$ics/handlers/preview/$handler/preview.js +67 -67
- package/$server/$folder/$file/$ics/readme.md +21 -21
- package/$server/$folder/$file/$image/$svg/class.js +11 -11
- package/$server/$folder/$file/$image/handlers/preview/$handler/class.js +3 -3
- package/$server/$folder/$file/$image/handlers/preview/$handler/preview.js +33 -33
- package/$server/$folder/$file/$ipynb/handlers/pages/form/file/$handler/class.js +3 -3
- package/$server/$folder/$file/$logs/class.js +39 -39
- package/$server/$folder/$file/$logs/handlers/methods/txt-test/$handler/class.js +4 -4
- package/$server/$folder/$file/$md/handlers/pages/form/file/$handler/class.js +3 -3
- package/$server/$folder/$file/$md/handlers/pages/form/file/$handler/file.js +63 -63
- package/$server/$folder/$file/$office/$outlook/$ics/class.js +227 -227
- package/$server/$folder/$file/$office/$word/$rtf/template.rtf +159 -159
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/file.js +0 -25
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/feed.js +0 -17
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/panel.js +1 -7
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/util.js +0 -1
- package/$server/$folder/$file/$task/handlers/pages/form/file/$handler/ui/voice-policy.js +2 -6
- package/$server/$folder/$file/$task/handlers/preview/$handler/class.js +3 -3
- package/$server/$folder/$file/$task/readme.md +32 -32
- package/$server/$folder/$file/$txt/handlers/preview/$handler/class.js +3 -3
- package/$server/$folder/$file/$txt/handlers/preview/$handler/preview.js +41 -41
- package/$server/$folder/$file/$video/handlers/preview/$handler/class.js +4 -4
- package/$server/$folder/$file/$video/handlers/preview/$handler/preview.js +13 -13
- package/$server/$folder/$file/class.js +2 -2
- package/$server/$folder/$file/handlers/methods/download/$handler/class.js +2 -2
- package/$server/$folder/$file/handlers/methods/download/$handler/download.js +4 -4
- package/$server/$folder/$file/handlers/pages/form/$handler/class.js +2 -2
- package/$server/$folder/$file/handlers/pages/form/file/$handler/class.js +3 -3
- package/$server/$folder/$file/handlers/pages/form/file/$handler/file.js +28 -28
- package/$server/$folder/$file/readme.md +31 -31
- package/$server/$folder/class.js +11 -11
- package/$server/$folder/handlers/methods/create/$handler/class.js +5 -5
- package/$server/$folder/handlers/pages/form/$handler/class.js +5 -5
- package/$server/$folder/handlers/pages/form/$handler/form.js +8 -8
- package/$server/$folder/handlers/readme.md +1 -1
- package/$server/$folder/lib/chat-item/chat-item.js +3 -8
- package/$server/$folder/lib/consultant/consultant.js +7 -10
- package/$server/$folder/lib/email/settings.js +82 -82
- package/$server/$folder/lib/explorer/explorer.js +1 -1
- package/$server/$folder/lib/file-viewer/file-viewer.js +8 -8
- package/$server/$folder/lib/icon/icon.js +1 -1
- package/$server/$folder/lib/icon/user/user.js +6 -6
- package/$server/$folder/lib/item-data-grid/item-data-grid.js +48 -48
- package/$server/$folder/lib/item-form/item-form.js +84 -84
- package/$server/$folder/lib/menu/readme.md +29 -29
- package/$server/$folder/lib/messenger-settings/messenger-settings.js +4 -4
- package/$server/$folder/lib/node/node.js +3 -3
- package/$server/$folder/lib/node/readme.md +29 -29
- package/$server/$folder/lib/pack/pack.js +4 -4
- package/$server/$folder/lib/prompt-bar/prompt-bar.js +2 -2
- package/$server/$folder/lib/role/role.js +1 -2
- package/$server/$folder/lib/security/admin/admin.js +3 -3
- package/$server/$folder/lib/security/security.js +4 -4
- package/$server/$folder/lib/security/users/users.js +2 -5
- package/$server/$folder/lib/site-loc/readme.md +16 -16
- package/$server/$folder/lib/site-loc/site-loc.js +3 -3
- package/$server/$folder/lib/tree/tree.js +14 -22
- package/$server/class.js +1 -0
- package/.github/workflows/ci.yml +39 -39
- package/AGENTS.md +21 -13
- package/MODULES/$domain/class.js +85 -4
- package/MODULES/$domain/handlers/pages/form/system/$handler/tabs/mcp/$handler/class.js +6 -0
- package/MODULES/$domain/handlers/pages/form/system/$handler/tabs/mcp/$handler/mcp.js +1 -0
- package/MODULES/$domain/readme.md +7 -6
- package/{SERVICES/1C/$service → MODULES/1C/$module}/class.js +7 -1
- package/MODULES/2GIS/$module/class.js +32 -0
- package/MODULES/2GIS/$module/readme.md +57 -0
- package/{SERVICES/Bitrix24/$service → MODULES/Bitrix24/$module}/class.js +7 -2
- package/{SERVICES/CBR/$service → MODULES/CBR/$module}/class.js +5 -0
- package/{SERVICES/DaData/$service → MODULES/DaData/$module}/class.js +9 -3
- package/MODULES/Geo//320/232/320/260/321/200/321/202/320/260/$catalog/handlers/pages/form/map/$handler/class.js +0 -1
- package/MODULES/KLADR/$module/handlers/pages/form/kladr/$handler/class.js +1 -1
- package/{SERVICES/Marketplaces/$service → MODULES/Marketplaces/$domain}/class.js +1 -1
- package/{SERVICES/Marketplaces/Ozon/$service → MODULES/Marketplaces/Ozon/$module}/class.js +1 -1
- package/{SERVICES/Marketplaces/Wildberries/$service → MODULES/Marketplaces/Wildberries/$module}/class.js +1 -1
- package/{SERVICES/Marketplaces/YandexMarket/$service → MODULES/Marketplaces/YandexMarket/$module}/class.js +1 -1
- package/MODULES/Process/$module/readme.md +1 -1
- package/MODULES/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" +0 -1
- package/MODULES/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" +0 -1
- package/MODULES/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/scheduler.js" +1 -1
- package/MODULES/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" +0 -1
- package/MODULES/Register/CATALOGS/$catalog/$folder/$class/{$virtual → $data/$catalog/$virtual}/class.js +3 -0
- package/MODULES/Register/CATALOGS/$catalog/$folder/$class/{$virtual → $data/$catalog/$virtual}/handlers/pages/form/virtual/$handler/class.js +0 -1
- package/MODULES/Register/CATALOGS/$catalog/$folder/$class/$data/$catalog/class.js +14 -0
- package/MODULES/Register/CATALOGS/$catalog/class.js +7 -14
- 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 +9 -0
- 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/class.js +0 -7
- 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 +11 -0
- package/MODULES/Register/CATALOGS//320/241/321/203/320/261/321/212/320/265/320/272/321/202/321/213/$catalog/class.js +0 -9
- package/MODULES/Register/OPERATIONS/$operation/$folder/$class/$data/$operation/class.js +16 -0
- package/MODULES/Register/OPERATIONS/$operation/class.js +0 -9
- package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/$folder/$class/$data/$operation/class.js +8 -0
- package/MODULES/Register/OPERATIONS//320/232/320/260/320/264/321/200/321/213/$operation/class.js +4 -10
- package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/$folder/$class/$data/$operation/class.js +8 -0
- package/MODULES/Register/OPERATIONS//320/232/320/260/321/201/321/201/320/260/$operation/class.js +0 -6
- 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 +8 -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/class.js +4 -10
- 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/$operation/$folder/$class/$data/$operation/class.js" +10 -0
- 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/$operation/class.js" +4 -12
- 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/$operation/$folder/$class/$data/$operation/class.js" +10 -0
- 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/$operation/class.js" +4 -12
- 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 +24 -0
- 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/class.js +0 -22
- 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/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" +40 -40
- 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/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" +56 -56
- package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/analysis/$handler/class.js +0 -1
- package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/postings/$handler/class.js +0 -1
- package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/turnovers/$handler/class.js +0 -1
- package/MODULES/Register/REGISTER/$register/{$folder/$class/$register/handlers → handlers}/pages/form/journal/$handler/class.js +0 -1
- package/MODULES/Register/REGISTER/$register/{$folder/$class/$register/handlers → handlers}/pages/form/sheet/$handler/class.js +0 -1
- package/MODULES/Register/REGISTER/10/$account/$folder/$class/$data/$register/$account/class.js +21 -0
- package/MODULES/Register/REGISTER/10/$account/class.js +0 -19
- package/MODULES/Register/REGISTER/68/01/$account/class.js +1 -1
- package/MODULES/Register/REGISTER/68/02/$account/class.js +1 -1
- package/MODULES/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" +1 -1
- package/MODULES/Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/$folder/$class/$data/$register/$account/class.js +14 -0
- package/MODULES/Register/REGISTER//320/232/320/260/320/264/321/200/321/213/$account/class.js +4 -16
- package/MODULES/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" +1 -1
- package/MODULES/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 +1 -1
- package/MODULES/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 +1 -1
- package/MODULES/Register/STRUCTS/$struct/class.js +4 -4
- package/{SERVICES/SearXNG/$service → MODULES/SearXNG/$module}/class.js +5 -0
- package/{SERVICES/Yandex/$service → MODULES/Yandex/$module}/class.js +7 -0
- package/{SERVICES/YandexDisk/$service → MODULES/YandexDisk/$module}/class.js +8 -2
- package/NODES/$node/$folder/$class/$node/class.js +35 -35
- package/NODES/$node/class.js +5 -5
- package/NODES/$node/handlers/pages/form/network/$handler/class.js +5 -5
- package/NODES/$node/handlers/pages/form/network/$handler/network.js +110 -110
- package/ORGANIZATIONS/$domain/$folder/$class/$structure/$organization/class.js +5 -0
- package/ORGANIZATIONS/$domain/class.js +5 -5
- package/{$server/$folder/$class/handlers/pages/form/system/$handler/tabs/ai-model.js → models/$ai/$folder/$class/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js} +7 -0
- package/models/$ai/$folder/$class/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +6 -0
- package/{$server/$folder/$class/handlers/pages/form/system/$handler/tabs/ai-provider.js → models/$ai/$folder/$class/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js} +7 -0
- package/models/$ai/$folder/$class/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +6 -0
- package/{MODELS → models}/$ai/$folder/$class/$provider/readme.md +16 -16
- package/models/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +6 -0
- package/{MODELS → models}/GigaChat/$provider/readme.md +24 -24
- package/{$server/$folder/$class/handlers/pages/form/system/$handler/tabs/ai-local.js → models/Local/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js} +8 -1
- package/models/Local/$provider/handlers/pages/form/system/$handler/tabs/ai/$handler/class.js +6 -0
- package/oda/benchmarks/dbmon/lib/ENV.js +213 -213
- package/oda/benchmarks/dbmon/lib/ga.js +11 -11
- package/oda/benchmarks/dbmon/lib/memory-stats.js +105 -105
- package/oda/benchmarks/dbmon/lib/monitor.js +69 -69
- package/oda/benchmarks/sierpinski/sierpinski.js +149 -149
- package/oda/components/editors/code-editor/code-editor.js +387 -387
- package/oda/components/editors/code-editor/src/ace.js +16 -16
- package/oda/components/editors/code-editor/src/beautify-css.js +1625 -1625
- package/oda/components/editors/code-editor/src/beautify-html.js +3122 -3122
- package/oda/components/editors/code-editor/src/beautify.js +4005 -4005
- package/oda/components/editors/code-editor/src/ext-beautify.js +7 -7
- package/oda/components/editors/code-editor/src/ext-code_lens.js +7 -7
- package/oda/components/editors/code-editor/src/ext-elastic_tabstops_lite.js +7 -7
- package/oda/components/editors/code-editor/src/ext-emmet.js +7 -7
- package/oda/components/editors/code-editor/src/ext-error_marker.js +7 -7
- package/oda/components/editors/code-editor/src/ext-hardwrap.js +7 -7
- package/oda/components/editors/code-editor/src/ext-keybinding_menu.js +7 -7
- package/oda/components/editors/code-editor/src/ext-language_tools.js +7 -7
- package/oda/components/editors/code-editor/src/ext-linking.js +7 -7
- package/oda/components/editors/code-editor/src/ext-modelist.js +7 -7
- package/oda/components/editors/code-editor/src/ext-options.js +7 -7
- package/oda/components/editors/code-editor/src/ext-prompt.js +7 -7
- package/oda/components/editors/code-editor/src/ext-rtl.js +7 -7
- package/oda/components/editors/code-editor/src/ext-searchbox.js +7 -7
- package/oda/components/editors/code-editor/src/ext-settings_menu.js +7 -7
- package/oda/components/editors/code-editor/src/ext-spellcheck.js +7 -7
- package/oda/components/editors/code-editor/src/ext-split.js +7 -7
- package/oda/components/editors/code-editor/src/ext-static_highlight.js +7 -7
- package/oda/components/editors/code-editor/src/ext-statusbar.js +7 -7
- package/oda/components/editors/code-editor/src/ext-textarea.js +7 -7
- package/oda/components/editors/code-editor/src/ext-themelist.js +7 -7
- package/oda/components/editors/code-editor/src/ext-whitespace.js +7 -7
- package/oda/components/editors/code-editor/src/keybinding-emacs.js +7 -7
- package/oda/components/editors/code-editor/src/keybinding-sublime.js +7 -7
- package/oda/components/editors/code-editor/src/keybinding-vim.js +7 -7
- package/oda/components/editors/code-editor/src/keybinding-vscode.js +7 -7
- package/oda/components/editors/code-editor/src/mode-css.js +7 -7
- package/oda/components/editors/code-editor/src/mode-html.js +7 -7
- package/oda/components/editors/code-editor/src/mode-javascript.js +7 -7
- package/oda/components/editors/code-editor/src/mode-json.js +7 -7
- package/oda/components/editors/code-editor/src/mode-markdown.js +7 -7
- package/oda/components/editors/code-editor/src/mode-svg.js +7 -7
- package/oda/components/editors/code-editor/src/mode-text.js +7 -7
- package/oda/components/editors/code-editor/src/mode-xml.js +7 -7
- package/oda/components/editors/code-editor/src/mode-xquery.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/css.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/html.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/javascript.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/json.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/markdown.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/svg.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/text.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/xml.js +7 -7
- package/oda/components/editors/code-editor/src/snippets/xquery.js +7 -7
- package/oda/components/editors/code-editor/src/theme-solarized_dark.js +7 -7
- package/oda/components/editors/code-editor/src/theme-solarized_light.js +7 -7
- package/oda/components/editors/markdown/markdown-editor/lib/font-awesome.min.css +3 -3
- package/oda/components/editors/markdown/markdown-editor/lib/readme.md +332 -332
- package/oda/components/editors/markdown/markdown-editor/markdown-editor.js +78 -78
- package/oda/components/editors/markdown/markdown-viewer/test.md +239 -239
- package/oda/components/editors/markdown/markdown.js +76 -76
- package/oda/components/inputs/block/readme.md +39 -39
- package/oda/components/inputs/checkbox/checkbox.js +92 -92
- package/oda/components/inputs/color/color.js +83 -83
- package/oda/components/inputs/date/date.js +40 -40
- package/oda/components/inputs/input/input.js +219 -219
- package/oda/components/inputs/link/readme.md +42 -42
- package/oda/components/inputs/markdown-input/markdown-input.js +77 -77
- package/oda/components/inputs/numeric/numeric.js +141 -141
- package/oda/components/inputs/table-input/readme.md +39 -39
- package/oda/components/inputs/text/text.js +88 -88
- package/oda/components/inputs/toggle/toggle.js +101 -101
- package/oda/components/layouts/hexagon-layout/hexagon-layout.js +218 -218
- package/oda/components/menus/menu/index_old.html +140 -140
- package/oda/components/structure/controls-map.js +56 -56
- package/oda/components/structure/controls.js +29 -29
- package/oda/components/structure/readme.md +31 -31
- package/oda/components/structure/structure.js +64 -64
- package/oda/components/table/index.html +210 -210
- package/oda/components/table/lib/coerce.js +68 -68
- package/oda/components/table/lib/column.js +568 -568
- package/oda/components/table/readme.md +120 -120
- package/oda/components/table/router.js +86 -86
- package/oda/components/table/settings.js +89 -89
- package/oda/index.html +159 -159
- package/oda/tools/icons/icons-set/icons-set.js +60 -60
- package/oda/tools/icons/lib/svg/_makeSVG.html +41 -41
- package/oda/tools/icons/lib/svg/aws.svg +2679 -2679
- package/oda/tools/icons/lib/svg/info.json +46 -46
- package/oda/tools/jupyter/demo.ipynb +160 -160
- package/oda/tools/jupyter/lib/print_elements.js +73 -73
- package/oda/tools/jupyter/test-2.ipynb +305 -305
- package/oda/tools/jupyter/test.ipynb +603 -603
- package/oda/tools/styles/adoptedStyleSheets.js +333 -333
- package/oda/tools/tester/device-preview/devices.json +9 -9
- package/package.json +1 -1
- package/readme.md +6 -7
- package/rules/rules.md +445 -445
- package/scripts/SYNC-README.md +107 -107
- package/scripts/agent-eval.mjs +223 -223
- package/scripts/check-architecture.mjs +541 -0
- package/scripts/cleanup-storage.mjs +1 -1
- package/scripts/demo-seed.mjs +3 -3
- package/scripts/dump-svn-chat.mjs +9 -9
- package/scripts/extract-chat-day.mjs +21 -21
- package/scripts/import-bis.mjs +33 -15
- package/scripts/import-delovaya.mjs +26 -14
- package/scripts/rag-bench.mjs +166 -166
- package/scripts/restore-chat.mjs +166 -166
- package/scripts/sync-svn-git.bat +129 -129
- package/scripts/test-merge.mjs +75 -75
- package/scripts/work-desktop-bridge.mjs +101 -101
- package/sources/client/class.js +16 -10
- package/sources/client/field.js +168 -168
- package/sources/client/folder.js +10 -22
- package/sources/client/handler.js +8 -2
- package/sources/client/index.js +32 -32
- package/sources/client/readme.md +16 -16
- package/sources/client.js +0 -12
- package/sources/core.js +91 -91
- package/sources/data/api.js +9 -10
- package/sources/data/choices.js +125 -125
- package/sources/data/classes.js +85 -9
- package/sources/data/db.js +10 -6
- package/sources/data/print.js +15 -41
- package/sources/data/readme.md +5 -5
- package/sources/data/schema.js +206 -118
- package/sources/data/sql-inspector.js +7 -7
- package/sources/host/auth-methods.js +2 -5
- package/sources/host/auto-updater.js +1 -2
- package/sources/host/babel-merge.js +353 -353
- package/sources/host/config.js +48 -48
- package/sources/host/index-db.js +94 -94
- package/sources/host/net-guard.js +228 -228
- package/sources/host/package-install.js +63 -63
- package/sources/host/prewarm.js +1 -1
- package/sources/host/push.js +86 -86
- package/sources/host/readme.md +41 -41
- package/sources/host/secret-box.js +93 -93
- package/sources/host/server-id.js +26 -26
- package/sources/host/stun.js +33 -33
- package/sources/host/tls-ca.js +60 -60
- package/sources/host/vapid.js +14 -14
- package/sources/host/watch.js +1 -1
- package/sources/modules/a2a/server.js +608 -608
- package/sources/modules/agent/connections.js +442 -442
- package/sources/modules/agent/diff.js +69 -69
- package/sources/modules/agent/eval.js +222 -222
- package/sources/modules/agent/extensions.js +48 -38
- package/sources/modules/agent/hooks.js +131 -131
- package/sources/modules/agent/index.js +2 -5
- package/sources/modules/agent/log.js +43 -43
- package/sources/modules/agent/loop.js +0 -65
- package/sources/modules/agent/mcp-pool.js +253 -253
- package/sources/modules/agent/node-rules.js +69 -41
- package/sources/modules/agent/permissions.js +1 -1
- package/sources/modules/agent/plugins.js +11 -11
- package/sources/modules/agent/recovery.js +89 -89
- package/sources/modules/agent/resources.js +96 -52
- package/sources/modules/agent/session.js +15 -350
- package/sources/modules/agent/taint.js +100 -100
- package/sources/modules/agent/tools/branch.js +311 -311
- package/sources/modules/agent/tools/browser.js +254 -254
- package/sources/modules/agent/tools/computer.js +120 -120
- package/sources/modules/agent/tools/connect.js +316 -316
- package/sources/modules/agent/tools/dev/lsp.js +334 -334
- package/sources/modules/agent/tools/dev/patch.js +564 -564
- package/sources/modules/agent/tools/memory.js +153 -153
- package/sources/modules/agent/tools/meta.js +0 -60
- package/sources/modules/agent/tools/net.js +1 -1
- package/sources/modules/agent/tools/os-files.js +358 -358
- package/sources/modules/agent/tools/plugins.js +80 -80
- package/sources/modules/agent/tools/sandbox.js +268 -268
- package/sources/modules/agent/tools/services.js +7 -7
- package/sources/modules/agent/tools/work/access.js +10 -8
- package/sources/modules/agent/tools/work/classes.js +26 -47
- package/sources/modules/agent/tools/work/common.js +8 -10
- package/sources/modules/agent/tools/work/data.js +4 -4
- package/sources/modules/agent/triggers.js +1 -1
- package/sources/modules/agent/twin-bus.js +4 -4
- package/sources/modules/agent/types.d.ts +183 -183
- package/sources/modules/agent/undo.js +254 -254
- package/sources/modules/agent/util.js +179 -179
- package/sources/modules/agent/voice.js +1 -1
- package/sources/modules/call/call.js +4 -4
- package/sources/modules/contacts/contacts.js +200 -200
- package/sources/modules/contacts/index.html +546 -546
- package/sources/modules/kladr/index.js +3 -3
- package/sources/modules/lan/discovery.js +192 -192
- package/sources/modules/lan/register.js +7 -7
- package/sources/modules/lan/store.js +62 -62
- package/sources/modules/mcp/readme.md +70 -70
- package/sources/modules/mcp/server.js +525 -525
- package/sources/modules/mcp/tokens.js +140 -140
- package/sources/modules/mcp-marketplaces/ozon.js +1 -1
- package/sources/modules/mcp-marketplaces/wildberries.js +1 -1
- package/sources/modules/mcp-marketplaces/yandex-market.js +1 -1
- package/sources/modules/nodes/identity.js +123 -123
- package/sources/modules/nodes/mount.js +2 -4
- package/sources/modules/nodes/outbound.js +105 -105
- package/sources/modules/nodes/signing.js +71 -71
- package/sources/modules/notify/index.js +18 -18
- package/sources/modules/rag/embed-worker.js +36 -36
- package/sources/modules/rag/extract.js +9 -2
- package/sources/modules/rag/indexer.js +1 -1
- package/sources/modules/rag/readme.md +70 -70
- package/sources/modules/rag/scope.js +7 -33
- package/sources/modules/readme.md +21 -21
- package/sources/modules/sandbox/config.js +74 -74
- package/sources/modules/sandbox/driver.js +100 -100
- package/sources/modules/sandbox/images/work-computer/Dockerfile +34 -34
- package/sources/modules/sandbox/images/work-computer/entrypoint.sh +24 -24
- package/sources/modules/sandbox/manager.js +1089 -1089
- package/sources/modules/sandbox/readme.md +63 -63
- package/sources/modules/sandbox/vnc-proxy.js +296 -296
- package/sources/modules/trainer/dataset.js +2 -2
- package/sources/modules/trainer/local-engine.js +1 -1
- package/sources/page.html +2 -2
- package/sources/readme.md +1 -1
- package/sources/server/access/audit.js +138 -138
- package/sources/server/access/gateway.js +19 -19
- package/sources/server/access/invites.js +4 -5
- package/sources/server/access/links.js +10 -8
- package/sources/server/access/policy.js +65 -39
- package/sources/server/access/refs.js +106 -106
- package/sources/server/access/workplaces.js +20 -14
- package/sources/server/assert-class-id.js +23 -23
- package/sources/server/chat-threads.js +1 -12
- package/sources/server/class/archive.js +15 -15
- package/sources/server/class/base-template.js +13 -9
- package/sources/server/class/distro.js +3 -4
- package/sources/server/class/feed.js +3 -3
- package/sources/server/class/mail-calendar.js +9 -8
- package/sources/server/class/scaffold.js +110 -60
- package/sources/server/class/search.js +2 -2
- package/sources/server/class/security.js +76 -94
- package/sources/server/class.js +177 -63
- package/sources/server/external-source.js +90 -90
- package/sources/server/file.js +1 -1
- package/sources/server/folder.js +305 -162
- package/sources/server/handler.js +27 -1
- package/sources/server/index.js +12 -12
- package/sources/server/logs.js +7 -7
- package/sources/server/memory-mark.js +34 -34
- package/sources/server/node.js +12 -43
- package/sources/server/readme.md +110 -110
- package/sources/server/safe-node-name.js +67 -67
- package/sources/server/server.js +10 -11
- package/sources/server/upload-mark.js +24 -24
- package/sources/server/zip-guard.js +81 -81
- package/whitepaper.md +568 -568
- package/$server/$folder/$class/$device/class.js +0 -3
- package/$server/$folder/$class/$handler/$task/class.js +0 -3
- package/$server/$folder/$class/$service/$class/$service/class.js +0 -4
- package/$server/$folder/$class/$structure/$base/class.js +0 -10
- package/$server/$folder/$class/$structure/$base/roots_1/roots.test +0 -0
- package/SERVICES/$service/$folder/$storage/$service/class.js +0 -8
- package/SERVICES/$service/class.js +0 -442
- package/SERVICES/readme.md +0 -36
- package/sources/modules/agent/scope.js +0 -387
- /package/$server/$folder/$class/$structure/{$base → $organization}/icon.png +0 -0
- /package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/$server/handlers/pages/form/system/$handler/tabs/license/$handler}/license.js +0 -0
- /package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/handlers/pages/form/system/$handler/tabs/agent/$handler}/agent.js +0 -0
- /package/$server/$folder/$class/{handlers/pages/form/system/$handler/tabs → $structure/handlers/pages/form/system/$handler/tabs/database/$handler}/database.js +0 -0
- /package/{SERVICES/DuckDuckGo/$service → MODULES/DuckDuckGo/$module}/class.js +0 -0
- /package/MODULES/KLADR/$module/$folder/$class/{$catalog → $data/$catalog}/class.js +0 -0
- /package/MODULES/Process/$module/$folder/$class/{$catalog → $data/$catalog}/class.js +0 -0
- /package/MODULES/Register/$module/$folder/$class/{$catalog → $data/$catalog}/class.js +0 -0
- /package/MODULES/Register/$module/$folder/$class/{$operation → $data/$operation}/class.js +0 -0
- /package/MODULES/Register/$module/$folder/$class/{$register → $data/$register}/class.js +0 -0
- /package/MODULES/Register/$module/$folder/$class/{$struct → $data/$struct}/class.js +0 -0
- /package/MODULES/Register/CATALOGS/$catalog/$folder/$class/{$virtual/$folder/$class → $data/$catalog/$virtual/$folder/$class/$data/$catalog}/$virtual/class.js +0 -0
- /package/MODULES/Register/CATALOGS/$catalog/$folder/$class/{$virtual → $data/$catalog/$virtual}/handlers/pages/form/virtual/$handler/virtual.js +0 -0
- /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/$operation/{print → $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/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/class.js +0 -0
- /package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/analysis/$handler/analysis.js +0 -0
- /package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/postings/$handler/postings.js +0 -0
- /package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/handlers/pages/form/turnovers/$handler/turnovers.js +0 -0
- /package/MODULES/Register/REGISTER/$register/$folder/$class/{$account → $data/$register/$account}/readme.md +0 -0
- /package/MODULES/Register/REGISTER/$register/$folder/$class/{$register → $data/$register}/class.js +0 -0
- /package/MODULES/Register/REGISTER/$register/{$folder/$class/$register/handlers → handlers}/pages/form/journal/$handler/journal.js +0 -0
- /package/MODULES/Register/REGISTER/$register/{$folder/$class/$register/handlers → handlers}/pages/form/sheet/$handler/sheet.js +0 -0
- /package/MODULES/Register/STRUCTS/$struct/$folder/$class/{$struct → $data/$struct}/class.js +0 -0
- /package/{SERVICES/RuCalendar/$service → MODULES/RuCalendar/$module}/class.js +0 -0
- /package/{SERVICES/Telegram/$service → MODULES/Telegram/$module}/class.js +0 -0
- /package/{SERVICES/Weather/$service → MODULES/Weather/$module}/class.js +0 -0
- /package/PROJECTS/$domain/$folder/$class/{$project → $structure/$project}/class.js +0 -0
- /package/{MODELS → models}/$ai/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/$ai/$folder/$class/$ai/methods/chat/$method/class.js +0 -0
- /package/{MODELS → models}/$ai/$folder/$class/$provider/class.js +0 -0
- /package/{MODELS → models}/$ai/class.js +0 -0
- /package/{$server/$folder/$class/handlers/pages/form/system/$handler/tabs/ai-root.js → models/$ai/handlers/pages/form/system/$handler/tabs/ai/$handler/ai.js} +0 -0
- /package/{MODELS → models}/$ai/readme.md +0 -0
- /package/{MODELS → models}/GigaChat/$provider/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/GigaChat/$provider/class.js +0 -0
- /package/{MODELS → models}/GigaChat/GigaChat 2 Lite/$ai/class.js +0 -0
- /package/{MODELS → models}/GigaChat/GigaChat 2 Max/$ai/class.js +0 -0
- /package/{MODELS → models}/GigaChat/GigaChat 2 Pro/$ai/class.js +0 -0
- /package/{MODELS → models}/GigaChat/GigaChat Embeddings/$ai/class.js +0 -0
- /package/{MODELS → models}/Local/$provider/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/Local/$provider/class.js +0 -0
- /package/{MODELS → models}/Local/$provider/handlers/methods/transfer/$handler/class.js +0 -0
- /package/{MODELS → models}/MTS-AI/$provider/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/MTS-AI/$provider/class.js +0 -0
- /package/{MODELS → models}/MTS-AI/Cotype Lite/$ai/class.js +0 -0
- /package/{MODELS → models}/MTS-AI/Cotype Pro 2/$ai/class.js +0 -0
- /package/{MODELS → models}/MTS-AI/Cotype Vision/$ai/class.js +0 -0
- /package/{MODELS → models}/T-Bank/$provider/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/T-Bank/$provider/class.js +0 -0
- /package/{MODELS → models}/T-Bank/T-Lite 2.0/$ai/class.js +0 -0
- /package/{MODELS → models}/T-Bank/T-Pro 2.0/$ai/class.js +0 -0
- /package/{MODELS → models}/T-Bank/T-VoiceKit ASR/$ai/class.js +0 -0
- /package/{MODELS → models}/T-Bank/T-VoiceKit TTS/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/$provider/$folder/$class/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/$provider/class.js +0 -0
- /package/{MODELS → models}/Yandex/Alice AI (YandexGPT 5 Pro)/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/Yandex Embeddings/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/Yandex SpeechKit ASR/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/Yandex SpeechKit TTS/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/YandexART/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/YandexGPT 5 Lite/$ai/class.js +0 -0
- /package/{MODELS → models}/Yandex/YandexGPT Reasoning/$ai/class.js +0 -0
- /package/{USERS → users}/$users/class.js +0 -0
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Инварианты канона (docs/architecture.md, п. 10): сканер отклонений и «храповик».
|
|
4
|
+
*
|
|
5
|
+
* Сканер считает места, где код и дерево расходятся с каноном, и сверяет их с реестром
|
|
6
|
+
* docs/architecture-deviations.json. Реестр может только сокращаться: новое отклонение — ошибка,
|
|
7
|
+
* исправленное нужно вычеркнуть (`--prune`).
|
|
8
|
+
*
|
|
9
|
+
* node scripts/check-architecture.mjs отчёт; код 1, если есть новые или устаревшие записи
|
|
10
|
+
* node scripts/check-architecture.mjs --prune вычеркнуть исправленное (добавлять не умеет)
|
|
11
|
+
* node scripts/check-architecture.mjs --init создать реестр, если его ещё нет
|
|
12
|
+
*/
|
|
13
|
+
import fs from 'node:fs';
|
|
14
|
+
import path from 'node:path';
|
|
15
|
+
import { execFileSync } from 'node:child_process';
|
|
16
|
+
import { pathToFileURL } from 'node:url';
|
|
17
|
+
import parser from '@babel/parser';
|
|
18
|
+
|
|
19
|
+
export const ROOT = path.resolve(import.meta.dirname, '..');
|
|
20
|
+
export const CANON = 'docs/architecture.md';
|
|
21
|
+
export const REGISTRY = 'docs/architecture-deviations.json';
|
|
22
|
+
export const DIGEST = '$server/$folder/$class/ai/system.md';
|
|
23
|
+
|
|
24
|
+
/** Формулировки п. 10 канона; тест сверяет их с документом. */
|
|
25
|
+
export const INVARIANTS = {
|
|
26
|
+
1: 'В ядре нет имён типов, кроме базиса.',
|
|
27
|
+
2: 'В коде нет корневых путей дерева.',
|
|
28
|
+
3: 'Поведение определяется свойствами и файлами типа; списков типов нет.',
|
|
29
|
+
4: 'Всё наследуемое собирается одной функцией через `~`.',
|
|
30
|
+
5: 'Ссылки наследования — только `ancestor` и `types` в `class.js`; из пути ничего не вычисляется.',
|
|
31
|
+
6: 'Папка `ai/` есть только у структур и у модулей (как поставка).',
|
|
32
|
+
7: 'Представления и вкладки — файлы типа; ветвлений по типу в формах нет.',
|
|
33
|
+
8: 'У сущности одно описание: списков в коде, дублирующих папки дерева, нет.',
|
|
34
|
+
9: 'Прослоек совместимости и устаревших псевдонимов нет.',
|
|
35
|
+
10: 'Встроенная роль одна — `BOSS`.',
|
|
36
|
+
11: 'Выжимка канона совпадает с каноном; каждый путь, упомянутый в документах, существует.',
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** Что именно считает сканер по каждому инварианту (пишется в реестр рядом с цифрами). */
|
|
40
|
+
export const MEASURES = {
|
|
41
|
+
1: 'Ядро: имена типов, кроме базиса, в строках, шаблонах, регулярных выражениях и идентификаторах.',
|
|
42
|
+
2: 'Ядро и системный типизатор: корневые пути дерева в строках и регулярных выражениях.',
|
|
43
|
+
3: 'Ядро и системный типизатор (кроме форм): массивы, объекты и switch, перечисляющие типы.',
|
|
44
|
+
4: 'Ядро вне sources/server/folder.js: обращения к послойным примитивам и собственным сборщикам слоёв.',
|
|
45
|
+
5: 'Ядро: регулярные выражения и строковые проверки путей с именами типов или корневых узлов.',
|
|
46
|
+
6: 'Дерево: папки ai/ у типов, в цепочке которых нет $structure или $module.',
|
|
47
|
+
7: 'Формы (handlers/pages): имена типов в кавычках — сравнения и списки.',
|
|
48
|
+
8: 'Ядро без oda/: списки с именами узлов /MODELS, /SERVICES, /MODULES и константы *_PRESETS, *_TEMPLATES, *_CATALOG.',
|
|
49
|
+
9: 'Ядро и системный типизатор: слова legacy, deprecated, backward, «устаревш», «для совместимости».',
|
|
50
|
+
10: 'Ядро и системный типизатор: роли ADMIN, GUEST, USER, CLIENT как строки и ключи.',
|
|
51
|
+
11: 'Документы: пути в обратных кавычках, которых нет в репозитории.',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Базис, известный ядру по имени (канон, п. 9). */
|
|
55
|
+
export const BASIS = ['$folder', '$file', '$class', '$handler'];
|
|
56
|
+
/** Папка модулей внутри структуры (канон, п. 4) и маркеры ролей (п. 4.1) — не корневые пути. */
|
|
57
|
+
const NOT_ROOT_WHEN_BARE = ['MODULES', 'USERS'];
|
|
58
|
+
/** Роли, которые канон убирает из встроенных (п. 4.1, инвариант 10). */
|
|
59
|
+
const EXTRA_ROLES = ['ADMIN', 'GUEST', 'USER', 'CLIENT'];
|
|
60
|
+
/** Дом единственной функции сборки слоёв (канон, п. 3.4). */
|
|
61
|
+
const LAYER_HOME = 'sources/server/folder.js';
|
|
62
|
+
/** Послойные примитивы и собственные сборщики слоёв: вне LAYER_HOME всё наследуемое берётся через `~`. */
|
|
63
|
+
const LAYER_PRIMITIVES = ['_tilde_layers', 'inherit_ancestor', 'type_chain', 'aiDirs'];
|
|
64
|
+
const COMPAT_WORDS = /legacy|deprecated|backward|устаревш|для совместимости|обратн[а-яё]+ совместим/gi;
|
|
65
|
+
const PRESET_NAME = /^[A-Z][A-Z0-9_]*(PRESETS?|TEMPLATES?|CATALOG)$/;
|
|
66
|
+
/** Сторонние библиотеки внутри oda/ — не код WORK. */
|
|
67
|
+
const VENDOR = /\.min\.js$|^oda\/components\/editors\/(code-editor\/src|markdown\/[^/]+\/lib)\//;
|
|
68
|
+
const PATH_METHODS = ['startsWith', 'endsWith', 'includes', 'indexOf', 'lastIndexOf', 'split'];
|
|
69
|
+
/** Контейнеры, чьи дети — описания сущностей (модели, подключения, модули). */
|
|
70
|
+
const ENTITY_ROOTS = ['MODELS', 'SERVICES', 'MODULES'];
|
|
71
|
+
const AST_SKIP = new Set(['loc', 'start', 'end', 'range', 'extra', 'comments', 'leadingComments', 'trailingComments', 'innerComments', 'tokens', 'errors']);
|
|
72
|
+
|
|
73
|
+
const isJs = f => /\.(js|mjs)$/.test(f);
|
|
74
|
+
export const isCore = f => isJs(f) && !VENDOR.test(f) && (/^(sources|oda)\//.test(f) || f === 'run.mjs');
|
|
75
|
+
export const isTypizer = f => isJs(f) && f.startsWith('$server/$folder/');
|
|
76
|
+
export const isForm = f => isJs(f) && f.includes('/handlers/pages/') && !/^(organizations|users)\//i.test(f);
|
|
77
|
+
const isDoc = f => f === 'AGENTS.md' || f === 'readme.md' || f === DIGEST || /^docs\/[^/]+\.md$/.test(f);
|
|
78
|
+
|
|
79
|
+
const escapeRe = s => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
80
|
+
const norm = s => String(s).toLowerCase().replace(/[^a-z0-9а-яё]/g, '');
|
|
81
|
+
const clip = s => (s.length > 70 ? s.slice(0, 67) + '…' : s);
|
|
82
|
+
|
|
83
|
+
/** Файлы репозитория: отслеживаемые и новые неигнорируемые. Нет git — null. */
|
|
84
|
+
export function listFiles(root = ROOT) {
|
|
85
|
+
try {
|
|
86
|
+
const out = execFileSync('git', ['-c', 'core.quotepath=false', 'ls-files', '--cached', '--others', '--exclude-standard', '-z'],
|
|
87
|
+
{ cwd: root, encoding: 'utf-8', maxBuffer: 256 << 20, stdio: ['ignore', 'pipe', 'ignore'] });
|
|
88
|
+
return out.split('\0').filter(f => f && fs.existsSync(path.join(root, f))).sort();
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Словарь дерева: имена типов, корневые узлы, цепочки системного типизатора, имена сущностей. */
|
|
96
|
+
export function treeFacts(files) {
|
|
97
|
+
const types = new Set();
|
|
98
|
+
const roots = new Set();
|
|
99
|
+
const entities = new Set();
|
|
100
|
+
const chains = new Map();
|
|
101
|
+
const paths = new Set();
|
|
102
|
+
for (const f of files) {
|
|
103
|
+
const segs = f.split('/');
|
|
104
|
+
for (let i = 1; i <= segs.length; i++)
|
|
105
|
+
paths.add(segs.slice(0, i).join('/').toLowerCase());
|
|
106
|
+
const dirs = segs.slice(0, -1);
|
|
107
|
+
for (const s of dirs) {
|
|
108
|
+
if (/^\$[A-Za-z]/.test(s))
|
|
109
|
+
types.add(s);
|
|
110
|
+
}
|
|
111
|
+
if (dirs.length > 1 && !dirs[0].startsWith('$') && dirs[1].startsWith('$'))
|
|
112
|
+
roots.add(dirs[0].toUpperCase());
|
|
113
|
+
if (dirs.length > 1 && ENTITY_ROOTS.includes(dirs[0].toUpperCase()) && !dirs[1].startsWith('$'))
|
|
114
|
+
entities.add(norm(dirs[1]));
|
|
115
|
+
// цепочка типа — путь его первого объявления в ветке $folder корня
|
|
116
|
+
if (dirs[0] === '$server' && dirs[1] === '$folder') {
|
|
117
|
+
for (let i = 2; i < dirs.length && dirs[i].startsWith('$'); i++) {
|
|
118
|
+
if (!chains.has(dirs[i]))
|
|
119
|
+
chains.set(dirs[i], dirs.slice(2, i + 1));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
entities.delete('');
|
|
124
|
+
const nonBasis = new Set([...types].filter(t => !BASIS.includes(t)));
|
|
125
|
+
return { types, nonBasis, roots, entities, chains, paths };
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function parse(code) {
|
|
129
|
+
return parser.parse(code, {
|
|
130
|
+
sourceType: 'unambiguous', errorRecovery: true, allowReturnOutsideFunction: true,
|
|
131
|
+
allowAwaitOutsideFunction: true, allowSuperOutsideMethod: true, allowUndeclaredExports: true,
|
|
132
|
+
plugins: ['importAttributes'],
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function walk(node, visit, stack = [], key = null) {
|
|
137
|
+
visit(node, stack, key);
|
|
138
|
+
stack.push(node);
|
|
139
|
+
for (const k in node) {
|
|
140
|
+
if (AST_SKIP.has(k))
|
|
141
|
+
continue;
|
|
142
|
+
const v = node[k];
|
|
143
|
+
if (Array.isArray(v)) {
|
|
144
|
+
for (const c of v) {
|
|
145
|
+
if (c && typeof c.type === 'string')
|
|
146
|
+
walk(c, visit, stack, k);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if (v && typeof v.type === 'string')
|
|
150
|
+
walk(v, visit, stack, k);
|
|
151
|
+
}
|
|
152
|
+
stack.pop();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** Имена типов в тексте литерала (`$power-point` — с дефисом). */
|
|
156
|
+
function typeTokens(text, set) {
|
|
157
|
+
const out = [];
|
|
158
|
+
for (const m of String(text).matchAll(/\$[A-Za-z][\w-]*/g)) {
|
|
159
|
+
let t = m[0];
|
|
160
|
+
while (t && !set.has(t)) {
|
|
161
|
+
const i = t.lastIndexOf('-');
|
|
162
|
+
t = i > 0 ? t.slice(0, i) : '';
|
|
163
|
+
}
|
|
164
|
+
if (t)
|
|
165
|
+
out.push(t);
|
|
166
|
+
}
|
|
167
|
+
return out;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Куски текста литерала: anchored — кусок начинает значение (не хвост конкатенации или шаблона). */
|
|
171
|
+
function pieces(node, parent, key) {
|
|
172
|
+
const tail = parent?.type === 'BinaryExpression' && parent.operator === '+' && key === 'right';
|
|
173
|
+
if (node.type === 'StringLiteral' || node.type === 'DirectiveLiteral')
|
|
174
|
+
return [{ text: node.value, anchored: !tail, kind: 'string' }];
|
|
175
|
+
if (node.type === 'TemplateLiteral')
|
|
176
|
+
return node.quasis.map((q, i) => ({ text: q.value.cooked ?? q.value.raw ?? '', anchored: i === 0 && !tail, kind: 'template' }));
|
|
177
|
+
if (node.type === 'RegExpLiteral')
|
|
178
|
+
return [{ text: node.pattern, anchored: false, kind: 'regex' }];
|
|
179
|
+
return [];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
const plainRegex = pattern => pattern.replace(/\\(.)/g, '$1').replace(/\(\?[:=!]/g, '(');
|
|
183
|
+
|
|
184
|
+
/** Корневые пути в куске литерала → ['/MODULES', …]. */
|
|
185
|
+
function rootPaths(piece, roots) {
|
|
186
|
+
if (!roots.size)
|
|
187
|
+
return [];
|
|
188
|
+
const names = [...roots].map(escapeRe).join('|');
|
|
189
|
+
const bare = [...roots].filter(r => !NOT_ROOT_WHEN_BARE.includes(r)).map(escapeRe).join('|');
|
|
190
|
+
const out = [];
|
|
191
|
+
if (piece.kind === 'regex') {
|
|
192
|
+
for (const m of plainRegex(piece.text).matchAll(new RegExp('\\^\\(*\\/?\\(*(?:[\\w$-]+\\|)*(' + names + ')(?![\\w-])', 'g')))
|
|
193
|
+
out.push('/' + m[1]);
|
|
194
|
+
return out;
|
|
195
|
+
}
|
|
196
|
+
const text = piece.text;
|
|
197
|
+
if (piece.anchored) {
|
|
198
|
+
let m = text.match(new RegExp('^\\/(' + names + ')(?![\\w-])'));
|
|
199
|
+
if (!m && bare)
|
|
200
|
+
m = text.match(new RegExp('^(' + bare + ')(?=\\/|$)'));
|
|
201
|
+
if (m)
|
|
202
|
+
out.push('/' + m[1]);
|
|
203
|
+
}
|
|
204
|
+
for (const m of text.matchAll(new RegExp('[\\s\'"`(\\[,;=|>]\\/(' + names + ')(?![\\w-])', 'g')))
|
|
205
|
+
out.push('/' + m[1]);
|
|
206
|
+
return out;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** Есть ли в тексте имя типа (кроме базиса) или корневой узел рядом со слэшем. */
|
|
210
|
+
function pathVocabulary(text, facts) {
|
|
211
|
+
if (typeTokens(text, facts.nonBasis).length)
|
|
212
|
+
return true;
|
|
213
|
+
if (!facts.roots.size)
|
|
214
|
+
return false;
|
|
215
|
+
const names = [...facts.roots].map(escapeRe).join('|');
|
|
216
|
+
return new RegExp('(?:\\/(?:' + names + ')(?![\\w-])|(?<![\\w-])(?:' + names + ')\\/)').test(text);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Перечень типов в массиве, объекте или switch → подпись «$a $b» либо ''. */
|
|
220
|
+
function typeListing(node, facts) {
|
|
221
|
+
let names = [];
|
|
222
|
+
if (node.type === 'ArrayExpression')
|
|
223
|
+
names = node.elements.map(e => (e?.type === 'StringLiteral' ? e.value : null));
|
|
224
|
+
else if (node.type === 'ObjectExpression')
|
|
225
|
+
names = node.properties.map(p => (p.computed || !p.key ? null : p.key.type === 'Identifier' ? p.key.name : p.key.type === 'StringLiteral' ? p.key.value : null));
|
|
226
|
+
else if (node.type === 'SwitchStatement')
|
|
227
|
+
names = node.cases.map(c => (c.test?.type === 'StringLiteral' ? c.test.value : null));
|
|
228
|
+
names = names.filter(n => n && facts.types.has(n));
|
|
229
|
+
return names.length >= 2 && names.some(n => facts.nonBasis.has(n)) ? [...new Set(names)].sort().join(' ') : '';
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Имя ближайшего объявления, в котором стоит литерал. */
|
|
233
|
+
function ownerName(stack) {
|
|
234
|
+
for (let i = stack.length - 1; i >= 0; i--) {
|
|
235
|
+
const n = stack[i];
|
|
236
|
+
if (n.type === 'VariableDeclarator' && n.id?.type === 'Identifier')
|
|
237
|
+
return n.id.name;
|
|
238
|
+
if ((n.type === 'ObjectProperty' || n.type === 'ClassProperty') && !n.computed)
|
|
239
|
+
return n.key.name ?? n.key.value ?? '';
|
|
240
|
+
if (n.type === 'AssignmentExpression')
|
|
241
|
+
return n.left.property?.name ?? n.left.name ?? '';
|
|
242
|
+
}
|
|
243
|
+
return '';
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** Список в коде, повторяющий узлы дерева: ≥2 имён сущностей среди ключей или id элементов. */
|
|
247
|
+
function entityListing(node, facts) {
|
|
248
|
+
let names = [];
|
|
249
|
+
if (node.type === 'ObjectExpression')
|
|
250
|
+
names = node.properties.map(p => (p.computed || !p.key ? null : p.key.name ?? p.key.value));
|
|
251
|
+
else if (node.type === 'ArrayExpression') {
|
|
252
|
+
names = node.elements.map(e => {
|
|
253
|
+
if (e?.type === 'StringLiteral')
|
|
254
|
+
return e.value;
|
|
255
|
+
if (e?.type !== 'ObjectExpression')
|
|
256
|
+
return null;
|
|
257
|
+
const id = e.properties.find(p => !p.computed && ['id', 'name', 'key', 'provider'].includes(p.key?.name ?? p.key?.value) && p.value?.type === 'StringLiteral');
|
|
258
|
+
return id ? id.value.value : null;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const hit = [...new Set(names.filter(n => typeof n === 'string').map(norm).filter(n => facts.entities.has(n)))].sort();
|
|
262
|
+
return hit.length >= 2 ? hit.join(' ') : '';
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function add(result, inv, file, key, n = 1) {
|
|
266
|
+
const byFile = (result[inv] ??= {});
|
|
267
|
+
const byKey = (byFile[file] ??= {});
|
|
268
|
+
byKey[key] = (byKey[key] || 0) + n;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/** Инварианты кода для одного файла. scope: { core, typizer, form }. */
|
|
272
|
+
export function scanCode(file, code, facts, scope, result = {}) {
|
|
273
|
+
if (scope.core || scope.typizer) {
|
|
274
|
+
for (const m of code.matchAll(COMPAT_WORDS))
|
|
275
|
+
add(result, 9, file, m[0].toLowerCase());
|
|
276
|
+
}
|
|
277
|
+
let ast;
|
|
278
|
+
try {
|
|
279
|
+
ast = parse(code);
|
|
280
|
+
}
|
|
281
|
+
catch {
|
|
282
|
+
add(result, 0, file, 'не разобран');
|
|
283
|
+
return result;
|
|
284
|
+
}
|
|
285
|
+
const quotedType = /(['"`])(\$[A-Za-z][\w-]*)\1/g;
|
|
286
|
+
const quotedRole = new RegExp('([\'"`])(' + EXTRA_ROLES.join('|') + ')\\1', 'g');
|
|
287
|
+
walk(ast, (node, stack, key) => {
|
|
288
|
+
const parent = stack[stack.length - 1];
|
|
289
|
+
const lits = pieces(node, parent, key);
|
|
290
|
+
// 1. имена типов в ядре
|
|
291
|
+
if (scope.core) {
|
|
292
|
+
for (const p of lits) {
|
|
293
|
+
for (const t of typeTokens(p.text, facts.nonBasis))
|
|
294
|
+
add(result, 1, file, t);
|
|
295
|
+
}
|
|
296
|
+
if (node.type === 'Identifier' && facts.nonBasis.has(node.name))
|
|
297
|
+
add(result, 1, file, node.name + ' (идентификатор)');
|
|
298
|
+
}
|
|
299
|
+
// 2. корневые пути
|
|
300
|
+
if (scope.core || scope.typizer) {
|
|
301
|
+
for (const p of lits) {
|
|
302
|
+
for (const r of rootPaths(p, facts.roots))
|
|
303
|
+
add(result, 2, file, r);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
// 3. списки типов (формы — инвариант 7)
|
|
307
|
+
if ((scope.core || scope.typizer) && !scope.form) {
|
|
308
|
+
const listing = typeListing(node, facts);
|
|
309
|
+
if (listing)
|
|
310
|
+
add(result, 3, file, listing);
|
|
311
|
+
}
|
|
312
|
+
// 4. послойные примитивы вне дома
|
|
313
|
+
if (scope.core && file !== LAYER_HOME) {
|
|
314
|
+
const name = node.type === 'Identifier' ? node.name : node.type === 'StringLiteral' ? node.value : '';
|
|
315
|
+
if (LAYER_PRIMITIVES.includes(name))
|
|
316
|
+
add(result, 4, file, name);
|
|
317
|
+
}
|
|
318
|
+
// 5. вычисления из пути
|
|
319
|
+
if (scope.core) {
|
|
320
|
+
if (node.type === 'RegExpLiteral' && pathVocabulary(plainRegex(node.pattern), facts))
|
|
321
|
+
add(result, 5, file, clip('/' + node.pattern + '/'));
|
|
322
|
+
if (node.type === 'CallExpression' && node.callee?.type?.endsWith('MemberExpression') && PATH_METHODS.includes(node.callee.property?.name)) {
|
|
323
|
+
const arg = node.arguments[0];
|
|
324
|
+
const text = arg ? pieces(arg, node, 'arguments').map(p => p.text).join('…') : '';
|
|
325
|
+
if (arg?.type !== 'RegExpLiteral' && text.includes('/') && pathVocabulary(text, facts))
|
|
326
|
+
add(result, 5, file, clip('.' + node.callee.property.name + '(' + text + ')'));
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// 7. ветвления по типу в формах
|
|
330
|
+
if (scope.form) {
|
|
331
|
+
if (node.type === 'StringLiteral' && facts.nonBasis.has(node.value))
|
|
332
|
+
add(result, 7, file, node.value);
|
|
333
|
+
if (node.type === 'TemplateLiteral') {
|
|
334
|
+
for (const q of lits) {
|
|
335
|
+
for (const m of q.text.matchAll(quotedType)) {
|
|
336
|
+
if (facts.nonBasis.has(m[2]))
|
|
337
|
+
add(result, 7, file, m[2]);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
// 8. списки, дублирующие дерево (oda/ — библиотека интерфейса, узлов дерева не описывает)
|
|
343
|
+
if (scope.core && !file.startsWith('oda/')) {
|
|
344
|
+
const listing = entityListing(node, facts);
|
|
345
|
+
if (listing)
|
|
346
|
+
add(result, 8, file, (ownerName(stack) || 'список') + ': ' + listing);
|
|
347
|
+
if (node.type === 'VariableDeclarator' && node.id?.type === 'Identifier' && PRESET_NAME.test(node.id.name))
|
|
348
|
+
add(result, 8, file, node.id.name);
|
|
349
|
+
}
|
|
350
|
+
// 10. лишние встроенные роли
|
|
351
|
+
if (scope.core || scope.typizer) {
|
|
352
|
+
if (node.type === 'StringLiteral' && EXTRA_ROLES.includes(node.value))
|
|
353
|
+
add(result, 10, file, node.value);
|
|
354
|
+
if ((node.type === 'ObjectProperty' || node.type === 'ObjectMethod') && !node.computed && node.key?.type === 'Identifier' && EXTRA_ROLES.includes(node.key.name))
|
|
355
|
+
add(result, 10, file, node.key.name);
|
|
356
|
+
if (node.type === 'TemplateLiteral') {
|
|
357
|
+
for (const q of lits) {
|
|
358
|
+
for (const m of q.text.matchAll(quotedRole))
|
|
359
|
+
add(result, 10, file, m[2]);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
return result;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** 6. Папки ai/ у типов вне $structure и $module. */
|
|
368
|
+
export function scanAiFolders(files, facts, result = {}) {
|
|
369
|
+
const seen = new Set();
|
|
370
|
+
for (const f of files) {
|
|
371
|
+
const segs = f.split('/');
|
|
372
|
+
for (let i = 1; i < segs.length - 1; i++) {
|
|
373
|
+
if (segs[i] !== 'ai' || !segs[i - 1].startsWith('$'))
|
|
374
|
+
continue;
|
|
375
|
+
const dir = segs.slice(0, i + 1).join('/');
|
|
376
|
+
if (seen.has(dir))
|
|
377
|
+
continue;
|
|
378
|
+
seen.add(dir);
|
|
379
|
+
const branch = segs.lastIndexOf('$folder', i - 1);
|
|
380
|
+
const declared = branch >= 0 && segs.slice(branch + 1, i).every(s => s.startsWith('$')) ? segs.slice(branch + 1, i) : null;
|
|
381
|
+
const chain = declared?.length ? declared : facts.chains.get(segs[i - 1]) || ['$class', segs[i - 1]];
|
|
382
|
+
if (!chain.includes('$structure') && !chain.includes('$module'))
|
|
383
|
+
add(result, 6, dir, chain.join('/'));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
return result;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/** Пути в обратных кавычках документа (вне блоков кода). */
|
|
390
|
+
export function docPaths(text) {
|
|
391
|
+
const out = new Set();
|
|
392
|
+
const plain = text.replace(/```[\s\S]*?```/g, '');
|
|
393
|
+
for (const m of plain.matchAll(/`([^`\n]+)`/g)) {
|
|
394
|
+
for (let token of m[1].split(/\s+/)) {
|
|
395
|
+
token = token.replace(/\\/g, '/').replace(/[.,;:)]+$/, '').replace(/:\d+(-\d+)?$/, '').replace(/^\/+/, '').replace(/\/+$/, '');
|
|
396
|
+
if (!token.includes('/') || /:\/\/|\/\/|[*<>{}…|=,;()"'[\]]|\.\.\./.test(token))
|
|
397
|
+
continue;
|
|
398
|
+
const segs = token.split('/');
|
|
399
|
+
if (segs.includes('~'))
|
|
400
|
+
continue;
|
|
401
|
+
if (segs[segs.length - 1] === 'x') // `…/x` в таблицах канона — «какой-то файл»
|
|
402
|
+
segs.pop();
|
|
403
|
+
const service = segs.findIndex(s => s.startsWith('#')); // #system, #security — служебные области вне git
|
|
404
|
+
const checked = service >= 0 ? segs.slice(0, service) : segs;
|
|
405
|
+
if (checked.length)
|
|
406
|
+
out.add(checked.join('/'));
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return [...out];
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/** 11. Пути документов, которых нет в репозитории. Проверяются пути от корня и от /ORGANIZATIONS. */
|
|
413
|
+
export function scanDocs(files, facts, read, result = {}) {
|
|
414
|
+
const has = p => facts.paths.has(p.toLowerCase());
|
|
415
|
+
for (const doc of files.filter(isDoc)) {
|
|
416
|
+
for (const p of docPaths(read(doc))) {
|
|
417
|
+
const first = p.split('/')[0];
|
|
418
|
+
const base = has(first) ? '' : has('organizations/' + first) ? 'organizations/' : null;
|
|
419
|
+
if (base !== null && !has(base + p))
|
|
420
|
+
add(result, 11, doc, p);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
return result;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/** Полный проход по репозиторию → { [инвариант]: { [файл]: { [что]: сколько } } }. Нет git — null. */
|
|
427
|
+
export function scanAll(root = ROOT) {
|
|
428
|
+
const files = listFiles(root);
|
|
429
|
+
if (!files)
|
|
430
|
+
return null;
|
|
431
|
+
const facts = treeFacts(files);
|
|
432
|
+
const read = f => fs.readFileSync(path.join(root, f), 'utf-8');
|
|
433
|
+
const result = {};
|
|
434
|
+
for (const f of files) {
|
|
435
|
+
const scope = { core: isCore(f), typizer: isTypizer(f), form: isForm(f) };
|
|
436
|
+
if (scope.core || scope.typizer || scope.form)
|
|
437
|
+
scanCode(f, read(f), facts, scope, result);
|
|
438
|
+
}
|
|
439
|
+
scanAiFolders(files, facts, result);
|
|
440
|
+
scanDocs(files, facts, read, result);
|
|
441
|
+
return result;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
const flat = byFile => {
|
|
445
|
+
const out = new Map();
|
|
446
|
+
for (const [file, keys] of Object.entries(byFile || {})) {
|
|
447
|
+
for (const [key, n] of Object.entries(keys))
|
|
448
|
+
out.set(file + ' → ' + key, n);
|
|
449
|
+
}
|
|
450
|
+
return out;
|
|
451
|
+
};
|
|
452
|
+
export const total = byFile => [...flat(byFile).values()].reduce((a, b) => a + b, 0);
|
|
453
|
+
|
|
454
|
+
/** Сверка с реестром: added — новые отклонения, stale — записи реестра, которых в коде уже нет. */
|
|
455
|
+
export function diff(current, registered) {
|
|
456
|
+
const cur = flat(current);
|
|
457
|
+
const reg = flat(registered);
|
|
458
|
+
const added = [];
|
|
459
|
+
const stale = [];
|
|
460
|
+
for (const [k, n] of cur) {
|
|
461
|
+
if (n > (reg.get(k) || 0))
|
|
462
|
+
added.push(k + ': ' + (reg.get(k) || 0) + ' → ' + n);
|
|
463
|
+
}
|
|
464
|
+
for (const [k, n] of reg) {
|
|
465
|
+
if ((cur.get(k) || 0) < n)
|
|
466
|
+
stale.push(k + ': ' + n + ' → ' + (cur.get(k) || 0));
|
|
467
|
+
}
|
|
468
|
+
return { added, stale };
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export function loadRegistry(root = ROOT) {
|
|
472
|
+
const file = path.join(root, REGISTRY);
|
|
473
|
+
return fs.existsSync(file) ? JSON.parse(fs.readFileSync(file, 'utf-8')) : null;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
const sorted = obj => Object.fromEntries(Object.keys(obj).sort().map(k => [k, obj[k]]));
|
|
477
|
+
|
|
478
|
+
function buildRegistry(scan) {
|
|
479
|
+
const invariants = {};
|
|
480
|
+
for (const id of Object.keys(INVARIANTS)) {
|
|
481
|
+
const files = sorted(Object.fromEntries(Object.entries(scan[id] || {}).map(([f, keys]) => [f, sorted(keys)])));
|
|
482
|
+
invariants[id] = { invariant: INVARIANTS[id], measure: MEASURES[id], total: total(files), files };
|
|
483
|
+
}
|
|
484
|
+
return {
|
|
485
|
+
about: 'Реестр отклонений кода от канона ' + CANON + ' (п. 10). Только сокращается: новое отклонение роняет tests/architecture.test.js, исправленное вычёркивается командой node scripts/check-architecture.mjs --prune. Вручную не дополняется.',
|
|
486
|
+
invariants,
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function saveRegistry(scan, root = ROOT) {
|
|
491
|
+
fs.writeFileSync(path.join(root, REGISTRY), JSON.stringify(buildRegistry(scan), null, 2) + '\n', 'utf-8');
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function main(argv) {
|
|
495
|
+
const scan = scanAll();
|
|
496
|
+
if (!scan) {
|
|
497
|
+
console.error('Нужен git: список файлов берётся из git ls-files.');
|
|
498
|
+
return 2;
|
|
499
|
+
}
|
|
500
|
+
const registry = loadRegistry();
|
|
501
|
+
if (argv.includes('--init')) {
|
|
502
|
+
if (registry) {
|
|
503
|
+
console.error('Реестр уже есть: ' + REGISTRY + '. Он только сокращается (--prune).');
|
|
504
|
+
return 1;
|
|
505
|
+
}
|
|
506
|
+
saveRegistry(scan);
|
|
507
|
+
console.log('Создан ' + REGISTRY);
|
|
508
|
+
return 0;
|
|
509
|
+
}
|
|
510
|
+
if (!registry) {
|
|
511
|
+
console.error('Нет реестра ' + REGISTRY + ' (создать: --init).');
|
|
512
|
+
return 1;
|
|
513
|
+
}
|
|
514
|
+
let bad = 0;
|
|
515
|
+
let fixed = 0;
|
|
516
|
+
for (const id of Object.keys(INVARIANTS)) {
|
|
517
|
+
const { added, stale } = diff(scan[id], registry.invariants[id]?.files);
|
|
518
|
+
console.log(String(id).padStart(2) + '. ' + String(total(scan[id])).padStart(5) + ' (в реестре ' + total(registry.invariants[id]?.files) + ') ' + INVARIANTS[id]);
|
|
519
|
+
for (const a of added)
|
|
520
|
+
console.log(' новое: ' + a);
|
|
521
|
+
for (const s of stale)
|
|
522
|
+
console.log(' исправлено: ' + s);
|
|
523
|
+
bad += added.length;
|
|
524
|
+
fixed += stale.length;
|
|
525
|
+
}
|
|
526
|
+
if (scan[0])
|
|
527
|
+
console.log('Не разобраны: ' + Object.keys(scan[0]).join(', '));
|
|
528
|
+
if (argv.includes('--prune')) {
|
|
529
|
+
if (bad) {
|
|
530
|
+
console.error('Есть новые отклонения (' + bad + '): реестр не дополняется, их нужно устранить.');
|
|
531
|
+
return 1;
|
|
532
|
+
}
|
|
533
|
+
saveRegistry(scan);
|
|
534
|
+
console.log(fixed ? 'Вычеркнуто записей: ' + fixed : 'Вычёркивать нечего.');
|
|
535
|
+
return 0;
|
|
536
|
+
}
|
|
537
|
+
return bad || fixed ? 1 : 0;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href)
|
|
541
|
+
process.exitCode = main(process.argv.slice(2));
|
|
@@ -30,7 +30,7 @@ function canonicalTypeFolder(filename) {
|
|
|
30
30
|
return ext;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/** Найти все метапапки ($user, $
|
|
33
|
+
/** Найти все метапапки ($user, $organization, $structure, $register, $catalog, $operation, $account и т.д.) в USERS и ORGANIZATIONS. */
|
|
34
34
|
function findMetaFolders(baseDir) {
|
|
35
35
|
const out = [];
|
|
36
36
|
function walk(dir) {
|
package/scripts/demo-seed.mjs
CHANGED
|
@@ -147,7 +147,7 @@ export function seedDemoOperations(db, ids, { year = new Date().getFullYear(), a
|
|
|
147
147
|
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
148
148
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
149
149
|
const targets = [
|
|
150
|
-
[path.join(root, 'ORGANIZATIONS', 'Маслоторг', '$
|
|
150
|
+
[path.join(root, 'ORGANIZATIONS', 'Маслоторг', '$organization', '#system', 'work.db'), '/ORGANIZATIONS/Маслоторг/MODULES/Register', '/ORGANIZATIONS/Маслоторг'],
|
|
151
151
|
];
|
|
152
152
|
for (const [dbFile, prefix, orgBase] of targets) {
|
|
153
153
|
const db = await openDataDb(dbFile);
|
|
@@ -166,7 +166,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
|
|
|
166
166
|
db.close();
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
const delovayaDb = path.join(root, 'ORGANIZATIONS', 'Деловая сфера', '$
|
|
169
|
+
const delovayaDb = path.join(root, 'ORGANIZATIONS', 'Деловая сфера', '$organization', '#system', 'work.db');
|
|
170
170
|
const workParent = 'D:/business/d.WORK';
|
|
171
171
|
if (!fs.existsSync(delovayaDb) && fs.existsSync(workParent)) {
|
|
172
172
|
const found = fs.readdirSync(workParent).find(d => d.includes('Деловая'));
|
|
@@ -177,7 +177,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
const bisDb = path.join(root, 'ORGANIZATIONS', 'Бизнес Интер Софт', '$
|
|
180
|
+
const bisDb = path.join(root, 'ORGANIZATIONS', 'Бизнес Интер Софт', '$organization', '#system', 'work.db');
|
|
181
181
|
if (!fs.existsSync(bisDb) && fs.existsSync(workParent)) {
|
|
182
182
|
const found = fs.readdirSync(workParent).find(d => d.includes('Бизнес_Инт'));
|
|
183
183
|
if (found) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { execSync } from 'node:child_process';
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
|
|
4
|
-
const path = '$server/$folder/$class/handlers/pages/form/chat/$handler/class.js';
|
|
5
|
-
const out = 'agent-tools/chat-svn-92788.js';
|
|
6
|
-
const data = execSync(`svn cat "${path}" -r 92788`, { cwd: 'c:/projects/web/work', encoding: 'utf8' });
|
|
7
|
-
fs.mkdirSync('agent-tools', { recursive: true });
|
|
8
|
-
fs.writeFileSync(out, data);
|
|
9
|
-
console.log('lines', data.split('\n').length);
|
|
1
|
+
import { execSync } from 'node:child_process';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
|
|
4
|
+
const path = '$server/$folder/$class/handlers/pages/form/chat/$handler/class.js';
|
|
5
|
+
const out = 'agent-tools/chat-svn-92788.js';
|
|
6
|
+
const data = execSync(`svn cat "${path}" -r 92788`, { cwd: 'c:/projects/web/work', encoding: 'utf8' });
|
|
7
|
+
fs.mkdirSync('agent-tools', { recursive: true });
|
|
8
|
+
fs.writeFileSync(out, data);
|
|
9
|
+
console.log('lines', data.split('\n').length);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
|
|
3
|
-
const p = 'C:/Users/Acer/.cursor/projects/c-projects-web-work/agent-transcripts/fda9d8b7-a8d5-4d65-a5c7-eef5b62d2909/fda9d8b7-a8d5-4d65-a5c7-eef5b62d2909.jsonl';
|
|
4
|
-
const lines = fs.readFileSync(p, 'utf8').split('\n');
|
|
5
|
-
|
|
6
|
-
for (const line of lines) {
|
|
7
|
-
if (!line.includes('_logsWatch: null')) continue;
|
|
8
|
-
try {
|
|
9
|
-
const j = JSON.parse(line);
|
|
10
|
-
for (const c of j.message?.content || []) {
|
|
11
|
-
if (c.type !== 'tool_use' || c.name !== 'StrReplace') continue;
|
|
12
|
-
if (!c.input?.path?.includes('chat')) continue;
|
|
13
|
-
const ns = c.input.new_string || '';
|
|
14
|
-
if (ns.includes('logItems') && ns.includes('_bindLogsFolder') && ns.length > 2000) {
|
|
15
|
-
fs.writeFileSync('agent-tools/chat-day-block.js', ns);
|
|
16
|
-
console.log('written', ns.length);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
catch { /* skip */ }
|
|
21
|
-
}
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
|
|
3
|
+
const p = 'C:/Users/Acer/.cursor/projects/c-projects-web-work/agent-transcripts/fda9d8b7-a8d5-4d65-a5c7-eef5b62d2909/fda9d8b7-a8d5-4d65-a5c7-eef5b62d2909.jsonl';
|
|
4
|
+
const lines = fs.readFileSync(p, 'utf8').split('\n');
|
|
5
|
+
|
|
6
|
+
for (const line of lines) {
|
|
7
|
+
if (!line.includes('_logsWatch: null')) continue;
|
|
8
|
+
try {
|
|
9
|
+
const j = JSON.parse(line);
|
|
10
|
+
for (const c of j.message?.content || []) {
|
|
11
|
+
if (c.type !== 'tool_use' || c.name !== 'StrReplace') continue;
|
|
12
|
+
if (!c.input?.path?.includes('chat')) continue;
|
|
13
|
+
const ns = c.input.new_string || '';
|
|
14
|
+
if (ns.includes('logItems') && ns.includes('_bindLogsFolder') && ns.length > 2000) {
|
|
15
|
+
fs.writeFileSync('agent-tools/chat-day-block.js', ns);
|
|
16
|
+
console.log('written', ns.length);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
catch { /* skip */ }
|
|
21
|
+
}
|