Reuse channel_session_v2 per job_id so cron runs do not create a new
oclaw session each time; isolate scheduled turn context to the active
turn_uuid so shared sessions do not leak prior run history.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
Scheduled outbound only sent text via pollOutboundQueue; collect deliverable attachments from the turn, encode them in source JSON, and send via sendReplyWithAttachments.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
Store self-contained playbook recipes on scheduled jobs, add schedule_propose draft gate, and run playbook instructions at fire time instead of only short reminders.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
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>
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>
Track send attempts and schedule retry windows for pending WhatsApp outbound messages, then mark as failed after max retries to avoid silent drops without infinite resend loops.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace hardcoded Asia/Shanghai with host IANA timezone detection for new scheduled jobs across tools, admin API, gateway cron, and store layer.
Co-authored-by: Cursor <cursoragent@cursor.com>
When the model omits specialist, inject selected_specialist from the current tool executor context so scheduled jobs run under the expert that created them.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
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>
Replace Chinese NetX labels with UME Alarm Raised/Updated/Cleared and
English field names in proactive alert messages.
Co-authored-by: Cursor <cursoragent@cursor.com>
Some OpenAI-compatible proxies finish tool-call streams with delta=None and
a full message payload; accessing delta.tool_calls crashed tool rounds.
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
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>
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>
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>
Fix trace_id/run_id initialization so async turns persist messages. Pass skill_binding_role through the worker and route video/image experts synchronously for the DashScope legacy lane.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add ops specialist tools to list/get managed NEs and execute read-only CLI via netx.
Document the new managed-NE workflow in role prompts, env example, and a dedicated ops skill with tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add last-chance DSML promote on combined content+reasoning and parse again before protocol_mismatch so split-field DeepSeek output runs real tools and produces tool_result rows.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse DSML from combined content+reasoning when markers span fields; show a clear mismatch message when parse fails; run finalize synthesis when tools executed but the assistant body is empty.
Co-authored-by: Cursor <cursoragent@cursor.com>
Parse <||DSML||> markup, add DSML recovery to openai_responses transport, and avoid persisting raw DSML as plain assistant text when promotion fails.
Co-authored-by: Cursor <cursoragent@cursor.com>
Promote DSML markup from assistant text into native tool calls during streaming and completion, filter DSML from UI tokens, and document AIA_DSML_TEXT_TOOLS for local vLLM proxies.
Co-authored-by: Cursor <cursoragent@cursor.com>
Append english_output_guard when lang=en, strengthen ops/generalist EN role prompts,
pass NETX_TOOL_LANG into netx tools, and map Chinese protocol buckets to English.
Co-authored-by: Cursor <cursoragent@cursor.com>
Detect language from user message before UI hint, load ops ROLE_SYSTEM.en.md when en, and wire user_text through WS/HTTP/worker paths.
Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve runtime language from ui_lang and chat.send lang instead of hardcoding zh.
Align generalist/ops prompts with user language and require host_name (not ne_id) in ops outputs.
Co-authored-by: Cursor <cursoragent@cursor.com>
Migrator: only refuse import when SQLite and PG both have rows for a table (PG seed rows ok when SQLite empty). Add unit test for conflict helper.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add grep_tool: ripgrep with Python fallback; avoid --json with -l/-c.
- Add workspace_profile_tool: scan, languages, tests, packages, git, CI hints; tests.
- write_file: resolve relative paths via workspace root (no data/workspace prefix).
- Update path guard and local public tool tests for new write behavior.
Co-authored-by: Cursor <cursoragent@cursor.com>