Configuration
resmon persists reusable search parameters as named rows in the configurations table and treats them as the primary unit of reproducibility for Deep Dive, Deep Sweep, and Routine runs. A configuration is a saved bundle of parameters — repository (or repository set), keywords, per-repository result cap, AI toggle and AI settings, email toggles, storage settings, and (for routines) schedule and execution-location fields. Date ranges are deliberately not persisted; they are chosen fresh per run or per routine fire so a saved configuration always produces a time-current window.
Configuration Types
Every row carries a config_type constrained by a CHECK constraint to one of three values:
config_type | Produced by | Consumed by | Purpose |
|---|---|---|---|
manual_dive | Deep Dive page’s Save Configuration action | Deep Dive page’s ConfigLoader | Reusable single-repository query preset. |
manual_sweep | Deep Sweep page’s Save Configuration action | Deep Sweep page’s ConfigLoader | Reusable multi-repository query preset. |
routine | Routines page’s create/edit modal | Routines page (restores everything except the date range) and the Calendar popover | Scheduled Automated Deep Sweep bound to a cron expression. |
Rows are keyed by an auto-increment integer id; names are not uniquely constrained, so multiple configurations with the same name are permitted. The Configurations page at #/configurations opens on the Routine Configs tab by default and exposes a Manual Configs tab that shows manual_dive and manual_sweep entries together.
JSON Shape
The parameters column stores a JSON document whose shape matches the search page that produced it. Representative (non-exhaustive) field sets:
manual_dive—repository(single slug),keywords,max_results,ai_enabled, optionalai_overrides(length,tone,model).manual_sweep—repositories(array of slugs),keywords,max_results_per_repo,ai_enabled, optionalai_overrides.routine— everymanual_sweepfield pluscron_expression,email_enabled,results_in_email,notify_on_completion, and alinked_routine_idpointing at the row in theroutinestable that APScheduler registers a job under.
Deleting a configuration whose config_type is routine cascades to the linked routine row when the stored parameters contain a valid linked_routine_id pointing at an existing routine; the delete-confirmation dialog surfaces the cascade count before the user confirms.
Export and Import Workflow
The Configurations page moves presets between machines as a single archive:
- Select one or more rows via the per-row checkboxes or the select-all header checkbox.
- Click Export Selected — the frontend sends
POST /api/configurations/exportwith{ ids: [...] }; the backend writes a ZIP archive of individual JSON files throughconfig_manager.export_configsand returns{ "path": "<absolute path>" }. - The success banner shows the archive path for 10 seconds; on desktop a Reveal in Finder (macOS) / Reveal in File Explorer button is rendered when the Electron preload has exposed
window.resmonAPI.revealPath. - On the receiving machine, click Import and pick the exported
.zipthrough the native file picker — or the.jsonfiles from inside one, if you unpacked it. Several files can be chosen at once, and the picker accepts both shapes. A file whose name ends in neither extension is refused before anything is sent, with a message naming what Import does take. The chosen files are POSTed asmultipart/form-datato/api/configurations/import, andconfig_manager.import_configsdecides what each one is from its content rather than its name: a ZIP is read for its.jsonmembers, and anything else is parsed as a single configuration. Each configuration is validated and inserted as a new row. The response carries{ "imported": <n>, "routines_created": <n>, "errors": [...] }, whereerrorsnames any file or archive member that could not be used — a bad entry reports itself and the rest of the batch still imports. - Click Delete Selected to open the confirmation dialog (which counts how many of the selected rows are routines so the cascade impact is visible). Confirming issues one
DELETE /api/configurations/{id}per selected row; per-row failures are swallowed so the batch proceeds.
Imports are always additive: a new row is inserted with a fresh integer id. Nothing is overwritten, so round-tripping is safe to repeat — but a configuration whose name is already in use lands as a second row under that name, rather than being renamed or replacing the first.