Commit graph

43 commits

Author SHA1 Message Date
dff8901ae3 Hide inventory/CLI tools on WhatsApp report short-intents.
Fiber/offline/alarm/excel/license/congestion turns drop list/exec/sql/run_command so the model must use ume_alarm_xlsx_report instead of inventory self-loops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:45:30 +08:00
6c5536b758 Nudge WhatsApp group ops asks that skip @mention.
When require_mention drops an ops short-intent, send one throttled @sender tip instead of silent ignore; casual chat stays quiet.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:41:48 +08:00
94a1b5b26c Notify WhatsApp requesters on access decisions and ship EN ops help.
After admin YES/NO, DM the requester a field guide; WA help/bind no longer returns the Chinese productivity todo menu.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:37:50 +08:00
28a5f2586c Dedupe WhatsApp access pending and cap execManagedNe per turn.
Reuse open pending requests without re-notifying admins, clarify already-waiting replies, and block further CLI after 4 calls or 2 failures in the same turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:25:09 +08:00
54cb8af8b0 Block non-retryable tool re-calls and add congestion ops recipes.
After insufficient_scope/retry_forbidden, refuse the same tool for the rest of the turn (even with new args), emit pre-call WA progress from ToolExecutor, TTL-cache findTopologyPaths, and add bandwidth congestion short-intent + schedule template.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:19:03 +08:00
9bbac6c0b8 Gate group speaker isolation to shared chat sessions only.
Per-user group sessions (user_in_chat) already isolate history; keep Sender tags and focus hints only when session_scope=chat (legacy shared __group__ transcripts).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:16:27 +08:00
e91e4fe773 Isolate WhatsApp group turns by speaker and clarify SQL scope denials.
Always tag group senders, inject group-focus system hints, label queued follow-ups by speaker, and mark insufficient_scope failures as non-retryable with a user-facing hint.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:11:41 +08:00
7373e516f0 Classify tool failures and block identical blind retries in-turn.
Stamp failure_class for schema/timeout/runtime analytics, refuse same tool+args after a failure in the turn, and add a license short-intent recipe for WhatsApp ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 23:03:15 +08:00
4646170743 Push scheduled-job failure summaries to WhatsApp and clarify pending access.
Enqueue a short English failure notice on job crashes, default scheduler lang to en, and tell unauthorized users their request id is pending admin YES.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 22:59:40 +08:00
d3f621b58b Cache inventory MCP lists and accept YES as WhatsApp confirm.
Extend short TTL reuse to listManagedNe/queryUmeNeInventory to cut list self-loops, and treat short YES/continue as confirmation when a token is pending.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 22:56:50 +08:00
f1d025ed60 Steer WhatsApp ops short intents and clarify busy/CLI failures.
Inject English recipe hints for fiber/offline/excel/continue, ack the first queued follow-up, localize gate copy, and classify execManagedNe errors so agents stop blind retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 22:53:35 +08:00
47fd83597e Make WhatsApp ops English-first for field deployments.
Default progress, quote wrappers, tool-error copy, and playbook recipes to English unless lang is explicitly zh.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 22:51:25 +08:00
0ab5ab8c5a Send throttled WhatsApp progress during long tool turns.
Wire channel inbound on_progress/on_tool_ui to outbound queue so group users see wait signals for CLI/UME work without sharing per-speaker session context.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 22:47:26 +08:00
c31625d05b Fix WhatsApp image delivery and Chat duplicate attachment display.
Enqueue deliverable tool attachments on the WhatsApp queue path, and dedupe the same attachment_id within one Chat bubble (prefer deliverable).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 20:03:05 +08:00
b6e023cd91 Fix duplicate WhatsApp outbound delivery.
Claim pending rows atomically and serialize the sidecar poller so overlapping polls cannot send the same reply twice; also stop inbound queue delivery from falling through to a second enqueue.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 11:41:52 +08:00
10ae4abc1d Fix WhatsApp same-session quote re-injection.
Strip @mention prefixes and widen history lookup so reply-to of the bot's own prior answer is not wrapped as [被引用消息] again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 10:24:23 +08:00
2446993b11 Fix WhatsApp overlap by serial queue, typing, and outbound delivery.
Serialize per-session inbound turns and merge follow-ups after the active run; show composing while busy and enqueue final replies so long agent runs still reach the group.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-22 10:04:25 +08:00
146d83c336 fix(scheduler): inherit creator specialist when creating scheduled jobs
Pass the active workspace lane into tool execution and default schedule_create to that specialist so WhatsApp ops-bound jobs are stored and run as ops instead of generalist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 15:42:58 +08:00
62ac04c40d fix(scheduler): isolate scheduled runs and @mention job creator on WhatsApp
Use a fresh execution session per run while keeping source_session_id for delivery only; filter bot JIDs and default scheduled @mentions to the job creator.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-21 14:49:31 +08:00
30202dd291 feat(scheduler): confirm before deleting scheduled jobs
Require preview confirmation for schedule_delete, extra confirm_foreign for others' jobs in groups, and mirror the same flow in chat slash commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 10:11:04 +08:00
ad5d1db3c6 feat(whatsapp): real group @mentions and cleaner inbound text
Wire mention JIDs/names through scheduled delivery and immediate replies (including attachment captions), sanitize group message text for the model, and surface channel-derived sessions in admin Chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 20:05:43 +08:00
cbe68a54cd feat(channel): unify deliverable outbound and WeChat attachments
Require deliverable:true for all channel attachments including images; extend save_deliverable_attachment with attachment_id; add WeChat proactive attachment delivery; inject channel file rules via system prompt instead of repeating on every user message.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 15:56:50 +08:00
19f4d285ce feat(channel): deliver generated files on WhatsApp and honor user tool policy
Add save_deliverable_attachment for explicit document outbound, pass channel user_id into tool risk gating so write_file/run_command respect per-user allow_high settings, and document the workflow in channel-file-delivery skill.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 10:10:51 +08:00
61d54b10fd fix(attachments): parse channel uploads for LLM and stop echoing user files
WhatsApp/channel binary_ref uploads now expand into text_ref/tabular summaries for the model, and outbound replies only auto-attach generated image/video media instead of lookup tool text_ref results.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 21:43:49 +08:00
fc10560052 fix(whatsapp): isolate group sessions and inject quoted context safely
Default WhatsApp groups to per-user sessions, skip redundant quoted-text injection when already in recent history, and disable group long-term memory writes unless explicitly enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 17:48:34 +08:00
ad052daaf0 feat(tools): expose schedule tools to all specialists
Move schedule_* tool factories into the public registry so ops/generalist both can create and manage scheduled jobs, and add an English schedule shortcut.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 15:42:06 +08:00
1ea13a205d feat(whatsapp): add access control with quote-based admin approval
Introduce whitelist/blacklist gating, pending requests, Admin UI management, and stanza-mapped quote approval so admins can approve via WhatsApp DM without blocking normal LLM chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 11:36:58 +08:00
47813f6a94 feat(scheduler): add scheduled jobs with channel-aware delivery
Introduce persisted cron/interval jobs, gateway scheduler loop, worker turns,
and admin CRUD/edit UI. Route proactive reminders via the originating chat
channel (WhatsApp vs WeChat), harden Weixin outbound with durable queue and
PG-compatible polling, and fix chat UI to show each scheduled reminder separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 15:56:10 +08:00
5336f8835f fix(whatsapp): pass quoted UME alarm to agent when @ bot
Extract quotedText from reply context correctly and enrich inbound only after mention detection, keeping strict @-required group policy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 14:36:14 +08:00
7210293f42 feat(netx-bridge): WhatsApp proactive alerts from NetX key alarms
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 11:17:32 +08:00
8c665290c4 fix(whatsapp): resolve LID @-mentions in sidecar and trust mentions_bot in gateway
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 20:01:45 +08:00
dcb779a691 fix(whatsapp): sync sidecar on start and forward all group inbounds
Copy bridge files when starting WhatsApp sidecar, enforce group policy only in gateway with richer @ detection, and log skipped group messages for debugging.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 19:52:25 +08:00
9657b313a3 fix(whatsapp): restore group @ replies with LID matching and send fallback
Match bot mentions across JID/LID formats, accept reply-to-bot triggers, keep raw quote participants, and fall back to plain text when quoted sends fail.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 19:41:33 +08:00
a218139da6 fix(whatsapp): suppress silent group replies and quote sender on reply
Infer group chats from @g.us JIDs, drop (silent)/NO_REPLY outbound text, and @ plus quote the asker when replying in groups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 19:15:00 +08:00
900e3d0d3e feat(whatsapp): gate group replies on mention and share group sessions
Stop replying to every group message by filtering on @bot/triggers in the sidecar and gateway, and map group chats to one shared session while preserving per-sender identity.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 18:49:59 +08:00
bc1b45a8fd fix(chat,channels): admin session delete, weixin inbound, PG and docs
- List/delete chat sessions for administrator by username (cross-tenant UUID)

- Return 404 when delete does not remove a session; add tests

- Weixin: dispatch lang, inbound attachments, reply persist, native reply timeout

- PG compat scrub and administrator session delete repo path

- RUNBOOK: WhatsApp re-bind with Remove-Item auth; weixin poll diag scripts

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 01:36:45 +08:00
d14e9d3596 feat(persistence): PostgreSQL assistant store, chat persist fixes, gateway scripts
- Add SQLAlchemy Core repos, pg adapter/compat, assistant_store factory, Alembic bootstrap and migration/cutover scripts.

- Harden chat_message writes (NUL scrub for PG), turn_uuid on attempt failure, WS turn_runner fallbacks and gateway executed_turn_uuid init.

- start_gateway: log paths, PS7 stderr handling via cmd, background stdout/stderr redirect; runtime assistant_runtime_log_dir export.

- Ops: clear_all_chat_sessions with PG-only --postgresql and env-gated wipe; clear_postgres_chat_sessions.ps1.

- Tests: SA repos, pg compat, persist fallback, smoke env isolation; CI and docs touch-ups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 09:33:50 +08:00
420abac9f1 refactor: root-package imports (svc/runtime/interfaces) and fix PYTHONPATH
- Rename platform/ to svc/ to avoid shadowing stdlib platform.
- Replace from oclaw.* with from svc/runtime/interfaces; update -m CLI paths.
- tests/conftest: prepend repo root to sys.path (no parent-folder package name).
- CI: paths and offline_eval script under repo root.
- Ops scripts: PYTHONPATH must be repo root for python -m runtime.* (fixes gateway/WhatsApp sidecar startup).
- Fix default oclaw.json path in tabular/file attachment limits; stabilize attachment test config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 14:51:17 +08:00
2edd78ac3b 统一图片附件在聊天与通道回送链路的可见性与可发送性。
支持 tool_result 的 image_ref 前端渲染,并在微信/WhatsApp 回送时将 attachment 引用自动展开为可发送媒体,补齐回归测试。

Made-with: Cursor
2026-04-29 20:26:53 +08:00
1d46356d9e 支持微信/WhatsApp 回送附件直发并补齐链路测试。
保持入站到 agent 流程不变,在回送阶段支持 media_path/media_url 与 base64 附件直发,同时让通道回包沿用会话中助手附件记录以对齐 chat 历史逻辑。

Made-with: Cursor
2026-04-29 10:13:09 +08:00
58e47a3059 修复微信通道对 OpenAI 缺失密钥报错文案的静默抑制漏判。
扩展 Missing API key 提示的匹配规则以覆盖引号与文案变体,确保 wechat/weixin 侧不再回传该错误,并新增单元测试锁定该行为。

Made-with: Cursor
2026-04-29 01:30:17 +08:00
5ab69e88d3 Update channel dispatch UX and harden sidecar startup behavior.
This aligns Weixin/WhatsApp with admin-managed model routing by adding channel/account-level specialist controls, improves OSS startup resilience by skipping missing sidecars gracefully, and refreshes runbook/readme guidance for the new default behavior and Weixin OpenAI-key silent handling.

Made-with: Cursor
2026-04-28 22:58:50 +08:00
4a23b715a2 重构仓库目录为统一的 runtime 分层并清理历史 openclaw 残留。
本次迁移将网关/通道/工具/技能/脚本与协议资源集中到新结构,统一路径常量与脚本转发机制,减少顶层噪音并保证运行与测试行为一致。

Made-with: Cursor
2026-04-25 01:24:23 +08:00