krona-staff/docs/PLATFORM-INTEGRATION.md
2026-09-10 23:29:28 +07:00

11 lines
2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Интеграция с Business Platform
Основание: актуальная ветка `main` `ochenstarik/business-platform`, прежде всего Platform Block Contract 109, Module System 34, Lifecycle 54, Configuration Engine 51, Field Types 52, Integration 15 и deployment 93/97.
В `platform` режиме gateway/JWT adapter получает tenant, actor и permissions из Core SSO; Staff не создаёт tenant/user/role. Settings, Files, Notifications и Event Bus доступны через отдельные порты. Реализация JWT намеренно fail-closed до публикации точного Core gateway/JWKS runtime contract.
В `standalone` режиме совместимый adapter выдаёт один явно настроенный tenant/actor для разработки. Он не содержит таблиц пользователей и ролей и должен отключаться сменой `STAFF_RUNTIME_MODE=platform`. Миграция в platform означает сопоставление standalone ULID с Core references, проверку владения и отключение adapter.
Манифест `module.json` объявляет hard dependency только на `ru.krona.core`, permissions, entity ownership, settings schema, configurable entities и UI slots. События пока пусты: имена и payload нельзя утверждать до бизнес-требований. API versioned; будущие события также versioned и используют platform envelope.
Omnichannel использован только как существующий пример. Здесь заранее исключены его риски: параллельная identity/tenant модель, неоднозначный tenant-to-project mapping, доменные настройки вне platform schema и локально-незаменимое файловое состояние.