82 Commits
Author SHA1 Message Date
a2aa41e5e2 fix: encrypt secrets at rest, subpath deploy, decision defaults (#2295)
* fix: encrypt secrets at rest, subpath deploy, decision tool defaults

Unify Fernet helpers under infra/crypto and seal storage/provider/voice
keys plus decision/Langfuse secrets, with plaintext read fallback.
Support VITE_BASE_PATH for reverse-proxy subpaths, and default decision
tool filtering off so capability tools are not silently dropped.

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

* fix: expose sealed repo _db for runtime rebind checks

SealedProviderRepo wraps the SQL repo; tests and setup rebind assertions
still probe ._db for pool identity.

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 18:29:55 +08:00
jubaoliangandCursor a2890aedb7 chore: release 1.0.2
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-18 14:13:22 +00:00
jubaoliangandCursor 03c075668b chore: release 1.0.2b9
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-16 15:28:26 +00:00
jubaoliangandCursor ad213d7921 chore: release 1.0.2b8
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 14:53:24 +00:00
薄生 5e71aeadf0 Merge pull request #1969 from odpay/codex/zenith-badge
docs: add Zenith Hosting deploy option
2026-10-14 17:16:26 +08:00
liukewia 26eab95c47 docs: add support for China mirror in Docker setup (#2034)
- Updated README files to include instructions for using a domestic mirror when the official GHCR is unreachable.
- Introduced a new `docker-compose.cn.yml` file for pulling images from the Nanjing University GHCR source without local builds.
- Enhanced documentation to clarify the usage of the new Docker configuration for users in China.
2026-10-14 16:59:56 +08:00
Bosheng0422andCursor 812d1b830a docs: polish cloud deploy badges
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 14:50:04 +08:00
Bosheng0422andCursor d6bdb3bf87 docs: add Lighthouse and CVM deploy badges beside Zenith
Put the Tencent Cloud one-click deploy options ahead of the existing Zenith Hosting button.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-14 12:16:46 +08:00
Josh 053c741f09 Revise hosting section in README 2026-10-14 14:58:40 +11:00
odpay 9200146673 docs: add Zenith Hosting deploy option 2026-10-13 15:46:18 +11:00
jubaoliangandCursor aef4c8a855 chore: merge main into release/1.0.2b7
Keep develop's tree where 1.0.2b6 was squash-merged, and bring over the Discord invite plus the README-only pre-commit skip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 11:27:58 +00:00
jubaoliangandCursor 56bc4650ca chore: release 1.0.2b7
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 10:36:10 +00:00
jubaoliang 815ded9aa0 fix(teams): keep member answers on the room through approval (#1928)
Member speech waits until the host turn is idle, a tool approval pauses that member instead of ending the job, and the live reply stays visible after the user approves. The same change accepts custom role ids and shows long model names in the composer.
2026-10-12 14:14:13 +08:00
jubaoliang 41a557ea16 feat(connectors): localize the built-in catalog from JSON (#1922)
Move connector metadata into catalog.json with English and Chinese copy so the dashboard follows Accept-Language, and keep docs/connectors.md in sync with that catalog.
2026-10-12 11:52:02 +08:00
jubaoliang 32bf23af70 docs: add Octop Pet to Related projects in README (#1168) 2026-10-09 09:01:37 +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
Bosheng0422 0cf074529d update bottom discord join link 2026-10-08 11:59:10 +08:00
薄生 4b17f1cfac update discord join link (#1680) 2026-10-06 17:14:32 +08:00
c86908143f fix(ci): stop stripping Docker Hub name from publish outputs (#1642)
* fix(ci): stop stripping Docker Hub name from publish outputs

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

* fix: restore 1.0.2b6 after main-to-develop sync dropped version pins

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

* docs(publish): bump every current version pin, not just pyproject

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 13:58:10 +08:00
+6 eb28011249 chore: release 1.0.2b6 (#1612)
* docs: refresh README roadmap, anchors, and product sync (#1211)

Align EN/CN README with shipped features and current install/channel
docs; fix GitHub heading anchors and drop obsolete extras examples.

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

* fix(dashboard): define missing --fn-bg-container theme variable (#1216)

Dark-theme surfaces that use var(--fn-bg-container, #fff) — most
visibly the knowledge-base Markdown preview body, toolbar and outline
panel — resolved to a white background while text stayed light, leaving
preview content invisible. Define the variable as #ffffff (light) and
#141414 (dark), and point the Admin/Users badge tints that borrowed the
name for a translucent fill at --fn-bg-tertiary so their look is
unchanged.

Fixes #1215

* feat(dashboard): let each account customize the sidebar (#1218)

Store group order, item placement, and hidden entries on the user so navigation can be rearranged without showing items the account cannot access.

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

* style(dashboard): apply Prettier to files that drifted from the formatter (#1222)

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

* feat: store role-template id on users.role and harden mobile composer (#1220)

Collapse the dual user_role_id / role model so users.role and invites.role
hold the template public id, block deleting roles still in use, and keep
the chat composer visible under mobile browser visualViewport.

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

* docs: use product names for sibling project links in the README (#1225)

Link labels now match the product names while the repository URLs stay unchanged.

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

* docs(publish): bump version badges in all localized READMEs (#1229)

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

* fix: load plugins that still import harness_agent (#1260)

Marketplace plugins written before the octop_harness rename fail to install
and enable with ModuleNotFoundError. Alias that import onto the installed package.

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

* fix(backup): skip the Octop-owned _builtin_skills prefix on zip import (#1255)

POST /workspace/archive writes archive entries straight into the
workspace; _safe_zip_name only blocks traversal, so a zip could plant
files under _builtin_skills/ and .octop/_builtin_skills/. That prefix is
owned by Octop: DELETE and POST /workspace/move refuse it via
_assert_workspace_mutable and sync_octop_builtin_skills only prunes its
own retired names, so planted skills both load as kind=builtin and stay
irremovable through the API. This restores the #1105 guard (filter plus
warnings reporting) together with its regression test, which a later
"restore prior behaviors" commit had removed along with the filter.

Fixes #1254

Co-authored-by: jubaoliang <jubaoliang@tencent.com>

* fix(dashboard): define the missing --fn-* design tokens (#1240)

About 30 --fn-* custom properties were referenced across dashboard
styles but never defined in theme-vars.css. References without a
fallback resolved to invalid-at-computed-value-time (transparent
surfaces, e.g. the Connectors page sunken wells), and fallbacks were
often light-only literals that broke the dark theme. Define the
missing tokens for both themes, aligned with their nearest existing
design-system values, and fix the misspelled --text-secondary /
--border-color references that could never resolve.

Fixes #1239

* feat(ollama): allow configuring local model download directory (#1279)

* feat(ollama): allow configuring local model download directory

Users who move Ollama models off the default path could list custom models
but Octop treated them as not downloaded. Persist an OLLAMA_MODELS directory,
scan manifests for downloaded names, and pass the path when starting serve.

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

* fix(ollama): keep service running when saving models dir

Saving the download directory no longer sends enabled=false, so a running
Ollama daemon is not stopped. Disk-scanned models report size 0 so the UI
does not show the manifest file size as the model size.

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

---------

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

* feat(skills): let octop-assistant answer product and help questions (#1311)

Give the bundled assistant a product overview plus links to octop.cloud and the docs, and keep CLI setup for changes on the running instance.

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

* fix(ollama): list local models even when Octop service is off (#1316)

* fix(ollama): list local models even when Octop service is off

Windows users often run Ollama themselves. Octop only queried the daemon
when its managed-service toggle was on, so already-pulled models showed
as not downloaded. List from a reachable daemon without starting serve,
and mark IDs from fetch-models as downloaded.

* docs: note Ollama downloaded-model detection when the service toggle is off

* fix(mobile): stop the JPEG stream after a run of failed captures (#1309)

`_stream_frames` (the mobile JPEG fallback) retried forever: on `TimeoutError`
it logged and `continue`d, and on `captured is None` it just `continue`d. A
phone unplugged mid-stream, or a dead adb bridge, makes every capture fail at
once, so the loop spun at the frame interval indefinitely — a warning per
iteration, a log flood, and a canvas frozen on the last frame with nothing ever
sent to explain it.

The desktop sibling `desktop/stream.py::_stream_loop` already counts consecutive
misses, warns once, and after 30 sends an error frame and breaks. This mirrors
that: timeouts and `None` both count as misses, the first one is logged once,
and at `_CAPTURE_MISS_LIMIT` (30) the stream sends the
`{"type": "error", "message": ...}` frame the rest of this router already uses
and returns. A successful frame resets the streak, so an occasional dropped
frame still does not tear the stream down.

Folding the timeout branch into the shared counter also removes the
per-iteration warning flood.

* fix(cli): read and write cli_state.json through the shared JSON helpers (#1307)

`octop.cli.support.state` keeps a private reader/writer for
`~/.octop/cli_state.json` and both halves are looser than the rest of the tree.

`load()` parses with a bare `json.loads(path.read_text(...))`, so an
unparseable file raises a `json.JSONDecodeError` traceback. This file is read by
nearly every CLI command (`config`, `agent`, `db`, `acting`, `ctx`, the REPL),
so one damaged file aborts all of them at once.

`save()` writes with `path.write_text(...)` — truncate, then write. A crash or a
full disk mid-write leaves exactly the truncated file that `load()` then
refuses, with no warning and no `ensure_root()` in between.

`infra/utils/json_file.py` exists for this; its docstring is explicit that a
torn write "creates the same precondition" as a hand-edit slip and that callers
"must not fall back to an empty dict". Four call sites already route through it
(`cli/commands/run.py`, `agents/plugins/manager.py`, `agents/plugins/seed.py`,
`setup/service.py`).

`load()` now reads via `read_json_object` and translates `JsonFileCorruptError`
into `corrupt_config_error(...)` (`CONFIG_FILE_CORRUPT`) — the same policy as
every other `OCTOP_HOME` JSON reader. `save()` writes via `write_json_atomic`
(mkstemp + `os.replace`) so a reader never observes a partial file. A non-object
payload such as `[1, 2]` also raises the typed error now, instead of a stray
`dict.update` `TypeError`.

* fix(gateway): preserve IM attachment metadata in history (#1276)

* fix(docker): ship the langfuse env var the client actually reads (#1258)

OCTOP_LANGFUSE_ENABLED is set by .env.example and forwarded by docker-compose.yml, but nothing reads it: Octop keeps the switch in the settings table (observability_langfuse_enabled) and the langfuse client honours LANGFUSE_TRACING_ENABLED. Add a test that fails while a shipped Langfuse variable has no reader.

* fix(api): sandbox media preview responses (#1243)

media/preview streams user-controlled bytes (chat attachments, tool
outputs) inline on the dashboard origin. image/svg+xml is previewable,
so a navigated preview URL executed as a live document on the app
origin and could run attacker script — the endpoint also accepts the
access_token query parameter for media loads. Serve previews with
Content-Security-Policy: sandbox and X-Content-Type-Options: nosniff;
image/video previews keep working.

Fixes #1242

Co-authored-by: jubaoliang <jubaoliang@gmail.com>

* feat: add Octop↔Octop cloud collab for remote experts (#1281)

* feat: add Octop↔Octop Bridge for remote agent access

Enable admin-managed peer connections with WS tunnel, path allowlist,
hello_ack handshake, SSRF guards, and Chat shadow-agent hydrate so
operators can probe and use remote agents from the local dashboard.

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

* fix: serialize bridge turn chunks and flag remote experts

LangChain HumanMessage objects in peer turn.chunk frames crashed
json.dumps; add a bridge JSON default. Show a 远端/Remote badge on
shadow experts in the picker and sidebar lists.

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

* fix: bridge avatars, named remote badges, and auto-reconnect

Keep bundled / CDN icon URLs for shadow experts and only proxy uploaded
avatars. Show the bridge display name on remote badges. Add a default-on
auto-reconnect switch that backs off on disconnect and disables itself
after repeated failures, recording the reason in last_error.

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

* feat: add card/table views for bridge connections

Match the storage page card layout and add a Segmented toggle so
admins can switch between a card grid and a table of remote links.

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

* fix: render bridge expert icons correctly on the chat page

Encode bridge agent ids in avatar URLs the same way as chat WS paths,
fall back to Lucide when the image fails, size portraits to fill the
sidebar avatar, and refresh AgentContext when icon_url changes.

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

* feat: tunnel peer models and knowledge bases for bridge chat

Allow read-only GET of peer providers/resolved, active-model, and
knowledge-bases (plus capability) through the Bridge tunnel, expose
local bridge connection routes, and point the chat composer at those
sources when talking to a shadow expert. Hide local connectors for
remote sessions. Also allow agent subagents paths on the tunnel.

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

* fix: scope bridge chat expert picker to peer agents

When the active expert is a Bridge shadow, the composer expert picker
and @-mentions only list peers on that connection (not local experts).
Encode bridge agent ids for skills and subagents list/install paths.

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

* fix: hint remote chat pickers to manage settings on the peer

In Bridge sessions, replace local “manage …” footers for models,
skills, knowledge bases, experts, and subagents with a muted
“edit on remote” tip and a toast instead of navigating to local admin.

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

* feat: polish bridge remote UX and tunnel agent status

Allowlist GET …/status so hubs can read real peer harness state (peers need
this build). Keep history-migration hub-local, skip noisy bridge polls in the
UI, move Bridge under Settings, and mark remote experts with cable + name.

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

* feat: tunnel remote expert catalogs and polish bridge connection UX

Hub can edit peer subagents, memory, channels, tools, plugins, and MBTI
through the tunnel; surfaces that cannot hop show an in-drawer hint. Peer
must run this build so the new allowlist takes effect.

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

* feat: group cloud-collab experts and unify header-tunneled composer APIs

Keep the selected remote expert on disconnect, gate peer-only surfaces in the UI, and stop forking composer/task requests through dedicated bridge endpoints.

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

* feat: add search to the Experts toolbar

Filter my experts, teams, and the library from the existing button row so long catalogs stay scannable.

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

* fix: keep inbound cloud-collab cards peer-owned

Inbound links can only edit name/icon/notes; disconnect, delete, and auto-reconnect stay disabled. Peer offline shows as 离线, peer delete removes the card, and the default inbound name is the short connection id.

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

* fix: polish inbound cloud-collab UX and unify 对端 copy

Peer-initiated links can only edit display info and cannot redial;
offline cards may be deleted. Local-only pages hint when a peer
expert is selected.

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

* fix: map peer team speakers onto Bridge shadows

Peer team chats stamped local member ids, so the hub fell back to the host
avatar. Rewrite roster and stream speakers onto bridge:{cid}:{id} shadows,
and keep the local team picker from mixing in peer experts.

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

* fix: stop rewriting team thread ids in the Bridge tunnel

Member job threads are {room}~{agent}. A blanket JSON replace of the peer
agent id turned those into hub shadows, so history 404ed on the peer.

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

* fix: rewrite peer media URLs and keep bridge turn composer fields

Live send_file_to_user frames still pointed at peer-local /api/agents/{id}.
Map every teammate id in tunneled JSON, and copy the full dashboard turn
body so knowledge bases and HITL policy are not dropped on the peer.

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

* fix: rename bridge probe tests to avoid pytest module clash

tests/unit/bridge/test_probe.py collided with tests/unit/mobile/test_probe.py
during collection (same basename).

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

* feat: collapse extra experts on Bridge cards and fill avatars

Show at most four experts on a connection card, with the rest behind
expand. Portraits fill the 40px ring without a tinted background.

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: lulinzhi37-alt <lulinzhi37@gmail.com>

* fix: beta upgrade notes and fnpack download resilience (#1327)

* fix(update): load prerelease changelog from versioned PyPI JSON

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

* ci(fnos): retry and cache fnpack downloads

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

---------

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

* feat(experts): add default conversation mode (Ask/Plan/Craft) to expert settings (#1338)

* feat(skills): per-package copy policy for skill packages (#770) (#1336)

skill_packages gains copy_policy (snapshot default / lock / deny), set by the
creator or admin via PATCH. deny rejects the workspace copy endpoint with
SKILL_PACKAGE_COPY_DENIED and disables the dashboard button (can_copy). lock
stamps each copied SKILL.md with origin/locked frontmatter; the existing
package-only write guard now also rejects writes to stamped copies for
everyone but the origin package creator (admins keep an escape hatch for
orphaned copies). Copy attempts are audited. Agent-tool-level write
protection for locked copies needs harness support, tracked separately.

Co-authored-by: vicfei <4058491+vicfei@users.noreply.github.com>

* fix(httpx): honor CIDR entries in NO_PROXY (#1354)

httpx 0.28 treats 192.168.0.0/16 as the exact IP 192.168.0.0, so LAN
hosts hit HTTP_PROXY. Also split Windows semicolon lists, parse IPv6
CIDR, and bypass loopback under macOS/Windows system proxies.

Fixes #1347

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

* fix(qq-mail): 修复裸非 ASCII 邮件头导致 search_emails/read_email JSON 崩溃 (#1343)

技术报告 TECH-REPORT-qq-mail-header-bug.md 的复现与修复:

- 根因:email.message_from_bytes 默认 compat32 策略下,邮件头含裸
  非 ASCII 字节时 get() 返回 email.header.Header 对象,直接传入
  json.dumps 抛 TypeError: Object of type Header is not JSON
  serializable,真实邮箱场景 100% 必现
- 修复(报告方案 B):新增 _parse_message() 统一以
  email.policy.default 解析,_safe_header() 强制 str();所有面向
  JSON 的头字段(From/Subject/Date)走统一封装
- 附带收益:规范 MIME 编码头(=?utf-8?q?...?=)现在解码为可读
  中文,而非原始编码串
- _extract_body:声明字符集无已装 codec(如 unknown-8bit/伪造名)
  时回退 UTF-8(errors=replace 只挡字节错误,挡不住 LookupError)
- 新增 13 项回归测试:裸 UTF-8 头、MIME 编码头、破损编码字、
  unknown charset 回退、multipart、纯 ASCII 不回归;已在未修复
  代码上验证测试会失败(TypeError)

Co-authored-by: jubaoliang <jubaoliang@gmail.com>

* fix(desktop): expand the optional wheel overrides under bash 3.2 (#1363)

extra stays empty on darwin-arm64, linux-* and windows-amd64 because
write_green_overrides only emits an override file for windows-arm64 and
darwin-amd64. "${extra[@]}" under set -u aborts on the macOS default
/bin/bash before uv ever runs, so `make -f desktop/portable/Makefile
wheels` fails on the host platform. Use the guarded expansion form the
repo already applies in scripts/install.sh.

* fix(dashboard): gate SkillPackagesTab detail and copy requests (#1333)

The detail drawer and the copy modal both fetch the same endpoint and both
wrote their response unconditionally, so a slow click on package A could
overwrite a later click on package B: the drawer showed the wrong skills and
the copy action posted the wrong package id. Reuse the existing
createDetailRequestGate helper so only the newest request per surface lands.

* fix(wechat-ops): scope the publisher token cache to its AppID (#1332)

The cache file is shared by every official account but the record only held
the token and its expiry, so the reuse check looked at time alone. After
switching WECHAT_APP_ID the publisher kept sending the previous account's
token for up to two hours: draft/add succeeded against the wrong account, the
command exited 0, and it still printed a successful publish. Tag each record
with the AppID it was issued for and refuse to reuse a token that was not
fetched for the account currently configured.

* fix(history): bound trajectory events written to the v2 archive (#1331)

ArchiveTrajectoryStore writes v2 trajectory events with
HistoryStore.put_document directly, so it skipped the clip_persisted_event
call that TrajectoryStore.append/upsert perform for the repo backend. Those
caps exist to bound SQLite row size, which applies to the shared archive
rows just as much as to trajectory_events. Apply the caps before routing so
both backends persist the same bounded event.

* fix(connectors): retry a transient streamable-HTTP MCP probe once (#1330)

* fix(connectors): retry a transient streamable-HTTP MCP probe once

The SSE probe retries once when the upstream closes the stream during the
first initialize; probe_streamable_http_mcp shares the same error
classification but returned on the first attempt, so a transient proxy or
upstream drop was reported as a broken connector.

Mirror the SSE retry: one extra attempt for connection-class failures only,
and return auth rejections (HTTP 401/403) immediately so a bad key is never
masked by the retry.

* fix(connectors): reformat probe.py to pass ruff format check under LF

The previous commit left probe_streamable_http_mcp with multi-line
logger.warning(...) calls that ruff 0.15.20 only accepts in a CRLF file.
Under the Linux CI (LF), 'ruff format --check' rewrites them to a single
line, failing 'make lint'. Reformat to the LF/single-line form ruff
expects so the lint job passes.

* fix(connectors): resolve mypy type conflict in streamable-HTTP retry

_unwrap_probe_exception_group returns dict | None, which could not be
assigned to the 'result' variable already inferred as dict[str, Any] from
the other exception branches. Use a separate 'unwrapped' local in the
BaseExceptionGroup branch so the types stay compatible.

* fix(dashboard): do not cache the timezone fallback when the fetch fails (#1326)

`useServerTimezone` stored `"UTC"` on the failure path, and the module-scope
guard `if (cachedTimezone) return cachedTimezone` then short-circuited every
later mount. One transient failure - the dashboard is commonly loaded while the
Octop service is still starting - therefore pinned UTC for the rest of the page
session, and every consumer (MessageBubble, JournalList, AuditLogPanel,
UsersListPanel, ...) rendered timestamps in the wrong zone with nothing to
suggest a reload would fix it.

The sibling settings hook `useServerUploadLimit` already models the contract:
`applyUploadLimitFetchResult` returns `cache: null` on failure so the next mount
retries, and its test is literally named "does not cache a failed fetch so the
next mount can retry".

Extracted the same seam here - `applyTimezoneFetchResult`, plus a named
`DEFAULT_SERVER_TIMEZONE` - and routed both branches through it. Successful
responses (including an empty timezone, which still falls back to UTC) keep
caching exactly as before.

* fix(mobile): settle the install stream exactly once (#1325)

`streamMobileSse` reports completion through `onDone`, but it was the only
stream in `api/modules` that could end without calling it - and the only one
that could call it twice.

* The read loop breaks on EOF and the `.then` body just returns. When the body
  closes without a terminal frame the callback never fires; `desktop.ts` and
  `browser.ts` both settle after their loop. Mobile can really truncate:
  `infra/mobile/setup.py` spawns `bash` with no guard, so a host without a
  shell raises before the router can write its `{"done": ...}` frame.
* A terminal frame did not stop the loop, so any later frame fired `onDone`
  again. `desktop.ts`/`browser.ts` `return` straight after settling.

`pages/Control/RemoteAndroid` only leaves its "installing" phase inside
`onDone`, so the first case leaves the panel spinning with the install button
disabled and no toast, and the second runs the completion path twice.

Both paths now funnel through a one-shot `settle()`.

* fix(skills): fetch SkillHub rankings through the shared capped HTTP client (#1308)

`_fetch_ranking_json` was the only fetch in this module that hand-rolled
`urllib.request.urlopen` instead of calling `_http_request`.

`response.read()` therefore buffered the whole body with no size limit, where
`_http_request` checks `Content-Length` and then reads in `HTTP_READ_CHUNK`
slices up to `MAX_HTTP_BYTES` — the search path already passes a cap.

Its `except` ladder also stopped at `HTTPError`/`URLError`/`TimeoutError`, so a
mid-stream `ConnectionResetError` or an `http.client.HTTPException` escaped as a
raw exception. The endpoint that serves rankings (`routers/skills.py::
_hub_rankings`, used by `GET /skills/hub/rankings` and
`GET /agents/{id}/skills/hub/rankings`) only maps `SkillHubMarketError` to 502
and `SkillHubMarketTimeout` to 504, so an upstream hiccup became an opaque 500.

Rankings now go through `_http_request` like `_fetch_search_json` and
`_download_skillhub_package` already do. The 4 MiB JSON cap is named
`_MAX_JSON_BYTES` and used by both JSON fetches instead of repeating the literal.

`_Response` in `tests/unit/agents/test_skillhub_market.py` is the stub that
`test_fetch_ranking_json_uses_showcase_endpoint` hands back from `urlopen`, so it
has to accept the `size` argument `_http_request` passes. It now wraps the
payload in `io.BytesIO` and reads exactly like `_BytesResponse` next door, which
also makes the read loop stop on the first empty chunk instead of spinning.

* fix(dashboard): add the missing locale entries for t() keys (#1241)

* fix(dashboard): add the missing locale entries for t() keys

About 200 t() keys used across the dashboard were absent from
locales/en.json (and 113 from locales/zh.json). i18next fell back to
the call-site defaults, so the English UI rendered large chunks of
hardcoded Chinese (memory panel, connectors onboarding, skill
recording guide, proactive-care config, ...) and a few spots showed
raw key paths; the en/zh parity checks could not catch it because
both bundles missed the same keys. Add the missing entries to both
bundles and switch the two skill-record call sites whose defaults
interpolated runtime values to real i18next interpolation.

Fixes #1238

* fix(dashboard): align zh memory strings with current in-code defaults

Per review on #1241: once these keys land in the bundle, i18next stops
using defaultValue, so zh must match the current UI defaults.

* fix(dashboard): mention the English stop keyword in the skill-recording guide

skillRecordGuide.step4Desc only told English users to type "结束" to stop
recording, but END_KEYWORDS also accepts "end" and "stop recording" — users
following their own language had no way to discover the keyword from the guide.
Mirror the existing bilingual keyword style (e.g. skills.skillNamePlaceholder)
and list the English variant next to the Chinese one.

Re-applied on top of the rebuilt branch: upstream develop was rewritten, and
this change had been part of the previous (now superseded) rebase.

* fix(agents): propagate exhausted model retries as failures (#1012)

Co-authored-by: jubaoliang <jubaoliang@gmail.com>

* fix(dashboard): browse every drive in the storage-root picker on Windows (#1429)

The picker derived a single browse root from `Path.home().anchor`, so a
user whose profile lives on `C:` could not reach `D:` at all. That was
structural, not a policy filter: `host_fs_tree_root()` returns one path,
`/api/filesystem/defaults` hands it over as `tree_root`, and
`rootDirTree.sanitizeTree` keeps exactly one tree and returns
`[cleaned]` - every sibling of that root was dropped on each update, so
even a hand-injected `D:/` node could not survive. `/filesystem/dirs`
only ever listed children of `C:/`, and the router exposed no endpoint
that enumerates drives.

Enumerate ready drive roots instead:

* `host_dirs.host_browse_roots()` returns `/` on POSIX and every ready
  drive on Windows, falling back to the home anchor when none respond so
  the picker never renders an empty tree. Probing uses `os.path.isdir`
  rather than `GetLogicalDrives` so mapped network drives are covered
  too, with no ctypes call.
* `GET /api/filesystem/roots` exposes that list, and
  `/api/filesystem/defaults` now also returns `browse_roots`. A
  `workspace_root_dir` policy jail still collapses both to that one path,
  which is the point of the policy.
* `RootDirSelect` takes `treeRoots` and renders a forest.
  `sanitizeTree` keeps one tree per root while still deduping globally -
  that set is what fixes antd#37228 duplicate rows, and drive roots are
  distinct paths, so global uniqueness is still the right rule.
  `ancestorDirPaths` now takes the longest containing root, so `D:/x/y`
  expands under `D:/` even though `C:/` is listed first. Single-string
  roots keep working, so the existing tests stayed valid.

Second, the hint text promised a sandbox that does not exist off Linux:
`ensure_bubblewrap` returns `not_linux` with "bubblewrap jail is
Linux-only; execute uses plain local_shell", so a non-root `root_dir`
only bounds the agent's *tool* paths while the agent process keeps
running with the server account's own filesystem access. That is a weaker
guarantee than the copy claimed, and worth correcting on its own.
`/api/filesystem/defaults` now reports `jail_enforced`, and
`backendRootDirJailHint` splits into a real-sandbox variant and
`backendRootDirPathLimitHint` for hosts without one. `backendRootDirDesc`
no longer says `/` unconditionally, which was only true on POSIX.

Drive enumeration and `shutil.which` sit behind `_ready_drive_roots()` /
`_bwrap_on_path()` seams: patching `os.path.isdir` or `shutil.which`
globally breaks pytest's own path handling mid-test.

* feat(auth): add LDAP directory login (#1123)

Let users sign in with their directory (Active Directory / OpenLDAP)
credentials through the existing login form. Reuses sso_providers
(kind='ldap') and user_sso_identities, so no schema change is needed.

Authentication is search-then-bind: a service account resolves the user and
only the returned DN is bound with the submitted password, so user input is
never used as a bind identity. Roles come from a role template at first
provisioning only; changing a directory group later never re-templates an
existing account. Directory outages and wrong passwords stay distinguishable
(502 LDAP_UNAVAILABLE vs 401 AUTH_FAILED).

Hardening from review:

- An account holding its own password stops at the local check, so a local
  secret is never forwarded to the directory nor counted against that
  directory's own lockout policy.
- A lookup without a unique exact identifier match is refused instead of
  being bound against the first hit.
- A failure during the user bind surfaces as LDAP_UNAVAILABLE rather than a
  401 credential verdict.
- Binds are throttled before they reach the directory, keyed per identifier
  and client address, with the address resolved from a trusted peer so a
  spoofed X-Forwarded-For cannot reset the budget.
- Enabling a plain ldap:// URL without StartTLS is rejected; a disabled
  certificate check is surfaced as a warning.
- auto_provision defaults to off, with an optional allowed_groups allow-list
  and a group-search mode (member / uniqueMember / memberUid) for directories
  that do not expose memberOf. Nested groups are not resolved.
- The identity key is configurable (entryUUID / objectGUID) and blank by
  default; a connectivity probe reports which attribute the directory
  exposes.
- Config changes are audited against the acting admin, and referrals are no
  longer followed during binds.

Tests cover the above without a live directory (ldap3.Connection is the only
thing replaced); a live test exercises a real directory when configured.

Co-authored-by: jubaoliang <jubaoliang@gmail.com>

* feat(dashboard): tuck composer extras into a plus-menu flyout (#1513)

* feat(dashboard): tuck composer extras into a plus-menu flyout

Keep HITL, shortcuts, and attachments on the toolbar. Mode, model, connectors, knowledge, skills, experts, and subagents open from a plus menu with a right-side panel. Chat user avatars now match the account photo or icon.

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

* chore: keep the composer PR changelog scoped to chat UX

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

---------

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

* feat(fnos): harden App Center install and native startup (#1539)

Keep the Docker/native wizards on an account-only flow, fail native start
when 8089 never comes up, and vendor harness storage_errors so current
Octop can boot against PyPI harness 1.0.0.

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

* fix(dashboard): center the empty-chat model prompt (#1542)

The no-model notice sat as a full-width strip above the composer. Show a centered empty state on new chats and keep the in-thread banner aligned with the input column.

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

* fix: give the model a concrete retry failure instead of a generic toast (#1545)

Turn exhausted model-call retries into a recovery prompt with the real
cause, unwrap that wrapper in stream/UI classification, and keep
background inbox jobs marked failed when the installed harness can see
the [model_call_failed] mark.

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

* chore: keep infra off api and tidy post-b3 leftovers (#1550)

Move JWT helpers and peer-turn runners out of infra→api imports, align
dashboard en/zh leaf keys, and let octop init proceed when only sidecar
files exist. Changelog records LDAP group mapping and skill lock scope.

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

* fix(fnos): stop native leftover on 8089 so App Center can start again (#1572)

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

* fix: adapt S3/Postgres backends and restore admin storage browse (#1565)

* fix: adapt S3/Postgres backends and restore admin storage browse

Published octop-harness 1.0.1 plus Octop-side spec mapping and protocol
wrap stop expert start and Admin tree listing from failing on the older
deepagents_backends surface. Browse now caches the backend session and
can preview or download files.

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

* fix: keep Windows paths valid in storage browse fixtures

f-string JSON turns backslashes into illegal escapes, so row_to_backend_spec
sees an incomplete filesystem config on Windows CI.

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

* fix: write browse fixture bytes without Windows newline translation

Path.write_text() converts LF to CRLF on Windows, so download assertions
saw b'# hello\r\n'.

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

---------

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

* fix(desktop): compare portable versions with parse_version rules (#1561)

The numeric comparator treated 1.0.2b4 and 1.0.2b5 as equal, so
replacing the desktop executable kept the persistent older runtime.

Port the existing Python parse_version key instead of adding a
third-party PEP 440 library. Overlay installs can replace b4 with b5;
backup, replacement rollback, and no-downgrade stay unchanged.

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

* feat(connectors): support Agent Mail auth, tools and new-mail tasks (#1573)

* feat(connectors): add isolated Agent Mail CLI tools

* feat(connectors): add Agent Mail device authorization

* feat(dashboard): add Agent Mail connector setup

* docs(connectors): document Agent Mail and CLI verification

* fix(connectors): keep Agent Mail checks portable and focused

* feat(connectors): trigger cron tasks from Agent Mail watch

* feat(dashboard): configure Agent Mail new-mail tasks

* docs(api): clarify Agent Mail trigger examples

* style(dashboard): refine Agent Mail auth and task hints

* test(connectors): preserve Windows watch process cleanup

* fix(connectors): gate Agent Mail writes with HITL and cron read-only

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

---------

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

* feat(dashboard): show teams in the memory and channels agent picker (#1588)

Keep other pages expert-only, group remotes as 云端·专家/团队, and
only reveal 更多 when the chip row cannot fit the current selection.

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

* fix: keep hung remote backends from blocking boot (#1586)

* fix: keep hung remote backends from blocking boot

S3/Postgres still use the old harness protocol and a per-call event loop, so one stuck List/Get can prevent HTTP from coming up. Run that I/O on a dedicated worker with timeouts, fail the one expert, and remap leftover unwritable workspace paths.

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

* fix: avoid MagicMock workspace_dir in boot timeout test

Windows rejects the mock's stringified path when the fake harness mkdirs workspace_dir. Register the agent with an empty config instead.

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

---------

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

* feat(hitl): hide approval surfaces unless tools can actually pause (#1594)

Composer, IM/CLI /help, and slash catalogs showed /approve even when neither HITL nor command-guard require_approval was on. CLI also went silent on a pause, and typed /approve hit a stub instead of resuming the turn.

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

* fix: restore ask_user_question cards after LangGraph v2 interrupt move (#1595)

Harness projection dropped chunk["interrupts"], so the dashboard left
the tool running and never showed the question card.

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

* fix: stop false stream errors, TLS internal MCP, and overlong tool names (#1599)

Ordinary answers that mention 429 or timeouts no longer become error
bubbles; internal MCP uses https when TLS is on without breaking startup
logs; MCP tool names are clamped to 64 characters.

Fixes #1074, #1499, #1527.

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

* feat(connectors): add official Agent Mail logo (#1608)

Replace the generic mail fallback with the official smiley mark so the catalog and picker match other built-in connectors.

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

* chore: release 1.0.2b6

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

* fix(dashboard): let the PWA debug page scroll on mobile

The layout content wrapper clips overflow, and the debug page had no scroll container of its own, so the lower checks and action buttons were unreachable on phones.

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

* docs: note PWA debug scroll in 1.0.2b6 changelog

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

* chore: bump uv.lock package version to 1.0.2b6

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

* fix(hitl): honor allow-all session bypass for later tool approvals

LangGraph evaluates interrupt `when` without the HITL thread ContextVar,
so persisted allow_all/allow_tools never skipped execute. Resolve thread
id from the runnable config and auto-resume leftover dashboard cards.

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Dang Zitou <dengzitao888@163.com>
Co-authored-by: Frank Zhang <77115469+Master-Frank@users.noreply.github.com>
Co-authored-by: XiaoChen <1326713348@qq.com>
Co-authored-by: locip123 <116343912+locip123@users.noreply.github.com>
Co-authored-by: lihongyuan99 <64824864+lihongyuan99@users.noreply.github.com>
Co-authored-by: lulinzhi37-alt <lulinzhi37@gmail.com>
Co-authored-by: Fei.Chen <cnfeichen@163.com>
Co-authored-by: vicfei <4058491+vicfei@users.noreply.github.com>
Co-authored-by: 猫猫摸大鱼 <58991169+miaowmint@users.noreply.github.com>
Co-authored-by: 智浪淘沙 <zhilangtaosha@qq.com>
Co-authored-by: Suroy <77138019+zsuroy@users.noreply.github.com>
Co-authored-by: MakerFly <223868679+MakerFlyFly@users.noreply.github.com>
2026-10-05 07:47:33 +08:00
28b64af9db feat(fnos): harden App Center install and native startup (#1539)
Keep the Docker/native wizards on an account-only flow, fail native start
when 8089 never comes up, and vendor harness storage_errors so current
Octop can boot against PyPI harness 1.0.0.

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-03 17:43:54 +08:00
e473dd3c4a chore: release 1.0.2b5 (#1321)
* docs: refresh README roadmap, anchors, and product sync (#1211)

Align EN/CN README with shipped features and current install/channel
docs; fix GitHub heading anchors and drop obsolete extras examples.

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

* fix(dashboard): define missing --fn-bg-container theme variable (#1216)

Dark-theme surfaces that use var(--fn-bg-container, #fff) — most
visibly the knowledge-base Markdown preview body, toolbar and outline
panel — resolved to a white background while text stayed light, leaving
preview content invisible. Define the variable as #ffffff (light) and
#141414 (dark), and point the Admin/Users badge tints that borrowed the
name for a translucent fill at --fn-bg-tertiary so their look is
unchanged.

Fixes #1215

* feat(dashboard): let each account customize the sidebar (#1218)

Store group order, item placement, and hidden entries on the user so navigation can be rearranged without showing items the account cannot access.

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

* style(dashboard): apply Prettier to files that drifted from the formatter (#1222)

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

* feat: store role-template id on users.role and harden mobile composer (#1220)

Collapse the dual user_role_id / role model so users.role and invites.role
hold the template public id, block deleting roles still in use, and keep
the chat composer visible under mobile browser visualViewport.

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

* docs: use product names for sibling project links in the README (#1225)

Link labels now match the product names while the repository URLs stay unchanged.

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

* docs(publish): bump version badges in all localized READMEs (#1229)

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

* fix: load plugins that still import harness_agent (#1260)

Marketplace plugins written before the octop_harness rename fail to install
and enable with ModuleNotFoundError. Alias that import onto the installed package.

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

* fix(backup): skip the Octop-owned _builtin_skills prefix on zip import (#1255)

POST /workspace/archive writes archive entries straight into the
workspace; _safe_zip_name only blocks traversal, so a zip could plant
files under _builtin_skills/ and .octop/_builtin_skills/. That prefix is
owned by Octop: DELETE and POST /workspace/move refuse it via
_assert_workspace_mutable and sync_octop_builtin_skills only prunes its
own retired names, so planted skills both load as kind=builtin and stay
irremovable through the API. This restores the #1105 guard (filter plus
warnings reporting) together with its regression test, which a later
"restore prior behaviors" commit had removed along with the filter.

Fixes #1254

Co-authored-by: jubaoliang <jubaoliang@tencent.com>

* fix(dashboard): define the missing --fn-* design tokens (#1240)

About 30 --fn-* custom properties were referenced across dashboard
styles but never defined in theme-vars.css. References without a
fallback resolved to invalid-at-computed-value-time (transparent
surfaces, e.g. the Connectors page sunken wells), and fallbacks were
often light-only literals that broke the dark theme. Define the
missing tokens for both themes, aligned with their nearest existing
design-system values, and fix the misspelled --text-secondary /
--border-color references that could never resolve.

Fixes #1239

* feat(ollama): allow configuring local model download directory (#1279)

* feat(ollama): allow configuring local model download directory

Users who move Ollama models off the default path could list custom models
but Octop treated them as not downloaded. Persist an OLLAMA_MODELS directory,
scan manifests for downloaded names, and pass the path when starting serve.

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

* fix(ollama): keep service running when saving models dir

Saving the download directory no longer sends enabled=false, so a running
Ollama daemon is not stopped. Disk-scanned models report size 0 so the UI
does not show the manifest file size as the model size.

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

---------

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

* feat(skills): let octop-assistant answer product and help questions (#1311)

Give the bundled assistant a product overview plus links to octop.cloud and the docs, and keep CLI setup for changes on the running instance.

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

* fix(ollama): list local models even when Octop service is off (#1316)

* fix(ollama): list local models even when Octop service is off

Windows users often run Ollama themselves. Octop only queried the daemon
when its managed-service toggle was on, so already-pulled models showed
as not downloaded. List from a reachable daemon without starting serve,
and mark IDs from fetch-models as downloaded.

* docs: note Ollama downloaded-model detection when the service toggle is off

* fix(mobile): stop the JPEG stream after a run of failed captures (#1309)

`_stream_frames` (the mobile JPEG fallback) retried forever: on `TimeoutError`
it logged and `continue`d, and on `captured is None` it just `continue`d. A
phone unplugged mid-stream, or a dead adb bridge, makes every capture fail at
once, so the loop spun at the frame interval indefinitely — a warning per
iteration, a log flood, and a canvas frozen on the last frame with nothing ever
sent to explain it.

The desktop sibling `desktop/stream.py::_stream_loop` already counts consecutive
misses, warns once, and after 30 sends an error frame and breaks. This mirrors
that: timeouts and `None` both count as misses, the first one is logged once,
and at `_CAPTURE_MISS_LIMIT` (30) the stream sends the
`{"type": "error", "message": ...}` frame the rest of this router already uses
and returns. A successful frame resets the streak, so an occasional dropped
frame still does not tear the stream down.

Folding the timeout branch into the shared counter also removes the
per-iteration warning flood.

* fix(cli): read and write cli_state.json through the shared JSON helpers (#1307)

`octop.cli.support.state` keeps a private reader/writer for
`~/.octop/cli_state.json` and both halves are looser than the rest of the tree.

`load()` parses with a bare `json.loads(path.read_text(...))`, so an
unparseable file raises a `json.JSONDecodeError` traceback. This file is read by
nearly every CLI command (`config`, `agent`, `db`, `acting`, `ctx`, the REPL),
so one damaged file aborts all of them at once.

`save()` writes with `path.write_text(...)` — truncate, then write. A crash or a
full disk mid-write leaves exactly the truncated file that `load()` then
refuses, with no warning and no `ensure_root()` in between.

`infra/utils/json_file.py` exists for this; its docstring is explicit that a
torn write "creates the same precondition" as a hand-edit slip and that callers
"must not fall back to an empty dict". Four call sites already route through it
(`cli/commands/run.py`, `agents/plugins/manager.py`, `agents/plugins/seed.py`,
`setup/service.py`).

`load()` now reads via `read_json_object` and translates `JsonFileCorruptError`
into `corrupt_config_error(...)` (`CONFIG_FILE_CORRUPT`) — the same policy as
every other `OCTOP_HOME` JSON reader. `save()` writes via `write_json_atomic`
(mkstemp + `os.replace`) so a reader never observes a partial file. A non-object
payload such as `[1, 2]` also raises the typed error now, instead of a stray
`dict.update` `TypeError`.

* fix(gateway): preserve IM attachment metadata in history (#1276)

* fix(docker): ship the langfuse env var the client actually reads (#1258)

OCTOP_LANGFUSE_ENABLED is set by .env.example and forwarded by docker-compose.yml, but nothing reads it: Octop keeps the switch in the settings table (observability_langfuse_enabled) and the langfuse client honours LANGFUSE_TRACING_ENABLED. Add a test that fails while a shipped Langfuse variable has no reader.

* fix(api): sandbox media preview responses (#1243)

media/preview streams user-controlled bytes (chat attachments, tool
outputs) inline on the dashboard origin. image/svg+xml is previewable,
so a navigated preview URL executed as a live document on the app
origin and could run attacker script — the endpoint also accepts the
access_token query parameter for media loads. Serve previews with
Content-Security-Policy: sandbox and X-Content-Type-Options: nosniff;
image/video previews keep working.

Fixes #1242

Co-authored-by: jubaoliang <jubaoliang@gmail.com>

* feat: add Octop↔Octop cloud collab for remote experts (#1281)

* feat: add Octop↔Octop Bridge for remote agent access

Enable admin-managed peer connections with WS tunnel, path allowlist,
hello_ack handshake, SSRF guards, and Chat shadow-agent hydrate so
operators can probe and use remote agents from the local dashboard.

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

* fix: serialize bridge turn chunks and flag remote experts

LangChain HumanMessage objects in peer turn.chunk frames crashed
json.dumps; add a bridge JSON default. Show a 远端/Remote badge on
shadow experts in the picker and sidebar lists.

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

* fix: bridge avatars, named remote badges, and auto-reconnect

Keep bundled / CDN icon URLs for shadow experts and only proxy uploaded
avatars. Show the bridge display name on remote badges. Add a default-on
auto-reconnect switch that backs off on disconnect and disables itself
after repeated failures, recording the reason in last_error.

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

* feat: add card/table views for bridge connections

Match the storage page card layout and add a Segmented toggle so
admins can switch between a card grid and a table of remote links.

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

* fix: render bridge expert icons correctly on the chat page

Encode bridge agent ids in avatar URLs the same way as chat WS paths,
fall back to Lucide when the image fails, size portraits to fill the
sidebar avatar, and refresh AgentContext when icon_url changes.

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

* feat: tunnel peer models and knowledge bases for bridge chat

Allow read-only GET of peer providers/resolved, active-model, and
knowledge-bases (plus capability) through the Bridge tunnel, expose
local bridge connection routes, and point the chat composer at those
sources when talking to a shadow expert. Hide local connectors for
remote sessions. Also allow agent subagents paths on the tunnel.

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

* fix: scope bridge chat expert picker to peer agents

When the active expert is a Bridge shadow, the composer expert picker
and @-mentions only list peers on that connection (not local experts).
Encode bridge agent ids for skills and subagents list/install paths.

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

* fix: hint remote chat pickers to manage settings on the peer

In Bridge sessions, replace local “manage …” footers for models,
skills, knowledge bases, experts, and subagents with a muted
“edit on remote” tip and a toast instead of navigating to local admin.

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

* feat: polish bridge remote UX and tunnel agent status

Allowlist GET …/status so hubs can read real peer harness state (peers need
this build). Keep history-migration hub-local, skip noisy bridge polls in the
UI, move Bridge under Settings, and mark remote experts with cable + name.

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

* feat: tunnel remote expert catalogs and polish bridge connection UX

Hub can edit peer subagents, memory, channels, tools, plugins, and MBTI
through the tunnel; surfaces that cannot hop show an in-drawer hint. Peer
must run this build so the new allowlist takes effect.

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

* feat: group cloud-collab experts and unify header-tunneled composer APIs

Keep the selected remote expert on disconnect, gate peer-only surfaces in the UI, and stop forking composer/task requests through dedicated bridge endpoints.

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

* feat: add search to the Experts toolbar

Filter my experts, teams, and the library from the existing button row so long catalogs stay scannable.

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

* fix: keep inbound cloud-collab cards peer-owned

Inbound links can only edit name/icon/notes; disconnect, delete, and auto-reconnect stay disabled. Peer offline shows as 离线, peer delete removes the card, and the default inbound name is the short connection id.

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

* fix: polish inbound cloud-collab UX and unify 对端 copy

Peer-initiated links can only edit display info and cannot redial;
offline cards may be deleted. Local-only pages hint when a peer
expert is selected.

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

* fix: map peer team speakers onto Bridge shadows

Peer team chats stamped local member ids, so the hub fell back to the host
avatar. Rewrite roster and stream speakers onto bridge:{cid}:{id} shadows,
and keep the local team picker from mixing in peer experts.

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

* fix: stop rewriting team thread ids in the Bridge tunnel

Member job threads are {room}~{agent}. A blanket JSON replace of the peer
agent id turned those into hub shadows, so history 404ed on the peer.

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

* fix: rewrite peer media URLs and keep bridge turn composer fields

Live send_file_to_user frames still pointed at peer-local /api/agents/{id}.
Map every teammate id in tunneled JSON, and copy the full dashboard turn
body so knowledge bases and HITL policy are not dropped on the peer.

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

* fix: rename bridge probe tests to avoid pytest module clash

tests/unit/bridge/test_probe.py collided with tests/unit/mobile/test_probe.py
during collection (same basename).

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

* feat: collapse extra experts on Bridge cards and fill avatars

Show at most four experts on a connection card, with the rest behind
expand. Portraits fill the 40px ring without a tinted background.

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: lulinzhi37-alt <lulinzhi37@gmail.com>

* chore: release 1.0.2b5

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

* chore: bump uv.lock to 1.0.2b5

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

* fix(ollama): sanitize models dir through host path policy

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Dang Zitou <dengzitao888@163.com>
Co-authored-by: Frank Zhang <77115469+Master-Frank@users.noreply.github.com>
Co-authored-by: XiaoChen <1326713348@qq.com>
Co-authored-by: locip123 <116343912+locip123@users.noreply.github.com>
Co-authored-by: lihongyuan99 <64824864+lihongyuan99@users.noreply.github.com>
Co-authored-by: lulinzhi37-alt <lulinzhi37@gmail.com>
2026-09-29 17:47:18 +08:00
232030f46c chore: release 1.0.2b4 (#1226)
* docs: refresh README roadmap, anchors, and product sync (#1211)

Align EN/CN README with shipped features and current install/channel
docs; fix GitHub heading anchors and drop obsolete extras examples.

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

* fix(dashboard): define missing --fn-bg-container theme variable (#1216)

Dark-theme surfaces that use var(--fn-bg-container, #fff) — most
visibly the knowledge-base Markdown preview body, toolbar and outline
panel — resolved to a white background while text stayed light, leaving
preview content invisible. Define the variable as #ffffff (light) and
#141414 (dark), and point the Admin/Users badge tints that borrowed the
name for a translucent fill at --fn-bg-tertiary so their look is
unchanged.

Fixes #1215

* feat(dashboard): let each account customize the sidebar (#1218)

Store group order, item placement, and hidden entries on the user so navigation can be rearranged without showing items the account cannot access.

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

* style(dashboard): apply Prettier to files that drifted from the formatter (#1222)

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

* feat: store role-template id on users.role and harden mobile composer (#1220)

Collapse the dual user_role_id / role model so users.role and invites.role
hold the template public id, block deleting roles still in use, and keep
the chat composer visible under mobile browser visualViewport.

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

* docs: use product names for sibling project links in the README (#1225)

Link labels now match the product names while the repository URLs stay unchanged.

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

* chore: release 1.0.2b4

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Dang Zitou <dengzitao888@163.com>
2026-09-27 22:05:48 +08:00
c8217c1acf docs: refresh README roadmap, anchors, and product sync (#1212)
Align EN/CN README with shipped features and current install/channel
docs; fix GitHub heading anchors and drop obsolete extras examples.

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-27 11:19:13 +08:00
jubaoliangandCursor b03978de36 chore: release 1.0.2b3
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-26 16:36:31 +00:00
jubaoliangandCursor 44023b192f docs: point README at TencentCloud octop-harness repos
The harness-* libraries are now published as octop-harness, octop-gateway,
octop-memory, and octop-browser.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-24 18:23:52 +08:00
jubaoliangandCursor f6acc87e62 chore: release 1.0.2b2
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 15:06:20 +00:00
jubaoliangandCursor d46ba606d1 chore: release 1.0.2b1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 15:05:49 +00:00
薄生 339c78deff Feature/support discord (#972)
* feat(discord): add channel setup and default all-channel access

* build(deps): require harness-gateway 0.9.9 for Discord
2026-09-22 16:42:51 +08:00
薄生 e512f05bf5 Feature/memory slim tool (#865)
* harness agent upgrade for cache polish

* format

* feat(memory): add coordinated memory slim commands and progress UI

* build(deps): require harness-memory 0.9.11

* fix(deps): restore harness-memory 0.9.11 floor after merge

* fix(agents): await async shutdown to drain SQLite workers

Use HarnessAgentManager.aclose() during shutdown so SQLite cleanup
finishes before the event loop closes, preventing background threads
from raising "Event loop is closed".

Add a real SQLite regression test and preserve the existing ordering
that waits for memory slimming to finish before closing agents.

Validation: make all — 3582 passed, 17 skipped.
2026-09-21 15:44:19 +08:00
theater 9bcfe6c0e8 docs(readme): fix broken TOC anchor links (#873)
Remove the leading hyphen from in-page anchor links in README.md and
README_CN.md. The emoji in the headings are stripped by GitHub when
generating anchors, so the actual anchors are #highlights, #overview,
etc., not #-highlights, #-overview, etc.
2026-09-21 10:54:23 +08:00
e02174e358 feat: plugin marketplace and related dashboard polish (#815)
* feat: add in-tree plugin marketplace and related dashboard polish

Ship a catalog install flow (market API + Admin UI), stop auto-seeding new
bundled plugins, and include storage rename, plugin tools listing, agent
lifecycle locking, and history/trajectory path cleanup in the same change.

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

* fix(dashboard): use ToolsTabs in Experts tools drawer

Align the Experts tools catalog with Personalization so builtin, plugin,
and ACP tabs are available in the same drawer.

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

* fix: per-tool chat icons and init seed expectation

Show distinct Lucide icons for common built-in tools in chat tool rows,
and stop expecting octop init to auto-copy catalog plugins after the
marketplace seed change.

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

* fix(test): drain captcha siteverify POST bodies on Windows

Unread form bodies from the mock HTTP server could leave the connection
half-closed and flake reCAPTCHA v3 multi-call assertions under Windows CI.

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 19:35:36 +08:00
jubaoliangandCursor 4fcd40edc0 chore: merge main into release/1.0.1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 16:16:05 +00:00
jubaoliangandCursor f5264e5a29 chore: release 1.0.1
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 16:12:00 +00:00
HUANG Cheng 7d58e8560b fix(build): typecheck-frontend checked nothing under project references (#733)
dashboard/tsconfig.json is a solution-style config (files: [] plus
references), so plain `tsc --noEmit` type-checks zero files and always
passes. Use `tsc -b` so tsconfig.app.json / tsconfig.node.json are
actually checked - the same invocation `npm run build` uses.

Update all documented mentions (Makefile help + target, AGENTS.md,
README, README_CN, docs/agent-backend-file-io.md).
2026-09-17 15:36:32 +08:00
liukewia 4dd29761d8 docs: add Trendshift badge to README files for repository visibility 2026-09-16 19:44:02 +08:00
jubaoliangandCursor 16cd11faf4 chore: release 1.0.0
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 01:43:23 +00:00
jubaoliangandCursor 0b439913fc chore: release 0.9.35
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 17:05:31 +00:00
jubaoliangandCursor cbcf57de91 chore: release 0.9.34
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 15:31:15 +00:00
jubaoliangandCursor 08814ecffa fix(chat): restore history timestamps and align user bubbles
Refresh dropped message times because live projection never copied
checkpoint_ts. Stamp the current turn, fall back to created_at, keep
the user avatar lined up with the text bubble, and move copy/edit
beside the timestamp. README now matches shipped knowledge, plugin,
and PostgreSQL surfaces.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 22:45:23 +08:00
veenyi cf9d700d61 fix(fnos): 安装向导接管管理员密码,根治 Octop123 被弱密码黑名单拒绝导致 FPK 无法启动 (issue #502)
根因:应用密码策略(src/octop/infra/users/password.py)的常见弱密码黑名单包含 octop123,
而 FnOS FPK 把初始密码写死为 Octop123,首次启动 octop init 报 "password is too common"
直接退出("Octop process exited early"),全新安装的 native / docker FPK 均无法启动。

修复内容:
- 安装向导(wizard/install,native + docker)提供两种密码方式:
  ① 自己输入密码:install_init / install_callback 按应用侧策略预校验(≥8 位、
     含字母和数字、不在常见弱密码黑名单),无效密码在安装阶段直接拦截并中文提示;
  ② 自动生成随机密码(推荐):octop_generate_password 生成 16 位强密码。
- 随机/自定义密码双通道送达:
  ① 应用「设置」窗口(wizard/config)顶部直接显示当前账号与密码(安装/改密时
     由回调渲染占位符模板),用户免翻文件;
  ② 数据目录 octop-login.txt 回落备份,永久保留、随改密同步更新。
- 启动器与容器入口三重兜底:.env 无密码时自动生成;init 因密码策略被拒时
  自动改用随机密码重试一次,并回写 .env 保持一致 —— 存量坏 .env(Octop123)
  升级后首次启动即被救活,不再依赖用户手工清理。
- 应用「设置」窗口支持改密:保持不变 / 随机生成 / 自定义(config_init 前置校验),
  本地版走官方 CLI `octop user passwd` 离线改密(停服→改密→启服防写库冲突),
  Docker 版走 `docker exec octop octop user passwd`;凭据三处同步(.env /
  octop-login.txt / 设置窗口显示)。
- 官方 CLI 管理保障:安装回调注册 octop / octop-cli 到 PATH 并做 `octop version`
  冒烟验证(结果写入安装日志)。
- docker/docker-entrypoint.sh:未设置 OCTOP_DEFAULT_PASSWORD 时自动生成随机密码,
  指定密码被策略拒绝时自动回退随机;credential.txt 增加访问地址行。
- compose / .env.example / README / user-guide 移除 Octop123 默认值与宣传文案。

本地验证:19 个 shell 脚本 bash -n 全过;7 个向导 JSON 全部合法;密码生成 300/300
通过字符集/长度/首字母/末位数字断言;octop_validate_password 与官方
validate_password_policy 对拍 19/19 一致、黑名单 14 项逐字一致;渲染链端到端模拟
(生成→校验→回落保存→设置窗口渲染→JSON 复检)通过。
2026-09-12 08:15:24 +08:00
jubaoliang 81dd75f6b7 Merge branch 'main' into release/0.9.33 2026-09-11 10:46:08 +08:00
jubaoliangandCursor fb76f44a47 chore: release 0.9.33
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 02:36:35 +00:00
Panda 7d74234591 Revert "feat(mcp): add connector self-management server (#619)"
This reverts commit 960c11daa8.
2026-09-10 10:48:08 +08:00
Panda 960c11daa8 feat(mcp): add connector self-management server (#619) 2026-09-09 20:55:01 +08:00
liukewia a3b70676d0 docs: add contributors section to README files 2026-09-08 20:11:18 +08:00
jubaoliangandCursor 1c23cc86ec chore: release 0.9.32
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-06 03:56:36 +00:00
jubaoliang d9a0e5fad3 chore: misc unrelated fixes 2026-09-06 10:30:40 +08:00
liukewia 01499517e7 docs: 更新默认管理员凭据说明 2026-09-03 10:22:05 +08:00
liukewia 903a958809 Update README files to reflect changes in initial admin credentials and password handling. The default password is no longer hardcoded; first-run credentials are now written to ~/octop-login.txt. Updated password policy to clarify requirements and options for setting a custom initial password using OCTOP_DEFAULT_PASSWORD. 2026-09-02 19:10:44 +08:00