sqlite

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTestUIPath

func DefaultTestUIPath(root string) string

Types

type Option

type Option func(*options)

func WithAuthorityClock added in v0.18.0

func WithAuthorityClock(now func() time.Time) Option

func WithLeasePolicy added in v0.18.0

func WithLeasePolicy(policy sessiontree.LeasePolicy) Option

type Store

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

func Open

func Open(path string, opts ...Option) (*Store, error)

func (*Store) AcquireTurnLease

func (s *Store) AcquireTurnLease(ctx context.Context, request sessiontree.TurnLease) (sessiontree.TurnLease, error)

func (*Store) ActiveToolset

func (s *Store) ActiveToolset(ctx context.Context, promptScopeID, provider, model string) (cache.ToolsetSnapshot, bool, error)

func (*Store) ActiveTurnLease

func (s *Store) ActiveTurnLease(ctx context.Context, threadID string) (sessiontree.TurnLease, bool, error)

func (*Store) AdmitSubAgentInput added in v0.18.0

func (*Store) AdmitTurn added in v0.18.0

func (*Store) Append

func (*Store) AppendProviderRequest

func (s *Store) AppendProviderRequest(ctx context.Context, req cache.ProviderRequestRecord) error

func (*Store) AppendProviderResponse

func (s *Store) AppendProviderResponse(ctx context.Context, resp cache.ProviderResponseRecord) error

func (*Store) AppendSegment

func (s *Store) AppendSegment(ctx context.Context, seg cache.Segment) error

func (*Store) AppendToolset

func (s *Store) AppendToolset(ctx context.Context, snap cache.ToolsetSnapshot) error

func (*Store) ArtifactClosure added in v0.18.0

func (s *Store) ArtifactClosure(ctx context.Context, req sessiontree.ArtifactClosureRequest) (artifact.Closure, error)

func (*Store) AuthorityLeasePolicy added in v0.18.0

func (s *Store) AuthorityLeasePolicy() sessiontree.LeasePolicy

func (*Store) BeginCompaction added in v0.18.0

func (*Store) BeginEffectDispatch added in v0.18.0

func (*Store) Close

func (s *Store) Close() error

func (*Store) CommitForkOperation added in v0.18.0

func (*Store) CompareAndSwapAgentTodoState added in v0.11.0

func (s *Store) CompareAndSwapAgentTodoState(ctx context.Context, state sessiontree.AgentTodoState, expectedVersion int64) (sessiontree.AgentTodoState, error)

func (*Store) CreateRoot added in v0.18.0

func (*Store) CreateThread

func (s *Store) CreateThread(ctx context.Context, meta sessiontree.ThreadMeta) (sessiontree.ThreadMeta, error)

func (*Store) CreateThreadWithInitialEntry added in v0.18.0

func (s *Store) CreateThreadWithInitialEntry(ctx context.Context, meta sessiontree.ThreadMeta, initial sessiontree.Entry) (sessiontree.ThreadMeta, sessiontree.Entry, error)

func (*Store) DBPath

func (s *Store) DBPath() string

func (*Store) DeleteMetadata

func (s *Store) DeleteMetadata(ctx context.Context, namespace, id string) error

func (*Store) DeletePromptScopes

func (s *Store) DeletePromptScopes(ctx context.Context, promptScopeIDs ...string) error

func (*Store) DeleteProviderState added in v0.10.0

func (s *Store) DeleteProviderState(ctx context.Context, threadID string) error

func (*Store) DeleteRootTree added in v0.18.0

func (s *Store) DeleteRootTree(ctx context.Context, rootThreadID string) (sessiontree.DeleteRootTreeResult, error)

func (*Store) DeleteThread

func (s *Store) DeleteThread(ctx context.Context, threadID string) error

func (*Store) DeleteThreadArtifacts

func (s *Store) DeleteThreadArtifacts(ctx context.Context, threadID string) error

func (*Store) Entries

func (s *Store) Entries(ctx context.Context, threadID string) ([]sessiontree.Entry, error)

func (*Store) Entry

func (s *Store) Entry(ctx context.Context, threadID, entryID string) (sessiontree.Entry, error)

func (*Store) FailForkOperation added in v0.18.0

func (*Store) FinishCompaction added in v0.18.0

func (*Store) FinishEffectDispatch added in v0.18.0

func (*Store) FinishSubAgentClose added in v0.18.0

func (*Store) FinishTurn added in v0.18.0

func (*Store) Fork

func (*Store) ForkOperation added in v0.5.0

func (s *Store) ForkOperation(ctx context.Context, operationID string) (storage.ForkOperationRecord, error)

func (*Store) ForkWithInitialEntry added in v0.18.0

func (s *Store) ForkWithInitialEntry(ctx context.Context, opts sessiontree.ForkOptions, initial sessiontree.Entry) (sessiontree.ThreadMeta, sessiontree.Entry, error)

func (*Store) InspectSubAgentThreadAuthority added in v0.19.0

func (s *Store) InspectSubAgentThreadAuthority(ctx context.Context, parentThreadID, childThreadID string) (sessiontree.SubAgentThreadAuthoritySnapshot, error)

func (*Store) InspectThreadAuthority added in v0.18.0

func (s *Store) InspectThreadAuthority(ctx context.Context, threadID string) (sessiontree.ThreadAuthoritySnapshot, error)

func (*Store) LatestPressureAnchor

func (s *Store) LatestPressureAnchor(ctx context.Context, promptScopeID, providerName, model string) (cache.PressureAnchorState, bool, error)

func (*Store) ListMetadata

func (s *Store) ListMetadata(ctx context.Context, namespace string) ([]storage.MetadataRecord, error)

func (*Store) ListSubAgentInputs added in v0.18.0

func (s *Store) ListSubAgentInputs(ctx context.Context, childThreadID string, state sessiontree.SubAgentInputState) ([]sessiontree.SubAgentInputRecord, error)

func (*Store) ListThreads

func (*Store) MarkEffectUnknown added in v0.18.0

func (*Store) Metadata

func (s *Store) Metadata(ctx context.Context, namespace, id string) (storage.MetadataRecord, error)

func (*Store) MoveLeaf

func (s *Store) MoveLeaf(ctx context.Context, threadID, entryID string) error

func (*Store) Path

func (s *Store) Path(ctx context.Context, threadID, leafID string) ([]sessiontree.Entry, error)

func (*Store) PathPage added in v0.11.4

func (s *Store) PathPage(ctx context.Context, threadID, leafID, beforeEntryID string, limit int) (sessiontree.PathPage, error)

func (*Store) PrepareEffectAttempt added in v0.18.0

func (*Store) PrepareForkOperation added in v0.5.0

func (s *Store) PrepareForkOperation(ctx context.Context, rec storage.ForkOperationRecord) (storage.ForkOperationRecord, bool, error)

func (*Store) PrepareSubAgentClose added in v0.18.0

func (*Store) ProviderRequests

func (s *Store) ProviderRequests(ctx context.Context, promptScopeID string) ([]cache.ProviderRequestRecord, error)

func (*Store) ProviderResponses

func (s *Store) ProviderResponses(ctx context.Context, promptScopeID string) ([]cache.ProviderResponseRecord, error)

func (*Store) ProviderState added in v0.10.0

func (s *Store) ProviderState(ctx context.Context, threadID string) (sessiontree.ProviderStateRecord, error)

func (*Store) PublishSubAgent added in v0.18.0

func (*Store) PublishSubAgentInput added in v0.18.0

func (*Store) PutMetadata

func (s *Store) PutMetadata(ctx context.Context, rec storage.MetadataRecord) error

func (*Store) PutProviderState added in v0.10.0

func (s *Store) PutProviderState(ctx context.Context, record sessiontree.ProviderStateRecord) error

func (*Store) ReadAgentTodoState added in v0.11.0

func (s *Store) ReadAgentTodoState(ctx context.Context, threadID string) (sessiontree.AgentTodoState, error)

func (*Store) ReadArtifact added in v0.18.0

func (*Store) ReadCompaction added in v0.18.0

func (s *Store) ReadCompaction(ctx context.Context, threadID, requestID string) (sessiontree.CompactionOperation, bool, error)

func (*Store) RecoverInterruptedTurn added in v0.18.0

func (*Store) RejectEffectAttempt added in v0.18.0

func (*Store) ReleaseTurnLease

func (s *Store) ReleaseTurnLease(ctx context.Context, proof sessiontree.TurnLease) error

func (*Store) RenewTurnLease added in v0.18.0

func (s *Store) RenewTurnLease(ctx context.Context, proof sessiontree.TurnLease) (sessiontree.TurnLease, error)

func (*Store) SchemaVersion

func (s *Store) SchemaVersion(ctx context.Context) (string, error)

func (*Store) Segments

func (s *Store) Segments(ctx context.Context, promptScopeID, provider, model string) ([]cache.Segment, error)

func (*Store) SetThreadTitle added in v0.18.0

func (*Store) SettlePendingToolRecovery added in v0.18.0

func (*Store) TakeOverCompaction added in v0.18.0

func (*Store) Thread

func (s *Store) Thread(ctx context.Context, threadID string) (sessiontree.ThreadMeta, error)

func (*Store) ThreadTombstone added in v0.18.0

func (s *Store) ThreadTombstone(ctx context.Context, threadID string) (sessiontree.ThreadTombstone, error)

func (*Store) UpdateThread

func (s *Store) UpdateThread(ctx context.Context, meta sessiontree.ThreadMeta) error

func (*Store) ValidateArtifactForkDestination added in v0.18.0

func (s *Store) ValidateArtifactForkDestination(ctx context.Context, closure artifact.Closure) error

func (*Store) ValidateInterruptedTurnResolution added in v0.19.0

func (s *Store) ValidateInterruptedTurnResolution(ctx context.Context, req sessiontree.RecoverInterruptedTurnRequest) error

Jump to

Keyboard shortcuts

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