Commit graph

175 commits

Author SHA1 Message Date
1c90a3570e Add netx UME NE inventory tools for ops
Expose netx_query_ume_ne_inventory and netx_get_ume_ne (GET /v1/ume/inventory/ne and /ne/{id}). Update ops playbook, ROLE_SYSTEM, env example comment, and unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 17:24:57 +08:00
939a734e76 Bust executor prompt cache on workspace SKILL.md layout changes
Add workspace_skills_layout_signature (hash of paths + mtimes + sizes) and fold it into get_executor_prompt_static and manager prebuild cache keys. Add tests for signature drift and cache invalidation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:28:16 +08:00
c33ca303a2 Fix prewarm prompt preview staleness (cache + Admin wait)
Include skill_role_binding store JSON in executor and manager prompt cache signatures so skill catalog updates after binding edits without restart. Admin async prewarm now polls prewarm/status until not running before router() so parallel prompts fetch matches completed warm.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:24:33 +08:00
4dbb834c95 Fix role binding filter when mapping is empty
should_apply_workspace_role_filter no longer requires at least one bound skill. With binding enabled and an empty map, the catalog shows only public workspace skills per role (matches prewarm and runtime). Update Admin copy and add regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 16:07:34 +08:00
091a5626e7 Expose skill role binding stored vs env override in Admin API
Add enabled_stored and enabled_env_present on skills binding GET/POST so UIs can explain when AIA_SKILL_ROLE_BINDING_ENABLED overrides SQLite. Add Admin hints for save-required and env override. Add skill_role_binding_enabled_stored/env_present helpers and a unit test.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-11 15:59:51 +08:00
df30b5902f feat: 路径约定体系 & 自优化管道落地 2026-05-10 23:28:41 +08:00
2c7b318561 feat(runtime): enforce native tool calls and web-only stack scripts
Apply a global native tool_calls-only prompt rule to prevent DSML/textual protocol outputs, and expand start_web/stop_web to manage gateway, sidecars, and wiki worker without launching desktop.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 20:08:03 +08:00
4335040a27 feat(video): DashScope video specialist with correct i2v request bodies
- Add video_generation_client: async video-synthesis, t2v vs i2v (Wan 2.7 input.media first_frame vs legacy img_url).

- Coerce *-t2v* to *-i2v* when first frame present; AIA_VIDEO_I2V_INPUT_STYLE / I2V_MODEL overrides.

- Gateway/direct_loop early return for video specialist; workspace video + factory allowlist.

- Normalize WS and admin chat attachments (image_ref parity); mp4 attachment store roundtrip tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 16:20:43 +08:00
398d85ba06 fix(chat): complete streaming for reasoning, tools, and tool calls
- Forward reasoning_content and non-stream reasoning to on_token in
  OpenAI chat completions; Gemini thought parts to on_token.
- Stream bubble: always render session.tool panels; format tool_use_call
  payloads and title as call · tool_name.
- Emit tool_use_call via on_tool_ui before tool execution so WS shows
  invoke cards before tool_use_result.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 14:02:14 +08:00
75a3038f33 fix(run_command): decode subprocess output as UTF-8 on Windows
GBK default decoding failed on curl/wttr.in UTF-8 output, leaving stdout empty
with exit 0; use utf-8 + replace.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 12:08:42 +08:00
beb52006d8 refactor: move bundled skills tree to repo root skills/
- Relocate runtime/skills -> skills/; runtime_skills_root() prefers oclaw/skills
  with fallback to legacy runtime/skills for unmigrated trees.
- session-bootstrap hook handler resolves repo root via PROJECT_ROOT.
- Update architecture/migration docs and in-tree skill references.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 11:35:57 +08:00
396dba76ea feat(chat): image specialist session image fallback and WS UX
- Resolve legacy multimodal inputs from session history when the user sends
  text-only (assistant images first, then user uploads); optional env toggles.
- Support relay_pointer image resolution in legacy lane collector.
- Align uvicorn WebSocket frame limit with MAX_PAYLOAD_BYTES; document
  OCLAW_UVICORN_WS_MAX_SIZE and compatible-mode env knobs.
- Admin chat: encode attachments after bubble preview; FileReader-based
  base64 for large files.
- Tests and docs for new behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 11:25:21 +08:00
faeb067856 feat(chat): image specialist legacy lane, Responses fixes, ACL + UI attachments
- Image expert: DashScope-style /chat/completions via image_legacy_client; early exit in
  direct_loop when skill_binding_role is image; shared placeholder helper; docs/IMAGE_SPECIALIST_LANE.md.
- Strict attachment ACL: link_attachment_acl on assistant chat_message rows (sqlite_store);
  chat attachment rate limit when user_id empty; admin chat tests updated.
- Admin chat UI: aggregate bubbles render assistant_text attachments (image_ref); WS expand path.
- turn_runner: persisted_chat_attachments_nonempty for final_msg selection.
- OpenAI Responses transport + agent_messages/agent_core_attempt adjustments; env docs and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 07:06:05 +08:00
d1bcc4debe feat: multimodal image clients, workspaces, Tushare skill, test fixes
- Replace monolithic image_message_client with HTTP/OCR/legacy modules; tighten OpenAI transport + tool schemas for multimodal downgrade to OCR specialist path.
- Add image/stock workspace prompts (META/SOUL/ROLE_SYSTEM); register experts; tweak specialist agent/direct loop/query_image_attachment.
- Add bundled runtime/skills/tushare-finance (references, api_client, SKILL metadata).
- Document OCR-related env vars; admin chat tweaks; README; weixin_install Ensure-OfficialPluginRuntimeDeps helper.
- Tests: multimodal downgrade + OCR coverage, strict tool pairing in attachment replay guard, workspace contract skips _internal/_system dirs, router/trace/prompt guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-10 04:41:42 +08:00
6307ade480 fix(netx-tools): ignore system proxy for netx API calls
Set trust_env=False for netx tool HTTP clients so local netx endpoints are called directly instead of via host proxy settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 16:10:40 +08:00
38de5a305f fix(scripts): resolve repo root by searching oclaw.json
Make start/stop scripts robust to directory renames, and improve stop hints when process termination is denied.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 11:41:24 +08:00
f538409c08 feat(ops): add UME alarm playbook skill and tool guardrails
- Add ops-netx-ume-playbook skill (zh-CN) with presets, paging and SQL safety defaults
- Strengthen ops identity disclosure rules (always 'oclaw智能运维')
- Improve netx UME anchor context and add raw/aggregate/SQL tooling ergonomics

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 00:05:23 +08:00
5b925854f0 fix(whatsapp): 固定安装依赖版本并规避导出路径错误
将 whatsapp 安装脚本改为固定版本安装 baileys/tsx/typescript 等依赖,并在安装前移除 whatsapp-rust-bridge,降低 ERR_PACKAGE_PATH_NOT_EXPORTED 兼容性问题。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-07 15:09:06 +08:00
89fe51d282 fix(whatsapp): 修复登录脚本黑窗秒退并补充文档入口
将 whatsapp_login.ps1 改为前台执行并保留错误输出,新增 -VerboseRunner 参数与退出码校验;同时在 README 增加 WhatsApp 安装与启停入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-07 15:01:51 +08:00
b15ff4c31c fix(prompt): invalidate bootstrap cache on wiki changes
Add a session-bootstrap content signature to the executor prompt cache key so identity/wiki updates invalidate cached system prompts and take effect on the next turn.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 23:42:52 +08:00
5fc0805c69 feat(memory): improve wiki search observability and retrieval flow
Expand memory wiki search with context-rich paginated results and bounded query expansion, and add default three-stage retrieval guidance for agents using memory_wiki_search.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 23:19:28 +08:00
d731288ffa fix(runtime): harden tool-call pairing and extend run_command timeouts
Prevent invalid tool_calls replay by requiring immediate tool-result adjacency in message building, and raise run_command default and tool-level timeout ceilings to reduce install-command timeout failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 22:34:54 +08:00
9f4fa3d319 fix(chat): harden session auto-title and keep a single no-tool LLM call
- Add session_auto_title prompts, finalize_auto_title (reject prose, truncate, fallback).
- Third-round naming: one model.chat(system, user) with empty tools; reuse executor.model.
- Extend worker title tests for garbage model output.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 15:19:22 +08:00
16169b3de2 fix(desktop): external gateway mode and start script alignment
- Add desktop env for non-embedded gateway (OCLAW_DESKTOP_EMBED_BACKEND, base URL, skip channel).
- Wire start_all/start_desktop to pass gateway URL when keeping existing gateway; fix root start_all flags.
- Prefer electron.cmd for background desktop launch; admin static theme presets and chat boot timeouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-06 11:06:16 +08:00
b0e0c05d8a feat: integrate netx ops data access and unify prompt/workspace runtime
Migrate prompt templates into runtime workspaces, add network_ops netx toolchain (latest batch injection, raw fields, SQL query), and align docs/tests/admin/runtime wiring so ops analysis can query netx detail data through stable role-scoped paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 23:54:38 +08:00
37522f492a feat: plan agent v2, global chat mode, and user-mode v2 flag sync
- Add runtime/plan_agent_v2 package and shims; gateway/direct_loop/WS wiring

- Admin chat: interaction mode and specialist only in user menu; session API stores memory_mode and execution_mode only

- POST /admin/api/chat/user-mode mirrors plan_agent_version to AIA_EXPERT_PLAN_AGENT_V2_ENABLED (v2 to 1, v1 to 0)

- Composer cleanup (hidden mode select, no reasoning toggle in meta bar); tests and _local/system.env.example

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-02 18:41:45 +08:00
ae44cbcad5 完善 MCP/会话上下文治理并补齐搜索与诊断能力。
补充历史压缩与会话诊断链路,强化 tool pairing 与空响应兜底观测;完善 Admin MCP 导入/绑定与相关前端展示;新增 web_search_fast/web_fetch_clean 及多项测试与文档更新,并同步技能安装与角色绑定策略改进。

Made-with: Cursor
2026-05-01 17:46:50 +08:00
df91434936 适配 Bailian WebParser 兼容接入并完善 sidecar 文档。
新增 WebParser 兼容工具与 MCP health/tools-sync 兼容模式,让 WebParser/sse 可注册到 agent 并暴露明确 schema;同时修复 mcp argv 环境变量展开并补齐微信 sidecar 纯本地化安装与文档说明。

Made-with: Cursor
2026-05-01 17:40:52 +08:00
329fb2239a 统一技能安装链路并提交当前skills变更。
新增 public 的 skill_auto_install 工具并移除 catalog 旧实现,同时按当前工作区状态提交 skills 精简与 skill-creator 新增内容。

Made-with: Cursor
2026-05-01 04:23:24 +08:00
1c71a29ec1 将附件/多模态查询与编辑工具从 generalist 迁移到 public。
同时移除 network_ops 的转发壳文件,统一工具入口并更新对应测试引用,降低重复维护成本。

Made-with: Cursor
2026-05-01 04:13:43 +08:00
5d67303d22 修复 Admin Skills 安装区块不显示,并支持卸载 _workspace/public lane。
同时补齐 _workspace/public 目录约定、公共技能免绑定规则,并为 run_command 增加默认禁用开关与回归测试。

Made-with: Cursor
2026-05-01 03:34:32 +08:00
da2413afad 新增公共工具:批量写文件、工作区树、上下文搜索、多段替换 2026-05-01 02:45:00 +08:00
5ef9abb069 将高风险 public 工具开关改为按用户生效。
在 Admin 工作区路径页新增并保存用户级 public_tools_allow_high,扩展用户路径策略存储字段并让 catalog 风险门控优先读取该用户策略(环境变量仍可覆盖)。

Made-with: Cursor
2026-05-01 01:59:11 +08:00
e06184cc2f 对齐 run_command 与 write_file 的默认路径行为。
将 run_command 在未传 cwd 时改为默认 data/workspace,并将 write_file 调整为相对路径写入 data/workspace、绝对路径直写(经路径守卫校验),同步更新测试与文档。

Made-with: Cursor
2026-05-01 01:10:03 +08:00
d0a66d190d 统一公共工具并移除 workspace 专家链路。
将文件/命令/Git/检索能力统一迁入 public,去除重复工具与 local_ 命名前缀,并重命名底层路径守卫模块为 path_guard 以提升语义清晰度。

Made-with: Cursor
2026-05-01 00:38:31 +08:00
75aec2abe4 补齐本地 public 工具的 P1/P2/P3 能力。
新增目录列举、文件/目录操作、内容搜索、cwd/env 管理与进程管理工具,并在本地适配层统一实现与测试覆盖,保持风险门控策略一致。

Made-with: Cursor
2026-04-30 23:37:39 +08:00
d8e2f4cacc 新增本地 public 工具与适配器
Made-with: Cursor
2026-04-30 23:18:58 +08:00
4d9232f3b3 统一技能安装与 Skills 市场接入链路。
新增公开安装工具与多来源 provider 支持,补齐管理端与目录加载逻辑,并同步更新相关测试与文档以保证可见性和路径安全。

Made-with: Cursor
2026-04-30 22:17:50 +08:00
d5e30542aa 统一会话展示与专家路由行为,修复图片异步显示与气泡宽度问题。
本次移除 image 专家角色并同步更新路由/绑定/测试,同时增强 session-bootstrap 的共享与角色分层记忆加载,减少刷新依赖并提升默认可用性。

Made-with: Cursor
2026-04-29 22:16:49 +08:00
1ebfa47dd3 改造 cocoloop 安装流程以适配平台 Skills API。
将 OpenClaw 场景下的 fallback 从命令行安装调整为 /admin/api/skills 路由优先,避免依赖 run_command 与外部命令环境。

Made-with: Cursor
2026-04-29 21:00:12 +08:00
5f68afa963 为自写技能增加隔离目录与默认可用通道。
自动安装/创建的 workspace 技能统一落在 _workspace 目录,并在启用受信开关时自动启用和绑定到 manager+各专家;同时补充 API 返回状态与回归测试。

Made-with: Cursor
2026-04-29 20:53:11 +08:00
726e043a3a 精简 attachment_local_url 默认返回字段,降低路径噪音。
默认仅返回 attachment_id 与 file_url 等核心信息,并将 exists/local_path/preferred_url 调整为 verbose 模式输出,补齐对应测试。

Made-with: Cursor
2026-04-29 20:31:18 +08:00
2edd78ac3b 统一图片附件在聊天与通道回送链路的可见性与可发送性。
支持 tool_result 的 image_ref 前端渲染,并在微信/WhatsApp 回送时将 attachment 引用自动展开为可发送媒体,补齐回归测试。

Made-with: Cursor
2026-04-29 20:26:53 +08:00
957c67954f 新增附件本地直连地址工具并去除路由模式。
返回 file:// 与本地绝对路径用于直接渲染展示,避免依赖 attachment 下载路由;同步补充公共工具测试。

Made-with: Cursor
2026-04-29 14:29:20 +08:00
571612ccb5 新增 Cloudflare 直连生图公共工具并补充基础测试。
绕过不稳定的 Cloudflare MCP 图片接口,确保所有专家默认可用并验证公共注册可见性与响应解析逻辑。

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

Made-with: Cursor
2026-04-29 10:13:09 +08:00
25180921e7 兼容 memory-wiki 输入路径并强调相对路径
- memory-wiki 的 wiki_root 路径解析兼容:相对路径 / data/wiki 前缀 / wiki_root 下绝对路径
- 系统提示词强调:模型传相对 wiki 根路径(相对 data/wiki),避免直接给 data/wiki/... 或绝对路径
- 修复并回归:memory-wiki 工具动态加载模块 import-time 错误(sys.modules 注入)
- chat.js 增强会话滚动跟随(异步渲染补滚)

Made-with: Cursor
2026-04-29 08:54:58 +08:00
27b8698f9b 修复 memory wiki 工具加载异常并在系统提示词声明默认 wiki 路径。
为动态加载的 memory-wiki 模块补充 sys.modules 注册以避免 dataclass 导入期崩溃,同时在统一技能策略中明确默认根路径为 data/wiki,并新增工具加载回归测试。

Made-with: Cursor
2026-04-29 08:34:38 +08:00
c6a1da1980 为全专家统一开放 memory wiki 工具能力。
将 generalist/ops/image 的 expert 组合加入 memory,使主控调度下的各专家都可调用 memory_wiki_search/apply/lint,并补充注册策略测试防止回归。

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

Made-with: Cursor
2026-04-29 01:30:17 +08:00