Skip to content

feat(extensions): implement Extension Registry and runtime lifecycle management - #7

Open
minkinad wants to merge 15 commits into
Asmblyr:mainfrom
minkinad:main
Open

minkinad wants to merge 15 commits into
Asmblyr:mainfrom
minkinad:main

Conversation

@minkinad

Copy link
Copy Markdown
Contributor

Summary

Реализован Extension Registry для управления доверенными расширениями Collaborative.

Changes

  • Добавлены валидация manifest, проверка semver, зависимостей и совместимости.
  • Реализованы управление состояниями расширений и аудит операций.
  • Добавлены desiredState, actualState, pendingRestart и диагностика ошибок запуска.
  • Реализован механизм reconciliation при запуске Core.
  • Добавлены административное API, типизированный SDK и CLI.
  • Создан Extension Center в административной панели.
  • Исправлены проблемы RBAC, обработки ошибок и загрузки плагинов.
  • Обновлены миграции, тесты и документация.

Validation

  • Core integration: 336 passed, 3 skipped.
  • Core unit: 171 passed.
  • UI unit: 147 passed.
  • SDK: 28 passed.
  • CLI: 6 passed.
  • Registry/RBAC: 7 passed.
  • Typecheck, lint, format и production build — passed.

Limitations

  • Изменения состояния требуют перезапуска Core.
  • Runtime состояния отслеживаются отдельно для каждого экземпляра.
  • Установка сторонних пакетов и Marketplace не входят в этот PR.
  • Ошибки регистрации hooks/routes и установки коллекций всё ещё могут остановить Core.

Add Core-owned tables for desired package state and administrator operations. Keep the migration additive so existing plugin data survives upgrades, and refuse rollback once the new tables contain records.
Allow system generated history entries without an administrator actor and attach the serving instance ID. This makes startup failures traceable while protecting populated runtime history from destructive rollback.
Define the package snapshot, history entry, and paginated list shared by Core, SDK, and UI. Include the startup instance ID in history because the API returns it for process-specific diagnostics.
Parse optional registry metadata with semantic version validation, while retaining versionless v1 fixtures. Resolve required dependencies in load order and report missing, incompatible, cyclic, or duplicate namespace declarations before importing plugin code.
Read only allowlisted package metadata, honor disabled packages, and load dependencies in order. Isolate package failures for registry reporting while preserving the strict loader path used by existing callers.
Store desired activation under a PostgreSQL advisory transaction lock and reject dependency conflicts before changing state. Record administrator requests and process startup results without deleting package data.
Expose list, detail, health, dependencies, permissions, versions, history, and activation operations. Validate list filters, keep responses process-specific, and require plugin settings read or update permission for each route.
Wire registry routes into Core, skip disabled packages before import, and report loaded or failed packages for the serving instance. Persist startup audit events and log failures after Core begins serving.
Exercise metadata and dependency validation plus query parsing in unit tests. Add disposable database coverage for RBAC, concurrent activation, history, startup reconciliation and failure snapshots; expose it as the core-registry test suite.
Expose registry inspection and enable or disable methods through the shared authenticated transport. Document required plugin grants and restart semantics in both package guides, and test paths plus permission failures.
Add list, info, enable, and disable commands using an explicit human token. Require --yes for activation changes, preserve credential handling, and document restart behavior with focused CLI coverage.
Replace the simple plugin settings list with a searchable registry view, detail controls, dependency and capability information, and operation history. Preserve settings editing, read-only access, loading feedback, and English/Russian UI copy.
Document package metadata, desired versus loaded state, permission boundaries, startup reconciliation, deployment-only installation, and additive upgrade behavior in both language guides and architecture pages.
Catalog nine permission gated routes and generate English/Russian OpenAPI schemas from their response shapes. Refresh the route matrix and package guide copies so SDK and CLI behavior matches the published API.
Set the package bin script executable so direct POSIX invocation works after publication. The script contents and builder behavior stay the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant