import type { AithosStorage, ApplyEditsResult, EthosEdit, WriteAuth, SectionWriteResult, SectionDeleteResult, SectionIndexEntry, SectionFetchResult, SectionReadOpts } from "./backend.js"; import { type Sphere } from "./did.js"; import { type DidDocument, type Identity, type IdentityMetadata } from "./identity.js"; import { type AddSectionArgs as CoreAddSectionArgs, type Manifest, type ModifySectionArgs as CoreModifySectionArgs, type VerifyEthosResult, type ZoneDoc } from "./ethos.js"; import { type Mandate, type Revocation } from "./mandate.js"; /** * Default on-disk backend. Single-instance; reads `$AITHOS_HOME` from * `storage.ts` at call-time so the env variable can still be overridden * for tests that point the home at a scratch directory. */ export declare class FilesystemStorage implements AithosStorage { listHandles(): Promise; loadIdentityMetadata(handle: string): Promise; loadIdentity(handle: string): Promise; loadDidDocument(handle: string): Promise; isTrackedIdentity(handle: string): Promise; readManifest(handle: string): Promise; readZoneDoc(handle: string, zone: Sphere, opts?: { identity?: Identity; manifest?: Manifest; }): Promise; readZoneBytes(handle: string, zone: Sphere): Promise; readSectionIndex(handle: string, zone: Sphere, opts?: SectionReadOpts): Promise; readSections(handle: string, ids: string[], opts?: SectionReadOpts & { zone?: Sphere; }): Promise; addSection(args: Omit, auth: WriteAuth): Promise; modifySection(args: Omit, auth: WriteAuth): Promise; deleteSection(args: { handle: string; zone: Sphere; sectionId: string; reason?: string; }, auth: WriteAuth): Promise; /** * Resolve the archived manifest at exactly `height` from the keystore's * `history/` directory (the current manifest answers its own height too). * v0.3 keystores archive one manifest per superseded edition; `null` when * the height is unknown or predates the archive. */ readManifestAt(handle: string, height: number): Promise; /** * Apply N semantic edits as ONE v0.3 edition ({@link keystoreEditSections} * → `patchEditionV03`: touched sections re-encrypted, siblings carried * forward byte-identical, one manifest re-sign). v0.2 keystores do not * support batching — migrate to v0.3 (`aithos migrate`) or run the host * with per-write auto-commit. */ applyEdits(handle: string, edits: readonly EthosEdit[], auth: WriteAuth): Promise; verifyEthos(handle: string, identity: Identity | null, didDoc: DidDocument): Promise; loadMandate(id: string): Promise; findRevocation(mandateId: string): Promise; defaultHandle(): Promise; }