@antelopejs/dms-automation 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -111
- package/dist/data/runs-table.js +5 -0
- package/dist/data/runs-table.js.map +1 -1
- package/dist/db/models/automation_template.model.d.ts +1 -0
- package/dist/db/models/procedure.model.d.ts +1 -0
- package/dist/db/models/procedure_run.model.d.ts +1 -0
- package/dist/db/models/type_switch.model.d.ts +1 -0
- package/dist/db/tables/procedure.table.d.ts +1 -0
- package/dist/db/tables/procedure.table.js +4 -0
- package/dist/db/tables/procedure.table.js.map +1 -1
- package/dist/implementations/dms-automation/index.d.ts +3 -1
- package/dist/implementations/dms-automation/index.js +17 -1
- package/dist/implementations/dms-automation/index.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/routes/procedureRuns.d.ts +4 -0
- package/dist/routes/procedureRuns.js +24 -0
- package/dist/routes/procedureRuns.js.map +1 -1
- package/dist/routes/procedures.d.ts +2 -0
- package/dist/routes/procedures.js +1 -8
- package/dist/routes/procedures.js.map +1 -1
- package/dist/runtime/builtins/nodes/retry.js +2 -0
- package/dist/runtime/builtins/nodes/retry.js.map +1 -1
- package/dist/runtime/builtins/nodes/tryCatch.js +2 -0
- package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
- package/dist/runtime/declaredProcedures.d.ts +2 -0
- package/dist/runtime/declaredProcedures.js +156 -0
- package/dist/runtime/declaredProcedures.js.map +1 -0
- package/dist/runtime/departed.d.ts +6 -0
- package/dist/runtime/departed.js +38 -0
- package/dist/runtime/departed.js.map +1 -0
- package/dist/runtime/executionResult.d.ts +1 -1
- package/dist/runtime/executor.js +31 -2
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/readiness.d.ts +3 -0
- package/dist/runtime/readiness.js +28 -0
- package/dist/runtime/readiness.js.map +1 -0
- package/dist/runtime/registry.d.ts +7 -0
- package/dist/runtime/registry.js +24 -3
- package/dist/runtime/registry.js.map +1 -1
- package/dist/runtime/serialQueue.d.ts +5 -0
- package/dist/runtime/serialQueue.js +25 -0
- package/dist/runtime/serialQueue.js.map +1 -0
- package/dist/runtime/subscriptions.d.ts +2 -1
- package/dist/runtime/subscriptions.js +55 -45
- package/dist/runtime/subscriptions.js.map +1 -1
- package/dist/runtime/triggerHandles.d.ts +26 -0
- package/dist/runtime/triggerHandles.js +39 -0
- package/dist/runtime/triggerHandles.js.map +1 -0
- package/dist/runtime/typeOrigin.js +1 -1
- package/dist/runtime/typeOrigin.js.map +1 -1
- package/dist/stats/health.js +3 -2
- package/dist/stats/health.js.map +1 -1
- package/frontend-vue/app/components/Editor/BottomDock.vue +9 -5
- package/frontend-vue/app/components/Editor.vue +33 -21
- package/frontend-vue/app/composables/useAutomationRuns.ts +2 -2
- package/frontend-vue/i18n/locales/dms-automation-en-GB.json +3 -0
- package/frontend-vue/i18n/locales/dms-automation-fr-FR.json +3 -0
- package/frontend-vue/package.json +4 -4
- package/frontend-vue/pnpm-lock.yaml +1429 -2947
- package/package.json +32 -16
- package/skills/dms-automation/SKILL.md +35 -0
- package/frontend-vue/pnpm-workspace.yaml +0 -2
package/package.json
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-automation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Visual automation builder for the AntelopeJS DMS: procedures as node graphs started by schedules, webhooks, manual runs or DMS events, with a trace for every run.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"antelopejs",
|
|
7
|
+
"automation",
|
|
8
|
+
"dms",
|
|
9
|
+
"dms-module",
|
|
10
|
+
"workflow"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://dms.antelopejs.com/docs/modules/automation",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/AntelopeJS/dms-automation/issues"
|
|
15
|
+
},
|
|
4
16
|
"license": "Apache-2.0",
|
|
5
17
|
"repository": {
|
|
6
18
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/AntelopeJS/dms-automation.git"
|
|
19
|
+
"url": "git+https://github.com/AntelopeJS/dms-automation.git",
|
|
20
|
+
"directory": "packages/dms-automation"
|
|
8
21
|
},
|
|
9
22
|
"files": [
|
|
10
23
|
"dist",
|
|
@@ -12,7 +25,8 @@
|
|
|
12
25
|
"frontend-vue",
|
|
13
26
|
"package.json",
|
|
14
27
|
"README.md",
|
|
15
|
-
"LICENSE"
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"skills"
|
|
16
30
|
],
|
|
17
31
|
"main": "dist/index.js",
|
|
18
32
|
"types": "dist/index.d.ts",
|
|
@@ -29,23 +43,22 @@
|
|
|
29
43
|
"registry": "https://registry.npmjs.org/"
|
|
30
44
|
},
|
|
31
45
|
"dependencies": {
|
|
32
|
-
"@antelopejs/interface-api": ">=0.0.
|
|
33
|
-
"@antelopejs/interface-api-util": ">=0.1.
|
|
34
|
-
"@antelopejs/interface-core": ">=0.
|
|
35
|
-
"@antelopejs/interface-data-api": ">=0.2.
|
|
36
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
37
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
38
|
-
"@antelopejs/interface-dms": ">=0.7.
|
|
39
|
-
"@antelopejs/interface-dms-automation": ">=0.
|
|
46
|
+
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
47
|
+
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
48
|
+
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
49
|
+
"@antelopejs/interface-data-api": ">=0.2.2 <1.0.0",
|
|
50
|
+
"@antelopejs/interface-database": ">=0.1.10 <1.0.0",
|
|
51
|
+
"@antelopejs/interface-database-decorators": ">=0.1.9 <1.0.0",
|
|
52
|
+
"@antelopejs/interface-dms": ">=0.7.2 <1.0.0",
|
|
53
|
+
"@antelopejs/interface-dms-automation": ">=0.3.0 <0.4.0",
|
|
40
54
|
"defu": "^6.1.4",
|
|
41
55
|
"node-cron": "^4.2.1",
|
|
42
56
|
"zod": "^3.25.76"
|
|
43
57
|
},
|
|
44
58
|
"devDependencies": {
|
|
45
|
-
"@antelopejs/core": "1.
|
|
46
|
-
"@antelopejs/tooling-configs": ">=0.0.
|
|
59
|
+
"@antelopejs/core": "1.16.0",
|
|
60
|
+
"@antelopejs/tooling-configs": ">=0.0.9 <1.0.0",
|
|
47
61
|
"@types/node": "^24.0.0",
|
|
48
|
-
"@types/node-cron": "^3.0.11",
|
|
49
62
|
"knip": "^6.34.0",
|
|
50
63
|
"oxfmt": "^0.66.0",
|
|
51
64
|
"oxlint": "1.81.0",
|
|
@@ -56,12 +69,15 @@
|
|
|
56
69
|
"typescript": "^6.0.3"
|
|
57
70
|
},
|
|
58
71
|
"optionalDependencies": {
|
|
59
|
-
"@antelopejs/interface-redis": ">=0.0.
|
|
72
|
+
"@antelopejs/interface-redis": ">=0.0.9 <1.0.0"
|
|
60
73
|
},
|
|
61
74
|
"antelopeJs": {
|
|
62
75
|
"baseUrl": "dist",
|
|
63
76
|
"implements": [
|
|
64
77
|
"@antelopejs/interface-dms-automation"
|
|
78
|
+
],
|
|
79
|
+
"skills": [
|
|
80
|
+
"./skills"
|
|
65
81
|
]
|
|
66
82
|
},
|
|
67
83
|
"scripts": {
|
|
@@ -72,7 +88,7 @@
|
|
|
72
88
|
"test:runs-display": "pnpm run build && node --test tests/runs-display.test.cjs",
|
|
73
89
|
"test:type-origin": "pnpm run build && node --test tests/type-origin.test.cjs",
|
|
74
90
|
"test:type-display": "node --test tests/type-display.test.cjs",
|
|
75
|
-
"test:unit": "pnpm run build && node --test tests/health.test.cjs tests/kpi.test.cjs tests/graph-issues.test.cjs tests/trace.test.cjs tests/schedule.test.cjs tests/pages.test.cjs tests/procedures-page.test.cjs tests/wording.test.cjs tests/health-banner.test.cjs tests/runtime-nodes.test.cjs tests/runs-api.test.cjs tests/run-detail.test.cjs tests/graph-connect.test.cjs tests/library.test.cjs tests/template-delete.test.cjs tests/overview.test.cjs",
|
|
91
|
+
"test:unit": "pnpm run build && node --test tests/health.test.cjs tests/kpi.test.cjs tests/graph-issues.test.cjs tests/trace.test.cjs tests/schedule.test.cjs tests/pages.test.cjs tests/procedures-page.test.cjs tests/wording.test.cjs tests/health-banner.test.cjs tests/runtime-nodes.test.cjs tests/runs-api.test.cjs tests/run-detail.test.cjs tests/graph-connect.test.cjs tests/library.test.cjs tests/template-delete.test.cjs tests/overview.test.cjs tests/declared-procedures.test.cjs tests/trigger-rearm.test.cjs tests/module-departure.test.cjs tests/run-procedure.test.cjs",
|
|
76
92
|
"dev": "ajs project run -w -p playground",
|
|
77
93
|
"lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint && antelopejs-check-interface-ranges",
|
|
78
94
|
"typecheck": "pnpm --filter @antelopejs/interface-dms-automation typecheck && tsc --noEmit",
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dms-automation
|
|
3
|
+
description: Uses the @antelopejs/dms-automation module of the AntelopeJS DMS (procedures as node graphs started by schedules, webhooks, manual runs or DMS events, with run history and traces under /modules/automation). Use when installing or configuring dms-automation (runs.retentionDays, runs.sensitiveNames, httpRequest.blockPrivateNetwork, cluster.driver), creating, importing or shipping a procedure as code, debugging a failing run, or choosing a trigger (table watch needs a MongoDB replica set). To declare new nodes from a module, use dms-automation-interface instead.
|
|
4
|
+
icon: i-lucide-workflow
|
|
5
|
+
category: automation
|
|
6
|
+
tags: [automation, procedures, workflows, triggers, webhooks, cron]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# dms-automation
|
|
10
|
+
|
|
11
|
+
Runs procedures: a trigger starts a run, actions run along trigger edges, data nodes compute values along data edges, flow nodes (If, Switch, For each, Try/Catch, Retry, Delay…) branch and loop. Every run keeps a trace. User docs: https://dms.antelopejs.com/docs/modules/automation (source: `docs/` of this package). Declaring nodes from another module: the `dms-automation-interface` skill.
|
|
12
|
+
|
|
13
|
+
## Key facts
|
|
14
|
+
|
|
15
|
+
- Pages (owner-only): Overview, Procedures, Builder (`/modules/automation/builder?selected=<id>`), Run history, Run trace (`/modules/automation/trace?run=<id>`), Library.
|
|
16
|
+
- API under `/api/automation` (owner-only). A procedure exported from the builder (`{ name, description, graph }`) is re-created with `POST /api/automation/procedures/import` `{ json }` as a disabled draft; `PUT …/:id/enabled` `{ enabled }` enables it; `POST …/:id/run-now` `{ payload }` runs it.
|
|
17
|
+
- Procedures shipped by a project or module as code: `DeclareProcedure({ id, name, description, graph, enabled })` from `@antelopejs/interface-dms-automation`, called in `start()` on every boot (idempotent, keyed by `id`, which becomes the procedure id; enabled = armed at once; never overwrites a procedure someone changed). Never insert into the module's tables directly: not armed until restart, couples to the internal schema. Details: the `dms-automation-interface` skill.
|
|
18
|
+
- States: failing (last run failed, or the trigger cannot be armed), degraded (a failure in 7 days), healthy, paused, draft. Test runs never count.
|
|
19
|
+
|
|
20
|
+
## Config (`antelope.config.ts`, all optional)
|
|
21
|
+
|
|
22
|
+
`runs.retentionDays` (30; 0 keeps all), `runs.sensitiveNames` (extra credential names, stored as `[redacted]`), `httpRequest.blockPrivateNetwork` (false), `cluster.driver` (`auto` | `redis` | `memory`).
|
|
23
|
+
|
|
24
|
+
## Gotchas
|
|
25
|
+
|
|
26
|
+
- Webhook paths cannot overlap an existing route or start with `/api`, `/auth`, `/dms`, `/modules`, `/settings`; two enabled procedures cannot share method + path. URLs shown use the DMS `apiBaseUrl` (the API server, not the frontend server).
|
|
27
|
+
- Version 0.4+ needs `@antelopejs/dms` 0.9 (`interface-dms` 0.7) and `@antelopejs/dms-frontend` 0.6; 0.3 is the DMS 0.8 line.
|
|
28
|
+
- A re-run sends `[redacted]` where the original request held credentials.
|
|
29
|
+
- Data-change triggers on a project's own tables: `database.table-watch` from `@antelopejs/dms-database` (`schema` = the `RegisterSchema` id, `table`). It needs a change feed: MongoDB **replica set** only (single node `--replSet rs0` + `rs.initiate()` + `replicaSet=rs0` in the URL); on a standalone server the procedure is Failing with "$changeStream is only supported on replica sets".
|
|
30
|
+
- A trigger type registered after the module armed its procedures (start order, hot reload) arms them on registration; "not available" that lasts means the registering module is not loaded.
|
|
31
|
+
- A module stopping or hot-reloading has its triggers torn down as its types are unregistered (no `ModuleContextInvalidatedError`); a run on its steps ends `cancelled`, not `failed`, and health figures ignore cancelled runs.
|
|
32
|
+
- From backend code, `InvokeProcedure` needs a manual trigger node; `RunProcedure(id, { payload?, triggerNodeId? })` runs any procedure (cron-only, webhook-only…) as the builder's Run now and resolves to `{ runId, status, errorMessage? }`.
|
|
33
|
+
- In a Redis cluster, singleton triggers (cron, table watch) are fire-once, not exactly-once: make their effects idempotent.
|
|
34
|
+
- Keep credentials out of graphs: every builder user sees them.
|
|
35
|
+
- Turn on `blockPrivateNetwork` when untrusted people build procedures or URLs come from payloads.
|