merlyn/server/prisma/migrations
Marcello Fitton 41495cdabe
feat: Scheduled Jobs (#5322)
* initialize

* expand tool result text limit | add syntax highlighting and json formatting to tool result rendering

* fix onError jsdoc

* lint

* fix unread icon

* route protection

* improve form handling for NewJobModal

* safeJsonParse

* remove unneeded comments

* remove trycatch

* add truncateText helper

* add explicit fallback value tos safeJsonParse

* add shared cron constant and helpers

* reduce frontend indirection

* use isLight to compute syntax highlighting theme

* remove dead code

* remove forJob and make job limit to 50

* create recomputeNextRunAt helper method

* add comment about nextRunAt recomputation

* add job queue and concurrency control to scheduled jobs

* use p-queue

* change default max concurrent value to 1

* add comment explaining internal scheduling system

* add recomputeNextRunAt on boot

* add generated documents to run details

* Modify toolsOverride functionality where no tools selected means no tools are given to the agent

add a select all/deselect all toggle button for easily selecting all
tools in the cerate job form

* create usePolling hook

* add polling to scheduled jobs and scheduled job runs pages

* add cron generation feature in job form

* remove cron generation feature | add cron builder feature | add max active scheduled jobs limit

* set MAX_ACTIVE to null

* replace hour and minute input fields with input with type time

* simplify

* organize components

* move components to bottom of page component

* change Generated Documents to Generated Files

* add i18n to cronstrue

* add i18n

* add type="button" to button elements

* refactor fileSource retrieval logic

* one scheduled job run can have status "running"

* add protection of file retrieveal from scheduled job in multiuser mode

* fix comments

* make job status default to queued

* add queued status

* fix bug with result trace rendering

* store timeout ref and clearTimeout once race settles

* remove unneeded handlerPromise tracking

* move imports to top level

* refactor hardcoded paths to path resolve functions

* implement new job form design

* simplify

* fix button styles

* fix runJob bug

* implement styles for scheduled jobs page

* apply dark mode figma styles

* delete unused translation key

* implement light mode for new new job modal, run history, and run details

* lint

* fix light mode scroll bar in tool call card

* adjust table header contrast

* fix type in subtitle

* kill workers when job is in-flight before deleting job

* add border-none to buttons

* change locale time to iso string

* import BackgroundService module level | instatiate backgroundService singltone once and reuse across handlers

* add p-queue, @breejs/later and cron-validate as core deps

* parse cron expression to a builder state once

* add theme to day buttons in cron builder

* fix stale tools selection caption

* flip popover when popover clips screen height

* make ScheduleJob.trigger() await the run insertion | disable run now button if job is in flight

* regen table

* refactor generated file card

* refactor frontend

* remove logs

* major refactor for tool picking, fix bree/later bug

* combine action endpoints, move contine to method

* fix unoptimized query with include + take + order

* fix dangerous use, refactor job to utils

* add copy content to text response

* improve notification system subscription for browser

* remove unused translations

* prevent gen-file cleanup job from deleting active job file generated references

* rich text copy

* Scheduled Jobs: Translations (#5482)

* add locales for scheduled jobs

* i18n

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* add config flag with UI notice

* update README

* telemetry datapoints

* Always use UTC on backend, convert to local in frontend

* fix tz render

* Add job killing

* cleanup thinking text in job notifications and break out reasoning in response text.
Also hide zero metrics since that is useless

* Port generatedFile schema to the normalized workspace chat `outputs` file format so porting to thread is simple and implem between chats <> jobs is 1:1

* what the fuck

* compiled bug

* fixed thinking oddity in complied frontend

* supress multi-toast

* fix duration call

* Revert "fix duration call"

This reverts commit 0491bc71f4223e65ea4046561b15b268fefb8da2.

* revert and reapply fix

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:05:46 -07:00
..
20230921191814_init Replace custom sqlite dbms with prisma (#239) 2023-09-28 14:00:03 -07:00
20231101001441_init 315 show citations based on relevancy score (#316) 2023-11-06 16:49:29 -08:00
20231101195421_init Infinite prompt input and compression implementation (#332) 2023-11-06 13:13:53 -08:00
20231129012019_add Add user PFP support and context to logo (#408) 2023-12-07 14:11:51 -08:00
20240113013409_init Per workspace model selection (#582) 2024-01-17 12:59:25 -08:00
20240118201333_init create configurable topN per workspace (#616) 2024-01-18 12:34:20 -08:00
20240202002020_init [FEAT] Embedded AnythingLLM (#656) 2024-02-05 14:21:34 -08:00
20240206181106_init [FEAT] create custom prompt suggestions per workspace (#664) 2024-02-06 11:24:33 -08:00
20240206211916_init [FEAT] Automated audit logging (#667) 2024-02-06 15:21:40 -08:00
20240208224848_init Implement workspace threading that is backwards compatible (#699) 2024-02-08 18:37:22 -08:00
20240210004405_init [FEAT] RLHF on response messages (#708) 2024-02-13 11:33:05 -08:00
20240216214639_init Breakout Chat/Query mode as a workspace setting (#734) 2024-02-16 14:50:40 -08:00
20240219211018_init Enable ability to do full-text query on documents (#758) 2024-02-21 13:15:45 -08:00
20240301002308_init [FEAT] Ability to set workspace profile image (#847) 2024-03-12 11:36:59 -07:00
20240326231053_init Add ability to add invitee to workspaces automatically (#975) 2024-03-26 16:38:32 -07:00
20240405015034_init Enable per-workspace provider/model combination (#1042) 2024-04-05 10:58:36 -07:00
20240412183346_init Agent support for @agent default agent inside workspace chat (#1093) 2024-04-16 10:50:10 -07:00
20240425004220_init [FEAT] Implement new login screen UI & multi-user password reset (#1074) 2024-04-25 16:52:30 -07:00
20240430230707_init Customize refusal response for query mode (#1243) 2024-04-30 16:14:30 -07:00
20240510032311_init [FEAT] Slash templates (#1314) 2024-05-10 12:35:33 -07:00
20240618224346_init [BETA] Live document sync (#1719) 2024-06-21 13:38:50 -07:00
20240821215625_init Api session id support (#2158) 2024-08-21 15:25:47 -07:00
20240824005054_init AnythingLLM Chrome Extension (#2066) 2024-08-27 14:58:47 -07:00
20241003192954_init Daily message limit per user (#2417) 2024-10-15 14:01:29 -07:00
20241029203722_init Simple SSO feature for login flows from external services (#2553) 2024-10-29 15:30:53 -07:00
20241029233509_init Add index leftover from prisma migration from PR #2553 2024-10-29 16:35:56 -07:00
20250102204948_init Reranker option for RAG (#2929) 2025-01-02 14:27:52 -08:00
20250226005538_init Add bio field to user (#3346) 2025-02-26 15:23:24 -08:00
20250318154720_init Prompt variables (#3359) 2025-03-25 12:44:19 -07:00
20250506214129_init Chat prompt history menu (#3770) 2025-05-08 08:29:46 -07:00
20250709230835_init Configurable message limit for embed chat widget (#4114) 2025-07-10 12:45:53 -07:00
20250725194841_init Mobile sync support (#4173) 2025-07-31 12:28:03 -07:00
20250808171557_init Workspace Chat with documents overhaul (#4261) 2025-08-11 09:26:19 -07:00
20260130040204_init Web push notifications (#4942) 2026-02-02 10:56:58 -08:00
20260313192859_init Remove WelcomeMessages from app - no longer used (#5206) 2026-03-13 12:55:59 -07:00
20260319202916_init Telegram bot connector (#5190) 2026-03-23 15:10:21 -07:00
20260406120000_init feat: adds name field to api keys (#5366) 2026-04-10 10:40:14 -07:00
20260423191158_init feat: Scheduled Jobs (#5322) 2026-04-29 12:05:46 -07:00
migration_lock.toml Replace custom sqlite dbms with prisma (#239) 2023-09-28 14:00:03 -07:00