For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/runtime/functions/setModuleGuard.md.
  • 简体中文
  • Function: setModuleGuard()

    function setModuleGuard(guard: (moduleId: string) => boolean): void;

    Defined in: sapi/runtime/command.ts:29

    可选扩展点:Command.trigger 执行前检查所属模块是否启用。install 冷启动模型下不注入。

    Parameters

    ParameterType
    guard(moduleId: string) => boolean

    Returns

    void