import { type ParsedArgs } from "@cotal-ai/core"; import { safeStoreCleanupPath } from "./clean.js"; /** What a named reset acts on. A running or crashed space is selected by its locally started * registration. A controller stack that a completed `down` stopped has none: its prepared record * and stack journal at the same root name its broker address, store and mode, and both stay after * the reset so a later `up` starts it again. Selection is not deletion authority; every eligibility * check still runs. */ export interface ResetTarget { space: string; root: string; server: string; storeDir: string | undefined; mode: "auth" | "open" | "user"; tlsRequired: boolean; remoteUser: boolean; source: "registration" | "stopped-stack"; /** The records the selection came from, compared again before any removal. */ fingerprint: string; } export type ResetCommand = "reset store" | "reset space"; export declare function selectResetTarget(space: string, command: ResetCommand): ResetTarget; /** An unresolved service process, supervisor receipt or native attempt may still own the store, * including an orphan receipt with no instance. Pidfile absence cannot settle that custody. */ export declare function assertNoRecordedServiceOwner(space: string): void; /** A matching local address is a blocker; the absence of a match proves no broker exclusivity. */ export declare function assertNoExactBrokerPeer(space: string, server: string): void; /** A local additive ledger is a blocker, never store ownership authority. */ export declare function assertNoAdditiveLedger(root: string, space: string): void; /** Every check a stopped-store or identity reset runs before it is offered, and again under the * maintenance lock. Each refusal names one reason and the command that clears it. Returns the * store path, with its directory identity pinned when it exists. */ export declare function assertResetEligible(target: ResetTarget, command: ResetCommand): Promise>; /** Named store-only cleanup. Trust, credentials, service definitions and registration remain. */ export declare function resetStoreApply(space: string, args: ParsedArgs): Promise; //# sourceMappingURL=reset-store-apply.d.ts.map