runtimecontract

package
v0.0.1-dev.15 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 1 package

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

Index

Constants

View Source
const (
	ContextHeader = "X-Holon-Context"
	CallerHeader  = "X-Holon-Caller"
)

Holon's waypoint sets these on a request it admits, after removing any X-Holon-* header the client sent. ContextHeader carries the signed caller context. CallerHeader carries "<session>/<app>", the app of the same session that calls, a lifecycle hook's job calling as its app, and is absent when a person or the platform calls.

View Source
const (
	ReloadPath       = "/.holon/reload"
	OverlayFileEnv   = "HOLON_OVERLAY_FILE"
	OverlayMediaType = "application/vnd.holon.source-overlay.v0.tar+zstd"
	PrepareFile      = ".holon/prepare"
	StartFile        = ".holon/start"
)

A source overlay is a development app's source as one zstd-compressed tar, with two scripts: PrepareFile installs and builds what the app needs, and StartFile serves it. What PrepareFile prints goes only to a reload's reply; what StartFile prints is the app's log. holon-api posts a save's overlay to ReloadPath on the app, and the platform records the latest one in the file OverlayFileEnv names, which a new container starts from.

Variables

View Source
var CatalogMethods = []string{"tools/list", "resources/list", "events/list"}

CatalogMethods are the MCP methods that list what a server serves, which types are generated from.

Functions

func AppDiscoveryRequest

func AppDiscoveryRequest(method, path, mcpMethod string) bool

AppDiscoveryRequest reports a request the platform may make of an app without a caller context: the methods that describe what the app serves.

func DecodeContextClaims

func DecodeContextClaims(token string, claims any) error

Types

type OverlayRecord

type OverlayRecord struct {
	Registry   string `json:"registry"`
	Repository string `json:"repository"`
	Token      string `json:"token"`
	Digest     string `json:"digest"`
	MediaType  string `json:"mediaType"`
}

OverlayRecord is where the platform keeps an app's latest overlay: a blob the token may read from the registry.

func (OverlayRecord) Blob

func (r OverlayRecord) Blob() *url.URL

Blob is the URL of a well-formed record's overlay, and nil for a malformed record.

type ReloadReply

type ReloadReply struct {
	Error  string `json:"error,omitempty"`
	Output string `json:"output,omitempty"`
}

ReloadReply is the body of a reload's reply: the end of what PrepareFile printed, and why the app did not start when the reload fails.

Jump to

Keyboard shortcuts

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