For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/reference/sdk/module-loader/type-aliases/ModuleAuthHooks.md.
  • English
  • Type Alias: ModuleAuthHooks

    type ModuleAuthHooks = {
      apply: void | ModuleServices;
      clear: void;
    };

    Defined in: module-loader/runtime.ts:37

    模块身份注入钩子(db/config/service client)。 由 module-loader/install 绑定真实实现;测试环境可 noop 或不绑。 apply 可返回 ModuleServices,供 lifecycle 闭包捕获(方案 A)。

    Methods

    apply()

    apply(
       id: string, 
       token: string, 
       configKey: string): void | ModuleServices;

    Defined in: module-loader/runtime.ts:38

    Parameters

    ParameterType
    idstring
    tokenstring
    configKeystring

    Returns

    void | ModuleServices


    clear()

    clear(id: string): void;

    Defined in: module-loader/runtime.ts:39

    Parameters

    ParameterType
    idstring

    Returns

    void