Versions in this module Expand all Collapse all v0 v0.11.0 Aug 25, 2026 Changes in this version + const CaptureReservation + const ErrorRequestBudget + const ErrorResourceLimit + const ErrorResponseBudget + const MaxCaptureReservations + const MaxConcurrentRPCRequests + const MaxDestructiveScans + const MaxGitStderrBytes + const MaxGitStdoutBytes + const MaxJSONDepth + const MaxJSONRecords + const MaxJSONStringBytes + const MaxJSONTokens + const MaxJSONTotalStringBytes + const MaxMutationProcesses + const MaxPublishedSnapshotBytes + const MaxQueuedRPCNotifications + const MaxQueuedRPCRequests + const MaxRPCStreamReservations + const MaxRPCStreams + const MaxRawRequestBytes + const MaxReadProcesses + const MaxRequestDecodes + const MaxRequestReservations + const MaxResponseBuilds + const MaxResponsePayload + const MaxResponseReservations + const MaxSyntheticEnvelope + const MaxWorkspaceCaptures + const RequestReservation + const ResponseReservation + const StreamReservation + var ErrContainmentUnavailable = errors.New("git subprocess containment unavailable") + var ErrRequestBudget = errors.New("git request budget exceeded") + var ErrResourceLimit = errors.New("git runtime resource limit") + var ErrResponseBudget = errors.New("git response budget exceeded") + func JSONEncodedSize(value any, maxBytes int) (int, error) + func MarshalJSONBounded(value any, maxBytes int) (json.RawMessage, error) + func RegisterTyped[TReq any, TResp any](router *sessionrpc.Router, typeID uint32, runtime *Runtime, ...) + type Admission struct + func (a *Admission) Release() + type CommandError struct + BudgetExceeded bool + Cause error + ExitCode int + UnknownOutcome bool + func (e *CommandError) Error() string + func (e *CommandError) Unwrap() error + type CommandKind uint8 + const CommandMutation + const CommandRead + type CommandResult struct + ExitCode int + Stderr []byte + Stdout []byte + UnknownOutcome bool + type Coordinator interface + AcquireMutation func(context.Context, RepositoryIdentity) (Lease, error) + AcquireRead func(context.Context, RepositoryIdentity) (Lease, error) + Invalidate func(RepositoryIdentity) + type FilesystemEffect struct + ChangesTopology bool + Paths []string + type FilesystemMutationCoordinator interface + CoordinateFilesystemMutation func(context.Context, FilesystemEffect, func() error) error + type Lease interface + Context func(context.Context) context.Context + Epoch func() uint64 + Release func() + type RPCSpec struct + Request RequestSpec[TReq] + Response ResponseSpec[TResp] + func DefaultRPCSpec[TReq any, TResp any]() RPCSpec[TReq, TResp] + type RepositoryIdentity struct + CommonDir string + CommonRepoKey string + GitDir string + WorktreeKey string + WorktreeRoot string + type RequestSpec struct + Validate func(*T) error + type ResponseSpec struct + RetainedBytes func(*T) (int64, error) + type Runtime struct + func New() *Runtime + func (r *Runtime) AcquireCapture(ctx context.Context) (*Admission, error) + func (r *Runtime) AcquireDestructiveScan(ctx context.Context) (*Admission, error) + func (r *Runtime) AcquireMutation(ctx context.Context, id RepositoryIdentity) (Lease, error) + func (r *Runtime) AcquireRPCStream(ctx context.Context) (*Admission, error) + func (r *Runtime) AcquireRead(ctx context.Context, id RepositoryIdentity) (Lease, error) + func (r *Runtime) AcquireRequestDecode(ctx context.Context) (*Admission, error) + func (r *Runtime) AcquireResponseBuild(ctx context.Context) (*Admission, error) + func (r *Runtime) CoordinateFilesystemMutation(ctx context.Context, effect FilesystemEffect, fn func() error) error + func (r *Runtime) CoordinateTopologyMutation(ctx context.Context, effect FilesystemEffect, fn func(context.Context) error) error + func (r *Runtime) Invalidate(id RepositoryIdentity) + func (r *Runtime) NewSession() *Session + func (r *Runtime) RepositoryIdentityCurrent(id RepositoryIdentity) bool + func (r *Runtime) ReservePublishedSnapshot(bytes int64) (*Admission, error) + func (r *Runtime) ResolveRepositoryIdentity(ctx context.Context, path string) (RepositoryIdentity, bool, error) + func (r *Runtime) RetainRepository(ctx context.Context, id RepositoryIdentity) (*Admission, error) + func (r *Runtime) RunCapture(ctx context.Context, repoRoot string, env []string, args ...string) (CommandResult, error) + func (r *Runtime) RunMutation(ctx context.Context, repoRoot string, env []string, args ...string) (CommandResult, error) + func (r *Runtime) RunRead(ctx context.Context, repoRoot string, env []string, args ...string) (CommandResult, error) + func (r *Runtime) RunReadAllowExitCodes(ctx context.Context, repoRoot string, env []string, allowedExitCodes []int, ...) (CommandResult, error) + func (r *Runtime) StreamCapture(ctx context.Context, repoRoot string, env []string, ...) (CommandResult, error) + func (r *Runtime) StreamRead(ctx context.Context, repoRoot string, env []string, ...) (CommandResult, error) + func (r *Runtime) TryAcquireRPCStream() (*Admission, error) + type Session struct + func (s *Session) Close() + func (s *Session) RetainRepository(ctx context.Context, id RepositoryIdentity) error