mateclaw/mateclaw-server/src/main/java/vip/mate
倪程伟 b478eef78c
feat(im): resolve workflow approvals via feishu/wecom card clicks (ISSUE #413 P2-B3) (#416)
Before this, a workflow await_approval step whose approverChannels
pointed at feishu/wecom was effectively dead for IM interaction. Even
after PR #414 (B1) pushed the notice to the IM group, clicking the
card's Approve/Deny buttons did nothing useful:

- Identity check (requester==clicker) failed-closed: wf- approvals
  have userId=null (system-initiated), so every click was rejected.
- Even if it passed, the synthetic /approve injection was a dead end:
  the router routes by conversationId, but wf- ids use a synthetic
  workflow:run:{runId} key that no IM conversation matches, so
  findPendingByConversation returned null and the /approve was fed
  to the LLM as plain text.

B3 fix: both ToolGuardCardHandlers now detect the wf- prefix and
resolve inline (approvalService.resolve), bypassing the synthetic
injection entirely. The WorkflowApprovalResolvedEvent published
inside resolve is picked up by ApprovalResumeBridge (activated in
PR #414 B2), which resumes the paused run. This mirrors the Web /
WebChat resolve path (PR #415).

Identity policy: any audience member may resolve a wf- approval.
The card only reaches channels declared in await_approval's
approverChannels, so whoever sees it is a designated approver.
Regular tool approvals keep the strict requester==clicker guard.

Tests:
- wecom ToolGuardCardHandlerTest: +2 wf- cases (inline resolve, no
  synthetic injection; already-resolved renders expired). Existing 6
  cases updated for the new 3-arg constructor.
- feishu FeishuCardDispatcherTest: updated for the new factory
  constructor signature.

Regression: ApprovalWorkflowServiceResolveTest (13), GcTest (7),
RecoveryTest (7), feishu dispatcher (4), button value (7),
renderer (3+3) — all green.
2026-06-25 09:56:36 +08:00
..
acp feat(workspace,system): add @RequireGlobalAdmin and gate admin-only controllers 2026-05-15 10:18:10 +08:00
activity feat(workspace,system): add @RequireGlobalAdmin and gate admin-only controllers 2026-05-15 10:18:10 +08:00
agent feat(agent): introduce SubagentRunContext value object for delegation runtime identity 2026-06-23 18:21:59 +08:00
approval fix(workflow): activate approval notify + resolve→resume bridge (ISSUE #413 P0) (#414) 2026-06-25 09:54:55 +08:00
audit feat(webchat): audit visitor-side writes via AuditEventService.recordAs (epic #355 PR 7) 2026-06-18 06:33:17 +08:00
auth fix(approval): three minor issues surfaced by end-to-end testing 2026-05-27 14:08:12 +08:00
channel feat(im): resolve workflow approvals via feishu/wecom card clicks (ISSUE #413 P2-B3) (#416) 2026-06-25 09:56:36 +08:00
cli feat(cli): project-level CLI framework with operational data export command 2026-06-25 09:31:48 +08:00
common feat(agent): deterministic Markdown normalization for final answers (#275) 2026-06-07 19:10:53 +08:00
config feat(security): gate Swagger/OpenAPI UI behind mateclaw.openapi.expose-ui flag 2026-06-24 10:42:46 +08:00
cron fix(cron): restore ShedLock DB-time for dialects that support it 2026-06-14 10:44:52 +08:00
dashboard fix(dashboard): count tool calls from assistant.metadata, not role=tool rows 2026-05-24 22:58:02 +08:00
datasource feat(db): support KingbaseES (人大金仓) domestic database (#324) 2026-06-14 10:30:09 +08:00
doc feat(docs): expose bundled help docs via in-app viewer 2026-06-15 07:48:49 +08:00
exception fix(exception): return 405 for HttpRequestMethodNotSupportedException 2026-06-19 06:20:59 +08:00
goal feat(agent): loop-engineering robustness — goal continuation, plan re-plan, stall detection 2026-06-17 06:37:08 +08:00
hook feat(hook): HMAC-SHA-256 body signing for outbound webhooks 2026-05-02 15:41:13 +08:00
i18n fix(i18n): stop logging missing-key noise for optional tool descriptions 2026-05-19 20:06:38 +08:00
llm feat(webchat): expose agent-bound wiki pages to API-Key callers 2026-06-20 07:21:07 +08:00
memory feat(memory): bound always-on memory growth with injection budget, consolidation, and file ceilings 2026-06-17 11:04:19 +08:00
notification feat(ui): surface pending approvals + stuck agents as sidebar badges 2026-05-15 10:17:30 +08:00
operational feat(cli): project-level CLI framework with operational data export command 2026-06-25 09:31:48 +08:00
planning feat(plans): per-step agent delegation + fix kanban pending column (issue #385) 2026-06-21 21:20:58 +08:00
plugin feat(db): support KingbaseES (人大金仓) domestic database (#324) 2026-06-14 10:30:09 +08:00
skill feat(skill): self-evolving skills — out-of-band reflection, curator consolidation, agent-authored skill files 2026-06-23 13:51:04 +08:00
stt feat(stt): route OpenAI Whisper provider to any OpenAI-compatible endpoint (#76) 2026-05-09 13:57:52 +08:00
system feat(dashboard): show the connected database on the dashboard 2026-06-15 08:47:53 +08:00
task feat(task): generic one-shot Callable runner with parent-conv cancel 2026-05-16 14:51:04 +08:00
tool feat(agent): parallel delegation optional fail-fast and per-call timeout override 2026-06-23 18:23:07 +08:00
trigger fix(feishu): decouple trigger ingest from the Lark WS dispatch thread (#208) 2026-06-09 09:17:26 +08:00
tts fix(wiki): backend hardening + batch delete UI 2026-04-13 15:37:12 +08:00
wiki feat(webchat): expose agent-bound wiki pages to API-Key callers 2026-06-20 07:21:07 +08:00
workflow fix(workflow): activate approval notify + resolve→resume bridge (ISSUE #413 P0) (#414) 2026-06-25 09:54:55 +08:00
workspace fix(conversation): use notLikeLeft to avoid over-broad malformed-id filter 2026-06-19 06:20:59 +08:00
MateClawApplication.java feat(db): support KingbaseES (人大金仓) domestic database (#324) 2026-06-14 10:30:09 +08:00