# Assets Directory

This directory contains bundled assets for the n8n-as-code sync package.

## n8n-nodes-index.json

This file contains the optimized, pruned node definitions extracted from n8n's nodes-base package.

### Generation Process
1. The file is generated by the node-index pipeline (see `npm run generate:nodes` at the repo root)
2. The pipeline ensures an up-to-date local n8n cache (`scripts/ensure-n8n-cache.cjs`) and then generates the index (`scripts/generate-n8n-index.cjs`)
3. The schema is committed to the repository and bundled with the package

By default, the cache script resolves the latest stable `n8n` release at build time. Set `N8N_VERSION` or `N8N_STABLE_TAG` only when you need to reproduce or debug against a specific upstream version.

### File Characteristics
- **Size**: Target < 3MB (pruned from ~20-30MB raw)
- **Optimization**: Removes icons, colors, and heavy metadata
- **AI-focused**: Includes `_aiHint` fields and clear JSON key guidance
- **Versioned**: Includes n8n version and extraction timestamp

### Usage
- Loaded by `NodeSchemaLoader` service at runtime
- Used by AI context generators for accurate node definitions
- Referenced in snippets and schema validation

### Update Frequency
- Weekly automatic updates via GitHub Actions
- Manual trigger available for immediate updates
- Version-controlled with the repository