Documentation
¶
Index ¶
- Constants
- Variables
- func BuildChunks(relativePath string, content []byte, options SafetyOptions) (ChunkSet, SafetyResult, error)
- func BuildChunksFromReader(relativePath string, reader io.Reader, sizeBytes int64, options SafetyOptions) (ChunkSet, SafetyResult, error)
- func EligibleContentSHA256(result SafetyResult, content []byte) (string, error)
- func NormalizeFileExtension(raw string) (string, error)
- func NormalizePathPrefix(raw string) (string, error)
- func ValidateDefaultExtractorRegistry() error
- type API
- type ASTCoverageMetadata
- type ASTQueryCatalog
- type ASTQueryMetadata
- type ASTSearchOptions
- type ASTSearchResult
- type ASTSearchResultList
- type Call
- type CallGraphOptions
- type Chunk
- type ChunkList
- type ChunkMetadata
- type ChunkSet
- type DiagnosticsSnapshot
- type DiagnosticsSource
- type Extractor
- type ExtractorCacheEntry
- type ExtractorFingerprintProvider
- type ExtractorName
- type ExtractorRegistry
- type ExtractorResult
- type FileList
- type FileMetadata
- type FileOutline
- type FileOutlineOptions
- type FileSearchOptions
- type FileState
- type FileStateFilter
- type FileStatus
- type FileWatcher
- type Finding
- type GraphStore
- func (store *GraphStore) CountGraphChunks(ctx context.Context, project projectregistry.Project) (int, error)
- func (store *GraphStore) CountGraphSymbols(ctx context.Context, project projectregistry.Project) (int, error)
- func (store *GraphStore) GetChunk(ctx context.Context, project projectregistry.Project, fileID string, ...) (ChunkMetadata, error)
- func (store *GraphStore) GetFile(ctx context.Context, project projectregistry.Project, fileID string) (FileMetadata, error)
- func (store *GraphStore) GetFileOutline(ctx context.Context, project projectregistry.Project, fileID string, ...) (FileOutline, error)
- func (store *GraphStore) GetSymbol(ctx context.Context, project projectregistry.Project, symbolID string) (SymbolMetadata, error)
- func (store *GraphStore) GetSymbolCallGraph(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolCallGraph, error)
- func (store *GraphStore) GetSymbolSource(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolSource, error)
- func (store *GraphStore) HasFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
- func (store *GraphStore) ListChunks(ctx context.Context, project projectregistry.Project, fileID string, ...) (ChunkList, error)
- func (store *GraphStore) ListHeadings(ctx context.Context, project projectregistry.Project, fileID string, ...) (HeadingList, error)
- func (store *GraphStore) ListSymbolCallees(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolCallEdgeList, error)
- func (store *GraphStore) ListSymbolCallers(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolCallEdgeList, error)
- func (store *GraphStore) ListSymbolImplementers(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolImplementationList, error)
- func (store *GraphStore) ListSymbolReferences(ctx context.Context, project projectregistry.Project, symbolID string, ...) (SymbolReferenceList, error)
- func (store *GraphStore) ListSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, ...) (SymbolList, error)
- func (store *GraphStore) PutEligibleFile(ctx context.Context, project projectregistry.Project, run Run, state FileState, ...) error
- func (store *GraphStore) PutFileState(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
- func (store *GraphStore) PutPreparedFilesBatch(ctx context.Context, project projectregistry.Project, run Run, files any) error
- func (store *GraphStore) PutRun(ctx context.Context, project projectregistry.Project, run Run) error
- func (store *GraphStore) PutSkippedFile(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
- func (store *GraphStore) PutUnchangedFile(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
- func (store *GraphStore) SearchCalls(ctx context.Context, project projectregistry.Project, ...) (SymbolCallEdgeList, error)
- func (store *GraphStore) SearchReferences(ctx context.Context, project projectregistry.Project, ...) (SymbolReferenceList, error)
- func (store *GraphStore) SearchText(ctx context.Context, project projectregistry.Project, ...) (TextSearchResultList, error)
- func (store *GraphStore) WithBatch(ctx context.Context, fn func(*GraphStore) error) error
- type Heading
- type HeadingList
- type HeadingMetadata
- type Implementation
- type Orchestrator
- type OrchestratorOptions
- type OutlineChunkMetadata
- type Pagination
- type PreparedGraphFile
- type PreparedSearchFile
- type Reference
- type ReferenceSearchOptions
- type Run
- type RunKind
- type RunMetadata
- type RunStatus
- type SQLiteStore
- func (store *SQLiteStore) ApplySearchFileBatch(ctx context.Context, project projectregistry.Project, ...) error
- func (store *SQLiteStore) ClearSearchIndexDegraded(ctx context.Context, projectID string) error
- func (store *SQLiteStore) ContextSearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
- func (store *SQLiteStore) CountFileStates(ctx context.Context, projectID string, filter FileStateFilter) (int, error)
- func (store *SQLiteStore) CountSearchChunks(ctx context.Context, project projectregistry.Project) (int, error)
- func (store *SQLiteStore) CountSearchSymbols(ctx context.Context, project projectregistry.Project) (int, error)
- func (store *SQLiteStore) DeleteExtractorCacheForFile(ctx context.Context, projectID string, relativePathHash string) error
- func (store *SQLiteStore) DeleteSearchFile(ctx context.Context, projectID string, fileID string) error
- func (store *SQLiteStore) DeleteSearchProject(ctx context.Context, projectID string) error
- func (store *SQLiteStore) FailActiveRuns(ctx context.Context, projectID string, errorCategory string, ...) (int, error)
- func (store *SQLiteStore) GetExtractorCache(ctx context.Context, projectID string, relativePathHash string, ...) (ExtractorCacheEntry, error)
- func (store *SQLiteStore) GetExtractorCacheWithFingerprint(ctx context.Context, projectID string, relativePathHash string, ...) (ExtractorCacheEntry, error)
- func (store *SQLiteStore) GetFileStateByHash(ctx context.Context, projectID string, relativePathHash string) (FileState, error)
- func (store *SQLiteStore) GetRun(ctx context.Context, projectID string, runID string) (Run, error)
- func (store *SQLiteStore) HasSearchFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
- func (store *SQLiteStore) ListActiveRuns(ctx context.Context, projectID string) ([]Run, error)
- func (store *SQLiteStore) ListFileStates(ctx context.Context, projectID string, filter FileStateFilter) ([]FileState, error)
- func (store *SQLiteStore) ListFileStatesPage(ctx context.Context, projectID string, filter FileStateFilter, ...) ([]FileState, string, error)
- func (store *SQLiteStore) ListLatestRuns(ctx context.Context, projectID string, limit int) ([]Run, error)
- func (store *SQLiteStore) MarkSearchIndexDegraded(ctx context.Context, projectID string, reason string) error
- func (store *SQLiteStore) ReconcileSearchIndex(ctx context.Context, project projectregistry.Project) ([]FileState, error)
- func (store *SQLiteStore) SaveExtractorCache(ctx context.Context, entry ExtractorCacheEntry) error
- func (store *SQLiteStore) SaveFileState(ctx context.Context, state FileState) error
- func (store *SQLiteStore) SaveFileStatesBatch(ctx context.Context, states []FileState) error
- func (store *SQLiteStore) SaveRun(ctx context.Context, run Run) error
- func (store *SQLiteStore) SearchCalls(ctx context.Context, project projectregistry.Project, ...) (SymbolCallEdgeList, error)
- func (store *SQLiteStore) SearchFiles(ctx context.Context, project projectregistry.Project, ...) (FileList, error)
- func (store *SQLiteStore) SearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
- func (store *SQLiteStore) SearchReferences(ctx context.Context, project projectregistry.Project, ...) (SymbolReferenceList, error)
- func (store *SQLiteStore) SearchSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, ...) (SymbolList, error)
- func (store *SQLiteStore) SearchText(ctx context.Context, project projectregistry.Project, ...) (TextSearchResultList, error)
- func (store *SQLiteStore) SearchWriteDiagnostics(projectID string) SearchWriteDiagnostic
- func (store *SQLiteStore) SetSearchStateStore(state searchStateStore)
- func (store *SQLiteStore) UpdateSearchFileMetadata(ctx context.Context, project projectregistry.Project, state FileState) error
- func (store *SQLiteStore) UpdateSearchFileMetadataBatch(ctx context.Context, project projectregistry.Project, states []FileState) error
- func (store *SQLiteStore) UpsertSearchFile(ctx context.Context, project projectregistry.Project, state FileState, ...) error
- func (store *SQLiteStore) UpsertSearchFilesBatch(ctx context.Context, project projectregistry.Project, ...) error
- type SafetyOptions
- type SafetyResult
- type Scheduler
- func (scheduler *Scheduler) ContextSearchIndexHealth(ctx context.Context, projectID string) (SearchIndexHealth, error)
- func (scheduler *Scheduler) Diagnostics() SchedulerDiagnostics
- func (scheduler *Scheduler) EligibleFileCount(ctx context.Context, projectID string) (int, error)
- func (scheduler *Scheduler) GetChunk(ctx context.Context, projectID string, fileID string, chunkID string, ...) (ChunkMetadata, error)
- func (scheduler *Scheduler) GetFile(ctx context.Context, projectID string, fileID string) (FileMetadata, error)
- func (scheduler *Scheduler) GetFileOutline(ctx context.Context, projectID string, fileID string, ...) (FileOutline, error)
- func (scheduler *Scheduler) GetSymbol(ctx context.Context, projectID string, symbolID string) (SymbolMetadata, error)
- func (scheduler *Scheduler) GetSymbolCallGraph(ctx context.Context, projectID string, symbolID string, ...) (SymbolCallGraph, error)
- func (scheduler *Scheduler) GetSymbolSource(ctx context.Context, projectID string, symbolID string, ...) (SymbolSource, error)
- func (scheduler *Scheduler) IndexedChunkCount(ctx context.Context, projectID string) (int, error)
- func (scheduler *Scheduler) IndexedSymbolCount(ctx context.Context, projectID string) (int, error)
- func (scheduler *Scheduler) IngestPath(ctx context.Context, projectID string, relativePath string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) IngestProject(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) LatestRunMetadata(ctx context.Context, projectID string) (RunMetadata, error)
- func (scheduler *Scheduler) ListASTQueries(ctx context.Context, projectID string) (ASTQueryCatalog, error)
- func (scheduler *Scheduler) ListChunks(ctx context.Context, projectID string, fileID string, pagination Pagination, ...) (ChunkList, error)
- func (scheduler *Scheduler) ListFiles(ctx context.Context, projectID string, filter FileStateFilter, ...) (FileList, error)
- func (scheduler *Scheduler) ListHeadings(ctx context.Context, projectID string, fileID string, pagination Pagination) (HeadingList, error)
- func (scheduler *Scheduler) ListSymbolCallees(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
- func (scheduler *Scheduler) ListSymbolCallers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
- func (scheduler *Scheduler) ListSymbolImplementers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolImplementationList, error)
- func (scheduler *Scheduler) ListSymbolReferences(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolReferenceList, error)
- func (scheduler *Scheduler) ListSymbols(ctx context.Context, projectID string, filter SymbolFilter, ...) (SymbolList, error)
- func (scheduler *Scheduler) RebuildSearchIndex(ctx context.Context, projectID string) (Run, error)
- func (scheduler *Scheduler) RunMetadata(ctx context.Context, projectID string, runID string) (RunMetadata, error)
- func (scheduler *Scheduler) SearchAST(ctx context.Context, projectID string, options ASTSearchOptions) (ASTSearchResultList, error)
- func (scheduler *Scheduler) SearchCalls(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
- func (scheduler *Scheduler) SearchFiles(ctx context.Context, projectID string, options FileSearchOptions) (FileList, error)
- func (scheduler *Scheduler) SearchIndexHealth(ctx context.Context, projectID string) (SearchIndexHealth, error)
- func (scheduler *Scheduler) SearchReferences(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolReferenceList, error)
- func (scheduler *Scheduler) SearchSymbols(ctx context.Context, projectID string, filter SymbolFilter, ...) (SymbolList, error)
- func (scheduler *Scheduler) SearchText(ctx context.Context, projectID string, options TextSearchOptions) (TextSearchResultList, error)
- func (scheduler *Scheduler) Start(ctx context.Context) error
- func (scheduler *Scheduler) Stop(ctx context.Context) error
- func (scheduler *Scheduler) SubmitFullScan(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) SubmitFullScanAsync(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) SubmitIngestProject(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) SubmitPath(ctx context.Context, projectID string, relativePath string, trigger Trigger) (Run, error)
- func (scheduler *Scheduler) SubmitRebuildSearchIndex(ctx context.Context, projectID string) (Run, error)
- type SchedulerDiagnostics
- type SchedulerOptions
- type SearchIndexHealth
- type SearchIndexMetadata
- type SearchQueryDiagnostic
- type SearchStorageDiagnostic
- type SearchStoreBackend
- type SearchStoreRouter
- func (router *SearchStoreRouter) ApplySearchFileBatch(ctx context.Context, project projectregistry.Project, ...) error
- func (router *SearchStoreRouter) ClearSearchIndexDegraded(ctx context.Context, projectID string) error
- func (router *SearchStoreRouter) ContextSearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
- func (router *SearchStoreRouter) CountSearchChunks(ctx context.Context, project projectregistry.Project) (int, error)
- func (router *SearchStoreRouter) CountSearchSymbols(ctx context.Context, project projectregistry.Project) (int, error)
- func (router *SearchStoreRouter) DeleteSearchFile(ctx context.Context, projectID string, fileID string) error
- func (router *SearchStoreRouter) DeleteSearchProject(ctx context.Context, projectID string) error
- func (router *SearchStoreRouter) HasSearchFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
- func (router *SearchStoreRouter) MarkSearchIndexDegraded(ctx context.Context, projectID string, reason string) error
- func (router *SearchStoreRouter) ReconcileSearchIndex(ctx context.Context, project projectregistry.Project) ([]FileState, error)
- func (router *SearchStoreRouter) SearchCalls(ctx context.Context, project projectregistry.Project, ...) (SymbolCallEdgeList, error)
- func (router *SearchStoreRouter) SearchFiles(ctx context.Context, project projectregistry.Project, ...) (FileList, error)
- func (router *SearchStoreRouter) SearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
- func (router *SearchStoreRouter) SearchReferences(ctx context.Context, project projectregistry.Project, ...) (SymbolReferenceList, error)
- func (router *SearchStoreRouter) SearchStorageDiagnostics() []SearchStorageDiagnostic
- func (router *SearchStoreRouter) SearchSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, ...) (SymbolList, error)
- func (router *SearchStoreRouter) SearchText(ctx context.Context, project projectregistry.Project, ...) (TextSearchResultList, error)
- func (router *SearchStoreRouter) UpdateSearchFileMetadata(ctx context.Context, project projectregistry.Project, state FileState) error
- func (router *SearchStoreRouter) UpdateSearchFileMetadataBatch(ctx context.Context, project projectregistry.Project, states []FileState) error
- func (router *SearchStoreRouter) UpsertSearchFile(ctx context.Context, project projectregistry.Project, state FileState, ...) error
- func (router *SearchStoreRouter) UpsertSearchFilesBatch(ctx context.Context, project projectregistry.Project, ...) error
- type SearchWriteDiagnostic
- type Service
- func (svc *Service) ActiveRunMetadata(ctx context.Context, projectID string) ([]RunMetadata, error)
- func (svc *Service) ContextSearchIndexHealth(ctx context.Context, projectID string) (SearchIndexHealth, error)
- func (svc *Service) Diagnostics() map[string]StageDiagnostic
- func (svc *Service) EligibleFileCount(ctx context.Context, projectID string) (int, error)
- func (svc *Service) ExecutePreparedProjectRun(ctx context.Context, run Run) (Run, error)
- func (svc *Service) ExecutePreparedSearchIndexRebuild(ctx context.Context, run Run) (Run, error)
- func (svc *Service) FailInterruptedRuns(ctx context.Context, errorCategory string) (int, error)
- func (svc *Service) FailPreparedProjectRun(ctx context.Context, run Run, errorCategory string) (Run, error)
- func (svc *Service) GetChunk(ctx context.Context, projectID string, fileID string, chunkID string, ...) (ChunkMetadata, error)
- func (svc *Service) GetFile(ctx context.Context, projectID string, fileID string) (FileMetadata, error)
- func (svc *Service) GetFileOutline(ctx context.Context, projectID string, fileID string, ...) (FileOutline, error)
- func (svc *Service) GetRun(ctx context.Context, projectID string, runID string) (Run, error)
- func (svc *Service) GetSymbol(ctx context.Context, projectID string, symbolID string) (SymbolMetadata, error)
- func (svc *Service) GetSymbolCallGraph(ctx context.Context, projectID string, symbolID string, ...) (SymbolCallGraph, error)
- func (svc *Service) GetSymbolSource(ctx context.Context, projectID string, symbolID string, ...) (SymbolSource, error)
- func (svc *Service) IndexedChunkCount(ctx context.Context, projectID string) (int, error)
- func (svc *Service) IndexedSymbolCount(ctx context.Context, projectID string) (int, error)
- func (svc *Service) IngestPath(ctx context.Context, projectID string, relativePath string, trigger Trigger) (Run, error)
- func (svc *Service) IngestProject(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (svc *Service) LatestRunMetadata(ctx context.Context, projectID string) (RunMetadata, error)
- func (svc *Service) ListASTQueries(ctx context.Context, projectID string) (ASTQueryCatalog, error)
- func (svc *Service) ListChunks(ctx context.Context, projectID string, fileID string, pagination Pagination, ...) (ChunkList, error)
- func (svc *Service) ListFileStates(ctx context.Context, projectID string, filter FileStateFilter) ([]FileState, error)
- func (svc *Service) ListFiles(ctx context.Context, projectID string, filter FileStateFilter, ...) (FileList, error)
- func (svc *Service) ListHeadings(ctx context.Context, projectID string, fileID string, pagination Pagination) (HeadingList, error)
- func (svc *Service) ListSymbolCallees(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
- func (svc *Service) ListSymbolCallers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
- func (svc *Service) ListSymbolImplementers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolImplementationList, error)
- func (svc *Service) ListSymbolReferences(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolReferenceList, error)
- func (svc *Service) ListSymbols(ctx context.Context, projectID string, filter SymbolFilter, ...) (SymbolList, error)
- func (svc *Service) PrepareProjectRun(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (svc *Service) RebuildSearchIndex(ctx context.Context, projectID string) (Run, error)
- func (svc *Service) RunMetadata(ctx context.Context, projectID string, runID string) (RunMetadata, error)
- func (svc *Service) SearchAST(ctx context.Context, projectID string, options ASTSearchOptions) (ASTSearchResultList, error)
- func (svc *Service) SearchCalls(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
- func (svc *Service) SearchFiles(ctx context.Context, projectID string, options FileSearchOptions) (FileList, error)
- func (svc *Service) SearchIndexHealth(ctx context.Context, projectID string) (SearchIndexHealth, error)
- func (svc *Service) SearchReferences(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolReferenceList, error)
- func (svc *Service) SearchSymbols(ctx context.Context, projectID string, filter SymbolFilter, ...) (SymbolList, error)
- func (svc *Service) SearchText(ctx context.Context, projectID string, options TextSearchOptions) (TextSearchResultList, error)
- func (svc *Service) SetCheckpointFunc(checkpoint func(context.Context) error)
- func (svc *Service) SetExtractorCacheEnabled(enabled bool)
- func (svc *Service) SetFullScanBatchSize(size int)
- func (svc *Service) SetFullScanWorkerCount(count int)
- func (svc *Service) SetFullScanWorkerLimits(globalCount int, perProjectCount int)
- func (svc *Service) SetPolicyRecorder(recorder *agentactivity.Recorder)
- func (svc *Service) SetSearchStore(search any)
- func (svc *Service) SubmitIngestProject(ctx context.Context, projectID string, trigger Trigger) (Run, error)
- func (svc *Service) SubmitRebuildSearchIndex(ctx context.Context, projectID string) (Run, error)
- type SkipReason
- type StageDiagnostic
- type Symbol
- func ParseConfigTopLevelKeys(source []byte) ([]Symbol, error)
- func ParseDockerfileSymbols(source []byte) ([]Symbol, error)
- func ParseGoFile(relativePath string, source []byte) ([]Symbol, error)
- func ParseJSONTopLevelKeys(source []byte) ([]Symbol, error)
- func ParseMakefileSymbols(source []byte) ([]Symbol, error)
- func ParseOpenAPIPathSymbols(source []byte) ([]Symbol, error)
- func ParseSQLMigrationSymbols(relative string, source []byte) ([]Symbol, error)
- func ParseUnityAsmdefSymbols(source []byte) ([]Symbol, error)
- type SymbolCallEdge
- type SymbolCallEdgeList
- type SymbolCallGraph
- type SymbolFilter
- type SymbolImplementation
- type SymbolImplementationList
- type SymbolKind
- type SymbolList
- type SymbolMetadata
- type SymbolReferenceList
- type SymbolReferenceMetadata
- type SymbolSource
- type SymbolSourceOptions
- type TextSearchOptions
- type TextSearchResult
- type TextSearchResultList
- type Trigger
- type WatchEvent
- type WatchOp
- type WatchState
- type WatcherFactory
- type WorkspaceSafetyOptions
Constants ¶
View Source
const ( WatchStatusLive = "live" WatchStatusDegraded = "live_degraded" WatchStatusDisabled = "disabled" )
View Source
const ( DefaultPageSize = 50 MaxPageSize = 100 DefaultMaxChunkBytes = 8192 DefaultMaxSourceBytes = 8192 DefaultMaxSnippetBytes = 240 MaxSnippetBytes = 1024 MaxSearchQueryBytes = 256 MaxASTQueryBytes = 64 MaxCallGraphDepth = 5 MaxCallGraphNodes = 100 )
View Source
const SensitiveMarkerPolicySkipFile = "skip_file"
Variables ¶
View Source
var ( ErrProjectNotFound = projectregistry.ErrProjectNotFound ErrInvalidInput = projectregistry.ErrInvalidInput ErrProjectDisabled = errors.New("ingestion project disabled") ErrUnsupportedIngest = errors.New("ingestion unsupported") ErrIngestionNotFound = errors.New("ingestion resource not found") ErrPathEscapesRoot = errors.New("path escapes project root") ErrPathNotProjectLocal = errors.New("path must be project-relative") )
View Source
var ErrExtractorCacheLegacyFingerprint = errors.New("extractor cache legacy empty fingerprint")
View Source
var ErrExtractorCacheMiss = errors.New("extractor cache miss")
View Source
var ErrRunNotFound = errors.New("ingestion run not found")
Functions ¶
func BuildChunks ¶
func BuildChunks(relativePath string, content []byte, options SafetyOptions) (ChunkSet, SafetyResult, error)
func BuildChunksFromReader ¶ added in v0.1.10
func BuildChunksFromReader(relativePath string, reader io.Reader, sizeBytes int64, options SafetyOptions) (ChunkSet, SafetyResult, error)
func EligibleContentSHA256 ¶
func EligibleContentSHA256(result SafetyResult, content []byte) (string, error)
func NormalizeFileExtension ¶
func NormalizePathPrefix ¶
func ValidateDefaultExtractorRegistry ¶
func ValidateDefaultExtractorRegistry() error
Types ¶
type API ¶
type API interface {
IngestProject(context.Context, string, Trigger) (Run, error)
IngestPath(context.Context, string, string, Trigger) (Run, error)
SubmitIngestProject(context.Context, string, Trigger) (Run, error)
SubmitRebuildSearchIndex(context.Context, string) (Run, error)
RebuildSearchIndex(context.Context, string) (Run, error)
RunMetadata(context.Context, string, string) (RunMetadata, error)
LatestRunMetadata(context.Context, string) (RunMetadata, error)
EligibleFileCount(context.Context, string) (int, error)
IndexedSymbolCount(context.Context, string) (int, error)
IndexedChunkCount(context.Context, string) (int, error)
ListFiles(context.Context, string, FileStateFilter, Pagination) (FileList, error)
GetFile(context.Context, string, string) (FileMetadata, error)
ListChunks(context.Context, string, string, Pagination, int) (ChunkList, error)
GetChunk(context.Context, string, string, string, int) (ChunkMetadata, error)
ListSymbols(context.Context, string, SymbolFilter, Pagination) (SymbolList, error)
SearchText(context.Context, string, TextSearchOptions) (TextSearchResultList, error)
SearchFiles(context.Context, string, FileSearchOptions) (FileList, error)
SearchIndexHealth(context.Context, string) (SearchIndexHealth, error)
SearchSymbols(context.Context, string, SymbolFilter, Pagination) (SymbolList, error)
SearchReferences(context.Context, string, ReferenceSearchOptions) (SymbolReferenceList, error)
SearchCalls(context.Context, string, ReferenceSearchOptions) (SymbolCallEdgeList, error)
ListASTQueries(context.Context, string) (ASTQueryCatalog, error)
SearchAST(context.Context, string, ASTSearchOptions) (ASTSearchResultList, error)
GetSymbol(context.Context, string, string) (SymbolMetadata, error)
GetSymbolSource(context.Context, string, string, SymbolSourceOptions) (SymbolSource, error)
ListSymbolReferences(context.Context, string, string, Pagination) (SymbolReferenceList, error)
ListSymbolCallers(context.Context, string, string, Pagination) (SymbolCallEdgeList, error)
ListSymbolCallees(context.Context, string, string, Pagination) (SymbolCallEdgeList, error)
ListSymbolImplementers(context.Context, string, string, Pagination) (SymbolImplementationList, error)
GetSymbolCallGraph(context.Context, string, string, CallGraphOptions) (SymbolCallGraph, error)
ListHeadings(context.Context, string, string, Pagination) (HeadingList, error)
GetFileOutline(context.Context, string, string, FileOutlineOptions) (FileOutline, error)
}
type ASTCoverageMetadata ¶
type ASTCoverageMetadata struct {
Language string `json:"language"`
Extensions []string `json:"extensions"`
CoverageScope string `json:"coverage_scope"`
EligibleFiles int `json:"eligible_files"`
SkippedFileTooLarge int `json:"skipped_file_too_large"`
CoverageStatus string `json:"coverage_status"`
CoveragePartialCause string `json:"coverage_partial_cause,omitempty"`
}
type ASTQueryCatalog ¶
type ASTQueryCatalog struct {
Queries []ASTQueryMetadata `json:"queries"`
Coverage []ASTCoverageMetadata `json:"coverage,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type ASTQueryMetadata ¶
type ASTSearchOptions ¶
type ASTSearchOptions struct {
Language string
Query string
Captures []string
Extension string
PathPrefix string
PageSize int
PageToken string
MaxMatches int
MaxSnippetBytes int
}
func NormalizeASTSearchOptions ¶
func NormalizeASTSearchOptions(options ASTSearchOptions) (ASTSearchOptions, error)
type ASTSearchResult ¶
type ASTSearchResult struct {
File FileMetadata `json:"file"`
Chunk ChunkMetadata `json:"chunk"`
CaptureName string `json:"capture_name"`
CaptureText string `json:"capture_text,omitempty"`
CaptureTextTruncated bool `json:"capture_text_truncated,omitempty"`
LineStart int `json:"line_start"`
LineEnd int `json:"line_end"`
ByteStart int `json:"byte_start"`
ByteEnd int `json:"byte_end"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
Snippet string `json:"snippet,omitempty"`
SnippetTruncated bool `json:"snippet_truncated,omitempty"`
}
type ASTSearchResultList ¶
type ASTSearchResultList struct {
Results []ASTSearchResult `json:"results"`
NextPageToken string `json:"next_page_token,omitempty"`
QueryLanguage string `json:"query_language"`
QueryVersion string `json:"query_version"`
ResultTruncated bool `json:"result_truncated"`
MaxSnippetBytes int `json:"max_snippet_bytes"`
Coverage *ASTCoverageMetadata `json:"coverage,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type CallGraphOptions ¶
type ChunkList ¶
type ChunkList struct {
Chunks []ChunkMetadata `json:"chunks"`
NextPageToken string `json:"next_page_token,omitempty"`
}
type ChunkMetadata ¶
type ChunkMetadata struct {
ID string `json:"id"`
FileID string `json:"file_id"`
ProjectID string `json:"project_id"`
Index int `json:"index"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
ByteStart int `json:"byte_start"`
ByteEnd int `json:"byte_end"`
Text string `json:"text"`
TextTruncated bool `json:"text_truncated"`
}
type DiagnosticsSnapshot ¶
type DiagnosticsSnapshot struct {
Scheduler SchedulerDiagnostics `json:"scheduler"`
Watchers []WatchState `json:"watchers"`
Stages map[string]StageDiagnostic `json:"stages"`
GraphStorage []projectregistry.GraphStorageDiagnostic `json:"graph_storage,omitempty"`
SearchStorage []SearchStorageDiagnostic `json:"search_storage,omitempty"`
}
type DiagnosticsSource ¶
type DiagnosticsSource struct {
Scheduler *Scheduler
Orchestrator *Orchestrator
Service *Service
GraphStorage interface {
GraphStorageDiagnostics() []projectregistry.GraphStorageDiagnostic
}
SearchStorage interface {
SearchStorageDiagnostics() []SearchStorageDiagnostic
}
}
func (DiagnosticsSource) IngestionDiagnostics ¶
func (source DiagnosticsSource) IngestionDiagnostics() DiagnosticsSnapshot
type ExtractorCacheEntry ¶
type ExtractorCacheEntry struct {
ProjectID string
RelativePathHash string
ContentSHA256 string
ExtractorName string
ExtractorVersion string
ExtractorFingerprint string
Symbols []Symbol
Headings []Heading
References []Reference
Calls []Call
Implementations []Implementation
CreatedAt time.Time
UpdatedAt time.Time
}
type ExtractorFingerprintProvider ¶ added in v0.1.10
type ExtractorFingerprintProvider interface {
Fingerprint() string
}
type ExtractorName ¶
type ExtractorName string
const ( ExtractorGoStdlibAST ExtractorName = "go-stdlib-ast" ExtractorMarkdownHeading ExtractorName = "markdown-heading" ExtractorInfraLightweight ExtractorName = "infra-lightweight" )
const ( ExtractorTreeSitterJavaScript ExtractorName = "treesitter-javascript" ExtractorTreeSitterTypeScript ExtractorName = "treesitter-typescript" ExtractorTreeSitterTSX ExtractorName = "treesitter-tsx" ExtractorTreeSitterCSharp ExtractorName = "treesitter-csharp" ExtractorTreeSitterPython ExtractorName = "treesitter-python" ExtractorTreeSitterDart ExtractorName = "treesitter-dart" )
type ExtractorRegistry ¶
type ExtractorRegistry struct {
// contains filtered or unexported fields
}
func NewDefaultExtractorRegistry ¶
func NewDefaultExtractorRegistry() *ExtractorRegistry
func NewExtractorRegistry ¶
func NewExtractorRegistry(extractors ...Extractor) *ExtractorRegistry
func (*ExtractorRegistry) Extract ¶
func (registry *ExtractorRegistry) Extract(ctx context.Context, relative string, content []byte) (ExtractorResult, error)
func (*ExtractorRegistry) ExtractorFor ¶
func (registry *ExtractorRegistry) ExtractorFor(relative string) Extractor
func (*ExtractorRegistry) Validate ¶
func (registry *ExtractorRegistry) Validate() error
type ExtractorResult ¶
type ExtractorResult struct {
ExtractorName string
ExtractorVersion string
Symbols []Symbol
Headings []Heading
References []Reference
Calls []Call
Implementations []Implementation
}
func ParseGoFileSemantic ¶
func ParseGoFileSemantic(relativePath string, source []byte) (ExtractorResult, error)
type FileList ¶
type FileList struct {
Files []FileMetadata `json:"files"`
NextPageToken string `json:"next_page_token,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type FileMetadata ¶
type FileMetadata struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
RelativePath string `json:"relative_path,omitempty"`
Extension string `json:"extension,omitempty"`
Status string `json:"status"`
Present bool `json:"present"`
SizeBytes int64 `json:"size_bytes"`
ModifiedAt time.Time `json:"modified_at"`
SkippedReason string `json:"skipped_reason,omitempty"`
RelativePathOK bool `json:"relative_path_safe"`
}
func MetadataForFileState ¶
func MetadataForFileState(project projectregistry.Project, state FileState) FileMetadata
type FileOutline ¶
type FileOutline struct {
File FileMetadata `json:"file"`
Headings []HeadingMetadata `json:"headings,omitempty"`
Symbols []SymbolMetadata `json:"symbols,omitempty"`
SymbolsNextPageToken string `json:"symbols_next_page_token,omitempty"`
Chunks []OutlineChunkMetadata `json:"chunks,omitempty"`
}
type FileOutlineOptions ¶
type FileOutlineOptions struct {
SymbolFilter SymbolFilter
SymbolPagination Pagination
IncludeChunkText bool
MaxChunkBytes int
}
type FileSearchOptions ¶
type FileSearchOptions struct {
Extension string
PathPrefix string
PathContains string
CaseSensitive bool
PageSize int
PageToken string
}
func NormalizeFileSearchOptions ¶
func NormalizeFileSearchOptions(options FileSearchOptions) (FileSearchOptions, error)
type FileStateFilter ¶
type FileStateFilter struct {
Status FileStatus
Extension string
PathPrefix string
SkippedReason SkipReason
Present *bool
ModifiedSince time.Time
}
type FileStatus ¶
type FileStatus string
const ( FileStatusEligible FileStatus = "eligible" FileStatusSkipped FileStatus = "skipped" FileStatusAbsent FileStatus = "absent" )
type FileWatcher ¶
type FileWatcher interface {
Add(path string) error
Close() error
Events() <-chan WatchEvent
Errors() <-chan error
}
func NewFSNotifyWatcher ¶
func NewFSNotifyWatcher() (FileWatcher, error)
type Finding ¶
type Finding struct {
Code SkipReason
Category string
}
type GraphStore ¶
type GraphStore struct {
// contains filtered or unexported fields
}
func NewGraphStore ¶
func NewGraphStore(graph graphBackend) *GraphStore
func (*GraphStore) CountGraphChunks ¶ added in v0.1.6
func (store *GraphStore) CountGraphChunks(ctx context.Context, project projectregistry.Project) (int, error)
func (*GraphStore) CountGraphSymbols ¶ added in v0.1.6
func (store *GraphStore) CountGraphSymbols(ctx context.Context, project projectregistry.Project) (int, error)
func (*GraphStore) GetChunk ¶
func (store *GraphStore) GetChunk(ctx context.Context, project projectregistry.Project, fileID string, chunkID string, maxChunkBytes int) (ChunkMetadata, error)
func (*GraphStore) GetFile ¶
func (store *GraphStore) GetFile(ctx context.Context, project projectregistry.Project, fileID string) (FileMetadata, error)
func (*GraphStore) GetFileOutline ¶
func (store *GraphStore) GetFileOutline(ctx context.Context, project projectregistry.Project, fileID string, options FileOutlineOptions) (FileOutline, error)
func (*GraphStore) GetSymbol ¶
func (store *GraphStore) GetSymbol(ctx context.Context, project projectregistry.Project, symbolID string) (SymbolMetadata, error)
func (*GraphStore) GetSymbolCallGraph ¶
func (store *GraphStore) GetSymbolCallGraph(ctx context.Context, project projectregistry.Project, symbolID string, options CallGraphOptions) (SymbolCallGraph, error)
func (*GraphStore) GetSymbolSource ¶
func (store *GraphStore) GetSymbolSource(ctx context.Context, project projectregistry.Project, symbolID string, maxSourceBytes int) (SymbolSource, error)
func (*GraphStore) HasFileVersion ¶
func (store *GraphStore) HasFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
func (*GraphStore) ListChunks ¶
func (store *GraphStore) ListChunks(ctx context.Context, project projectregistry.Project, fileID string, pagination Pagination, maxChunkBytes int) (ChunkList, error)
func (*GraphStore) ListHeadings ¶
func (store *GraphStore) ListHeadings(ctx context.Context, project projectregistry.Project, fileID string, pagination Pagination) (HeadingList, error)
func (*GraphStore) ListSymbolCallees ¶
func (store *GraphStore) ListSymbolCallees(ctx context.Context, project projectregistry.Project, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*GraphStore) ListSymbolCallers ¶
func (store *GraphStore) ListSymbolCallers(ctx context.Context, project projectregistry.Project, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*GraphStore) ListSymbolImplementers ¶ added in v0.1.1
func (store *GraphStore) ListSymbolImplementers(ctx context.Context, project projectregistry.Project, symbolID string, pagination Pagination) (SymbolImplementationList, error)
func (*GraphStore) ListSymbolReferences ¶
func (store *GraphStore) ListSymbolReferences(ctx context.Context, project projectregistry.Project, symbolID string, pagination Pagination) (SymbolReferenceList, error)
func (*GraphStore) ListSymbols ¶
func (store *GraphStore) ListSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*GraphStore) PutEligibleFile ¶
func (store *GraphStore) PutEligibleFile(ctx context.Context, project projectregistry.Project, run Run, state FileState, chunks []Chunk, symbols []Symbol, references []Reference, calls []Call, implementations []Implementation, headings []Heading) error
func (*GraphStore) PutFileState ¶
func (store *GraphStore) PutFileState(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
func (*GraphStore) PutPreparedFilesBatch ¶
func (store *GraphStore) PutPreparedFilesBatch(ctx context.Context, project projectregistry.Project, run Run, files any) error
func (*GraphStore) PutRun ¶
func (store *GraphStore) PutRun(ctx context.Context, project projectregistry.Project, run Run) error
func (*GraphStore) PutSkippedFile ¶
func (store *GraphStore) PutSkippedFile(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
func (*GraphStore) PutUnchangedFile ¶
func (store *GraphStore) PutUnchangedFile(ctx context.Context, project projectregistry.Project, run Run, state FileState) error
func (*GraphStore) SearchCalls ¶
func (store *GraphStore) SearchCalls(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
func (*GraphStore) SearchReferences ¶
func (store *GraphStore) SearchReferences(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolReferenceList, error)
func (*GraphStore) SearchText ¶
func (store *GraphStore) SearchText(ctx context.Context, project projectregistry.Project, options TextSearchOptions) (TextSearchResultList, error)
func (*GraphStore) WithBatch ¶
func (store *GraphStore) WithBatch(ctx context.Context, fn func(*GraphStore) error) error
type Heading ¶
func ParseMarkdownHeadings ¶
type HeadingList ¶
type HeadingList struct {
Headings []HeadingMetadata `json:"headings"`
NextPageToken string `json:"next_page_token,omitempty"`
}
type HeadingMetadata ¶
type Implementation ¶ added in v0.1.1
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
func NewOrchestrator ¶
func NewOrchestrator(registry *projectregistry.Registry, ingestion ingestionRunner, options OrchestratorOptions) *Orchestrator
func (*Orchestrator) SetWatcherFactory ¶
func (orchestrator *Orchestrator) SetWatcherFactory(factory WatcherFactory)
func (*Orchestrator) WatchStates ¶
func (orchestrator *Orchestrator) WatchStates() []WatchState
type OrchestratorOptions ¶
type OutlineChunkMetadata ¶
type OutlineChunkMetadata struct {
ID string `json:"id"`
FileID string `json:"file_id"`
ProjectID string `json:"project_id"`
Index int `json:"index"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
ByteStart int `json:"byte_start"`
ByteEnd int `json:"byte_end"`
Text string `json:"text,omitempty"`
TextTruncated bool `json:"text_truncated,omitempty"`
}
type Pagination ¶
type PreparedGraphFile ¶
type PreparedSearchFile ¶
type ReferenceSearchOptions ¶
type ReferenceSearchOptions struct {
NameContains string
TargetNameContains string
CallerNameContains string
CalleeNameContains string
EnclosingContains string
Extension string
PathPrefix string
ResolutionStatus string
Confidence string
CaseSensitive bool
PageSize int
PageToken string
}
func NormalizeReferenceSearchOptions ¶
func NormalizeReferenceSearchOptions(options ReferenceSearchOptions) (ReferenceSearchOptions, error)
type Run ¶
type Run struct {
ID string
ProjectID string
Trigger Trigger
RunKind RunKind
Mode string
Status RunStatus
FilesSeen int
FilesIngested int
FilesSkipped int
FilesUnchanged int
ChunksStored int
SymbolsStored int
ErrorCategory string
ReasonCounts map[string]int
CurrentPhase string
StartedAt time.Time
FinishedAt time.Time
HeartbeatAt time.Time
LastProgressAt time.Time
}
type RunMetadata ¶
type RunMetadata struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Trigger string `json:"trigger"`
RunKind string `json:"run_kind,omitempty"`
Mode string `json:"mode"`
Status string `json:"status"`
FilesSeen int `json:"files_seen"`
FilesIngested int `json:"files_ingested"`
FilesSkipped int `json:"files_skipped"`
FilesUnchanged int `json:"files_unchanged"`
ChunksStored int `json:"chunks_stored"`
SymbolsStored int `json:"symbols_stored"`
ErrorCategory string `json:"error_category,omitempty"`
ReasonCounts map[string]int `json:"reason_counts,omitempty"`
CurrentPhase string `json:"current_phase,omitempty"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
HeartbeatAt time.Time `json:"heartbeat_at,omitempty"`
LastProgressAt time.Time `json:"last_progress_at,omitempty"`
}
func MetadataForRun ¶
func MetadataForRun(run Run) RunMetadata
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(db *sql.DB) *SQLiteStore
func (*SQLiteStore) ApplySearchFileBatch ¶
func (store *SQLiteStore) ApplySearchFileBatch(ctx context.Context, project projectregistry.Project, results []fullScanFileResult) error
func (*SQLiteStore) ClearSearchIndexDegraded ¶
func (store *SQLiteStore) ClearSearchIndexDegraded(ctx context.Context, projectID string) error
func (*SQLiteStore) ContextSearchIndexHealth ¶ added in v0.1.1
func (store *SQLiteStore) ContextSearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
func (*SQLiteStore) CountFileStates ¶ added in v0.1.1
func (store *SQLiteStore) CountFileStates(ctx context.Context, projectID string, filter FileStateFilter) (int, error)
func (*SQLiteStore) CountSearchChunks ¶ added in v0.1.1
func (store *SQLiteStore) CountSearchChunks(ctx context.Context, project projectregistry.Project) (int, error)
func (*SQLiteStore) CountSearchSymbols ¶ added in v0.1.1
func (store *SQLiteStore) CountSearchSymbols(ctx context.Context, project projectregistry.Project) (int, error)
func (*SQLiteStore) DeleteExtractorCacheForFile ¶
func (*SQLiteStore) DeleteSearchFile ¶
func (*SQLiteStore) DeleteSearchProject ¶
func (store *SQLiteStore) DeleteSearchProject(ctx context.Context, projectID string) error
func (*SQLiteStore) FailActiveRuns ¶
func (*SQLiteStore) GetExtractorCache ¶
func (store *SQLiteStore) GetExtractorCache(ctx context.Context, projectID string, relativePathHash string, contentSHA256 string, extractorName string, extractorVersion string) (ExtractorCacheEntry, error)
func (*SQLiteStore) GetExtractorCacheWithFingerprint ¶ added in v0.1.10
func (*SQLiteStore) GetFileStateByHash ¶
func (*SQLiteStore) HasSearchFileVersion ¶
func (store *SQLiteStore) HasSearchFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
func (*SQLiteStore) ListActiveRuns ¶
func (*SQLiteStore) ListFileStates ¶
func (store *SQLiteStore) ListFileStates(ctx context.Context, projectID string, filter FileStateFilter) ([]FileState, error)
func (*SQLiteStore) ListFileStatesPage ¶
func (store *SQLiteStore) ListFileStatesPage(ctx context.Context, projectID string, filter FileStateFilter, pagination Pagination) ([]FileState, string, error)
func (*SQLiteStore) ListLatestRuns ¶
func (*SQLiteStore) MarkSearchIndexDegraded ¶
func (*SQLiteStore) ReconcileSearchIndex ¶
func (store *SQLiteStore) ReconcileSearchIndex(ctx context.Context, project projectregistry.Project) ([]FileState, error)
func (*SQLiteStore) SaveExtractorCache ¶
func (store *SQLiteStore) SaveExtractorCache(ctx context.Context, entry ExtractorCacheEntry) error
func (*SQLiteStore) SaveFileState ¶
func (store *SQLiteStore) SaveFileState(ctx context.Context, state FileState) error
func (*SQLiteStore) SaveFileStatesBatch ¶
func (store *SQLiteStore) SaveFileStatesBatch(ctx context.Context, states []FileState) error
func (*SQLiteStore) SearchCalls ¶
func (store *SQLiteStore) SearchCalls(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
func (*SQLiteStore) SearchFiles ¶
func (store *SQLiteStore) SearchFiles(ctx context.Context, project projectregistry.Project, options FileSearchOptions) (FileList, error)
func (*SQLiteStore) SearchIndexHealth ¶
func (store *SQLiteStore) SearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
func (*SQLiteStore) SearchReferences ¶
func (store *SQLiteStore) SearchReferences(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolReferenceList, error)
func (*SQLiteStore) SearchSymbols ¶
func (store *SQLiteStore) SearchSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*SQLiteStore) SearchText ¶
func (store *SQLiteStore) SearchText(ctx context.Context, project projectregistry.Project, options TextSearchOptions) (TextSearchResultList, error)
func (*SQLiteStore) SearchWriteDiagnostics ¶ added in v0.1.5
func (store *SQLiteStore) SearchWriteDiagnostics(projectID string) SearchWriteDiagnostic
func (*SQLiteStore) SetSearchStateStore ¶ added in v0.1.3
func (store *SQLiteStore) SetSearchStateStore(state searchStateStore)
func (*SQLiteStore) UpdateSearchFileMetadata ¶
func (store *SQLiteStore) UpdateSearchFileMetadata(ctx context.Context, project projectregistry.Project, state FileState) error
func (*SQLiteStore) UpdateSearchFileMetadataBatch ¶
func (store *SQLiteStore) UpdateSearchFileMetadataBatch(ctx context.Context, project projectregistry.Project, states []FileState) error
func (*SQLiteStore) UpsertSearchFile ¶
func (*SQLiteStore) UpsertSearchFilesBatch ¶
func (store *SQLiteStore) UpsertSearchFilesBatch(ctx context.Context, project projectregistry.Project, files []PreparedSearchFile) error
type SafetyOptions ¶
func DefaultSafetyOptions ¶
func DefaultSafetyOptions() SafetyOptions
type SafetyResult ¶
type SafetyResult struct {
Eligible bool
RelativePath string
RelativePathSafe bool
Reason SkipReason
SizeBytes int64
}
func EvaluateSafety ¶
func EvaluateSafety(relativePath string, content []byte, options SafetyOptions) SafetyResult
func EvaluateWorkspaceSafety ¶ added in v0.1.13
func EvaluateWorkspaceSafety(relativePath string, content []byte, options WorkspaceSafetyOptions) SafetyResult
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(runner ingestionRunner, options SchedulerOptions) *Scheduler
func (*Scheduler) ContextSearchIndexHealth ¶ added in v0.1.1
func (*Scheduler) Diagnostics ¶
func (scheduler *Scheduler) Diagnostics() SchedulerDiagnostics
func (*Scheduler) EligibleFileCount ¶ added in v0.1.6
func (*Scheduler) GetFileOutline ¶
func (scheduler *Scheduler) GetFileOutline(ctx context.Context, projectID string, fileID string, options FileOutlineOptions) (FileOutline, error)
func (*Scheduler) GetSymbolCallGraph ¶
func (scheduler *Scheduler) GetSymbolCallGraph(ctx context.Context, projectID string, symbolID string, options CallGraphOptions) (SymbolCallGraph, error)
func (*Scheduler) GetSymbolSource ¶
func (scheduler *Scheduler) GetSymbolSource(ctx context.Context, projectID string, symbolID string, options SymbolSourceOptions) (SymbolSource, error)
func (*Scheduler) IndexedChunkCount ¶ added in v0.1.6
func (*Scheduler) IndexedSymbolCount ¶ added in v0.1.6
func (*Scheduler) IngestPath ¶
func (*Scheduler) IngestProject ¶
func (*Scheduler) LatestRunMetadata ¶
func (*Scheduler) ListASTQueries ¶
func (*Scheduler) ListChunks ¶
func (*Scheduler) ListFiles ¶
func (scheduler *Scheduler) ListFiles(ctx context.Context, projectID string, filter FileStateFilter, pagination Pagination) (FileList, error)
func (*Scheduler) ListHeadings ¶
func (scheduler *Scheduler) ListHeadings(ctx context.Context, projectID string, fileID string, pagination Pagination) (HeadingList, error)
func (*Scheduler) ListSymbolCallees ¶
func (scheduler *Scheduler) ListSymbolCallees(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*Scheduler) ListSymbolCallers ¶
func (scheduler *Scheduler) ListSymbolCallers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*Scheduler) ListSymbolImplementers ¶ added in v0.1.1
func (scheduler *Scheduler) ListSymbolImplementers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolImplementationList, error)
func (*Scheduler) ListSymbolReferences ¶
func (scheduler *Scheduler) ListSymbolReferences(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolReferenceList, error)
func (*Scheduler) ListSymbols ¶
func (scheduler *Scheduler) ListSymbols(ctx context.Context, projectID string, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*Scheduler) RebuildSearchIndex ¶
func (*Scheduler) RunMetadata ¶
func (*Scheduler) SearchAST ¶
func (scheduler *Scheduler) SearchAST(ctx context.Context, projectID string, options ASTSearchOptions) (ASTSearchResultList, error)
func (*Scheduler) SearchCalls ¶
func (scheduler *Scheduler) SearchCalls(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
func (*Scheduler) SearchFiles ¶
func (*Scheduler) SearchIndexHealth ¶ added in v0.1.1
func (*Scheduler) SearchReferences ¶
func (scheduler *Scheduler) SearchReferences(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolReferenceList, error)
func (*Scheduler) SearchSymbols ¶
func (scheduler *Scheduler) SearchSymbols(ctx context.Context, projectID string, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*Scheduler) SearchText ¶
func (scheduler *Scheduler) SearchText(ctx context.Context, projectID string, options TextSearchOptions) (TextSearchResultList, error)
func (*Scheduler) SubmitFullScan ¶
func (*Scheduler) SubmitFullScanAsync ¶
func (*Scheduler) SubmitIngestProject ¶
func (*Scheduler) SubmitPath ¶
type SchedulerDiagnostics ¶
type SchedulerOptions ¶
type SearchIndexHealth ¶
type SearchIndexMetadata ¶
type SearchQueryDiagnostic ¶ added in v0.1.10
type SearchStorageDiagnostic ¶ added in v0.1.3
type SearchStorageDiagnostic struct {
ProjectID string `json:"project_id"`
Backend string `json:"backend"`
StorageKey string `json:"storage_key,omitempty"`
Write *SearchWriteDiagnostic `json:"write,omitempty"`
}
type SearchStoreBackend ¶ added in v0.1.3
type SearchStoreRouter ¶ added in v0.1.3
type SearchStoreRouter struct {
// contains filtered or unexported fields
}
func NewProjectScopedSearchStoreRouter ¶ added in v0.1.3
func NewProjectScopedSearchStoreRouter(registry *projectregistry.Registry, fallback any, backends []SearchStoreBackend) *SearchStoreRouter
func (*SearchStoreRouter) ApplySearchFileBatch ¶ added in v0.1.3
func (router *SearchStoreRouter) ApplySearchFileBatch(ctx context.Context, project projectregistry.Project, results []fullScanFileResult) error
func (*SearchStoreRouter) ClearSearchIndexDegraded ¶ added in v0.1.3
func (router *SearchStoreRouter) ClearSearchIndexDegraded(ctx context.Context, projectID string) error
func (*SearchStoreRouter) ContextSearchIndexHealth ¶ added in v0.1.3
func (router *SearchStoreRouter) ContextSearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
func (*SearchStoreRouter) CountSearchChunks ¶ added in v0.1.3
func (router *SearchStoreRouter) CountSearchChunks(ctx context.Context, project projectregistry.Project) (int, error)
func (*SearchStoreRouter) CountSearchSymbols ¶ added in v0.1.3
func (router *SearchStoreRouter) CountSearchSymbols(ctx context.Context, project projectregistry.Project) (int, error)
func (*SearchStoreRouter) DeleteSearchFile ¶ added in v0.1.3
func (*SearchStoreRouter) DeleteSearchProject ¶ added in v0.1.3
func (router *SearchStoreRouter) DeleteSearchProject(ctx context.Context, projectID string) error
func (*SearchStoreRouter) HasSearchFileVersion ¶ added in v0.1.3
func (router *SearchStoreRouter) HasSearchFileVersion(ctx context.Context, project projectregistry.Project, state FileState) (bool, error)
func (*SearchStoreRouter) MarkSearchIndexDegraded ¶ added in v0.1.3
func (*SearchStoreRouter) ReconcileSearchIndex ¶ added in v0.1.3
func (router *SearchStoreRouter) ReconcileSearchIndex(ctx context.Context, project projectregistry.Project) ([]FileState, error)
func (*SearchStoreRouter) SearchCalls ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchCalls(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
func (*SearchStoreRouter) SearchFiles ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchFiles(ctx context.Context, project projectregistry.Project, options FileSearchOptions) (FileList, error)
func (*SearchStoreRouter) SearchIndexHealth ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchIndexHealth(ctx context.Context, project projectregistry.Project) (SearchIndexHealth, error)
func (*SearchStoreRouter) SearchReferences ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchReferences(ctx context.Context, project projectregistry.Project, options ReferenceSearchOptions) (SymbolReferenceList, error)
func (*SearchStoreRouter) SearchStorageDiagnostics ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchStorageDiagnostics() []SearchStorageDiagnostic
func (*SearchStoreRouter) SearchSymbols ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchSymbols(ctx context.Context, project projectregistry.Project, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*SearchStoreRouter) SearchText ¶ added in v0.1.3
func (router *SearchStoreRouter) SearchText(ctx context.Context, project projectregistry.Project, options TextSearchOptions) (TextSearchResultList, error)
func (*SearchStoreRouter) UpdateSearchFileMetadata ¶ added in v0.1.3
func (router *SearchStoreRouter) UpdateSearchFileMetadata(ctx context.Context, project projectregistry.Project, state FileState) error
func (*SearchStoreRouter) UpdateSearchFileMetadataBatch ¶ added in v0.1.3
func (router *SearchStoreRouter) UpdateSearchFileMetadataBatch(ctx context.Context, project projectregistry.Project, states []FileState) error
func (*SearchStoreRouter) UpsertSearchFile ¶ added in v0.1.3
func (*SearchStoreRouter) UpsertSearchFilesBatch ¶ added in v0.1.3
func (router *SearchStoreRouter) UpsertSearchFilesBatch(ctx context.Context, project projectregistry.Project, files []PreparedSearchFile) error
type SearchWriteDiagnostic ¶ added in v0.1.5
type SearchWriteDiagnostic struct {
TransactionCount int64 `json:"transaction_count"`
MaxWriteWeight int `json:"max_write_weight,omitempty"`
RowsInserted map[string]int64 `json:"rows_inserted,omitempty"`
DeleteStatements map[string]int64 `json:"delete_statements,omitempty"`
FTSRewriteSkipped int64 `json:"fts_rewrite_skipped,omitempty"`
Query SearchQueryDiagnostic `json:"query,omitempty"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(registry *projectregistry.Registry, graph *GraphStore, state stateStore) *Service
func (*Service) ActiveRunMetadata ¶ added in v0.1.1
func (*Service) ContextSearchIndexHealth ¶ added in v0.1.1
func (*Service) Diagnostics ¶
func (svc *Service) Diagnostics() map[string]StageDiagnostic
func (*Service) EligibleFileCount ¶ added in v0.1.1
func (*Service) ExecutePreparedProjectRun ¶
func (*Service) ExecutePreparedSearchIndexRebuild ¶
func (*Service) FailInterruptedRuns ¶
func (*Service) FailPreparedProjectRun ¶
func (*Service) GetFileOutline ¶
func (svc *Service) GetFileOutline(ctx context.Context, projectID string, fileID string, options FileOutlineOptions) (FileOutline, error)
func (*Service) GetSymbolCallGraph ¶
func (svc *Service) GetSymbolCallGraph(ctx context.Context, projectID string, symbolID string, options CallGraphOptions) (SymbolCallGraph, error)
func (*Service) GetSymbolSource ¶
func (svc *Service) GetSymbolSource(ctx context.Context, projectID string, symbolID string, options SymbolSourceOptions) (SymbolSource, error)
func (*Service) IndexedChunkCount ¶ added in v0.1.1
func (*Service) IndexedSymbolCount ¶ added in v0.1.1
func (*Service) IngestPath ¶
func (*Service) IngestProject ¶
func (*Service) LatestRunMetadata ¶
func (*Service) ListASTQueries ¶
func (*Service) ListChunks ¶
func (*Service) ListFileStates ¶
func (*Service) ListFiles ¶
func (svc *Service) ListFiles(ctx context.Context, projectID string, filter FileStateFilter, pagination Pagination) (FileList, error)
func (*Service) ListHeadings ¶
func (svc *Service) ListHeadings(ctx context.Context, projectID string, fileID string, pagination Pagination) (HeadingList, error)
func (*Service) ListSymbolCallees ¶
func (svc *Service) ListSymbolCallees(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*Service) ListSymbolCallers ¶
func (svc *Service) ListSymbolCallers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolCallEdgeList, error)
func (*Service) ListSymbolImplementers ¶ added in v0.1.1
func (svc *Service) ListSymbolImplementers(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolImplementationList, error)
func (*Service) ListSymbolReferences ¶
func (svc *Service) ListSymbolReferences(ctx context.Context, projectID string, symbolID string, pagination Pagination) (SymbolReferenceList, error)
func (*Service) ListSymbols ¶
func (svc *Service) ListSymbols(ctx context.Context, projectID string, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*Service) PrepareProjectRun ¶
func (*Service) RebuildSearchIndex ¶
func (*Service) RunMetadata ¶
func (*Service) SearchAST ¶
func (svc *Service) SearchAST(ctx context.Context, projectID string, options ASTSearchOptions) (ASTSearchResultList, error)
func (*Service) SearchCalls ¶
func (svc *Service) SearchCalls(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolCallEdgeList, error)
func (*Service) SearchFiles ¶
func (*Service) SearchIndexHealth ¶ added in v0.1.1
func (*Service) SearchReferences ¶
func (svc *Service) SearchReferences(ctx context.Context, projectID string, options ReferenceSearchOptions) (SymbolReferenceList, error)
func (*Service) SearchSymbols ¶
func (svc *Service) SearchSymbols(ctx context.Context, projectID string, filter SymbolFilter, pagination Pagination) (SymbolList, error)
func (*Service) SearchText ¶
func (svc *Service) SearchText(ctx context.Context, projectID string, options TextSearchOptions) (TextSearchResultList, error)
func (*Service) SetCheckpointFunc ¶
func (*Service) SetExtractorCacheEnabled ¶
func (*Service) SetFullScanBatchSize ¶
func (*Service) SetFullScanWorkerCount ¶
func (*Service) SetFullScanWorkerLimits ¶
func (*Service) SetPolicyRecorder ¶ added in v0.1.12
func (svc *Service) SetPolicyRecorder(recorder *agentactivity.Recorder)
func (*Service) SetSearchStore ¶ added in v0.1.3
func (*Service) SubmitIngestProject ¶
type SkipReason ¶
type SkipReason string
const ( SkipReasonNone SkipReason = "" SkipReasonUnsafePath SkipReason = "unsafe_path" SkipReasonDeniedPath SkipReason = "denied_path" SkipReasonFileTooLarge SkipReason = "file_too_large" SkipReasonSemanticTooLarge SkipReason = "semantic_too_large" SkipReasonBinaryContent SkipReason = "binary_content" SkipReasonNULByte SkipReason = "nul_byte" SkipReasonInvalidUTF8 SkipReason = "invalid_utf8" SkipReasonSensitiveContent SkipReason = "sensitive_content" SkipReasonUnsupportedPolicy SkipReason = "unsupported_policy" SkipReasonStatError SkipReason = "stat_error" SkipReasonReadError SkipReason = "read_error" SkipReasonChunkError SkipReason = "chunk_error" SkipReasonParseError SkipReason = "parse_error" )
type StageDiagnostic ¶
type StageDiagnostic struct {
Count int64 `json:"count"`
TotalMillis int64 `json:"total_ms"`
MaxMillis int64 `json:"max_ms"`
LastMillis int64 `json:"last_ms"`
LastSeenUnix int64 `json:"last_seen_unix,omitempty"`
ErrorCount int64 `json:"error_count,omitempty"`
LastErrorUnix int64 `json:"last_error_unix,omitempty"`
LastError string `json:"last_error,omitempty"`
}
type Symbol ¶
type Symbol struct {
Kind SymbolKind
Name string
PackageName string
ImportPath string
Receiver string
StartLine int
EndLine int
StartByte int
EndByte int
StartColumn int
EndColumn int
}
func ParseConfigTopLevelKeys ¶
func ParseDockerfileSymbols ¶
func ParseJSONTopLevelKeys ¶
func ParseMakefileSymbols ¶
func ParseOpenAPIPathSymbols ¶
func ParseUnityAsmdefSymbols ¶ added in v0.1.10
type SymbolCallEdge ¶
type SymbolCallEdge struct {
ID string `json:"id"`
CallID string `json:"call_id,omitempty"`
FileID string `json:"file_id,omitempty"`
ProjectID string `json:"project_id"`
CallerSymbolID string `json:"caller_symbol_id"`
CalleeSymbolID string `json:"callee_symbol_id"`
CallerName string `json:"caller_name,omitempty"`
CalleeName string `json:"callee_name,omitempty"`
Receiver string `json:"receiver,omitempty"`
ImportPath string `json:"import_path,omitempty"`
StartLine int `json:"start_line,omitempty"`
EndLine int `json:"end_line,omitempty"`
StartByte int `json:"start_byte,omitempty"`
EndByte int `json:"end_byte,omitempty"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
ResolutionStatus string `json:"resolution_status"`
Confidence string `json:"confidence,omitempty"`
}
type SymbolCallEdgeList ¶
type SymbolCallEdgeList struct {
Symbol SymbolMetadata `json:"symbol"`
Edges []SymbolCallEdge `json:"edges"`
NextPageToken string `json:"next_page_token,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type SymbolCallGraph ¶
type SymbolCallGraph struct {
Symbol SymbolMetadata `json:"symbol"`
Direction string `json:"direction"`
MaxDepth int `json:"max_depth"`
MaxNodes int `json:"max_nodes"`
Nodes []SymbolMetadata `json:"nodes"`
Edges []SymbolCallEdge `json:"edges"`
Truncated bool `json:"truncated"`
}
type SymbolFilter ¶
type SymbolFilter struct {
Kind SymbolKind
NamePrefix string
NameContains string
FileID string
Extension string
Package string
Receiver string
CaseSensitive bool
}
func NormalizeSymbolFilter ¶
func NormalizeSymbolFilter(filter SymbolFilter) (SymbolFilter, error)
type SymbolImplementation ¶ added in v0.1.1
type SymbolImplementation struct {
ID string `json:"id"`
FileID string `json:"file_id,omitempty"`
ProjectID string `json:"project_id"`
Kind string `json:"kind"`
ImplementerSymbolID string `json:"implementer_symbol_id,omitempty"`
ImplementedSymbolID string `json:"implemented_symbol_id,omitempty"`
ImplementerName string `json:"implementer_name,omitempty"`
ImplementedName string `json:"implemented_name,omitempty"`
PackageName string `json:"package,omitempty"`
Receiver string `json:"receiver,omitempty"`
ImportPath string `json:"import_path,omitempty"`
StartLine int `json:"start_line,omitempty"`
EndLine int `json:"end_line,omitempty"`
StartByte int `json:"start_byte,omitempty"`
EndByte int `json:"end_byte,omitempty"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
ResolutionStatus string `json:"resolution_status"`
Confidence string `json:"confidence,omitempty"`
}
type SymbolImplementationList ¶ added in v0.1.1
type SymbolImplementationList struct {
Symbol SymbolMetadata `json:"symbol"`
Implementations []SymbolImplementation `json:"implementations"`
NextPageToken string `json:"next_page_token,omitempty"`
}
type SymbolKind ¶
type SymbolKind string
const ( SymbolKindPackage SymbolKind = "package" SymbolKindImport SymbolKind = "import" SymbolKindFunction SymbolKind = "function" SymbolKindMethod SymbolKind = "method" SymbolKindType SymbolKind = "type" SymbolKindClass SymbolKind = "class" SymbolKindExport SymbolKind = "export" SymbolKindFlutterWidget SymbolKind = "flutter_widget" SymbolKindFlutterState SymbolKind = "flutter_state" SymbolKindFlutterBuildMethod SymbolKind = "flutter_build_method" SymbolKindStage SymbolKind = "stage" SymbolKindTarget SymbolKind = "target" SymbolKindPath SymbolKind = "path" SymbolKindKey SymbolKind = "key" SymbolKindMigration SymbolKind = "migration" SymbolKindAssembly SymbolKind = "assembly" )
type SymbolList ¶
type SymbolList struct {
Symbols []SymbolMetadata `json:"symbols"`
NextPageToken string `json:"next_page_token,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type SymbolMetadata ¶
type SymbolMetadata struct {
ID string `json:"id"`
FileID string `json:"file_id"`
ProjectID string `json:"project_id"`
Kind string `json:"kind"`
Name string `json:"name"`
RelativePath string `json:"relative_path,omitempty"`
Extension string `json:"extension,omitempty"`
PackageName string `json:"package,omitempty"`
ImportPath string `json:"import_path,omitempty"`
Receiver string `json:"receiver,omitempty"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
StartByte int `json:"start_byte,omitempty"`
EndByte int `json:"end_byte,omitempty"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
}
type SymbolReferenceList ¶
type SymbolReferenceList struct {
Symbol SymbolMetadata `json:"symbol"`
References []SymbolReferenceMetadata `json:"references"`
NextPageToken string `json:"next_page_token,omitempty"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type SymbolReferenceMetadata ¶
type SymbolReferenceMetadata struct {
ID string `json:"id"`
FileID string `json:"file_id"`
ProjectID string `json:"project_id"`
Kind string `json:"kind"`
Name string `json:"name"`
TargetName string `json:"target_name,omitempty"`
TargetSymbolID string `json:"target_symbol_id,omitempty"`
PackageName string `json:"package,omitempty"`
Receiver string `json:"receiver,omitempty"`
ImportPath string `json:"import_path,omitempty"`
EnclosingSymbolID string `json:"enclosing_symbol_id,omitempty"`
EnclosingSymbolName string `json:"enclosing_symbol_name,omitempty"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
StartByte int `json:"start_byte,omitempty"`
EndByte int `json:"end_byte,omitempty"`
StartColumn int `json:"start_column,omitempty"`
EndColumn int `json:"end_column,omitempty"`
ResolutionStatus string `json:"resolution_status"`
Confidence string `json:"confidence,omitempty"`
}
type SymbolSource ¶
type SymbolSource struct {
Symbol SymbolMetadata `json:"symbol"`
Text string `json:"text"`
TextTruncated bool `json:"text_truncated"`
MaxBytes int `json:"max_bytes"`
}
type SymbolSourceOptions ¶
type SymbolSourceOptions struct {
MaxSourceBytes int
}
type TextSearchOptions ¶
type TextSearchOptions struct {
Query string
Mode string
CaseSensitive bool
Extension string
PathPrefix string
PageSize int
PageToken string
MaxSnippetBytes int
MaxMatches int
}
func NormalizeTextSearchOptions ¶
func NormalizeTextSearchOptions(options TextSearchOptions) (TextSearchOptions, error)
type TextSearchResult ¶
type TextSearchResult struct {
File FileMetadata `json:"file"`
Chunk ChunkMetadata `json:"chunk"`
LineStart int `json:"line_start"`
LineEnd int `json:"line_end"`
ByteStart int `json:"byte_start"`
ByteEnd int `json:"byte_end"`
Snippet string `json:"snippet"`
SnippetTruncated bool `json:"snippet_truncated"`
}
type TextSearchResultList ¶
type TextSearchResultList struct {
Results []TextSearchResult `json:"results"`
NextPageToken string `json:"next_page_token,omitempty"`
MaxSnippetBytes int `json:"max_snippet_bytes"`
Index *SearchIndexMetadata `json:"index,omitempty"`
}
type WatchEvent ¶
type WatchState ¶
type WatchState struct {
ProjectID string
Status string
WatchedDirectoryCount int
SkippedDirectoryCount int
FailedDirectoryCount int
QueueDepth int
EventQueueDepth int
TaskQueueDepth int
RescanQueueDepth int
OldestEventAgeMillis int64
CoalescedEventCount uint64
DroppedEventCount uint64
LastErrorCategory string
UpdatedAt time.Time
}
type WatcherFactory ¶
type WatcherFactory func() (FileWatcher, error)
type WorkspaceSafetyOptions ¶ added in v0.1.13
Source Files
¶
- chunker.go
- extractor.go
- graph_store.go
- model.go
- orchestrator.go
- parser_go.go
- parser_infra.go
- parser_markdown.go
- query.go
- safety.go
- safety_structured.go
- scheduler.go
- search_router.go
- search_store.go
- semantic_helpers.go
- sensitive_stream.go
- service.go
- sqlite_store.go
- treesitter_dart.go
- treesitter_extractor.go
- treesitter_search.go
- treesitter_search_queries.go
- watcher.go
Click to show internal directories.
Click to hide internal directories.