{
  "plugin_id": "a_memorix",
  "plugin_info": {
    "name": "A_Memorix",
    "version": "2.0.0",
    "description": "长期记忆与认知增强子系统，支持常用配置可视化与原始 TOML 兜底编辑。",
    "author": "A_Dawn"
  },
  "_note": "未在本 Schema 展示的高级键仍然有效，请通过源码模式或原始 TOML 编辑。",
  "layout": {
    "type": "tabs",
    "tabs": [
      {
        "id": "basic",
        "title": "基础",
        "sections": [
          "plugin",
          "storage",
          "embedding"
        ],
        "order": 1
      },
      {
        "id": "stability",
        "title": "稳定性",
        "sections": [
          "embedding.fallback",
          "embedding.paragraph_vector_backfill"
        ],
        "order": 2
      },
      {
        "id": "retrieval",
        "title": "检索",
        "sections": [
          "retrieval",
          "retrieval.sparse",
          "threshold",
          "filter"
        ],
        "order": 3
      },
      {
        "id": "memory",
        "title": "记忆",
        "sections": [
          "episode",
          "person_profile",
          "memory"
        ],
        "order": 4
      },
      {
        "id": "operations",
        "title": "运维",
        "sections": [
          "advanced",
          "web.import",
          "web.tuning"
        ],
        "order": 5
      }
    ]
  },
  "sections": {
    "plugin": {
      "name": "plugin",
      "title": "子系统状态",
      "description": "控制 A_Memorix 是否在宿主中启用。",
      "icon": null,
      "collapsed": false,
      "order": 1,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": false,
          "description": "是否启用 A_Memorix",
          "label": "启用 A_Memorix",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "默认关闭以简化首次配置；开启前请先配置可用的 embedding 模型。关闭后 A_Memorix 不会参与长期记忆写入、检索与运维。",
          "choices": null
        }
      }
    },
    "storage": {
      "name": "storage",
      "title": "存储位置",
      "description": "控制 A_Memorix 的运行数据目录。",
      "icon": null,
      "collapsed": false,
      "order": 2,
      "fields": {
        "data_dir": {
          "name": "data_dir",
          "type": "string",
          "default": "data/a-memorix",
          "description": "数据目录",
          "label": "数据目录",
          "ui_type": "text",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "相对路径按 MaiBot 仓库根目录解析，建议保持默认外置目录。",
          "placeholder": "data/a-memorix",
          "choices": null
        }
      }
    },
    "embedding": {
      "name": "embedding",
      "title": "Embedding",
      "description": "控制向量写入与检索的核心嵌入配置。",
      "icon": null,
      "collapsed": false,
      "order": 3,
      "fields": {
        "model_name": {
          "name": "model_name",
          "type": "string",
          "default": "auto",
          "description": "Embedding 模型选择",
          "label": "模型选择",
          "ui_type": "text",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "默认 auto，会按宿主环境自动选择可用 embedding 模型。",
          "placeholder": "auto",
          "choices": null
        },
        "dimension": {
          "name": "dimension",
          "type": "integer",
          "default": 1024,
          "description": "向量维度",
          "label": "向量维度",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "唯一公开维度控制项，修改后建议先执行 runtime self-check。",
          "min": 1,
          "max": 32768,
          "step": 1,
          "choices": null
        },
        "batch_size": {
          "name": "batch_size",
          "type": "integer",
          "default": 32,
          "description": "单批请求大小",
          "label": "批大小",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "批量过大可能放大模型或网络波动。",
          "min": 1,
          "max": 1024,
          "step": 1,
          "choices": null
        },
        "max_concurrent": {
          "name": "max_concurrent",
          "type": "integer",
          "default": 5,
          "description": "最大并发数",
          "label": "最大并发",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "用于限制并行 embedding 请求数量。",
          "min": 1,
          "max": 128,
          "step": 1,
          "choices": null
        },
        "enable_cache": {
          "name": "enable_cache",
          "type": "boolean",
          "default": false,
          "description": "是否启用缓存",
          "label": "启用向量缓存",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "适合重复写入较多的场景，默认关闭以保持路径更直观。",
          "choices": null
        },
        "quantization_type": {
          "name": "quantization_type",
          "type": "string",
          "default": "int8",
          "description": "量化方式",
          "label": "量化方式",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "当前 vNext 主路径仅支持 int8(SQ8)。",
          "choices": [
            "int8"
          ]
        }
      }
    },
    "embedding.fallback": {
      "name": "embedding.fallback",
      "title": "Embedding 回退",
      "description": "控制 embedding 异常或退化时的兜底策略。",
      "icon": null,
      "collapsed": false,
      "order": 4,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用回退机制",
          "label": "启用回退",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "建议保持开启，避免 embedding 波动直接阻塞导入或检索。",
          "choices": null
        },
        "probe_interval_seconds": {
          "name": "probe_interval_seconds",
          "type": "integer",
          "default": 180,
          "description": "探测间隔秒数",
          "label": "探测间隔（秒）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "回退期间定期探测 embedding 是否恢复。",
          "min": 10,
          "max": 86400,
          "step": 1,
          "choices": null
        },
        "allow_metadata_only_write": {
          "name": "allow_metadata_only_write",
          "type": "boolean",
          "default": true,
          "description": "是否允许仅写入元数据",
          "label": "允许仅写元数据",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "embedding 不可用时允许先保留结构化记录，后续再回填向量。",
          "choices": null
        }
      }
    },
    "embedding.paragraph_vector_backfill": {
      "name": "embedding.paragraph_vector_backfill",
      "title": "段落向量回填",
      "description": "控制 metadata-only 写入后的向量回填任务。",
      "icon": null,
      "collapsed": false,
      "order": 5,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用回填任务",
          "label": "启用向量回填",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "建议与 metadata-only 写入配合使用。",
          "choices": null
        },
        "interval_seconds": {
          "name": "interval_seconds",
          "type": "integer",
          "default": 60,
          "description": "回填轮询间隔",
          "label": "轮询间隔（秒）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "控制后台扫描待回填段落的频率。",
          "min": 5,
          "max": 86400,
          "step": 1,
          "choices": null
        },
        "batch_size": {
          "name": "batch_size",
          "type": "integer",
          "default": 64,
          "description": "单批回填数量",
          "label": "回填批大小",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "批量越大，单轮补写越快，但对 embedding 服务压力也越高。",
          "min": 1,
          "max": 2048,
          "step": 1,
          "choices": null
        },
        "max_retry": {
          "name": "max_retry",
          "type": "integer",
          "default": 5,
          "description": "最大重试次数",
          "label": "最大重试次数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "失败回填的重试上限。",
          "min": 0,
          "max": 100,
          "step": 1,
          "choices": null
        }
      }
    },
    "retrieval": {
      "name": "retrieval",
      "title": "主检索参数",
      "description": "控制向量、关系与最终合并的主检索范围。",
      "icon": null,
      "collapsed": false,
      "order": 6,
      "fields": {
        "top_k_paragraphs": {
          "name": "top_k_paragraphs",
          "type": "integer",
          "default": 20,
          "description": "段落候选数",
          "label": "段落候选数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "向量检索阶段保留的段落候选数量。",
          "min": 1,
          "max": 2000,
          "step": 1,
          "choices": null
        },
        "top_k_relations": {
          "name": "top_k_relations",
          "type": "integer",
          "default": 10,
          "description": "关系候选数",
          "label": "关系候选数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "图谱关系回收的候选条数。",
          "min": 1,
          "max": 2000,
          "step": 1,
          "choices": null
        },
        "top_k_final": {
          "name": "top_k_final",
          "type": "integer",
          "default": 10,
          "description": "最终返回条数",
          "label": "最终条数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "最终返回给调用方的默认最大条数。",
          "min": 1,
          "max": 2000,
          "step": 1,
          "choices": null
        },
        "alpha": {
          "name": "alpha",
          "type": "number",
          "default": 0.5,
          "description": "关系融合权重",
          "label": "关系权重 alpha",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "越高越偏向关系侧证据，越低越偏向段落语义召回。",
          "min": 0,
          "max": 1,
          "step": 0.05,
          "choices": null
        },
        "enable_ppr": {
          "name": "enable_ppr",
          "type": "boolean",
          "default": true,
          "description": "是否启用 PPR",
          "label": "启用 PPR",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "图扩散召回有助于补足关系链，但会增加检索时延。",
          "choices": null
        },
        "ppr_alpha": {
          "name": "ppr_alpha",
          "type": "number",
          "default": 0.85,
          "description": "PPR alpha",
          "label": "PPR Alpha",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "影响图扩散时的随机游走保守程度。",
          "min": 0,
          "max": 1,
          "step": 0.01,
          "choices": null
        },
        "ppr_timeout_seconds": {
          "name": "ppr_timeout_seconds",
          "type": "number",
          "default": 1.5,
          "description": "PPR 超时",
          "label": "PPR 超时（秒）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 7,
          "hint": "控制单次 PPR 图召回的最长执行时间。",
          "min": 0.1,
          "max": 60,
          "step": 0.1,
          "choices": null
        },
        "ppr_concurrency_limit": {
          "name": "ppr_concurrency_limit",
          "type": "integer",
          "default": 4,
          "description": "PPR 并发限制",
          "label": "PPR 并发上限",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 8,
          "hint": "控制并发执行的图扩散任务数量。",
          "min": 1,
          "max": 128,
          "step": 1,
          "choices": null
        },
        "enable_parallel": {
          "name": "enable_parallel",
          "type": "boolean",
          "default": true,
          "description": "是否启用并行检索",
          "label": "启用并行检索",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 9,
          "hint": "允许多路候选召回并发执行。",
          "choices": null
        }
      }
    },
    "retrieval.sparse": {
      "name": "retrieval.sparse",
      "title": "稀疏检索",
      "description": "控制 BM25/FTS5 稀疏检索的开关与候选规模。",
      "icon": null,
      "collapsed": false,
      "order": 7,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用稀疏检索",
          "label": "启用稀疏检索",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "适合关键词明确、短文本或 embedding 退化场景。",
          "choices": null
        },
        "backend": {
          "name": "backend",
          "type": "string",
          "default": "fts5",
          "description": "稀疏检索后端",
          "label": "后端类型",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "当前主路径固定为 FTS5。",
          "choices": [
            "fts5"
          ]
        },
        "mode": {
          "name": "mode",
          "type": "string",
          "default": "auto",
          "description": "稀疏检索模式",
          "label": "检索模式",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "auto 为默认；fallback_only 适合 embedding 降级时读路径兜底。",
          "choices": [
            "auto",
            "fallback_only",
            "hybrid"
          ]
        },
        "tokenizer_mode": {
          "name": "tokenizer_mode",
          "type": "string",
          "default": "jieba",
          "description": "分词模式",
          "label": "分词模式",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "中文场景优先用 jieba；未安装时会自动退化为 char n-gram。",
          "choices": [
            "jieba",
            "mixed",
            "char_2gram"
          ]
        },
        "candidate_k": {
          "name": "candidate_k",
          "type": "integer",
          "default": 80,
          "description": "段落候选数",
          "label": "段落候选数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "稀疏检索阶段保留的段落候选数量。",
          "min": 1,
          "max": 5000,
          "step": 1,
          "choices": null
        },
        "relation_candidate_k": {
          "name": "relation_candidate_k",
          "type": "integer",
          "default": 60,
          "description": "关系候选数",
          "label": "关系候选数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "用于关系检索或图谱回收的稀疏候选规模。",
          "min": 1,
          "max": 5000,
          "step": 1,
          "choices": null
        }
      }
    },
    "threshold": {
      "name": "threshold",
      "title": "阈值过滤",
      "description": "控制检索结果的动态阈值与最小保留条数。",
      "icon": null,
      "collapsed": false,
      "order": 8,
      "fields": {
        "min_threshold": {
          "name": "min_threshold",
          "type": "number",
          "default": 0.3,
          "description": "最小阈值",
          "label": "最小阈值",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "结果分数低于此值时会被过滤。",
          "min": 0,
          "max": 1,
          "step": 0.01,
          "choices": null
        },
        "max_threshold": {
          "name": "max_threshold",
          "type": "number",
          "default": 0.95,
          "description": "最大阈值",
          "label": "最大阈值",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "自动调节阈值时不会超过这个上限。",
          "min": 0,
          "max": 1,
          "step": 0.01,
          "choices": null
        },
        "percentile": {
          "name": "percentile",
          "type": "number",
          "default": 75,
          "description": "百分位阈值",
          "label": "百分位",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "用于按分数分布动态收紧候选集合。",
          "min": 1,
          "max": 99,
          "step": 1,
          "choices": null
        },
        "min_results": {
          "name": "min_results",
          "type": "integer",
          "default": 3,
          "description": "最小结果数",
          "label": "最少保留条数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "避免阈值过严导致返回结果过少。",
          "min": 1,
          "max": 200,
          "step": 1,
          "choices": null
        },
        "enable_auto_adjust": {
          "name": "enable_auto_adjust",
          "type": "boolean",
          "default": true,
          "description": "是否启用自动调节",
          "label": "启用自动调节",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "开启后会结合分布动态调整阈值。",
          "choices": null
        }
      }
    },
    "filter": {
      "name": "filter",
      "title": "聊天过滤",
      "description": "控制 respect_filter=true 时允许读写的聊天流范围。",
      "icon": null,
      "collapsed": false,
      "order": 9,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用过滤",
          "label": "启用聊天过滤",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后 respect_filter=true 将不再限制聊天流范围。",
          "choices": null
        },
        "mode": {
          "name": "mode",
          "type": "string",
          "default": "blacklist",
          "description": "过滤模式",
          "label": "过滤模式",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "blacklist 为黑名单；whitelist 为仅允许列表中的聊天流。",
          "choices": [
            "blacklist",
            "whitelist"
          ]
        },
        "chats": {
          "name": "chats",
          "type": "array",
          "default": [],
          "description": "聊天流列表",
          "label": "聊天流列表",
          "ui_type": "list",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "示例：group:123、user:456、stream:abc。",
          "item_type": "string",
          "min_items": 0,
          "max_items": 500,
          "placeholder": "group:123",
          "choices": null
        }
      }
    },
    "episode": {
      "name": "episode",
      "title": "Episode 生成",
      "description": "控制段落聚合、分段与 Episode 重建相关参数。",
      "icon": null,
      "collapsed": false,
      "order": 10,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用 Episode",
          "label": "启用 Episode",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后不再自动维护 Episode 级记忆。",
          "choices": null
        },
        "generation_enabled": {
          "name": "generation_enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用自动生成",
          "label": "启用自动生成",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "关闭后只保留已存在的 Episode，不再新增。",
          "choices": null
        },
        "pending_batch_size": {
          "name": "pending_batch_size",
          "type": "integer",
          "default": 20,
          "description": "待处理批大小",
          "label": "待处理批大小",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "单轮处理的 pending source 数量。",
          "min": 1,
          "max": 500,
          "step": 1,
          "choices": null
        },
        "pending_max_retry": {
          "name": "pending_max_retry",
          "type": "integer",
          "default": 3,
          "description": "待处理最大重试次数",
          "label": "最大重试次数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "处理失败后的最大重试次数。",
          "min": 0,
          "max": 100,
          "step": 1,
          "choices": null
        },
        "max_paragraphs_per_call": {
          "name": "max_paragraphs_per_call",
          "type": "integer",
          "default": 20,
          "description": "单次最大段落数",
          "label": "单次最大段落数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "限制单次 Episode 生成时参与的段落数量。",
          "min": 1,
          "max": 500,
          "step": 1,
          "choices": null
        },
        "max_chars_per_call": {
          "name": "max_chars_per_call",
          "type": "integer",
          "default": 6000,
          "description": "单次最大字符数",
          "label": "单次最大字符数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "控制单次送入 Episode 生成的文本体量。",
          "min": 100,
          "max": 200000,
          "step": 100,
          "choices": null
        },
        "source_time_window_hours": {
          "name": "source_time_window_hours",
          "type": "number",
          "default": 24,
          "description": "时间窗口小时数",
          "label": "时间窗口（小时）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 7,
          "hint": "控制同一时间片内段落聚合的范围。",
          "min": 0,
          "max": 168,
          "step": 1,
          "choices": null
        },
        "segmentation_model": {
          "name": "segmentation_model",
          "type": "string",
          "default": "auto",
          "description": "分段模型选择",
          "label": "分段模型",
          "ui_type": "text",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 8,
          "hint": "支持 auto，也可填 utils/replyer/planner/tool_use 或具体模型名。",
          "placeholder": "auto",
          "choices": null
        }
      }
    },
    "person_profile": {
      "name": "person_profile",
      "title": "人物画像",
      "description": "控制画像刷新频率与证据采样范围。",
      "icon": null,
      "collapsed": false,
      "order": 11,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用画像",
          "label": "启用人物画像",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后不再自动刷新人物画像与证据快照。",
          "choices": null
        },
        "refresh_interval_minutes": {
          "name": "refresh_interval_minutes",
          "type": "integer",
          "default": 30,
          "description": "刷新间隔分钟数",
          "label": "刷新间隔（分钟）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "控制画像自动刷新周期。",
          "min": 1,
          "max": 10080,
          "step": 1,
          "choices": null
        },
        "active_window_hours": {
          "name": "active_window_hours",
          "type": "number",
          "default": 72,
          "description": "活跃窗口小时数",
          "label": "活跃窗口（小时）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "只在最近窗口内有活动的人物上触发刷新。",
          "min": 1,
          "max": 8760,
          "step": 1,
          "choices": null
        },
        "max_refresh_per_cycle": {
          "name": "max_refresh_per_cycle",
          "type": "integer",
          "default": 50,
          "description": "单轮最大刷新数",
          "label": "单轮最大刷新数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "限制单轮画像刷新时最多处理的人物数量。",
          "min": 1,
          "max": 1000,
          "step": 1,
          "choices": null
        },
        "top_k_evidence": {
          "name": "top_k_evidence",
          "type": "integer",
          "default": 12,
          "description": "证据条数",
          "label": "证据条数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "生成画像时默认采样的证据条数。",
          "min": 1,
          "max": 200,
          "step": 1,
          "choices": null
        }
      }
    },
    "memory": {
      "name": "memory",
      "title": "记忆演化",
      "description": "控制记忆衰减、冻结与裁剪。",
      "icon": null,
      "collapsed": false,
      "order": 12,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用记忆演化",
          "label": "启用记忆演化",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后不再自动衰减、裁剪或冻结记忆状态。",
          "choices": null
        },
        "half_life_hours": {
          "name": "half_life_hours",
          "type": "number",
          "default": 24,
          "description": "半衰期小时数",
          "label": "半衰期（小时）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "数值越大，记忆衰减越慢。",
          "min": 0.1,
          "max": 100000,
          "step": 0.1,
          "choices": null
        },
        "prune_threshold": {
          "name": "prune_threshold",
          "type": "number",
          "default": 0.1,
          "description": "裁剪阈值",
          "label": "裁剪阈值",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "低于该活跃度时会更容易进入裁剪或回收流程。",
          "min": 0,
          "max": 1,
          "step": 0.01,
          "choices": null
        },
        "freeze_duration_hours": {
          "name": "freeze_duration_hours",
          "type": "number",
          "default": 24,
          "description": "冻结时长小时数",
          "label": "冻结时长（小时）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "被保护或冻结的记忆在该时长内不参与衰减。",
          "min": 0,
          "max": 100000,
          "step": 0.1,
          "choices": null
        }
      }
    },
    "advanced": {
      "name": "advanced",
      "title": "高级运行时",
      "description": "控制自动保存与调试开关。",
      "icon": null,
      "collapsed": false,
      "order": 13,
      "fields": {
        "enable_auto_save": {
          "name": "enable_auto_save",
          "type": "boolean",
          "default": true,
          "description": "是否启用自动保存",
          "label": "启用自动保存",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "建议保持开启，避免运行时状态长期只留在内存中。",
          "choices": null
        },
        "auto_save_interval_minutes": {
          "name": "auto_save_interval_minutes",
          "type": "integer",
          "default": 5,
          "description": "自动保存间隔",
          "label": "自动保存间隔（分钟）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "控制状态与缓存落盘频率。",
          "min": 1,
          "max": 10080,
          "step": 1,
          "choices": null
        },
        "debug": {
          "name": "debug",
          "type": "boolean",
          "default": false,
          "description": "是否启用调试",
          "label": "启用调试日志",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "开启后会输出更多运行时诊断信息。",
          "choices": null
        }
      }
    },
    "web.import": {
      "name": "web.import",
      "title": "导入中心",
      "description": "控制导入任务队列、文件大小与并发参数。",
      "icon": null,
      "collapsed": false,
      "order": 14,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用导入中心",
          "label": "启用导入中心",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后相关导入任务接口会被拒绝。",
          "choices": null
        },
        "max_queue_size": {
          "name": "max_queue_size",
          "type": "integer",
          "default": 20,
          "description": "最大队列长度",
          "label": "最大队列长度",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "限制导入任务同时排队的上限。",
          "min": 1,
          "max": 1000,
          "step": 1,
          "choices": null
        },
        "max_files_per_task": {
          "name": "max_files_per_task",
          "type": "integer",
          "default": 200,
          "description": "单任务最大文件数",
          "label": "单任务最大文件数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "防止一次性提交过多文件导致任务过大。",
          "min": 1,
          "max": 10000,
          "step": 1,
          "choices": null
        },
        "max_file_size_mb": {
          "name": "max_file_size_mb",
          "type": "integer",
          "default": 20,
          "description": "单文件大小上限",
          "label": "单文件大小上限（MB）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "大文件可先拆分后导入，以减少失败重试成本。",
          "min": 1,
          "max": 4096,
          "step": 1,
          "choices": null
        },
        "max_paste_chars": {
          "name": "max_paste_chars",
          "type": "integer",
          "default": 200000,
          "description": "粘贴字符数上限",
          "label": "粘贴字符上限",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "限制直接粘贴导入时的最大文本长度。",
          "min": 100,
          "max": 5000000,
          "step": 100,
          "choices": null
        },
        "default_file_concurrency": {
          "name": "default_file_concurrency",
          "type": "integer",
          "default": 2,
          "description": "默认文件并发",
          "label": "默认文件并发",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "控制单任务内并行处理文件的默认数量。",
          "min": 1,
          "max": 128,
          "step": 1,
          "choices": null
        },
        "default_chunk_concurrency": {
          "name": "default_chunk_concurrency",
          "type": "integer",
          "default": 4,
          "description": "默认分块并发",
          "label": "默认分块并发",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 7,
          "hint": "控制单文件内部 chunk 处理的默认并行度。",
          "min": 1,
          "max": 128,
          "step": 1,
          "choices": null
        }
      }
    },
    "web.tuning": {
      "name": "web.tuning",
      "title": "调优中心",
      "description": "控制检索调优任务的队列与默认策略。",
      "icon": null,
      "collapsed": false,
      "order": 15,
      "fields": {
        "enabled": {
          "name": "enabled",
          "type": "boolean",
          "default": true,
          "description": "是否启用调优中心",
          "label": "启用调优中心",
          "ui_type": "switch",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 1,
          "hint": "关闭后调优任务接口不可用。",
          "choices": null
        },
        "max_queue_size": {
          "name": "max_queue_size",
          "type": "integer",
          "default": 8,
          "description": "最大队列长度",
          "label": "最大队列长度",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 2,
          "hint": "限制同时排队的调优任务数量。",
          "min": 1,
          "max": 200,
          "step": 1,
          "choices": null
        },
        "poll_interval_ms": {
          "name": "poll_interval_ms",
          "type": "integer",
          "default": 1200,
          "description": "轮询间隔毫秒数",
          "label": "轮询间隔（毫秒）",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 3,
          "hint": "控制前端或宿主轮询调优任务状态的频率。",
          "min": 200,
          "max": 60000,
          "step": 100,
          "choices": null
        },
        "default_intensity": {
          "name": "default_intensity",
          "type": "string",
          "default": "standard",
          "description": "默认调优强度",
          "label": "默认调优强度",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 4,
          "hint": "quick 更快，deep 更彻底，standard 为默认折中。",
          "choices": [
            "quick",
            "standard",
            "deep"
          ]
        },
        "default_objective": {
          "name": "default_objective",
          "type": "string",
          "default": "precision_priority",
          "description": "默认调优目标",
          "label": "默认调优目标",
          "ui_type": "select",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 5,
          "hint": "precision_priority 偏准确率，recall_priority 偏召回率。",
          "choices": [
            "precision_priority",
            "balanced",
            "recall_priority"
          ]
        },
        "default_top_k_eval": {
          "name": "default_top_k_eval",
          "type": "integer",
          "default": 20,
          "description": "默认评估 top-k",
          "label": "默认评估 Top-K",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 6,
          "hint": "调优评估时默认观察的候选深度。",
          "min": 1,
          "max": 1000,
          "step": 1,
          "choices": null
        },
        "default_sample_size": {
          "name": "default_sample_size",
          "type": "integer",
          "default": 24,
          "description": "默认样本数",
          "label": "默认样本数",
          "ui_type": "number",
          "required": false,
          "hidden": false,
          "disabled": false,
          "order": 7,
          "hint": "单轮调优默认采样的问题数量。",
          "min": 1,
          "max": 1000,
          "step": 1,
          "choices": null
        }
      }
    }
  }
}
