9 Commits
Author SHA1 Message Date
风月 e8c7ae2098 fix(docker): skip octop init on restart for external database backends (#1866)
The entrypoint guard only looked for ~/.octop/octop.db, which PostgreSQL
(and other external) backends never create in the data volume, so every
container restart re-ran `octop init`. The unconditional admin INSERT
then aborted the container with UniqueViolation on users_username_key.

- docker/docker-entrypoint.sh: write a backend-agnostic marker
  (~/.octop/.initialized) after a successful `octop init`; skip the
  bootstrap block on restarts when the marker or octop.db exists. When
  init reports the admin already exists (upgrade of a pre-marker
  deployment), keep the existing credential card instead of writing a
  password that was never applied; also mention external DBs in the
  generic init-failure hint.
- src/octop/cli/commands/init.py: make the admin bootstrap idempotent —
  when the username already exists, skip creation with an explicit
  message (the entrypoint greps for it) instead of hitting
  UNIQUE(username).

Tests: entrypoint tests run the real script with a stub `octop` on PATH
(first boot + restart for an external backend, sqlite regression guard,
credential preservation, failed-init retry); a CLI test covers rerunning
`octop init` when the DB lives outside ~/.octop.

Fixes #1866

Signed-off-by: fengyue-xve <1759519137@qq.com>
2026-10-10 16:05:56 +08:00
709f9986d2 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>
2026-10-03 20:45:03 +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
99a9b560cc feat: backup/restore UX, chat tool dock, SSO presets, and friendly provider errors (#465)
* feat: harden backup/restore UX, chat tool dock, SSO presets, and friendly provider errors

Make backup ops resumable across refresh, dock plugin tool UIs beside chat, polish admin SSO setup, fix mobile table scrolling, and map balance/auth probe failures to localized guidance.

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

* test: accept locale kwarg in provider probe endpoint mock

Align integration fake_probe with probe_provider_row locale parameter added for localized error messages.

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

* fix(cli): close init DB pool and isolate OCTOP_HOME in init tests

Release SQLite before --force rmtree so repeated in-process init (CliRunner) cannot flake, and pin OCTOP_HOME plus clear leaked OCTOP_DATABASE_* in init CLI tests.

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

---------

Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 10:39:49 +08:00
jubaoliangandCursor 8b2f1ecdd7 feat: 内置插件随包分发、可配置上传上限,并补齐 Dashboard 推送与聊天音视频
把 bundled 插件打进 wheel 并在启动时按需种植;上传大小走 config/env;聊天支持音视频预览,定时任务通过 WS toast 推到 Dashboard。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 14:06:02 +08:00
jubaoliangandCursor b5d46ebfbf feat: enforce password policy and polish account/subagent UX
Require stronger passwords end-to-end (setup, Docker bootstrap, change-password), split password settings into a dedicated panel, and replace subagent file editing with a create/edit drawer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 14:03:47 +08:00
薄生 dca16ccc21 Feat/postgresql dual backend (#60)
* feat: PostgreSQL dual-backend for control plane

Add SqlitePool|PostgresPool behind DatabasePool, parallel PG migrations,
setup wizard defer/bind, pg_dump backups with cross-engine refusal, and
memory defaulting to the control-plane DSN when using PostgreSQL.

* fix(chat): delete checkpoint data when a conversation thread is deleted

Deleting a thread only removed Octop's own metadata row; the actual
message history stayed in the agent's LangGraph checkpointer forever,
making "delete conversation" cosmetic. Also confirm before deleting a
session in the UI, since the action is now genuinely destructive.

Checkpoint deletion runs before the metadata row is removed: if it
fails outright (not just "nothing to delete"), the thread stays
visible/retryable instead of orphaning data with no remaining handle.

* fix(memory): stop suggesting pg_dump for portable export of postgres memory

The 501 hint told users to "use pg_dump on the memory schema instead".
That advice predates the shared-table layout: memory for ALL agents now
lives in one harness_memory schema isolated by a namespace column, so a
schema-level pg_dump would export every agent's memory, not just the
requester's — a cross-agent data exposure if followed on a multi-user
install.

Document the two migration models where the refusal is implemented:
sqlite memory is per-agent files moved via pack/adopt; postgres memory
is shared, and the supported way to use it from another host (e.g.
OpenClaw's harness-memory bridge with --backend postgres) is pointing
that host at the same DSN and namespace — shared, not migrated.

* fix(test): update test_slash_compact to renamed SqlitePool

The /compact test module still imported the pre-rename DBPool, which
broke collection (ImportError) on this branch after develop's compact
feature was merged in — DBPool was renamed to SqlitePool (the concrete
class) with DatabasePool now the Protocol.

DBPool -> SqlitePool at all three sites: the import, the _agent_manager
type hint, and the fixture's DBPool(path) instantiation. SqlitePool is
the byte-for-byte successor of DBPool and matches how every other test
constructs a pool; DatabasePool cannot be used at the instantiation
site (a Protocol is not instantiable).

pytest -m live now collects cleanly (31 selected, 0 errors);
test_slash_compact 3 tests pass.

* fix(test): make memory_backend db_path assertion separator-agnostic

test_explicit_sqlite_overrides_postgresql_control_plane compared the
resolved db_path against the literal "/tmp/ws/memory.sqlite", which the
code never produces on Windows: it builds the path with pathlib, so the
Windows CI job got "\tmp\ws\memory.sqlite" and the string equality failed.

Compare as Path objects so the assertion holds on every OS separator,
matching the .as_posix() discipline already used in test_config.py.
2026-07-24 14:45:53 +08:00
jubaoliangandCursor 29c8a67215 Fix Windows CI failures for media paths and POSIX-only tests.
Normalize backslashes in extract_workspace_rel, allow Windows paths in
channel subprocess args, and catch PermissionError when importing external
files; skip or adjust POSIX-specific tests and hardcoded /tmp paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 08:08:16 +00:00
jubaoliang 748d998cf2 first commit 2026-07-09 14:32:36 +00:00