Commit graph

164 commits

Author SHA1 Message Date
a8d3d2d5ec fix(scheduler): default scheduled job timezone to system timezone
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>
2026-07-02 17:31:21 +08:00
a27bca5648 fix(scheduler): inherit creator specialist in schedule_create
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>
2026-07-02 16:36:25 +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
07fd776a39 feat(ops): enforce skill install lane for ops workspace
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 14:56:58 +08:00
261e9bc72e docs(netx): update listManagedNe filter requirement and paging limits
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 11:07:47 +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
8781a200c9 docs(netx): document ume_ne_id exec and listCliTargets MCP tool
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 17:13:50 +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
538945fb66 feat(netx-bridge): use English UME alarm text for WhatsApp push
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>
2026-06-22 20:37:51 +08:00
eaeb9fd33d fix(netx-bridge): use OCLAW_OPS_AI_SHARED_TOKEN for alarm WSS auth
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 11:22:39 +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
9b6bf1d4eb fix(llm): handle null-delta terminal stream chunks from mytokenland gateways
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>
2026-06-10 20:47:23 +08:00
dbd22ef9be fix(whatsapp): download inbound media and send typed outbound attachments
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 19:50:34 +08:00
35a66dcc44 docs(netx): allow ping/ping6 in execManagedNe CLI policy
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 16:15:00 +08:00
9b58479e92 fix(whatsapp): only reply in groups when bot is among @mentions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 14:14:13 +08:00
847567f495 docs(ops): use placeholder IPs in bastion hop playbook example
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 10:59:32 +08:00
3f17efb720 docs(ops): document bastion hop troubleshooting in managed-ne playbook
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 10:47:52 +08:00
959cd8227c docs(netx): state execManagedNe allows show/display commands only
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 20:51:07 +08:00
0fc05452ec fix(whatsapp): match bot LID mentions ignoring device suffix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-04 20:15:54 +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
39fd1905b6 fix(chat): keep tool-call process notes out of visible body
Preserve tool_call event_type when hydrating WS final messages, never render main-channel process notes as assistant body text, and prefer structured message content over stream buffer on finalize.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 12:41:12 +08:00
4610989d72 fix(mcp): preflight python module check and surface install errors
- Verify python -m module import in preflight with fix hints

- Pass env_schema defaults in health/sync; catch JSON install exceptions in UI

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 23:42:44 +08:00
8787adc3cc fix(chat): repair async worker and video specialist routing
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>
2026-05-30 22:53:49 +08:00
a0a3f4b65f feat(mcp): integrate netx via netx_mcp and improve MCP install
- Gate builtin netx tools; ops docs/skills use mcp__netx__*

- Import Cursor mcpServers JSON; pass env_schema defaults to subprocess

- Allow source_type=local; UTF-8 MCP stdio on Windows

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 15:44:34 +08:00
bbd7b0300f feat(ops): add netx managed NE query and exec tools
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>
2026-05-28 22:12:57 +08:00
8233db93db Increase default tool rounds to 100 with 300 cap.
Raise Admin/UI defaults and backend clamps for AIA_TURN_MAX_TOOL_ROUNDS across gateway, worker, and direct loop paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 11:34:20 +08:00
89b295293d Raise default tool rounds to 30 and cap at 100 per turn.
Update gateway, worker, direct_loop, and Admin tool policy UI/docs for AIA_TURN_MAX_TOOL_ROUNDS.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 17:34:39 +08:00
aea02cea3e Execute tools after DSML promote instead of stopping at tool_call.
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>
2026-05-27 17:24:37 +08:00
5325b2d9bc Fix split-field DSML promote and silent turn end after tools.
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>
2026-05-27 17:08:51 +08:00
c31e6ad4b7 Fix double-pipe DSML variant and promote on Responses API.
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>
2026-05-27 16:42:29 +08:00
43f6a792eb Fix spaced DSML variant parsing and reasoning stream filtering.
Support < | | DSML | | ...> markup from vLLM gateways, filter DSML in reasoning_content during streaming, and fix invoke parse false negatives.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 16:25:58 +08:00
97d5c1744a Add DeepSeek DSML-to-tool_calls conversion at transport and runtime layers.
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>
2026-05-27 15:39:11 +08:00
6f754ee5ea ops: use host_name as primary key for alarm NE display
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 00:04:33 +08:00
1366459ee0 feat(ops): enforce English-only replies and localize netx protocol labels
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>
2026-05-19 23:35:46 +08:00
0de5f7bc98 fix(ops): English replies from English prompts and ROLE_SYSTEM.en
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>
2026-05-19 22:41:46 +08:00
f1626195f7 fix(chat): honor ui_lang on WebSocket turns; ops NE display by host_name
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>
2026-05-19 22:14:44 +08:00
3a467704d6 chore(cursor): add Trilium MCP template and ignore local secrets
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 12:16:46 +08:00
428eed7ae4 chore(admin): remove netx ops tools sidebar link
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 12:11:43 +08:00
921447086f chore(skills): stop tracking local-only knowledge-base-manager
Ignore skills/_workspace/generalist/knowledge-base-manager/ and remove SKILL.md from the index; file remains on disk for local use only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 22:32:30 +08:00
807679aaaa feat: 更新 knowledge-base-manager skill,添加完整 ID 映射和严格目录限制 2026-05-16 22:27:57 +08:00
acfb2cf73b fix(chat): compress-history on PostgreSQL dict rows
- Normalize select id,content rows from dict_row vs sqlite Row in history_tool_result_compact.

- Expand memory_wiki_search ToolSpec to match wiki_search parameters; add schema regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-15 19:22:45 +08:00
0dc0c4663f docs(pg): slim migration guide to shell one-liners
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>
2026-05-14 15:15:08 +08:00
1caf96e694 fix: harden assistant SQLite/PostgreSQL dual-backend (singleton, timeouts, warnings)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 10:24:23 +08:00
1490bd5f24 feat: unify runtime logging (rotating files, log root, scripts, desktop)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-14 10:11:51 +08:00