native

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package native is Fort's NativeRuntime (backlog AO-014): it spawns agent CLIs itself — no Multica — normalizes their stdout into runtime.RunEvents, injects stdin for Signal (human-in-the-loop), and tracks exit codes.

The executor is provider-agnostic: a Provider maps an agent name to argv and an optional line parser. DefaultProviders() encodes the AO-002 recon contract for claude/codex/hermes/openclaw (openclaw argv is a best guess — spec 023).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	Name string
	// Command builds the argv for a run (argv[0] is the binary).
	Command func(spec runtime.RunSpec) []string
	// Parse optionally normalizes a stdout line into a message. When ok is
	// false the line is emitted as a raw EventStdout.
	Parse func(line string) (msg string, ok bool)
}

Provider describes how to launch one agent CLI headless.

func DefaultProviders

func DefaultProviders() []Provider

DefaultProviders returns the built-in provider set encoding the AO-002 recon contract (docs/notes/runtime-recon.md) for all four agents.

type Runtime

type Runtime struct {

	// EnvAllow, when non-empty, restricts which host environment variables are
	// passed to spawned CLIs (least privilege, AO-041). Empty = pass the full
	// environment (the relaxed default; providers need their own auth keys).
	EnvAllow []string
	// contains filtered or unexported fields
}

Runtime is the native executor.

func New

func New(workRoot string, providers ...Provider) *Runtime

New builds a native runtime rooted at workRoot with the given providers.

func (*Runtime) Dispatch

func (r *Runtime) Dispatch(ctx context.Context, spec runtime.RunSpec) (runtime.Run, error)

Dispatch launches spec via its provider.

func (*Runtime) Name

func (r *Runtime) Name() string

Name implements runtime.Runtime.

Jump to

Keyboard shortcuts

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