WeKnora/internal/database
lyingbug eecfe4b3c8
feat(automation): scheduled agent runs with in-app notifications (#4492)
* feat(automation): scheduled agent runs with in-app notifications

Automations let a user have an agent run a task on a schedule as them.
The scheduler is database driven: every instance claims due rows with a
version CAS, so Lite and multi-instance deployments share one path.
Runs execute in deferred mode, suspend on approvals and notify the
owner; an answered prompt resumes the run from its snapshot. Standing
grants are promoted from approvals past runs asked for, bound to the
agent configuration and the owner's role.

Adds the automation, run and notification APIs, the automation.*
assistant operations, and regenerates the Swagger document.

* feat(frontend): automations page and notification bell

Adds an Automations page to the sidebar: a list with schedule, agent,
next run and last status; an editor with schedule presets, a custom
cron field, timezone and a live preview of the next runs; and a detail
drawer with run history, links into each run's conversation and the
standing approvals the owner can grant from past approval requests.

The top-right bell now merges pending invitations with in-app
notifications and polls for new ones.

* fix(automation): let the assistant schedule tasks and match the settings UI

The assistant never searched for automation operations, one-time times failed unless they were RFC3339, and the create, detail, and notification surfaces did not match the rest of the app.
2026-10-20 00:11:36 +08:00
..
im_transport_migration_test.go fix: align client sessions and integration request handling (#3305) 2026-09-16 16:20:57 +08:00
migration.go feat(system-info): surface DB migration errors with troubleshooting links 2026-05-14 16:34:50 +08:00
migration_feishu_resync_test.go feat(datasource): deep-adapt Feishu/Lark sync with folder mirror, block parsing and embedded objects (#3497) 2026-10-16 16:49:44 +08:00
migration_postgres_agent_allowed_tools_test.go fix(agent): make agent tool selection match the tools the runtime registers (#4211) 2026-10-13 11:29:24 +08:00
migration_postgres_mcp_oauth_test.go fix(mcp): keep OAuth token expiry independent of the process time zone (#4207) 2026-10-13 16:56:51 +08:00
migration_postgres_test.go fix(deploy): bump paradedb image to v0.25.11-pg17 (#4120) 2026-10-12 11:50:11 +08:00
migration_sqlite_agent_allowed_tools_test.go feat(agent): persist human-in-the-loop prompts with a shared broker (#4250) 2026-10-14 20:37:28 +08:00
migration_sqlite_mcp_metadata_test.go fix(sqlite): add MCP metadata migration 2026-10-10 20:47:20 +08:00
migration_sqlite_message_artifacts_test.go feat(artifacts): artifacts library page backed by a message_artifacts table (#3384) 2026-09-18 12:10:19 +08:00
migration_sqlite_test.go fix(knowledge): address auto-tag review findings 2026-08-07 15:01:01 +08:00
migration_sqlite_versioned_schema_test.go feat(automation): scheduled agent runs with in-app notifications (#4492) 2026-10-20 00:11:36 +08:00
migration_versions_test.go fix(migrations): renumber the context checkpoint migration to 000105 2026-09-18 21:26:26 +08:00