hello

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package hello is a minimal third-party agent. Its author wrote ONLY the business logic in this file: the platform supplies scheduling, capability, budget, isolation, recovery and audit around it. The agent knows nothing about leases, fencing tokens, schedulers, runtime pools, or budget ledgers (design plan §7 "Third-party developers do not need to understand kernel internals...").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPMCPClient

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

HTTPMCPClient posts JSON-RPC tool calls to the loopback MCP endpoint, carrying the attempt execution id in the fencing header.

func NewHTTPMCPClient

func NewHTTPMCPClient(endpoint string) *HTTPMCPClient

func (*HTTPMCPClient) CallTool

func (c *HTTPMCPClient) CallTool(ctx context.Context, executionID, name string, callArgs any) (json.RawMessage, error)

type Runtime

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

Runtime implements agent.Runtime behind the brokered MCP surface.

func NewRuntime

func NewRuntime(mcpEndpoint string) *Runtime

NewRuntime binds the agent to the loopback MCP endpoint.

func (*Runtime) Checkpoint

func (r *Runtime) Checkpoint(_ context.Context, executionID string) (agent.Checkpoint, error)

Checkpoint implements agent.Runtime.

func (*Runtime) Restore

func (r *Runtime) Restore(_ context.Context, request agent.RestoreRequest) error

Restore implements agent.Runtime.

func (*Runtime) Run

func (r *Runtime) Run(ctx context.Context, request agent.StartRequest, emit agent.Emitter) (json.RawMessage, error)

Run executes one task: it invokes one tenant tool through the platform broker and returns the result. This is the whole "agent logic".

Jump to

Keyboard shortcuts

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