/** Durable, project-local transcript storage for subagents. */ import type { AgentSession } from "@earendil-works/pi-coding-agent"; /** * Ensure project-local subagent artifacts are ignored by git. * * The rule is appended instead of rewriting the file. This preserves any * existing user-owned rules and makes concurrent callers harmless (duplicate * `*` rules are semantically equivalent). */ export declare function ensureSubagentsGitignore(cwd: string): string; /** Return the durable transcript path for an agent. */ export declare function createAgentHistoryPath(cwd: string, agentId: string): string; /** Return the project-relative path stored in the parent session record. */ export declare function agentHistoryLocator(cwd: string, historyPath: string): string; /** Resolve only paths in this package's project-local transcript namespace. */ export declare function resolveAgentHistoryPath(cwd: string, locator: string): string | undefined; /** Return true only when a valid project-local transcript file exists. */ export declare function hasAgentHistory(cwd: string, locator: string | undefined): boolean; /** * Read persisted transcript entries into the message shape used by the live * conversation viewer. Malformed lines and unknown records are skipped so one * damaged entry cannot hide the rest of a history. */ export declare function readAgentHistory(cwd: string, locator: string): AgentSession["messages"] | undefined; /** * Read the last assistant text from a durable transcript. Runtime records may * release their in-memory result after the retention TTL; the transcript then * becomes the source of truth for get_subagent_result. */ export declare function readAgentHistoryResult(cwd: string, locator: string): string | undefined; //# sourceMappingURL=agent-history.d.ts.map