Desktop App Node Sidecar Engine Host (stdio, no port)

    1

    Native desktop apps often need logic that already exists as a JavaScript library: a tax or pricing engine, a PDF form filler, a redaction tokenizer, a renderer.

    $29

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Desktop App Node Sidecar Engine Host (stdio, no port)

    Example session with this skill installed

    I need to run a Node-based PDF form filler inside my C# WinForms app. How do I define a 'fill-pdf' operation and call it from the app?

    • Read your context and instructions
    • Compiled the desktop app node

    I have defined the operation in the host script and configured the C# client to call it.

    Implementation details

    In scripts/host.mjs, the operation is added to the engine:

    import { createHost, fail } from './host.mjs';
    import { fillPdfBuffer } from 'pdf-lib-wrapper';
    
    const ops = {
      'fill-pdf': async ({ templatePath, data }) => {
        try {
          const result = await fillPdfBuffer(templatePath, data);
          return { bytesSent: result.length, path: templatePath };
        } catch (err) {
          throw fail('PDF_ERROR', err.message, { templatePath });
        }
      }
    };
    
    createHost(ops).serve();
    

    In your C# WinForms project, use the SidecarClient to invoke it:

    var client = new SidecarClient("node.exe", "host.mjs", AppContext.BaseDirectory);
    
    try 
    {
        var args = new { templatePath = "form.pdf", data = new { Name = "John Doe" } };
        var result = await client.Call("fill-pdf", args);
        Console.WriteLine($"Filled: {result["path"]}");
    }
    catch (SidecarException ex) when (ex.Code == "PDF_ERROR")
    {
        MessageBox.Show($"Failed to fill PDF: {ex.Message}");
    }
    

    Next steps

    1. Add the pdf-lib dependency to your sidecar's package.json.
    2. Copy reference/SidecarClient.cs into your .NET solution.
    3. Run the smoke test to verify node.exe can see the host script.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Native desktop apps often need logic that already exists as a JavaScript library: a tax or pricing engine, a PDF form filler, a redaction tokenizer, a renderer. Rewriting it forks the logic, embedding a browser is heavy, and a local HTTP port means firewall prompts and port clashes. This is the thin alternative.

    Host (host.mjs): a JSON-lines server over stdin/stdout. One request object per line in, one reply per line out, answered in order through a single queue; { id, ok, result } or { id, ok: false, error: { code, message, errors? } }; UNKNOWN_OP, BAD_REQUEST, LINE_TOO_LONG (16 MiB ceiling, not buffered) and ENGINE_ERROR with messages capped at 500 characters; prototype names cannot be dispatched; the process exits when stdin closes. createHost(ops) builds a host from your own operations table; the pattern for lazy engine loading keeps startup in milliseconds.

    Clients: client.mjs for Node and reference/SidecarClient.cs for .NET 8+, both implementing the same rules: lazy start on first call, replies matched by id so several calls can be in flight, pending calls failed with ENGINE_STOPPED when the process exits and a transparent restart on the next call, ENGINE_TIMEOUT per call, ENGINE_MISSING when the runtime or script is absent, and close/Dispose ending the host by closing its stdin.

    3 tests: dispatch and the error contract, the real stdio protocol with a spawned host, and the client against a host that crashes and sleeps (restart, timeout, close). reference/runtime-pinning.md: pinning node.exe by SHA-256, start arguments, the symlink pitfall, the build-time smoke test and the contract rules.

    Node 20+, no packages, no network.

    Single ordered queue per host instance. Payloads over 16 MiB require file-based transfer. .NET client provided as source code rather than a compiled library.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 17 days ago

    Requires

    Node.js 20+

    Permissions

    Terminal / Shell
    Read Files
    Listed17 days ago

    What's inside

    Frequently Asked Questions

    This skill acts as a high-performance bridge, allowing native desktop applications (like .NET or Swift) to execute Node.js libraries without the overhead of an embedded browser or the security risks of opening local network ports.

    The engine is designed for Node 20+ environments and provides ready-to-use client wrappers for .NET 8+; it is compatible with major desktop frameworks including WPF, Avalonia, WinForms, and Qt.

    You receive the host engine script, a structured communication protocol for JSON-over-stdio, and client-side wrappers for .NET and Node to simplify process management and request queuing.

    The engine includes built-in process management that automatically monitors the sidecar, allowing for lazy-loading on demand and automatic restarts if the Node process crashes.

    By default, the host uses a single ordered queue for stability; if your application requires heavy parallel processing, you can simply spin up multiple instances of the sidecar engine.

    Setup involves defining your custom logic in the operations table, bundling a pinned Node binary with your app installer, and initializing the client wrapper to point to that executable.

    New in APIs & Backend