Commit Graph

1037 Commits

Author SHA1 Message Date
朱潮
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
朱潮
065403223d Merge branch 'dev' into developing 2026-06-08 19:44:11 +08:00
朱潮
fabb14c66a Merge branch 'feature/enable_redis' into dev
# Conflicts:
#	poetry.lock
2026-06-08 19:43:27 +08:00
朱潮
77079539c1 refactor: remove file-parsing knowledge-base pipeline and Huey queue
The local file-parsing pipeline (upload -> Huey async parse -> generate
projects/data/.../document.txt) is no longer needed: RAG retrieval runs
against the backend vector store and does not read the local parse output,
so removing this has zero impact on existing bot Q&A.

- Delete task_queue/ (Huey queue, consumer, tasks, task status store)
- Delete parsing utils: dataset_manager, single_file_processor,
  data_merger, project_manager
- Delete db_manager.py (only managed task_status.db)
- routes/files.py: keep only POST /api/v1/upload; drop all
  parse/queue/task endpoints
- routes/projects.py: drop /tasks endpoint and task_status import
- utils/__init__.py & api_models.py: remove exports/models for deleted
  modules and queue task models
- start_unified.py & start_all_optimized.sh: no longer launch the
  queue consumer
- Drop huey dependency (keep redis)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:40:58 +08:00
朱潮
e6b28818bf add REDIS_URL 2026-06-08 19:00:55 +08:00
朱潮
955a064ee3 add reviewer 2026-06-08 18:32:51 +08:00
朱潮
4a5d8d05cf merge 2026-06-07 18:33:09 +08:00
朱潮
1fc105a732 透传接口现在支持视觉图片识别 2026-06-07 11:02:10 +08:00
朱潮
f45f55b50a add /api/v3/llm/chat/completions 2026-06-07 10:57:34 +08:00
朱潮
f18d966123 add /api/v3/llm/chat/completions 2026-06-07 10:55:25 +08:00
朱潮
8466b0e710 add expense-approval-reviewer 2026-06-07 10:50:17 +08:00
朱潮
d009411360 Merge branch 'developing' into bot_manager 2026-06-07 10:26:43 +08:00