yumoqing a243a16941 feat(secret): 敏感信息库前端接入——AgentIO钥匙图标+选择窗数据源(2026-09-17)
- agent_config.py: GENERAL_TOOLS += 6 个 ToolDefinition(category=secret,
  required 显式声明防 native FC 把可选参数标必填逼 LLM 编值)。
- wwwroot/api/secret_options.dspy: AgentIO 选择窗数据源。身份取自 get_user()/
  get_userorgid(),**不接受前端传 user_id/org_id**(否则改参数即可枚举他人凭据名称);
  双保险剔除 encrypted_value/fingerprint;未登录返 success:false(区分没登录与没数据)。
  RBAC 已被 rp.json 的 /pipeline_core/**(logined) 覆盖,无需额外注册。
- 3 个 .ui 的 AgentIO options 注入 secret_dataurl/secret_format/secret_title/
  secret_tip(共4处,含 agent/index.ui 动态建 tab 的 script 字符串)。
  未传 secret_dataurl 时钥匙图标不渲染 → 其他宿主应用零影响。

bricks 侧配套(UiText.insertAtCursor / AgentInput 弹窗 / AgentIO 透传)在 bricks 仓库。
2026-09-17 15:45:17 +08:00

43 lines
2.0 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"widgettype": "VBox",
"options": {"width": "100%", "height": "100%", "padding": "0"},
"subwidgets": [
{
"widgettype": "HBox",
"options": {"width": "100%", "alignItems": "center", "padding": "16px 24px 8px 24px", "cheight": 6, "gap": "12px"},
"subwidgets": [
{"widgettype": "Title2", "options": {"text": "通用会话(无产线插件)"}},
{"widgettype": "Text", "options": {"text": "纯通用 agent不挂任何产线工具/技能/角色/记忆", "cfontsize": 0.9, "color": "#94a3b8"}},
{"widgettype": "Filler"}
]
},
{
"widgettype": "HBox",
"options": {"width": "100%", "padding": "0 24px 8px 24px", "gap": "8px", "alignItems": "center"},
"subwidgets": [
{
"widgettype": "Button",
"options": {"label": "🗂 工作空间", "css": "small"},
"binds": [{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "self", "options": {"url": "/pipeline-sdlc/api/workspace_popup.dspy?pipeline_id=_generic"}}]
},
{"widgettype": "Text", "options": {"text": "工作空间为通用会话专属目录,不进入项目空间", "cfontsize": 0.75, "color": "#94a3b8"}}
]
},
{
"widgettype": "AgentIO",
"id": "chat_io",
"options": {
"css": "filler",
"url": "/pipeline_core/api/agent_chat_generic.dspy",
"model_dataurl": "/pipeline_core/api/agent_model_options.dspy",
"model_cwidth": 14,
"placeholder": "输入你的需求...(纯通用模式)",
"secret_dataurl": "/pipeline_core/api/secret_options.dspy",
"secret_format": "@@sec:{name}@@",
"secret_title": "选择敏感信息",
"secret_tip": "插入敏感信息"
}
}
]
}