@mibo-ai/n8n-nodes-mibo-testing 0.2.1 → 1.0.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/LICENSE +21 -674
- package/README.md +63 -122
- package/dist/credentials/MiboTestingApi.credentials.d.ts.map +1 -1
- package/dist/credentials/MiboTestingApi.credentials.js +1 -1
- package/dist/credentials/MiboTestingApi.credentials.js.map +1 -1
- package/dist/nodes/MiboTesting/MiboTesting.node.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/MiboTesting.node.js +55 -260
- package/dist/nodes/MiboTesting/MiboTesting.node.js.map +1 -1
- package/dist/nodes/MiboTesting/builders.d.ts +2 -3
- package/dist/nodes/MiboTesting/builders.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/builders.js +39 -51
- package/dist/nodes/MiboTesting/builders.js.map +1 -1
- package/dist/nodes/MiboTesting/constants.d.ts +3 -2
- package/dist/nodes/MiboTesting/constants.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/constants.js +4 -3
- package/dist/nodes/MiboTesting/constants.js.map +1 -1
- package/dist/nodes/MiboTesting/mibo-client.d.ts +3 -3
- package/dist/nodes/MiboTesting/mibo-client.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/mibo-client.js.map +1 -1
- package/dist/nodes/MiboTesting/types.d.ts +25 -32
- package/dist/nodes/MiboTesting/types.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/utils.d.ts +27 -3
- package/dist/nodes/MiboTesting/utils.d.ts.map +1 -1
- package/dist/nodes/MiboTesting/utils.js +72 -7
- package/dist/nodes/MiboTesting/utils.js.map +1 -1
- package/package.json +23 -26
package/README.md
CHANGED
|
@@ -4,14 +4,12 @@ n8n community node for **Mibo Testing** - a platform for semantic and procedural
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@mibo-ai/n8n-nodes-mibo-testing)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **Request ID Correlation**: Auto-detects `x-request-id` from webhook headers for active testing
|
|
14
|
-
- **Passthrough Design**: Captures traces transparently without modifying your workflow data
|
|
7
|
+
- **Canonical OTEL-shaped trace**: emits one span per executed workflow node in the Mibo Custom API shape (`{spans: [...]}`), the same shape the dashboard renders. Works on **n8n Cloud and self-hosted** — no OTel SDK, no exporter, no host-level config.
|
|
8
|
+
- **Automatic workflow capture**: discovers every executed node via the n8n API (when credentials carry an n8n API key) or via an upstream `Get Workflow` node. Auto-utility nodes (`stickyNote`, `noOp`, `wait`, …) are excluded.
|
|
9
|
+
- **Parent linking**: `parent_span_id` follows the n8n connection graph so traces render as the workflow structure.
|
|
10
|
+
- **Request-id correlation**: sets `x-request-id` from the manual override, then from incoming webhook headers, falling back to the n8n execution id.
|
|
11
|
+
- **Gzip on large payloads**: payloads above 5 MB are compressed before POST.
|
|
12
|
+
- **Passthrough**: input items pass through unchanged; only a `_miboTrace` summary is appended.
|
|
15
13
|
|
|
16
14
|
## Installation
|
|
17
15
|
|
|
@@ -43,50 +41,30 @@ Create a new credential of type **Mibo Testing API** with the following fields:
|
|
|
43
41
|
|
|
44
42
|
### Node Setup
|
|
45
43
|
|
|
46
|
-
Add the **Mibo Testing** node at the end of your workflow (or wherever you want to capture the trace).
|
|
47
|
-
|
|
48
|
-
#### Auto-detect Mode (Recommended)
|
|
44
|
+
Add the **Mibo Testing** node at the end of your workflow (or wherever you want to capture the trace). It always captures every executed node in the workflow — there are no filters or manual node lists to maintain.
|
|
49
45
|
|
|
50
|
-
|
|
46
|
+
The node needs to know which nodes the workflow contains. It supports two sources, tried in this order:
|
|
51
47
|
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
1. **n8n REST API (recommended)** — set **n8n API Key** in the credentials. Works out of the box on both n8n Cloud and self-hosted.
|
|
49
|
+
2. **Upstream `Get Workflow` node** — connect an n8n `Get Workflow` node before the Mibo Testing node; its `nodes` and `connections` output are used as the fallback source.
|
|
54
50
|
|
|
55
51
|
```
|
|
56
|
-
|
|
52
|
+
With n8n API credentials:
|
|
57
53
|
[Trigger] --> [Your Nodes] --> [Mibo Testing]
|
|
58
54
|
|
|
59
|
-
|
|
55
|
+
Without n8n API credentials:
|
|
60
56
|
[Trigger] --> [Your Nodes] --> [Get Workflow] --> [Mibo Testing]
|
|
61
57
|
```
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| Filter | What it captures |
|
|
66
|
-
|--------|-----------------|
|
|
67
|
-
| All Nodes | Every node in the workflow (excluding internal/utility types) |
|
|
68
|
-
| AI Nodes Only | Only nodes with "AI" in their name |
|
|
69
|
-
| HTTP/Webhook Only | Only HTTP Request and Webhook nodes |
|
|
70
|
-
| Exclude Utility Nodes | Everything except Set, If, Merge, and Switch |
|
|
71
|
-
| Custom | You specify exact node names, separated by commas |
|
|
72
|
-
|
|
73
|
-
#### Manual Mode
|
|
74
|
-
|
|
75
|
-
Leave **Auto-detect Workflow Nodes** off and enter node names separated by commas in the **Target Nodes** field.
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
[Trigger] --> [Your Nodes] --> [Mibo Testing]
|
|
79
|
-
^
|
|
80
|
-
Target Nodes: "Webhook, AI Agent, HTTP Request"
|
|
81
|
-
```
|
|
59
|
+
If neither source is available, the node errors with a link to <https://docs.mibo-ai.com/n8n-node/setup/>.
|
|
82
60
|
|
|
83
|
-
###
|
|
61
|
+
### Node Parameters
|
|
84
62
|
|
|
85
63
|
| Parameter | Description |
|
|
86
64
|
|-----------|-------------|
|
|
87
|
-
| **
|
|
88
|
-
| **
|
|
89
|
-
| **Include Metadata** | Add environment, version, and custom fields to the trace. |
|
|
65
|
+
| **Agent ID** | Your agent UUID in Mibo Testing. Leave empty if the API key is already scoped to a single agent. |
|
|
66
|
+
| **Request ID** | Override the `x-request-id` used to correlate this trace. Defaults to the incoming webhook header, falling back to the n8n execution id. |
|
|
67
|
+
| **Include Metadata** | Add environment, version, and custom fields to the trace metadata. |
|
|
90
68
|
|
|
91
69
|
### Advanced Options
|
|
92
70
|
|
|
@@ -107,22 +85,57 @@ The node passes through all input data unchanged, adding a `_miboTrace` object t
|
|
|
107
85
|
"platformId": "550e8400-...",
|
|
108
86
|
"requestId": "req-456",
|
|
109
87
|
"timestamp": "2026-03-08T10:30:00.000Z",
|
|
110
|
-
"
|
|
111
|
-
"targetNodes": ["Webhook", "AI Agent", "HTTP Request"],
|
|
88
|
+
"spansSent": 3,
|
|
112
89
|
"payloadSize": "12.5 KB"
|
|
113
90
|
}
|
|
114
91
|
}
|
|
115
92
|
```
|
|
116
93
|
|
|
94
|
+
## Trace shape
|
|
95
|
+
|
|
96
|
+
The node POSTs to `POST /public/traces` using the Mibo **Custom API** shape:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"spans": [
|
|
101
|
+
{
|
|
102
|
+
"span_id": "<uuid>",
|
|
103
|
+
"parent_span_id": null,
|
|
104
|
+
"name": "Webhook",
|
|
105
|
+
"attributes": {
|
|
106
|
+
"n8n.node.type": "n8n-nodes-base.webhook",
|
|
107
|
+
"n8n.node.status": "success",
|
|
108
|
+
"n8n.node.output": "{\"body\":\"hi\"}"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"span_id": "<uuid>",
|
|
113
|
+
"parent_span_id": "<webhook-span-id>",
|
|
114
|
+
"name": "AI Agent",
|
|
115
|
+
"attributes": {
|
|
116
|
+
"n8n.node.type": "@n8n/n8n-nodes-langchain.agent",
|
|
117
|
+
"n8n.node.status": "success",
|
|
118
|
+
"n8n.node.output": "{\"output\":\"reply\"}"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"externalMetadata": { "workflowId": "..." },
|
|
123
|
+
"metadata": { "workflowId": "...", "workflowName": "...", "timestamp": "..." },
|
|
124
|
+
"platformId": "<optional>"
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`span.name` is the **n8n display name** of the node — the same string you see in the n8n editor and the same string Mibo `node_call` assertions match against. Identity (the `externalId` Mibo uses for create-or-replace correlation) is sent via the `x-request-id` HTTP header, not in the body. See <https://docs.mibo-ai.com/n8n-node/setup/> for the full reference.
|
|
129
|
+
|
|
117
130
|
---
|
|
118
131
|
|
|
119
132
|
## Development
|
|
120
133
|
|
|
121
134
|
### Prerequisites
|
|
122
135
|
|
|
123
|
-
- Node.js >= 20
|
|
124
|
-
- pnpm >= 10
|
|
125
|
-
- Docker (
|
|
136
|
+
- Node.js >= 20
|
|
137
|
+
- pnpm >= 10
|
|
138
|
+
- Docker (for the default dev flow)
|
|
126
139
|
|
|
127
140
|
### Setup
|
|
128
141
|
|
|
@@ -132,96 +145,24 @@ cd mibo-testing-n8n-node
|
|
|
132
145
|
pnpm install
|
|
133
146
|
```
|
|
134
147
|
|
|
135
|
-
### Development
|
|
148
|
+
### Development
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
Requires n8n installed globally:
|
|
150
|
+
The default dev flow runs n8n in Docker — no global installs needed.
|
|
140
151
|
|
|
141
152
|
```bash
|
|
142
|
-
# Install n8n globally (one time)
|
|
143
|
-
pnpm add -g n8n
|
|
144
|
-
|
|
145
|
-
# Build and link the node
|
|
146
|
-
pnpm run dev:link
|
|
147
|
-
|
|
148
|
-
# Link to your n8n installation (one time)
|
|
149
|
-
cd ~/.n8n && npm link @mibo-ai/n8n-nodes-mibo-testing
|
|
150
|
-
|
|
151
|
-
# Start development mode (builds, watches, restarts n8n on changes)
|
|
152
153
|
pnpm run dev
|
|
153
154
|
```
|
|
154
155
|
|
|
155
|
-
Open http://localhost:5678 to
|
|
156
|
-
|
|
157
|
-
#### Option 2: Docker Development
|
|
156
|
+
Builds the node, starts n8n in Docker, and watches for source changes. Open http://localhost:5678 — reload the workflow in n8n to pick up rebuilt code.
|
|
158
157
|
|
|
159
|
-
|
|
158
|
+
If you prefer running n8n directly on your machine (requires `n8n` installed globally):
|
|
160
159
|
|
|
161
160
|
```bash
|
|
162
|
-
pnpm run dev:
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Builds the project, starts n8n in Docker, and watches for file changes. Reload your workflow in n8n to pick up changes.
|
|
166
|
-
|
|
167
|
-
Open http://localhost:5678 to access n8n.
|
|
168
|
-
|
|
169
|
-
### Available Commands
|
|
170
|
-
|
|
171
|
-
| Command | Description |
|
|
172
|
-
|---------|-------------|
|
|
173
|
-
| `pnpm run build` | Compile TypeScript to `dist/` |
|
|
174
|
-
| `pnpm run dev` | Local development with hot reload |
|
|
175
|
-
| `pnpm run dev:docker` | Docker development with hot reload |
|
|
176
|
-
| `pnpm run dev:link` | Build and link for local n8n |
|
|
177
|
-
| `pnpm test` | Run unit tests |
|
|
178
|
-
| `pnpm test:watch` | Run tests in watch mode |
|
|
179
|
-
| `pnpm run check` | Run Biome linter and formatter |
|
|
180
|
-
| `pnpm run check:fix` | Auto-fix linting and formatting issues |
|
|
181
|
-
| `pnpm run docker:build` | Build production Docker image |
|
|
182
|
-
|
|
183
|
-
### Makefile Shortcuts
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
make help # Show all commands
|
|
187
|
-
make dev # Same as pnpm run dev
|
|
188
|
-
make dev-docker # Same as pnpm run dev:docker
|
|
189
|
-
make build # Same as pnpm run build
|
|
190
|
-
make check # Same as pnpm run check
|
|
191
|
-
make clean # Remove dist/ and node_modules/
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### Project Structure
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
├── nodes/MiboTesting/
|
|
198
|
-
│ ├── MiboTesting.node.ts # Main node implementation
|
|
199
|
-
│ ├── builders.ts # Trace payload builders
|
|
200
|
-
│ ├── constants.ts # Configuration constants
|
|
201
|
-
│ ├── mibo-client.ts # HTTP client for Mibo API
|
|
202
|
-
│ ├── types.ts # TypeScript interfaces
|
|
203
|
-
│ ├── utils.ts # Utility functions
|
|
204
|
-
│ └── mibo-testing.svg # Node icon
|
|
205
|
-
├── credentials/
|
|
206
|
-
│ └── MiboTestingApi.credentials.ts
|
|
207
|
-
├── tests/
|
|
208
|
-
│ ├── node.test.ts # Node execution tests
|
|
209
|
-
│ ├── builders.test.ts # Payload builder tests
|
|
210
|
-
│ ├── mibo-client.test.ts # HTTP client tests
|
|
211
|
-
│ └── utils.test.ts # Utility function tests
|
|
212
|
-
├── scripts/
|
|
213
|
-
│ ├── dev.mjs # Local dev script
|
|
214
|
-
│ ├── dev-docker.mjs # Docker dev script
|
|
215
|
-
│ └── copy-icons.mjs # Icon copy utility
|
|
216
|
-
├── docs/ # Internal documentation
|
|
217
|
-
├── dist/ # Compiled output (generated)
|
|
218
|
-
├── docker-compose.dev.yml # Docker development config
|
|
219
|
-
├── Dockerfile # Production Docker image
|
|
220
|
-
└── Makefile # Convenience commands
|
|
161
|
+
pnpm run dev:local
|
|
221
162
|
```
|
|
222
163
|
|
|
223
164
|
---
|
|
224
165
|
|
|
225
166
|
## License
|
|
226
167
|
|
|
227
|
-
[
|
|
168
|
+
[MIT](LICENSE)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiboTestingApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/MiboTestingApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,cAAe,YAAW,eAAe;IACpD,IAAI,SAAoB;IACxB,WAAW,SAAsB;IACjC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MiboTestingApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/MiboTestingApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,cAAc,CAAC;AAEtB,qBAAa,cAAe,YAAW,eAAe;IACpD,IAAI,SAAoB;IACxB,WAAW,SAAsB;IACjC,gBAAgB,SAA6C;IAC7D,IAAI,CAAC,EAA8B,IAAI,CAAC;IACxC,UAAU,EAAE,eAAe,EAAE,CA4B3B;IAEF,YAAY,EAAE,oBAAoB,CAQhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACH"}
|
|
@@ -4,7 +4,7 @@ exports.MiboTestingApi = void 0;
|
|
|
4
4
|
class MiboTestingApi {
|
|
5
5
|
name = 'miboTestingApi';
|
|
6
6
|
displayName = 'Mibo Testing API';
|
|
7
|
-
documentationUrl = 'https://docs.mibo-
|
|
7
|
+
documentationUrl = 'https://docs.mibo-ai.com/n8n-node/setup';
|
|
8
8
|
icon = 'file:mibo-testing.svg';
|
|
9
9
|
properties = [
|
|
10
10
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiboTestingApi.credentials.js","sourceRoot":"","sources":["../../credentials/MiboTestingApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,cAAc;IACzB,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GAAG,kBAAkB,CAAC;IACjC,gBAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"MiboTestingApi.credentials.js","sourceRoot":"","sources":["../../credentials/MiboTestingApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,cAAc;IACzB,IAAI,GAAG,gBAAgB,CAAC;IACxB,WAAW,GAAG,kBAAkB,CAAC;IACjC,gBAAgB,GAAG,yCAAyC,CAAC;IAC7D,IAAI,GAAI,uBAA+B,CAAC;IACxC,UAAU,GAAsB;QAC9B;YACE,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,wGAAwG;SAC3G;QACD;YACE,WAAW,EAAE,wBAAwB;YACrC,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,OAAO,EAAE,EAAE;YACX,WAAW,EACT,2RAA2R;SAC9R;QACD;YACE,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,8BAA8B;YACvC,WAAW,EACT,4NAA4N;SAC/N;KACF,CAAC;IAEF,YAAY,GAAyB;QACnC,IAAI,EAAE,SAAS;QACf,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,WAAW,EAAE,2BAA2B;gBACxC,cAAc,EAAE,kBAAkB;aACnC;SACF;KACF,CAAC;IAEF,IAAI,GAA2B;QAC7B,OAAO,EAAE;YACP,OAAO,EAAE,yBAAyB;YAClC,GAAG,EAAE,SAAS;YACd,MAAM,EAAE,KAAK;SACd;KACF,CAAC;CACH;AApDD,wCAoDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiboTesting.node.d.ts","sourceRoot":"","sources":["../../../nodes/MiboTesting/MiboTesting.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"MiboTesting.node.d.ts","sourceRoot":"","sources":["../../../nodes/MiboTesting/MiboTesting.node.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAyBtB,qBAAa,WAAY,YAAW,SAAS;IAC3C,WAAW,EAAE,oBAAoB,CA2G/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CAsMxE"}
|