Cloud-collab shadows follow the peer runtime state and only expose start/stop for the peer owner. Chat @ mentions list files once through the workspace backend, interval cron edits no longer reset the next run, and output-schema MCP failures stay on the tool result.
Scheduled jobs can run once and then stop, personalization tabs can be granted separately, and rotated logs use a date-before-extension name.
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(chat): show peer expert composer defaults and theme the beta badge
Cloud collab shadow experts dropped the peer's model, connectors, knowledge
bases, and conversation mode, so the local composer could not show them.
The sidebar Beta chip also stayed a fixed red instead of the theme color.
* fix: name experts in usage stats and title cron sessions
Admin usage grouped other users' experts by id because the page only knew
the signed-in account's agents. Scheduled runs also left the thread untitled
until the next user message when the push failed or never ran.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
`fresh_thread` deliveries reset the session to a brand-new thread before the
run, but the history projection only happened after the response passed the
"visible reply" checks. A run that raised — a failing tool call, a HITL
request, an empty reply — therefore left that thread with zero rows, so
opening the conversation after 立即执行 showed a blank chat.
Project in a finally, the same way the interactive processor persists an
incomplete turn, so the prompt and whatever the model streamed before the
failure are recorded. Push and toast stay unchanged: nothing is delivered
until there is a visible reply.
Co-authored-by: sxh313 <sxh313@users.noreply.github.com>
* fix(cron,hitl): date triggers use server timezone; expire HITL on resume error
Naive date: ISO times now honor default_timezone like cron:. Dashboard
HITL resume stream failures mark the pending record expired instead of
approved, so reinject safety no longer mislabels a failed resume.
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: drop unrelated uv.lock change from polish branch
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
An interval of 0 or a negative value produces fire times that stay at or
before the current instant, so APScheduler runs the job back-to-back
without waiting: in a local check, interval:-5 spun the event loop until
the process was killed. build_trigger already rejects invalid weekdays in
cron expressions; non-positive intervals are now rejected the same way,
and create()/update() surface the OctopError to the caller.
Admins can set storage-root and token quota when creating a user, and
cronjob_create now requires a display name with prompt-prefix fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow experts and skill packages to carry composer defaults so that
installed/created agents start with the author's chosen knowledge bases
and MCP servers. Defaults are persisted as agent profile columns and
validated against the installing user. Adds the per-user policy resource
table (migration 014) and wires the dashboard composer fields plus
locale strings.
- Add knowledge_base_ids and mcp_servers to the agent profile schema
- Validate KB/MCP ids on expert/skill-package install and create paths
- Persist defaults via migrate.py helper and 014_user_policy migration
- Surface composer default fields in the dashboard expert/skill UI
- Eliminated the `parseThreadActivityFrame` function and its associated type, streamlining the dashboard push toast logic.
- Removed related tests that were verifying thread activity frame parsing, as this functionality is no longer needed.
- Updated the `useDashboardPushToast` hook to focus solely on dashboard push events, enhancing clarity and maintainability.
This refactor simplifies the codebase by removing unused functionality, improving the overall structure of the dashboard event handling.
- Introduced a new session event type "sessionsChanged" to handle proactive updates from the server, allowing the dashboard to refresh session lists and histories without a full page reload.
- Implemented functions to mark session histories as stale and trigger refetching when updates occur, improving data consistency.
- Added tests to verify the correct behavior of the new session event handling and history invalidation logic.
This update enhances the responsiveness of the chat interface by ensuring that users see the most current session information in real-time.
Move cron delivery out of Gateway so dashboard text jobs write canonical history, AI jobs notify consistently, and inbound turns stay serialized with the published harness APIs.
* feat(cron): add name field to cron jobs and update related interfaces
- Introduced a `name` field to the `OctopCronRow`, `OctopCronCreateBody`, and `OctopCronPatchBody` interfaces.
- Updated localization files to include validation messages for the new `name` field.
- Added a constant for maximum name length.
- Enhanced the UI to display the job name in the cron jobs table and detail views.
- Updated API documentation to reflect the new optional `name` parameter in cron job creation and updates.
- Implemented database schema changes to support the new `name` field in cron jobs.
This change improves the user experience by allowing users to assign descriptive names to their cron jobs, making them easier to identify.
* feat(cron): restrict cron job management to owners only
- Updated the cron job management logic to ensure that only the owner of a cron job can create, view, update, or delete it.
- Modified the API endpoints to return empty lists for non-owners attempting to access cron jobs.
- Enhanced the frontend logic to reflect these changes, ensuring a consistent user experience across the application.
- Updated related tests to verify that cron jobs are correctly scoped to their owners, preventing unauthorized access.
This change improves security and clarity in the management of cron jobs within shared agents.
* refactor(cron): improve code readability in cron management functions
- Reformatted the `_assert_cron_manage` function for better readability by adjusting the parameter layout.
- Simplified the invocation of the `create` function in the test case for clarity.
These changes enhance the maintainability of the code and improve the overall structure of the cron management logic.
* feat: Docker sandbox, workspace_dir, default_open, HITL and runtime knobs
WIP against local editable orcakit-harness-agent 0.9.20 (PyPI not published yet).
Includes Admin Docker storage, agent workspace_dir, connector default_open,
chat HITL resume/todos UI, and runtime limit fields.
* feat: browser HITL stream listen, gateway preempt stop/cancel
Wire the browser streaming endpoint to listen for human-in-the-loop
events, add gateway-side preemption (stop/cancel) for running agents,
and integrate chat send with the browser session state.
- Add browser stream "listen" endpoint and harness HITL wiring
- Add gateway preemption: stop/cancel handling for running agents
- Wire chat send to browser session state in the dashboard
- Bump harness-gateway to >=0.9.2 and regenerate uv.lock
- Add unit tests for browser stream listen and gateway preemption
* test: fix workspace_dir assertion on Windows
Compare path components (name == agent_id, parent == "agents") instead
of a hard-coded POSIX "/agents/{id}" string suffix, so the check passes
on Windows where Path uses backslash separators.
---------
Co-authored-by: jubaoliang <jubaoliang@tencent.com>
* fix: Update schema when restoring octop/lightclaw backups
* feat: enhance error logging for OctopError in exception handlers
* feat: enhance backup restore process to include IM channel reloading
* feat: extend backup restore functionality to include cron job reloading
* feat: add JWT secret capture and restore functionality during backup processes
* fix: update Chinese translation for presetProviders term in zh.json
* feat: implement Unix crontab semantics for weekday handling in cron triggers
Added functionality to translate numeric Unix weekdays to names and updated the cron trigger builder to support Unix-style expressions. Enhanced unit tests to validate the new behavior for various weekday formats and ranges.
* feat: enhance backup restore functionality with ownership remapping
- Updated `restore_backup_file` to accept a `user` parameter for identifying the restoring admin.
- Added `owner_user_id` option in CLI for specifying ownership during LightClaw migration archives.
- Implemented user ownership remapping in the database during system backup restoration.
- Enhanced user handling in backup processes to ensure proper ownership assignment and data integrity.
- Updated tests to validate new ownership remapping behavior during migration restores.
* refactor: streamline SQL query formatting in backup test case
- Simplified the SQL query execution in the `_make_migration_backup` function by removing unnecessary line breaks for improved readability.
* feat: add global skill packages with local ZIP import and personalization layout
Introduce instance-level skill packages (DB + disk), mount them on agents, and
support SkillHub/URL/ZIP import. Merge related schema into migration v2 and
cover the zip import path with frontend and API tests.
* fix: hot-sync skill package mounts and dark-mode package cards
Avoid full agent rebuild when mounting packages so Experts UI no longer
hits AGENT_NOT_FOUND; accept workspace-scoped local backends on Windows;
use theme token for package list card background.
* 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.