@rolealpha/n8n-nodes-rolealpha 0.8.0 → 0.9.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 CHANGED
@@ -139,14 +139,15 @@ Builder** closes that gap without letting a model change production on its own.
139
139
  Scheduler (every 15 min)
140
140
  └ Workflow Builder: Detect Changes list_changes since the last run: new / changed
141
141
  │ steps, changed / removed bound entities
142
- └ per change: Workflow Builder: Propose ← chat model
143
- └ Create Draft inactive, tagged rolealpha-draft
144
- └ roleALPHA: Get Decider (governing step)
145
- └ per person: Issue Approval Tokens → e-mail with approve / reject link
142
+ └ per change: Workflow Builder: Propose rule first, else ← chat model; checks the answer
143
+ ├ Create Draft inactive, tagged rolealpha-draft, with what changes
144
+ │ └ roleALPHA: Get Decider (governing step; for Code nodes the code step)
145
+ │ └ per person: Issue Approval Tokens → e-mail with approve / reject link
146
+ └ nothing usable → e-mail to the same people; model away → again next run
146
147
 
147
148
  Approval link (GET) → Verify Approval Token → page with a confirm button
148
149
  Confirm button (POST)
149
- └ Verify Approval Token → roleALPHA: Check Approver (governing step, fail-closed)
150
+ └ Verify Approval Token → Read Draft → roleALPHA: Check Approver (that step, fail-closed)
150
151
  ├ approve → Workflow Builder: Apply Draft only with the hash in the token
151
152
  └ reject → Workflow Builder: Discard Draft
152
153
  ```
@@ -171,20 +172,79 @@ other end is gone. Then, and when the cursor was lost, Detect asks for every bou
171
172
  whether it still exists. Only "not found" counts as removed; an entity it cannot tell is asked
172
173
  for again next run. A failed read of the feed fails the run and keeps the old cursor.
173
174
 
174
- **Propose** gives the model the change, the entity as roleALPHA shows it now (a step with its
175
- roles, never persons), the managed workflows, which of them the change affects (bound to the
176
- entity, or to a step right before, after, above or below it) and the credentials they use. An
177
- update for a neighbouring step leaves the binding as it is: the workflow does not become bound
178
- to the neighbour. Its answer is
179
- checked, and a failed check goes back to the model once more with the problems:
175
+ **Propose decides clear cases itself**, with the same result every time and no model call
176
+ (`decidedBy: rule`, and `rule` says which):
180
177
 
181
- - only node types from the allow list (no Code node by default),
178
+ | `rule` | When, and only if no workflow depends on the step |
179
+ |---|---|
180
+ | `own_step` | The custom ID starts with one of **Own Step Prefixes** (default `automation:`). This one applies even if a workflow depends on it. |
181
+ | `draft_waiting` | A draft already covers this change. `list_changes` delivers at least once. This one too. |
182
+ | `decision` | The step is a gate: a person decides, and the approval reads who at run time. |
183
+ | `grouping` | The process only groups other steps; they get their own proposals. |
184
+ | `scheduled` | The step has a frequency and the generic scheduler starts it (**Scheduler Covers Frequency**, on by default; switch it off without such a scheduler). |
185
+ | `retired` | The step is archived or retired. |
186
+
187
+ **For the rest it asks the model**, and gives it the change, the entity as roleALPHA shows it now
188
+ (a step with its roles, never persons), the managed workflows, which of them the change
189
+ affects (bound to the entity, or to a step right before, after, above or below it), the
190
+ credentials they use, all other workflows with their triggers (to read, not to change) and the
191
+ runner with its inputs. An update for a neighbouring step leaves the binding as it is: the
192
+ workflow does not become bound to the neighbour.
193
+
194
+ **Templates** cover what most steps need: a trigger, then the agents responsible for the step,
195
+ then the runner. The model only answers `template: schedule` with a cron expression, or
196
+ `template: event` for a step another system starts over a webhook. The builder writes the
197
+ workflow, so it looks the same every time, and maps the inputs from what **Runner Workflow**
198
+ declares. Agents and step are read at run time. The webhook needs a Header Auth credential, and
199
+ the sender has to be set up in the other system; the mail says so. Anything else the model
200
+ writes itself.
201
+
202
+ **Its answer is checked**, and a failed check goes back to the model once more with the problems:
203
+
204
+ - only node types from the allow list; nodes that run commands or unreadable code never,
182
205
  - no e-mail address and no UUID in any parameter: those are read from roleALPHA at run time,
183
- - only credentials already used by managed workflows; a node that stays keeps its own
184
- credentials, IDs and webhook IDs,
185
- - updates and deactivations only of managed workflows, connections only between existing nodes.
186
-
187
- **Drafts** carry everything Apply needs in a sticky note named `roleALPHA binding`: the action,
206
+ - no expression that reaches `$env`, `$secrets`, `$vars`, `process`, `require` or `constructor`,
207
+ or reads a node that is not in the workflow,
208
+ - only credentials already used by managed workflows, plus the roleALPHA credential of Propose
209
+ itself; a node that stays keeps its own credentials, IDs and webhook IDs,
210
+ - updates and deactivations only of managed workflows, connections only between existing nodes,
211
+ - a trigger, and every node connected to it,
212
+ - a sub-workflow call only to a workflow that exists, with inputs it declares,
213
+ - no second workflow with the same name or webhook path, and none for a step another workflow
214
+ already names.
215
+
216
+ What was approved before stays as it is: a node the model returns unchanged is not checked again.
217
+
218
+ **Nothing gets lost.** If the model or roleALPHA is away, Propose returns `ok: false, retry: true`
219
+ and *Detect Changes* brings the change back in the next runs, up to five tries in all. What
220
+ cannot be proposed in the end, or fails the check twice, goes by e-mail to the people who decide
221
+ (`Needs attention?` in the example). A later change of an entity replaces its waiting draft;
222
+ the links of the older draft then do nothing.
223
+
224
+ **Code nodes** are off by default. With **Allow Code Nodes** the model may use them for data
225
+ shaping, and each new or changed one has to pass:
226
+
227
+ 1. **The environment is closed.** With `N8N_BLOCK_ENV_ACCESS_IN_NODE=false` every Code node is
228
+ refused, because it could read the secrets of the container.
229
+ 2. **The code check**, an allow list on the syntax tree: `$input`, `$json`, `$('Node')` of this
230
+ workflow, and `JSON`, `Math`, `Date`, `Array`, `Object`, `String`, `Number`, `Boolean`,
231
+ `RegExp`, `Map`, `Set`, `Error`. No `this`, `await`, classes, `$env`, network or modules, no
232
+ way to `constructor`, and no dynamic keys like `row[key]`: they are the way around any list
233
+ of forbidden names, and `new Map(Object.entries(row)).get(key)` does the same safely.
234
+ 3. **Its own tests.** The model has to deliver test cases, and they run before anyone sees the
235
+ draft. A failed test goes back to the model.
236
+ 4. **A step of its own.** The mail shows the code word for word and goes to the role deciding
237
+ on `codeGoverningStep`, so it can be a different role than for other changes. Which step
238
+ applies is read from the draft, not from the link. **Apply Draft** refuses changed code
239
+ without **Code Approved**, so an older approval workflow fails closed.
240
+
241
+ The check and the tests are one layer, not a sandbox: run Code nodes in external task runners
242
+ (`N8N_RUNNERS_MODE=external`) with `NODE_FUNCTION_ALLOW_BUILTIN` and
243
+ `NODE_FUNCTION_ALLOW_EXTERNAL` empty. The node can only test code, not run the whole workflow:
244
+ n8n's API has no test run, so read the draft before approving it.
245
+
246
+ **Drafts** show what they change: `diff` and `reviewHtml` list new, changed and removed nodes and
247
+ connections, and any new code. They carry everything Apply needs in a sticky note named `roleALPHA binding`: the action,
188
248
  the target, the target's version and the content hash. **Apply** refuses when the draft no
189
249
  longer has the approved hash or the target changed after the draft was made. A managed workflow
190
250
  is one with that note and the tag `rolealpha-managed`; nothing else is ever touched.
@@ -218,7 +278,9 @@ once by hand. No data table is needed; *Detect Changes* keeps its cursor in the
218
278
  `approve-workflow-drafts.json`, and pick the credentials on every node that asks for one.
219
279
  4. **Fill in Settings** in both workflows: `endpointUrl` and `organisation` of roleALPHA,
220
280
  `governingStep`, and in the first one `n8nUrl`, `approvalUrl` (`<n8nUrl>/webhook/rolealpha-workflow-approval`)
221
- and `mailFrom`.
281
+ and `mailFrom`. On *Propose* set **Runner Workflow** to the name or ID of your runner, and
282
+ **Extra Rules** to your systems. Without a runner the model gets no templates. In the
283
+ second workflow also set `governingStep` and `codeGoverningStep`.
222
284
  5. **Set up the governing step in roleALPHA**, as described in the next section. Without it
223
285
  nobody may approve, and every draft stays a draft.
224
286
  6. **Activate** *Approve workflow drafts* first, then *Workflows follow the organisation*. The
@@ -259,6 +321,14 @@ Changing who approves later needs no change in n8n: give the role to someone els
259
321
  no longer fills the role do nothing. A person who fills two deciding roles of the step gets
260
322
  one mail per role.
261
323
 
324
+ ### The builder's own steps
325
+
326
+ The builder may be modelled in roleALPHA like any other value chain: a process with the steps
327
+ *detect changes*, *propose a draft* and the governing step, a role responsible for them and an
328
+ agent that fills the role. Give these steps custom IDs of one prefix, e.g.
329
+ `automation:workflow-detect` and `automation:workflow-propose`, and name the prefix in **Own Step
330
+ Prefixes** on *Propose* (default `automation:`). They then never reach the model.
331
+
262
332
  ## Nodes
263
333
 
264
334
  ### roleALPHA (`roleAlpha`)
@@ -293,9 +363,10 @@ one mail per role.
293
363
  |---|---|---|
294
364
  | Detect Changes | Reads `list_changes` from the cursor kept in the workflow (or the **Cursor** option). Returns `changes` (`created`, `changed`, `removed`, each with `relationships` and the bound `workflows`), `cursor`, `hasMore`, `started`, `checked`, `unreadable` and `skipped`. | MCP OAuth2, n8n API |
295
365
  | List Workflows | The managed workflows with their bound entities and the credentials they use. | n8n API |
296
- | Propose | Needs a chat model on its **Model** input. Returns `ok`, `action` (`create`, `update`, `deactivate`, `none`), `reason`, `workflow`, `contentHash`, `problems` and `notes`. | MCP OAuth2, n8n API |
297
- | Create Draft | Stores a proposal with `ok = true` as an inactive draft. Returns `draftId` and `contentHash`. | n8n API |
298
- | Apply Draft | Applies a draft given the approved hash. Optionally activates a new workflow. | n8n API |
366
+ | Propose | Needs a chat model on its **Model** input. Returns `ok`, `action` (`create`, `update`, `deactivate`, `none`), `reason`, `workflow`, `contentHash`, `problems`, `notes`, `decidedBy` (`rule`, `model`, `failed`), and where they apply `rule`, `template`, `code` and `retry`. | MCP OAuth2, n8n API |
367
+ | Create Draft | Stores a proposal with `ok = true` as an inactive draft and replaces an older draft of the same entity. Returns `draftId`, `contentHash`, `diff`, `codeChanged`, `codeNodes`, `reviewHtml` and `replacedDrafts`. | n8n API |
368
+ | Read Draft | What a draft changes against its target: `action`, `contentHash`, `diff`, `codeChanged` and `codeNodes`. | n8n API |
369
+ | Apply Draft | Applies a draft given the approved hash. Optionally activates a new workflow. Refuses changed Code nodes without **Code Approved**. | n8n API |
299
370
  | Discard Draft | Deletes a draft; refuses any workflow that is not a draft. | n8n API |
300
371
  | Issue Approval Tokens | `approveToken` and `rejectToken` for one person, bound to `draftId` and `contentHash`, plus `tokenExpiresAt`. Keeps the input fields. | Approval Seal API |
301
372
  | Verify Approval Token | Returns `draftId`, `contentHash`, `approver`, `decision` and `expiresAt` of a valid token; fails on a changed, foreign or expired one. | Approval Seal API |
@@ -467,6 +538,11 @@ not caught by the graph.
467
538
  | `Empty MCP response` | The server answered with no body. Reading calls are repeated; a writing tool is not, so it cannot run twice. |
468
539
  | `Cannot access "arguments" due to security concerns` | n8n blocks the name `arguments` in expressions and in `$fromAI`. Name the tool input `toolArgs` or `args`. |
469
540
  | Propose returns `ok: false` | The model's answer failed the check twice; `problems` says why. Often a node type outside the allow list or a hard-coded address. Add what the model needs to **Extra Rules**. |
541
+ | Propose returns `retry: true` | The model or roleALPHA was away. The change comes back in the next run, up to five tries in all. |
542
+ | A template fails with `set Runner Workflow` | **Runner Workflow** on *Propose* is empty or names no workflow. |
543
+ | A Code node is refused with `N8N_BLOCK_ENV_ACCESS_IN_NODE=false` | n8n leaves the environment open to Code nodes. Move what workflows read from `$env` into credentials, then set it to `true`. |
544
+ | `This draft changes Code nodes and was not approved as such` | The approval workflow does not set **Code Approved**. Take *Read Draft* and the check against `codeGoverningStep` from the example. |
545
+ | A step with a frequency never gets a workflow | **Scheduler Covers Frequency** expects a generic scheduler to start it. Switch it off if there is none. |
470
546
  | `The draft changed after it was proposed or approved` | Somebody edited the draft, or the link carries another hash. Discard it; the next change proposes again. |
471
547
  | `Workflow … changed after the draft was made` | The target was edited after the draft. Discard the draft and let the builder propose again. |
472
548
  | Detect fails with `kein Modul für die KI freigegeben` | No module is released for AI in roleALPHA. Release it under *AI settings → data release*. |
@@ -145,3 +145,11 @@ export declare function boundEntities(workflows: Array<{
145
145
  entities: string[];
146
146
  isDraft: boolean;
147
147
  }>): Map<string, string[]>;
148
+ /** A proposal that failed for a passing reason (model or roleALPHA away), to try again next run. */
149
+ export interface RetryEntry {
150
+ change: EntityChange;
151
+ tries: number;
152
+ }
153
+ export declare const MAX_PROPOSE_TRIES = 5;
154
+ /** Failed proposals rejoin the changes of this run; what also changed again keeps its fresh row. */
155
+ export declare function withRetries(changes: EntityChange[], retry: Record<string, RetryEntry> | undefined): EntityChange[];
@@ -15,13 +15,14 @@
15
15
  * for every bound entity whether it still exists. Fail-closed: only "not found" counts as removed.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.NEIGHBOUR_RELATIONSHIPS = exports.RUNTIME_RELATIONSHIPS = exports.ENTITY_TYPES = void 0;
18
+ exports.MAX_PROPOSE_TRIES = exports.NEIGHBOUR_RELATIONSHIPS = exports.RUNTIME_RELATIONSHIPS = exports.ENTITY_TYPES = void 0;
19
19
  exports.normalizeFeedRows = normalizeFeedRows;
20
20
  exports.summarizeFeed = summarizeFeed;
21
21
  exports.readFeed = readFeed;
22
22
  exports.checkExistence = checkExistence;
23
23
  exports.detectChanges = detectChanges;
24
24
  exports.boundEntities = boundEntities;
25
+ exports.withRetries = withRetries;
25
26
  /** Entity types list_changes can filter on and Detect Changes can watch. */
26
27
  exports.ENTITY_TYPES = ['process', 'role', 'agent', 'policy', 'organigramm', 'project', 'okr', 'person'];
27
28
  /** Relationships the runner reads at run time: a change to them never changes a workflow. */
@@ -226,4 +227,21 @@ function boundEntities(workflows) {
226
227
  }
227
228
  return bound;
228
229
  }
230
+ exports.MAX_PROPOSE_TRIES = 5;
231
+ /** Failed proposals rejoin the changes of this run; what also changed again keeps its fresh row. */
232
+ function withRetries(changes, retry) {
233
+ const out = [...changes];
234
+ for (const { change } of Object.values(retry ?? {})) {
235
+ const fresh = out.find((c) => c.uuid === change.uuid);
236
+ if (!fresh)
237
+ out.push(change);
238
+ else {
239
+ const seen = new Set(fresh.relationships.map((r) => JSON.stringify(r)));
240
+ for (const r of change.relationships)
241
+ if (!seen.has(JSON.stringify(r)))
242
+ fresh.relationships.push(r);
243
+ }
244
+ }
245
+ return out;
246
+ }
229
247
  //# sourceMappingURL=changes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"changes.js","sourceRoot":"","sources":["../../lib/changes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAsFH,8CA8BC;AAOD,sCAwCC;AAgBD,4BA0BC;AAWD,wCAeC;AAwBD,sCAuCC;AAGD,sCAOC;AA5SD,4EAA4E;AAC/D,QAAA,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,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G,IAAI,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,aAAa;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;oBAAE,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACrG,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Code nodes a model writes. A model's code is pure data shaping: it may read its input and
3
+ * the output of nodes in the same workflow, and return items. Everything else is refused
4
+ * by an allow list on the syntax tree, not by searching for bad words: an unknown syntax
5
+ * form or an unknown global fails. Dynamic keys (`row[key]`) fail too, because they are the
6
+ * way around any list of forbidden properties; `new Map(Object.entries(row)).get(key)` does
7
+ * the same without reaching `constructor`.
8
+ *
9
+ * This is one layer, not the sandbox: n8n has to block environment access for Code nodes
10
+ * and a person has to approve the code.
11
+ */
12
+ export type CodeMode = 'runOnceForAllItems' | 'runOnceForEachItem';
13
+ export interface CodeTest {
14
+ name?: string;
15
+ /** The `json` of each input item. */
16
+ input?: unknown[];
17
+ /** The `json` of each item of other nodes, by node name, for `$('Node')`. */
18
+ nodes?: Record<string, unknown[]>;
19
+ /** The `json` of each expected output item. */
20
+ expected: unknown[];
21
+ }
22
+ export declare const MAX_CODE_CHARS = 8000;
23
+ export declare function checkCode(code: string, opts?: {
24
+ nodeNames?: Iterable<string>;
25
+ }): string[];
26
+ /** Runs code that passed checkCode against the model's own test cases. */
27
+ export declare function runCodeTests(code: string, mode: CodeMode, tests: unknown): string[];