Commit Graph

1048 Commits

Author SHA1 Message Date
朱潮
7f0c91d2d1 Merge branch 'developing' into bot_manager 2026-06-23 11:47:30 +08:00
朱潮
05ed2e8d45 add web2md web2summary 2026-06-23 11:47:16 +08:00
朱潮
2508d644fb Merge branch 'developing' into bot_manager 2026-06-23 10:13:14 +08:00
朱潮
62c0f62134 add web2md web2summary 2026-06-23 10:12:55 +08:00
朱潮
efcdb292c0 feat: 通用智能体默认 skills 新增 web2md、web2summary
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 10:11:29 +08:00
朱潮
6835003d15 fix: BotSettingsResponse.skills 改为 list 类型,修复 settings 接口 500
The /api/v1/general-agent/settings endpoint returned HTTP 500 because
config/general_agent.json stores skills as a list while the response
model expected Optional[str]. Add _normalize_skills_list and apply it in
both get_general_agent_settings_api and get_bot_settings so list and
legacy comma-separated string inputs both yield a list output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-23 10:11:19 +08:00
朱潮
6f2af8ecbf feat: support per-request skills override in v3 chat API
Allow the frontend to inject extra skills (merged with the bot's default
skills) for a single request. Used by the home/chat pages to enable
ragflow-loader when the user selects a knowledge base.
2026-06-23 07:56:31 +08:00
朱潮
72a5a0f63a add mineru 2026-06-22 20:30:08 +08:00
朱潮
90885bea2a Merge branch 'developing' into bot_manager 2026-06-22 19:28:52 +08:00
朱潮
ede5960b5a fix: fully replace robot skill dir on sync to avoid stale-file ImportError
_extract_skills_to_robot used shutil.copytree(dirs_exist_ok=True), which
only overwrites same-named files. Renamed/removed files and __pycache__
in the robot project's skill copy were left behind, so after a skill
refactor (e.g. rag-retrieve adding create_error_response and dropping
call_rag_retrieve) stale copies ended up with mismatched imports and
failed to load.

Switch to rmtree + copytree so each managed skill directory is fully
replaced from source on every sync. Also ignore __pycache__/*.pyc so the
source's compiled artifacts are not propagated.

Refs: #59

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-22 18:02:57 +08:00
朱潮
148ebc5904 优化agent v3接口 2026-06-22 16:39:04 +08:00
朱潮
6ee8d25b51 feat: 通用智能体配置默认 skill 与对应环境变量
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-22 07:25:25 +08:00
朱潮
a2c2f182be fix: AgentConfig.bot_id 用 project_dir_key 覆盖,使 workspace 按用户隔离
deep_assistant/prompt_loader 用 config.bot_id 拼 projects/robot/{bot_id},
之前只改 project_dir 无效。from_v3_request 在 bot_config 带 project_dir_key 时
用它覆盖 bot_id,使 workspace、系统提示词路径、skills 目录都按用户隔离。
普通 bot 不返回 project_dir_key,行为不变。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 19:39:56 +08:00
朱潮
41b2c898ec fix: 通用智能体工作目录按用户隔离
projects/robot/general-agent 所有用户共享会导致文件/会话产物互串。
get_general_agent_runtime_config 生成 project_dir_key=general-agent-{user},
v3 chat 优先用它作为 create_project_directory 的目录标识。
普通 bot 不返回 project_dir_key,行为不变。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 18:29:09 +08:00
朱潮
f4f39e4356 fix: 通用智能体注入当前登录用户的 api_key
通用智能体没有 owner,配置文件默认也不写 api_key。
复用普通 bot 的 owner token 逻辑:按 user_identifier 查 agent_user.new_api_token。
若配置文件里显式配置了 api_key,则优先用配置的。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 17:17:29 +08:00
朱潮
cf5cbe06b9 修改默认模型 2026-06-21 17:06:09 +08:00
朱潮
f57949520f feat: 新增配置文件驱动的通用智能体
- 新增 config/general_agent.json 与 utils/general_agent_config.py
- 登录返回的单智能体改为读取配置文件,不再复制 bot/skills
- 新增 GET /api/v1/general-agent/settings 接口
- v3 chat 在 bot_id=general-agent 时从配置文件读取运行时配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 17:01:33 +08:00
朱潮
82dad33a95 fix: 删除数据集时 RAGFlow 报错也视为成功
RAGFlow 删除(权限不足/数据集不存在等)失败时吞掉异常、记 warning,
继续清理本地 user_datasets 关联记录并向用户返回成功。
顺带在 README 补充生产发布流程。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 10:03:56 +08:00
朱潮
86bf8285e5 fix: list_datasets 改为本地表分页,修复 page_size 超限 500
去掉 service 层硬编码 page_size=1000 拉取 RAGFlow 全部数据集的写法
(撞 SDK 上限 100 导致 500),改为直接从 user_datasets 表分页返回。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 09:49:10 +08:00
朱潮
2898c9c42d Merge branch 'feature/tool-error-recovery' into bot_manager 2026-06-20 13:10:29 +08:00
朱潮
06974e9744 feat: recover tool exceptions into ToolMessage so SSE stream keeps flowing
Add ToolErrorRecoveryMiddleware as the outermost agent middleware so any
tool-call exception (notably MCP ToolException) is converted into a
ToolMessage with status="error" carrying the raw error text. The agent
can then loop once more and reply to the user in natural language about
what failed, instead of bubbling the exception up through agent.astream
and breaking the SSE response in routes/chat.py.

The recovery layer extracts the inner `text="..."` payload out of the MCP
TextContent repr when present, falling back to str(error) otherwise. It
deliberately re-raises asyncio.CancelledError so task cancellation still
propagates, and sits *outside* ToolMetricsMiddleware so the existing
status=error metric is still emitted before recovery kicks in.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-20 13:07:19 +08:00
朱潮
6babd6e134 safe print 的base64 字段替换为 [truncated] 2026-06-19 07:51:47 +08:00
朱潮
339144ad80 Merge branch 'feature/multimodal-image-input' into developing 2026-06-19 07:50:08 +08:00
朱潮
69eac00295 safe print 的base64 字段替换为 [truncated] 2026-06-19 07:49:53 +08:00
朱潮
01fb63c955 add EMBEDDING_BASE_URL 2026-06-18 14:56:27 +08:00
朱潮
aabb0ad072 Merge branch 'feature/multimodal-image-input' into developing 2026-06-18 12:54:31 +08:00
朱潮
13bdd9d40a feat: support multimodal image (base64) input in chat API
Normalize OpenAI-style and LangChain standard image blocks into LangChain
standard content blocks so provider block_translators auto-convert for
either OpenAI or Anthropic. Flatten multimodal content to plain text when
persisting history and computing term embeddings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 11:34:57 +08:00
朱潮
f85ddaf127 fix: remove stray sympy import causing startup failure
The unused 'from sympy.printing.cxx import none' was accidentally added
by IDE autocomplete. sympy is not installed in the image, so importing
agent/deep_assistant.py raised ModuleNotFoundError and the API server
crash-looped on startup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 15:47:52 +08:00
朱潮
9bd40d9bd7 Merge branch 'feature/no_answer' into dev 2026-06-16 13:22:12 +08:00
朱潮
d8378fbb70 add no answer tag 2026-06-16 13:19:23 +08:00
朱潮
838111c0fe onrepm static hosting 2026-06-15 15:11:03 +08:00
朱潮
e009db3cf7 修改投降尺寸 2026-06-15 14:29:24 +08:00
朱潮
888a93e2f7 修改投降尺寸 2026-06-15 13:37:30 +08:00
朱潮
eb5dcc5a80 修改投降尺寸 2026-06-15 13:36:21 +08:00
朱潮
e1d66385bf set_avatar_file 2026-06-14 17:04:23 +08:00
朱潮
0e90b550a4 set_avatar_file 2026-06-14 16:46:27 +08:00
朱潮
e3c6408802 add poem-storyboard 2026-06-14 15:27:59 +08:00
朱潮
acb9330354 add poem-storyboard 2026-06-14 11:36:35 +08:00
朱潮
0e8eef8eaa add 视频地址渲染 2026-06-14 10:19:48 +08:00
朱潮
504fc95196 add 视频地址渲染 2026-06-14 10:10:23 +08:00
朱潮
db89ab158a add build-essential 2026-06-14 09:35:37 +08:00
朱潮
ec2e0acea2 add agnes-image 2026-06-14 08:16:00 +08:00
朱潮
195bd49236 Merge branch 'developing' into bot_manager 2026-06-13 19:28:37 +08:00
github-actions[bot]
79b2c35d49
chore(.features): sync feature memory (auto) (#55)
Generated by sparticle-toolkit feature-memory-sync

Co-authored-by: Denya0529 <217564326+Denya0529@users.noreply.github.com>
2026-06-12 17:00:20 +00:00
朱潮
73042c57a6 add subagent_context_middleware 2026-06-12 15:56:26 +08:00
朱潮
e2827c6a47 add mainAgentHiddenTools 2026-06-12 11:03:30 +08:00
csh28
9a7d64bb59
Merge pull request #48 from sparticleinc/codex/remove-heavy-embedding-deps
[codex] Remove heavy embedding dependencies
2026-06-09 18:08:42 +08:00
csh28
f42a9e484a Remove heavy embedding dependencies 2026-06-09 08:56:31 +08:00
朱潮
cb649d83ee Merge branch 'developing' into bot_manager
# Conflicts:
#	.features/skill/MEMORY.md
#	poetry.lock
#	requirements.txt
2026-06-08 20:07:30 +08:00
朱潮
cfb0babf2a Merge branch 'prod' of https://github.com/sparticleinc/catalog-agent into prod 2026-06-08 19:54:30 +08:00