storage

package
v7.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartupPhaseMigrating = sessiontree.StartupPhaseMigrating
	StartupPhaseVerifying = sessiontree.StartupPhaseVerifying
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackendKernel

type BackendKernel struct {
	*sessiontree.BackendRepo
	// contains filtered or unexported fields
}

BackendKernel is the single domain kernel shared by every public Backend.

func NewBackendKernel

func NewBackendKernel(ctx context.Context, backend spi.Backend, now func() time.Time) (*BackendKernel, error)

NewBackendKernel opens all canonical Floret domain state.

func NewBackendKernelInTransaction

func NewBackendKernelInTransaction(ctx context.Context, backend spi.Backend, tx spi.WriteTx, now func() time.Time, progress StartupProgress) (*BackendKernel, error)

NewBackendKernelInTransaction opens all canonical Floret domain state in the caller's startup transaction.

func (*BackendKernel) ActiveToolset

func (kernel *BackendKernel) ActiveToolset(ctx context.Context, scopeID, provider, model string) (result cache.ToolsetSnapshot, found bool, err error)

func (*BackendKernel) AppendProviderRequest

func (kernel *BackendKernel) AppendProviderRequest(ctx context.Context, value cache.ProviderRequestRecord) error

func (*BackendKernel) AppendProviderResponse

func (kernel *BackendKernel) AppendProviderResponse(ctx context.Context, value cache.ProviderResponseRecord) error

func (*BackendKernel) AppendSegment

func (kernel *BackendKernel) AppendSegment(ctx context.Context, value cache.Segment) error

func (*BackendKernel) AppendToolset

func (kernel *BackendKernel) AppendToolset(ctx context.Context, value cache.ToolsetSnapshot) error

func (*BackendKernel) CancelTurn

func (kernel *BackendKernel) CancelTurn(ctx context.Context, request sessiontree.CancelTurnRequest) (result sessiontree.CancelTurnResult, err error)

CancelTurn commits the user Stop terminal and clears prompt continuation in the same transaction. It is the cancellation counterpart of FinishTurn.

func (*BackendKernel) Checkpoint

func (kernel *BackendKernel) Checkpoint(ctx context.Context) error

Checkpoint flushes both canonical domain state and memory-resident prompt observations during graceful shutdown or an explicit recovery barrier.

func (*BackendKernel) CheckpointProviderRequest

func (kernel *BackendKernel) CheckpointProviderRequest(ctx context.Context, segments []cache.Segment, toolsets []cache.ToolsetSnapshot, value cache.ProviderRequestRecord) error

func (*BackendKernel) DeletePromptScopes

func (kernel *BackendKernel) DeletePromptScopes(ctx context.Context, scopeIDs ...string) error

func (*BackendKernel) DeleteRootTree

func (kernel *BackendKernel) DeleteRootTree(ctx context.Context, rootThreadID string) (result sessiontree.DeleteRootTreeResult, err error)

func (*BackendKernel) FailUnknownEffectTurn

func (kernel *BackendKernel) FailUnknownEffectTurn(ctx context.Context, request sessiontree.FailUnknownEffectTurnRequest) (result sessiontree.FailUnknownEffectTurnResult, err error)

FailUnknownEffectTurn commits the fixed unknown-effect terminal together with the current prompt-cache checkpoint. Provider continuation is removed by the session-tree mutation in the same transaction.

func (*BackendKernel) FinishTurn

func (kernel *BackendKernel) FinishTurn(ctx context.Context, request sessiontree.FinishTurnRequest) (result sessiontree.FinishTurnResult, err error)

FinishTurn commits the terminal semantic state and accumulated prompt observations in one transaction. Provider request checkpoints are already durable; this boundary adds response diagnostics and terminal state.

func (*BackendKernel) LatestPressureAnchor

func (kernel *BackendKernel) LatestPressureAnchor(ctx context.Context, scopeID, provider, model string) (result cache.PressureAnchorState, found bool, err error)

func (*BackendKernel) ProviderRequests

func (kernel *BackendKernel) ProviderRequests(ctx context.Context, scopeID string) (result []cache.ProviderRequestRecord, err error)

func (*BackendKernel) ProviderResponses

func (kernel *BackendKernel) ProviderResponses(ctx context.Context, scopeID string) (result []cache.ProviderResponseRecord, err error)

func (*BackendKernel) Segments

func (kernel *BackendKernel) Segments(ctx context.Context, scopeID, provider, model string) (result []cache.Segment, err error)

type StartupPhase added in v7.0.2

type StartupPhase = sessiontree.StartupPhase

type StartupProgress added in v7.0.2

type StartupProgress = sessiontree.StartupProgress

Jump to

Keyboard shortcuts

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