1---2name: bsp-patterns3description: Поиск и применение паттернов БСП. Используй когда задача про длительные операции, профили групп доступа, безопасное хранение, дополнительные обработки, HTTP/файлы, уведомления или готовую функцию БСП.4---56# BSP Patterns78## MCP routing910- Preferred path: use MCP `unica` tools `unica.search`, `unica.view` on the object node, `unica.view` on the form and role nodes, `unica.docs`, and `unica.run`.11- Runtime идёт через `unica.run`: вызов без `op` отдаёт словарь операций и12контракт каждой — `argsSchema`, `execution`, `previewRequired`,13`ifRevRequiredOnApply`. Контракт вызова бери оттуда, а не из этого текста;14выбирай только операцию с `implemented: true` и не выдумывай аргументов15записи с `argsSchema: null`; превью исполнением не является. Не обходи16контракт прямым runner-ом.17- Use `epf-bsp-init` and `epf-bsp-add-command` only for BSP external processing registration helpers.18- Do not call internal analyzer, standards, runtime, or package adapters directly. They are hidden behind MCP `unica`.1920## Workflow21221. Identify the BSP subsystem or library pattern by intent, not by guessed module name.232. Search existing project usage with `unica.search` before writing new code. Prefer local project conventions over generic snippets.243. Inspect affected metadata, forms, roles, and external processing registration with `unica.view` at each object's logical address.254. Use `unica.docs` with `source: "development-standard"` only for a `development-standard` that constrains the pattern. Do not treat it as platform or BSP documentation. Exact platform mechanics require `unica.docs` with `source: "platform-help"`. Treat local BSP code as corroborating implementation evidence, not as the platform contract.265. Implement the smallest integration point; check syntax with `unica.check` (test runs are outside the v0.13 surface), and do not claim runtime verification from a static check.2728## References2930- Read `../../references/platform/compatibility-modes.md` when BSP code gates31 behavior by a platform version or compatibility mode. Platform guidance32 remains the contract source; BSP code is corroborating implementation33 evidence that must be reconciled with that contract.3435## Pattern hints3637- Long operations: background job, progress feedback, cancellation, and idempotent restart.38- Access: role/profile interaction, privileged mode boundaries, and safe reads.39- External processing: `СведенияОВнешнейОбработке`, command descriptions, form opening, server command execution.40- Secure data: avoid plaintext secrets in modules, constants, logs, and versioned configs.41- Notifications/files: check cleanup and user-visible error path, not only happy path.4243## MCP example4445```json46{47 "jsonrpc": "2.0",48 "method": "tools/call",49 "params": {50 "name": "unica.search",51 "arguments": {52 "query": "СведенияОВнешнейОбработке",53 "scope": "<source-set-from-unica-view>:Configuration",54 "limit": 2055 }56 }57}58```