17 Commits
Author SHA1 Message Date
58327d2ebb feat(skills): shared packages, file tree editor, and BOM-safe frontmatter (#2226)
* feat(skills): shared packages, file tree editor, and BOM-safe frontmatter

Add skill-package sharing (private by default), package skill file-tree APIs
aligned with personalization, and strip UTF-8 BOM when parsing SKILL.md.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(tests): bump backup schema assertions to v22

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-19 21:16:08 +08:00
Alison 73556e36f4 fix: let in-app browsers download files through a short-lived link (#1991)
Every download in the dashboard fetches the file with the JWT, wraps it
in a `blob:` URL and clicks an `<a download>`. WeChat and similar chat-app
WebViews (WeCom, QQ, DingTalk, Feishu, Weibo, Alipay) refuse to save
`blob:` downloads and only say "可在浏览器打开此网页来下载文件", while the
system browser they point to has no Octop session for the API URL.

In those WebViews `saveBlobAsFile` now hands the bytes it already
fetched to `POST /api/downloads/link`, which keeps them in a temp file
behind a random token for 10 minutes, and shows the link with a copy
button. `GET /api/downloads/link/{token}` serves the file as an
attachment without login; the token is the only credential. Uploads are
capped at `max_upload_mb`, links of disabled users stop working, and
expired files are removed on the next create/get. Normal browsers and
the desktop shell are unchanged.
2026-10-14 12:19:32 +08:00
seed30 d13614dbec Merge pull request #1003 from Yourdaylight/feature/tencent-realtime-asr
feat(voice): add Tencent Cloud realtime (streaming) speech recognition
2026-10-10 14:45:44 +08:00
e9deb58206 fix: harden Docker bootstrap, Bridge sessions, and desktop/provider UX (#1825)
Avoid silent random admin passwords, keep Bridge links alive under load,
and stop custom providers from sending stream_options that MindIE rejects.

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-09 07:04:56 +08:00
jubaoliang 9d9a36e5d3 Merge branch 'develop' into feature/tencent-realtime-asr 2026-09-27 21:54:45 +08:00
jubaoliangandCursor 4c3bf76479 fix: team chat/IM UX, ACP sandbox, channel thinking, and related polish
Improve team streaming visibility (live speakers, generating footer, IM
dispatch/wrap-up), relax ACP tool enable under sandbox while locking
runners, strip channel think tags per show_thinking, and clarify provider
CLI usage in the assistant skill. Includes self-update/UpdateConfig WIP
from the same working tree.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 23:59:46 +08:00
jubaoliangandCursor 5e34c8a001 fix: connectors empty layout and restore prior control-plane behaviors
Apply the remaining working-tree changes: connectors empty-state layout,
plus the knowledge, HITL, captcha, workspace, user-cache, and SSRF
adjustments with matching tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 22:40:47 +08:00
lihongyuan99andjubaoliang aeb486c722 fix(security): keep IPv6 brackets and path params when rebuilding pinned URLs (#1092)
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
2026-09-24 15:10:19 +08:00
lzh fd5b0560ce feat(voice): add Tencent Cloud realtime (streaming) speech recognition
Dictate with live partial results: the composer mic streams 16 kHz PCM over a
WebSocket to Octop, which signs and proxies the audio to Tencent's realtime ASR
V2 endpoint. Credentials never leave the server; the browser only learns a
`stt_realtime` boolean from `/api/voice/active`.

- settings: add a "realtime speech recognition" switch plus an AppID field to
  the Tencent Cloud voice drawer. Both live in `voice_providers.extra_json`, so
  no schema migration is needed.
- interaction: with realtime on, the mic becomes press-and-hold (start on
  pointerdown, finish on release/leave/cancel) and stays available while a reply
  is streaming, so dictation can be queued. With the switch off the previous
  click-to-record one-shot upload path is unchanged.
- protocol: realtime ASR V2 answers with `result` (`slice_type`, `index`,
  `voice_text_str`) while the docs describe `sentences`; both are normalized in
  `infra/voice/realtime.py`.
- errors: new `VOICE_REALTIME_UNAVAILABLE` code plus localized copy for the
  Tencent realtime error codes (4002-4009, 5000-5002).

Verified end-to-end against Tencent with real speech (edge-tts -> 16 kHz PCM
over the live WebSocket) and by `make all`.
2026-09-22 20:49:29 +08:00
jubaoliangandCursor ae62ec3088 fix: LAN MCP HTTP、TLS 公网 IP 预检与 Models 侧栏抽屉
允许本机/局域网 MCP 使用 HTTP 并返回结构化错误码;TLS 预检优先走云元数据与国内可达 IP 探测;send_file 工具错误不再误判为模型故障;模型配置弹窗改为右侧抽屉。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 20:00:39 +08:00
IronMurphy e1f3e172e2 Skip a one-line HTML comment before the frontmatter fence (#820)
_find_frontmatter() searched for the closing --> starting after the first
newline of the comment line, so a comment that closes on its own line
(<!-- agent-params -->) was reported as unterminated and the scan
returned None. parse_frontmatter() then treated the whole file as body
and is_agent_file() returned False, although the docstring promises
leading HTML comments are skipped. Search from the line start instead.
2026-09-19 20:45:32 +08:00
IronMurphy 5b752c5571 Normalize a protocol-relative URL instead of producing a hostless one (#823)
normalize_nav_url() prefixed any value without a "://" with "https://",
so a protocol-relative URL such as //baidu.com (the form pages expose when
you copy a link from source) became https:////baidu.com with an empty host.
Bare hosts keep the existing behaviour; a leading "//" now maps to
https://host/path.
2026-09-19 20:45:20 +08:00
jubaoliangandCursor 64403fda88 feat: squash schema v5, HITL tool picker, runtime installs, KB/skills UX
Consolidate unreleased develop migrations 005–009 into one v5 file with
ensure/clamp paths for pre-squash local DBs; add HITL catalog picker,
shared runtime package install for ONNX/desktop, and short-id list UX for
knowledge bases and skill packages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 12:00:53 +08:00
Georgyhongbo 22bff364e4 feat: 工作区支持 .docx 在线编辑(Markdown 往返,可扩展注册表)
专家工作区新增可编辑文档能力:.docx 以 Markdown 在 Monaco 中打开/保存,
后端保存时转回 docx 覆盖原文件,与 .md 编辑体验一致。

- 后端新增可编辑文档转换器注册表(infra/utils/doc_edit.py)与通用
  GET/PUT /workspace/doc 端点,按扩展名分发,与具体格式解耦
- write_file 对可编辑文档按二进制格式落盘,工作区新建空 docx 即为合法
  文档包,预览/编辑立即可用
- 前端 docKind.ts 新增 EDITABLE_DOCS 注册表(docx->markdown),
  CodeEditor/FileViewer/WorkspaceDrawer 通用路由编辑与保存
- DocumentPreview 对 0 字节 word 显示空状态
- 新增 8 个后端单测、6 个集成测试、5 个前端单测;引入 python-docx

后续加新后缀只需:后端注册一个转换器类 + 前端注册表加一行。
2026-08-11 21:57:13 +08:00
0a5f658e27 fix: search probe, table pagination, chat icon, and install hardening (#28)
Add missing POST /api/search/{id}/test so Advanced Search key checks work,
fix Ant Design pageSize changers stuck at 10, clarify the new-chat icon,
slide-renew JWT for active sessions, tighten chat polish prompts, and harden
install.sh for python-dev / Playwright mirrors.

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 19:48:47 +08:00
6676377d06 fix: remote desktop, browser, terminal, and setup locale (#11)
* fix: harden remote desktop setup on macOS and Linux

Show macOS TCC permission guidance when deps are ready but capture is blocked, and treat incomplete Linux installs (missing systemd units) as needs_install so install is retried instead of a broken start-only path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: pin desktop icon size and prefer bundled wallpaper

Set xfdesktop icon-size to 48 so Ubuntu hosts match Docker defaults, and install the local wallpaper.png before falling back to remote download.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: force larger xfdesktop icons and clear stale xfce config

Bump default desktop icon-size to 72, apply it via a dedicated post-start script with verification/reload, and remove leftover xfce4 desktop config on uninstall/reinstall so Ubuntu hosts no longer keep tiny icons.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: fix tiny desktop icons via VNC DPI and icon themes

Headless TigerVNC without -dpi makes fonts and labels look normal while xfdesktop icons stay as fixed tiny pixels. Install Adwaita icons (skipped by --no-install-recommends), force -dpi 96, and hard-restart xfdesktop after applying size/theme.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: install SVG icon loader and materialize desktop launcher PNGs

Tiny desktop icons on Ubuntu came from missing librsvg2-common (Adwaita SVGs) plus xfconf applied without the session D-Bus. Install the pixbuf SVG loader, write static xsettings, render launcher icons to PNGs, and log apply-icon-size failures.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: restore normal desktop icons/panel and clarify terminal WS logs

Revert oversized letter-tile icon fallbacks to 48px theme icons, seed a default xfce4-panel with Applications menu, and add terminal websocket accept/close logging plus tolerant agent-id resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: stabilize web terminal and polish remote desktop chrome

Fix macOS PTY spawn (setsid None), harden terminal reconnect/error handling,
move the XFCE start button to a top panel with the Octop logo, and replace
full-height edge rails with corner controls that no longer block desktop edges.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: put start menu on bottom panel and open appfinder for menu shortcut

Restore the XFCE panel to the bottom edge, bind Super/Alt-F1 to xfce4-appfinder
in openbox, and make the remote-desktop「开始菜单」action spawn appfinder
instead of relying on an unbound Alt+F1 chord.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: keep XFCE start button across desktop service restarts

Hard-reset xfconfd when seeding the panel so in-memory channel state cannot
override our launcher XML, keep a canonical panel layout under /opt, and stop
apply-icon-size from re-entering ensure-panel (which raced and dropped the
start button after restarts).

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: trim remote-desktop dead weight without dropping fixes

Drop unused whiskermenu packaging and duplicate panel reseeds, narrow D-Bus
env parsing to session bus keys, prefer a single appfinder spawn for the menu
shortcut, and demote terminal happy-path logs back to info.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: ship Octop wallpaper.png as the default virtual desktop backdrop

Use the packaged asset next to install.sh (no COS download by default), avoid
center-cropping the lower-right brand mark, and keep a copy under /opt.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: ship Octop wallpaper.png as the default virtual desktop backdrop

Use the packaged asset next to install.sh (no COS download by default), avoid
center-cropping the lower-right brand mark, and keep a copy under /opt.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat: align remote browser with desktop HUD and safer Chromium lifecycle

Detect system Chrome/Chromium via find_chrome for env readiness and launch,
fall back to Playwright install when missing, and uninstall only Playwright
Chromium. Match StreamEdgeControls hover HUD and install/uninstall viewport
layout with remote desktop; clear stale profile locks before attach.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: make remote browser launch writable and show on virtual desktop

Force a private XDG_RUNTIME_DIR, recreate non-writable harness profiles,
and inject DISPLAY=:99 when Xvnc is up so Chrome starts headed on the
remote desktop instead of failing with ProcessSingleton exit 21.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: persist setup wizard UI locale on initial admin

Create the first admin with the wizard's current language (or
Accept-Language) instead of hard-coding zh, so Finish/login no longer
silently switches English browsers to Chinese after setup.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(ui): narrow stream HUD hover hotzone to HUD width

Only the centered top strip (~320px) captures hover so left/right
stream content stays click-through. Also reformat remote desktop and
terminal control pages.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(remote-browser): persist stream open/closed across page visits

Remember whether the user left the stream running, and only auto-
reconnect on enter when it was open (or deep-linked via ?thread=).

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(browser): relocate root profiles and bump harness-browser 0.7.4

Host agents can allow Python writes under /root but deny Chrome
SingletonLock creation. Proactively use /tmp profiles, pin
ProfileManager to the resolved base dir, require harness-browser
0.7.4 for launch-time XDG/env injection, and refresh the lockfile.

Co-authored-by: Cursor <cursoragent@cursor.com>

* style: format browser setup unit test for ruff

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(test): rename browser setup tests to avoid basename clash

pytest cannot collect both unit/browser/test_setup.py and
unit/desktop/test_setup.py under the same module name.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(typecheck): use posix_compat.chown for Windows mypy

os.chown is unavailable on Windows stubs; route ownership fixes through
the shared posix_compat helper like the rest of infra.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(test): expect catalog label for bootstrapped main agent

Setup now uses the general-assistant manifest name (小通 · 通用助手)
instead of a hard-coded 通用助手 string.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: honor macOS /private and tempfile paths in host guards

/etc resolves to /private/etc on macOS, so strip that prefix before
denied-prefix checks. Allow media previews from tempfile.gettempdir()
(/var/folders/…) in addition to /tmp.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(test): make browser binary verify fixture work on Windows

The fake Chrome was a shebang shell script, which Windows cannot
execute. Use a .bat stub on nt so --version verification succeeds.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 20:30:56 +08:00
jubaoliang 748d998cf2 first commit 2026-07-09 14:32:36 +00:00