@mibo-ai/n8n-nodes-mibo-testing 0.2.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.
Files changed (32) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +227 -0
  3. package/dist/credentials/MiboTestingApi.credentials.d.ts +11 -0
  4. package/dist/credentials/MiboTestingApi.credentials.d.ts.map +1 -0
  5. package/dist/credentials/MiboTestingApi.credentials.js +53 -0
  6. package/dist/credentials/MiboTestingApi.credentials.js.map +1 -0
  7. package/dist/nodes/MiboTesting/MiboTesting.node.d.ts +6 -0
  8. package/dist/nodes/MiboTesting/MiboTesting.node.d.ts.map +1 -0
  9. package/dist/nodes/MiboTesting/MiboTesting.node.js +468 -0
  10. package/dist/nodes/MiboTesting/MiboTesting.node.js.map +1 -0
  11. package/dist/nodes/MiboTesting/builders.d.ts +6 -0
  12. package/dist/nodes/MiboTesting/builders.d.ts.map +1 -0
  13. package/dist/nodes/MiboTesting/builders.js +102 -0
  14. package/dist/nodes/MiboTesting/builders.js.map +1 -0
  15. package/dist/nodes/MiboTesting/constants.d.ts +21 -0
  16. package/dist/nodes/MiboTesting/constants.d.ts.map +1 -0
  17. package/dist/nodes/MiboTesting/constants.js +36 -0
  18. package/dist/nodes/MiboTesting/constants.js.map +1 -0
  19. package/dist/nodes/MiboTesting/mibo-client.d.ts +8 -0
  20. package/dist/nodes/MiboTesting/mibo-client.d.ts.map +1 -0
  21. package/dist/nodes/MiboTesting/mibo-client.js +91 -0
  22. package/dist/nodes/MiboTesting/mibo-client.js.map +1 -0
  23. package/dist/nodes/MiboTesting/mibo-testing.svg +23 -0
  24. package/dist/nodes/MiboTesting/types.d.ts +79 -0
  25. package/dist/nodes/MiboTesting/types.d.ts.map +1 -0
  26. package/dist/nodes/MiboTesting/types.js +3 -0
  27. package/dist/nodes/MiboTesting/types.js.map +1 -0
  28. package/dist/nodes/MiboTesting/utils.d.ts +8 -0
  29. package/dist/nodes/MiboTesting/utils.d.ts.map +1 -0
  30. package/dist/nodes/MiboTesting/utils.js +88 -0
  31. package/dist/nodes/MiboTesting/utils.js.map +1 -0
  32. package/package.json +73 -0
package/README.md ADDED
@@ -0,0 +1,227 @@
1
+ # n8n-nodes-mibo-testing
2
+
3
+ n8n community node for **Mibo Testing** - a platform for semantic and procedural testing of AI workflows.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@mibo-ai/n8n-nodes-mibo-testing)](https://www.npmjs.com/package/@mibo-ai/n8n-nodes-mibo-testing)
6
+
7
+ ## Features
8
+
9
+ - **Auto-detect Workflow Nodes**: Automatically discover all nodes in your workflow via the n8n API, or fall back to the "Get Workflow" node
10
+ - **Smart Node Filtering**: Filter captured nodes by preset (All, AI Only, HTTP/Webhook, Exclude Utility) or pick specific nodes
11
+ - **Optimized Trace Format**: Compact payloads with node type information for server-side AI auto-detection
12
+ - **Automatic Compression**: Payloads larger than 5MB are gzip-compressed before sending
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
15
+
16
+ ## Installation
17
+
18
+ ### Community Nodes (Recommended)
19
+
20
+ 1. Go to **Settings > Community Nodes** in your n8n instance
21
+ 2. Search for `@mibo-ai/n8n-nodes-mibo-testing`
22
+ 3. Click **Install**
23
+
24
+ ### Manual Installation
25
+
26
+ ```bash
27
+ npm install @mibo-ai/n8n-nodes-mibo-testing
28
+ ```
29
+
30
+ Then restart your n8n instance.
31
+
32
+ ## Configuration
33
+
34
+ ### Credentials
35
+
36
+ Create a new credential of type **Mibo Testing API** with the following fields:
37
+
38
+ | Field | Required | Description |
39
+ |-------|----------|-------------|
40
+ | **API Key** | Yes | Your Mibo Testing API key. Find it in your Mibo Testing dashboard under **Settings > API Keys**. |
41
+ | **n8n API Key** | No | Your n8n instance API key. Enables automatic workflow node detection without needing a separate "Get Workflow" node. To create one: open n8n, go to **Settings > API**, and click **Create an API Key**. The key only needs the **workflow:read** scope. |
42
+ | **n8n Base URL** | No | The URL where your n8n instance is running. Defaults to `http://localhost:5678` which works for most setups since the node runs inside n8n itself. Change only for n8n Cloud or custom deployments. |
43
+
44
+ ### Node Setup
45
+
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)
49
+
50
+ Enable **Auto-detect Workflow Nodes** to automatically discover all nodes in your workflow.
51
+
52
+ - If you configured the **n8n API Key** and **n8n Base URL** in the credentials, it works automatically with no extra setup.
53
+ - If you didn't configure n8n API credentials, connect an n8n **"Get Workflow"** node before this one as a fallback.
54
+
55
+ ```
56
+ Auto-detect with n8n API credentials:
57
+ [Trigger] --> [Your Nodes] --> [Mibo Testing]
58
+
59
+ Fallback without n8n API credentials:
60
+ [Trigger] --> [Your Nodes] --> [Get Workflow] --> [Mibo Testing]
61
+ ```
62
+
63
+ **Node Filter** options when using Auto-detect:
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
+ ```
82
+
83
+ ### Other Parameters
84
+
85
+ | Parameter | Description |
86
+ |-----------|-------------|
87
+ | **Request ID** | The `x-request-id` for correlating this trace with test executions. Auto-detected from webhook headers if not provided. |
88
+ | **Platform ID** | Your platform UUID in Mibo Testing. If not provided, the API resolves it from your API key restrictions. |
89
+ | **Include Metadata** | Add environment, version, and custom fields to the trace. |
90
+
91
+ ### Advanced Options
92
+
93
+ | Option | Default | Description |
94
+ |--------|---------|-------------|
95
+ | Timeout (Seconds) | 30 | Maximum time to wait for the Mibo Testing server to respond. |
96
+
97
+ ## Output
98
+
99
+ The node passes through all input data unchanged, adding a `_miboTrace` object to each item:
100
+
101
+ ```json
102
+ {
103
+ "original_field": "preserved",
104
+ "_miboTrace": {
105
+ "sent": true,
106
+ "traceId": "abc-123",
107
+ "platformId": "550e8400-...",
108
+ "requestId": "req-456",
109
+ "timestamp": "2026-03-08T10:30:00.000Z",
110
+ "nodesCollected": 3,
111
+ "targetNodes": ["Webhook", "AI Agent", "HTTP Request"],
112
+ "payloadSize": "12.5 KB"
113
+ }
114
+ }
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Development
120
+
121
+ ### Prerequisites
122
+
123
+ - Node.js >= 20.0.0
124
+ - pnpm >= 10.0.0
125
+ - Docker (optional, for Docker-based development)
126
+
127
+ ### Setup
128
+
129
+ ```bash
130
+ git clone https://github.com/mibo-ai/mibo-testing-n8n-node.git
131
+ cd mibo-testing-n8n-node
132
+ pnpm install
133
+ ```
134
+
135
+ ### Development Options
136
+
137
+ #### Option 1: Local Development (Recommended)
138
+
139
+ Requires n8n installed globally:
140
+
141
+ ```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
+ pnpm run dev
153
+ ```
154
+
155
+ Open http://localhost:5678 to access n8n.
156
+
157
+ #### Option 2: Docker Development
158
+
159
+ No global n8n installation needed:
160
+
161
+ ```bash
162
+ pnpm run dev:docker
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
221
+ ```
222
+
223
+ ---
224
+
225
+ ## License
226
+
227
+ [GPL-3.0-or-later](LICENSE)
@@ -0,0 +1,11 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, Icon, INodeProperties } from 'n8n-workflow';
2
+ export declare class MiboTestingApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ icon?: Icon;
7
+ properties: INodeProperties[];
8
+ authenticate: IAuthenticateGeneric;
9
+ test: ICredentialTestRequest;
10
+ }
11
+ //# sourceMappingURL=MiboTestingApi.credentials.d.ts.map
@@ -0,0 +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,SAAoD;IACpE,IAAI,CAAC,EAA8B,IAAI,CAAC;IACxC,UAAU,EAAE,eAAe,EAAE,CA4B3B;IAEF,YAAY,EAAE,oBAAoB,CAQhC;IAEF,IAAI,EAAE,sBAAsB,CAM1B;CACH"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MiboTestingApi = void 0;
4
+ class MiboTestingApi {
5
+ name = 'miboTestingApi';
6
+ displayName = 'Mibo Testing API';
7
+ documentationUrl = 'https://docs.mibo-testing.com/integrations/n8n';
8
+ icon = 'file:mibo-testing.svg';
9
+ properties = [
10
+ {
11
+ displayName: 'API Key',
12
+ name: 'apiKey',
13
+ type: 'string',
14
+ typeOptions: { password: true },
15
+ default: '',
16
+ required: true,
17
+ description: 'Your Mibo Testing API key. You can find this in your Mibo Testing dashboard under Settings > API Keys.',
18
+ },
19
+ {
20
+ displayName: 'n8n API Key (Optional)',
21
+ name: 'n8nApiKey',
22
+ type: 'string',
23
+ typeOptions: { password: true },
24
+ default: '',
25
+ description: 'Your n8n instance API key. This allows Mibo Testing to automatically read your workflow structure without needing an extra "Get Workflow" node. To create one: open your n8n instance, go to Settings > API, and click "Create an API Key". The key only needs the "workflow:read" scope.',
26
+ },
27
+ {
28
+ displayName: 'n8n API URL',
29
+ name: 'n8nBaseUrl',
30
+ type: 'string',
31
+ default: 'http://localhost:5678/api/v1',
32
+ description: 'The URL of your n8n Public API. The default works for most self-hosted setups. Change it if your n8n runs on a different port or domain. If left empty, the node will attempt to auto-detect it from your n8n environment.',
33
+ },
34
+ ];
35
+ authenticate = {
36
+ type: 'generic',
37
+ properties: {
38
+ headers: {
39
+ 'x-api-key': '={{$credentials?.apiKey}}',
40
+ 'Content-Type': 'application/json',
41
+ },
42
+ },
43
+ };
44
+ test = {
45
+ request: {
46
+ baseURL: 'https://api.mibo-ai.com',
47
+ url: '/health',
48
+ method: 'GET',
49
+ },
50
+ };
51
+ }
52
+ exports.MiboTestingApi = MiboTestingApi;
53
+ //# sourceMappingURL=MiboTestingApi.credentials.js.map
@@ -0,0 +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,gDAAgD,CAAC;IACpE,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"}
@@ -0,0 +1,6 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class MiboTesting implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
6
+ //# sourceMappingURL=MiboTesting.node.d.ts.map
@@ -0,0 +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;AAoBtB,qBAAa,WAAY,YAAW,SAAS;IAC3C,WAAW,EAAE,oBAAoB,CAyL/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA2UxE"}