n8n-nodes-mindrouter 0.5.0 → 0.5.2

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 CHANGED
@@ -19,36 +19,55 @@ npm install n8n-nodes-mindrouter
19
19
  ## Credentials
20
20
 
21
21
  1. Create an API key in your [MindRouter dashboard](https://mindrouter.io) under **API Keys**.
22
- 2. In n8n, add a **MindRouter API** credential and paste the key.
22
+ 2. In n8n, add a **MindRouter API** credential and paste the key. The credential's test button calls `/models`, so a green check means the key works.
23
23
  3. Leave the base URL as `https://api.mindrouter.io/v1` unless you run a self-hosted gateway.
24
24
 
25
+ One credential serves all four nodes.
26
+
25
27
  ## Nodes
26
28
 
27
- ### MindRouter Chat Model
29
+ ### MindRouter Chat Model — for AI Agents
30
+
31
+ 1. Add an **AI Agent** (or **Basic LLM Chain**) node.
32
+ 2. Click its **Chat Model** socket → pick **MindRouter Chat Model**.
33
+ 3. Choose a model — the dropdown is loaded live from your account, so it always matches your plan.
34
+ 4. Optional: temperature, max output tokens, top-p, penalties, timeout.
35
+
36
+ Every agent call then runs through the gateway: guardrails, spend limits, and usage tracking apply, and each call appears on the canvas and in the Logs panel with token counts.
28
37
 
29
- A sub-node for the **AI Agent** and **LLM Chain** nodes: click the **Chat Model** socket and pick *MindRouter Chat Model*. Choose any model from your account (loaded live) and set temperature, max tokens, top-p, penalties, and timeout. Everything the agent does then runs through the MindRouter gateway guardrails, spend limits, and usage tracking included.
38
+ ### MindRouter Embeddingsfor Vector Stores
30
39
 
31
- ### MindRouter Embeddings
40
+ 1. On any **Vector Store** node (insert or retrieve), click the **Embeddings** socket.
41
+ 2. Pick **MindRouter Embeddings** and choose an embedding model.
42
+ 3. Optional: batch size, dimension truncation, newline stripping.
32
43
 
33
- A sub-node for **Vector Store** and retriever nodes: click the **Embeddings** socket and pick *MindRouter Embeddings*. Your whole RAG pipeline — indexing and retrieval included — then runs through the MindRouter gateway on the same key and bill as the chat model. Supports batch size, dimension truncation, and newline stripping.
44
+ Your whole RAG pipeline — indexing and retrieval — then runs on the same key and bill as the chat model.
34
45
 
35
- ### MindRouter PII Guard
46
+ ### MindRouter PII Guard — sanitize text
36
47
 
37
- Detect, mask, tokenize, or restore PII and credentials in any text Indonesian NIK/NPWP/phone numbers, credit cards, emails, API keys and JWTs, plus (optionally, via NER) names and locations in Indonesian and English. **Tokenize** replaces values with placeholders and hands you the reversal map, so you can send sanitized text to any external service and restore the original values afterwards. Usable as an AI Agent tool.
48
+ A regular node (also usable as an AI Agent tool) over MindRouter's PII toolset. Detects Indonesian NIK, NPWP, and phone numbers, credit cards, emails, IBAN, public IPs, API keys and JWTs and, with **Use NER** enabled, person names and locations in Indonesian and English.
38
49
 
39
- ### MindRouter
50
+ | Operation | What it does | Returns |
51
+ |---|---|---|
52
+ | **Mask** | Irreversibly redacts all findings | `text` with `[REDACTED_*]` markers |
53
+ | **Scan** | Detects without changing the text | `pii_counts`, `secret_findings` |
54
+ | **Tokenize** | Replaces values with placeholders | `text` with `[NIK_1]`-style placeholders + `tokens` map |
55
+ | **Restore** | Puts original values back | `text` restored using the `tokens` map |
40
56
 
41
- A regular node for direct calls.
57
+ Typical pattern send sanitized text to an external service, then restore:
42
58
 
43
- #### Chat
59
+ 1. **PII Guard (Tokenize)** on the incoming text: `={{ $json.chatInput }}`
60
+ 2. Call any external service with `={{ $json.text }}` (placeholders only — no raw PII leaves).
61
+ 3. **PII Guard (Restore)** with `Text` = the service's reply and `Tokens Map` = `={{ $('PII Guard').item.json.tokens }}`.
44
62
 
45
- Send a prompt (or a full OpenAI-format `messages` array) to any model your account can use. The model dropdown is loaded live from your account, so it always matches your plan and provider settings. Supports temperature, max output tokens, and a simplified output (`text`, `model`, `usage`) or the raw API response.
63
+ The map is returned to your workflow and never stored server-side. Calls are metered per your MindRouter plan and logged (counts only, never the text) in the dashboard's guardrail history.
46
64
 
47
- The node is also usable as a tool by n8n **AI Agent** nodes.
65
+ ### MindRouter direct calls
48
66
 
49
- #### List Models
67
+ - **Chat**: send a prompt (plus optional system prompt) or a full OpenAI-format `messages` array. Simplified output (`text`, `model`, `usage`) by default; raw API response when *Simplify Output* is off.
68
+ - **List Models**: one item per model your account can use, including pricing metadata.
50
69
 
51
- Returns the models available to your account, including pricing metadata.
70
+ Also usable as a tool by AI Agent nodes.
52
71
 
53
72
  ## Compatibility
54
73
 
@@ -56,7 +75,7 @@ Requires n8n 1.x and Node.js 18.10+.
56
75
 
57
76
  ## Resources
58
77
 
59
- - [MindRouter documentation](https://mindrouter.io/docs)
78
+ - [MindRouter documentation](https://mindrouter.io/docs) — the [integrations page](https://mindrouter.io/docs/integrations) covers this node
60
79
  - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
61
80
 
62
81
  ## License
@@ -8,7 +8,7 @@ class MindRouter {
8
8
  this.description = {
9
9
  displayName: 'MindRouter',
10
10
  name: 'mindRouter',
11
- icon: 'file:mindrouter.svg',
11
+ icon: 'file:mindrouter-mark.svg',
12
12
  group: ['transform'],
13
13
  version: 1,
14
14
  subtitle: '={{$parameter["operation"]}}',
@@ -10,7 +10,7 @@ class MindRouterChatModel {
10
10
  this.description = {
11
11
  displayName: 'MindRouter Chat Model',
12
12
  name: 'lmChatMindRouter',
13
- icon: 'file:mindrouter.svg',
13
+ icon: 'file:mindrouter-mark.svg',
14
14
  group: ['transform'],
15
15
  version: 1,
16
16
  description: 'Use MindRouter models with AI Agents and Chains',
@@ -9,7 +9,7 @@ class MindRouterEmbeddings {
9
9
  this.description = {
10
10
  displayName: 'MindRouter Embeddings',
11
11
  name: 'embeddingsMindRouter',
12
- icon: 'file:mindrouter.svg',
12
+ icon: 'file:mindrouter-mark.svg',
13
13
  group: ['transform'],
14
14
  version: 1,
15
15
  description: 'Use MindRouter embedding models with Vector Stores',
@@ -8,7 +8,7 @@ class MindRouterPiiGuard {
8
8
  this.description = {
9
9
  displayName: 'MindRouter PII Guard',
10
10
  name: 'mindRouterPiiGuard',
11
- icon: 'file:mindrouter.svg',
11
+ icon: 'file:mindrouter-mark.svg',
12
12
  group: ['transform'],
13
13
  version: 1,
14
14
  subtitle: '={{$parameter["operation"]}}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-mindrouter",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "n8n community node for MindRouter — unified gateway to AI models with Indonesian PII guardrails",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",