@antelopejs/dms-automation 0.6.0 → 0.8.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 +21 -7
- package/dist/cluster/bus.js +8 -6
- package/dist/cluster/bus.js.map +1 -1
- package/dist/cluster/leader.js.map +1 -1
- package/dist/data/procedures-query.d.ts +19 -0
- package/dist/data/procedures-query.js +105 -0
- package/dist/data/procedures-query.js.map +1 -0
- package/dist/data/procedures-table.d.ts +5 -16
- package/dist/data/procedures-table.js +12 -101
- package/dist/data/procedures-table.js.map +1 -1
- package/dist/data/runs-table.js +0 -5
- package/dist/data/runs-table.js.map +1 -1
- package/dist/db/models/automation_template.model.d.ts +2 -4
- package/dist/db/models/automation_template.model.js +13 -14
- package/dist/db/models/automation_template.model.js.map +1 -1
- package/dist/db/models/procedure_run.model.js.map +1 -1
- package/dist/db/models/stats.model.js.map +1 -1
- package/dist/db/tables/procedure.table.d.ts +0 -1
- package/dist/db/tables/procedure.table.js +0 -4
- package/dist/db/tables/procedure.table.js.map +1 -1
- package/dist/db/tables/procedure_run.table.d.ts +2 -1
- package/dist/db/tables/procedure_run.table.js.map +1 -1
- package/dist/implementations/dms-automation/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pages/category.js.map +1 -1
- package/dist/pages/index.js.map +1 -1
- package/dist/pages/overview.js.map +1 -1
- package/dist/pages/procedures.js.map +1 -1
- package/dist/pages/runs.js.map +1 -1
- package/dist/pages/shared.js +1 -1
- package/dist/pages/shared.js.map +1 -1
- package/dist/realtime.d.ts +2 -1
- package/dist/realtime.js.map +1 -1
- package/dist/routes/action-types.d.ts +2 -1
- package/dist/routes/action-types.js.map +1 -1
- package/dist/routes/deleteConfirm.js +4 -3
- package/dist/routes/deleteConfirm.js.map +1 -1
- package/dist/routes/graphSchema.d.ts +2 -1
- package/dist/routes/graphSchema.js +8 -7
- package/dist/routes/graphSchema.js.map +1 -1
- package/dist/routes/procedureChecks.js +5 -5
- package/dist/routes/procedureChecks.js.map +1 -1
- package/dist/routes/procedureRuns.d.ts +2 -2
- package/dist/routes/procedureRuns.js +1 -1
- package/dist/routes/procedureRuns.js.map +1 -1
- package/dist/routes/procedures.d.ts +14 -15
- package/dist/routes/procedures.js +2 -1
- package/dist/routes/procedures.js.map +1 -1
- package/dist/routes/requests.d.ts +11 -5
- package/dist/routes/requests.js.map +1 -1
- package/dist/routes/runs.d.ts +7 -7
- package/dist/routes/runs.js +5 -3
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/stats.js.map +1 -1
- package/dist/routes/templates.d.ts +3 -2
- package/dist/routes/templates.js +2 -1
- package/dist/routes/templates.js.map +1 -1
- package/dist/routes/trigger-types.d.ts +2 -1
- package/dist/routes/trigger-types.js.map +1 -1
- package/dist/routes/typeConfigShared.d.ts +2 -1
- package/dist/routes/typeConfigShared.js.map +1 -1
- package/dist/runtime/armErrors.d.ts +0 -1
- package/dist/runtime/armErrors.js +0 -7
- package/dist/runtime/armErrors.js.map +1 -1
- package/dist/runtime/boundRunLog.d.ts +1 -0
- package/dist/runtime/boundRunLog.js +11 -11
- package/dist/runtime/boundRunLog.js.map +1 -1
- package/dist/runtime/builtins/actions/http.js +16 -9
- package/dist/runtime/builtins/actions/http.js.map +1 -1
- package/dist/runtime/builtins/actions/log.js.map +1 -1
- package/dist/runtime/builtins/data/boolean.js +4 -5
- package/dist/runtime/builtins/data/boolean.js.map +1 -1
- package/dist/runtime/builtins/data/compare.js +8 -10
- package/dist/runtime/builtins/data/compare.js.map +1 -1
- package/dist/runtime/builtins/data/constant.js +1 -1
- package/dist/runtime/builtins/data/constant.js.map +1 -1
- package/dist/runtime/builtins/data/json.js +4 -5
- package/dist/runtime/builtins/data/json.js.map +1 -1
- package/dist/runtime/builtins/data/math.js +4 -4
- package/dist/runtime/builtins/data/math.js.map +1 -1
- package/dist/runtime/builtins/data/object.js +12 -17
- package/dist/runtime/builtins/data/object.js.map +1 -1
- package/dist/runtime/builtins/data/string.js +13 -18
- package/dist/runtime/builtins/data/string.js.map +1 -1
- package/dist/runtime/builtins/nodes/action.js +5 -2
- package/dist/runtime/builtins/nodes/action.js.map +1 -1
- package/dist/runtime/builtins/nodes/data.js +2 -2
- package/dist/runtime/builtins/nodes/data.js.map +1 -1
- package/dist/runtime/builtins/nodes/delay.js +2 -2
- package/dist/runtime/builtins/nodes/delay.js.map +1 -1
- package/dist/runtime/builtins/nodes/forRange.js +2 -2
- package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
- package/dist/runtime/builtins/nodes/foreach.js +2 -2
- package/dist/runtime/builtins/nodes/foreach.js.map +1 -1
- package/dist/runtime/builtins/nodes/groupInput.js +2 -2
- package/dist/runtime/builtins/nodes/groupInput.js.map +1 -1
- package/dist/runtime/builtins/nodes/groupOutput.js +2 -2
- package/dist/runtime/builtins/nodes/groupOutput.js.map +1 -1
- package/dist/runtime/builtins/nodes/if.js +2 -2
- package/dist/runtime/builtins/nodes/if.js.map +1 -1
- package/dist/runtime/builtins/nodes/parallel.js +2 -2
- package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
- package/dist/runtime/builtins/nodes/retry.js +5 -6
- package/dist/runtime/builtins/nodes/retry.js.map +1 -1
- package/dist/runtime/builtins/nodes/setVariable.js +2 -2
- package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
- package/dist/runtime/builtins/nodes/switch.js +2 -2
- package/dist/runtime/builtins/nodes/switch.js.map +1 -1
- package/dist/runtime/builtins/nodes/trigger.js +2 -2
- package/dist/runtime/builtins/nodes/trigger.js.map +1 -1
- package/dist/runtime/builtins/nodes/tryCatch.js +2 -4
- package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
- package/dist/runtime/builtins/triggers/cron.d.ts +2 -1
- package/dist/runtime/builtins/triggers/cron.js +5 -7
- package/dist/runtime/builtins/triggers/cron.js.map +1 -1
- package/dist/runtime/builtins/triggers/webhook.d.ts +6 -5
- package/dist/runtime/builtins/triggers/webhook.js +9 -6
- package/dist/runtime/builtins/triggers/webhook.js.map +1 -1
- package/dist/runtime/declaredProcedures.d.ts +2 -2
- package/dist/runtime/declaredProcedures.js +17 -92
- package/dist/runtime/declaredProcedures.js.map +1 -1
- package/dist/runtime/describe.js +11 -10
- package/dist/runtime/describe.js.map +1 -1
- package/dist/runtime/executionResult.d.ts +1 -1
- package/dist/runtime/executor.js +12 -38
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/flatten.d.ts +1 -1
- package/dist/runtime/flatten.js +1 -1
- package/dist/runtime/flatten.js.map +1 -1
- package/dist/runtime/graphIssues.js +24 -22
- package/dist/runtime/graphIssues.js.map +1 -1
- package/dist/runtime/graphVersion.d.ts +1 -1
- package/dist/runtime/graphVersion.js +2 -1
- package/dist/runtime/graphVersion.js.map +1 -1
- package/dist/runtime/nodeKinds.d.ts +3 -2
- package/dist/runtime/nodeKinds.js.map +1 -1
- package/dist/runtime/reconcile.d.ts +3 -0
- package/dist/runtime/reconcile.js +178 -0
- package/dist/runtime/reconcile.js.map +1 -0
- package/dist/runtime/registry.d.ts +0 -7
- package/dist/runtime/registry.js +3 -24
- package/dist/runtime/registry.js.map +1 -1
- package/dist/runtime/resolveInputs.d.ts +4 -2
- package/dist/runtime/resolveInputs.js +13 -12
- package/dist/runtime/resolveInputs.js.map +1 -1
- package/dist/runtime/resolveSubgraph.js +4 -5
- package/dist/runtime/resolveSubgraph.js.map +1 -1
- package/dist/runtime/retention.js.map +1 -1
- package/dist/runtime/runProcedure.d.ts +1 -1
- package/dist/runtime/runProcedure.js +2 -1
- package/dist/runtime/runProcedure.js.map +1 -1
- package/dist/runtime/schedule.js +3 -0
- package/dist/runtime/schedule.js.map +1 -1
- package/dist/runtime/schemaProperties.d.ts +11 -0
- package/dist/runtime/schemaProperties.js +7 -0
- package/dist/runtime/schemaProperties.js.map +1 -0
- package/dist/runtime/serialQueue.d.ts +1 -1
- package/dist/runtime/serialQueue.js +4 -4
- package/dist/runtime/serialQueue.js.map +1 -1
- package/dist/runtime/subscriptions.js +21 -183
- package/dist/runtime/subscriptions.js.map +1 -1
- package/dist/runtime/subwalk.js.map +1 -1
- package/dist/runtime/templateCacheState.d.ts +6 -0
- package/dist/runtime/templateCacheState.js +10 -0
- package/dist/runtime/templateCacheState.js.map +1 -0
- package/dist/runtime/templateUsages.js +4 -5
- package/dist/runtime/templateUsages.js.map +1 -1
- package/dist/runtime/topo.js +2 -4
- package/dist/runtime/topo.js.map +1 -1
- package/dist/runtime/trace.js +12 -9
- package/dist/runtime/trace.js.map +1 -1
- package/dist/runtime/triggerHandles.d.ts +3 -0
- package/dist/runtime/triggerHandles.js +8 -3
- package/dist/runtime/triggerHandles.js.map +1 -1
- package/dist/runtime/typeOrigin.js +12 -1
- package/dist/runtime/typeOrigin.js.map +1 -1
- package/dist/runtime/validate.js.map +1 -1
- package/dist/runtime/validateTemplate.js.map +1 -1
- package/dist/runtime/withTimeout.js.map +1 -1
- package/dist/runtime/wording.js +12 -8
- package/dist/runtime/wording.js.map +1 -1
- package/dist/stats/health-banner.js.map +1 -1
- package/dist/stats/health.js +2 -3
- package/dist/stats/health.js.map +1 -1
- package/dist/stats/kpi.js +1 -1
- package/dist/stats/kpi.js.map +1 -1
- package/dist/stats/overview.js +2 -1
- package/dist/stats/overview.js.map +1 -1
- package/dist/types/dataValue.d.ts +8 -0
- package/dist/types/dataValue.js +36 -0
- package/dist/types/dataValue.js.map +1 -0
- package/dist/types/graph.d.ts +8 -1
- package/dist/types/graph.js +8 -0
- package/dist/types/graph.js.map +1 -1
- package/dist/types/guards.d.ts +8 -0
- package/dist/types/guards.js +35 -0
- package/dist/types/guards.js.map +1 -0
- package/frontend-vue/app/build/components/editor/EditorBanners.vue +120 -0
- package/frontend-vue/app/build/components/editor/EditorChoiceModal.vue +44 -0
- package/frontend-vue/app/build/components/editor/EditorForkModal.vue +51 -0
- package/frontend-vue/app/build/components/editor/EditorHeader.vue +146 -0
- package/frontend-vue/app/build/components/editor/EditorSaveTemplateModal.vue +105 -0
- package/frontend-vue/app/build/components/editor/NodeInspectorDocs.vue +28 -0
- package/frontend-vue/app/build/components/editor/NodeInspectorRun.vue +48 -0
- package/frontend-vue/app/build/composables/editor/useBuilderMount.ts +129 -0
- package/frontend-vue/app/build/composables/editor/useBuilderSave.ts +256 -0
- package/frontend-vue/app/build/composables/editor/useBuilderShortcuts.ts +270 -0
- package/frontend-vue/app/build/composables/editor/useDraftProblems.ts +288 -0
- package/frontend-vue/app/build/composables/editor/useEditorContext.ts +388 -0
- package/frontend-vue/app/build/composables/editor/useEditorLoad.ts +158 -0
- package/frontend-vue/app/build/composables/editor/useForkToLocal.ts +193 -0
- package/frontend-vue/app/build/composables/editor/useGraphHistory.ts +113 -0
- package/frontend-vue/app/build/composables/editor/useGroupEditing.ts +445 -0
- package/frontend-vue/app/build/composables/editor/usePalette.ts +41 -0
- package/frontend-vue/app/build/composables/editor/useProcedureActions.ts +96 -0
- package/frontend-vue/app/build/composables/editor/useRunOverlay.ts +466 -0
- package/frontend-vue/app/build/composables/editor/useSaveAsTemplate.ts +172 -0
- package/frontend-vue/app/build/composables/editor/useSavedTriggers.ts +100 -0
- package/frontend-vue/app/build/composables/editor/useSubgraphNavigation.ts +270 -0
- package/frontend-vue/app/build/composables/editor/useUnsavedGuards.ts +233 -0
- package/frontend-vue/app/build/composables/graphCanvas/connect.ts +273 -0
- package/frontend-vue/app/build/composables/graphCanvas/edgeEvents.ts +172 -0
- package/frontend-vue/app/build/composables/graphCanvas/edges.ts +55 -0
- package/frontend-vue/app/build/composables/graphCanvas/handles.ts +181 -0
- package/frontend-vue/app/build/composables/graphCanvas/linkMenu.ts +123 -0
- package/frontend-vue/app/build/composables/graphCanvas/nodeData.ts +222 -0
- package/frontend-vue/app/build/composables/graphCanvas/placement.ts +248 -0
- package/frontend-vue/app/build/composables/graphCanvas/selection.ts +150 -0
- package/frontend-vue/app/build/composables/graphCanvas/types.ts +188 -0
- package/frontend-vue/app/build/composables/graphCanvas/view.ts +230 -0
- package/frontend-vue/app/build/types/editor.ts +94 -0
- package/frontend-vue/app/build/utils/editor/apiErrors.ts +74 -0
- package/frontend-vue/app/build/utils/editor/graphShape.ts +68 -0
- package/frontend-vue/app/build/utils/editor/groupPlan.ts +322 -0
- package/frontend-vue/app/build/utils/editor/groupPorts.ts +210 -0
- package/frontend-vue/app/build/utils/editor/keyboard.ts +22 -0
- package/frontend-vue/app/build/utils/inspectorFields.ts +117 -0
- package/frontend-vue/app/build/utils/templates.ts +88 -0
- package/frontend-vue/app/components/AttentionList.vue +2 -6
- package/frontend-vue/app/components/Catalog.vue +2 -1
- package/frontend-vue/app/components/Editor/BottomDock.vue +0 -3
- package/frontend-vue/app/components/Editor/GraphCanvas.vue +78 -1337
- package/frontend-vue/app/components/Editor/NodeInspector.vue +31 -123
- package/frontend-vue/app/components/Editor.vue +134 -3490
- package/frontend-vue/app/components/Templates.vue +14 -84
- package/frontend-vue/app/composables/useAutomationRuns.ts +2 -2
- package/frontend-vue/build/backend-boundary.ts +122 -0
- package/frontend-vue/dms.frontend.build.ts +2 -0
- package/frontend-vue/eslint-rules/index.mjs +103 -0
- package/frontend-vue/eslint.config.mjs +15 -0
- package/frontend-vue/i18n/locales/dms-automation-en-GB.json +0 -3
- package/frontend-vue/i18n/locales/dms-automation-fr-FR.json +0 -3
- package/frontend-vue/package.json +7 -4
- package/frontend-vue/pnpm-lock.yaml +98 -68
- package/frontend-vue/tests/api-error-presentation.test.cjs +257 -0
- package/frontend-vue/tests/helpers/setup.cjs +44 -0
- package/package.json +10 -10
- package/skills/dms-automation/SKILL.md +4 -4
- package/skills/dms-automation/cases.json +58 -0
- package/dist/runtime/departed.d.ts +0 -6
- package/dist/runtime/departed.js +0 -38
- package/dist/runtime/departed.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-automation",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
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
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"@antelopejs/interface-api": ">=0.0.15 <1.0.0",
|
|
47
47
|
"@antelopejs/interface-api-util": ">=0.1.3 <1.0.0",
|
|
48
48
|
"@antelopejs/interface-core": ">=0.2.4 <1.0.0",
|
|
49
|
-
"@antelopejs/interface-data-api": ">=0.
|
|
50
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
51
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
52
|
-
"@antelopejs/interface-dms": ">=0.
|
|
53
|
-
"@antelopejs/interface-dms-automation": ">=0.
|
|
49
|
+
"@antelopejs/interface-data-api": ">=0.4.0 <1.0.0",
|
|
50
|
+
"@antelopejs/interface-database": ">=0.1.11 <1.0.0",
|
|
51
|
+
"@antelopejs/interface-database-decorators": ">=0.1.10 <1.0.0",
|
|
52
|
+
"@antelopejs/interface-dms": ">=0.9.0 <1.0.0",
|
|
53
|
+
"@antelopejs/interface-dms-automation": ">=0.5.0 <0.6.0",
|
|
54
54
|
"defu": "^6.1.4",
|
|
55
55
|
"node-cron": "^4.2.1",
|
|
56
56
|
"zod": "^3.25.76"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@antelopejs/core": "1.
|
|
59
|
+
"@antelopejs/core": "1.17.1",
|
|
60
60
|
"@antelopejs/tooling-configs": ">=0.0.9 <1.0.0",
|
|
61
61
|
"@types/node": "^24.0.0",
|
|
62
62
|
"knip": "^6.34.0",
|
|
@@ -83,17 +83,17 @@
|
|
|
83
83
|
"dmsFrontend": "dist/frontend-module.js",
|
|
84
84
|
"scripts": {
|
|
85
85
|
"build": "pnpm --filter @antelopejs/interface-dms-automation build && rimraf dist && tsc",
|
|
86
|
-
"test": "pnpm run build && node --test tests/*.test.cjs",
|
|
86
|
+
"test": "pnpm run build && node --test tests/*.test.cjs && pnpm --dir frontend-vue test",
|
|
87
87
|
"test:frontend-registration": "pnpm run build && node --test tests/frontend-registration.test.cjs",
|
|
88
88
|
"test:run-storage": "pnpm run build && node --test tests/run-storage.test.cjs",
|
|
89
89
|
"test:runs-display": "pnpm run build && node --test tests/runs-display.test.cjs",
|
|
90
90
|
"test:type-origin": "pnpm run build && node --test tests/type-origin.test.cjs",
|
|
91
91
|
"test:type-display": "node --test tests/type-display.test.cjs",
|
|
92
|
-
"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/
|
|
92
|
+
"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/frontend-lint-rules.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 tests/dry-run.test.cjs tests/test-run-confirm.test.cjs tests/confirm-from.test.cjs tests/backend-boundary.test.cjs",
|
|
93
93
|
"dev": "ajs project run -w -p playground",
|
|
94
94
|
"lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint && antelopejs-check-interface-ranges",
|
|
95
95
|
"typecheck": "pnpm --filter @antelopejs/interface-dms-automation typecheck && tsc --noEmit",
|
|
96
|
-
"lint:fix": "oxlint --fix
|
|
96
|
+
"lint:fix": "oxlint --fix && oxfmt . && cd frontend-vue && pnpm lint:fix",
|
|
97
97
|
"format": "oxfmt .",
|
|
98
98
|
"frontend:dev": "cd playground && pnpm frontend:dev",
|
|
99
99
|
"release": "pnpm --filter @antelopejs/interface-dms-automation build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm lint && pnpm typecheck && pnpm test:frontend-registration && pnpm run verify:interface && release-it",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dms-automation
|
|
3
|
-
description:
|
|
3
|
+
description: Operates the installed @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
4
|
icon: i-lucide-workflow
|
|
5
5
|
category: automation
|
|
6
6
|
tags: [automation, procedures, workflows, triggers, webhooks, cron]
|
|
@@ -15,7 +15,7 @@ Runs procedures: a trigger starts a run, actions run along trigger edges, data n
|
|
|
15
15
|
- Pages (owner-only): Overview, Procedures, Builder (`/modules/automation/builder?selected=<id>`), Run history, Run trace (`/modules/automation/trace?run=<id>`), Library.
|
|
16
16
|
- Overview, Run history and Procedures are live pages whose first block is the DMS `PageToolbar` (`@antelopejs/interface-dms/base/page-toolbar`): updated label + Live / Pause, plus on Overview and Run history the shared 24H / 7D / 30D period (`rememberKey: "automation"`, comparison menu over `previous-period` (default) / `none`, plus `previous-year` only when `runs.retentionDays` reaches a year and 30 days (or is 0), which `pageToolbar()` draws as a menu; the KPI routes read the `compareFrom` / `compareTo` the scope resolves and drop them on `comparison=none` or when no run kept reaches back to them; the Overview's runs chart (`/stats/runs-per-day`) does the same and answers `comparisonSeries`, the compared runs per bucket as a dashed `type: "line"` series over the stacked bars, plus `previousValue` / `delta` like the Runs KPI). Every period-scoped KPI and chart on those pages shows the comparison; the lists (attention, recent runs, procedure counts, triggers) are not period comparisons. No layout shift: each block's skeleton is the size of what it loads. The recent runs and procedure counts draw `RECENT_RUNS` / `PROCEDURE_COUNT_LINES` skeleton rows (from `src/stats/overview.ts`, the counts the routes send), the runs chart carries a `description` that holds the line under its total when no comparison answers, and the attention list draws two skeleton rows shaped like loaded ones, as tall as its empty state. Live: the `topics` block calls `refreshLivePageBlocks()` on each `automation.runs` / `automation.procedures` event, so every block reads through the page's live gate (no block carries its own `realtimeTopic`); the Run history and Procedures tables set `liveHold`. Its block id stays `live` (children `topics`, `toggle`, `period`, placed by `pageToolbar()` with `live.childId: "toggle"`) on Overview and Run history, `toolbar` on Procedures.
|
|
17
17
|
- 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.
|
|
18
|
-
- Procedures shipped by a project or module as code: `DeclareProcedure({ id, name, description, graph, enabled })` from `@antelopejs/interface-dms-automation`, called in `start()`
|
|
18
|
+
- Procedures shipped by a project or module as code: `DeclareProcedure({ id, name, description, graph, enabled })` from `@antelopejs/interface-dms-automation`, called in `start()` (keyed by `id`, which becomes the procedure id; created once, then never touched; enabled = armed at once). Never insert into the module's tables directly: not armed until restart, couples to the internal schema. Details: the `dms-automation-interface` skill.
|
|
19
19
|
- States: failing (last run failed, or the trigger cannot be armed), degraded (a failure in 7 days), healthy, paused, draft. Test runs never count.
|
|
20
20
|
|
|
21
21
|
## Config (`antelope.config.ts`, all optional)
|
|
@@ -25,12 +25,12 @@ Runs procedures: a trigger starts a run, actions run along trigger edges, data n
|
|
|
25
25
|
## Gotchas
|
|
26
26
|
|
|
27
27
|
- 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).
|
|
28
|
-
-
|
|
28
|
+
- It needs `@antelopejs/dms` 0.11 or later (`interface-dms` 0.9 or later) and `@antelopejs/dms-frontend` 0.9; 0.6.0 is the DMS 0.10 line.
|
|
29
29
|
- **Test run** simulates only actions declaring `dryRun` (and runs `sideEffects: false` ones as is); every other action (HTTP request, module actions without `dryRun`) acts for real. The builder lists those steps and asks first; `POST …/:id/test` answers 409 with `realEffects` until called with `confirmRealEffects: true` (`POST …/:id/test-effects` `{ graph }` lists them). To make a project or module action safe to test, give it `dryRun` (see `dms-automation-interface`).
|
|
30
30
|
- A re-run sends `[redacted]` where the original request held credentials.
|
|
31
31
|
- 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".
|
|
32
32
|
- 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.
|
|
33
|
-
- A module stopping or hot-reloading has its triggers torn down as its types are unregistered
|
|
33
|
+
- A module stopping or hot-reloading has its triggers torn down as its types are unregistered ; a run on its steps fails, like any other error.
|
|
34
34
|
- 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? }`.
|
|
35
35
|
- In a Redis cluster, singleton triggers (cron, table watch) are fire-once, not exactly-once: make their effects idempotent.
|
|
36
36
|
- Keep credentials out of graphs: every builder user sees them.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"cases": [
|
|
4
|
+
{
|
|
5
|
+
"id": "automation-nightly-report",
|
|
6
|
+
"area": "modules",
|
|
7
|
+
"style": "clean",
|
|
8
|
+
"prompt": "Run a procedure every night that e-mails a sales report.",
|
|
9
|
+
"expect": {
|
|
10
|
+
"skills": ["dms-automation"],
|
|
11
|
+
"acceptable": ["dms-mailing", "dms-automation-interface", "dms"]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"id": "dms-automation-failing-cron-casual",
|
|
16
|
+
"area": "modules",
|
|
17
|
+
"style": "casual",
|
|
18
|
+
"prompt": "my nightly procedure says failing and idk why, where do i look",
|
|
19
|
+
"expect": {
|
|
20
|
+
"skills": ["dms-automation"],
|
|
21
|
+
"acceptable": ["dms", "dms-automation-interface"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"id": "dms-automation-test-run-real-effects",
|
|
26
|
+
"area": "modules",
|
|
27
|
+
"style": "clean",
|
|
28
|
+
"prompt": "My procedure has an HTTP request node that charges a customer. If I press Test run in the builder, will it call the real service, and how does the builder protect me?",
|
|
29
|
+
"expect": {
|
|
30
|
+
"skills": ["dms-automation"],
|
|
31
|
+
"acceptable": ["dms", "dms-automation-interface"],
|
|
32
|
+
"mustMention": ["confirmRealEffects", "dryRun"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "dms-automation-table-watch-replica-set",
|
|
37
|
+
"area": "modules",
|
|
38
|
+
"style": "clean",
|
|
39
|
+
"prompt": "Start a procedure whenever a row of my orders table changes. My local MongoDB is a single standalone server, what do I have to set up?",
|
|
40
|
+
"expect": {
|
|
41
|
+
"skills": ["dms-automation"],
|
|
42
|
+
"acceptable": ["dms", "dms-database"],
|
|
43
|
+
"mustMention": ["database.table-watch", "replicaSet=rs0"]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "dms-automation-avoid-register-trigger",
|
|
48
|
+
"area": "modules",
|
|
49
|
+
"style": "clean",
|
|
50
|
+
"prompt": "My module must offer a new trigger type in the procedure editor that fires when a delivery arrives. Should it be singleton or replicated?",
|
|
51
|
+
"expect": {
|
|
52
|
+
"skills": ["dms-automation-interface"],
|
|
53
|
+
"acceptable": ["dms-module", "dms"],
|
|
54
|
+
"avoid": ["dms-automation"]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { GraphNode } from "../types/graph";
|
|
2
|
-
export declare function isModuleGone(err: unknown): boolean;
|
|
3
|
-
export declare class RunCancelledError extends Error {
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function departure(err: unknown, node: GraphNode, typesMark: number): RunCancelledError | undefined;
|
package/dist/runtime/departed.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RunCancelledError = void 0;
|
|
4
|
-
exports.isModuleGone = isModuleGone;
|
|
5
|
-
exports.departure = departure;
|
|
6
|
-
const interface_core_1 = require("@antelopejs/interface-core");
|
|
7
|
-
const registry_1 = require("./registry");
|
|
8
|
-
const MAX_CAUSES = 8;
|
|
9
|
-
function isModuleGone(err) {
|
|
10
|
-
let current = err;
|
|
11
|
-
for (let depth = 0; current && depth < MAX_CAUSES; depth++) {
|
|
12
|
-
const { code, cause } = current;
|
|
13
|
-
if (code === interface_core_1.MODULE_CONTEXT_INVALIDATED_CODE)
|
|
14
|
-
return true;
|
|
15
|
-
current = cause;
|
|
16
|
-
}
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
class RunCancelledError extends Error {
|
|
20
|
-
name = "RunCancelledError";
|
|
21
|
-
}
|
|
22
|
-
exports.RunCancelledError = RunCancelledError;
|
|
23
|
-
function departure(err, node, typesMark) {
|
|
24
|
-
if (err instanceof RunCancelledError)
|
|
25
|
-
return err;
|
|
26
|
-
const step = node.typeId ?? node.kind;
|
|
27
|
-
if (isModuleGone(err)) {
|
|
28
|
-
return new RunCancelledError(`the module behind "${step}" was unloaded while the run was on`, { cause: err });
|
|
29
|
-
}
|
|
30
|
-
if (node.kind === "action" &&
|
|
31
|
-
node.typeId &&
|
|
32
|
-
!registry_1.registry.getAction(node.typeId) &&
|
|
33
|
-
registry_1.registry.removedSince("action", node.typeId, typesMark)) {
|
|
34
|
-
return new RunCancelledError(`"${step}" was unregistered while the run was on`, { cause: err });
|
|
35
|
-
}
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=departed.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"departed.js","sourceRoot":"","sources":["../../src/runtime/departed.ts"],"names":[],"mappings":";;;AAeA,oCAUC;AAgBD,8BAyBC;AAlED,+DAA6E;AAE7E,yCAAsC;AAUtC,MAAM,UAAU,GAAG,CAAC,CAAC;AAGrB,SAAgB,YAAY,CAAC,GAAY;IACvC,IAAI,OAAO,GAAG,GAAG,CAAC;IAClB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,OAAO,IAAI,KAAK,GAAG,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC;QAG3D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAA8C,CAAC;QACvE,IAAI,IAAI,KAAK,gDAA+B;YAAE,OAAO,IAAI,CAAC;QAC1D,OAAO,GAAG,KAAK,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAMD,MAAa,iBAAkB,SAAQ,KAAK;IACjC,IAAI,GAAG,mBAAmB,CAAC;CACrC;AAFD,8CAEC;AAQD,SAAgB,SAAS,CACvB,GAAY,EACZ,IAAe,EACf,SAAiB;IAEjB,IAAI,GAAG,YAAY,iBAAiB;QAAE,OAAO,GAAG,CAAC;IACjD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC;IACtC,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,IAAI,iBAAiB,CAC1B,sBAAsB,IAAI,qCAAqC,EAC/D,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;IACJ,CAAC;IACD,IACE,IAAI,CAAC,IAAI,KAAK,QAAQ;QACtB,IAAI,CAAC,MAAM;QACX,CAAC,mBAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QAChC,mBAAQ,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,EACvD,CAAC;QACD,OAAO,IAAI,iBAAiB,CAC1B,IAAI,IAAI,yCAAyC,EACjD,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|