|
| 1 | +--- |
| 2 | +'@objectstack/objectql': patch |
| 3 | +'@objectstack/runtime': patch |
| 4 | +'@objectstack/core': patch |
| 5 | +'@objectstack/service-i18n': patch |
| 6 | +'@objectstack/plugin-sharing': patch |
| 7 | +--- |
| 8 | + |
| 9 | +Wire three more Studio-authored metadata surfaces at runtime (#2605 — the |
| 10 | +"declared but never wired" family, following the #2596 hooks template). |
| 11 | + |
| 12 | +**Authored actions now execute (#2605 item 1).** `engine.executeAction`'s map |
| 13 | +was only ever populated from the app bundle at boot, so a published `action` |
| 14 | +row (standalone or embedded in an authored object's `actions[]`) was stored |
| 15 | +and listed but never executable — before OR after a restart. Now: |
| 16 | + |
| 17 | +- `AppPlugin` installs a QuickJS-sandboxed default action runner at boot |
| 18 | + (`engine.setDefaultActionRunner`), the action-path twin of the #2596 hook |
| 19 | + body runner. Opt out with `OS_DISABLE_AUTHORED_ACTIONS=1`. |
| 20 | +- `ObjectQLPlugin` re-registers runtime-authored actions from their |
| 21 | + `sys_metadata` rows under `packageId: 'metadata-service'` at |
| 22 | + `kernel:ready`, on `metadata:reloaded`, and on `action`/`object` protocol |
| 23 | + mutations — saves, publishes, edits, and deletes take effect live. |
| 24 | + Package-artifact actions are excluded (AppPlugin owns those; re-registering |
| 25 | + would clobber their handlers). |
| 26 | + |
| 27 | +**Authored translations reach the i18n runtime (#2591).** `translation` |
| 28 | +metadata items (single-locale `AppTranslationBundle` payloads; locale from |
| 29 | +`_meta.locale`, a top-level `locale`, or a BCP-47-shaped item name) now load |
| 30 | +into the i18n service as a separate authored layer that overlays static |
| 31 | +bundles. Both adapters carry the layer — service-i18n's `FileI18nAdapter` |
| 32 | +AND the kernel's in-memory fallback (`createMemoryI18n`), which is what dev |
| 33 | +and standalone stacks actually run. The shared sync |
| 34 | +(`wireAuthoredTranslationSync`, exported from `@objectstack/core`, wired by |
| 35 | +the runtime's AppPlugin and by I18nServicePlugin with single-owner |
| 36 | +semantics) runs at `kernel:ready`, on `metadata:reloaded`, and on |
| 37 | +`translation` protocol mutations, with clear-then-reload semantics so |
| 38 | +deleted items/keys stop resolving instead of lingering in the deep-merged |
| 39 | +map. |
| 40 | + |
| 41 | +**Sharing rules created at runtime bind without a restart (#2592).** |
| 42 | +`bindRuleHooks` was boot-only, so the first rule authored at runtime for an |
| 43 | +object with no boot-time rule silently never evaluated (rule authoring is a |
| 44 | +data insert — `metadata:reloaded` never fires). The sharing plugin now binds |
| 45 | +afterInsert/afterUpdate/afterDelete triggers on `sys_sharing_rule` that |
| 46 | +unbind + re-bind the rule-hook package from a fresh `listRules()`, serialized |
| 47 | +so overlapping writes can't leave a stale snapshot bound, and fail-safe so a |
| 48 | +rebind failure never fails the rule write. |
0 commit comments