Repository navigation
Dev - #1469
Closed
Lintao-Yuan wants to merge 6 commits into
Closed
Dev#1469Lintao-Yuan wants to merge 6 commits into
Lintao-Yuan wants to merge 6 commits into
Conversation
added 6 commits
November 16, 2026 11:09
- 新增 apps/db/dialect:按 DB 类型注册 DialectPolicy(sqlglot 方言、危险函数、资源类函数、超时、是否允许改写 LIMIT),未注册类型一律拒绝 - 新增 apps/db/sql_guard:SqlCheck / SqlRewriter / GuardPipeline;basic 规则集保持 check_sql_read 原有语义,agent 规则集增加单语句、嵌套写操作、锁、函数黑名单、表白名单、列权限检查,以及确定性行权限改写和行数上限 - check_sql_read、get_sqlglot_dialect、get_dangerous_functions 保留签名并改为委托注册表;excel、kingbase、redshift 现与 pg 共用文件读写类危险函数黑名单 - exec_sql 新增可选 timeout_seconds、max_rows,不传时行为不变;py_driver 执行分支合并为按类型登记的执行配置 AI-Coding: true AI-Tool: TophantAI
- 在 MCP 进程(8001)新增 /sqlbot-mcp,使用官方 mcp SDK 的 Streamable HTTP(无状态),外部 Agent 自行编写 SQL,SQLBot 不调用模型 - 提供 5 个工具:agent_list_datasources、agent_get_query_context、agent_list_tables、agent_describe_tables、agent_execute_sql;执行结果写入会话记录(来源 MCP),成功与拒绝均写入操作日志 - agent_execute_sql 使用 agent 校验规则集:表/列权限、确定性行权限改写、语句超时与行数上限;会话记录只保存 Agent 原始 SQL - 新增 Agent 令牌(sys_agent_token,迁移 076):用户自助创建,格式 sk-sqlbot-,绑定创建者与工作空间,可限定数据源,库中只存 SHA-256 摘要;令牌只在 /sqlbot-mcp 生效 - 鉴权、限流、审计、工具注册均为可替换扩展点;旧的 /mcp 不变 - 前端个人菜单新增“Agent 令牌”管理弹窗,五种语言文案;同步更新 CONTEXT.md、docs/agents 与 backend/README.md AI-Coding: true AI-Tool: TophantAI
数据源配置改为部署专用密钥加密后,测试进程与子服务进程需要共享同一个临时密钥文件。 AI-Coding: true AI-Tool: TophantAI
- 问数成功后自动生成分析结论,不再需要手动点击“数据分析”按钮;分析中的派生数值先由补充 SQL 计算,避免模型自行估算 - 新增配置 CHAT_AUTO_ANALYSIS_ENABLED、ANALYSIS_SUPPLEMENTARY_QUERY_MAX、ANALYSIS_PLAN_DATA_ROWS、ANALYSIS_SUPPLEMENTARY_TIMEOUT - 调整分析提示词模板与前端问数页、执行详情展示 - docker-compose 改为从源码构建,补充 .env.example 与 .dockerignore,README 说明二次开发内容 - 新增 test_chat_auto_analysis.py AI-Coding: true AI-Tool: TophantAI
Author
|
1 |
Collaborator
|
感谢提交,但目前还没有计划支持该功能。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.