Pipeline preset 路由策略。
企业平台可按 tenant、collection、risk level 和 use case 把请求路由到 固定 preset。字段为 nil、"*" 或空 collection 时表示通配。
nil
"*"
判断 policy 是否匹配当前配置。
构建 policy。
转换为稳定 map。
@type t() :: %CMDCRAGArcana.Pipeline.Policy{ collections: [String.t()], metadata: map(), preset_id: String.t(), risk_level: String.t() | atom() | nil, tenant_id: String.t() | nil, use_case: String.t() | nil }
@spec matches?(t(), CMDCRAGArcana.Config.t()) :: boolean()
@spec new(t() | keyword() | map()) :: t()
@spec to_map(t()) :: map()