Help us shape the future of Go! Take the 2026 Go Developer Survey

model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package model is the LLM seam for the five stages (SPEC §1-2). Stages drive their work through Client. Mock returns deterministic responses so the relay and its tests run without an API key or a per-role model. Relay carries a response supplied out of band by an operator (Claude driving adh via a skill), so the same Execute path advances an arc whether the reasoning came from a mock, a relayed operator, or a real API client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mock

type Mock struct {
	Reply string
	Class authority.ModelClass
}

Mock is a deterministic model client. When Reply is empty it echoes the role. Class is the capability tier it reports to the model-gate (SPEC §5.1); an empty Class reports reasoning, so the ordinary relay passes the gate. It satisfies the Client interface each consuming package declares.

func (Mock) Complete

func (m Mock) Complete(_ context.Context, req Request) (Response, error)

Complete returns a fixed response and never makes a network call.

func (Mock) ModelClass

func (m Mock) ModelClass() authority.ModelClass

ModelClass reports the capability tier this model binding runs at, defaulting to reasoning when unset.

type Relay

type Relay struct {
	Response string
	Class    authority.ModelClass
}

Relay is a Client whose completion is supplied out of band: the step command emits the stage's prompt to an operator (Claude driving adh via a skill) and feeds the operator's reply back on a second invocation as Response. Relay returns that reply from Complete, so the arc advances through the ordinary Execute path. It never makes a network call. Class is the tier it reports to the model-gate (SPEC §5.1); an empty Class reports reasoning, because the operator supplying the reply is treated as a reasoning-class worker.

func (Relay) Complete

func (r Relay) Complete(_ context.Context, _ Request) (Response, error)

Complete returns the operator-supplied response verbatim. The request is ignored: its prompt was already emitted when the turn was opened.

func (Relay) ModelClass

func (r Relay) ModelClass() authority.ModelClass

ModelClass reports the capability tier the relayed worker runs at, defaulting to reasoning when unset so judgment roles pass the gate.

type Request

type Request struct {
	Role   adh.Stage
	Prompt string
}

Request is one model call: the acting stage and its prompt.

type Response

type Response struct {
	Text string
}

Response is a model completion.

Jump to

Keyboard shortcuts

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