Skip to content

Entity hooks registry

Полная документация: Platform Core → Entity hooks.

Registry IDPurpose
backend.entityHooksOrdered handlers per entity + phase
ts
ctx.registerEntityHook('artifact', 'beforeCreate', async (hookCtx) => {
  hookCtx.ability?.assert('artifact.create');
  if (hookCtx.fields['my-ext.strict'] === 'true') {
    return { type: 'abort', code: 'STRICT', message: '…' };
  }
});

AI workspace для командных материалов и знаний