bps-kit 1.2.2 → 1.3.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/.bps-kit.json +4 -4
- package/README.md +3 -0
- package/implementation_plan.md.resolved +37 -0
- package/package.json +2 -2
- package/templates/agents-template/ARCHITECTURE.md +21 -9
- package/templates/agents-template/agents/automation-specialist.md +157 -0
- package/templates/agents-template/rules/GEMINI.md +2 -10
- package/templates/agents-template/workflows/automate.md +153 -0
- package/templates/skills_normal/n8n-code-javascript/BUILTIN_FUNCTIONS.md +764 -0
- package/templates/skills_normal/n8n-code-javascript/COMMON_PATTERNS.md +1110 -0
- package/templates/skills_normal/n8n-code-javascript/DATA_ACCESS.md +782 -0
- package/templates/skills_normal/n8n-code-javascript/ERROR_PATTERNS.md +763 -0
- package/templates/skills_normal/n8n-code-javascript/README.md +350 -0
- package/templates/skills_normal/n8n-code-javascript/SKILL.md +699 -0
- package/templates/skills_normal/n8n-code-python/COMMON_PATTERNS.md +794 -0
- package/templates/skills_normal/n8n-code-python/DATA_ACCESS.md +702 -0
- package/templates/skills_normal/n8n-code-python/ERROR_PATTERNS.md +601 -0
- package/templates/skills_normal/n8n-code-python/README.md +386 -0
- package/templates/skills_normal/n8n-code-python/SKILL.md +748 -0
- package/templates/skills_normal/n8n-code-python/STANDARD_LIBRARY.md +974 -0
- package/templates/skills_normal/n8n-expression-syntax/COMMON_MISTAKES.md +393 -0
- package/templates/skills_normal/n8n-expression-syntax/EXAMPLES.md +483 -0
- package/templates/skills_normal/n8n-expression-syntax/README.md +93 -0
- package/templates/skills_normal/n8n-expression-syntax/SKILL.md +516 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/README.md +99 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/SEARCH_GUIDE.md +374 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/SKILL.md +642 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/VALIDATION_GUIDE.md +442 -0
- package/templates/skills_normal/n8n-mcp-tools-expert/WORKFLOW_GUIDE.md +618 -0
- package/templates/skills_normal/n8n-node-configuration/DEPENDENCIES.md +789 -0
- package/templates/skills_normal/n8n-node-configuration/OPERATION_PATTERNS.md +913 -0
- package/templates/skills_normal/n8n-node-configuration/README.md +364 -0
- package/templates/skills_normal/n8n-node-configuration/SKILL.md +785 -0
- package/templates/skills_normal/n8n-validation-expert/ERROR_CATALOG.md +943 -0
- package/templates/skills_normal/n8n-validation-expert/FALSE_POSITIVES.md +720 -0
- package/templates/skills_normal/n8n-validation-expert/README.md +290 -0
- package/templates/skills_normal/n8n-validation-expert/SKILL.md +689 -0
- package/templates/skills_normal/n8n-workflow-patterns/README.md +251 -0
- package/templates/skills_normal/n8n-workflow-patterns/SKILL.md +411 -0
- package/templates/skills_normal/n8n-workflow-patterns/ai_agent_workflow.md +784 -0
- package/templates/skills_normal/n8n-workflow-patterns/database_operations.md +785 -0
- package/templates/skills_normal/n8n-workflow-patterns/http_api_integration.md +734 -0
- package/templates/skills_normal/n8n-workflow-patterns/scheduled_tasks.md +773 -0
- package/templates/skills_normal/n8n-workflow-patterns/webhook_processing.md +545 -0
- package/templates/vault/n8n-code-javascript/SKILL.md +10 -10
- package/templates/vault/n8n-code-python/SKILL.md +11 -11
- package/templates/vault/n8n-expression-syntax/SKILL.md +4 -4
- package/templates/vault/n8n-mcp-tools-expert/SKILL.md +9 -9
- package/templates/vault/n8n-node-configuration/SKILL.md +2 -2
- package/templates/vault/n8n-validation-expert/SKILL.md +3 -3
- package/templates/vault/n8n-workflow-patterns/SKILL.md +11 -11
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Configuration Validation Tools Guide
|
|
2
|
+
|
|
3
|
+
Complete guide for validating node configurations and workflows.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Validation Philosophy
|
|
8
|
+
|
|
9
|
+
**Validate early, validate often**
|
|
10
|
+
|
|
11
|
+
Validation is typically iterative with validate → fix cycles
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## validate_node (UNIFIED VALIDATION)
|
|
16
|
+
|
|
17
|
+
The `validate_node` tool provides all validation capabilities with different modes.
|
|
18
|
+
|
|
19
|
+
### Quick Check (mode="minimal")
|
|
20
|
+
|
|
21
|
+
**Speed**: <50ms
|
|
22
|
+
|
|
23
|
+
**Use when**: Checking what fields are required
|
|
24
|
+
|
|
25
|
+
```javascript
|
|
26
|
+
validate_node({
|
|
27
|
+
nodeType: "nodes-base.slack",
|
|
28
|
+
config: {}, // Empty to see all required fields
|
|
29
|
+
mode: "minimal"
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Returns**:
|
|
34
|
+
```javascript
|
|
35
|
+
{
|
|
36
|
+
"valid": true, // Usually true (most nodes have no strict requirements)
|
|
37
|
+
"missingRequiredFields": []
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**When to use**: Planning configuration, seeing basic requirements
|
|
42
|
+
|
|
43
|
+
### Full Validation (mode="full", DEFAULT)
|
|
44
|
+
|
|
45
|
+
**Speed**: <100ms
|
|
46
|
+
|
|
47
|
+
**Use when**: Validating actual configuration before deployment
|
|
48
|
+
|
|
49
|
+
```javascript
|
|
50
|
+
validate_node({
|
|
51
|
+
nodeType: "nodes-base.slack",
|
|
52
|
+
config: {
|
|
53
|
+
resource: "channel",
|
|
54
|
+
operation: "create",
|
|
55
|
+
channel: "general"
|
|
56
|
+
},
|
|
57
|
+
profile: "runtime" // Recommended!
|
|
58
|
+
})
|
|
59
|
+
// mode="full" is the default
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Validation Profiles
|
|
65
|
+
|
|
66
|
+
Choose based on your stage:
|
|
67
|
+
|
|
68
|
+
**minimal** - Only required fields
|
|
69
|
+
- Fastest
|
|
70
|
+
- Most permissive
|
|
71
|
+
- Use: Quick checks during editing
|
|
72
|
+
|
|
73
|
+
**runtime** - Values + types (**RECOMMENDED**)
|
|
74
|
+
- Balanced validation
|
|
75
|
+
- Catches real errors
|
|
76
|
+
- Use: Pre-deployment validation
|
|
77
|
+
|
|
78
|
+
**ai-friendly** - Reduce false positives
|
|
79
|
+
- For AI-generated configs
|
|
80
|
+
- Tolerates minor issues
|
|
81
|
+
- Use: When AI configures nodes
|
|
82
|
+
|
|
83
|
+
**strict** - Maximum validation
|
|
84
|
+
- Strictest rules
|
|
85
|
+
- May have false positives
|
|
86
|
+
- Use: Production deployment
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Validation Response
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
{
|
|
94
|
+
"nodeType": "nodes-base.slack",
|
|
95
|
+
"workflowNodeType": "n8n-nodes-base.slack",
|
|
96
|
+
"displayName": "Slack",
|
|
97
|
+
"valid": false,
|
|
98
|
+
"errors": [
|
|
99
|
+
{
|
|
100
|
+
"type": "missing_required",
|
|
101
|
+
"property": "name",
|
|
102
|
+
"message": "Channel name is required",
|
|
103
|
+
"fix": "Provide a channel name (lowercase, no spaces, 1-80 characters)"
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"warnings": [
|
|
107
|
+
{
|
|
108
|
+
"type": "best_practice",
|
|
109
|
+
"property": "errorHandling",
|
|
110
|
+
"message": "Slack API can have rate limits",
|
|
111
|
+
"suggestion": "Add onError: 'continueRegularOutput' with retryOnFail"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"suggestions": [],
|
|
115
|
+
"summary": {
|
|
116
|
+
"hasErrors": true,
|
|
117
|
+
"errorCount": 1,
|
|
118
|
+
"warningCount": 1,
|
|
119
|
+
"suggestionCount": 0
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Error Types
|
|
125
|
+
|
|
126
|
+
- `missing_required` - Must fix
|
|
127
|
+
- `invalid_value` - Must fix
|
|
128
|
+
- `type_mismatch` - Must fix
|
|
129
|
+
- `best_practice` - Should fix (warning)
|
|
130
|
+
- `suggestion` - Optional improvement
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## validate_workflow (STRUCTURE VALIDATION)
|
|
135
|
+
|
|
136
|
+
**Speed**: 100-500ms
|
|
137
|
+
|
|
138
|
+
**Use when**: Checking complete workflow before execution
|
|
139
|
+
|
|
140
|
+
**Syntax**:
|
|
141
|
+
```javascript
|
|
142
|
+
validate_workflow({
|
|
143
|
+
workflow: {
|
|
144
|
+
nodes: [...], // Array of nodes
|
|
145
|
+
connections: {...} // Connections object
|
|
146
|
+
},
|
|
147
|
+
options: {
|
|
148
|
+
validateNodes: true, // Default: true
|
|
149
|
+
validateConnections: true, // Default: true
|
|
150
|
+
validateExpressions: true, // Default: true
|
|
151
|
+
profile: "runtime" // For node validation
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Validates**:
|
|
157
|
+
- Node configurations
|
|
158
|
+
- Connection validity (no broken references)
|
|
159
|
+
- Expression syntax ({{ }} patterns)
|
|
160
|
+
- Workflow structure (triggers, flow)
|
|
161
|
+
- AI connections (8 types)
|
|
162
|
+
|
|
163
|
+
**Returns**: Comprehensive validation report with errors, warnings, suggestions
|
|
164
|
+
|
|
165
|
+
### Validate by Workflow ID
|
|
166
|
+
|
|
167
|
+
```javascript
|
|
168
|
+
// Validate workflow already in n8n
|
|
169
|
+
n8n_validate_workflow({
|
|
170
|
+
id: "workflow-id",
|
|
171
|
+
options: {
|
|
172
|
+
validateNodes: true,
|
|
173
|
+
validateConnections: true,
|
|
174
|
+
validateExpressions: true,
|
|
175
|
+
profile: "runtime"
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Validation Loop Pattern
|
|
183
|
+
|
|
184
|
+
**Typical cycle**: 23s thinking, 58s fixing
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
1. Configure node
|
|
188
|
+
↓
|
|
189
|
+
2. validate_node (23s thinking about errors)
|
|
190
|
+
↓
|
|
191
|
+
3. Fix errors
|
|
192
|
+
↓
|
|
193
|
+
4. validate_node again (58s fixing)
|
|
194
|
+
↓
|
|
195
|
+
5. Repeat until valid
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Example**:
|
|
199
|
+
```javascript
|
|
200
|
+
// Iteration 1
|
|
201
|
+
let config = {
|
|
202
|
+
resource: "channel",
|
|
203
|
+
operation: "create"
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
const result1 = validate_node({
|
|
207
|
+
nodeType: "nodes-base.slack",
|
|
208
|
+
config,
|
|
209
|
+
profile: "runtime"
|
|
210
|
+
});
|
|
211
|
+
// → Error: Missing "name"
|
|
212
|
+
|
|
213
|
+
// Iteration 2 (~58s later)
|
|
214
|
+
config.name = "general";
|
|
215
|
+
|
|
216
|
+
const result2 = validate_node({
|
|
217
|
+
nodeType: "nodes-base.slack",
|
|
218
|
+
config,
|
|
219
|
+
profile: "runtime"
|
|
220
|
+
});
|
|
221
|
+
// → Valid!
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Auto-Sanitization System
|
|
227
|
+
|
|
228
|
+
**When it runs**: On ANY workflow update (create or update_partial)
|
|
229
|
+
|
|
230
|
+
**What it fixes** (automatically on ALL nodes):
|
|
231
|
+
1. Binary operators (equals, contains, greaterThan) → removes `singleValue`
|
|
232
|
+
2. Unary operators (isEmpty, isNotEmpty, true, false) → adds `singleValue: true`
|
|
233
|
+
3. Invalid operator structures → corrects to proper format
|
|
234
|
+
4. IF v2.2+ nodes → adds complete `conditions.options` metadata
|
|
235
|
+
5. Switch v3.2+ nodes → adds complete `conditions.options` for all rules
|
|
236
|
+
|
|
237
|
+
**What it CANNOT fix**:
|
|
238
|
+
- Broken connections (references to non-existent nodes)
|
|
239
|
+
- Branch count mismatches (3 Switch rules but only 2 outputs)
|
|
240
|
+
- Paradoxical corrupt states (API returns corrupt, rejects updates)
|
|
241
|
+
|
|
242
|
+
**Example**:
|
|
243
|
+
```javascript
|
|
244
|
+
// Before auto-sanitization
|
|
245
|
+
{
|
|
246
|
+
"type": "boolean",
|
|
247
|
+
"operation": "equals",
|
|
248
|
+
"singleValue": true // Binary operators shouldn't have this
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// After auto-sanitization (automatic!)
|
|
252
|
+
{
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"operation": "equals"
|
|
255
|
+
// singleValue removed automatically
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Recovery tools**:
|
|
260
|
+
- `cleanStaleConnections` operation - removes broken connections
|
|
261
|
+
- `n8n_autofix_workflow({id})` - preview/apply fixes
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## n8n_autofix_workflow (AUTO-FIX TOOL)
|
|
266
|
+
|
|
267
|
+
**Use when**: Validation errors need automatic fixes
|
|
268
|
+
|
|
269
|
+
```javascript
|
|
270
|
+
// Preview fixes (default - doesn't apply)
|
|
271
|
+
n8n_autofix_workflow({
|
|
272
|
+
id: "workflow-id",
|
|
273
|
+
applyFixes: false, // Preview mode
|
|
274
|
+
confidenceThreshold: "medium" // high, medium, low
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
// Apply fixes
|
|
278
|
+
n8n_autofix_workflow({
|
|
279
|
+
id: "workflow-id",
|
|
280
|
+
applyFixes: true
|
|
281
|
+
})
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Fix Types**:
|
|
285
|
+
- `expression-format` - Fix expression syntax
|
|
286
|
+
- `typeversion-correction` - Correct typeVersion
|
|
287
|
+
- `error-output-config` - Fix error output settings
|
|
288
|
+
- `webhook-missing-path` - Add missing webhook paths
|
|
289
|
+
- `typeversion-upgrade` - Upgrade to latest version
|
|
290
|
+
- `version-migration` - Apply version migrations
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Binary vs Unary Operators
|
|
295
|
+
|
|
296
|
+
**Binary operators** (compare two values):
|
|
297
|
+
- equals, notEquals, contains, notContains
|
|
298
|
+
- greaterThan, lessThan, startsWith, endsWith
|
|
299
|
+
- **Must NOT have** `singleValue: true`
|
|
300
|
+
|
|
301
|
+
**Unary operators** (check single value):
|
|
302
|
+
- isEmpty, isNotEmpty, true, false
|
|
303
|
+
- **Must have** `singleValue: true`
|
|
304
|
+
|
|
305
|
+
**Auto-sanitization fixes these automatically!**
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Handling Validation Errors
|
|
310
|
+
|
|
311
|
+
### Process
|
|
312
|
+
|
|
313
|
+
```
|
|
314
|
+
1. Read error message carefully
|
|
315
|
+
2. Check if it's a known false positive
|
|
316
|
+
3. Fix real errors
|
|
317
|
+
4. Validate again
|
|
318
|
+
5. Iterate until clean
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Common Errors
|
|
322
|
+
|
|
323
|
+
**"Required field missing"**
|
|
324
|
+
→ Add the field with appropriate value
|
|
325
|
+
|
|
326
|
+
**"Invalid value"**
|
|
327
|
+
→ Check allowed values in get_node output
|
|
328
|
+
|
|
329
|
+
**"Type mismatch"**
|
|
330
|
+
→ Convert to correct type (string/number/boolean)
|
|
331
|
+
|
|
332
|
+
**"Cannot have singleValue"**
|
|
333
|
+
→ Auto-sanitization will fix on next update
|
|
334
|
+
|
|
335
|
+
**"Missing operator metadata"**
|
|
336
|
+
→ Auto-sanitization will fix on next update
|
|
337
|
+
|
|
338
|
+
### False Positives
|
|
339
|
+
|
|
340
|
+
Some validation warnings may be acceptable:
|
|
341
|
+
- Optional best practices
|
|
342
|
+
- Node-specific edge cases
|
|
343
|
+
- Profile-dependent issues
|
|
344
|
+
|
|
345
|
+
Use **ai-friendly** profile to reduce false positives.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## Best Practices
|
|
350
|
+
|
|
351
|
+
### Do
|
|
352
|
+
|
|
353
|
+
- Use **runtime** profile for pre-deployment
|
|
354
|
+
- Validate after every configuration change
|
|
355
|
+
- Fix errors immediately (avg 58s)
|
|
356
|
+
- Iterate validation loop
|
|
357
|
+
- Trust auto-sanitization for operator issues
|
|
358
|
+
- Use `mode: "minimal"` for quick checks
|
|
359
|
+
- Use `n8n_autofix_workflow` for bulk fixes
|
|
360
|
+
- Activate workflows via API when ready (`activateWorkflow` operation)
|
|
361
|
+
|
|
362
|
+
### Don't
|
|
363
|
+
|
|
364
|
+
- Skip validation before deployment
|
|
365
|
+
- Ignore error messages
|
|
366
|
+
- Use strict profile during development (too many warnings)
|
|
367
|
+
- Assume validation passed (check result)
|
|
368
|
+
- Try to manually fix auto-sanitization issues
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Example: Complete Validation Workflow
|
|
373
|
+
|
|
374
|
+
```javascript
|
|
375
|
+
// Step 1: Get node requirements (quick check)
|
|
376
|
+
validate_node({
|
|
377
|
+
nodeType: "nodes-base.slack",
|
|
378
|
+
config: {},
|
|
379
|
+
mode: "minimal"
|
|
380
|
+
});
|
|
381
|
+
// → Know what's required
|
|
382
|
+
|
|
383
|
+
// Step 2: Configure node
|
|
384
|
+
const config = {
|
|
385
|
+
resource: "message",
|
|
386
|
+
operation: "post",
|
|
387
|
+
channel: "#general",
|
|
388
|
+
text: "Hello!"
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
// Step 3: Validate configuration (full validation)
|
|
392
|
+
const result = validate_node({
|
|
393
|
+
nodeType: "nodes-base.slack",
|
|
394
|
+
config,
|
|
395
|
+
profile: "runtime"
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
// Step 4: Check result
|
|
399
|
+
if (result.valid) {
|
|
400
|
+
console.log("Configuration valid!");
|
|
401
|
+
} else {
|
|
402
|
+
console.log("Errors:", result.errors);
|
|
403
|
+
// Fix and validate again
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// Step 5: Validate in workflow context
|
|
407
|
+
validate_workflow({
|
|
408
|
+
workflow: {
|
|
409
|
+
nodes: [{...config as node...}],
|
|
410
|
+
connections: {...}
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// Step 6: Apply auto-fixes if needed
|
|
415
|
+
n8n_autofix_workflow({
|
|
416
|
+
id: "workflow-id",
|
|
417
|
+
applyFixes: true
|
|
418
|
+
});
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## Summary
|
|
424
|
+
|
|
425
|
+
**Key Points**:
|
|
426
|
+
1. Use **runtime** profile (balanced validation)
|
|
427
|
+
2. Validation loop: validate → fix (58s) → validate again
|
|
428
|
+
3. Auto-sanitization fixes operator structures automatically
|
|
429
|
+
4. Binary operators ≠ singleValue, Unary operators = singleValue: true
|
|
430
|
+
5. Iterate until validation passes
|
|
431
|
+
6. Use `n8n_autofix_workflow` for automatic fixes
|
|
432
|
+
|
|
433
|
+
**Tool Selection**:
|
|
434
|
+
- **validate_node({mode: "minimal"})**: Quick required fields check
|
|
435
|
+
- **validate_node({profile: "runtime"})**: Full config validation (**use this!**)
|
|
436
|
+
- **validate_workflow**: Complete workflow check
|
|
437
|
+
- **n8n_validate_workflow({id})**: Validate existing workflow
|
|
438
|
+
- **n8n_autofix_workflow({id})**: Auto-fix common issues
|
|
439
|
+
|
|
440
|
+
**Related**:
|
|
441
|
+
- [SEARCH_GUIDE.md](SEARCH_GUIDE.md) - Find nodes
|
|
442
|
+
- [WORKFLOW_GUIDE.md](WORKFLOW_GUIDE.md) - Build workflows
|