FlowGuard API - v1.2.0-rc.2
    Preparing search index...

    Function blocked

    • Create a RailBlocked result from a registered reason code.

      Usage in rails: return blocked("COMMAND_NOT_ALLOWED", { command: "/plan", phase: state.phase });

      Replaces inline blocked returns: return { kind: "blocked", code: "COMMAND_NOT_ALLOWED", reason: ... };

      The returned object is structurally compatible with RailBlocked. Recovery steps and quickFix are included for LLM and user guidance.

      Parameters

      • code: string
      • Optionalvars: Record<string, string>

      Returns {
          kind: "blocked";
          code: string;
          reason: string;
          recovery: readonly string[];
          quickFix?: string;
      }