import type { ExtensionAPI, InputSource } from "@earendil-works/pi-coding-agent"; /** * Whether Pi input from `source` may be treated as an explicit user * statement eligible for `CaptureCoordinator` (opt-in capture of * corrections/preferences/decisions into durable review candidates). * * Only `"interactive"` (a human typing) qualifies. `"extension"` input is * synthesized by another extension via `sendUserMessage` -- if it were * captured, that extension could get its own generated text durably * recorded as though a human had explicitly stated it, which would let * generated content authorize its own persistence (the same class of * problem `containsSensitiveCredential`/synthetic-text filtering in * `src/capture.ts` already guards against for *content*, not provenance). * `"rpc"` (API-driven, not necessarily a human at a keyboard) is * conservatively treated the same way until a reviewed trust policy exists * for it; this can be relaxed later, but only for `"rpc"` explicitly, not * `"extension"`. */ export declare function isCaptureEligibleInputSource(source: InputSource): boolean; /** * Resolve `promise`, but resolve to `undefined` early if `signal` aborts * first. Does not cancel `promise`'s underlying work (Remem's * `compactionContext` has no cancellation parameter) -- it only stops the * caller from waiting on and acting on a result that arrives after the * caller no longer wants it. */ export declare function raceAbort(promise: Promise, signal: AbortSignal): Promise; /** * Pi extension entry point (`export default function(pi: ExtensionAPI)`). * Mirrors the memory-injection, tool, capture, and (optional) * compaction-context behavior of the OpenCode v1/v2 adapters * (`src/hosts/opencode/v1.ts`, `src/hosts/opencode/v2.ts`), mapped onto * Pi's `before_agent_start` / `pi.registerTool` / `input` / * `session_before_compact` / `session_before_tree` events instead of OpenCode's plugin hooks. */ export default function remem(pi: ExtensionAPI): void;