@neuroverseos/n8n-nodes-neuroverse 0.1.1
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 +109 -0
- package/dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.d.ts +6 -0
- package/dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.d.ts.map +1 -0
- package/dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.js +215 -0
- package/dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.js.map +1 -0
- package/dist/nodes/NeuroVerseGuard/neuroverse.svg +7 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# NeuroVerse Guard for n8n
|
|
2
|
+
|
|
3
|
+
Stop AI automations before they do something stupid.
|
|
4
|
+
|
|
5
|
+
The NeuroVerse Guard node evaluates an agent's intent against your governance rules and routes the workflow based on the result.
|
|
6
|
+
|
|
7
|
+
**Outputs:**
|
|
8
|
+
- **ALLOW** — continue execution
|
|
9
|
+
- **BLOCK** — stop the action
|
|
10
|
+
- **PAUSE** — require human approval
|
|
11
|
+
|
|
12
|
+
Deterministic. Sub-millisecond. No LLM calls. Full audit trail.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
In n8n, go to **Settings → Community Nodes** and install:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
n8n-nodes-neuroverse
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Or install via CLI:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cd ~/.n8n
|
|
26
|
+
npm install n8n-nodes-neuroverse
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## How It Works
|
|
30
|
+
|
|
31
|
+
The NeuroVerse Guard evaluates every action against your governance world — a portable set of rules, invariants, guards, and roles defined in a `.nv-world.zip` file.
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { loadWorld, evaluateGuard } from '@neuroverseos/governance';
|
|
35
|
+
|
|
36
|
+
const world = await loadWorld('./policy.nv-world.zip');
|
|
37
|
+
const verdict = evaluateGuard({ intent: 'Delete user account', tool: 'admin-api' }, world);
|
|
38
|
+
// verdict.status → 'ALLOW' | 'BLOCK' | 'PAUSE'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Three functions. No network. No LLM. Deterministic.
|
|
42
|
+
|
|
43
|
+
## Node Configuration
|
|
44
|
+
|
|
45
|
+
| Field | Description |
|
|
46
|
+
|-------|-------------|
|
|
47
|
+
| **World Source** | Load from a file path or base64-encoded zip |
|
|
48
|
+
| **World File Path** | Path to your `.nv-world.zip` or extracted directory |
|
|
49
|
+
| **World File (Base64)** | Base64-encoded zip — useful in Docker/cloud environments |
|
|
50
|
+
| **Intent** | What the agent is trying to do |
|
|
51
|
+
| **Tool** | Which tool/API the agent is calling (optional) |
|
|
52
|
+
| **Enforcement Level** | Basic, Standard, or Strict |
|
|
53
|
+
|
|
54
|
+
### Outputs
|
|
55
|
+
|
|
56
|
+
The node has three separate output connections on the canvas:
|
|
57
|
+
|
|
58
|
+
| Output | When | Contains |
|
|
59
|
+
|--------|------|----------|
|
|
60
|
+
| **ALLOW** | Action is permitted | Original data + verdict |
|
|
61
|
+
| **BLOCK** | Action violates rules | Original data + verdict.reason + verdict.evidence |
|
|
62
|
+
| **PAUSE** | Action needs human review | Original data + verdict.reason + verdict.evidence |
|
|
63
|
+
|
|
64
|
+
Wire each output to different downstream nodes to handle each case visually.
|
|
65
|
+
|
|
66
|
+
## Example Workflow
|
|
67
|
+
|
|
68
|
+
Import `example-workflow.json` from this repo to see a complete governance flow:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Webhook Trigger → Simulate Agent Action → NeuroVerse Guard
|
|
72
|
+
↓ ↓ ↓
|
|
73
|
+
ALLOW BLOCK PAUSE
|
|
74
|
+
↓ ↓ ↓
|
|
75
|
+
Execute Log Request
|
|
76
|
+
Action + Approval
|
|
77
|
+
Alert
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The example accepts a POST request with `intent` and `tool`, runs it through the guard, and returns the appropriate response (200 for ALLOW, 403 for BLOCK, 202 for PAUSE).
|
|
81
|
+
|
|
82
|
+
## Building Your World File
|
|
83
|
+
|
|
84
|
+
A world file contains your governance rules: invariants that must always hold, guards that intercept specific actions, roles with permissions, and kernel rules for system-level constraints.
|
|
85
|
+
|
|
86
|
+
**[Build your world file free at neuroverseos.com](https://neuroverseos.com)** — upload your docs or start from a template.
|
|
87
|
+
|
|
88
|
+
## Verdict Object
|
|
89
|
+
|
|
90
|
+
Every output includes a `verdict` object:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"verdict": {
|
|
95
|
+
"status": "BLOCK",
|
|
96
|
+
"reason": "Action violates invariant: margin_floor_15_percent",
|
|
97
|
+
"ruleId": "guard-pricing-change",
|
|
98
|
+
"evidence": {
|
|
99
|
+
"matchedGuard": "pricing-change-guard",
|
|
100
|
+
"invariantRef": "margin_floor_15_percent",
|
|
101
|
+
"evaluationChain": ["safety", "roles", "guards", "kernel", "level"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
Apache-2.0
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
export declare class NeuroVerseGuard implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=NeuroVerseGuard.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeuroVerseGuard.node.d.ts","sourceRoot":"","sources":["../../../nodes/NeuroVerseGuard/NeuroVerseGuard.node.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAErB,MAAM,cAAc,CAAC;AAWtB,qBAAa,eAAgB,YAAW,SAAS;IAC/C,WAAW,EAAE,oBAAoB,CAiI/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAmFxE"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NeuroVerseGuard = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const governance_1 = require("@neuroverseos/governance");
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const path_1 = require("path");
|
|
8
|
+
const os_1 = require("os");
|
|
9
|
+
// Cache loaded worlds by key to avoid re-reading on every execution
|
|
10
|
+
const worldCache = new Map();
|
|
11
|
+
class NeuroVerseGuard {
|
|
12
|
+
description = {
|
|
13
|
+
displayName: 'NeuroVerse Guard',
|
|
14
|
+
name: 'neuroVerseGuard',
|
|
15
|
+
icon: 'file:neuroverse.svg',
|
|
16
|
+
group: ['transform'],
|
|
17
|
+
version: 1,
|
|
18
|
+
subtitle: '={{$parameter["intent"]}}',
|
|
19
|
+
description: 'Evaluate an AI agent action against a NeuroVerse governance world. Routes to ALLOW, BLOCK, or PAUSE. Deterministic, sub-millisecond, no LLM calls.',
|
|
20
|
+
defaults: {
|
|
21
|
+
name: 'NeuroVerse Guard',
|
|
22
|
+
},
|
|
23
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
24
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main, n8n_workflow_1.NodeConnectionTypes.Main, n8n_workflow_1.NodeConnectionTypes.Main],
|
|
25
|
+
outputNames: ['ALLOW', 'BLOCK', 'PAUSE'],
|
|
26
|
+
properties: [
|
|
27
|
+
// ─── World Source ─────────────────────────────────────────────
|
|
28
|
+
{
|
|
29
|
+
displayName: 'World Source',
|
|
30
|
+
name: 'worldSource',
|
|
31
|
+
type: 'options',
|
|
32
|
+
options: [
|
|
33
|
+
{
|
|
34
|
+
name: 'File Path',
|
|
35
|
+
value: 'filePath',
|
|
36
|
+
description: 'Load from a .nv-world.zip file or directory on disk',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'Base64',
|
|
40
|
+
value: 'base64',
|
|
41
|
+
description: 'Load from a base64-encoded .nv-world.zip (from another node or API)',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
default: 'filePath',
|
|
45
|
+
description: 'How to load the governance world file.',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
displayName: 'World File Path',
|
|
49
|
+
name: 'worldFilePath',
|
|
50
|
+
type: 'string',
|
|
51
|
+
default: '',
|
|
52
|
+
required: true,
|
|
53
|
+
placeholder: '/data/policy.nv-world.zip',
|
|
54
|
+
description: 'Path to a .nv-world.zip file or extracted world directory. Build your world file free at neuroverseos.com.',
|
|
55
|
+
displayOptions: {
|
|
56
|
+
show: {
|
|
57
|
+
worldSource: ['filePath'],
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
displayName: 'World File (Base64)',
|
|
63
|
+
name: 'worldFileBase64',
|
|
64
|
+
type: 'string',
|
|
65
|
+
default: '',
|
|
66
|
+
required: true,
|
|
67
|
+
placeholder: 'UEsDBBQAAAAI...',
|
|
68
|
+
description: 'Base64-encoded .nv-world.zip content. Useful in Docker/cloud where file paths are unavailable.',
|
|
69
|
+
displayOptions: {
|
|
70
|
+
show: {
|
|
71
|
+
worldSource: ['base64'],
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
// ─── Guard Event ──────────────────────────────────────────────
|
|
76
|
+
{
|
|
77
|
+
displayName: 'Intent',
|
|
78
|
+
name: 'intent',
|
|
79
|
+
type: 'string',
|
|
80
|
+
default: '',
|
|
81
|
+
required: true,
|
|
82
|
+
placeholder: 'Delete user account',
|
|
83
|
+
description: 'What the agent is trying to do — a plain-language description of the action.',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Tool',
|
|
87
|
+
name: 'tool',
|
|
88
|
+
type: 'string',
|
|
89
|
+
default: '',
|
|
90
|
+
required: false,
|
|
91
|
+
placeholder: 'admin-api',
|
|
92
|
+
description: 'Which tool or API the agent is calling (optional but improves guard precision).',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Enforcement Level',
|
|
96
|
+
name: 'level',
|
|
97
|
+
type: 'options',
|
|
98
|
+
options: [
|
|
99
|
+
{ name: 'Basic', value: 'basic', description: 'Permissive — only block clear violations' },
|
|
100
|
+
{ name: 'Standard', value: 'standard', description: 'Balanced — block violations, pause ambiguous' },
|
|
101
|
+
{ name: 'Strict', value: 'strict', description: 'Conservative — block or pause anything uncertain' },
|
|
102
|
+
],
|
|
103
|
+
default: 'standard',
|
|
104
|
+
description: 'How strictly to enforce governance rules.',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
displayName: 'Additional Fields',
|
|
108
|
+
name: 'additionalFields',
|
|
109
|
+
type: 'collection',
|
|
110
|
+
placeholder: 'Add Field',
|
|
111
|
+
default: {},
|
|
112
|
+
options: [
|
|
113
|
+
{
|
|
114
|
+
displayName: 'Irreversible',
|
|
115
|
+
name: 'irreversible',
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
default: false,
|
|
118
|
+
description: 'Whether this action is irreversible (deletes, sends, publishes).',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
displayName: 'Role',
|
|
122
|
+
name: 'role',
|
|
123
|
+
type: 'string',
|
|
124
|
+
default: '',
|
|
125
|
+
description: 'The role of the agent performing the action.',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
displayName: 'Arguments (JSON)',
|
|
129
|
+
name: 'args',
|
|
130
|
+
type: 'string',
|
|
131
|
+
default: '',
|
|
132
|
+
placeholder: '{"userId": "123"}',
|
|
133
|
+
description: 'Tool arguments as a JSON object string.',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
};
|
|
139
|
+
async execute() {
|
|
140
|
+
const items = this.getInputData();
|
|
141
|
+
const allowItems = [];
|
|
142
|
+
const blockItems = [];
|
|
143
|
+
const pauseItems = [];
|
|
144
|
+
for (let i = 0; i < items.length; i++) {
|
|
145
|
+
const worldSource = this.getNodeParameter('worldSource', i);
|
|
146
|
+
const intent = this.getNodeParameter('intent', i);
|
|
147
|
+
const tool = this.getNodeParameter('tool', i);
|
|
148
|
+
const level = this.getNodeParameter('level', i);
|
|
149
|
+
const additionalFields = this.getNodeParameter('additionalFields', i);
|
|
150
|
+
// ─── Load world ─────────────────────────────────────────────
|
|
151
|
+
let cacheKey;
|
|
152
|
+
if (worldSource === 'base64') {
|
|
153
|
+
const base64 = this.getNodeParameter('worldFileBase64', i);
|
|
154
|
+
cacheKey = `base64:${base64.substring(0, 64)}:${base64.length}`;
|
|
155
|
+
if (!worldCache.has(cacheKey)) {
|
|
156
|
+
// Write to temp file then load (supports both current and future governance versions)
|
|
157
|
+
const tmp = (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), 'nv-guard-'));
|
|
158
|
+
const tmpZip = (0, path_1.join)(tmp, 'world.nv-world.zip');
|
|
159
|
+
(0, fs_1.writeFileSync)(tmpZip, Buffer.from(base64, 'base64'));
|
|
160
|
+
const world = await (0, governance_1.loadWorld)(tmpZip);
|
|
161
|
+
worldCache.set(cacheKey, world);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
cacheKey = this.getNodeParameter('worldFilePath', i);
|
|
166
|
+
if (!worldCache.has(cacheKey)) {
|
|
167
|
+
worldCache.set(cacheKey, await (0, governance_1.loadWorld)(cacheKey));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
const world = worldCache.get(cacheKey);
|
|
171
|
+
// ─── Build guard event ──────────────────────────────────────
|
|
172
|
+
const event = { intent };
|
|
173
|
+
if (tool)
|
|
174
|
+
event.tool = tool;
|
|
175
|
+
if (additionalFields.irreversible)
|
|
176
|
+
event.irreversible = true;
|
|
177
|
+
if (additionalFields.role)
|
|
178
|
+
event.role = additionalFields.role;
|
|
179
|
+
if (additionalFields.args) {
|
|
180
|
+
try {
|
|
181
|
+
event.args = JSON.parse(additionalFields.args);
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
event.args = additionalFields.args;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// ─── Evaluate ───────────────────────────────────────────────
|
|
188
|
+
const verdict = (0, governance_1.evaluateGuard)(event, world, { level });
|
|
189
|
+
const outputItem = {
|
|
190
|
+
json: {
|
|
191
|
+
...items[i].json,
|
|
192
|
+
verdict: {
|
|
193
|
+
status: verdict.status,
|
|
194
|
+
reason: verdict.reason ?? null,
|
|
195
|
+
ruleId: verdict.ruleId ?? null,
|
|
196
|
+
evidence: verdict.evidence ?? null,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
// ─── Route to output ────────────────────────────────────────
|
|
201
|
+
if (verdict.status === 'BLOCK') {
|
|
202
|
+
blockItems.push(outputItem);
|
|
203
|
+
}
|
|
204
|
+
else if (verdict.status === 'PAUSE') {
|
|
205
|
+
pauseItems.push(outputItem);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
allowItems.push(outputItem);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return [allowItems, blockItems, pauseItems];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
exports.NeuroVerseGuard = NeuroVerseGuard;
|
|
215
|
+
//# sourceMappingURL=NeuroVerseGuard.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeuroVerseGuard.node.js","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K,OAAO,EAAE,CAAC;gBACtC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9B,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;QAED,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;IAC9C,CAAC;CACF;AAvND,0CAuNC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
|
2
|
+
<rect width="64" height="64" rx="12" fill="#0F172A"/>
|
|
3
|
+
<path d="M32 12L48 22v20L32 52 16 42V22L32 12z" stroke="#38BDF8" stroke-width="2.5" fill="none"/>
|
|
4
|
+
<path d="M32 18L44 25v14L32 46 20 39V25L32 18z" stroke="#38BDF8" stroke-width="1.5" fill="none" opacity="0.5"/>
|
|
5
|
+
<circle cx="32" cy="32" r="6" fill="#38BDF8"/>
|
|
6
|
+
<path d="M29 32l2 2 4-4" stroke="#0F172A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuroverseos/n8n-nodes-neuroverse",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "NeuroVerse Guard node for n8n. Evaluate AI agent actions against governance rules and route workflows with ALLOW, BLOCK, or PAUSE decisions.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node",
|
|
7
|
+
"n8n",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"ai-governance",
|
|
10
|
+
"guardrails",
|
|
11
|
+
"automation",
|
|
12
|
+
"neuroverse"
|
|
13
|
+
],
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"homepage": "https://neuroverseos.com",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/NeuroverseOS/n8n-nodes-neuroverse.git"
|
|
19
|
+
},
|
|
20
|
+
"main": "dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.js",
|
|
21
|
+
"n8n": {
|
|
22
|
+
"n8nNodesApiVersion": 1,
|
|
23
|
+
"nodes": [
|
|
24
|
+
"dist/nodes/NeuroVerseGuard/NeuroVerseGuard.node.js"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "tsc && cp nodes/NeuroVerseGuard/neuroverse.svg dist/nodes/NeuroVerseGuard/neuroverse.svg",
|
|
29
|
+
"dev": "tsc --watch",
|
|
30
|
+
"prepublishOnly": "npm run build",
|
|
31
|
+
"lint": "eslint nodes/ --ext .ts"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@neuroverseos/governance": "^0.2.2",
|
|
38
|
+
"n8n-nodes-neuroverse": "^0.1.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^22.0.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
43
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
44
|
+
"eslint": "^8.0.0",
|
|
45
|
+
"n8n-workflow": "^1.0.0",
|
|
46
|
+
"typescript": "^5.3.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"n8n-workflow": ">=1.0.0"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18"
|
|
53
|
+
}
|
|
54
|
+
}
|