pipeline_core/models/pipeline_tool_policies.json
yumoqing b399663863 feat(agent): 五级作用域工具解析+patch_file+原生视觉上传构造
1. tool_sources.py(新): global/org/pipeline/role/project 五级工具作用域解析
   - 策略表 pipeline_tool_policies allow/deny(配套 models+CRUD json)
   - capability 两层语义: 映射手册(all/概念技能,含global层) + 声明注入
     (仅org/pipeline/role/project/user层)——防 generic 会话经 global 概念
     技能拿到~70个产线工具,击穿七层隔离(单测 29/29 含此回归)
   - role 白名单是过滤器非添加器,且作用于 base+capability 全集
2. agent_config: GENERAL_TOOLS 加 patch_file(定点替换,唯一性校验);
   write_file 描述引导改文件优先用 patch_file
3. upload_tools: is_image + build_image_parts(OpenAI多模态data URL,
   8MB/张+4张/条上限,超限显式告知不静默丢)
4. agent_chat/agent_chat_generic: 图片分流不进文本上下文,
   image_paths 传 gateway
5. load_path: 策略管理页注册
2026-09-10 18:36:06 +08:00

107 lines
2.0 KiB
JSON

{
"summary": [
{
"name": "pipeline_tool_policies",
"title": "工具作用域策略",
"primary": [
"id"
],
"catelog": "entity"
}
],
"fields": [
{
"name": "id",
"title": "主键ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "scope",
"title": "作用域(org/pipeline/role/project)",
"type": "str",
"length": 32,
"nullable": "no",
"default": "org"
},
{
"name": "scope_id",
"title": "作用域ID(机构ID/产线ID/产线:角色/项目ID)",
"type": "str",
"length": 128,
"nullable": "no",
"default": ""
},
{
"name": "tool_name",
"title": "工具名",
"type": "str",
"length": 64,
"nullable": "no"
},
{
"name": "effect",
"title": "效果(allow允许/deny禁用)",
"type": "str",
"length": 16,
"nullable": "no",
"default": "allow"
},
{
"name": "reason",
"title": "配置原因(审计用)",
"type": "str",
"length": 500,
"nullable": "yes"
},
{
"name": "status",
"title": "状态(active/invalid)",
"type": "str",
"length": 16,
"nullable": "no",
"default": "active"
},
{
"name": "created_by",
"title": "创建人",
"type": "str",
"length": 32,
"nullable": "yes"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp",
"nullable": "no"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp",
"nullable": "no"
}
],
"indexes": [
{
"name": "idx_scope",
"idxtype": "index",
"idxfields": [
"scope",
"scope_id",
"status"
]
},
{
"name": "uk_scope_tool",
"idxtype": "unique",
"idxfields": [
"scope",
"scope_id",
"tool_name"
]
}
]
}