Documentation
¶
Index ¶
- Constants
- func EncodeReviewCursor(cursor ReviewCursor) (string, error)
- func GenerateMCPBearerToken() (string, error)
- func HashMCPBearerToken(token string) string
- func NormalizeGitHubUsername(username string) string
- func NormalizeReviewEventTypes(values []string) ([]string, error)
- func NormalizeReviewEventView(value string) (string, error)
- type ActivityStats
- type AuthUser
- type BacklogStats
- type CountBucket
- type DeleteItemsResult
- type DeleteSourcesResult
- type Feed
- type FeedEntry
- type FeedEntryApplyResult
- type FeedFailureState
- type FeedFetchRecord
- type FeedFetchState
- type FeedUpsert
- type FeedUpsertResult
- type GitHubAuthProfile
- type MCPBearerToken
- type MCPBearerTokenCreateResult
- type MigrationEvent
- type MigrationPhase
- type MigrationReporter
- type OKFExportOptions
- type OKFExportSnapshot
- type OpenOptions
- type PipelineStageRow
- type PipelineStats
- type PublicChatShare
- type PublicChatShareInput
- type RebuildFTSStats
- type ResetSourceEnrichmentOptions
- type ResetSourceEnrichmentStats
- type ReviewCursor
- type ReviewEntityEvent
- type ReviewEntityGroup
- type ReviewEvent
- type ReviewEventFilter
- type ReviewEventPage
- type SourceActivityEvent
- type SourceActivityFeed
- type SourceActivityFilter
- type SourceActivityTrendPoint
- type SourceCountFilter
- type SourceFailureHotspot
- type Store
- func (s *Store) ActiveMCPBearerTokenCount(ctx context.Context) (int, error)
- func (s *Store) Activity(ctx context.Context, now time.Time, window time.Duration) (ActivityStats, error)
- func (s *Store) ApplyFeedEntry(ctx context.Context, entry FeedEntry) (FeedEntryApplyResult, error)
- func (s *Store) ApproveGitHubAuthUser(ctx context.Context, username string) (AuthUser, bool, error)
- func (s *Store) Backlog(ctx context.Context, promptVersion string, toolName string, toolVersion string) (BacklogStats, error)
- func (s *Store) Close() error
- func (s *Store) CountExactUserTag(ctx context.Context, tag string, sourceTypes []string) (int, error)
- func (s *Store) CountItemTextMatches(ctx context.Context, query string, sourceTypes []string) (int, error)
- func (s *Store) CountItems(ctx context.Context, sourceType string, groupBy string) ([]CountBucket, error)
- func (s *Store) CountSourceTextMatches(ctx context.Context, query string, sourceTypes []string) (int, error)
- func (s *Store) CountSources(ctx context.Context, filter SourceCountFilter, groupBy string) ([]CountBucket, error)
- func (s *Store) CreateMCPBearerToken(ctx context.Context, name string) (MCPBearerTokenCreateResult, error)
- func (s *Store) DeleteItemsBySourceType(ctx context.Context, sourceType string) (DeleteItemsResult, error)
- func (s *Store) DeleteOrphanSources(ctx context.Context, sourceType string) (DeleteSourcesResult, error)
- func (s *Store) EnableFeed(ctx context.Context, ref string, enabled bool) error
- func (s *Store) GetFeed(ctx context.Context, ref string) (Feed, error)
- func (s *Store) GetGitHubAuthUserByID(ctx context.Context, githubID string) (AuthUser, bool, error)
- func (s *Store) GetGitHubAuthUserByUsername(ctx context.Context, username string) (AuthUser, bool, error)
- func (s *Store) GetItem(ctx context.Context, lookup string) (model.Item, error)
- func (s *Store) GetItemByID(ctx context.Context, id int64) (model.Item, error)
- func (s *Store) GetItemEnrichment(ctx context.Context, itemID int64, role string) (model.ItemEnrichment, error)
- func (s *Store) GetMCPBearerTokenByID(ctx context.Context, id int64) (MCPBearerToken, bool, error)
- func (s *Store) GetMCPBearerTokenByRawToken(ctx context.Context, token string) (MCPBearerToken, bool, error)
- func (s *Store) GetMediaAsset(ctx context.Context, assetID int64) (model.MediaAsset, error)
- func (s *Store) GetPreferredLocalSourceExtract(ctx context.Context, sourceID int64) (model.ExtractResult, bool, error)
- func (s *Store) GetPublicChatShareBySlug(ctx context.Context, slug string) (PublicChatShare, bool, error)
- func (s *Store) GetSource(ctx context.Context, lookup string) (model.SourceDocument, error)
- func (s *Store) GetSourceByID(ctx context.Context, sourceID int64) (model.SourceDocument, error)
- func (s *Store) GetSourceEvidence(ctx context.Context, lookup string) (model.SourceDocument, error)
- func (s *Store) GetSourceExtractedText(ctx context.Context, lookup string) (string, error)
- func (s *Store) GetSourceExtractedTextPrefix(ctx context.Context, lookup string, maxChars int) (string, error)
- func (s *Store) GetSourcesByIDs(ctx context.Context, sourceIDs []int64) ([]model.SourceDocument, error)
- func (s *Store) HasFTS() bool
- func (s *Store) InvalidateItemOCR(ctx context.Context, itemID int64) error
- func (s *Store) InvalidateItemSummary(ctx context.Context, itemID int64) error
- func (s *Store) ListAllEntityItems(ctx context.Context, limit int) ([]model.Item, error)
- func (s *Store) ListAllEntitySources(ctx context.Context, limit int) ([]model.SourceDocument, error)
- func (s *Store) ListAllItems(ctx context.Context, limit int) ([]model.Item, error)
- func (s *Store) ListAllSources(ctx context.Context, limit int) ([]model.SourceDocument, error)
- func (s *Store) ListBacklinksForSource(ctx context.Context, sourceID int64) ([]model.SourceBacklink, error)
- func (s *Store) ListCategorizedItems(ctx context.Context) ([]model.Item, error)
- func (s *Store) ListCategorizedSources(ctx context.Context) ([]model.SourceDocument, error)
- func (s *Store) ListCategorizedSourcesWithoutEvidence(ctx context.Context) ([]model.SourceDocument, error)
- func (s *Store) ListFeeds(ctx context.Context, includeDisabled bool) ([]Feed, error)
- func (s *Store) ListFeedsDue(ctx context.Context, now time.Time, limit int, includeBlocked bool) ([]Feed, error)
- func (s *Store) ListGitHubAuthUsers(ctx context.Context) ([]AuthUser, error)
- func (s *Store) ListItemChildLinks(ctx context.Context, parentItemID int64, linkKind string) ([]int64, error)
- func (s *Store) ListItemMediaRefs(ctx context.Context, itemID int64) ([]model.ItemMediaRef, error)
- func (s *Store) ListItemMediaRefsForSourceKeys(ctx context.Context, sourceKeys []string) (map[string][]model.ItemMediaRef, error)
- func (s *Store) ListItemSourceKeysByMediaLocalPath(ctx context.Context, localPath string) ([]string, error)
- func (s *Store) ListItemsForCategorize(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForLinkDiscovery(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForXHydration(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForXMediaSummary(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForXMediaTranscription(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForXPhotoOCR(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListItemsForXPhotoOCRAudit(ctx context.Context, limit int, includePruned bool) ([]model.Item, error)
- func (s *Store) ListItemsForXQuoteHydration(ctx context.Context, limit int, force bool) ([]model.Item, error)
- func (s *Store) ListLinkedItemsBySourceType(ctx context.Context, sourceID int64, sourceType string, limit int) ([]model.Item, error)
- func (s *Store) ListMCPBearerTokens(ctx context.Context, includeRevoked bool) ([]MCPBearerToken, error)
- func (s *Store) ListMediaAssetsByLocalPath(ctx context.Context, localPath string) ([]model.MediaAsset, error)
- func (s *Store) ListMediaAssetsForArchive(ctx context.Context, limit int, force bool) ([]model.MediaAsset, error)
- func (s *Store) ListMediaAssetsForDownload(ctx context.Context, limit int, force bool) ([]model.MediaAsset, error)
- func (s *Store) ListMediaAssetsForPrune(ctx context.Context, limit int) ([]model.MediaAsset, error)
- func (s *Store) ListPublicChatSharesByOwner(ctx context.Context, ownerProvider string, ownerSubject string, limit int) ([]PublicChatShare, error)
- func (s *Store) ListReviewEvents(ctx context.Context, filter ReviewEventFilter) (ReviewEventPage, error)
- func (s *Store) ListSourcesForCategorize(ctx context.Context, limit int, force bool) ([]model.SourceDocument, error)
- func (s *Store) ListSourcesForEnrichment(ctx context.Context, limit int, force bool, summarize bool, ...) ([]model.SourceDocument, error)
- func (s *Store) ListSourcesForItem(ctx context.Context, itemID int64) ([]model.ItemSourceRef, error)
- func (s *Store) LoadOKFExportSnapshot(ctx context.Context, opts OKFExportOptions) (OKFExportSnapshot, error)
- func (s *Store) MarkItemLinkDiscovery(ctx context.Context, itemID int64, at time.Time) error
- func (s *Store) MarkMediaLocalPrunedByPath(ctx context.Context, localPath string, prunedAt time.Time) (int64, error)
- func (s *Store) Pipeline(ctx context.Context, promptVersion string, toolName string, toolVersion string) (PipelineStats, error)
- func (s *Store) PurgeItemIndexedContent(ctx context.Context, sourceKey string, rawJSON string) (bool, error)
- func (s *Store) RebuildFTS(ctx context.Context) (RebuildFTSStats, error)
- func (s *Store) RecordFeedFetch(ctx context.Context, rec FeedFetchRecord) error
- func (s *Store) RemoveGitHubAuthUser(ctx context.Context, username string) (AuthUser, bool, error)
- func (s *Store) ReplaceItemChildLinks(ctx context.Context, parentItemID int64, linkKind string, childItemIDs []int64) (bool, error)
- func (s *Store) ResetSourceEnrichment(ctx context.Context, opts ResetSourceEnrichmentOptions) (ResetSourceEnrichmentStats, error)
- func (s *Store) RevokeMCPBearerToken(ctx context.Context, ref string) (MCPBearerToken, bool, error)
- func (s *Store) SaveItemOCR(ctx context.Context, itemID int64, result model.OCRResult, inputHash string) (bool, error)
- func (s *Store) SaveItemSummary(ctx context.Context, itemID int64, summary model.SummaryResult, ...) (bool, error)
- func (s *Store) SaveItemUserTags(ctx context.Context, itemID int64, tags string) error
- func (s *Store) SaveMediaArchive(ctx context.Context, assetID int64, result model.MediaArchiveResult) (bool, error)
- func (s *Store) SaveMediaDownload(ctx context.Context, assetID int64, result model.MediaDownloadResult) (bool, error)
- func (s *Store) SavePublicChatShare(ctx context.Context, input PublicChatShareInput) (PublicChatShare, error)
- func (s *Store) SaveSourceExtraction(ctx context.Context, sourceID int64, result model.ExtractResult, ...) (bool, error)
- func (s *Store) SaveSourceSummary(ctx context.Context, sourceID int64, result model.SummaryResult) (bool, error)
- func (s *Store) SaveSourceUserTags(ctx context.Context, sourceID int64, tags string) error
- func (s *Store) SaveXHydration(ctx context.Context, itemID int64, hydration model.XHydration) (bool, error)
- func (s *Store) SaveXMediaTranscriptionState(ctx context.Context, itemID int64, status string, errorText string, ...) error
- func (s *Store) Search(ctx context.Context, query string, limit int) ([]model.SearchResult, error)
- func (s *Store) SearchExactUserTag(ctx context.Context, tag string, limit int) ([]model.SearchResult, error)
- func (s *Store) SearchSources(ctx context.Context, query string, limit int) ([]model.SearchResult, error)
- func (s *Store) SearchUserTags(ctx context.Context, tagQuery string, limit int) ([]model.SearchResult, error)
- func (s *Store) SourceActivityFeed(ctx context.Context, limit int) (SourceActivityFeed, error)
- func (s *Store) SourceActivityFeedFiltered(ctx context.Context, filter SourceActivityFilter) (SourceActivityFeed, error)
- func (s *Store) SourceHasLinkedItemType(ctx context.Context, sourceID int64, sourceType string) (bool, error)
- func (s *Store) UpdateFeedFailure(ctx context.Context, state FeedFailureState) error
- func (s *Store) UpdateFeedFetchState(ctx context.Context, state FeedFetchState) error
- func (s *Store) UpdateGitHubAuthUserFromOAuth(ctx context.Context, userID int64, profile GitHubAuthProfile) (AuthUser, error)
- func (s *Store) UpsertFeed(ctx context.Context, input FeedUpsert) (FeedUpsertResult, error)
- func (s *Store) UpsertItem(ctx context.Context, item model.Item) (model.UpsertResult, error)
- func (s *Store) UpsertSource(ctx context.Context, candidate model.SourceCandidate) (model.SourceUpsertResult, error)
- func (s *Store) UpsertSourceLink(ctx context.Context, itemID int64, candidate model.SourceCandidate) (model.SourceLinkUpsertResult, error)
- func (s *Store) ValidateMCPBearerToken(ctx context.Context, token string) (bool, error)
Constants ¶
const ( FeedHealthOK = "ok" FeedHealthError = "error" FeedHealthBlocked = "blocked" FeedHealthDead = "dead" )
const ( ReviewEventKindItemImported = "item_imported" ReviewEventKindItemUpdated = "item_updated" ReviewEventKindSourceCreated = "source_created" ReviewEventKindSourceExtracted = "source_extracted" ReviewEventKindSourceSummarized = "source_summarized" ReviewEventKindItemSummarized = "item_summarized" ReviewEventKindXMediaTranscribed = "x_media_transcribed" ReviewEventKindXPhotoOCRed = "x_photo_ocred" ReviewEventKindSourceFailed = "source_failed" ReviewEventKindItemEnrichmentFailed = "item_enrichment_failed" ReviewEventKindBlocked = "blocked" )
const ( ReviewActionabilityReview = "review" ReviewActionabilityBackground = "background" ReviewActionabilityBlocked = "blocked" ReviewActionabilityFailure = "failure" )
const ( ReviewEventViewEvents = "events" ReviewEventViewEntities = "entities" )
Variables ¶
This section is empty.
Functions ¶
func EncodeReviewCursor ¶ added in v0.2.22
func EncodeReviewCursor(cursor ReviewCursor) (string, error)
func GenerateMCPBearerToken ¶ added in v0.2.5
func HashMCPBearerToken ¶ added in v0.2.5
func NormalizeGitHubUsername ¶ added in v0.2.5
NormalizeGitHubUsername returns the case-insensitive GitHub login key used for auth lookups.
func NormalizeReviewEventTypes ¶ added in v0.2.22
func NormalizeReviewEventView ¶ added in v0.2.22
Types ¶
type ActivityStats ¶
type ActivityStats struct {
Now time.Time `json:"now"`
Window string `json:"window"`
LatestItemUpdatedAt time.Time `json:"latest_item_updated_at"`
LatestSourceUpdatedAt time.Time `json:"latest_source_updated_at"`
LatestSourceSummaryAt time.Time `json:"latest_source_summary_at"`
ItemsUpdatedInWindow int `json:"items_updated_in_window"`
SourcesUpdatedInWindow int `json:"sources_updated_in_window"`
SourcesSummarizedInWindow int `json:"sources_summarized_in_window"`
}
type BacklogStats ¶
type BacklogStats struct {
XHydrationPending int `json:"x_hydration_pending"`
LinkDiscoveryPending int `json:"link_discovery_pending"`
SourceExtractionPending int `json:"source_extraction_pending"`
SourceSummaryPending int `json:"source_summary_pending"`
SourceExtractionPendingByType []CountBucket `json:"source_extraction_pending_by_type"`
SourceSummaryPendingByType []CountBucket `json:"source_summary_pending_by_type"`
Drained bool `json:"drained"`
}
type CountBucket ¶
type DeleteItemsResult ¶
type DeleteSourcesResult ¶
type Feed ¶ added in v0.1.6
type Feed struct {
ID int64
FeedKey string
URL string
NormalizedURL string
ResolvedURL string
SiteURL string
Title string
Description string
Language string
Enabled bool
HealthStatus string
PollIntervalSeconds int
NextFetchAfter time.Time
FetchETag string
FetchLastModified string
FetchBodyHash string
LastCheckedAt time.Time
LastFetchedAt time.Time
LastChangedAt time.Time
LastSuccessAt time.Time
FailureKind string
FirstFailedAt time.Time
LastFailedAt time.Time
LastHTTPStatus int
LastError string
ErrorCount int
LatestNormalizedJSON string
UserTags string
CreatedAt time.Time
UpdatedAt time.Time
}
type FeedEntry ¶ added in v0.1.6
type FeedEntry struct {
FeedID int64
EntryKey string
IdentityKey string
GUID string
GUIDIsPermalink bool
Link string
NormalizedLink string
Title string
Author string
PublishedAt string
EntryUpdatedAt string
SummaryHTML string
SummaryText string
ContentHTML string
ContentMarkdown string
ContentText string
EnclosuresJSON string
ExtensionsJSON string
RawJSON string
ContentHash string
Item model.Item
SourceCandidate *model.SourceCandidate
ObservedAt time.Time
}
type FeedEntryApplyResult ¶ added in v0.1.6
type FeedFailureState ¶ added in v0.1.6
type FeedFetchRecord ¶ added in v0.1.6
type FeedFetchState ¶ added in v0.1.6
type FeedUpsert ¶ added in v0.1.6
type FeedUpsertResult ¶ added in v0.1.6
type GitHubAuthProfile ¶ added in v0.2.5
type MCPBearerToken ¶ added in v0.2.5
type MCPBearerTokenCreateResult ¶ added in v0.2.5
type MCPBearerTokenCreateResult struct {
Token string `json:"token"`
Record MCPBearerToken `json:"record"`
}
type MigrationEvent ¶
type MigrationEvent struct {
Phase MigrationPhase
Version int
LatestVersion int
Name string
Err error
}
MigrationEvent describes one schema migration lifecycle event.
type MigrationPhase ¶
type MigrationPhase string
MigrationPhase identifies the lifecycle state for a migration event.
const ( // MigrationStarted is emitted before a missing migration starts running. MigrationStarted MigrationPhase = "started" // MigrationApplied is emitted after a missing migration has been applied and recorded. MigrationApplied MigrationPhase = "applied" // MigrationFailed is emitted when a missing migration or its metadata write fails. MigrationFailed MigrationPhase = "failed" )
type MigrationReporter ¶
type MigrationReporter func(MigrationEvent)
MigrationReporter receives migration lifecycle events during writable startup.
type OKFExportOptions ¶ added in v0.2.17
type OKFExportOptions struct {
IncludeItems bool
IncludeSources bool
SourceTypes []string
Limit int
}
OKFExportOptions controls a read-only snapshot used by the OKF projection.
type OKFExportSnapshot ¶ added in v0.2.17
type OKFExportSnapshot struct {
Items []model.Item `json:"items"`
Sources []model.SourceDocument `json:"sources"`
ItemSources map[int64][]model.ItemSourceRef `json:"item_sources"`
SourceBacklinks map[int64][]model.SourceBacklink `json:"source_backlinks"`
ItemMedia map[int64][]model.ItemMediaRef `json:"item_media"`
ItemChildren map[int64][]model.SourceBacklink `json:"item_children"`
}
OKFExportSnapshot is a consistent SQLite view used by the OKF exporter.
type OpenOptions ¶
type OpenOptions struct {
MigrationReporter MigrationReporter
}
OpenOptions configures writable store startup behavior.
type PipelineStageRow ¶
type PipelineStats ¶
type PipelineStats struct {
SummaryPromptVersion string `json:"summary_prompt_version"`
SummaryTool string `json:"summary_tool"`
SummaryToolVersion string `json:"summary_tool_version"`
Hydration []PipelineStageRow `json:"hydration"`
Extraction []PipelineStageRow `json:"extraction"`
Summary []PipelineStageRow `json:"summary"`
Transcription []PipelineStageRow `json:"transcription"`
OCR []PipelineStageRow `json:"ocr"`
}
type PublicChatShare ¶ added in v0.2.6
type PublicChatShare struct {
}
type PublicChatShareInput ¶ added in v0.2.6
type PublicChatShareInput struct {
}
type RebuildFTSStats ¶
type ReviewCursor ¶ added in v0.2.22
type ReviewCursor struct {
EventAt time.Time `json:"event_at"`
EventKind string `json:"event_kind"`
EntityKind string `json:"entity_kind"`
EntityID int64 `json:"entity_id"`
EventStage string `json:"event_stage"`
}
func DecodeReviewCursor ¶ added in v0.2.22
func DecodeReviewCursor(token string) (ReviewCursor, error)
func ParseReviewSince ¶ added in v0.2.22
func ParseReviewSince(value string, now time.Time) (ReviewCursor, error)
type ReviewEntityEvent ¶ added in v0.2.22
type ReviewEntityEvent struct {
EventID string `json:"event_id"`
EventKind string `json:"event_kind"`
EventAt time.Time `json:"event_at"`
EventStage string `json:"event_stage"`
Status string `json:"status"`
Actionability string `json:"actionability"`
Importance int `json:"importance"`
Message string `json:"message,omitempty"`
Reasons []string `json:"reasons"`
}
type ReviewEntityGroup ¶ added in v0.2.22
type ReviewEntityGroup struct {
EntityKind string `json:"entity_kind"`
EntityID int64 `json:"entity_id"`
EntityKey string `json:"entity_key"`
SourceType string `json:"source_type"`
Title string `json:"title"`
URL string `json:"url"`
NotePath string `json:"note_path"`
FirstEventAt time.Time `json:"first_event_at"`
LatestEventAt time.Time `json:"latest_event_at"`
EventCount int `json:"event_count"`
EventKinds []string `json:"event_kinds"`
Summary string `json:"summary"`
SummaryEventID string `json:"summary_event_id"`
SummaryEventKind string `json:"summary_event_kind"`
Tags []string `json:"tags"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
Actionability string `json:"actionability"`
Importance int `json:"importance"`
Reasons []string `json:"reasons"`
Events []ReviewEntityEvent `json:"events"`
}
type ReviewEvent ¶ added in v0.2.22
type ReviewEvent struct {
EventID string `json:"event_id"`
EventKind string `json:"event_kind"`
EventAt time.Time `json:"event_at"`
EntityKind string `json:"entity_kind"`
EntityID int64 `json:"entity_id"`
EntityKey string `json:"entity_key"`
EventStage string `json:"event_stage"`
SourceType string `json:"source_type"`
Title string `json:"title"`
URL string `json:"url"`
NotePath string `json:"note_path"`
Summary string `json:"summary"`
Tags []string `json:"tags"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
Actionability string `json:"actionability"`
Importance int `json:"importance"`
Reasons []string `json:"reasons"`
}
type ReviewEventFilter ¶ added in v0.2.22
type ReviewEventFilter struct {
Cursor ReviewCursor
Limit int
Types []string
View string
}
type ReviewEventPage ¶ added in v0.2.22
type ReviewEventPage struct {
View string `json:"view"`
Cursor ReviewCursor `json:"cursor"`
NextCursor string `json:"next_cursor"`
HighWatermark time.Time `json:"high_watermark"`
Events []ReviewEvent `json:"events"`
Entities []ReviewEntityGroup `json:"entities"`
Truncated bool `json:"truncated"`
Counts []CountBucket `json:"counts"`
}
type SourceActivityEvent ¶
type SourceActivityEvent struct {
SourceID int64 `json:"source_id"`
SourceKey string `json:"source_key"`
SourceType string `json:"source_type"`
Domain string `json:"domain"`
FailureKind string `json:"failure_kind,omitempty"`
CanonicalURL string `json:"canonical_url"`
Title string `json:"title"`
NotePath string `json:"note_path"`
EventKind string `json:"event_kind"`
Status string `json:"status"`
Message string `json:"message,omitempty"`
EventAt time.Time `json:"event_at"`
}
type SourceActivityFeed ¶
type SourceActivityFeed struct {
Window string `json:"window"`
RecentSuccesses []SourceActivityEvent `json:"recent_successes"`
RecentFailures []SourceActivityEvent `json:"recent_failures"`
FailureHotspots []SourceFailureHotspot `json:"failure_hotspots"`
FailureKinds []CountBucket `json:"failure_kinds"`
FailureStatuses []CountBucket `json:"failure_statuses"`
FailureDomains []CountBucket `json:"failure_domains"`
FailureTable []SourceActivityEvent `json:"failure_table"`
FailureTableTotal int `json:"failure_table_total"`
FailureTableOffset int `json:"failure_table_offset"`
FailureTableLimit int `json:"failure_table_limit"`
FailureTableSort string `json:"failure_table_sort"`
TrendBucket string `json:"trend_bucket"`
Trend []SourceActivityTrendPoint `json:"trend"`
}
type SourceActivityFilter ¶
type SourceCountFilter ¶
type SourceFailureHotspot ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func OpenReadOnly ¶
OpenReadOnly opens an existing store for read-only consumers such as MCP. It intentionally skips schema creation/migrations so startup cannot block behind a long-running writer before the MCP initialize response is sent.
func OpenWithOptions ¶
func OpenWithOptions(path string, opts OpenOptions) (*Store, error)
func (*Store) ActiveMCPBearerTokenCount ¶ added in v0.2.5
func (*Store) ApplyFeedEntry ¶ added in v0.1.6
func (*Store) ApproveGitHubAuthUser ¶ added in v0.2.5
func (*Store) CountExactUserTag ¶
func (*Store) CountItemTextMatches ¶
func (*Store) CountItems ¶
func (*Store) CountSourceTextMatches ¶
func (*Store) CountSources ¶
func (s *Store) CountSources(ctx context.Context, filter SourceCountFilter, groupBy string) ([]CountBucket, error)
func (*Store) CreateMCPBearerToken ¶ added in v0.2.5
func (*Store) DeleteItemsBySourceType ¶
func (*Store) DeleteOrphanSources ¶
func (*Store) EnableFeed ¶ added in v0.1.6
func (*Store) GetGitHubAuthUserByID ¶ added in v0.2.5
func (*Store) GetGitHubAuthUserByUsername ¶ added in v0.2.5
func (*Store) GetItemByID ¶
func (*Store) GetItemEnrichment ¶
func (*Store) GetMCPBearerTokenByID ¶ added in v0.2.5
func (*Store) GetMCPBearerTokenByRawToken ¶ added in v0.2.5
func (*Store) GetMediaAsset ¶
func (*Store) GetPreferredLocalSourceExtract ¶
func (*Store) GetPublicChatShareBySlug ¶ added in v0.2.6
func (*Store) GetSourceByID ¶
func (*Store) GetSourceEvidence ¶
func (*Store) GetSourceExtractedText ¶
func (*Store) GetSourceExtractedTextPrefix ¶ added in v0.2.12
func (*Store) GetSourcesByIDs ¶
func (*Store) InvalidateItemOCR ¶
func (*Store) InvalidateItemSummary ¶
func (*Store) ListAllEntityItems ¶
func (*Store) ListAllEntitySources ¶
func (*Store) ListAllItems ¶
func (*Store) ListAllSources ¶
func (*Store) ListBacklinksForSource ¶
func (*Store) ListCategorizedItems ¶
ListCategorizedItems returns all items that have a non-empty user_tags field.
func (*Store) ListCategorizedSources ¶
ListCategorizedSources returns all sources that have a non-empty user_tags field.
func (*Store) ListCategorizedSourcesWithoutEvidence ¶
func (s *Store) ListCategorizedSourcesWithoutEvidence(ctx context.Context) ([]model.SourceDocument, error)
ListCategorizedSourcesWithoutEvidence returns tagged sources that lack extracted or summarized evidence.
func (*Store) ListFeedsDue ¶ added in v0.1.6
func (*Store) ListGitHubAuthUsers ¶ added in v0.2.5
func (*Store) ListItemChildLinks ¶
func (*Store) ListItemMediaRefs ¶
func (*Store) ListItemMediaRefsForSourceKeys ¶ added in v0.2.10
func (*Store) ListItemSourceKeysByMediaLocalPath ¶
func (*Store) ListItemsForCategorize ¶
func (s *Store) ListItemsForCategorize(ctx context.Context, limit int, force bool) ([]model.Item, error)
ListItemsForCategorize returns items ordered newest-first. When force is false only items with an empty user_tags field are returned.
func (*Store) ListItemsForLinkDiscovery ¶
func (*Store) ListItemsForXHydration ¶
func (*Store) ListItemsForXMediaSummary ¶
func (*Store) ListItemsForXMediaTranscription ¶
func (*Store) ListItemsForXPhotoOCR ¶
func (*Store) ListItemsForXPhotoOCRAudit ¶
func (*Store) ListItemsForXQuoteHydration ¶
func (*Store) ListLinkedItemsBySourceType ¶ added in v0.1.7
func (*Store) ListMCPBearerTokens ¶ added in v0.2.5
func (*Store) ListMediaAssetsByLocalPath ¶
func (*Store) ListMediaAssetsForArchive ¶
func (*Store) ListMediaAssetsForDownload ¶
func (*Store) ListMediaAssetsForPrune ¶
func (*Store) ListPublicChatSharesByOwner ¶ added in v0.2.6
func (*Store) ListReviewEvents ¶ added in v0.2.22
func (s *Store) ListReviewEvents(ctx context.Context, filter ReviewEventFilter) (ReviewEventPage, error)
func (*Store) ListSourcesForCategorize ¶
func (s *Store) ListSourcesForCategorize(ctx context.Context, limit int, force bool) ([]model.SourceDocument, error)
ListSourcesForCategorize returns sources with extracted or summarized evidence ordered newest-first. When force is false only evidence-bearing sources with an empty user_tags field are returned.
func (*Store) ListSourcesForEnrichment ¶
func (*Store) ListSourcesForItem ¶
func (*Store) LoadOKFExportSnapshot ¶ added in v0.2.17
func (s *Store) LoadOKFExportSnapshot(ctx context.Context, opts OKFExportOptions) (OKFExportSnapshot, error)
func (*Store) MarkItemLinkDiscovery ¶
func (*Store) MarkMediaLocalPrunedByPath ¶
func (*Store) PurgeItemIndexedContent ¶
func (*Store) RebuildFTS ¶
func (s *Store) RebuildFTS(ctx context.Context) (RebuildFTSStats, error)
func (*Store) RecordFeedFetch ¶ added in v0.1.6
func (s *Store) RecordFeedFetch(ctx context.Context, rec FeedFetchRecord) error
func (*Store) RemoveGitHubAuthUser ¶ added in v0.2.5
func (*Store) ReplaceItemChildLinks ¶
func (*Store) ResetSourceEnrichment ¶
func (s *Store) ResetSourceEnrichment(ctx context.Context, opts ResetSourceEnrichmentOptions) (ResetSourceEnrichmentStats, error)
func (*Store) RevokeMCPBearerToken ¶ added in v0.2.5
func (*Store) SaveItemOCR ¶
func (*Store) SaveItemSummary ¶
func (*Store) SaveItemUserTags ¶
func (*Store) SaveMediaArchive ¶
func (*Store) SaveMediaDownload ¶
func (*Store) SavePublicChatShare ¶ added in v0.2.6
func (s *Store) SavePublicChatShare(ctx context.Context, input PublicChatShareInput) (PublicChatShare, error)
func (*Store) SaveSourceExtraction ¶
func (*Store) SaveSourceSummary ¶
func (*Store) SaveSourceUserTags ¶
func (*Store) SaveXHydration ¶
func (*Store) SaveXMediaTranscriptionState ¶
func (*Store) SearchExactUserTag ¶
func (*Store) SearchSources ¶
func (*Store) SearchUserTags ¶
func (*Store) SourceActivityFeed ¶
func (*Store) SourceActivityFeedFiltered ¶
func (s *Store) SourceActivityFeedFiltered(ctx context.Context, filter SourceActivityFilter) (SourceActivityFeed, error)
func (*Store) SourceHasLinkedItemType ¶ added in v0.1.7
func (*Store) UpdateFeedFailure ¶ added in v0.1.6
func (s *Store) UpdateFeedFailure(ctx context.Context, state FeedFailureState) error
func (*Store) UpdateFeedFetchState ¶ added in v0.1.6
func (s *Store) UpdateFeedFetchState(ctx context.Context, state FeedFetchState) error
func (*Store) UpdateGitHubAuthUserFromOAuth ¶ added in v0.2.5
func (*Store) UpsertFeed ¶ added in v0.1.6
func (s *Store) UpsertFeed(ctx context.Context, input FeedUpsert) (FeedUpsertResult, error)
func (*Store) UpsertItem ¶
func (*Store) UpsertSource ¶
func (s *Store) UpsertSource(ctx context.Context, candidate model.SourceCandidate) (model.SourceUpsertResult, error)
func (*Store) UpsertSourceLink ¶
func (s *Store) UpsertSourceLink(ctx context.Context, itemID int64, candidate model.SourceCandidate) (model.SourceLinkUpsertResult, error)
Source Files
¶
- auth_schema.go
- auth_users.go
- categorize.go
- cleanup.go
- feed.go
- feed_schema.go
- item_enrich_queries.go
- item_enrichment.go
- item_enrichment_backfill.go
- item_enrichment_fields.go
- item_enrichment_schema.go
- item_enrichment_sql.go
- item_fts.go
- item_link_metadata.go
- item_links.go
- item_ocr.go
- item_purge.go
- item_read.go
- item_scan.go
- item_summary.go
- item_write.go
- mcp_bearer_tokens.go
- media.go
- media_archive_candidates.go
- media_archive_lookup.go
- media_archive_write.go
- media_download.go
- media_refs.go
- media_schema.go
- media_x_hydration.go
- media_x_hydration_decode.go
- media_x_hydration_raw.go
- migrations.go
- okf_export.go
- open.go
- predicates.go
- public_chat_share.go
- retry.go
- review_events.go
- review_events_cursor.go
- review_events_group.go
- review_events_queries.go
- review_events_scan.go
- review_events_sql.go
- review_events_types.go
- schema.go
- schema_init.go
- search.go
- search_counts.go
- search_helpers.go
- search_tags.go
- source_activity.go
- source_activity_queries.go
- source_activity_scan.go
- source_activity_sql.go
- source_activity_trend.go
- source_enrichment_candidates.go
- source_evidence.go
- source_extraction.go
- source_failure.go
- source_links.go
- source_local_extract.go
- source_lookup.go
- source_predicates.go
- source_read.go
- source_relations.go
- source_repair.go
- source_repair_filters.go
- source_repair_x_article.go
- source_scan.go
- source_schema.go
- source_search.go
- source_summary.go
- source_tags.go
- source_x_article.go
- source_x_article_canonical.go
- stats_activity.go
- stats_backlog.go
- stats_counts.go
- stats_helpers.go
- stats_pipeline.go
- stats_pipeline_helpers.go
- stats_pipeline_items.go
- stats_pipeline_kinds.go
- stats_pipeline_x_items.go
- stats_types.go
- time_helpers.go
- x_hydration_candidates.go
- x_hydration_invalidate.go
- x_hydration_links.go
- x_hydration_save.go
- x_media_transcription.go