jada

The Jada Node — ultimate OpenCode AI coding agent for n8n with true streaming, full CRUD, and dual auth

Documentation

n8n-nodes-jada — The Jada Node

The ultimate OpenCode community node for n8n: true streaming, full session CRUD, and
a built-for-weeks self-healing event listener with an OpenACP-grade live-status renderer.

Built against the live OpenCode v1.17.3 server API.

Why it beats the existing nodes

ssccio dandacompany fsteccanella Jada
Auth Bearer Basic Bearer None / Basic / Bearer
True token streaming ✗ (buffers) ✗ ✗ ✓ prompt_async + SSE
Self-healing listener ✗ ✗ ✗ ✓ reconnect + heartbeat + seq-reconcile
Idempotent re-attach ✗ ✗ ✗ ✓ client messageID
Live status rendering ✗ ✗ ✗ ✓ thinking / tool card / draft
Full CRUD + fork/diff/revert/shell partial ✓ partial ✓

Components

  • JadaOpenCodeApi credential — None / Basic (OPENCODE_SERVER_PASSWORD) / Bearer.
  • Jada Chat Model — LangChain BaseChatModel for the AI Agent; _streamResponseChunks
    streams real tokens via prompt_async + the /event SSE stream.
  • Jada Session — list/get/create/delete/abort/fork/diff/summarize/revert/messages/shell/todo.
  • Jada Event Trigger — self-healing SSE listener. Emits raw or normalized events, or renders
    live status to Telegram. Designed to run for weeks: the socket is disposable, the cursor durable.

Architecture

OpenCode /event (SSE)
  └─ EventStream  (reconnect+jitter · heartbeat watchdog · seq-gap reconcile)   reliability core
       └─ OpenCodeEventTransformer  (events → normalized OutgoingMessage)        mapping
            └─ LiveStatusEngine  (ActivityTracker: 💭 thinking · 📋 tool card · draft · 📊 usage)
                 └─ SendQueue  (3s interval · text dedup · drop-stale)            delivery
                      └─ Sink:  Telegram │ n8n items │ Redis Stream              pluggable

The engine/ module is host-agnostic — identical code runs inside the trigger node (Phase 1)
and a future always-on sidecar with Redis durability (Phase 2).

Reliability notes (live-verified, v1.17.3)

  • The SSE wire emits flat data: frames {id,type,properties} — no id: line and no seq →
    native Last-Event-ID is impossible; resumption is blind reconcile-on-reconnect (the
    EventStream fires onReconnect; the consumer refetches state for sessions it cares about).
  • The server sends no keepalive → a client heartbeat watchdog is mandatory.
  • prompt_async accepts a client messageID (becomes the user message id) → exclude the echo,
    and enables fire-and-reattach after a restart.

Usage — wiring it up

Stream the prose answer to the n8n chat window
Chat Trigger (Response Mode = Streaming response) → AI Agent (Enable Streaming on, default)
→ Jada Chat Model. Streaming is at the AI-Agent level and model-agnostic. This streams the
prose answer only.

Live status (💭 thinking / 📋 tool cards / 📊 usage) to Telegram
Jada Event Trigger (mode = Render Live Status to Telegram; bot token + chat id + optional
topic) watches /event and renders the rich play-by-play. One OpenCode turn feeds both the chat
window (prose) and Telegram (full status) in parallel. Optionally filter to one session id.

Security / permission approvals
The Event Trigger renders 🔐 prompts with ✅ Once / ♾️ Always / ⛔ Reject buttons
(callback_data jada:perm:<id>:<reply>). Wire the tap back: Telegram Trigger (callback_query) →
parse the data → Jada Session → Respond to Permission.

Session management
Jada Session for list/get/create/delete/abort/fork/diff/summarize/revert/messages/shell/todo
and permission ops.

Model selection

Use a steady text model (e.g. a Llama or Qwen instruct model). Don't rely on provider
auto-defaults — some are non-text (OpenRouter's default can be an image model), and a few
hosted gateway models intermittently return empty responses. Pick an explicit, known-good model.

Build

npm install --ignore-scripts   # n8n-workflow pulls native isolated-vm; only its types are needed
npm run build                  # tsc → dist/, then copies icons

Install into n8n via the community-nodes flow, or copy dist/ to ~/.n8n/custom/.

Docs

  • SPEC.md — full design (architecture, event mapping, surfaces, permissions, open decisions)
  • CHANGELOG.md — version history + verification status

License

MIT

Discussion