/** Host-only native memory views. The opaque token is not serializable authority. */ import type { HostMemoryBindingV1, MemorySourceV1, MemorySearchResultV1 } from "../memory/memoryCapability.js"; /** Host-only native memory views. The opaque token is not serializable authority. */ import type { MemorySourceCurrent, MemorySourceKind, MemorySourceLocator } from "../memory/memorySourceResolver.js"; /** Host-only native memory views. The opaque token is not serializable authority. */ import type { MemoryCandidateCoverage } from "../memory/candidateCoverage.js"; import type { ToolInvocationContext } from "./types.js"; export interface NativeMemoryViewBinding { readonly __nativeMemoryViewBinding?: never; } export declare const NATIVE_MEMORY_STORES: readonly [ "structured_records", "project_temporal_graph", "successful_procedures" ]; export type NativeMemoryStore = typeof NATIVE_MEMORY_STORES[number]; export interface NativeMemoryViewRequest { store: NativeMemoryStore; query: string; limit: number; validAt?: string; recordedAsOf?: string; scopeIds?: string[]; } export interface NativeMemoryViewItem { namespace: string; scopeRef: string; id: string; version: string; text: string; sourceKind: MemorySourceKind; title?: string; parentIds?: string[]; /** Private native occurrence key; never model-rendered or an opener. */ nativeId: string; } export interface NativeMemoryViewResult { candidateCoverage?: MemoryCandidateCoverage[]; routeId: string; items: NativeMemoryViewItem[]; status: "ready" | "partial" | "unsupported" | "unhealthy" | "deferred"; reasonCode?: string; } export interface NativeMemoryViewProvider { availability?(store: NativeMemoryStore): "ready" | "deferred"; query(request: NativeMemoryViewRequest, binding: HostMemoryBindingV1, context?: ToolInvocationContext): Promise; read(locator: MemorySourceLocator, source: MemorySourceV1, binding: HostMemoryBindingV1, context?: ToolInvocationContext): Promise; } export declare function issueNativeMemoryViewBinding(provider: NativeMemoryViewProvider): NativeMemoryViewBinding; /** Internal constructor registration; native class identity, not a tool name or schema. */ export declare function registerNativeMemoryViewConsumer(consumer: object): void; export declare function readNativeMemoryViewProvider(consumer: object, token: unknown): NativeMemoryViewProvider | undefined; export declare function nativeMemoryViewRequest(args: Record, now?: string): NativeMemoryViewRequest | undefined; /** Observational only: possession never authorizes a source read or execution. */ export interface NativeMemoryViewObservation { schema: "omnius.native-memory-view-observation.v1"; queryId: string; issuerRef: string; bindingRevision: string; status: MemorySearchResultV1["status"]; outcome: MemorySearchResultV1["outcome"]; requested: { store: NativeMemoryStore; validAt?: string; recordedAsOf?: string; }; effective: NativeMemoryViewRequest; items: Array<{ nativeId: string; itemKey: string; namespace: string; storeRef: string; scopeRef: string; sourceRef: string; version: string; sourceKind: MemorySourceKind; capturedContentSha256: string; fullContentSha256: string; parentSourceRefs: string[]; }>; } /** Internal native-consumer writer. Observation failures never discard valid retrieval. */ export declare function rememberNativeMemoryViewObservation(consumer: object, data: MemorySearchResultV1, value: NativeMemoryViewObservation): void; export declare function readNativeMemoryViewObservation(data: unknown): Readonly | undefined;