Skip to content

feat!: release n8n-as-code v2 with n8n-manager runtime#363

Open
EtienneLescot wants to merge 44 commits intonextfrom
chore/n8n-independent-disclaimer
Open

feat!: release n8n-as-code v2 with n8n-manager runtime#363
EtienneLescot wants to merge 44 commits intonextfrom
chore/n8n-independent-disclaimer

Conversation

@EtienneLescot
Copy link
Copy Markdown
Owner

@EtienneLescot EtienneLescot commented Apr 28, 2026

Release decision

This PR should be treated as the n8n-as-code v2.0.0 line, not as a v1 minor refactor.

Since the latest main release (v1.8.1), the branch changes the runtime ownership model for the whole n8n-as-code ecosystem. The major product change is n8n-as-code v2 adopting n8n-manager as a strong runtime dependency and backend source of truth for instances, auth, managed local runtime, tunnels, projects, credentials infrastructure, and workflow presentation. n8n-as-code surfaces now act as facades over that manager-backed context.

Breaking changes

  • n8n-as-code now depends on n8n-manager for runtime state instead of owning runtime configuration inside each facade.
  • Workspace-local n8nac-config.json instance libraries are no longer the source of truth for runtime state.
  • Legacy workspace instance-library migration is no longer assumed; stale workspace configs now fail explicitly and require reconfiguration.
  • The old n8nac init, n8nac switch, and n8nac instance flows are removed/replaced by n8n-manager plus n8nac workspace commands.
  • Instance, API key, project, managed Docker runtime, tunnel, and credential readiness state now live behind n8n-manager instead of facade-local logic.
  • Generated agent context and portable skills now expect the split command model: n8n-manager ... for runtime state and n8nac ... for workflow/workspace operations.
  • OpenClaw no longer exposes the previous facade-specific runtime tool path; agents use the portable n8n-manager/n8n-architect skills and commands.
  • VS Code configuration behavior changes from workspace-local runtime ownership to global instance management with explicit workspace overrides.

Package alignment

All release-managed n8n-as-code packages should move onto the v2 line together for this release: CLI (n8nac), VS Code extension (n8n-as-code), skills, transformer, MCP, and OpenClaw plugin. This keeps the ecosystem version story simple for the breaking manager-backed runtime model.

Architectural scope

  • Adds @n8n-as-code/manager-adapter as the facade bridge between n8n-as-code surfaces and n8n-manager backend logic.
  • Adds shared workflow-core setup mode definitions so CLI, VS Code, OpenClaw, and future facades speak the same setup language.
  • Reworks ConfigService into a thin adapter over n8n-manager global configuration and workspace v3 overrides.
  • Introduces the global-first / workspace-override model for effective instance, project, sync folder, and related context.
  • Rapatriates yagr-manager integration responsibilities into the n8n-manager boundary used by n8n-as-code.

CLI, plugins, and config behavior

  • Updates CLI instance management, workspace pinning, sync-folder defaults, command help, and command resolution around the effective backend context.
  • Adds n8nac workspace status --json and workspace get --json so agents/plugins can inspect backend-resolved sync context without reading raw config internals.
  • Updates OpenClaw, Claude, and Cursor agent guidance to use global n8n-manager instances plus workspace overrides instead of workspace-local instance libraries.
  • Fixes workspace default sync-folder behavior for CLI/VS Code usage while keeping global defaults available for autonomous agents.
  • Updates generated AGENTS.md command resolution so local dev commands are used where appropriate.

VS Code facade

  • Reworks the configuration webview around global instance management plus explicit workspace context.
  • Routes workflow board openings through n8n-manager effective context resolution.
  • Adds managed-instance auto-login for the workflow webview via the extension proxy without embedding backend logic in the VS Code UI.
  • Keeps UI refresh/state behavior tied to backend snapshots rather than duplicating priority logic in the frontend.

Credentials and ontology

  • Adds the n8n credential ontology asset and schema-driven credential UI paths.
  • Expands facade credential orchestration so surfaces can use n8n-manager-backed credential readiness and setup flows.
  • Wires generated AI context to consume manager instructions from the backend SSOT instead of duplicating tool guidance in each facade.

Documentation and dev ergonomics

  • Updates architecture, local dev, getting started, CLI, OpenClaw, VS Code, README, and generated skill material for the manager-backed model.
  • Adds local dev command resolver support so generated agent context points at local commands rather than stale npx paths.
  • Fixes the unified test reporter so OpenClaw/Vitest and VS Code/TAP counts are visible in the summary.

Release Please

A follow-up release-alignment commit is included so Release Please can classify the affected packages as v2.0.0 instead of producing mixed package versions.

Validation

  • npm test in n8n-manager: 38 passed, 0 failed.
  • npm test in n8n-as-code: transformer 74 passed, skills 97 passed, CLI 154 passed, OpenClaw 26 passed, VS Code unit 31 passed, CLI live integration 10 passed.
  • Targeted checks also run: npm test --workspace=@n8n-as-code/n8nac (26 passed), npm test --workspace=packages/skills (97 passed), npm run test:unit --workspace=n8nac (154 passed), and npm run build --workspace=@n8n-as-code/n8nac.

Update the n8n manager facade to accept optional `instanceId` and `instanceName`. This allows the manager to use a managed local lifecycle manager when in `managed-local-docker` mode, enabling better support for multiple or specific n8n instances.

- `manager-adapter`: Update `N8nFacadeSetupInput` and `createN8nManagerFacade` to handle instance metadata and use `createManagedLocalLifecycleManager` when appropriate.
- `vscode-extension`: Pass instance identification details during reconciliation and from the configuration webview.
Implements logic in both the CLI and VS Code extension to automatically detect and use the local development CLI command when generating AI context files. This ensures that `AGENTS.md` is generated using the correct local build when running in a development environment or when workspace-specific dev configurations are present.

- `cli`: Added `inferLocalDevCliCommand` to detect the local `dist/index.js` entrypoint.
- `vscode-extension`: Added `resolveAiContextCliCommandOverride` to provide the local CLI path during extension development.
@EtienneLescot EtienneLescot changed the base branch from main to next April 28, 2026 16:24
@EtienneLescot EtienneLescot changed the title [codex] Wire manager SSOT into agents and VS Code workflow view [codex] Migrate n8n orchestration to n8n-manager SSOT Apr 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25065243198

@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25066342757

Separates the responsibilities of `n8n-manager` (global instance, auth, and project state) from `n8nac` (local workspace overrides and workflow operations).

- Removes legacy `init`, `switch`, and `instance` commands from `n8nac` CLI.
- Introduces `n8nac workspace` commands for local configuration.
- Updates documentation and AI agent instructions to reflect the two-CLI architecture.
- Refactors `ConfigService` and `manager-adapter` to use `N8nRuntimeOrchestrator` for preparing effective context.
- Updates OpenClaw plugin actions to use the new `manager_*` and `workspace_*` command mapping.
- Updates VS Code extension to use the prepared context flow.
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25119538878

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcbf708b7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/manager-adapter/package.json Outdated
Comment on lines +22 to +23
"@n8n-as-code/n8n-credentials-manager": "file:../../../n8n-manager/packages/credentials-manager",
"@n8n-as-code/n8n-manager-core": "file:../../../n8n-manager/packages/core",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace external file deps with resolvable package references

This package now declares dependencies as file:../../../n8n-manager/..., which points outside this repository; the same pattern is also introduced in packages/cli/package.json. In a clean checkout (including CI for this repo), install cannot resolve those paths unless a sibling n8n-manager repo exists at that exact relative location, so npm install can fail before build/test. Use workspace-local packages inside this repo or published versions to keep installs reproducible.

Useful? React with 👍 / 👎.

Comment on lines +292 to 293
const listResult = await runN8nManager(["projects", "list"], {
cwd: workspaceDir,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Request machine output before parsing project lists as JSON

The setup flow parses n8n-manager projects list output with JSON.parse, but the command is invoked without a JSON output flag. If the CLI returns human-readable/table output (or any non-JSON text), setup throws a parsing exception and aborts instead of producing a controlled setup error. Pass a JSON-mode flag (if supported) and guard parse failures so openclaw n8nac:setup remains robust.

Useful? React with 👍 / 👎.

@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25128071197

@Hope-IT-Works
Copy link
Copy Markdown
Contributor

@Hope-IT-Works if you are willing to test this a bit that would be very cool!

I'm on vacation right now, will take a look on monday ;)

Greetings
@Hope-IT-Works

Update `packages/cli` and `packages/manager-adapter` to use versioned
dependencies instead of local file paths for core packages. This
decouples the packages from the local monorepo structure.
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25153871335

@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25159602358

Refactor the labels in the configuration webview to be more descriptive and user-friendly, specifically for the n8n instance type and tunnel selection options.
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25160204528

Implement start, stop, and restart capabilities for n8n instances via the
configuration webview. This includes:

- Added `startInstance`, `stopInstance`, and `restartInstance` methods
  to the `N8nManagerFacade`.
- Enhanced the VS Code webview with status badges (Started, Stopped,
  Starting, Unhealthy, etc.) and instance metadata.
- Added runtime management actions to the webview with progress
  notifications.
- Improved instance deletion to ensure cleanup of managed local Docker
  processes.
- Updated the configuration controller to enable auto-start for
  prepared contexts.
- Refactored webview UI to include better error reporting and
  external URL opening.
Integrate runtime warning visibility into the configuration webview and
improve how public URLs are resolved for instances.

- Update `N8nManagerFacade` to include tunnel status warnings when in
  `managed-local-docker` mode with an active tunnel.
- Add support for displaying the first runtime warning as a status badge
  in the webview UI.
- Refactor URL resolution logic to prioritize `authBridgeOpenUrl` and
  respect `publicUrlEnabled` settings to prevent displaying local
  host URLs when public access is intended.
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25165852537

Update the manager adapter and extension services to use `apiBaseUrl`
when available, falling back to `host` only if the former is undefined.
This ensures that connection logic, proxy services, and UI components
correctly utilize the resolved API endpoint.

- Update `N8nManagerFacade` to use `apiBaseUrl` for the credential client
- Adjust `openWorkflowBoard` to use the resolved API base URL for proxying
- Update `N8nConfigurationController` to include `apiBaseUrl` and
  `publicBaseUrl` in snapshots
- Pass `apiBaseUrl` and `publicBaseUrl` to the configuration webview
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25166537663

Introduces a mechanism to manually trigger a reconciliation of instance
access settings, specifically for public URLs, via the configuration
webview.

- Add `resolveInstanceAccess` to `N8nManagerFacade` to allow querying
  resolved access snapshots.
- Implement `refreshPublicUrl` message handler in `ConfigurationWebview`
  to trigger instance access reconciliation.
- Add a "Refresh" inline action button to the configuration webview UI
  when a public URL is pending.
- Update webview data mapping to use the new `access` snapshot for
  displaying URLs, auth bridges, and runtime warnings.
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25168410018

- Simplify 'managed-local-docker' label to 'Managed instance' in the webview HTML template
- Add `refreshPublicUrl` flag to the webview state object during initialization
@github-actions
Copy link
Copy Markdown
Contributor

Documentation Validation

✅ Documentation validation passed! The documentation changes look good.

Once merged, the documentation will be automatically deployed to GitHub Pages.

Workflow: Documentation #25171766058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants