Documentation
¶
Overview ¶
Package interaction owns UI-neutral request, response, and broker SPIs.
@import { NamedInterface } from "github.com/spice-framework/spice/annotation/modulith" @NamedInterface("interaction")
Index ¶
Constants ¶
const MaximumPayloadBytes = 512 << 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
Broker is the UI-neutral user-interaction port injected into the engine. Implementations must be concurrent-safe and cooperatively honor context.
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request asks an injected broker for typed user input.
func NewRequest ¶
NewRequest validates and defensively copies one interaction request.
func (Request) Schema ¶
func (request Request) Schema() json.RawMessage
type Requester ¶
Requester is a run-bound interaction lifecycle capability. Unlike Broker it accepts no caller-supplied Scope; the owner fixes run authority at binding.
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response completes one interaction with structured user input.
func NewResponse ¶
func NewResponse(id ID, value json.RawMessage) (Response, error)
NewResponse validates and defensively copies one response.
func (Response) Value ¶
func (response Response) Value() json.RawMessage
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope identifies the immutable run authority that owns an interaction. Brokers use it to route pending requests without depending on agent internals.
type UnavailableBroker ¶
type UnavailableBroker struct{}
UnavailableBroker is the fail-closed fallback when no client owns prompts.
type UnavailableRequester ¶
type UnavailableRequester struct{}
UnavailableRequester is a fail-closed capability for direct dispatcher tests and embeddings that deliberately provide no run interaction lifecycle.