Versions in this module Expand all Collapse all v0 v0.2.1 May 16, 2026 v0.2.0 May 16, 2026 Changes in this version + type Alias struct + Alias string + NodeID string + type DAG struct + func NewDAG(dbPath string, sessionID string) (*DAG, error) + func NewDAGFromStore(store Store, sessionID string) *DAG + func (d *DAG) Append(parentID string, role string, content string) (*DAGNode, error) + func (d *DAG) Branches(nodeID string) ([]*DAGNode, error) + func (d *DAG) Close() error + func (d *DAG) Fork(nodeID string) (*DAGNode, error) + func (d *DAG) Head() (*DAGNode, error) + func (d *DAG) History(nodeID string) ([]*DAGNode, error) + func (d *DAG) Prune(nodeID string) error + func (d *DAG) SetHead(nodeID string) error + type DAGNode struct + Content string + CreatedAt time.Time + ID string + Metadata map[string]string + Model string + ParentID string + Role string + type Node struct + Content string + CreatedAt time.Time + ID string + LatencyMs int + Metadata json.RawMessage + Model string + NodeType NodeType + OutputGroupID string + ParentID string + Provider string + RootID string + Sequence int + Status string + StopReason string + SystemPrompt string + Title string + TokensCacheCreation int + TokensCacheRead int + TokensIn int + TokensOut int + TokensReasoning int + type NodeType string + const NodeTypeAssistant + const NodeTypeSystem + const NodeTypeToolCall + const NodeTypeToolResult + const NodeTypeUser + type SQLiteStore struct + func Open(path string) (*SQLiteStore, error) + func (s *SQLiteStore) Close() error + func (s *SQLiteStore) CreateAlias(ctx context.Context, alias, nodeID string) error + func (s *SQLiteStore) CreateNode(ctx context.Context, node *Node) error + func (s *SQLiteStore) DeleteAlias(ctx context.Context, alias string) error + func (s *SQLiteStore) DeleteNode(ctx context.Context, id string) error + func (s *SQLiteStore) GetAncestors(ctx context.Context, id string) ([]*Node, error) + func (s *SQLiteStore) GetNode(ctx context.Context, id string) (*Node, error) + func (s *SQLiteStore) GetNodeByAlias(ctx context.Context, alias string) (*Node, error) + func (s *SQLiteStore) GetNodeByPrefix(ctx context.Context, prefix string) (*Node, error) + func (s *SQLiteStore) GetNodeChildren(ctx context.Context, id string) ([]*Node, error) + func (s *SQLiteStore) GetOrphanedToolUses(ctx context.Context, rootID string) ([]string, error) + func (s *SQLiteStore) GetSubtree(ctx context.Context, id string) ([]*Node, error) + func (s *SQLiteStore) IndexToolIDs(ctx context.Context, nodeID string, toolIDs []string, role string) error + func (s *SQLiteStore) ListAliases(ctx context.Context, nodeID string) ([]Alias, error) + func (s *SQLiteStore) ListRootNodes(ctx context.Context) ([]*Node, error) + func (s *SQLiteStore) UpdateNode(ctx context.Context, node *Node) error + type Store interface + Close func() error + CreateAlias func(ctx context.Context, alias, nodeID string) error + CreateNode func(ctx context.Context, node *Node) error + DeleteAlias func(ctx context.Context, alias string) error + DeleteNode func(ctx context.Context, id string) error + GetAncestors func(ctx context.Context, id string) ([]*Node, error) + GetNode func(ctx context.Context, id string) (*Node, error) + GetNodeByAlias func(ctx context.Context, alias string) (*Node, error) + GetNodeByPrefix func(ctx context.Context, prefix string) (*Node, error) + GetNodeChildren func(ctx context.Context, id string) ([]*Node, error) + GetOrphanedToolUses func(ctx context.Context, rootID string) ([]string, error) + GetSubtree func(ctx context.Context, id string) ([]*Node, error) + IndexToolIDs func(ctx context.Context, nodeID string, toolIDs []string, role string) error + ListAliases func(ctx context.Context, nodeID string) ([]Alias, error) + ListRootNodes func(ctx context.Context) ([]*Node, error) + UpdateNode func(ctx context.Context, node *Node) error