Documentation
ΒΆ
Overview ΒΆ
Package beads provides a minimal public API for extending bd with custom orchestration.
Most extensions should use direct SQL queries against bd's database. This package exports only the essential types and functions needed for Go-based extensions that want to use bd's storage layer programmatically.
For a working extension example, see examples/bd-example-extension-go.
This is the CONSUMER surface: it opens and uses bd's own storage. To IMPLEMENT a storage backend out of tree β and prove it with the conformance suite β use github.com/steveyegge/beads/backend and github.com/steveyegge/beads/backend/conformance instead.
Index ΒΆ
- Constants
- Variables
- func FindBeadsDir() string
- func FindDatabasePath() string
- type BlockedIssue
- type BlockedQuerier
- type ClaimConflict
- type CloseIssueOptions
- type CloseIssueResult
- type Comment
- type CommentPageCursor
- type CommitInfo
- type Conflict
- type DatabaseInfo
- type Dependency
- type DependencyAddOptions
- type DependencyCounts
- type DependencyEndpointNotFoundError
- type DependencyHierarchyConflictError
- type DependencyRemoveOptions
- type DependencyType
- type DependencyTypeConflictError
- type DependentQuerier
- type EpicStatus
- type ErrUnsupported
- type Event
- type EventCursor
- type EventQuerier
- type EventType
- type Issue
- type IssueClaimer
- type IssueFilter
- type IssueType
- type IssueWithCounts
- type IssueWithDependencyMetadata
- type Label
- type RedirectInfo
- type RemoteInfo
- type RemoteStore
- type SortPolicy
- type StaleFilter
- type Status
- type StatusEntry
- type Storage
- func Open(ctx context.Context, dbPath string) (Storage, error)
- func OpenBestAvailable(ctx context.Context, beadsDir string) (Storage, error)
- func OpenFromConfig(ctx context.Context, beadsDir string) (Storage, error)
- func OpenGated(ctx context.Context, beadsDir string, wait time.Duration) (Storage, error)
- type SyncResult
- type SyncStatus
- type SyncStore
- type Transaction
- type TreeNode
- type UpdateIssueOptions
- type VCStatus
- type VersionControlReader
- type WispFilter
- type WorkFilter
Constants ΒΆ
const ( StatusOpen = types.StatusOpen StatusInProgress = types.StatusInProgress StatusBlocked = types.StatusBlocked StatusDeferred = types.StatusDeferred StatusClosed = types.StatusClosed )
Status constants
const ( TypeBug = types.TypeBug TypeFeature = types.TypeFeature TypeTask = types.TypeTask TypeEpic = types.TypeEpic TypeChore = types.TypeChore )
IssueType constants
const ( DepBlocks = types.DepBlocks DepRelated = types.DepRelated DepParentChild = types.DepParentChild DepDiscoveredFrom = types.DepDiscoveredFrom DepConditionalBlocks = types.DepConditionalBlocks // B runs only if A fails (bd-kzda) )
DependencyType constants
const ( SortPolicyHybrid = types.SortPolicyHybrid SortPolicyPriority = types.SortPolicyPriority SortPolicyOldest = types.SortPolicyOldest )
SortPolicy constants
const ( EventCreated = types.EventCreated EventUpdated = types.EventUpdated EventClaimed = types.EventClaimed EventStatusChanged = types.EventStatusChanged EventCommented = types.EventCommented EventClosed = types.EventClosed EventReopened = types.EventReopened EventDependencyAdded = types.EventDependencyAdded EventDependencyRemoved = types.EventDependencyRemoved EventLabelAdded = types.EventLabelAdded EventLabelRemoved = types.EventLabelRemoved EventCompacted = types.EventCompacted )
EventType constants
const MaxFieldLen = types.MaxFieldLen
MaxFieldLen re-exports the maximum length (in characters) of the assignee, owner, and label fields, paired with the ErrFieldTooLong sentinel below.
Variables ΒΆ
var ( ErrCircuitOpen = dolt.ErrCircuitOpen ErrCommitIndeterminate = storage.ErrCommitIndeterminate )
ErrCircuitOpen is re-exported (aliased, so errors.Is works across the package boundary) from the Dolt storage layer: a read or write rejected because the Dolt circuit breaker is open wraps it. The claim sentinels ErrAlreadyClaimed and ErrNotClaimable β the ones ParseClaimConflict recovers assignee/status detail from β are re-exported with the other error sentinels below.
var ( ErrNotFound = storage.ErrNotFound ErrAlreadyClaimed = storage.ErrAlreadyClaimed ErrNotClaimable = storage.ErrNotClaimable ErrCloseBlocked = storage.ErrCloseBlocked ErrVersionMismatch = storage.ErrVersionMismatch ErrSelfDependency = domain.ErrSelfDependency ErrDependencyCycle = domain.ErrDependencyCycle // ErrDependencySourceNotFound and ErrDependencyTargetNotFound are the two // endpoint-existence refusals AddDependency and AddDependencies raise; the // typed value carrying the missing id is DependencyEndpointNotFoundError. ErrDependencySourceNotFound = domain.ErrDependencySourceNotFound ErrDependencyTargetNotFound = domain.ErrDependencyTargetNotFound ErrFieldTooLong = types.ErrFieldTooLong // ErrGateBusy is returned by OpenGated when a maintenance operation // holds the workspace or physical-root gate exclusively and the wait // budget ran out. Alias of the internal sentinel so errors.Is works // across the package boundary. ErrGateBusy = workspacegate.ErrBusy )
Re-exported error sentinels so consumers match on errors.Is rather than on message text. Each is an ALIAS of the internal sentinel, so the identity is preserved across the package boundary.
Functions ΒΆ
func FindBeadsDir ΒΆ added in v0.24.0
func FindBeadsDir() string
FindBeadsDir finds the .beads/ directory in the current directory tree. Returns empty string if not found.
func FindDatabasePath ΒΆ
func FindDatabasePath() string
FindDatabasePath finds the beads database in the current directory tree
Types ΒΆ
type BlockedIssue ΒΆ added in v0.12.0
type BlockedIssue = types.BlockedIssue
Core types from internal/types
type BlockedQuerier ΒΆ added in v1.2.0
type BlockedQuerier interface {
// IsBlocked reports whether issueID is blocked (its denormalized transitive
// is_blocked flag) and the open direct blockers for display.
IsBlocked(ctx context.Context, issueID string) (bool, []string, error)
// IsBlockedBatch returns the denormalized transitive is_blocked flag for each
// of ids in one batched read. ids present in neither the issues nor wisps
// table are absent from the map; callers treat absent as not-blocked.
IsBlockedBatch(ctx context.Context, ids []string) (map[string]bool, error)
}
BlockedQuerier is the transitive-blocked surface of a Storage: the denormalized is_blocked flag, single or batched. Like EventQuerier it is a NARROW hand-declared root interface (not an alias of DependencyQueryStore), exposing only the reads consumers use. IsBlockedBatch returns the is_blocked column for a whole page in one round-trip β the same transitive value IsBlocked returns per id, with no N-call fan-out. Reach it via AsBlockedQuerier.
func AsBlockedQuerier ΒΆ added in v1.2.0
func AsBlockedQuerier(s Storage) (BlockedQuerier, bool)
AsBlockedQuerier returns the BlockedQuerier view of s, or (nil, false) when the backing store does not expose the transitive-blocked reads. Assert once and fail loud. A single direct assertion is sufficient β see the decorator contract on AsIssueClaimer.
type ClaimConflict ΒΆ added in v1.2.0
type ClaimConflict struct {
// CurrentAssignee is the actor currently holding the issue. Set when the
// error wraps ErrAlreadyClaimed and the assignee was parseable.
CurrentAssignee string
// CurrentStatus is the issue's status that made it unclaimable. Set when
// the error wraps ErrNotClaimable and the status was parseable.
CurrentStatus string
}
ClaimConflict describes why a claim failed, recovered from the claim error.
The engine's claim path embeds the conflicting state in the message: on ErrAlreadyClaimed the current assignee ("issue already claimed by <assignee>"), on ErrNotClaimable the current status ("issue not claimable: status <status>"). ClaimConflict carries whichever of those was recoverable; the other stays empty. This is a deliberately string-coupled shim.
A CALLER ON THE LIBRARY CONTRACT DOES NOT NEED IT. The claim path now returns issueops.ClaimConflictError, which carries the assignee and status as typed fields read inside the attempt that lost, so errors.As recovers them without parsing anything. This shim stays for callers holding a claim error from somewhere else, and because it is public API.
func ParseClaimConflict ΒΆ added in v1.2.0
func ParseClaimConflict(err error) (ClaimConflict, bool)
ParseClaimConflict inspects a claim error and, when it wraps ErrAlreadyClaimed or ErrNotClaimable, returns the recovered conflict detail and true. For any other error (including nil) it returns the zero ClaimConflict and false.
Parsing keys on the message fragment the engine appends after the sentinel, located with LastIndex so that outer "context: %w" wrapping (which prepends) does not defeat it. Fields are best-effort: an Is-match with an unparseable message still returns true with the corresponding field empty.
type CloseIssueOptions ΒΆ added in v1.2.0
type CloseIssueOptions = storage.CloseIssueOptions
CloseIssueOptions carries the optional inputs to Storage.CloseIssueChecked β an atomic, guarded close that refuses a still-blocked issue with ErrCloseBlocked unless Force is set. Exported so consumers can name it without importing internal/storage.
type CloseIssueResult ΒΆ added in v1.2.0
type CloseIssueResult = storage.CloseIssueResult
CloseIssueResult reports the outcome of Storage.CloseIssueChecked. Unchanged is true when the issue was already closed (idempotent no-op).
type CommentPageCursor ΒΆ added in v1.2.0
type CommentPageCursor = storage.CommentPageCursor
CommentPageCursor is the resume position for Storage.GetIssueCommentsPage β the (created_at, id) of the last comment already returned, with the zero value starting a walk from the beginning of the thread. Exported so consumers can name it without importing internal/storage.
type CommitInfo ΒΆ added in v0.63.0
type CommitInfo = storage.CommitInfo
Replication and version control types from internal/storage
type DatabaseInfo ΒΆ added in v0.17.0
type DatabaseInfo = beads.DatabaseInfo
DatabaseInfo contains information about a beads database
func FindAllDatabases ΒΆ added in v0.17.0
func FindAllDatabases() []DatabaseInfo
FindAllDatabases finds all beads databases in the system
type Dependency ΒΆ added in v0.12.0
type Dependency = types.Dependency
Core types from internal/types
type DependencyAddOptions ΒΆ added in v1.2.0
type DependencyAddOptions = storage.DependencyAddOptions
DependencyAddOptions controls transaction-scoped dependency insertion for Transaction.AddDependencyWithOptions. Exported so embedders' bulk graph writers can set SkipCycleCheck per edge and run one whole-graph Transaction.CycleThroughEdges pass before commit (bd-6dnrw.8) instead of paying the recursive per-edge cycle query β which cannot finish inside a per-command budget on molecule-sized graphs (observed: a 67-node/100-edge batch blowing a 120s deadline mid-transaction, gascity 2026-07-17).
Callers that set SkipCycleCheck MUST run Transaction.CycleThroughEdges before commit and fail on new blocks/conditional-blocks/parent-child cycles (waits-for is excluded); skipping the per-edge check trades per-edge cost for one whole-graph check, never graph integrity.
type DependencyCounts ΒΆ added in v0.22.1
type DependencyCounts = types.DependencyCounts
Core types from internal/types
type DependencyEndpointNotFoundError ΒΆ added in v1.2.0
type DependencyEndpointNotFoundError = domain.DependencyEndpointNotFoundError
DependencyEndpointNotFoundError is returned by AddDependency when an edge names an endpoint this database can see the absence of; callers errors.As it to read the missing id instead of parsing the message.
type DependencyHierarchyConflictError ΒΆ added in v1.2.0
type DependencyHierarchyConflictError = domain.DependencyHierarchyConflictError
DependencyHierarchyConflictError is returned by AddDependency when a blocking edge would gate an issue on its own ancestor/descendant (a gate that can never clear).
type DependencyRemoveOptions ΒΆ added in v1.2.0
type DependencyRemoveOptions = storage.DependencyRemoveOptions
DependencyRemoveOptions controls transaction-scoped dependency removal for Transaction.RemoveDependencyWithOptions. Exported so embedders can request the dependency_removed history event on an explicit edge removal; the plain RemoveDependency default stays silent for structural edge teardown, mirroring the DependencyAddOptions/AddDependencyWithOptions split.
type DependencyType ΒΆ added in v0.12.0
type DependencyType = types.DependencyType
Core types from internal/types
type DependencyTypeConflictError ΒΆ added in v1.2.0
type DependencyTypeConflictError = domain.DependencyTypeConflictError
DependencyTypeConflictError is returned by AddDependency when an edge of a different type already exists between the pair; callers errors.As it to read the existing/requested types instead of parsing the message.
type DependentQuerier ΒΆ added in v1.2.0
type DependentQuerier interface {
// GetDependentRecords returns raw dependency rows whose target is targetID,
// paged by the dependency row id (afterID, "" = start). See the engine doc
// for the two-table span and raw-read/policy-at-hydration contract.
GetDependentRecords(ctx context.Context, targetID string, depType string, limit int, afterID string) ([]*Dependency, error)
// GetDependentRecordsForIssues returns raw dependency rows keyed by TARGET id
// β for a SET of target ids in one batched read, each id's inbound edges (its
// dependents), across both dependency tables, ALL dep types, de-duped by row
// id. The batched, target-keyed mirror of GetDependencyRecordsForIssues; same
// two-table span and raw-read/policy-at-hydration contract as
// GetDependentRecords, without paging.
GetDependentRecordsForIssues(ctx context.Context, targetIDs []string) (map[string][]*Dependency, error)
// CountDependentRecords returns the true total inbound-edge count of targetID
// (depType "" = all) without paging.
CountDependentRecords(ctx context.Context, targetID string, depType string) (int, error)
}
DependentQuerier is the target-keyed dependents surface of a Storage: the raw inbound-edge reads that back group-membership. Like EventQuerier it is a NARROW hand-declared root interface (not an alias of DependencyQueryStore), exposing only the calls consumers use. Reach it via AsDependentQuerier.
func AsDependentQuerier ΒΆ added in v1.2.0
func AsDependentQuerier(s Storage) (DependentQuerier, bool)
AsDependentQuerier returns the DependentQuerier view of s, or (nil, false) when the backing store does not expose the target-keyed dependents reads. Assert once and fail loud. A single direct assertion is sufficient β see the decorator contract on AsIssueClaimer.
type EpicStatus ΒΆ added in v0.12.0
type EpicStatus = types.EpicStatus
Core types from internal/types
type ErrUnsupported ΒΆ added in v1.2.0
type ErrUnsupported = storage.ErrUnsupported
ErrUnsupported reports that an operation is unavailable for a storage backend β for example Storage.IssueLifecycle on a backend that cannot serve guarded issue mutations. Exported so consumers can match it with errors.As without importing internal/storage.
type EventCursor ΒΆ added in v1.2.0
type EventCursor = storage.EventCursor
EventCursor is a keyset position in the durable events stream, ordered by (created_at, id). The zero value means "from the beginning".
type EventQuerier ΒΆ added in v1.2.0
type EventQuerier interface {
// EventsSince returns durable events strictly after cursor, ordered by
// (created_at ASC, id ASC), bounded by limit (0 = a store default, capped).
// issueID scopes the feed to one bead's history ("" = all).
EventsSince(ctx context.Context, cursor EventCursor, issueID string, limit int) ([]*Event, error)
}
EventQuerier is the durable-event-feed surface of a Storage: keyset paging over the durable event log, beyond the base Storage's time-only GetAllEventsSince. It is a NARROW, hand-declared root interface exposing exactly what consumers need β not an alias of the internal EventQueryStore β so the published surface stays small and independent of the engine interface. Reach it via AsEventQuerier.
func AsEventQuerier ΒΆ added in v1.2.0
func AsEventQuerier(s Storage) (EventQuerier, bool)
AsEventQuerier returns the EventQuerier view of s, or (nil, false) when the backing store does not expose the durable-event feed. Assert once and fail loud. A single direct assertion is sufficient β see the decorator contract on AsIssueClaimer.
type IssueClaimer ΒΆ added in v1.2.0
type IssueClaimer interface {
// ClaimIssue atomically claims id for actor using compare-and-swap
// semantics (open β§ unassigned-or-same-actor). Returns a wrapped
// ErrAlreadyClaimed or ErrNotClaimable on conflict.
ClaimIssue(ctx context.Context, id string, actor string) error
// ClaimReadyIssue atomically claims the first ready issue matching filter,
// or returns (nil, nil) when none is claimable.
ClaimReadyIssue(ctx context.Context, filter WorkFilter, actor string) (*Issue, error)
}
IssueClaimer is the atomic-claim surface of a Storage. ClaimIssue and ClaimReadyIssue live on the storage.BulkIssueStore extension rather than the base Storage interface, so callers reach them by type-assertion via AsIssueClaimer rather than off the Storage value directly.
func AsIssueClaimer ΒΆ added in v1.2.0
func AsIssueClaimer(s Storage) (IssueClaimer, bool)
AsIssueClaimer returns the IssueClaimer view of s when the backing store supports atomic claim (Dolt-backed stores do), and (nil, false) otherwise. Assert once at startup and fail loud.
DECORATOR CONTRACT: a single direct type-assertion is sufficient β no unwrap. ClaimIssue/ClaimReadyIssue (like EventsSince and the dependents reads) live on the engine interface storage.DoltStorage, and the compile-time drift guards below prove storage.DoltStorage satisfies each narrow surface. A store decorator therefore MUST embed storage.DoltStorage β as HookFiringStore does β which promotes these methods so the assertion reaches them THROUGH the decorator. (This is unlike the cmd/bd optional interfaces β StoreLocator, BackupStore, Flattener, β¦ β which are NOT part of DoltStorage, do not promote, and so genuinely need storage.UnwrapStore.) A former storage.UnwrapStore fallback here was provably dead: whenever s satisfies storage.DoltStorage it already satisfies the narrow surface (drift guard), so the direct assertion always wins; and the only decorator, HookFiringStore, forwards by promotion.
type IssueFilter ΒΆ added in v0.12.0
type IssueFilter = types.IssueFilter
Core types from internal/types
type IssueWithCounts ΒΆ added in v0.22.1
type IssueWithCounts = types.IssueWithCounts
Core types from internal/types
type IssueWithDependencyMetadata ΒΆ added in v0.54.0
type IssueWithDependencyMetadata = types.IssueWithDependencyMetadata
Core types from internal/types
type RedirectInfo ΒΆ added in v0.39.1
type RedirectInfo = beads.RedirectInfo
RedirectInfo contains information about a beads directory redirect
func GetRedirectInfo ΒΆ added in v0.39.1
func GetRedirectInfo() RedirectInfo
GetRedirectInfo checks if the current beads directory is redirected. Returns RedirectInfo with IsRedirected=true if a redirect is active.
type RemoteInfo ΒΆ added in v0.63.0
type RemoteInfo = storage.RemoteInfo
Replication and version control types from internal/storage
type RemoteStore ΒΆ added in v0.63.0
type RemoteStore = storage.RemoteStore
RemoteStore provides dolt remote management and replication operations. Use type assertion on a Storage value to access these methods:
if rs, ok := store.(beads.RemoteStore); ok {
rs.Push(ctx)
}
type SortPolicy ΒΆ added in v0.17.7
type SortPolicy = types.SortPolicy
Core types from internal/types
type StaleFilter ΒΆ added in v0.22.1
type StaleFilter = types.StaleFilter
Core types from internal/types
type StatusEntry ΒΆ added in v0.63.0
type StatusEntry = storage.StatusEntry
Replication and version control types from internal/storage
type Storage ΒΆ
Storage is the interface for beads storage operations. Its RunInTransaction callback is invoked at most once per public call; callers retry it explicitly after a callback has started when their operation is safe to repeat.
func Open ΒΆ added in v0.51.0
Open opens a Dolt-backed beads database at the given path. This always opens in embedded mode. Use OpenFromConfig to respect server mode settings from metadata.json.
func OpenBestAvailable ΒΆ added in v1.0.1
OpenBestAvailable opens a beads database using the best available backend for the given .beads directory. It reads metadata.json to determine the configured mode:
- Embedded Dolt (default): Opens via the CGo embedded Dolt engine.
- Dolt server: Connects to a dolt sql-server via OpenFromConfig.
The returned Storage must be closed when no longer needed.
beadsDir is the path to the .beads directory.
func OpenFromConfig ΒΆ added in v0.53.0
OpenFromConfig opens the Dolt implementation using configuration from metadata.json. Unlike Open, this respects Dolt server mode settings and database name configuration. beadsDir is the path to the .beads directory.
func OpenGated ΒΆ added in v1.2.0
OpenGated is OpenFromConfig plus participation in the workspace operation gate: it holds SHARED gates β the workspace gate and the physical database-root gate(s) β for the storage's lifetime (released by Close), so maintenance operations such as mode migration can DETECT this consumer and refuse to run over it, instead of running blind. The gate cannot force a holder out (there is no drain signal); it makes cooperating consumers visible and excludes new ones. Both levels matter: distinct workspaces can share one physical Dolt root, and a workspace-only gate would let maintenance replace that root under a consumer from another workspace. Library consumers that use the ungated Open/OpenFromConfig are invisible to the gate, and gate-aware maintenance operations refuse to proceed on workspaces they cannot prove quiet β prefer OpenGated in long-lived embedders.
The physical roots are the UNION of doltserver.ResolvePhysicalRoots (the side-effect-free CLI-parity resolver: embedded engine's embeddeddolt dir, shared-server dir, proxied-server client info) and doltserver.LibraryOpenRootPath (the root the library open below β which applies central-config defaults and is server-only β will actually use), so the gated directory always includes the one this store opens. A resolver failure is deliberately not fatal here: the same failure will surface from the storage open below with a better error, and the workspace gate alone still covers the workspace-level maintenance conflicts. For a remote server backend there is no local physical root and only the workspace gate is taken.
wait bounds how long to poll for the gates when a maintenance operation holds one exclusively; zero means fail fast. A busy gate is reported as ErrGateBusy (match with errors.Is).
type SyncResult ΒΆ added in v0.63.0
type SyncResult = storage.SyncResult
Replication and version control types from internal/storage
type SyncStatus ΒΆ added in v0.63.0
type SyncStatus = storage.SyncStatus
Replication and version control types from internal/storage
type Transaction ΒΆ added in v0.24.5
type Transaction = beads.Transaction
Transaction provides atomic multi-operation support within a database transaction. Use Storage.RunInTransaction() to obtain a Transaction instance.
type UpdateIssueOptions ΒΆ added in v1.2.0
type UpdateIssueOptions = storage.UpdateIssueOptions
UpdateIssueOptions carries the optional inputs to Storage.UpdateIssueChecked β an update with an optional ExpectedVersion compare-and-swap that refuses a concurrently-modified issue with ErrVersionMismatch. Exported so consumers can name it without importing internal/storage.
type VersionControlReader ΒΆ added in v0.63.0
type VersionControlReader interface {
CurrentBranch(ctx context.Context) (string, error)
ListBranches(ctx context.Context) ([]string, error)
CommitExists(ctx context.Context, commitHash string) (bool, error)
GetCurrentCommit(ctx context.Context) (string, error)
Status(ctx context.Context) (*VCStatus, error)
Log(ctx context.Context, limit int) ([]CommitInfo, error)
}
VersionControlReader provides read-only version control operations. Write operations (Branch, Checkout, Merge, DeleteBranch) are not yet part of the public API. If you need them, please open an issue.
type WispFilter ΒΆ added in v1.0.0
type WispFilter = types.WispFilter
Core types from internal/types
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
Package backend is the public surface for OUT-OF-TREE storage backends: it exports, by type alias, the storage contract an external Go module must implement (the engine interface storage.DoltStorage and every type its method signatures reach), the process-init registry that plugs an implementation into bd, and β via the backend/conformance subpackage β the tests that prove an implementation behaves like the Dolt reference.
|
Package backend is the public surface for OUT-OF-TREE storage backends: it exports, by type alias, the storage contract an external Go module must implement (the engine interface storage.DoltStorage and every type its method signatures reach), the process-init registry that plugs an implementation into bd, and β via the backend/conformance subpackage β the tests that prove an implementation behaves like the Dolt reference. |
|
conformance
Package conformance provides backend-agnostic tests for Storage implementations.
|
Package conformance provides backend-agnostic tests for Storage implementations. |
|
Package beadserrors holds the error vocabulary that is shared by every role leaf rather than owned by any one of them.
|
Package beadserrors holds the error vocabulary that is shared by every role leaf rather than owned by any one of them. |
|
cmd
|
|
|
bd
command
Package main provides the bd CLI commands.
|
Package main provides the bd CLI commands. |
|
bd/doctor
Package doctor provides health check and repair functionality for beads.
|
Package doctor provides health check and repair functionality for beads. |
|
bd/protocol
corpus.go β producer-side logic for the Beadsβconsumer cross-version contract-test system (Phase 2).
|
corpus.go β producer-side logic for the Beadsβconsumer cross-version contract-test system (Phase 2). |
|
examples
|
|
|
go-agent
module
|
|
|
monitor-webui
module
|
|
|
Package format provides public formatting functions for beads issues.
|
Package format provides public formatting functions for beads issues. |
|
internal
|
|
|
ado
Package ado provides client and data types for the Azure DevOps REST API.
|
Package ado provides client and data types for the Azure DevOps REST API. |
|
atomicfile
Package atomicfile provides atomic file writes via temp-file + rename.
|
Package atomicfile provides atomic file writes via temp-file + rename. |
|
beads
Package beads provides a minimal public API for extending bd with custom orchestration.
|
Package beads provides a minimal public API for extending bd with custom orchestration. |
|
compact
Package compact provides AI-powered issue compaction using Claude Haiku.
|
Package compact provides AI-powered issue compaction using Claude Haiku. |
|
creds
Package creds resolves the credential bd uses to open a protected database at command time.
|
Package creds resolves the credential bd uses to open a protected database at command time. |
|
doltserver
Package doltserver manages the lifecycle of a local dolt sql-server process.
|
Package doltserver manages the lifecycle of a local dolt sql-server process. |
|
eventsjournal
Package eventsjournal resolves and applies durable events-journal activation to one storage instance.
|
Package eventsjournal resolves and applies durable events-journal activation to one storage instance. |
|
fdhygiene
Package fdhygiene keeps descriptors that bd did not open from leaking into the long-lived children bd spawns (the managed dolt sql-server and the dbproxy child).
|
Package fdhygiene keeps descriptors that bd did not open from leaking into the long-lived children bd spawns (the managed dolt sql-server and the dbproxy child). |
|
formula
Package formula provides advice operators for step transformations.
|
Package formula provides advice operators for step transformations. |
|
formula/cmd/schemagen
command
Command schemagen regenerates internal/formula/schema_gen.go from internal/formula/types.go.
|
Command schemagen regenerates internal/formula/schema_gen.go from internal/formula/types.go. |
|
formula/schemagen
Package schemagen walks an internal/formula types.go file and produces the body of internal/formula/schema_gen.go (a `var Primitives` index of every exported struct).
|
Package schemagen walks an internal/formula types.go file and produces the body of internal/formula/schema_gen.go (a `var Primitives` index of every exported struct). |
|
githooksenv
Package githooksenv disables git's client-side hooks for the git commands Dolt runs inside bd's own process.
|
Package githooksenv disables git's client-side hooks for the git commands Dolt runs inside bd's own process. |
|
github
Package github provides client and data types for the GitHub REST API.
|
Package github provides client and data types for the GitHub REST API. |
|
gitlab
Package gitlab provides client and data types for the GitLab REST API.
|
Package gitlab provides client and data types for the GitLab REST API. |
|
gittraceenv
Package gittraceenv scrubs stderr-directed git tracing variables around the git commands Dolt runs inside bd's own process.
|
Package gittraceenv scrubs stderr-directed git tracing variables around the git commands Dolt runs inside bd's own process. |
|
hooks
Package hooks provides a hook system for extensibility.
|
Package hooks provides a hook system for extensibility. |
|
httpapi
Package httpapi implements the HTTP surface described by internal/httpapi/spec/openapi.v0.yaml β the /v0 wire contract `bd serve` answers on.
|
Package httpapi implements the HTTP surface described by internal/httpapi/spec/openapi.v0.yaml β the /v0 wire contract `bd serve` answers on. |
|
httpapi/apigen
Package apigen holds the Go types generated from the bd serve OpenAPI document (spec-first: internal/httpapi/spec/openapi.v0.yaml is the source of truth, this package is its output).
|
Package apigen holds the Go types generated from the bd serve OpenAPI document (spec-first: internal/httpapi/spec/openapi.v0.yaml is the source of truth, this package is its output). |
|
httpapi/spec
Package spec holds the hand-written OpenAPI document for the bd serve HTTP API and embeds it into the binary.
|
Package spec holds the hand-written OpenAPI document for the bd serve HTTP API and embeds it into the binary. |
|
jira
Package jira provides client, types, and utilities for Jira integration.
|
Package jira provides client, types, and utilities for Jira integration. |
|
linear
Package linear provides client and data types for the Linear GraphQL API.
|
Package linear provides client and data types for the Linear GraphQL API. |
|
memoryapi
Package memoryapi holds the parts of the memory plane that decide what an answer MEANS: the key derivation, the two refusals and the search filter.
|
Package memoryapi holds the parts of the memory plane that decide what an answer MEANS: the key derivation, the two refusals and the search filter. |
|
migration/legacysqlite
Package legacysqlite reads the small, authenticated SQLite history that predates the current Dolt store.
|
Package legacysqlite reads the small, authenticated SQLite history that predates the current Dolt store. |
|
molecules
Package molecules handles loading template molecules from molecules.jsonl catalogs.
|
Package molecules handles loading template molecules from molecules.jsonl catalogs. |
|
procid
Package procid provides process-birth identity for safe reattachment and signaling of managed child processes.
|
Package procid provides process-birth identity for safe reattachment and signaling of managed child processes. |
|
query
Package query implements a simple query language for filtering beads.
|
Package query implements a simple query language for filtering beads. |
|
recipes
Package recipes provides recipe-based configuration for bd setup.
|
Package recipes provides recipe-based configuration for bd setup. |
|
storage
Package storage defines the interface for issue storage backends.
|
Package storage defines the interface for issue storage backends. |
|
storage/backendnames
Package backendnames holds the process-local set of registered storage backend names.
|
Package backendnames holds the process-local set of registered storage backend names. |
|
storage/backends
Package backends provides the extension seam for storage backends that return storage.DoltStorage directly.
|
Package backends provides the extension seam for storage backends that return storage.DoltStorage directly. |
|
storage/dbproxy/identity
Package identity provides shared managed dbproxy identity primitives.
|
Package identity provides shared managed dbproxy identity primitives. |
|
storage/dbproxy/util
Package util provides shared utilities for the db storage backends.
|
Package util provides shared utilities for the db storage backends. |
|
storage/depid
Package depid derives the deterministic primary-key id of a dependency edge.
|
Package depid derives the deterministic primary-key id of a dependency edge. |
|
storage/dolt
Package dolt β iter_dependents.go
|
Package dolt β iter_dependents.go |
|
storage/doltutil
Package doltutil provides shared utilities for Dolt operations.
|
Package doltutil provides shared utilities for Dolt operations. |
|
storage/embeddeddolt
Package embeddeddolt β iter_stubs.go
|
Package embeddeddolt β iter_stubs.go |
|
storage/embeddeddolt/cmd
command
|
|
|
storage/issueops
Package issueops provides shared transaction-scoped SQL operations for issue creation and management.
|
Package issueops provides shared transaction-scoped SQL operations for issue creation and management. |
|
storage/journalscan
Package journalscan provides the static-analysis primitives the events journal completeness guards share.
|
Package journalscan provides the static-analysis primitives the events journal completeness guards share. |
|
storage/kvkeys
Package kvkeys defines the config-table key prefixes that the cmd/bd KV and memory commands write and that the storage-layer merge resolver reads, so the "kv.memory.* config rows are convergent persistent memories" contract has a single source of truth.
|
Package kvkeys defines the config-table key prefixes that the cmd/bd KV and memory commands write and that the storage-layer merge resolver reads, so the "kv.memory.* config rows are convergent persistent memories" contract has a single source of truth. |
|
storage/memoryops
Package memoryops holds the transaction-level body of memoryops.Memories: the kv.memory.
|
Package memoryops holds the transaction-level body of memoryops.Memories: the kv.memory. |
|
storage/rowid
Package rowid derives deterministic, clone-stable primary-key ids for the auxiliary history tables (events, comments, issue_snapshots, compaction_snapshots).
|
Package rowid derives deterministic, clone-stable primary-key ids for the auxiliary history tables (events, comments, issue_snapshots, compaction_snapshots). |
|
storage/sqlbuild
Package sqlbuild holds the pure SQL-text builders shared by the classic issueops stack (production, *sql.Tx) and the domain/db repository stack (proxied-server, Runner).
|
Package sqlbuild holds the pure SQL-text builders shared by the classic issueops stack (production, *sql.Tx) and the domain/db repository stack (proxied-server, Runner). |
|
storage/uow
Package uow β notifying.go
|
Package uow β notifying.go |
|
storage/versioncontrolops
Package versioncontrolops provides shared implementations for Dolt version control operations (branches, status, log, merge, remotes).
|
Package versioncontrolops provides shared implementations for Dolt version control operations (branches, status, log, merge, remotes). |
|
telemetry
Package telemetry provides OpenTelemetry integration for beads.
|
Package telemetry provides OpenTelemetry integration for beads. |
|
templates
Package templates provides embedded files that bd writes into user workspaces.
|
Package templates provides embedded files that bd writes into user workspaces. |
|
templates/agents
Package agents provides embedded AGENTS.md templates for bd init and setup.
|
Package agents provides embedded AGENTS.md templates for bd init and setup. |
|
testutil/fixtures
Package fixtures provides realistic test data generation for benchmarks and tests.
|
Package fixtures provides realistic test data generation for benchmarks and tests. |
|
timeparsing
Package timeparsing provides layered time parsing for relative date/time expressions.
|
Package timeparsing provides layered time parsing for relative date/time expressions. |
|
tracker
Package tracker provides a plugin framework for external issue tracker integrations.
|
Package tracker provides a plugin framework for external issue tracker integrations. |
|
types
Package types defines core data structures for the bd issue tracker.
|
Package types defines core data structures for the bd issue tracker. |
|
ui
Package ui provides terminal styling and pager support for beads CLI output.
|
Package ui provides terminal styling and pager support for beads CLI output. |
|
uimd
Package uimd provides markdown rendering for beads CLI output.
|
Package uimd provides markdown rendering for beads CLI output. |
|
utils
Package utils provides utility functions for issue ID parsing and resolution.
|
Package utils provides utility functions for issue ID parsing and resolution. |
|
workapi
Package workapi holds the work-query contract shared by every bd frontend.
|
Package workapi holds the work-query contract shared by every bd frontend. |
|
workapi/storecounter
Package storecounter holds the store-backed implementation of issueops.Counter: one shared body that every store-shaped backend's Counter accessor hands back.
|
Package storecounter holds the store-backed implementation of issueops.Counter: one shared body that every store-shaped backend's Counter accessor hands back. |
|
workapi/storequerier
Package storequerier holds the store-backed implementation of issueops.Querier: one shared body that every store-shaped backend's Querier accessor hands back.
|
Package storequerier holds the store-backed implementation of issueops.Querier: one shared body that every store-shaped backend's Querier accessor hands back. |
|
workapi/storereader
Package storereader holds the store-backed implementation of issueops.Reader: one shared body that every store-shaped backend's IssueReader accessor hands back.
|
Package storereader holds the store-backed implementation of issueops.Reader: one shared body that every store-shaped backend's IssueReader accessor hands back. |
|
workapi/storereadycounter
Package storereadycounter holds the store-backed implementation of issueops.ReadyCounter: one shared body that every store-shaped backend's ReadyCounter accessor hands back.
|
Package storereadycounter holds the store-backed implementation of issueops.ReadyCounter: one shared body that every store-shaped backend's ReadyCounter accessor hands back. |
|
workapi/storestats
Package storestats holds the store-backed implementation of issueops.StatsReporter: one shared body that every store-shaped backend's StatsReporter accessor hands back.
|
Package storestats holds the store-backed implementation of issueops.StatsReporter: one shared body that every store-shaped backend's StatsReporter accessor hands back. |
|
workapi/storeversionreconciler
Package storeversionreconciler holds the store-backed implementation of issueops.VersionReconciler: one shared body that every store-shaped backend's VersionReconciler accessor hands back.
|
Package storeversionreconciler holds the store-backed implementation of issueops.VersionReconciler: one shared body that every store-shaped backend's VersionReconciler accessor hands back. |
|
workapi/storeworkspaceconfig
Package storeworkspaceconfig holds the store-backed implementation of issueops.WorkspaceConfig: one shared body that every store-shaped backend's WorkspaceConfig accessor hands back.
|
Package storeworkspaceconfig holds the store-backed implementation of issueops.WorkspaceConfig: one shared body that every store-shaped backend's WorkspaceConfig accessor hands back. |
|
workspacegate
Package workspacegate provides a two-level cross-process fence for beads workspaces: normal commands hold a SHARED gate for the lifetime of their store/provider, and maintenance operations (mode migration, restore, destructive repair) hold it EXCLUSIVELY so they can detect cooperating bd activity on the workspace and on the physical database root, and refuse to run over it β the gate cannot ask a holder to leave, only make it visible and exclude new work.
|
Package workspacegate provides a two-level cross-process fence for beads workspaces: normal commands hold a SHARED gate for the lifetime of their store/provider, and maintenance operations (mode migration, restore, destructive repair) hold it EXCLUSIVELY so they can detect cooperating bd activity on the workspace and on the physical database root, and refuse to run over it β the gate cannot ask a holder to leave, only make it visible and exclude new work. |
|
worktreeremove
Package worktreeremove contains the side-effect-free safety policy for worktree removal.
|
Package worktreeremove contains the side-effect-free safety policy for worktree removal. |
|
Package issueops declares the public values used for guarded issue mutations.
|
Package issueops declares the public values used for guarded issue mutations. |
|
Package journalops describes the workspace's DURABLE MUTATION JOURNAL: the seq-ordered record of every committed bead mutation that `bd events tail`, `bd events export` and GET /v0/beads/events read, and that an external consumer replays to rebuild its own copy of the graph.
|
Package journalops describes the workspace's DURABLE MUTATION JOURNAL: the seq-ordered record of every committed bead mutation that `bd events tail`, `bd events export` and GET /v0/beads/events read, and that an external consumer replays to rebuild its own copy of the graph. |
|
Package memoryops describes the workspace's PERSISTENT MEMORY PLANE: the keyed notes `bd remember`, `bd recall`, `bd forget` and `bd memories` store and read, and that `bd prime` injects into a session.
|
Package memoryops describes the workspace's PERSISTENT MEMORY PLANE: the keyed notes `bd remember`, `bd recall`, `bd forget` and `bd memories` store and read, and that `bd prime` injects into a session. |
|
plugins
|
|
|
Package schema is the public wrapper around bd's schema migration engine, re-exporting the minimal surface external tools need to create or upgrade a beads database over a standard database/sql connection.
|
Package schema is the public wrapper around bd's schema migration engine, re-exporting the minimal surface external tools need to create or upgrade a beads database over a standard database/sql connection. |
|
scripts
|
|
|
bench-ready-indexes
command
|
|
|
repro-dolt-hang
command
repro-dolt-hang: Compare old vs new Dolt transaction patterns under concurrent load
|
repro-dolt-hang: Compare old vs new Dolt transaction patterns under concurrent load |
|
repro-dolt-prod-timeouts
command
repro-dolt-prod-timeouts runs production-shaped bd CLI timeout scenarios.
|
repro-dolt-prod-timeouts runs production-shaped bd CLI timeout scenarios. |
|
test
|
|
|
conformance
Package conformance is the end-to-end (real `bd` binary) conformance harness.
|
Package conformance is the end-to-end (real `bd` binary) conformance harness. |
|
tools
|
|
|
docsmint
command
Command docsmint post-processes bd's generic CLI documentation into the Mintlify site.
|
Command docsmint post-processes bd's generic CLI documentation into the Mintlify site. |