Sprint 216: Nodes Full Integration — merge feature/CODUX-216-nodes-full-integration into dev - #2978
Merged
Merged
Conversation
…ex-da97c952-mrh9aujz (CODUX-216) Define canonical Graph v2 and node registry
…ex-ceffbcac-mrha1mcr (CODUX-216) Build encrypted credential and key-provider platform
…ex-80cfa686-mrharjrk (CODUX-216) Make publications and execution durable
…ex-b8218574-mrhbf1q2 (CODUX-216) Harden built-in nodes and external effects
…ex-368ddc87-mrhcknl5 (CODUX-216) Build the custom-node SDK and sandbox
…ex-724220f4-mrhdpdz9 (CODUX-216) Extend MCP authoring and attached-flow skills
…ex-8fbde344-mrhehyy2 (CODUX-216) Replace local canvas with the canonical Nodes workspace
…ex-6bcd6902-mrhf9zca (CODUX-216) Add authenticated headless readiness and recovery coverage
…ex-c503f549-mrhh9k04 (CODUX-216) Add the real authenticated headless automation drill
…ex-ae136f65-mrhh9g8m (CODUX-216) Enforce project-scoped authorization on node-flow APIs
…ex-98f8861c-mrhh9j7e (CODUX-216) Redact resolved credential values from runtime records
…ex-477a963f-mrhh9h63 (CODUX-216) Make legacy canvas migration canonical and validation-safe
…k/feature-codux-21-t11-codex-05b7ce90-mrhh9i1a
…ex-05b7ce90-mrhh9i1a (CODUX-216) Resume durable runs after approval decisions
…ex-cdbc3762-mrhips46 (CODUX-216) Exercise the real authenticated automation authoring and durable runtime drill
…ex-cc6303cc-mrhipsze (CODUX-216) Synchronize canonical and public Nodes workspace documentation
…ex-e76272ca-mrhlbkoe (CODUX-216) Synchronize all public Nodes documentation
…ex-19b19224-mrhlbi5y (CODUX-216) Expose redacted node attempts through MCP inspection
…ex-08340e31-mrhlbg39 (CODUX-216) Harden Graph v2 validation against malformed input
…k/feature-codux-21-t17-codex-59e4a775-mrhlbhbu
…ex-59e4a775-mrhlbhbu (CODUX-216) Complete dashboard agent attachment integration
…ex-6f247abd-mrhlbj0x (CODUX-216) Implement governed HTTP capability for custom nodes
…k/feature-codux-21-t20-codex-887de861-mrhlbjt9
…ex-887de861-mrhlbjt9 (CODUX-216) Implement bounded Foreach fan-out
…ex-24e01b12-mrhml5g2 (CODUX-216) Restore governed custom-node HTTP bridge after integration merge
…ex-2a84f564-mrhncxn0 (CODUX-216) Wire agent attachments into the canonical Nodes workspace
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Sprint Completion: Sprint 216 · Nodes Full Integration
📋 Summary
Sprint: Sprint 216 · Nodes Full Integration Tasks: 23/23 completed
🧭 Planning
gpt-5.6-lunaIncluded usage estimate (subscription/local login): $0.21
🎯 Original Sprint Prompt
Implementation Plan
Executive Summary
Code UX has a useful backend node-flow foundation, but it is not yet a complete n8n-style automation platform. Agents can create and run simple JSON-defined flows through MCP, but they cannot yet generate safely sandboxed custom-code nodes, resolve reusable encrypted credentials, build rich branching workflows, or publish production-ready automations entirely from natural language.
The recommended direction is to turn the existing node-flow foundation into a versioned automation control plane with:
The correct implementation order is:
This ordering ensures that agents build on enforceable security and execution guarantees rather than generating workflows the platform cannot safely operate.
1. Current State
1.1 What Already Works
manage_node_flowsaccess can list, create, update, validate, run, and delete flows.input,set_fields,template,provider_prompt,http_request, andoutput.provider_promptnodes invoke configured Code UX CLI providers.continueOnError.Relevant foundations include:
src/contracts/node-flow-types.tssrc/domain/node-flows/node-flow-validation.tssrc/services/node-flow-runtime-service.tssrc/services/node-flow-service.tssrc/mcp/management/node-flow-actions.tssrc/repositories/node-flow-repository.tssrc/services/scheduler-service.ts1.2 Material Gaps
secretRefis only a string/widget type and is never resolved./nodespage persists to browserlocalStorage, not the backend node-flow tables.flowVersionis recorded as trigger metadata, but runtime still loads the latest saved flow.1.3 Current Capability Conclusion
Agents are not yet fully capable of creating complex, secure, repeatable n8n-style automations. They can author and execute a narrow built-in graph through MCP, including generic HTTP requests and provider prompts. They cannot yet safely create arbitrary code nodes, manage reusable encrypted credentials, execute rich workflow control flow, or reliably govern external side effects.
2. Target Architecture
The design separates four planes:
3. Canonical Workflow Contract
The first architectural change must eliminate the two competing graph formats.
3.1 Graph v2
Extend the flow graph with:
schemaVersionA canonical node should resemble:
Secrets and custom-node source code must never be stored in the graph.
3.2 Typed Edges
Edges need:
Arbitrary graph cycles should remain prohibited. Repetition should be represented by explicit
foreach,loop, or subflow nodes with bounded execution semantics.3.3 Compatibility and Migration
Introduce deterministic graph migrators:
Existing flows remain readable. Migration creates a new immutable version and retains the original snapshot for rollback.
4. Node-Definition Registry
Every executable node type should come from a registry rather than a runtime string allowlist.
4.1 Node Manifest
Each definition needs:
builtin,custom, orsubflowExample credential requirement:
{ "slot": "emailAccount", "credentialTypes": ["smtp", "gmail_oauth", "microsoft_oauth"], "capabilities": ["email.send"], "required": true }4.2 Initial Built-in Catalog
The first executable catalog should include:
The palette, inspector, MCP agent descriptions, validation, and runtime must consume the same registry.
5. Credential and Encryption Architecture
5.1 Storage Hierarchy
Use this priority:
The database must never contain the root encryption key.
For desktop mode, Electron
safeStoragecan use macOS Keychain, Windows DPAPI, or Linux Secret Service/keyring backends. Code UX must detect and reject insecure plaintext-style fallback backends.For server mode, use envelope encryption with a KMS-managed key-encryption key or store credential values entirely in an external secret manager and retain only references in SQLite.
5.2 Provider Abstractions
Implement separate secret-store and key-provider interfaces:
Initial providers:
ExternalVaultSecretStoreEncryptedSqliteSecretStoreElectronSafeStorageKeyProviderMountedKeyFileProviderVaultTransitKeyProvider5.3 Envelope Encryption
For every local credential:
5.4 Credential Data Model
Add:
automation_credentialsautomation_credential_bindingsautomation_credential_access_eventsautomation_credential_rotationsImportant fields include:
Global credentials should not automatically become available to every project. Promotion to global scope requires:
5.5 Credential UX
Credentials live outside the canvas in:
Supported actions:
Secret fields are write-only. APIs return configuration state, never stored values:
{ "configured": true, "status": "healthy", "lastValidatedAt": "2026-01-01T00:00:00.000Z", "fields": [ { "id": "clientSecret", "configured": true } ] }5.6 OAuth Broker
Add a dedicated OAuth broker supporting:
Agents may request OAuth credential requirements, but only the user can complete authorization.
5.7 Runtime Credential Broker
At execution:
Agents, prompts, graphs, and normal run inspection must never receive decrypted secrets.
6. Durable Runtime v2
6.1 Execution Lifecycle
Introduce:
Every run pins an immutable published flow version. Schedules explicitly select either:
The existing behavior that records a requested
flowVersionwithout executing that version must be corrected before production use.6.2 Node Attempts
Add
node_flow_node_attemptsinstead of overwriting one node-run record.Each attempt stores:
6.3 Branching and Iteration
Implement:
Default safeguards:
6.4 Retries and Idempotency
Retry policy includes:
Side-effect nodes need idempotency keys derived from:
Email and other irreversible operations pass through an outbox table with a unique idempotency constraint.
6.5 Crash Recovery
Run and node-attempt claims use leases:
After restart:
7. HTTP and External API Security
The existing HTTP node must be hardened before it receives credentials.
Required controls:
Custom nodes should not receive unrestricted host networking. Outbound requests should pass through a controlled egress proxy or broker applying the same policy.
8. Custom-Code Node System
Agent-generated code must never execute inside the main Code UX process.
8.1 Custom Node Package
A generated node should contain:
The SDK contract should remain small:
Context exposes only approved capabilities:
It must not expose raw Docker, unrestricted filesystem, arbitrary subprocesses, host environment, or the complete project workspace.
8.2 Build Pipeline
A custom-node revision moves through:
Validation includes:
Publishing produces an immutable, content-addressed artifact containing:
8.3 Runtime Isolation
Custom nodes run in a hardened container with:
no-new-privilegesContent-addressed images may be cached, but containers must not retain plaintext credentials or cross-run state.
8.4 Trust Boundary
Arbitrary custom code allowed to use a credential can intentionally send that credential to an allowed destination. Isolation reduces impact but does not make malicious code harmless.
Publication must therefore show:
High-risk changes require explicit user approval.
9. Agent Authoring Workflow
The natural-language builder should operate as a governed compiler rather than a one-shot graph generator.
9.1 Agent Lifecycle
9.2 MCP Surface
Evolve
manage_node_flowsinto granular actions:catalog_nodesget_node_definitioncreate_draftapply_graph_patchvalidate_draftcreate_custom_nodeupdate_custom_nodevalidate_custom_noderequest_credentialslist_credential_bindingsbind_credentialdry_runpublishcompare_versionsrollbackruncancel_runretry_runinspect_runUse optimistic concurrency:
{ "draftRevision": 14, "operations": [] }Conflicting edits return a structured conflict rather than overwriting the flow.
9.3 Functional Agent Skill Integration
When a flow is attached to an agent:
run_attached_flowoperationThis closes the current gap where attachments are persisted but do not affect runtime behavior.
10. Dashboard Integration
Replace the local-only page with one canonical project-scoped Nodes workspace.
10.1 Main Layout
10.2 Agent Builder Panel
The user should be able to request an automation in natural language. The panel should show:
Agent changes appear as reviewable graph and code diffs before publication.
10.3 Credentials Outside the Graph
A flow-level banner should show configuration state without showing values:
The canvas node stores only a binding ID. Secret values never appear in exported graph JSON.
10.4 Run Debugger
Provide:
11. Example Automation Design
The requested job automation should compile into something resembling:
Credential requirements:
Guardrails:
12. Data-Model Changes
Reuse existing node-flow tables where practical and add:
node_definition_revisionscustom_node_revisionscustom_node_buildsnode_flow_publicationsautomation_credentialsautomation_credential_bindingsautomation_credential_access_eventsnode_flow_node_attemptsautomation_approvalsautomation_outboxautomation_webhook_triggersAll tables need project or workspace ownership, indexes, cascading behavior, and future principal IDs for headless authorization.
13. Headless-Server Readiness
Encryption alone is insufficient for server operation.
Before remotely managing credentials, add:
Until this exists, headless server mode may execute already configured credentials but should not expose unauthenticated credential-management routes.
14. Phased Delivery Plan
Phase 0: Architecture and Stabilization
Deliverables:
Immediate fixes:
secretRefbehavior and documentationExit gate: one reviewed canonical design with no ambiguity between UI and runtime contracts.
Phase 1: Encrypted Credential Platform
Deliver:
Exit gate: a credential can be created, encrypted, bound, used, rotated, promoted, revoked, and audited without plaintext appearing in database rows, logs, API responses, or agent context.
Phase 2: Canonical Nodes Workspace
Deliver:
Exit gate: dashboard, MCP, persistence, and runtime all manipulate the same graph.
Phase 3: Durable Runtime v2
Deliver:
Exit gate: restarts and retries cannot duplicate approved external side effects.
Phase 4: Hardened Built-in Integrations
Deliver:
Exit gate: the target job-to-email workflow can run using built-in nodes against mock APIs without custom code.
Phase 5: Custom Node SDK and Sandbox
Deliver:
Exit gate: an agent can generate a custom external-API node, tests, and manifest; Code UX can validate and execute it without running generated code in the main process.
Phase 6: Agent Automation Builder
Deliver:
Exit gate: a user can request an automation in natural language and reach a validated draft without manually editing graph JSON or source code.
Phase 7: Headless and Production Hardening
Deliver:
Exit gate: credentialed automations can run on a remote headless deployment with documented recovery and no dependency on Electron or a logged-in desktop session.
15. Validation Strategy
15.1 Cryptography
Test:
15.2 Runtime
Test:
15.3 Security
Test:
15.4 End-to-End
Use only the approved local test project and mocked external boundaries:
16. Observability and SLOs
Add correlation IDs and structured events for:
Track:
Set final SLO values after collecting a development baseline. Initial production gates should include zero known secret disclosures, bounded scheduler lag, bounded queue age, and explicit alerting on sustained runtime or credential-resolution failures.
17. Rollout and Rollback
Roll out behind separate flags:
Recommended sequence:
Every migration must be forward-compatible and preserve old flow versions. Rollback should disable new executions while leaving run history and encrypted credential data intact.
18. Key Risks and Mitigations
19. Documentation Requirements
Each implementation phase must update:
docs/docs-web/Documentation must never imply that planned node types, custom-code execution, credential resolution, or encrypted storage are available before their corresponding phase ships.
20. Definition of Done
The vision is complete when a user can provide only the desired outcome and:
✅ Task Checklist
codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)codex(PR)👥 Provider Breakdown
23 by codex
⏱️ Sprint Timing
📊 Aggregate CLI Token Usage
Included usage estimate (subscription/local login): $133.57
🕵️ QA Review Summary
Outcome: pass
Sprint integration passes. Typechecks, build, docs sync, audit, dashboard suite, focused automation suites, authenticated E2E drill, and runtime probes succeeded. One backend Docker-dependent test was unavailable because Docker is absent.
🌿 Branch Info
Base:
devHead:
feature/CODUX-216-nodes-full-integration🤖 Generated by Code UX