/** * `openlore status` — what this repository's index IS, right now * (change: make-index-self-state-honest). * * The product could already answer "can I reach the embedding endpoint" (`doctor`) and * "what is in the graph" (`orient`), but not the question an agent asks constantly and a * human asks after every upgrade: what mode am I actually being served, how old is the * index, and is it behind what I just edited. On 2026-09-20 answering it meant opening * `.openlore/analysis/vector-index-meta.json` by hand in two repositories. * * Read-only by construction: it opens no lock, writes no artifact, and starts no build. */ import { Command } from 'commander'; import { type LedgerSnapshot } from '../../core/services/session-ledger.js'; import { type RetrievalMode } from '../../core/analyzer/embedder.js'; import { type IndexEmbedFailure } from '../../core/analyzer/analysis-indexes.js'; import { type WiringScope } from '../install/wiring-scope.js'; import { type GovernanceStatus } from '../../core/decisions/autopilot.js'; /** * Why keyword retrieval is being served. The distinction the config spec draws: an * unconfigured keyword index is the first-class default, a configured-but-unrealized one * is a finding. */ export type KeywordCause = 'no-provider-configured' | 'configured-provider-unrealized' | 'keyword-by-configuration' | null; export interface IndexStatus { indexPresent: boolean; /** The mode a query would actually be served right now. */ retrievalMode: RetrievalMode | null; /** Set only when the served mode is a keyword one. */ keywordCause: KeywordCause; /** Provider named by configuration, if any. */ configuredProvider: string | null; builtAt: string | null; /** Files changed in the working tree since the index was built. */ staleFiles: string[]; /** True when the count was capped rather than complete. */ staleFilesTruncated: boolean; /** Git or the index build time was unavailable, so freshness cannot be asserted. */ staleFilesUnknown?: true; /** A failure recorded outside a full build (the watcher's incremental embed). */ embedFailure?: IndexEmbedFailure; /** Degradations recorded by the last build. */ degraded: Array<{ index: string; reason: string; }>; /** Present when the configuration could not be read at all. */ configUnreadable?: true; /** * Where OpenLore is wired: the user scope (every repository), this repository only, or * nowhere. Set by `openlore status` only, so the status line never reads `~/.claude.json`. */ wiringScope?: WiringScope; /** Decision autopilot mode and its trail (change: default-decision-autopilot-with-visible-trace). */ governance?: GovernanceStatus; /** * Agent-loop hook moments (change: add-agent-loop-hook-surfaces): each moment, whether this * repository's `.claude/settings.json` wires it, and whether `hooks.` leaves it on. * Set by `openlore status` only. */ hookMoments?: Array<{ moment: string; wired: boolean; enabled: boolean; }>; /** * The live MCP session's ledger (change: add-session-structural-ledger): raw counts, named * background changes and edit loops — or why they are withheld. Set by `openlore status` only. */ session?: SessionStatus; } export type SessionStatus = { pid: number; startedAt: string; updatedAt: string; editSource: 'watcher' | 'sampled'; agentEditsReported: boolean; counts: LedgerSnapshot['counts']; changeKinds?: LedgerSnapshot['changeKinds']; bulkBatches?: number; backgroundChanges: LedgerSnapshot['backgroundChanges']; editOscillation: LedgerSnapshot['editOscillation']; withheld?: string; } | { withheld: string; }; export declare function collectIndexStatus(rootPath: string): Promise; /** The wiring scope `openlore status` reports (change: upgrade-repo-only-wiring). Read-only. */ export declare function collectWiringScope(rootPath: string, home?: string): Promise; export declare const statusCommand: Command; //# sourceMappingURL=status.d.ts.map