export declare const NATIVE_CONTRACT_VERSION = 29; type UnknownRecord = Record; interface NativeBinding { getSourceObservation(requestJson: string): Promise; applySourceObservations(requestJson: string): Promise; applySourceEvidence(requestJson: string): Promise; historyExport(requestJson: string, dbPath?: string): Promise; installGitHooks(optionsJson: string, node: string, sdkUrl: string): Promise; linkGitCommit(optionsJson: string): Promise; nativeContractVersion(): number; nativeBuildProfile?(): string; sessionStoreCall(op: string, argsJson: string): Promise; search(query: string, options?: object): Promise; searchPage(query: string, options?: object): Promise; recent(options?: object): Promise; recentPage(options?: object): Promise; getSession(sessionId: string, options?: object): Promise; getSessionEventsPage(sessionId: string, options?: object): Promise; getSessionToolCallsPage(source: string, sessionId: string, options?: object): Promise; getSessionFileEditsPage(source: string, sessionId: string, options?: object): Promise; getSessionRequestsPage(source: string, sessionId: string, options?: object): Promise; getSessionUsage(source: string, sessionId: string, options?: object): Promise; getSessionUserTurnsPage(source: string, sessionId: string, options?: object): Promise; stats(options?: object): Promise; listSessionCatalog(options?: object): Promise; listSessionCatalogPage(options?: object): Promise; discoverSessions(options?: object): Promise; hydrateSession(options: object): Promise; getSessionRelationships(options: object): Promise; getSessionTree(options: object): Promise; getSessionChildrenPage(options: object): Promise; sync(options?: object): Promise; onStoreMigration(callback: (event: 'started' | 'finished' | 'failed', dbPath: string | null) => void): boolean; migrateStore(dbPath?: string): Promise; } export declare function runtimePlatform(): string; export declare function validateNativeContract(actual: number): void; /** * The operations the native `sessionStoreCall` dispatcher answers, in the * spelling it expects. This is the one place in the SDK that knows an op's * name: a new facade read is a new entry here and a new arm in the Rust * dispatcher, not a new hand-mirrored native function. */ export declare const SESSION_STORE_OPS: Readonly<{ readonly markers: "markers"; readonly requests: "requests"; readonly usageSummary: "usage_summary"; readonly userTurns: "user_turns"; readonly capabilities: "capabilities"; readonly setRegisteredAgentName: "set_registered_agent_name"; readonly changes: "changes"; readonly commitChanges: "commit_changes"; }>; export type SessionStoreOp = (typeof SESSION_STORE_OPS)[keyof typeof SESSION_STORE_OPS]; /** * The one argument document every dispatcher op reads. The native side * rejects a key it does not know rather than ignoring it, so an option the * SDK spells wrong is an error here, not a silently dropped filter. */ export interface SessionStoreCallArgs { dbPath?: string; source: string; sessionId?: string; /** `set_registered_agent_name` only: the name, or `null` to clear one. */ agentName?: string | null; limit?: number; /** `tsMs` may be null only for the ops whose keyset has an undated tail. */ after?: { tsMs?: number | null; id: number; }; } /** * The change feed's argument documents. The feed is store-wide rather than * one source's, so these carry no `source`: `changes` reads a page from * `from` (`'start'`, `'consumer'` or a watermark), and `commit_changes` moves * the named cursor to a page's `position`. */ export interface ChangeFeedCallArgs { dbPath?: string; from?: 'start' | 'consumer' | { epoch: string; revision: number; }; consumer?: string; kinds?: string[]; session?: { source: string; sessionId: string; }; limit?: number; } export interface CommitChangesCallArgs { dbPath?: string; consumer: string; kinds?: string[]; position: { epoch: string; revision: number; }; } /** * One JSON request against the native `SessionStore` facade. The answer has * the same camelCase shape the typed native functions return, so the callers * normalize it with the same functions. */ export declare function sessionStoreCall(op: SessionStoreOp, args: SessionStoreCallArgs | ChangeFeedCallArgs | CommitChangesCallArgs): Promise; export declare function nativeCall(call: (binding: NativeBinding) => Promise): Promise; export {}; //# sourceMappingURL=native.d.ts.map