Commit Graph

456 Commits

Author SHA1 Message Date
朱潮
738a904a6f merge 2026-04-02 11:25:20 +08:00
autobee-sparticle
213e541697
fix: resolve PrePrompt Hook env var crash and increase Mem0 pool size (#24)
1. Fix "all environment values must be bytes or str" error in hook execution
   by ensuring all env values are converted to str (getattr may return None
   when attribute exists but is None). Also sanitize shell_env values.

2. Increase MEM0_POOL_SIZE default from 20 to 50 to address "connection pool
   exhausted" errors under high concurrency.

Fixes: sparticleinc/felo-mygpt#2519

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 22:04:31 +09:00
朱潮
44db634cbb Merge branch 'feature/moshui20260330-schedule-job' into dev 2026-04-01 10:37:16 +08:00
朱潮
d6ee567758 schedule 优化 2026-04-01 10:37:03 +08:00
朱潮
fd0fbc422d uuid2str 2026-04-01 10:27:21 +08:00
朱潮
89a9d81892 Merge branch 'feature/moshui20260330-schedule-job' into dev 2026-03-31 20:56:29 +08:00
朱潮
85a262257e update schedule skill 2026-03-31 20:56:20 +08:00
朱潮
dc2e8a39e3 Merge branch 'feature/moshui20260330-schedule-job' into dev 2026-03-31 20:04:49 +08:00
朱潮
d38a737730 两个 Dockerfile 中的 npm 安装命令里添加了 nodemailer
和 dotenv:
2026-03-31 19:30:40 +08:00
朱潮
daa5bf345a update schedule skill 2026-03-31 16:23:03 +08:00
朱潮
bc59234eac update skill 2026-03-31 16:11:09 +08:00
朱潮
c2f7148f98 增加环境变量到pre prompt 2026-03-31 14:37:20 +08:00
朱潮
393c4e4138 schedule 通过 aiohttp POST 请求调用
http://127.0.0.1:8001/api/v2/chat/completions
2026-03-31 11:19:59 +08:00
朱潮
4090b4d734 将 users 改为 Path(users),使 / 运算符可以正确拼接路径。 2026-03-31 10:06:07 +08:00
朱潮
9cc0d72430 update schedule 2026-03-31 10:00:16 +08:00
朱潮
3b9c7165a9 feat: 添加定时任务调度系统(schedule-job)
- 新增 schedule-job skill,支持 cron 周期任务和一次性定时任务
- 新增 schedule_manager.py CLI 工具(list/add/edit/delete/toggle/logs)
- 新增 ScheduleExecutor 全局异步调度器,每 60s 扫描到期任务并调用 agent 执行
- 任务数据存储在 projects/robot/{bot_id}/users/{user_id}/tasks.yaml
- 执行结果写入 task_logs/execution.log
- 集成到 FastAPI lifespan 生命周期管理
- 添加 croniter、pyyaml 依赖

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 23:17:47 +08:00
朱潮
2bc071645f merge from onprem 2026-03-30 21:22:19 +08:00
朱潮
52a700e0db Merge branch 'onprem-release' into dev 2026-03-30 21:21:37 +08:00
朱潮
7214adcf8e Merge branch 'dev' of https://github.com/sparticleinc/catalog-agent into dev 2026-03-30 21:02:05 +08:00
朱潮
dc52ddb8cc Merge branch 'feature/pre-memory-prompt' into dev 2026-03-30 21:00:45 +08:00
朱潮
fea6b35779 feat: 添加 PreMemoryPrompt hook 支持自定义记忆提取提示词
通过插件 hook 机制允许自定义 Mem0 的 FACT_RETRIEVAL_PROMPT,
包含联系人关系追踪和同姓消歧等增强能力。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 20:36:35 +08:00
autobee-sparticle
0c9c36cc54
fix: 禁止 NOVARE 设备控制二次确认循环 (#22)
* add page number

* feat: add skill feature memory

添加 skill 功能的 feature memory,记录技能包管理服务和 Hook 系统的核心信息。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(skill): add feature memory with changelog and decisions

添加 skill 功能的完整记忆文档:

Changelog:
- 2025-Q4: 初始实现 (GRPC 层 + 内置 skills)
- 2026-Q1: API 完善 (REST API + Hook 系统)

Design Decisions:
- 001: Skill 架构设计 (目录结构、Hook 系统)
- 002: 上传安全措施 (ZipSlip、路径遍历防护)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* soffice sharp 支持

* shell_env support

* fix: 禁止 NOVARE 设备控制二次确认循环

- 添加"禁止二次确认"最高优先级规则,明确用户确认后必须立即执行工具调用
- 扩展确认关键词列表,增加更多日语确认表达(お願いします、はい、うん等)
- 添加正确/错误流程示例,防止模型循环询问确认
- 强化规则指南中的确认执行逻辑

Fixes: sparticleinc/mygpt-frontend#2303

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: 朱潮 <zhuchaowe@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: zhuchao <zhuchaowe@163.com>
2026-03-27 18:34:12 +09:00
朱潮
6b6fad9c1c Merge branch 'onprem-dev' into onprem-release 2026-03-27 15:08:37 +08:00
朱潮
d0b619f4f1 Merge branch 'onprem' into onprem-dev 2026-03-27 12:31:32 +08:00
朱潮
6300eea61d refactor: 将 citation 详细提示词从 system prompt 移至 RAG tool result 按需注入
system prompt 中的 citation 规则(document/table/web 三类约80行)占用大量 token,
现将详细格式要求移到 rag_retrieve_server.py 中作为工具返回前缀按需注入,
system prompt 仅保留精简版通用 placement rules。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 12:30:20 +08:00
朱潮
becd36da9d 增加高亮功能 2026-03-27 12:12:50 +08:00
autobee-sparticle
18bf296aa0
feat: move enable_thinking control from docker-compose to request body (#21)
* add page number

* feat: add skill feature memory

添加 skill 功能的 feature memory,记录技能包管理服务和 Hook 系统的核心信息。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(skill): add feature memory with changelog and decisions

添加 skill 功能的完整记忆文档:

Changelog:
- 2025-Q4: 初始实现 (GRPC 层 + 内置 skills)
- 2026-Q1: API 完善 (REST API + Hook 系统)

Design Decisions:
- 001: Skill 架构设计 (目录结构、Hook 系统)
- 002: 上传安全措施 (ZipSlip、路径遍历防护)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* soffice sharp 支持

* shell_env support

* feat: move enable_thinking control from docker-compose to request body

Remove DEFAULT_THINKING_ENABLE environment variable from docker-compose
and settings.py. The enable_thinking flag is now solely controlled via
request body (default: false), as felo-mygpt already passes this config
from RobotConfig database.

Closes sparticleinc/felo-mygpt#2473

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: 朱潮 <zhuchaowe@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: zhuchao <zhuchaowe@163.com>
2026-03-26 20:12:39 +09:00
朱潮
89b7bb9928 fix: 解压 skill 到 robot 目录时清理不在列表中的多余 skill 文件夹
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:55:06 +08:00
朱潮
6b9ae7f86a fix: skill 删除时同步清理 robot 目录,解压时跳过已存在的 skill
1. remove_skill 删除 uploads 下的 skill 后,同步删除 projects/robot/{bot_id}/skills/ 下的副本
2. _extract_skills_to_robot 不再每次全量清空重建,已存在的 skill 直接跳过

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:47:28 +08:00
朱潮
1b4fcb3d71 refactor: 改用基于元数据文件位置的 skill 结构检测
将 skill 上传检测逻辑从基于 zip 文件结构(是否有顶级目录)改为基于
SKILL.md 和 .claude-plugin/plugin.json 的实际位置:先检查解压根目录,
再检查第二级子目录。统一解压到临时目录后再按结构移动到 skills 目录。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:30:17 +08:00
autobee-sparticle
85519da5a5
fix(memory): 改进 Memory 提取 prompt 使用大白话 (#20)
将 fact extraction prompt 中的技术性格式改为自然语言:
- "Contact: [name] (relationship, referred as [nick])" → "[name] is a [relationship], also called [nick]"
- 移除 "DEFAULT when user says" 等技术标记
- 添加 Plain Language Rule 明确要求输出通俗易懂的文本
- 更新所有示例为自然语言风格

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:14:13 +09:00
朱潮
e13405ba29 shell_env support 2026-03-24 00:12:19 +08:00
autobee-sparticle
e987cb6f6b
fix(novare): 添加位置粒度降级搜索策略,解决详细位置指定时设备匹配失败问题 (#18)
当用户指定过于详细的位置信息(如"3階執務スペース、フォーラム側窓側")时,
find_device_by_area 可能无法匹配到设备区域。新增降级搜索策略:
- 第1步:去除方位修饰语,保留核心区域名重新搜索
- 第2步:进一步简化到楼层级别搜索
- 降级成功时告知用户搜索范围变化并确认

Closes #2201 (mygpt-frontend)

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 15:47:48 +09:00
朱潮
29da20fa22 soffice sharp 支持 2026-03-18 23:54:41 +08:00
朱潮
e713a0a903 Merge branch 'prod' into onprem 2026-03-18 15:40:52 +08:00
朱潮
f9839b9bc4 Merge branch 'prod' into onprem-release 2026-03-18 15:40:50 +08:00
朱潮
2adc8fc5e3 Merge branch 'prod' into dev
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 15:40:43 +08:00
朱潮
4b3cab0cc7 Merge branch 'prod' into onprem-dev 2026-03-18 15:38:08 +08:00
shuirong
822589eab6 ci: 重新调整CI 2026-03-18 16:16:53 +09:00
朱潮
709a967537 Merge branch 'developing' 2026-03-17 22:06:23 +08:00
朱潮
0c985607b5 Merge branch 'master' of https://github.com/sparticleinc/catalog-agent 2026-03-17 22:04:50 +08:00
朱潮
cc99ba67ac merge 2026-03-17 22:04:30 +08:00
朱潮
e2e0a7d985 跨语言场景 - 即使用户用其他语言提问,也必须用指定语言回复 2026-03-17 22:03:23 +08:00
朱潮
380764d5ed add chromium 2026-03-17 14:48:50 +08:00
朱潮
95e34ed172 add chromium 2026-03-17 14:27:16 +08:00
autobee-sparticle
a161e43421
feat: add POST /api/v1/memory endpoint for realtime conversation memory (#17)
* feat: add POST /api/v1/memory endpoint for realtime conversation memory

Add memory extraction API that accepts conversation messages and
stores them via Mem0. This enables realtime voice sessions to save
memories through the same pipeline as chat conversations.

Fixes: sparticleinc/mygpt-frontend#2126

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address code review findings for memory API

- Use Literal["user","assistant"] for role field validation
- Add Field constraints (min_length, max_length=200)
- Track and report pairs_failed in response
- Hide internal exception details from HTTP response
- Remove unused authorization parameter (internal API)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 11:14:02 +09:00
autobee-sparticle
deb78a7625
fix: improve memory extraction for colloquial/informal speech (#16)
* chore: add .worktrees/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(CI): 添加 onprem-dev 环境的构建和部署配置

在 CircleCI 配置中新增 onprem-dev 环境的 build-and-push 和 deploy 任务,部署到 cluster-for-B 的 onprem-dev 命名空间

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: improve memory extraction for colloquial/informal speech

Add semantic completeness rules and multilingual few-shot examples
to FACT_RETRIEVAL_PROMPT to prevent truncated or semantically incorrect
memory extraction. Specifically addresses Japanese casual speech where
particles (が, を, に) are often omitted.

Closes sparticleinc/mygpt-frontend#2125

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: zhuchao <zhuchaowe@163.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: shuirong <shuirong1997@icloud.com>
2026-03-17 10:37:49 +09:00
朱潮
f24c3ff78f playwright support 2026-03-16 23:07:00 +08:00
朱潮
c27270588f 增加取消推理 2026-03-16 22:22:39 +08:00
shuirong
d2e6af5974
Merge pull request #15 from sparticleinc/prod
feat(CI): 添加 onprem-dev 环境的构建和部署配置
2026-03-16 16:19:41 +09:00