/** * openlore orient command * * CLI surface for the orient tool (also exposed through the MCP server). Given * a task, returns the relevant functions, callers, spec sections, and insertion * points — as JSON (for tooling) or a human-readable summary. * * With no task it prints a short session-start primer instead of erroring, so * the SessionStart hook written by `openlore install` * (`npx --yes openlore orient --json`) is a no-op that injects useful context * rather than failing on every session start. */ import { Command } from 'commander'; import { readStdin } from '../../utils/stdin.js'; import { type HookOutcome } from '../../core/services/hook-health.js'; export { readStdin }; /** * `orient --inject` — task-scoped context injection * (change: add-task-scoped-context-injection). Returns a bounded, attributed, * ignorable orientation block (or a single pointer line) for a pre-turn agent * hook. Reads the task from --task or the hook's stdin payload. * * This is the prompt-submitted moment of the agent loop (change: hook-reliability): * a thrown error returns '' — the agent is told nothing about OpenLore's own failure. */ export declare function injectOutput(directory: string, taskOpt: string | undefined, buildNote?: string, silentWithoutIndex?: boolean, run?: { outcome: HookOutcome; reason?: string; }): Promise; /** * The prompt-submitted moment's runtime limit, timed in-process: the timer starts after the CLI * has loaded, as every hook moment's does (hook-reliability design section 2; owner, 2026-11-14). */ export declare const PROMPT_SUBMITTED_LIMIT_MS = 3000; /** What a moment's work settles to when it passed its runtime limit. */ export declare const TIMED_OUT: unique symbol; /** * Race `work` against `limitMs`. A thrown error settles to '' (silence); a passed limit to * `TIMED_OUT`. Never rejects. */ export declare function withinLimit(work: () => Promise, limitMs: number): Promise; /** Whether `hooks.prompt-submitted` is `false` in `.openlore/config.json` (an unreadable config is "on"). */ export declare function promptSubmittedOff(root: string): boolean; /** * The project an implicit (cwd) orient serves: the nearest ancestor that already has an * index, else the enclosing git work tree's root, else the start directory. Agent hooks run * from wherever the agent's shell is; from `/src` a plain cwd would report "no index" * and start a second build that writes `src/.openlore`. The walk never crosses a `.git` * boundary, so a nested repository is never served its parent's index. */ export declare function implicitOrientRoot(start: string): string; /** Session-start primer printed when orient is invoked without a task. */ /** * One line naming the decisions autopilot accepted since the previous session, or * undefined (change: default-decision-autopilot-with-visible-trace). */ export declare function autoAcceptLine(entries: ReadonlyArray<{ title: string; }>): string | undefined; export declare const orientCommand: Command; //# sourceMappingURL=orient.d.ts.map