- Daily backups (database + config) into <data_dir>/backups, keep N, optional upload to any S3-compatible bucket (SigV4, bucket pruning); settings panel with run-now, list and download - Daily cost summary push at 20:00 (opt-in per user, preview button) - Automations from templates (dependency check, security review, test health, daily summary, TODO report, docs freshness) via POST /jobs/create - browser tool: headless Chromium over CDP – click, type, keys, waits, JavaScript, navigation, screenshots, console errors; requests to private network addresses are blocked (sub-resources and redirects included) - Secrets masked in the config view: S3 secret key, metrics token - Replace the remaining text arrows/refresh glyphs with SVG icons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
84 lines
4.2 KiB
TypeScript
84 lines
4.2 KiB
TypeScript
/** Ready-made automations (prompts in English: they are read by the agent). */
|
||
export interface JobTemplate {
|
||
id: string;
|
||
icon: string;
|
||
name: { en: string; de: string };
|
||
desc: { en: string; de: string };
|
||
schedule: string;
|
||
agent: "build" | "plan";
|
||
prompt: string;
|
||
}
|
||
|
||
export const JOB_TEMPLATES: JobTemplate[] = [
|
||
{
|
||
id: "deps",
|
||
icon: "refresh",
|
||
name: { en: "Dependency check", de: "Abhängigkeiten prüfen" },
|
||
desc: { en: "Weekly: outdated packages and security advisories", de: "Wöchentlich: veraltete Pakete und Sicherheitsmeldungen" },
|
||
schedule: "0 7 * * 1",
|
||
agent: "build",
|
||
prompt:
|
||
"Check this project's dependencies (all package manifests you find). List outdated packages with current and latest version, and any known security advisories (use the package manager's audit command if there is one). Do not change any files. End with a short, prioritised report: what should be updated first and why.",
|
||
},
|
||
{
|
||
id: "security",
|
||
icon: "shield",
|
||
name: { en: "Security review of recent changes", de: "Sicherheits-Review der letzten Änderungen" },
|
||
desc: { en: "Nightly: reviews the commits of the last 24 hours", de: "Nachts: prüft die Commits der letzten 24 Stunden" },
|
||
schedule: "0 3 * * *",
|
||
agent: "plan",
|
||
prompt:
|
||
"Review the git commits of the last 24 hours (git log --since=\"24 hours ago\" -p) for security problems: injection, missing authorisation checks, secrets in code, unsafe deserialisation, path traversal, weak crypto. If there were no commits, say so and stop. Report each finding with file, line, severity and a suggested fix.",
|
||
},
|
||
{
|
||
id: "tests",
|
||
icon: "check",
|
||
name: { en: "Test suite health", de: "Testsuite-Zustand" },
|
||
desc: { en: "Daily: runs the tests and analyses failures", de: "Täglich: führt die Tests aus und analysiert Fehler" },
|
||
schedule: "0 6 * * *",
|
||
agent: "build",
|
||
prompt:
|
||
"Run the project's test suite. If everything passes, report the number of tests and the duration. If tests fail, find the cause of each failure (read the code, check recent commits) but do not change any files. Report failing tests, the likely cause and a proposed fix. Mention flaky tests if a re-run behaves differently.",
|
||
},
|
||
{
|
||
id: "standup",
|
||
icon: "scroll",
|
||
name: { en: "Daily summary", de: "Tageszusammenfassung" },
|
||
desc: { en: "Weekday mornings: what changed yesterday", de: "Werktags morgens: was sich gestern geändert hat" },
|
||
schedule: "0 8 * * 1-5",
|
||
agent: "plan",
|
||
prompt:
|
||
"Summarise what happened in this project since the previous working day: commits (grouped by topic), changed areas of the code, open branches. Point out anything that looks unfinished or risky. Keep it short – a stand-up style summary.",
|
||
},
|
||
{
|
||
id: "todos",
|
||
icon: "file-text",
|
||
name: { en: "TODO/FIXME report", de: "TODO/FIXME-Bericht" },
|
||
desc: { en: "Fridays: collects open TODOs and FIXMEs", de: "Freitags: sammelt offene TODOs und FIXMEs" },
|
||
schedule: "0 16 * * 5",
|
||
agent: "plan",
|
||
prompt:
|
||
"Find all TODO, FIXME, HACK and XXX comments in the project (skip dependencies and generated files). Group them by area, mark the ones that look urgent and the ones that are probably already done. Do not change files.",
|
||
},
|
||
{
|
||
id: "docs",
|
||
icon: "file-doc",
|
||
name: { en: "Documentation freshness", de: "Doku-Aktualität" },
|
||
desc: { en: "Monthly: README and docs against the code", de: "Monatlich: README und Doku gegen den Code" },
|
||
schedule: "0 9 1 * *",
|
||
agent: "plan",
|
||
prompt:
|
||
"Compare the README and other documentation with the current code: commands, configuration options, APIs and examples that are outdated, missing or wrong. Do not change files. Report concrete corrections.",
|
||
},
|
||
];
|
||
|
||
/** Quick schedule choices for the dialog. */
|
||
export const SCHEDULES: { cron: string; en: string; de: string }[] = [
|
||
{ cron: "0 3 * * *", en: "daily 03:00", de: "täglich 03:00" },
|
||
{ cron: "0 8 * * 1-5", en: "weekdays 08:00", de: "werktags 08:00" },
|
||
{ cron: "0 7 * * 1", en: "Mondays 07:00", de: "montags 07:00" },
|
||
{ cron: "0 16 * * 5", en: "Fridays 16:00", de: "freitags 16:00" },
|
||
{ cron: "0 9 1 * *", en: "monthly on the 1st", de: "monatlich am 1." },
|
||
{ cron: "0 * * * *", en: "hourly", de: "stündlich" },
|
||
];
|