feat(workflows): add revision history, trash, UUID naming, and backup

- Store up to 50 revisions per workflow in SQLite with normalized SHA dedup
- Soft-delete workflows to trash (7-day retention) with restore and permanent purge
- Assign UUID filenames for new and duplicated workflows; show name + file in UI
- Warn on invalid YAML, unknown scripts, and plaintext secrets with save-anyway option
- Add workflow backup zip (workflows + plugins) and merge/replace restore
- Trash page, history panel on editor, and smoke test

Co-authored-by: Nasyarobby Putra <nasyarobby@gmail.com>
This commit is contained in:
Cursor Agent
2026-08-20 02:14:50 +00:00
co-authored by nsrb
parent 611511ae60
commit 7d51ff433f
20 changed files with 1943 additions and 206 deletions
+9 -5
View File
@@ -28,11 +28,7 @@ import {
createWorkflowWorker,
getRedisUrlForLog,
} from "./workflow-queue.js";
import {
getConfigGeneration,
startHeartbeatLoop,
subscribeReload,
} from "./control-bus.js";
import { purgeExpiredTrash } from "./workflow-trash.js";
/**
* @param {{
@@ -48,6 +44,14 @@ export async function startApp(opts = {}) {
if (shouldMigrate) {
await migrate();
try {
const purged = await purgeExpiredTrash();
if (purged > 0) {
log.info({ purged }, "purged expired workflow trash");
}
} catch (err) {
log.warn({ err }, "workflow trash purge failed");
}
}
enableLogPersistence();