cmdc_rag_arcana 运行配置。
配置来源按优先级合并:
- Tool 调用参数
ctx.user_data[:cmdc_rag_arcana]或ctx.user_data[:rag]config :cmdc_rag_arcana, :default, ...
企业集成推荐把 repo、llm、租户身份与 collection 策略放在
user_data 中,这样 SubAgent 自动继承同一业务上下文。
Summary
Functions
返回当前用户/租户身份 map,供 Plugin 审计使用。
校验当前配置是否允许访问所有 collection。
从 CMDC Context 与 tool args 合并配置。
构建配置,非法选项抛出 NimbleOptions.ValidationError。
返回传给 Arcana backend 的 keyword opts。
Types
@type mode() :: :vector | :keyword | :hybrid
@type t() :: %CMDCRAGArcana.Config{ allowed_collections: [String.t()], backend: module(), collection_policies: [CMDCRAGArcana.CollectionPolicy.t()], collections: [String.t()], default_allow?: boolean(), department: String.t() | nil, extra_arcana_opts: keyword(), filters: map(), llm: term(), maintenance_backend: module(), maintenance_opts: keyword(), mode: mode(), repo: module() | nil, require_citations?: boolean(), roles: [String.t()], source_id: String.t() | nil, status_backend: module(), status_opts: keyword(), tenant_id: String.t() | nil, threshold: float(), top_k: pos_integer(), user_id: String.t() | nil }
Functions
返回当前用户/租户身份 map,供 Plugin 审计使用。
校验当前配置是否允许访问所有 collection。
@spec from_context(CMDC.Context.t(), map()) :: t()
从 CMDC Context 与 tool args 合并配置。
构建配置,非法选项抛出 NimbleOptions.ValidationError。
返回传给 Arcana backend 的 keyword opts。