Documentation
¶
Overview ¶
Package auxiliary defines the auxiliary internal request client facade (design §7, task 4.1). The import path is "auxiliary" rather than "aux" because Windows reserves the name AUX.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAuxDepthExceeded = errors.New("lipsdk/auxiliary: auxiliary recursion depth exceeded")
ErrAuxDepthExceeded means nested auxiliary calls exceeded the runtime limit.
var ErrNotConfigured = errors.New("lipsdk/auxiliary: auxiliary client not configured")
ErrNotConfigured means no auxiliary client is bound for this execution snapshot.
var ErrQueueSaturated = errors.New("lipsdk/auxiliary: background queue saturated")
ErrQueueSaturated means the bounded background queue cannot admit another distinct job.
var ErrResultTooLarge = errors.New("lipsdk/auxiliary: result too large")
ErrResultTooLarge means a background collection exceeded the configured per-job or scheduler byte bound before allocation. It is returned via Await/Poll (PollFailed) and is inspectable with errors.Is. Zero MaxOutputBytes preserves existing behavior.
var ErrSubmitFailed = errors.New("lipsdk/auxiliary: submit failed")
ErrSubmitFailed is a generic non-queue/non-admission submit failure. Unknown submit errors are wrapped with this sentinel for typed classification.
Functions ¶
This section is empty.
Types ¶
type BackgroundClient ¶
type BackgroundClient interface {
SubmitCollect(ctx context.Context, req Request, opts SubmitOptions) (JobID, error)
Await(ctx context.Context, id JobID) (lipapi.Collected, error)
Forget(id JobID)
}
BackgroundClient is the narrow asynchronous auxiliary collection surface. It deliberately has no callback, arbitrary task, or durable queue API.
type BackgroundPoller ¶
type BackgroundPoller interface {
Poll(ctx context.Context, id JobID) (PollResult, error)
}
BackgroundPoller is the optional non-blocking inspection capability for background auxiliary collections. It is separate from BackgroundClient so external implementations of BackgroundClient remain source-compatible without implementing Poll.
type Client ¶
type Client interface {
Collect(ctx context.Context, req Request) (lipapi.Collected, error)
Stream(ctx context.Context, req Request) (lipapi.EventStream, error)
}
Client is the plugin-facing auxiliary request surface (no executor or backend types).
type DisabledBackgroundClient ¶
type DisabledBackgroundClient struct{}
DisabledBackgroundClient rejects background work when the feature is not composed into a process.
func (DisabledBackgroundClient) Forget ¶
func (DisabledBackgroundClient) Forget(JobID)
func (DisabledBackgroundClient) SubmitCollect ¶
func (DisabledBackgroundClient) SubmitCollect(context.Context, Request, SubmitOptions) (JobID, error)
type DisabledClient ¶
type DisabledClient struct{}
DisabledClient rejects use until core implements auxiliary execution.
func (DisabledClient) Stream ¶
func (DisabledClient) Stream(context.Context, Request) (lipapi.EventStream, error)
type JobID ¶
type JobID string
JobID identifies one bounded process-local background auxiliary collection. Job IDs do not imply durable task semantics and are only valid for the owning process scheduler's retention window.
type PollResult ¶
type PollResult struct {
State PollState
// Collected is a defensive copy only when State == PollCompleted.
Collected lipapi.Collected
// Err is the terminal job failure when State == PollFailed.
Err error
}
PollResult is the non-blocking inspection result for a background job.
type PollState ¶
type PollState uint8
PollState distinguishes non-blocking background job inspection outcomes.
type Request ¶
type Request struct {
Role string
Visibility string
SessionMode SessionMode
ParentTraceID string
ParentALegID string
ParentBLegID string
// ParentBranchBinding is a trusted, content-free binding captured before
// child creation; it is never copied into the canonical Call.
ParentBranchBinding string
DisablePlugins []string
Call *lipapi.Call
}
Request describes a child canonical call executed under lineage and role policy (design §7).
type SessionMode ¶
type SessionMode uint8
SessionMode selects trusted core execution policy for an auxiliary request. It is an SDK-internal request control and is not part of lipapi.Call or any frontend/wire contract.
const ( // SessionModeDefault preserves ordinary auxiliary execution semantics. SessionModeDefault SessionMode = iota // SessionModeDetached opts into private child-A-leg execution without // primary secure-session turn effects. SessionModeDetached )
type SubmitOptions ¶
type SubmitOptions struct {
CoalesceKey string
Timeout time.Duration
OnCoalesced func(coalesced bool)
MaxOutputBytes int
}
SubmitOptions controls admission of a background collection. CoalesceKey must identify a committed continuity transaction; empty keys are rejected so a pre-open preview cannot become a billable scheduler job. OnCoalesced is an optional synchronous observer invoked before return: true if an existing job for the key was returned (coalesced), false if newly admitted. It is content-free, must not retain references, must not block, and must not panic: the scheduler recovers panics from the callback so an SDK consumer cannot crash the scheduler. Additive field: old callers with zero value (nil) remain source-compatible; new callers may set it. MaxOutputBytes is an optional per-job pre-collection byte bound for the aggregated result (Text, Reasoning, ToolArgs). Zero preserves existing scheduler/default behavior; a positive value is clamped to the scheduler's MaxResultBytes defense-in-depth bound and is enforced with CollectWithLimits before builder growth so a misbehaving compressor cannot allocate far above the feature hard/config limit. Bounded defaults for warnings/media remain.