Documentation
¶
Index ¶
- func CodeOf(err error) api.ErrorCode
- func EntryBytes(accounting EntryAccounting) (uint64, error)
- func LineageBytes(accounting LineageAccounting) (uint64, error)
- func SuccessorBytes(state State, result api.Result) (uint64, error)
- func UsedSlots(accounting LineageAccounting) (uint64, error)
- type Clock
- type Compute
- type DynamicInitial
- type EntryAccounting
- type EntryRef
- type InitialCommit
- type InitialPublication
- type Layout
- type LineageAccounting
- type Outcome
- type ProgressKind
- type ProgressProof
- type ReadInitial
- type ReadPageReservation
- type Registry
- func (registry *Registry) Close() error
- func (registry *Registry) CommitDynamicInitial(request DynamicInitial, work *serverruntime.WorkLease) (commit InitialCommit, err error)
- func (registry *Registry) CommitReadInitial(request ReadInitial, work *serverruntime.WorkLease) (InitialCommit, error)
- func (registry *Registry) Continue(ctx context.Context, token Token, tool api.ToolName, cwdID uint64, ...)
- func (registry *Registry) Lookup(token Token) (EntryRef, api.ErrorCode)
- type ReservationKind
- type ReservationUse
- type Resources
- type ResultFinalizer
- type SharedAllocation
- type State
- type Token
- type Waiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EntryBytes ¶
func EntryBytes(accounting EntryAccounting) (uint64, error)
EntryBytes returns the dynamic bytes retained by one entry.
func LineageBytes ¶
func LineageBytes(accounting LineageAccounting) (uint64, error)
LineageBytes returns dynamic bytes; fixed arena/index capacity is excluded.
func SuccessorBytes ¶
SuccessorBytes returns the exact cursor bytes retained by one successor state and the memoized result of its parent.
func UsedSlots ¶
func UsedSlots(accounting LineageAccounting) (uint64, error)
UsedSlots returns resident plus semantic tombstone plus reserved slots.
Types ¶
type DynamicInitial ¶
type DynamicInitial struct {
State State
Root *rootfs.Lease
SummaryPlan ReservationUse
}
DynamicInitial creates one project/search lineage with a terminal-summary credit.
type EntryAccounting ¶
EntryAccounting describes cursor-owned backing retained by one token entry.
type EntryRef ¶
type EntryRef struct {
// contains filtered or unexported fields
}
EntryRef remains safe across arena reuse because every claim carries a generation.
type InitialCommit ¶
type InitialCommit struct {
Token Token
Publication *InitialPublication
}
InitialCommit couples the first token with its transactional publication owner.
type InitialPublication ¶
type InitialPublication struct {
// contains filtered or unexported fields
}
InitialPublication keeps rollback armed until the complete response is written.
func (*InitialPublication) Abort ¶
func (publication *InitialPublication) Abort()
Abort rolls back an armed lineage and returns the transferred work slot.
func (*InitialPublication) Commit ¶
func (publication *InitialPublication) Commit() error
Commit publishes the lineage and returns the transferred work slot.
func (*InitialPublication) MarkNoCommit ¶
func (publication *InitialPublication) MarkNoCommit()
MarkNoCommit rolls back publication but leaves the running worker charged.
func (*InitialPublication) Prepare ¶
func (publication *InitialPublication) Prepare() error
Prepare makes a provisional lineage lookup-visible while retaining rollback.
func (*InitialPublication) Release ¶
func (publication *InitialPublication) Release()
Release is invoked by WorkLease.WorkerReturned and rolls back only while armed.
type Layout ¶
type Layout struct {
MaxEntries uint64
IndexSlots uint64
WordBytes uint64
TokenIndexBacking uint64
LineageIndexBacking uint64
EntryArenaBacking uint64
LineageArenaBacking uint64
SliceDescriptors uint64
ScalarBytes uint64
Total uint64
}
Layout is the complete fixed allocation retained by one registry.
func ContainerLayout ¶
ContainerLayout computes fixed parallel-column backing without allocator guesses.
type LineageAccounting ¶
type LineageAccounting struct {
Resident uint64
Tombstones uint64
ReservedSlots uint64
EntryBytes uint64
RootBytes uint64
ReservedBytes uint64
}
LineageAccounting describes dynamic bytes and logical slots for one lineage.
type Outcome ¶
type Outcome struct {
Result api.Result
Successor State
Reservation ReservationUse
Progress ProgressProof
Finalize ResultFinalizer
}
Outcome is either terminal Result or a Successor plus token-aware Finalize callback.
type ProgressKind ¶
type ProgressKind uint8
ProgressKind is the closed set of monotonic continuation transitions.
const ( ProgressOutputKey ProgressKind = iota + 1 ProgressReadItem ProgressSummary ProgressTraversal )
type ProgressProof ¶
type ProgressProof struct {
Kind ProgressKind
BeforeValue uint64
AfterValue uint64
Before [32]byte
After [32]byte
}
ProgressProof prevents a partial cursor from reproducing the same state forever.
func (ProgressProof) Valid ¶
func (proof ProgressProof) Valid() bool
Valid reports whether this proof strictly advances its selected dimension.
type ReadInitial ¶
type ReadInitial struct {
State State
PagePlan ReadPageReservation
}
ReadInitial creates one immutable read lineage and charges shared backing once.
type ReadPageReservation ¶
ReadPageReservation reserves every page after the already-rendered first page.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry owns all cursor state for exactly one MCP connection.
func (*Registry) Close ¶
Close invalidates every token and releases fixed storage after the last pin.
func (*Registry) CommitDynamicInitial ¶
func (registry *Registry) CommitDynamicInitial(request DynamicInitial, work *serverruntime.WorkLease) (commit InitialCommit, err error)
CommitDynamicInitial installs a provisional project/search lineage.
func (*Registry) CommitReadInitial ¶
func (registry *Registry) CommitReadInitial(request ReadInitial, work *serverruntime.WorkLease) (InitialCommit, error)
CommitReadInitial installs a provisional immutable read plan.
type ReservationKind ¶
type ReservationKind uint8
ReservationKind identifies the only two pre-admitted continuation plans.
const ( ReadPagePlan ReservationKind = iota + 1 BroadSummaryFinal )
type ReservationUse ¶
type ReservationUse struct {
Kind ReservationKind
Slots uint64
Bytes uint64
MustTerminalize bool
}
ReservationUse describes one exact reservation or materialization transition.
type ResultFinalizer ¶
ResultFinalizer renders a partial result after the registry derives its child token.
type SharedAllocation ¶
type SharedAllocation interface {
}
SharedAllocation is immutable backing shared by every entry in a read lineage.
type State ¶
type State interface {
Tool() api.ToolName
CWDID() uint64
Digest() [32]byte
Footprint() uint64
CloneForCompute() State
}
State is an immutable, cursor-owned continuation snapshot.
type Token ¶
type Token [16]byte
Token is one opaque, connection-bound 128-bit cursor identifier.
func ParseToken ¶
ParseToken accepts only the canonical unpadded base64url representation.