node

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package node exposes a Fort's local runtime over HTTP so another Fort — the control plane — can dispatch runs to this machine (spec 022). It depends only on core/runtime (the interface); cmd/fort injects the concrete native runtime.

The wire protocol is deliberately small:

POST /api/exec              body: RunSpec JSON
                           -> application/x-ndjson: one RunEvent per line,
                              flushed live, until a terminal exited/error, EOF.
POST /api/exec/{id}/signal  body: raw input  -> HITL stdin injection
POST /api/exec/{id}/cancel                    -> cancel a running remote run

Every route requires "Authorization: Bearer <token>" (constant-time compared): the endpoint runs arbitrary agent CLIs, so it is never left unauthenticated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves the inter-Fort execution endpoint over an injected runtime.

func New

func New(rt runtime.Runtime, token string) *Server

New builds a node server over rt. token must be non-empty for the endpoint to accept any request.

func (*Server) Register

func (s *Server) Register(mux *http.ServeMux)

Register mounts the exec routes onto mux.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL