Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
357 commits
Select commit Hold shift + click to select a range
962827d
feat(llm): add Anthropic and Gemini protocol support
fadeoreo Jul 22, 2026
6e3cd73
Merge branch 'OpenBMB:main' into main
xhd0728 Jul 22, 2026
17df88d
docs: add license
xhd0728 Jul 22, 2026
0342c68
fix(tools): support per-tool execution timeouts
fadeoreo Jul 22, 2026
faafffe
fix(agent): enforce required knowledge query steps
fadeoreo Jul 22, 2026
a7f0e34
docs: add license (#27)
hm1229 Jul 22, 2026
328778f
fix(dev): remove hardcoded internal IPs from dev config (#23)
mteguhfh Jul 22, 2026
eb4be56
fix(agent): stabilize SOP confirmation state transitions
fadeoreo Jul 22, 2026
89b97f2
fix(llm): retry with doubled max_tokens when reasoning models hit len…
Ruijie-Ysp Jul 23, 2026
61d3a40
feat: 多渠道接入(微信/企业微信)与智能分发 (#20)
tianling536 Jul 23, 2026
71befdb
chore(deps): bump the frontend-minor-and-patch group across 1 directo…
dependabot[bot] Jul 24, 2026
9856dec
feat(channels): add durable Feishu and WeCom ingress
fadeoreo Jul 25, 2026
967a5e6
fix(channels): atomically claim outbound deliveries
fadeoreo Jul 25, 2026
dafca46
feat(channels): expose Feishu setup and delivery audit
fadeoreo Jul 25, 2026
466afb2
test(channels): cover lifecycle and routing isolation
fadeoreo Jul 25, 2026
fba016a
docs(channels): document the Feishu integration design
fadeoreo Jul 25, 2026
feca293
fix(packaging): prevent Intel macOS OpenSSL startup failure
fadeoreo Jul 25, 2026
64e0d97
feat(knowledge): preserve document structure during parsing
fadeoreo Jul 25, 2026
10259e4
feat(knowledge): compact related evidence as bounded context
fadeoreo Jul 25, 2026
33b6f7a
feat(search): honor knowledge query scope and intent
fadeoreo Jul 25, 2026
201c212
feat(search): improve knowledge retrieval relevance and continuity
fadeoreo Jul 25, 2026
4052fb2
fix(search): prevent related context and coverage drift
fadeoreo Jul 25, 2026
5e4d0dd
feat(chat): improve new conversation flow
fadeoreo Jul 25, 2026
4322b1b
fix(knowledge): preserve atomic references in retrieved answers
fadeoreo Jul 25, 2026
7e8754f
fix(models): switch default models without transient conflicts
fadeoreo Jul 25, 2026
d34a46e
fix(sop): isolate new SOP workspaces
fadeoreo Jul 25, 2026
87b81e3
chore(deps): bump the frontend-minor-and-patch group (#40)
dependabot[bot] Jul 27, 2026
f4d3e50
chore(deps): bump vite from 6.4.2 to 8.1.5 in /frontend-enterprise (#42)
dependabot[bot] Jul 27, 2026
562cdf2
chore(deps): update anthropic requirement in /backend (#43)
dependabot[bot] Jul 27, 2026
d7d9725
ci(deps): bump actions/setup-python from 6 to 7 (#45)
dependabot[bot] Jul 27, 2026
473d84d
feat: 渠道可靠性与工程强化(遗留项 P0-P3) (#33)
tianling536 Jul 27, 2026
bcc4fbd
Remove unused max_output_tokens assignment
hm1229 Jul 27, 2026
c2495e0
test(agent): establish refactor contract baseline
fadeoreo Jul 27, 2026
150b7a1
test(agent): characterize feedback and terminal visibility
fadeoreo Jul 27, 2026
d369b00
test(agent): characterize graph branch and merge
fadeoreo Jul 27, 2026
dea1de1
refactor(agent): extract legacy graph rules
fadeoreo Jul 27, 2026
6f44aad
refactor(agent): extract legacy loop policies
fadeoreo Jul 27, 2026
9d79ee7
refactor(agent): extract legacy knowledge and tool actions
fadeoreo Jul 27, 2026
43b8547
refactor(agent): extract legacy general skill action
fadeoreo Jul 27, 2026
79bff75
refactor(agent): extract legacy reflection coordinator
fadeoreo Jul 27, 2026
d0198dd
feat(capabilities): add typed provider contracts and snapshots
fadeoreo Jul 27, 2026
3fd37b7
docs(capabilities): publish provider contract guide
fadeoreo Jul 27, 2026
931d2d7
feat(capabilities): add local knowledge runtime adapter
fadeoreo Jul 27, 2026
284c76d
feat(capabilities): add durable provider binding rehydration
fadeoreo Jul 27, 2026
4cf6bd0
feat(capabilities): define stable provider errors
fadeoreo Jul 27, 2026
29f4723
fix(capabilities): enforce local knowledge scope and citation boundaries
fadeoreo Jul 27, 2026
9c7b3b1
test(capabilities): add shared provider contract test kit
fadeoreo Jul 27, 2026
5f2afe6
feat(capabilities): publish knowledge contract schemas
fadeoreo Jul 27, 2026
1305819
test(capabilities): tighten provider conformance rules
fadeoreo Jul 27, 2026
03d5f18
fix(capabilities): align wire schema and conformance rules
fadeoreo Jul 27, 2026
56d3af8
refactor(agent): extract legacy turn finalizer
fadeoreo Jul 27, 2026
275654f
feat(capabilities): add pinned local knowledge registry
fadeoreo Jul 27, 2026
5bf0400
fix(capabilities): pin local registry operation revisions
fadeoreo Jul 27, 2026
90cd320
fix(capabilities): align provider contract types
fadeoreo Jul 27, 2026
20ab523
fix(capabilities): simplify provider call context
fadeoreo Jul 27, 2026
fb29fb4
fix(capabilities): keep run identity distinct from turn
fadeoreo Jul 27, 2026
d623196
fix(capabilities): enforce stable provider context boundaries
fadeoreo Jul 27, 2026
3242781
fix(capabilities): keep general skill execution local
fadeoreo Jul 27, 2026
114b9ea
fix(channels): render labels from active channel
fadeoreo Jul 27, 2026
ac48cfe
fix(channels): use active channel in identity replies
fadeoreo Jul 27, 2026
7f05c3a
feat(capabilities): load general skills through provider snapshots
fadeoreo Jul 27, 2026
ca1c908
fix(build): align test tooling with upstream dependencies
fadeoreo Jul 27, 2026
2259d5e
feat: 页面头部账户下拉展示当前用户信息
tianling536 Jul 25, 2026
a4d422f
feat: 用户头像上传与展示(并入用户信息卡 PR)
tianling536 Jul 25, 2026
31787c1
fix: 头像选择器重复选择同一文件不触发 onChange
tianling536 Jul 25, 2026
e56296c
fix: 头像上传改为独立弹窗,修复 macOS 原生文件对话框焦点问题
tianling536 Jul 25, 2026
f356d19
fix: 头像 URL 渲染增加协议白名单(CodeQL 安全告警)
tianling536 Jul 25, 2026
c720e6c
fix: 用 URL 解析做头像地址协议校验(CodeQL 告警)
tianling536 Jul 25, 2026
2eaeca4
feat: 头像选图即传,免预览保存两步操作
tianling536 Jul 25, 2026
7a8f236
fix: 复核修复——头像预览 blob URL 释放与上传大小预检
tianling536 Jul 27, 2026
da43b71
fix(capabilities): preserve existing scene skill graph shape
fadeoreo Jul 28, 2026
8647d1e
fix(capabilities): validate provider package pin
fadeoreo Jul 28, 2026
7d1aa82
fix(channels): make bind code copy reliable
fadeoreo Jul 28, 2026
f9bc0f6
feat(channels): show binding creator in channel list
fadeoreo Jul 28, 2026
1b729f2
feat(tools): allow removing an mcp toolset from an employee
fadeoreo Jul 28, 2026
c7ac3e1
Refine Feishu channel setup UI
fadeoreo Jul 28, 2026
b446679
fix: 复核修复——头像不再内联进 login/me 与会话存储,删用户级联删头像
tianling536 Jul 28, 2026
8306ad1
feat: 页面头部账户下拉展示当前用户信息 (#36)
hm1229 Jul 29, 2026
36de418
feat(channels): generalize reaction feedback lifecycle
fadeoreo Jul 29, 2026
c327417
feat(channels): add durable DingTalk Stream integration
fadeoreo Jul 29, 2026
a2d4ec3
feat(channels): add DingTalk setup UI
fadeoreo Jul 29, 2026
61af86b
feat(chat): allow cancelling queued messages
fadeoreo Jul 29, 2026
de5a22a
feat(general-skills): add read-only operation
fadeoreo Jul 30, 2026
fefd0a3
feat(agent-loop): integrate independent skill selection
fadeoreo Jul 30, 2026
2db0d8d
test(general-skills): cover read-only routing
fadeoreo Jul 30, 2026
d2e91b3
feat(chat): make bare response links clickable
fadeoreo Jul 30, 2026
4a7803e
fix(chat): preserve context in formatting follow-ups
fadeoreo Jul 30, 2026
1f90d3f
feat(general-skills): collapse run results by default
fadeoreo Jul 30, 2026
f375424
feat(general-skills): add markdown render toggle
fadeoreo Jul 30, 2026
0f85979
fix(models): verify before activating saved configs
fadeoreo Jul 31, 2026
5619c52
feat(skills): publish employee skills to the marketplace
fadeoreo Jul 31, 2026
a1d2042
fix(skills): prevent public editor scope race
fadeoreo Jul 31, 2026
b0dc8bc
feat: add isolated taskframe harness v2
hm1229 Jul 31, 2026
2cf3d4a
feat: make Harness v2 the unified runtime
hm1229 Aug 1, 2026
b0d3dc9
fix: select harness capabilities during task execution
hm1229 Aug 1, 2026
e87db79
fix: let harness inspect skills before execution
hm1229 Aug 1, 2026
8e53dbe
feat: add progressive harness capability discovery
hm1229 Aug 2, 2026
1da3489
fix: support Ubuntu bubblewrap runtime
hm1229 Aug 2, 2026
25a04ce
fix: unify knowledge citation sources
hm1229 Aug 2, 2026
828af5a
feat: enrich enterprise conversation logs
hm1229 Aug 2, 2026
748cdfc
fix: hide empty conversation filters
hm1229 Aug 2, 2026
76db88e
fix: align model stats and style account roles
hm1229 Aug 3, 2026
5017b2f
Codex/harness v2 (#66)
hm1229 Aug 3, 2026
ea28f5c
fix: clear harness state when resetting sessions
fadeoreo Aug 3, 2026
4bb4fc4
fix: enforce harness artifact integrity and quota accounting
fadeoreo Aug 3, 2026
91d44f9
fix(scripts): stop native stderr from aborting dev.ps1 on Windows (#57)
lixiaob8349 Aug 3, 2026
e7ebffb
Make public setup infer a default URL
fadeoreo Aug 3, 2026
a311ef8
Clarify Linux setup and deployment overrides
fadeoreo Aug 3, 2026
6e9ef99
fix(llm): support flexible Anthropic endpoint URLs
fadeoreo Aug 4, 2026
239800c
add employee-scoped public API and key management
hm1229 Aug 4, 2026
f60fe89
fix API key copy on HTTP deployments
hm1229 Aug 4, 2026
5273b4f
move full-access API keys to accounts
hm1229 Aug 4, 2026
843092a
move account API keys to global user menu
hm1229 Aug 5, 2026
827cb4d
feat(macos): support Intel builds with native embedded UI (#68)
xfei6868 Aug 5, 2026
b626f2d
fix false-success API key copying
hm1229 Aug 5, 2026
0814c39
Update ui_config.py
hm1229 Aug 5, 2026
d0a063b
fix(windows): harden MCP stdio subprocess handling
fadeoreo Aug 5, 2026
36fc090
feat(app): restore release update reminders
fadeoreo Aug 5, 2026
f6714e1
fix(models): bound capability probe output
fadeoreo Aug 5, 2026
74c642e
fix(tools): preserve MCP argument boundaries
fadeoreo Aug 5, 2026
ac689f7
feat(harness): enforce fail-closed sandbox execution
fadeoreo Aug 5, 2026
7ad9108
feat(agent): sandbox generated skill execution
fadeoreo Aug 5, 2026
8280670
feat(admin): add tenant runtime sandbox settings
fadeoreo Aug 5, 2026
e59edca
test(tools): isolate probe settings
fadeoreo Aug 5, 2026
e171ccb
build(packaging): bundle pinned SRT and Node runtimes
fadeoreo Aug 5, 2026
eed371f
feat: complete public API and SOP workspace
hm1229 Aug 5, 2026
53c6878
chore: merge main into public API branch
hm1229 Aug 5, 2026
01d9d71
Merge pull request #70 from OpenBMB/codex/public-api-agent-keys
hm1229 Aug 5, 2026
5b83897
fix(windows): make bundled SRT initialization and execution reliable
fadeoreo Aug 5, 2026
15299d1
refactor(harness): remove legacy agent loop runtime
hm1229 Aug 5, 2026
4cfe0cc
fix(models): make verified saves atomic
hm1229 Aug 5, 2026
2c0299b
fix(agents): preserve custom avatars across restart
fadeoreo Aug 6, 2026
96cec51
fix(packaging): verify bundled lark channel sdk
fadeoreo Aug 6, 2026
b4f15cf
feat(logs): add JSON batch export
hm1229 Aug 6, 2026
526cb62
Codex/public api agent keys (#71)
hm1229 Aug 6, 2026
68f2f88
fix(tools): support basic auth json credentials
fadeoreo Aug 6, 2026
3367ffd
fix(sop): expose expandable learning errors
hm1229 Aug 6, 2026
94aa63a
Merge pull request #76 from OpenBMB/codex/public-api-agent-keys
hm1229 Aug 6, 2026
0ca93e7
fix(windows): hide unsupported bash capability
fadeoreo Aug 6, 2026
53f6ce0
fix(windows): support PowerShell fallback and signed SRT packaging
fadeoreo Aug 6, 2026
c01e420
fix(windows): allow unsigned packaging with degraded runtime warning
fadeoreo Aug 7, 2026
49f94ce
fix(packaging): retry Python runtime asset downloads
fadeoreo Aug 7, 2026
a052455
fix(windows): expose bundled Python to shell commands
fadeoreo Aug 7, 2026
fd73330
feat(harness): add sandbox artifacts and runtime controls
hm1229 Aug 7, 2026
8ec96a8
Merge origin/main into codex/public-api-agent-keys
hm1229 Aug 7, 2026
cb91ee5
feat(harness): add sandbox artifacts and runtime controls (#81)
hm1229 Aug 7, 2026
9e85d37
feat(harness): 通用技能产物未声明时自动补登为下载 artifact
tianling536 Aug 6, 2026
1ead5e1
fix(agent): 补回 _fallback_session_title_from_message 的 @staticmethod
tianling536 Aug 6, 2026
025b208
feat(agents): restore default model binding UI
fadeoreo Aug 8, 2026
d898cab
feat(knowledge): add interactive knowledge graph visualization
Winsaney Aug 9, 2026
dd9ddf4
feat(knowledge): add interactive knowledge graph visualization (#85)
hm1229 Aug 10, 2026
39c170d
fix: improve model diagnostics and capability removal
hm1229 Aug 10, 2026
16a1dc5
Merge remote-tracking branch 'origin/main' into codex/public-api-agen…
hm1229 Aug 10, 2026
096992f
fix(harness): persist large JSON tool results
hm1229 Aug 10, 2026
f2d8716
Merge pull request #91 from OpenBMB/codex/public-api-agent-keys
hm1229 Aug 10, 2026
7026344
fix(frontend): refresh dependencies after updates
hm1229 Aug 11, 2026
c6f7a4f
Merge remote-tracking branch 'origin/main' into codex/public-api-agen…
hm1229 Aug 11, 2026
a270e81
fix(frontend): refresh dependencies after updates (#93)
hm1229 Aug 11, 2026
19f2ba9
feat(channels): add inbound attachment support for feishu and dingtal…
skywclouds Aug 12, 2026
eaff9bf
feat(mcp): add MCP Apps support
hm1229 Aug 12, 2026
43c2042
fix(mcp): expose Apps toggle and raise resource limit
hm1229 Aug 12, 2026
b6eed9a
feat: publish integrated runtime updates
hm1229 Aug 13, 2026
e2b291c
Merge remote-tracking branch 'origin/main' into codex/public-api-agen…
hm1229 Aug 13, 2026
16bb6cd
test(mcp): align stdio metadata expectations
hm1229 Aug 13, 2026
edbfd69
Codex/public api agent keys (#100)
hm1229 Aug 13, 2026
fe43510
feat(teams): add multi-agent team backend and channel binding
moyunqinghe Aug 12, 2026
2172de4
feat(teams): add team management and chat UI
moyunqinghe Aug 12, 2026
a904884
docs: add multi-agent team design decisions
moyunqinghe Aug 12, 2026
3fd435e
fix(tools): forward custom auth headers
fadeoreo Aug 13, 2026
b902c68
fix(tools): keep probe auth settings aligned
fadeoreo Aug 13, 2026
f2a8e4d
fix(teams): restrict team session writes and scope TL threads by team
moyunqinghe Aug 13, 2026
30b6989
fix(macos): restore native edit shortcuts
fadeoreo Aug 14, 2026
76ff22f
fix(knowledge): 图谱可视化回调参数补类型,修复 TS7006 构建失败
tianling536 Aug 15, 2026
0080010
feat: add SOP evolution and knowledge editing
hm1229 Aug 15, 2026
9b611cf
Merge remote-tracking branch 'origin/main' into codex/public-api-agen…
hm1229 Aug 15, 2026
83a2f39
fix(harness): 产物兜底扫描防劫持与噪音过滤
tianling536 Aug 15, 2026
838af40
fix(teams): separate management and chat entry points
hm1229 Aug 15, 2026
9dab158
fix(teams): keep injected context out of chat history
hm1229 Aug 15, 2026
049bb35
fix(teams): keep group chat in team workspace
hm1229 Aug 15, 2026
f05f2b8
fix(teams): show team groups in chat workspace
hm1229 Aug 15, 2026
04e02c7
fix(teams): identify group message senders
hm1229 Aug 15, 2026
18b7c4d
fix(teams): keep member actions on one line
hm1229 Aug 15, 2026
596482c
feat(teams): surface member collaboration in group chat
hm1229 Aug 15, 2026
2e2347a
fix(teams): render collaboration inside group chat
hm1229 Aug 15, 2026
e4ecb60
fix(chat): prevent narrow message bubble collapse
hm1229 Aug 15, 2026
e3fa152
fix(teams): interleave collaboration in chat timeline
hm1229 Aug 15, 2026
f30640b
fix(sop): keep edit actions visible while scrolling
hm1229 Aug 15, 2026
5a93e01
fix(knowledge): 图谱可视化回调参数补类型,修复 TS7006 构建失败 (#102)
hm1229 Aug 15, 2026
4326f61
Merge pull request #96 from momobiubiu/feat/multi-agent-teams
hm1229 Aug 15, 2026
32d38fc
Merge remote-tracking branch 'origin/main' into codex/public-api-agen…
hm1229 Aug 16, 2026
c93db19
fix(teams): resume member tasks from group chat
hm1229 Aug 16, 2026
a289b82
feat(teams): stream member replies in group chat
hm1229 Aug 16, 2026
86deacf
Merge pull request #104 from OpenBMB/codex/team-chat-live-collaboration
hm1229 Aug 16, 2026
b4685bc
fix(harness): run skills through native tools
hm1229 Aug 16, 2026
8264a32
merge: sync main and preserve evolution features
hm1229 Aug 16, 2026
5d6a5c3
fix(chat): validate external markdown links
hm1229 Aug 16, 2026
e2cbfb7
fix(skills): align repair artifact directory prompt
hm1229 Aug 16, 2026
9f5a73e
feat(chat): 数字员工产出文件可下载(捕获/存储/消息卡片/下载端点) (#55)
hm1229 Aug 16, 2026
dfdf603
merge: resolve PR 103 conflicts
hm1229 Aug 16, 2026
21c679f
Codex/public api agent keys (#103)
hm1229 Aug 16, 2026
1193480
fix(runtime): make async turns durable and retryable
hm1229 Aug 17, 2026
3fc1554
feat(channels): rich-text markdown rendering for feishu and dingtalk …
skywclouds Aug 17, 2026
145c1c0
Merge pull request #117 from OpenBMB/codex/public-api-agent-keys
hm1229 Aug 17, 2026
b72df2a
feat(channels): support WeChat and WeCom image and file attachments (…
orhuoxu Aug 17, 2026
43d2d48
Update README.md
hm1229 Aug 17, 2026
6c9a898
Change business contact email in README.zh.md
hm1229 Aug 17, 2026
359319a
Merge pull request #135 from OpenBMB/hm1229-patch-2
hm1229 Aug 17, 2026
1eb869a
Update README.md (#134)
hm1229 Aug 17, 2026
fd9b4b3
fix(skills): run tests through harness v2
hm1229 Aug 17, 2026
0a82736
feat: complete team and capability workflows
hm1229 Aug 17, 2026
0cd22f3
Merge pull request #185 from OpenBMB/codex/public-api-agent-keys
hm1229 Aug 18, 2026
38af6a6
fix: resolve general skill code quality findings
hm1229 Aug 18, 2026
91e7135
fix: resolve general skill code quality findings (#188)
hm1229 Aug 18, 2026
9a76299
fix(runtime): align scheduled SOP and skill tests with harness v2
hm1229 Aug 18, 2026
e01a4af
Merge pull request #189 from OpenBMB/codex/fix-issues-119-183
hm1229 Aug 18, 2026
3fc6386
fix(harness): normalize document attachment paths
hm1229 Aug 18, 2026
322e90e
feat(scheduled-tasks): add SOP version policy
hm1229 Aug 18, 2026
d7e9386
Merge pull request #190 from OpenBMB/codex/fix-issues-119-183
hm1229 Aug 18, 2026
9c0e416
fix(harness): accept structured skill results
hm1229 Aug 18, 2026
02e07f2
feat(channels): 飞书人工介入转接与 /回复反馈 指令 (#187)
skywclouds Aug 18, 2026
f76daf9
fix(auth): support unique display name login
coder-zkl1988 Aug 18, 2026
a3ace94
feat(desktop): redesign login and window chrome
coder-zkl1988 Aug 18, 2026
c291e3b
feat(employees): add five preset roles
coder-zkl1988 Aug 18, 2026
1f2a181
fix(db): preserve legacy knowledge version references
coder-zkl1988 Aug 18, 2026
3bc4258
feat(harness): allow host commands and file paths
hm1229 Aug 19, 2026
0b9a39a
revert(login): restore previous landing page
hm1229 Aug 19, 2026
cdee7bb
feat(desktop): improve macOS chrome and expand preset employees (#192)
hm1229 Aug 19, 2026
b2cd978
feat(channels): 飞书渠道协作者管理与启停 (#193)
skywclouds Aug 19, 2026
16c237d
fix(channels): make bound Feishu assignees selectable
fadeoreo Aug 19, 2026
bd4af26
feat(harness): complete A2A and workflow updates
hm1229 Aug 19, 2026
61e2176
merge: resolve PR 195 conflicts
hm1229 Aug 19, 2026
ba7c298
fix(handoff): match Feishu topic replies to root notice
fadeoreo Aug 19, 2026
38b41d6
Codex/fix issues 119 183 (#195)
hm1229 Aug 19, 2026
6cc1fb5
feat: 数据库层方言可插拔(P1)
tianling536 Jul 25, 2026
1e282a2
feat: 渠道连接器方言化(P2)
tianling536 Jul 26, 2026
0d0c088
ci: openGauss 方言冒烟工作流(真实 openGauss 容器验证)
tianling536 Jul 26, 2026
73172d2
test: 适配索引入 models 后的默认模型切换测试
tianling536 Jul 26, 2026
4fb363e
ci: openGauss 冒烟密码改为运行时生成(消除 secret 硬编码)
tianling536 Jul 26, 2026
830126b
fix: 企微断开告警清理改 ORM 读-改-写(收编 main 新增 json_remove 裸 SQL)
tianling536 Jul 27, 2026
16ee908
fix: 复核修复——锁语义/索引退化/丢写窗口/工作流/依赖与文档
tianling536 Jul 28, 2026
a0db9d8
fix: 复核修复——advisory lock 专属连接化、MySQL 长文本、PortableJSON、PG 池加固
tianling536 Jul 29, 2026
181d94c
fix: 对齐 main 合并的头像功能——user_avatars.data_url 改 HugeText(MEDIUMTEXT)
tianling536 Jul 29, 2026
a836756
fix: 收编上游新表的 JSON 列与长文本列
tianling536 Aug 7, 2026
0b341c2
fix: rebase 收尾——feishu_runtime 恢复 logging 导入,schema 清理未用 Any
tianling536 Aug 15, 2026
69195ef
chore: rebase 收尾——清理 rebase 引入的未用 text 导入与丢失的 json 导入
tianling536 Aug 18, 2026
bc48562
fix: 收编上游新表(evolution/team 系列)的 JSON 列与长文本列
tianling536 Aug 18, 2026
aa3cf63
fix: 收编上游 a2a 任务表的 JSON 列(最新 main 又新增 6 处)
tianling536 Aug 19, 2026
9ac58f6
Merge origin/main into feat/multi-db-clean
tianling536 Nov 6, 2026
ab00767
feat(db): add MySQL/openGauss adapters and Alembic migrations
tianling536 Nov 6, 2026
e943a9d
ci(gaussdb-smoke): add least-privilege workflow permissions
tianling536 Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions .github/workflows/gaussdb-smoke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: openGauss dialect smoke

# 手动触发:在真实 openGauss 容器上验证数据库方言层
# (create_all + 方言 DDL 索引 + Alembic 基线 + JSONB 路径回退 + advisory lock + 渠道锁)。
# 说明:本工作流只验证数据库层,不启动完整应用(应用启动还依赖 Harness v3 运行时构建产物)。
on:
workflow_dispatch:

# CodeQL(actions/missing-workflow-permissions):最小权限运行,仅需读取代码
permissions:
contents: read

jobs:
smoke:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Start openGauss
run: |
set -euo pipefail
GAUSS_PASSWORD="Gs$(openssl rand -hex 9)_aB1"
echo "GAUSS_PASSWORD=$GAUSS_PASSWORD" >> "$GITHUB_ENV"
docker run -d --name opengauss --privileged=true \
-e GS_PASSWORD="$GAUSS_PASSWORD" \
-p 5432:5432 \
opengauss/opengauss:5.0.0
for i in $(seq 1 180); do
if docker exec -u opengauss opengauss sh -c \
'export GAUSSHOME=/usr/local/opengauss; export LD_LIBRARY_PATH=$GAUSSHOME/lib; $GAUSSHOME/bin/gsql -d postgres -c "select 1"' >/dev/null 2>&1; then
echo "openGauss ready after ${i}s"
break
fi
sleep 1
if [ "$i" -eq 180 ]; then
echo "openGauss failed to become ready"
docker logs opengauss
exit 1
fi
done
# openGauss 默认 0.0.0.0/0 使用 sha256 认证,psycopg3 不支持该 SASL 机制;
# CI 冒烟改为 trust(仅容器内网测试用),真实部署请配置 md5/证书等。
docker exec -u root opengauss sh -c \
"sed -i 's|host all all 0.0.0.0/0 sha256|host all all 0.0.0.0/0 trust|' /var/lib/opengauss/data/pg_hba.conf"
docker exec -u opengauss opengauss sh -c \
'export GAUSSHOME=/usr/local/opengauss; export LD_LIBRARY_PATH=$GAUSSHOME/lib; $GAUSSHOME/bin/gsql -d postgres -c "select pg_reload_conf()"' >/dev/null
docker exec -u opengauss opengauss sh -c \
'export GAUSSHOME=/usr/local/opengauss; export LD_LIBRARY_PATH=$GAUSSHOME/lib; $GAUSSHOME/bin/gsql -d postgres -c "select version()"' | head -3

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install backend deps
run: |
set -euo pipefail
python -m venv .venv
.venv/bin/pip install -q -e "backend[dev,postgres]"

- name: Dialect smoke on openGauss
env:
DATABASE_URL: opengauss+psycopg://gaussdb:unused@127.0.0.1:5432/postgres
APP_SECRET: openGauss-smoke
STAFFDECK_ROLE: all
working-directory: backend
run: |
set -euo pipefail
../.venv/bin/python - <<'PY'
from sqlalchemy import func, inspect
from sqlmodel import Session, select

from app.db.database import engine, init_db
from app.db.dialect import get_dialect

assert engine.url.get_backend_name() == "opengauss"
init_db() # 全新空库:create_all + Alembic 基线 stamp
insp = inspect(engine)
tables = insp.get_table_names()
assert "alembic_version" in tables, "missing alembic_version"
assert len(tables) >= 76, f"unexpected table count: {len(tables)}"
index_names = {
index["name"]
for table in ("sessions", "model_configs")
for index in insp.get_indexes(table)
}
assert "uq_sessions_agent_channel_extconv" in index_names, "missing sessions index"
assert "uq_model_configs_tenant_default" in index_names, "missing default-model partial index"
print("create_all + dialect DDL indexes on openGauss: OK")

init_db() # 已有 alembic_version:upgrade head 幂等
print("second init_db (alembic upgrade path): OK")

from app.api.knowledge import _safe_document_bucket_rows
from app.channels.config_store import patch_binding_config
from app.channels.delivery_days import delivery_day_bucket
from app.db.models import (
AgentProfile,
ChannelBinding,
ChannelDelivery,
ChatSession,
KnowledgeBucket,
KnowledgeChunk,
Tenant,
User,
utc_now,
)

dialect = get_dialect(engine.url.get_backend_name())
assert dialect.supports_partial_index is True

with Session(engine) as db:
db.add(Tenant(id="tenant_smoke", name="Smoke", created_at=utc_now(), updated_at=utc_now()))
db.add(User(id="user_smoke", tenant_id="tenant_smoke", username="smoke",
password_hash="x", role="admin"))
db.add(AgentProfile(id="agent_smoke", tenant_id="tenant_smoke", name="Smoke Agent"))
db.add(ChatSession(id="sess_smoke", tenant_id="tenant_smoke",
user_id="user_smoke", agent_id="agent_smoke"))
db.add(ChannelBinding(id="bind_smoke", tenant_id="tenant_smoke", agent_id="agent_smoke",
channel="wecom", status="active",
created_at=utc_now(), updated_at=utc_now()))
db.commit()

# openGauss 的 jsonb_set 与上游 PG 参数语义不同 -> 走通用 ORM 回退
assert patch_binding_config(db, "bind_smoke", tenant_id="tenant_smoke",
set_values={"auto_route": False, "n": 1})
db.commit()
db.refresh(db.get(ChannelBinding, "bind_smoke"))
assert db.get(ChannelBinding, "bind_smoke").config_json["n"] == 1
assert patch_binding_config(db, "bind_smoke", remove_keys=("auto_route",),
require_active=True)
db.commit()
print("config patch (generic ORM fallback): OK")

db.add(ChannelDelivery(id="del_smoke", tenant_id="tenant_smoke",
binding_id="bind_smoke", session_id="sess_smoke",
kind="reply", status="sent", idempotency_key="idem_smoke",
created_at=utc_now(), updated_at=utc_now()))
db.add(KnowledgeBucket(id="bucket_smoke", tenant_id="tenant_smoke",
knowledge_base_id="kb_smoke", document_id="doc_smoke",
bucket_key="b", title="中文标题", summary="S",
token_estimate=1, metadata_json={"a": 1},
created_at=utc_now(), updated_at=utc_now()))
db.add(KnowledgeChunk(id="chunk_smoke", tenant_id="tenant_smoke",
knowledge_base_id="kb_smoke", document_id="doc_smoke",
bucket_id="bucket_smoke", chunk_index=0,
content="hello 世界", metadata_json={"x": [1, 2]},
created_at=utc_now(), updated_at=utc_now()))
db.commit()
day_expr = delivery_day_bucket(db)
row = db.exec(select(day_expr, func.count()).group_by(day_expr)).first()
assert row is not None
buckets = _safe_document_bucket_rows(db, "tenant_smoke", "doc_smoke")
assert buckets and buckets[0]["title"] == "中文标题"
print("delivery_day_bucket + knowledge ORM (UTF-8): OK")

with Session(engine) as lock_session:
assert dialect.acquire_advisory_lock(lock_session, "smoke-connector")
assert dialect.check_advisory_lock(lock_session, "smoke-connector")
dialect.release_advisory_lock(lock_session, "smoke-connector")
assert not dialect.check_advisory_lock(lock_session, "smoke-connector")
print("advisory lock acquire/check/release: OK")

from app.channels import (
_acquire_connector_process_lock,
_connector_lock_healthy,
_release_connector_process_lock,
)

assert _acquire_connector_process_lock() is True
assert _connector_lock_healthy() is True
_release_connector_process_lock()
print("channel connector single-instance lock: OK")
print("OPENGAUSS DIALECT SMOKE ALL OK")
PY
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,35 @@ Digital employees can serve users directly over IM channels: users chat with emp
- Channel credentials (bot tokens/secrets) are stored Fernet-encrypted and never returned by any API;
- Binding management is restricted to admins or the binding creator; mounting an employee exposes it to all users of that channel — grant with care.

## Database Backends

StaffDeck keeps all state in one SQL database and defaults to local SQLite (zero setup). The data layer is dialect-pluggable: business code goes through SQLAlchemy ORM, and the few dialect-specific points (day bucketing, JSON config patching, process/advisory locks, partial indexes) are centralized in `backend/app/db/dialect.py`.

| Backend | Status | Notes |
| --- | --- | --- |
| SQLite (default) | Supported | File database; connector/binding process locks are file locks placed next to the DB file. Schema changes use the built-in startup migrations (behavior unchanged). |
| PostgreSQL | Experimental | Full feature set via the `postgresql` dialect. Install the optional driver first: `pip install "skill-agent-loop-backend[postgres]"`, then set `DATABASE_URL="postgresql+psycopg://user:pass@host:5432/dbname"` in `backend/.env`. Existing databases are upgraded with Alembic (see below). |
| openGauss (高斯) | Experimental | Uses the PostgreSQL protocol through a small compatibility dialect (`opengauss+psycopg://user:pass@host:5432/postgres`, same `[postgres]` driver) that handles the openGauss version string and forces `client_encoding=utf8`. Full dialect capabilities including the partial unique index and session advisory locks; existing databases are upgraded with Alembic. Verified against openGauss 5.0 (Docker). |
| MySQL 8.x | Experimental | Install the optional driver: `pip install "skill-agent-loop-backend[mysql]"` (PyMySQL), then set `DATABASE_URL="mysql+pymysql://user:pass@host:3306/dbname?charset=utf8mb4"`. No partial unique indexes: the "one default model per tenant" invariant is enforced in code plus a startup check. The connector single-instance guard uses `GET_LOCK()` named locks. JSON columns stay native JSON; long-text columns are `TEXT`/`MEDIUMTEXT` (no silent VARCHAR(255) truncation). Verified against MySQL 8.4. |
| Dameng (达梦) | Adapter needed | Requires the `dmPython` driver plus a third-party SQLAlchemy Dameng dialect plugin (not bundled or verified by this repository). JSON columns degrade to CLOB via `PortableJSON`, long-text columns are `TEXT`. Without a native advisory-lock implementation the connector lock fails loudly at startup instead of silently mis-locking. |

### Database migrations (non-SQLite)

SQLite keeps its existing startup path (`create_all` plus the built-in migrations). Non-SQLite backends are managed by Alembic, so existing schemas can be upgraded across releases:

- fresh database: `init_db` creates the schema with `create_all` (including dialect-specific DDL such as the partial unique index) and stamps the baseline revision;
- existing schema without `alembic_version`: stamped at head with a warning — review schema compatibility manually before upgrading;
- database with `alembic_version`: `init_db` runs `alembic upgrade head` at startup.

To add a schema change: update the models, then run `cd backend && DATABASE_URL=... .venv/bin/python -m alembic revision --autogenerate -m "..."` and commit the new revision. Migration scripts live in `backend/app/db/migrations/` and are shipped with the wheel and the bundled app.

Limitations when running on PostgreSQL/MySQL/openGauss:

- **Single-writer startup**: run only one application worker during first boot/upgrades — concurrent `create_all` + demo seeding from multiple workers can race (DuplicateTable / unique conflicts). Initialize once with a single worker.
- `APP_TIMEZONE` only affects PostgreSQL day bucketing; on SQLite, day buckets always use the server's local timezone (setting it there logs a warning and is ignored).
- Run exactly one connector process per database — the single-instance guard uses a session-scoped PostgreSQL/openGauss advisory lock (dedicated autocommit connection) or a MySQL `GET_LOCK()` named lock, with periodic liveness checks (channel services degrade and stop if the lock is lost).
- MySQL/Dameng have no partial unique index for the "one default model per tenant" rule: it is enforced in code plus a startup validation, not by a database constraint.

## Project Structure

```text
Expand Down
29 changes: 29 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,35 @@ curl.exe http://127.0.0.1:5173/api/health

外部业务系统可以通过员工级 API Key 调用数字员工、持续会话、Harness v2 Run、SOP、知识、技能、工具和定时任务。完整的鉴权边界、接口清单、SSE、Webhook 与调用示例见 [数字员工开放 API v1](docs/open-api-v1.md)。

## 数据库后端

StaffDeck 的全部状态存放在一个 SQL 数据库中,默认使用本地 SQLite(零配置)。数据访问层为方言可插拔设计:业务代码统一走 SQLAlchemy ORM,少数方言相关点(日分桶、JSON 配置补丁、进程/advisory 锁、部分索引)集中收口在 `backend/app/db/dialect.py`。

| 后端 | 状态 | 说明 |
| --- | --- | --- |
| SQLite(默认) | 支持 | 文件库;connector/binding 进程锁为数据库文件旁的文件锁。schema 变更走内置启动迁移(行为不变)。 |
| PostgreSQL | 实验性 | 通过 `postgresql` 方言提供全能力。需先安装可选驱动:`pip install "skill-agent-loop-backend[postgres]"`,再在 `backend/.env` 设置 `DATABASE_URL="postgresql+psycopg://user:pass@host:5432/dbname"`。存量库由 Alembic 管理升级(见下文)。 |
| openGauss(高斯) | 实验性 | 通过 PostgreSQL 协议 + 轻量兼容方言使用(`DATABASE_URL="opengauss+psycopg://user:pass@host:5432/postgres"`,复用 `[postgres]` 可选驱动):自定义方言处理 openGauss 的版本串并强制 `client_encoding=utf8`。具备全部方言能力(含部分唯一索引与会话级 advisory lock),存量库同样由 Alembic 管理升级。已在 openGauss 5.0(Docker)上验证。 |
| MySQL 8.x | 实验性 | 需先安装可选驱动:`pip install "skill-agent-loop-backend[mysql]"`(PyMySQL),再设置 `DATABASE_URL="mysql+pymysql://user:pass@host:3306/dbname?charset=utf8mb4"`。不支持部分唯一索引:"每租户至多一条默认模型"改由代码层维护 + 启动校验兜底(运行期无 DB 级约束)。connector 单实例锁使用 `GET_LOCK()` 命名锁。JSON 列保持原生 JSON,长文本列显式 `TEXT`/`MEDIUMTEXT`(不会静默退化为 VARCHAR(255) 截断)。已在 MySQL 8.4 上验证。 |
| 达梦(Dameng) | 需适配器 | 需要 `dmPython` 驱动 + 部署方提供第三方 SQLAlchemy 达梦方言插件(本仓库未预装、未真机验证)。JSON 列经 `PortableJSON` 降级为 CLOB,长文本列显式 `TEXT`。未实现原生 advisory lock 时,connector 锁会在启动期响亮失败,而不是静默错锁。 |

### 数据库迁移(非 SQLite)

SQLite 保持既有启动路径(`create_all` + 内置迁移)不变;非 SQLite 后端由 Alembic 管理,存量 schema 可跨版本升级:

- 全新空库:`init_db` 用 `create_all` 建当前 schema(含部分唯一索引等方言 DDL),并按 Alembic 基线版本 stamp;
- 已有应用表但没有 `alembic_version`:按基线 stamp head 并输出告警——升级前请人工核对既有 schema 与当前版本是否一致;
- 已有 `alembic_version`:启动时执行 `alembic upgrade head` 应用未执行的迁移。

新增 schema 变更:修改 models 后执行 `cd backend && DATABASE_URL=... .venv/bin/python -m alembic revision --autogenerate -m "..."`,提交生成的 revision。迁移脚本位于 `backend/app/db/migrations/`,随 wheel 与打包产物一并分发。

在 PostgreSQL/MySQL/openGauss 上运行的当前限制:

- **单写者启动**:首次启动/升级只跑一个应用 worker——多 worker 并发 `create_all` + 演示数据播种会撞键,请先用单 worker 完成初始化;
- `APP_TIMEZONE` 只对 PostgreSQL 日分桶生效;SQLite 的日分桶恒为服务器本地时区(该配置在 SQLite 下会输出告警并被忽略);
- 每个数据库只允许运行一个 connector 进程——单实例守护使用会话级 PostgreSQL/openGauss advisory lock(专属 AUTOCOMMIT 连接)或 MySQL `GET_LOCK()` 命名锁,并带定期存活校验(锁失效时渠道服务主动降级停止);
- MySQL/达梦没有部分唯一索引,"每租户至多一条默认模型"由代码层维护 + 启动校验兜底,不是数据库约束。

## 项目结构

```text
Expand Down
7 changes: 7 additions & 0 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
APP_NAME="Skill Agent Loop Service"
# 默认 SQLite;PostgreSQL 改为 postgresql+psycopg://user:pass@host:5432/dbname,
# openGauss(高斯)改为 opengauss+psycopg://user:pass@host:5432/postgres
# (两者都需先安装可选驱动:pip install "skill-agent-loop-backend[postgres]")
# MySQL 8.x:mysql+pymysql://user:pass@host:3306/dbname?charset=utf8mb4
# (可选驱动:pip install "skill-agent-loop-backend[mysql]")
DATABASE_URL="sqlite:///./skill_agent_loop.db"
# 应用时区(如 Asia/Shanghai):仅 PostgreSQL 日分桶换算使用,SQLite 恒为服务器本地时区
APP_TIMEZONE=""
# Leave empty on a fresh install to generate and persist a random signing key.
# On upgrades retain the original APP_SECRET exactly.
APP_SECRET=""
Expand Down
15 changes: 15 additions & 0 deletions backend/alembic.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Alembic 迁移配置。
#
# - script_location 用 %(here)s 展开为 backend/app/db/migrations 的绝对路径,不依赖
# 执行时的 CWD;迁移目录放在 app 包内,便于 wheel/PyInstaller 一并分发;
# - sqlalchemy.url 留空:alembic/env.py 会回退到应用配置
# (app.config.get_settings().database_url);程序化调用(init_db)通过
# Config.set_main_option("sqlalchemy.url", ...) 显式传入运行时 URL。
# - 本地验证示例:
# cd backend && DATABASE_URL=sqlite:////tmp/staffdeck-alembic.db \
# .venv/bin/python -m alembic upgrade head
[alembic]
script_location = %(here)s/app/db/migrations
prepend_sys_path = .
path_separator = os
sqlalchemy.url =
Loading
Loading