Documentation
¶
Overview ¶
Package cli implements the command-line interface.
Package cli implements the command-line interface.
Package cli implements the command-line interface.
Package cli implements the command-line interface.
Package cli implements the command-line interface.
Package cli implements the command-line interface. This file provides pipe-friendly output helpers for commands that return lists.
Package cli implements the command-line interface. This file defines shared JSON result types for consistent CLI output.
Package cli implements the command-line interface.
Package cli implements the command-line interface.
Index ¶
- Constants
- func Execute() error
- func IsAmbiguousRef(err error) bool
- func IsEmbeddedID(id string) bool
- func IsPipedOutput() bool
- func IsRefNotFound(err error) bool
- func PrintBulkPreview(preview *BulkPreview)
- func PrintBulkSummary(summary *BulkSummary)
- func ReadIDsFromStdin() (ids []string, embedded []string, err error)
- func ReadTraitIDsFromStdin() (ids []string, err error)
- func ResolveReferenceToFile(reference string, opts ResolveOptions) (string, error)
- func ResolveReferenceToObjectID(reference string, opts ResolveOptions) (string, error)
- func SetPipeFormat(usePipe *bool)
- func ShouldUsePipeFormat() bool
- func TruncateContent(content string, maxLen int) string
- func WritePipeableIDs(w io.Writer, items []PipeableItem)
- func WritePipeableList(w io.Writer, items []PipeableItem)
- type AmbiguousRefError
- type BulkOperation
- type BulkPreview
- type BulkPreviewItem
- type BulkResult
- type BulkSummary
- type CaptureResult
- type CheckIssueJSON
- type CheckResultJSON
- type CheckScopeJSON
- type CheckSummaryJSON
- type CommandSchema
- type CoreTypeSchema
- type CreateResult
- type DeleteResult
- type ErrorInfo
- type FieldRenameChange
- type FieldRenameConflict
- type FieldSchema
- type FieldTypeValidation
- type FileLine
- type FileResult
- type FlagSchema
- type Meta
- type MoveResult
- type PipeableItem
- type QueryResult
- type ReclassifyResult
- type RefNotFoundError
- type ResolveOptions
- type ResolveResult
- type Response
- type SavedQueryInfo
- type SchemaResult
- type StatsResult
- type TemplateSchema
- type TraitBulkPreview
- type TraitBulkPreviewItem
- type TraitBulkResult
- type TraitBulkSummary
- type TraitSchema
- type TypeQueryResult
- type TypeRenameChange
- type TypeSchema
- type TypeSummary
- type Warning
Constants ¶
const ( WarnEmbeddedSkipped = "embedded_skipped" WarnObjectNotFound = "object_not_found" WarnFieldNotInSchema = "field_not_in_schema" )
Warning codes for bulk operations
const ( // Vault errors ErrVaultNotFound = "VAULT_NOT_FOUND" ErrVaultNotSpecified = "VAULT_NOT_SPECIFIED" ErrConfigInvalid = "CONFIG_INVALID" // Schema errors ErrSchemaNotFound = "SCHEMA_NOT_FOUND" ErrSchemaInvalid = "SCHEMA_INVALID" ErrTypeNotFound = "TYPE_NOT_FOUND" ErrTraitNotFound = "TRAIT_NOT_FOUND" ErrFieldNotFound = "FIELD_NOT_FOUND" // Object errors ErrObjectNotFound = "OBJECT_NOT_FOUND" ErrObjectExists = "OBJECT_EXISTS" ErrObjectInvalid = "OBJECT_INVALID" // Reference errors ErrRefNotFound = "REF_NOT_FOUND" ErrRefInvalid = "REF_INVALID" ErrRefAmbiguous = "REF_AMBIGUOUS" // File errors ErrFileNotFound = "FILE_NOT_FOUND" ErrFileExists = "FILE_EXISTS" ErrFileReadError = "FILE_READ_ERROR" ErrFileWriteError = "FILE_WRITE_ERROR" ErrFileOutsideVault = "FILE_OUTSIDE_VAULT" // Database errors ErrDatabaseError = "DATABASE_ERROR" ErrDatabaseVersion = "DATABASE_VERSION_MISMATCH" // Validation errors ErrValidationFailed = "VALIDATION_FAILED" ErrRequiredField = "REQUIRED_FIELD_MISSING" ErrInvalidValue = "INVALID_VALUE" ErrUnknownField = "UNKNOWN_FIELD" // Query errors ErrQueryNotFound = "QUERY_NOT_FOUND" ErrQueryInvalid = "QUERY_INVALID" ErrDuplicateName = "DUPLICATE_NAME" // Input errors ErrInvalidInput = "INVALID_INPUT" ErrMissingArgument = "MISSING_ARGUMENT" // Workflow errors ErrWorkflowNotFound = "WORKFLOW_NOT_FOUND" ErrWorkflowInvalid = "WORKFLOW_INVALID" ErrWorkflowChanged = "WORKFLOW_CHANGED" ErrWorkflowRunNotFound = "WORKFLOW_RUN_NOT_FOUND" ErrWorkflowNotAwaitingAgent = "WORKFLOW_NOT_AWAITING_AGENT" ErrWorkflowTerminalState = "WORKFLOW_TERMINAL_STATE" ErrWorkflowConflict = "WORKFLOW_CONFLICT" ErrWorkflowStateCorrupt = "WORKFLOW_STATE_CORRUPT" ErrWorkflowInputInvalid = "WORKFLOW_INPUT_INVALID" ErrWorkflowAgentOutputInvalid = "WORKFLOW_AGENT_OUTPUT_INVALID" ErrWorkflowInterpolationError = "WORKFLOW_INTERPOLATION_ERROR" ErrWorkflowToolExecutionFailed = "WORKFLOW_TOOL_EXECUTION_FAILED" // Skill errors ErrSkillNotFound = "SKILL_NOT_FOUND" ErrSkillNotInstalled = "SKILL_NOT_INSTALLED" ErrSkillTargetUnsupported = "SKILL_TARGET_UNSUPPORTED" ErrSkillInstallConflict = "SKILL_INSTALL_CONFLICT" ErrSkillRenderFailed = "SKILL_RENDER_FAILED" ErrSkillPathUnresolved = "SKILL_PATH_UNRESOLVED" ErrSkillReceiptInvalid = "SKILL_RECEIPT_INVALID" // MCP client errors ErrMCPClientInvalid = "MCP_CLIENT_INVALID" ErrMCPConfigWriteError = "MCP_CONFIG_WRITE_ERROR" // General errors ErrInternal = "INTERNAL_ERROR" ErrNotImplemented = "NOT_IMPLEMENTED" // Schema modification errors ErrDataIntegrityBlock = "DATA_INTEGRITY_BLOCK" ErrConfirmationRequired = "CONFIRMATION_REQUIRED" ErrFileDoesNotExist = "FILE_DOES_NOT_EXIST" ErrRequiredFieldMissing = "REQUIRED_FIELD_MISSING" )
Error codes for structured error responses. These codes are stable and can be relied upon by agents.
const ( WarnRefNotFound = "REF_NOT_FOUND" WarnDeprecated = "DEPRECATED" WarnSchemaOutdated = "SCHEMA_OUTDATED" WarnDatabaseOutdated = "DATABASE_OUTDATED" WarnIndexUpdateFailed = "INDEX_UPDATE_FAILED" WarnDocsFetchFailed = "DOCS_FETCH_FAILED" WarnMisuse = "WRONG_COMMAND" WarnMissingField = "MISSING_REQUIRED_FIELD" WarnBacklinks = "HAS_BACKLINKS" WarnUnknownField = "UNKNOWN_FIELD" WarnTypeMismatch = "TYPE_DIRECTORY_MISMATCH" )
Warning codes for non-fatal issues.
Variables ¶
This section is empty.
Functions ¶
func IsAmbiguousRef ¶
IsAmbiguousRef returns true if the error is an ambiguous reference error.
func IsEmbeddedID ¶
IsEmbeddedID checks if an ID is an embedded object ID (contains #).
func IsPipedOutput ¶
func IsPipedOutput() bool
IsPipedOutput returns true if stdout is being piped (not a TTY).
func IsRefNotFound ¶
IsRefNotFound returns true if the error is a reference not found error.
func PrintBulkPreview ¶
func PrintBulkPreview(preview *BulkPreview)
PrintBulkPreview prints a human-readable preview of bulk operations.
func PrintBulkSummary ¶
func PrintBulkSummary(summary *BulkSummary)
PrintBulkSummary prints a human-readable summary of completed bulk operations.
func ReadIDsFromStdin ¶
ReadIDsFromStdin reads object/trait IDs from stdin, one per line. Returns the IDs and any embedded IDs that were filtered out.
func ReadTraitIDsFromStdin ¶
ReadTraitIDsFromStdin reads trait IDs from stdin for bulk operations.
func ResolveReferenceToFile ¶
func ResolveReferenceToFile(reference string, opts ResolveOptions) (string, error)
ResolveReferenceToFile is a convenience function that resolves a reference and returns just the file path. This is the most common use case.
func ResolveReferenceToObjectID ¶
func ResolveReferenceToObjectID(reference string, opts ResolveOptions) (string, error)
ResolveReferenceToObjectID is a convenience function that resolves a reference and returns the canonical object ID.
func SetPipeFormat ¶
func SetPipeFormat(usePipe *bool)
SetPipeFormat sets an explicit pipe format override. Pass nil to use auto-detection.
func ShouldUsePipeFormat ¶
func ShouldUsePipeFormat() bool
ShouldUsePipeFormat returns true if output should use pipe-friendly format. Priority: explicit --pipe/--no-pipe flag > auto-detection based on TTY. JSON output mode always returns false (JSON has its own format).
func TruncateContent ¶
TruncateContent truncates content to a maximum length, adding "..." if truncated. Tries to break at word boundaries.
func WritePipeableIDs ¶
func WritePipeableIDs(w io.Writer, items []PipeableItem)
WritePipeableIDs writes just the IDs, one per line. Useful for simpler piping when content/location aren't needed.
func WritePipeableList ¶
func WritePipeableList(w io.Writer, items []PipeableItem)
WritePipeableList writes items in pipe-friendly tab-separated format. Format: Num<tab>ID<tab>Content<tab>Location This format works well with fzf and cut for downstream processing. The number prefix allows users to reference results by number.
Types ¶
type AmbiguousRefError ¶
AmbiguousRefError is returned when a reference matches multiple objects.
func (*AmbiguousRefError) Error ¶
func (e *AmbiguousRefError) Error() string
type BulkOperation ¶
type BulkOperation string
BulkOperation represents the type of bulk operation.
const ( BulkOpSet BulkOperation = "set" BulkOpDelete BulkOperation = "delete" BulkOpAdd BulkOperation = "add" BulkOpMove BulkOperation = "move" )
type BulkPreview ¶
type BulkPreview struct {
Action string `json:"action"`
Items []BulkPreviewItem `json:"items"`
Skipped []BulkResult `json:"skipped,omitempty"`
Total int `json:"total"`
Warnings []Warning `json:"warnings,omitempty"`
}
BulkPreview represents a preview of bulk operations before confirmation.
type BulkPreviewItem ¶
type BulkPreviewItem struct {
ID string `json:"id"`
Changes map[string]string `json:"changes,omitempty"` // field -> "new_value (was: old_value)"
Action string `json:"action"` // "set", "delete", "add", "move"
Details string `json:"details,omitempty"` // Additional info like destination for move
}
BulkPreviewItem represents a single item in a bulk operation preview.
type BulkResult ¶
type BulkResult struct {
ID string `json:"id"`
Status string `json:"status"` // "modified", "deleted", "added", "moved", "skipped", "error"
Reason string `json:"reason,omitempty"`
Details string `json:"details,omitempty"`
}
BulkResult represents the result of a single bulk operation on one object.
type BulkSummary ¶
type BulkSummary struct {
Action string `json:"action"`
Results []BulkResult `json:"results"`
Total int `json:"total"`
Modified int `json:"modified,omitempty"`
Deleted int `json:"deleted,omitempty"`
Added int `json:"added,omitempty"`
Moved int `json:"moved,omitempty"`
Skipped int `json:"skipped,omitempty"`
Errors int `json:"errors,omitempty"`
}
BulkSummary represents the summary of a completed bulk operation.
type CaptureResult ¶
type CaptureResult struct {
File string `json:"file"`
Line int `json:"line"`
Content string `json:"content"`
}
CaptureResult represents the result of quick capture. Used by: add
type CheckIssueJSON ¶
type CheckIssueJSON struct {
Type string `json:"type"`
Level string `json:"level"`
FilePath string `json:"file_path"`
Line int `json:"line"`
Message string `json:"message"`
Value string `json:"value,omitempty"`
FixCommand string `json:"fix_command,omitempty"`
FixHint string `json:"fix_hint,omitempty"`
}
CheckIssueJSON represents an issue in JSON output
type CheckResultJSON ¶
type CheckResultJSON struct {
VaultPath string `json:"vault_path"`
Scope *CheckScopeJSON `json:"scope,omitempty"`
FileCount int `json:"file_count"`
ErrorCount int `json:"error_count"`
WarnCount int `json:"warning_count"`
Issues []CheckIssueJSON `json:"issues"`
Summary []CheckSummaryJSON `json:"summary"`
}
CheckResultJSON is the top-level JSON output
type CheckScopeJSON ¶
type CheckScopeJSON struct {
Type string `json:"type"` // "full", "file", "directory", "type_filter", "trait_filter"
Value string `json:"value,omitempty"` // The path, type name, or trait name
}
CheckScopeJSON describes the scope of the check
type CheckSummaryJSON ¶
type CheckSummaryJSON struct {
IssueType string `json:"issue_type"`
Count int `json:"count"`
UniqueValues int `json:"unique_values,omitempty"` // Number of unique values (e.g., 5 different types)
FixCommand string `json:"fix_command,omitempty"`
FixHint string `json:"fix_hint,omitempty"`
TopValues []string `json:"top_values,omitempty"` // Top 10 unique values (most common first)
}
CheckSummaryJSON groups issues by type for easier agent processing
type CommandSchema ¶
type CommandSchema struct {
Description string `json:"description"`
DefaultTarget string `json:"default_target,omitempty"`
Args []string `json:"args,omitempty"`
Flags map[string]FlagSchema `json:"flags,omitempty"`
Examples []string `json:"examples,omitempty"`
UseCases []string `json:"use_cases,omitempty"`
}
CommandSchema describes a command for agent discovery.
type CoreTypeSchema ¶
type CoreTypeSchema struct {
Name string `json:"name"`
Templates []string `json:"templates,omitempty"`
DefaultTemplate string `json:"default_template,omitempty"`
}
CoreTypeSchema represents configurable settings for a core type.
type CreateResult ¶
type CreateResult struct {
File string `json:"file"`
Type string `json:"type"`
Title string `json:"title"`
ID string `json:"id"`
}
CreateResult represents the result of creating an object. Used by: new
type DeleteResult ¶
type DeleteResult struct {
Deleted string `json:"deleted"`
Behavior string `json:"behavior"`
TrashPath string `json:"trash_path,omitempty"`
}
DeleteResult represents the result of deleting an object. Used by: delete
type ErrorInfo ¶
type ErrorInfo struct {
Code string `json:"code"`
Message string `json:"message"`
Details interface{} `json:"details,omitempty"`
Suggestion string `json:"suggestion,omitempty"`
}
ErrorInfo contains structured error information.
type FieldRenameChange ¶
type FieldRenameChange struct {
FilePath string `json:"file_path"`
ChangeType string `json:"change_type"` // "schema_field", "schema_name_field", "template_inline", "template_file", "frontmatter", "embedded", "saved_query"
Description string `json:"description"`
Line int `json:"line,omitempty"`
}
FieldRenameChange represents a single change to be made when renaming a field.
type FieldRenameConflict ¶
type FieldRenameConflict struct {
FilePath string `json:"file_path"`
ConflictType string `json:"conflict_type"` // "schema", "frontmatter", "embedded"
Message string `json:"message"`
Line int `json:"line,omitempty"`
OldFieldFound bool `json:"old_field_found,omitempty"`
NewFieldFound bool `json:"new_field_found,omitempty"`
}
FieldRenameConflict represents a conflict that blocks renaming a field. Conflicts are hard errors (even with --confirm).
type FieldSchema ¶
type FieldSchema struct {
Type string `json:"type"`
Required bool `json:"required"`
Default string `json:"default,omitempty"`
Values []string `json:"values,omitempty"`
Target string `json:"target,omitempty"`
Description string `json:"description,omitempty"`
}
FieldSchema represents a field definition.
type FieldTypeValidation ¶
type FieldTypeValidation struct {
Valid bool
BaseType string
IsArray bool
Error string
Suggestion string
Examples []string
ValidTypes []string
TargetHint string
}
FieldTypeValidation holds the result of validating a field type specification
type FileResult ¶
type FileResult struct {
Path string `json:"path"`
Content string `json:"content"`
LineCount int `json:"line_count"`
// Optional range output (1-indexed, inclusive). When omitted, Content is the full file.
StartLine int `json:"start_line,omitempty"`
EndLine int `json:"end_line,omitempty"`
// Optional structured lines for copy-paste-safe editing.
Lines []FileLine `json:"lines,omitempty"`
}
FileResult represents raw file content. Used by: read
type FlagSchema ¶
type FlagSchema struct {
Type string `json:"type,omitempty"`
Description string `json:"description"`
Examples []string `json:"examples,omitempty"`
}
FlagSchema describes a command flag.
type Meta ¶
type Meta struct {
Count int `json:"count,omitempty"`
QueryTimeMs int64 `json:"query_time_ms,omitempty"`
}
Meta contains metadata about the response.
type MoveResult ¶
type MoveResult struct {
Source string `json:"source"`
Destination string `json:"destination"`
UpdatedRefs []string `json:"updated_refs,omitempty"`
NeedsConfirm bool `json:"needs_confirm,omitempty"`
Reason string `json:"reason,omitempty"`
}
MoveResult represents the result of a move operation.
type PipeableItem ¶
type PipeableItem struct {
Num int // 1-indexed result number for reference
ID string // The unique identifier (used by downstream commands)
Content string // Human-readable description
Location string // Short location hint (e.g., "daily/2026-01-25:42")
}
PipeableItem represents an item that can be output in pipe-friendly format. Commands that return lists should use this for consistent pipe/fzf integration.
type QueryResult ¶
type QueryResult struct {
QueryName string `json:"query_name"`
Types []TypeQueryResult `json:"types,omitempty"`
Traits []model.Trait `json:"traits,omitempty"`
}
QueryResult represents results from running a saved query. Used by: query <name>
type ReclassifyResult ¶
type ReclassifyResult struct {
ObjectID string `json:"object_id"`
OldType string `json:"old_type"`
NewType string `json:"new_type"`
File string `json:"file"`
Moved bool `json:"moved,omitempty"`
OldPath string `json:"old_path,omitempty"`
NewPath string `json:"new_path,omitempty"`
UpdatedRefs []string `json:"updated_refs,omitempty"`
AddedFields []string `json:"added_fields,omitempty"`
DroppedFields []string `json:"dropped_fields,omitempty"`
NeedsConfirm bool `json:"needs_confirm,omitempty"`
Reason string `json:"reason,omitempty"`
}
ReclassifyResult represents the result of a reclassify operation.
type RefNotFoundError ¶
RefNotFoundError is returned when a reference cannot be resolved.
func (*RefNotFoundError) Error ¶
func (e *RefNotFoundError) Error() string
type ResolveOptions ¶
type ResolveOptions struct {
// VaultPath is the root path of the vault (required)
VaultPath string
// VaultConfig is the vault configuration (optional, will be loaded if nil)
VaultConfig *config.VaultConfig
// AllowMissing if true, returns a result for date references even if the file doesn't exist
// This is useful for commands that may create the file (like daily notes)
AllowMissing bool
}
ResolveOptions configures reference resolution behavior.
type ResolveResult ¶
type ResolveResult struct {
// ObjectID is the canonical object ID (e.g., "people/freya", "daily/2025-02-01#standup")
ObjectID string
// FilePath is the absolute path to the file
FilePath string
// IsSection is true if this is an embedded section reference (contains #)
IsSection bool
// FileObjectID is the parent file's object ID (for sections, this differs from ObjectID)
FileObjectID string
// MatchSource describes how the reference was matched (e.g., "literal_path", "short_name", "alias", "name_field", "object_id", "date", "suffix_match")
MatchSource string
}
ResolveResult contains the resolved reference information.
func ResolveReference ¶
func ResolveReference(reference string, opts ResolveOptions) (*ResolveResult, error)
ResolveReference resolves any reference to its target object and file.
Supports:
- Literal paths: "people/freya", "people/freya.md"
- Short names: "freya" → "people/freya"
- Aliases: "The Queen" → "people/freya"
- Name field values: "The Prose Edda" → "books/the-prose-edda"
- Date references: "2025-02-01" → "daily/2025-02-01"
- Section references: "projects/website#tasks"
Returns an error if the reference is not found or is ambiguous.
type Response ¶
type Response struct {
OK bool `json:"ok"`
Data interface{} `json:"data,omitempty"`
Error *ErrorInfo `json:"error,omitempty"`
Warnings []Warning `json:"warnings,omitempty"`
Meta *Meta `json:"meta,omitempty"`
}
Response is the standard JSON envelope for all CLI output.
type SavedQueryInfo ¶
type SavedQueryInfo struct {
Name string `json:"name"`
Query string `json:"query"`
Args []string `json:"args,omitempty"`
Description string `json:"description,omitempty"`
}
SavedQueryInfo represents a saved query definition. Used by: query --list
type SchemaResult ¶
type SchemaResult struct {
Version int `json:"version"`
Types map[string]TypeSchema `json:"types"`
Core map[string]CoreTypeSchema `json:"core,omitempty"`
Traits map[string]TraitSchema `json:"traits"`
Templates map[string]TemplateSchema `json:"templates,omitempty"`
Queries map[string]SavedQueryInfo `json:"queries,omitempty"`
}
SchemaResult represents the full schema dump.
type StatsResult ¶
type StatsResult struct {
FileCount int `json:"file_count"`
ObjectCount int `json:"object_count"`
TraitCount int `json:"trait_count"`
RefCount int `json:"ref_count"`
}
StatsResult represents vault statistics. Used by: stats
type TemplateSchema ¶
type TemplateSchema struct {
ID string `json:"id"`
File string `json:"file"`
Description string `json:"description,omitempty"`
}
TemplateSchema represents a schema-level template definition.
type TraitBulkPreview ¶
type TraitBulkPreview struct {
Action string `json:"action"`
Items []TraitBulkPreviewItem `json:"items"`
Skipped []TraitBulkResult `json:"skipped,omitempty"`
Total int `json:"total"`
}
TraitBulkPreview represents a preview of trait bulk operations.
type TraitBulkPreviewItem ¶
type TraitBulkPreviewItem struct {
ID string `json:"id"`
FilePath string `json:"file_path"`
Line int `json:"line"`
TraitType string `json:"trait_type"`
Content string `json:"content"`
OldValue string `json:"old_value"`
NewValue string `json:"new_value"`
}
TraitBulkPreviewItem represents a preview item for trait bulk operations.
type TraitBulkResult ¶
type TraitBulkResult struct {
ID string `json:"id"`
FilePath string `json:"file_path"`
Line int `json:"line"`
Status string `json:"status"` // "modified", "skipped", "error"
Reason string `json:"reason,omitempty"`
OldValue string `json:"old_value,omitempty"`
NewValue string `json:"new_value,omitempty"`
}
TraitBulkResult represents the result of a bulk trait operation.
type TraitBulkSummary ¶
type TraitBulkSummary struct {
Action string `json:"action"`
Results []TraitBulkResult `json:"results"`
Total int `json:"total"`
Modified int `json:"modified"`
Skipped int `json:"skipped"`
Errors int `json:"errors"`
}
TraitBulkSummary represents the summary of completed trait bulk operations.
type TraitSchema ¶
type TraitSchema struct {
Name string `json:"name"`
Type string `json:"type"`
Values []string `json:"values,omitempty"`
Default string `json:"default,omitempty"`
}
TraitSchema represents a trait definition.
type TypeQueryResult ¶
TypeQueryResult represents objects of a type in query results.
type TypeRenameChange ¶
type TypeRenameChange struct {
FilePath string `json:"file_path"`
ChangeType string `json:"change_type"` // "frontmatter", "embedded", "schema_ref_target", "schema_default_path", "directory_move"
Description string `json:"description"`
Line int `json:"line,omitempty"`
}
TypeRenameChange represents a single change to be made
type TypeSchema ¶
type TypeSchema struct {
Name string `json:"name"`
Builtin bool `json:"builtin"`
DefaultPath string `json:"default_path,omitempty"`
Description string `json:"description,omitempty"`
NameField string `json:"name_field,omitempty"`
Template string `json:"template,omitempty"`
Templates []string `json:"templates,omitempty"`
DefaultTemplate string `json:"default_template,omitempty"`
Fields map[string]FieldSchema `json:"fields,omitempty"`
}
TypeSchema represents a type definition.
type TypeSummary ¶
type TypeSummary struct {
Name string `json:"name"`
Count int `json:"count"`
Builtin bool `json:"builtin"`
}
TypeSummary represents a type with its count. Used by: type --list
type Warning ¶
type Warning struct {
Code string `json:"code"`
Message string `json:"message"`
Ref string `json:"ref,omitempty"`
SuggestedType string `json:"suggested_type,omitempty"`
CreateCommand string `json:"create_command,omitempty"`
}
Warning represents a non-fatal warning.
func BuildEmbeddedSkipWarning ¶
BuildEmbeddedSkipWarning creates a warning for skipped embedded objects.
Source Files
¶
- add.go
- backlinks.go
- bulk.go
- bulk_runner.go
- bulk_trait.go
- check.go
- completion_refs.go
- config_cmd.go
- confirm.go
- daily.go
- date.go
- date_keywords.go
- delete.go
- docs.go
- edit.go
- errors.go
- field_mutation.go
- fzf_picker.go
- helpers.go
- hyperlink.go
- import.go
- init.go
- json.go
- last.go
- mcp.go
- move.go
- new.go
- object_creation.go
- open.go
- outlinks.go
- path.go
- pipe.go
- query.go
- query_unknown_hint.go
- read.go
- read_enriched.go
- reclassify.go
- reindex.go
- reindex_file.go
- resolve.go
- results.go
- retrieval_format.go
- root.go
- schema.go
- schema_doc_helpers.go
- schema_edit.go
- schema_template_commands.go
- search.go
- serve.go
- set.go
- skill.go
- stats.go
- template.go
- untyped.go
- update.go
- upsert.go
- vault.go
- version.go
- workflow.go
- zz_registry_sync.go