@n8n-as-code/n8nac 2.2.0 → 2.3.0-rc.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @n8n-as-code/n8nac
2
2
 
3
+ ## [2.2.1](https://github.com/EtienneLescot/n8n-as-code/compare/@n8n-as-code/n8nac@v2.2.0...@n8n-as-code/n8nac@v2.2.1) (2026-07-24)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **cli:** bind n8n API keys to environments instead of shared URL targets ([6dd92bc](https://github.com/EtienneLescot/n8n-as-code/commit/6dd92bc29bf8f5b63c60a5f0c1bcb7a136e3ccb9))
8
+
3
9
  ## [2.2.0](https://github.com/EtienneLescot/n8n-as-code/compare/@n8n-as-code/n8nac@v2.1.4...@n8n-as-code/n8nac@v2.2.0) (2026-06-09)
4
10
 
5
11
  ### Features
package/index.ts CHANGED
@@ -2,7 +2,7 @@ import { accessSync, constants, mkdirSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { N8N_FACADE_SETUP_MODES } from "@n8n-as-code/workflow-core";
4
4
  import { createTelemetryClient } from "@n8n-as-code/telemetry";
5
- import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
5
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
6
6
  import { registerN8nAcCli } from "./src/cli.js";
7
7
  import { getWorkspaceDir, isWorkspaceInitialized, readWorkspaceBinding } from "./src/workspace.js";
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n-as-code/n8nac",
3
- "version": "2.2.0",
3
+ "version": "2.3.0-rc.1",
4
4
  "description": "OpenClaw plugin for n8n-as-code — create and manage n8n workflows from OpenClaw",
5
5
  "keywords": [
6
6
  "n8n",
@@ -25,11 +25,11 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@n8n-as-code/telemetry": "2.0.1",
28
- "@n8n-as-code/workflow-core": "2.0.0"
28
+ "@n8n-as-code/workflow-core": "2.0.1-rc.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",
32
- "openclaw": "^2026.2.26",
32
+ "openclaw": "2026.8.2",
33
33
  "typescript": "^5.8.0",
34
34
  "vitest": "^1.6.1"
35
35
  },
@@ -82,6 +82,7 @@ npx --yes n8nac env use <name>
82
82
 
83
83
  - Prefer `--api-key-stdin` for API keys.
84
84
  - Do not pass secrets inline in shell arguments.
85
+ - `env auth set` binds the key to one environment, so several environments may share a base URL with one key each. Run it once per environment; `apiKeySource` in `env status --json` is `workspace-environment` when the environment uses its own key.
85
86
  - Do not ask for host/API key when the user wants a managed local Docker instance.
86
87
  - Do not print API keys or credential secret values back to the user.
87
88
  - If a command or flag is unfamiliar, run `npx --yes n8nac env --help` or `npx --yes n8nac env <subcommand> --help`.
@@ -167,6 +168,7 @@ npx --yes n8nac push <path-to-workflow.workflow.ts> --verify
167
168
  ```
168
169
 
169
170
  - `push` requires the full workflow file path, either absolute or context-root-relative. Do not pass a bare filename.
171
+ - On n8n 2.x, pushing to a **published** workflow also releases it to production — the API re-publishes on update. Treat every push to a published workflow as a deploy. Use `push --draft` when the user wants to check the change in n8n first: it re-pins the previously published version so production keeps running what it already ran.
170
172
  - For a new workflow, create the file inside the `workflowsPath` returned by `env status --json`, then confirm it with `npx --yes n8nac list --local`.
171
173
  - If push/pull reports a conflict, use explicit resolution commands. Do not overwrite remote changes blindly.
172
174
  - `pull` and conflict resolution operate on a single workflow ID.
@@ -264,6 +266,7 @@ npx --yes n8nac skills examples download <id>
264
266
  - AI sub-nodes connect with `.uses()`, never `.out().to()`.
265
267
  - `ai_tool` and `ai_document` connections are arrays: `ai_tool: [this.Tool.output]`.
266
268
  - Other AI connection types are single refs, such as `ai_languageModel: this.Model.output`.
269
+ - They also accept an array when a node exposes several inputs of the same type, where the position is the input index: `ai_languageModel: [this.Model.output, this.FallbackModel.output]` (fallback model, Model Selector).
267
270
  - Check `node-info` for connection-dependent boolean flags before declaring `.uses()` connections.
268
271
 
269
272
  Every `.workflow.ts` file starts with a `<workflow-map>` block. Read that map first, locate the property name you need, then read only the relevant class section.
@@ -370,8 +373,9 @@ defineRouting() {
370
373
 
371
374
  - Use `.uses()` for language models, memory, tools, parsers, embeddings, vector stores, retrievers, and other AI sub-nodes.
372
375
  - Never connect AI sub-nodes with `.out().to()`.
373
- - `ai_tool` and `ai_document` must be arrays.
374
- - Most other AI connection types are single refs.
376
+ - `ai_tool` and `ai_document` must be arrays; every entry lands on input index 0.
377
+ - Most other AI connection types are single refs, or an array when the node exposes several inputs of the same type — position = input index.
378
+ - `needsFallback: true` (Agent, Basic LLM Chain) needs a second model on input 1: `ai_languageModel: [this.Model.output, this.FallbackModel.output]`. Same for the Model Selector node.
375
379
  - Some nodes require boolean flags to expose AI ports or gated parameters. Check `node-info` before declaring `.uses()`.
376
380
 
377
381
  ## Common Mistakes To Avoid
package/src/cli.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
1
+ import type { OpenClawPluginApi } from "openclaw/plugin-sdk/core";
2
2
  import type { TelemetryClient } from "@n8n-as-code/telemetry";
3
3
  import { isWorkspaceInitialized } from "./workspace.js";
4
4