Documentation
¶
Index ¶
Constants ¶
View Source
const ( DiagnosticLevelInfo = "info" DiagnosticLevelWarn = "warn" DiagnosticLevelError = "error" )
Diagnostic levels
View Source
const ( ConfigSchemaVersion = 1 IndexSchemaVersion = 1 ProtocolVersion = 1 )
Version constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Diagnostic ¶
type Diagnostic struct {
Level string // "info", "warn", or "error"
Code string
Message string
Span Span
}
Diagnostic represents a parse error or warning
type EdgeType ¶
type EdgeType string
const DefaultEdgeType EdgeType = "related-to"
DefaultEdgeType is used when no edge type is specified in a link
type Frontmatter ¶
type Frontmatter struct {
ID NoteID
Type TypeName
Key Key
Created time.Time
Updated time.Time
Title string
Tags []string
State string
// Extra preserves unknown fields from YAML frontmatter
Extra map[string]any
}
Frontmatter represents the YAML frontmatter of a note
type Note ¶
type Note struct {
FM Frontmatter
Path string
Body string
RawLinks []RawLink
Diags []Diagnostic
}
Note represents a complete parsed note
type RawLink ¶
type RawLink struct {
Source TypeKey
Target RawTarget
EdgeType EdgeType
Span Span
ResolvedToID *NoteID // Set during indexing when link is resolved (Phase 2+)
}
RawLink represents a link extracted from note body
type RawTarget ¶
type RawTarget struct {
// Type is nil if unqualified (e.g., [[key]] vs [[type:key]])
Type *TypeName
Key Key
// Label is reserved for future use
Label *string
}
RawTarget represents a link target (may be unresolved)
type Span ¶
type Span struct {
Path string
StartByte int
EndByte int
StartLine int // optional in v0
StartCol int // optional in v0
}
Span represents a location in source code
Click to show internal directories.
Click to hide internal directories.