Documentation
¶
Index ¶
Constants ¶
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.
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 ¶
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 ¶
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 ¶
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.