import { type NolArtifactRef, type NolCalibration, type NolModelManifest, type NolRecipeRevision } from "../../schemas/nol.js"; export declare const NOL_NEURONARY_API = "https://mcczbdcymyhzfputyqcr.supabase.co/functions/v1/api"; export declare const NOL_NEURONARY_PROFILE: Readonly<{ schema: "omnius.nol.neuronary-api-profile.v1"; upstreamRevision: "4c9fc98c0bf2d56798a77ad88ffcdf607aba4d7b"; sourceFileSchemaDigest: "86dcb54853ee184306062b7427cbc5c91b0da32420158ddda0011df318c21e51"; site: "mlp.down_proj.input"; normalization: "layer_residual_median_over_down_column_l2"; methodDefaults: Readonly<{ op: "add"; site: "mlp.down_proj.input"; apply_to: "all_tokens"; normalization: "layer_residual_median_over_down_column_l2"; }>; formula: "dose * median(layer_residual_l2) / down_column_l2"; residualStatistic: "Median L2 norm of the residual leaving source layer L"; downColumn: "L2 norm of actual checkpoint down_proj[:, neuron]"; executionProjection: Readonly<{ idMaxLength: 64; idPattern: "^[a-z0-9]+(-[a-z0-9]+)*$"; nameMaxLength: 80; maxNeurons: 64; minimumDose: -100; maximumDose: 100; }>; calibration: "Requires separately attested corpus, token positions, residual statistic and per-neuron column norm; publication name is insufficient."; }>; export declare const NOL_NEURONARY_PROFILE_DIGEST: string; export interface NolNeuronarySnapshot { schema: "omnius.nol.neuronary-snapshot.v1"; apiProfileDigest: string; sourceUrl: string; retrievedAt: string; rawDigest: string; sizeBytes: number; rawJson: string; data: unknown; } export interface NolNeuronaryNeuron { layer: number; neuron: number; dose: number; expert?: number; } export interface NolNeuronaryRecipe { id: string; name: string; model: string; neurons: readonly NolNeuronaryNeuron[]; method?: Readonly>; conditional?: unknown; } export interface NolNeuronaryQuery { q?: string; tag?: string; model?: string; neuron?: string; author?: string; sort?: "top" | "new" | "hot"; limit?: number; offset?: number; } export interface NolNeuronaryRequestOptions { signal?: AbortSignal; deadlineAtMs?: number; } export declare function neuronaryRecipeId(reference: string): string; /** Offline construction also preserves the exact original UTF-8 body, not a reserialized approximation. */ export declare function snapshotNeuronaryJson(rawJson: string, sourceUrl: string, retrievedAt: string): NolNeuronarySnapshot; export declare function readNeuronaryRecipe(snapshot: NolNeuronarySnapshot): NolNeuronaryRecipe; /** GET-only public client. No token, authenticated endpoint, publishing or model execution interface. */ export declare class NolNeuronaryClient { private readonly transport; private readonly maxBytes; private readonly timeoutMs; constructor(options?: { fetch?: typeof fetch; maxBytes?: number; timeoutMs?: number; }); private get; getRecipe(reference: string, options?: NolNeuronaryRequestOptions): Promise; getNeuron(unit: string, model?: string, options?: NolNeuronaryRequestOptions): Promise; searchRecipes(query?: NolNeuronaryQuery, options?: NolNeuronaryRequestOptions): Promise<{ snapshot: NolNeuronarySnapshot; recipes: readonly NolNeuronaryRecipe[]; count: number; offset: number; limit: number; nextOffset: number | null; }>; searchAllRecipes(query: Omit, bounds: NolNeuronaryRequestOptions & { maxPages: number; maxRecipes: number; }): Promise<{ snapshots: NolNeuronarySnapshot[]; recipes: NolNeuronaryRecipe[]; truncated: boolean; nextOffset: number | null; }>; } export interface NolNeuronaryHostMapping { schema: "omnius.nol.neuronary-mapping.v1"; sourceSnapshotDigest: string; sourceModelId: string; sourceModelDigest: string; targetModelDigest: string; architectureMapDigest: string; relationship: "exact" | "derived"; sites: readonly { layer: number; neuron: number; siteId: string; calibrationId?: string; rawUnitsPerDose?: number; }[]; calibrations: readonly NolCalibration[]; evidence: NolArtifactRef; } /** Target-only proof for an explicitly requested experiment. Unknown source * checkpoint lineage is represented directly, never filled with a target hash. */ export interface NolNeuronaryTargetMapping { schema: "omnius.nol.neuronary-target-mapping.v1"; sourceSnapshotDigest: string; sourceModelId: string; sourceLineage: "unknown"; targetModelDigest: string; architectureMapDigest: string; sites: NolNeuronaryHostMapping["sites"]; calibrations: readonly NolCalibration[]; evidence: NolArtifactRef; } /** This callback is a host authority channel, never a field supplied by the remote JSON. */ export type NolNeuronaryMappingVerifier = (input: { mapping: NolNeuronaryHostMapping; mappingDigest: string; snapshot: NolNeuronarySnapshot; model: NolModelManifest; }) => { verifiedMappingDigest: string; evidenceDigest: string; } | null; export type NolNeuronaryTargetMappingVerifier = (input: { mapping: NolNeuronaryTargetMapping; mappingDigest: string; snapshot: NolNeuronarySnapshot; model: NolModelManifest; }) => { verifiedMappingDigest: string; evidenceDigest: string; } | null; export interface NolNeuronaryCompatibility { status: "exact" | "derived-needs-validation" | "unresolved" | "incompatible"; reasons: string[]; sourceSnapshotDigest: string; targetModelDigest: string; mappingDigest?: string; activationAuthorized: false; } export declare function assessNeuronaryCompatibility(input: { snapshot: NolNeuronarySnapshot; model: NolModelManifest; mapping?: NolNeuronaryHostMapping; verifyMapping?: NolNeuronaryMappingVerifier; }): NolNeuronaryCompatibility; /** Produces only a frozen candidate. The host must archive snapshot.rawJson as * exact UTF-8 application/json bytes and retain mapping.evidence in its CAS * before coordinator submission. Backend review and compute custody remain * mandatory; this pure builder does not materialize either provenance proof. */ export declare function normalizeNeuronaryRecipe(input: Parameters[0] & { id: string; revision: number; createdAt: string; purpose?: "reproduction" | "validation_candidate"; }): { recipe: NolRecipeRevision; compatibility: NolNeuronaryCompatibility; requiresValidation: boolean; normalizationLowerings: readonly { layer: number; neuron: number; dose: number; rawUnitsPerDose: number; rawAmount: number; calibrationDigest: string; }[]; }; export interface NolNeuronaryExperimentalCandidate { recipe: NolRecipeRevision; compatibility: NolNeuronaryCompatibility & { status: "unresolved"; sourceModelId: string; sourceLineage: "unknown"; targetMappingVerified: true; }; requiresValidation: true; normalizationLowerings: ReturnType["normalizationLowerings"]; } /** Explicit discovery transfer with complete target custody and deliberately * unknown published source identity. This is never an exact/derived claim or * activation grant. Returned provenance retains full references to the exact * raw snapshot and mapping evidence; the host must archive them before submit. */ export declare function proposeNeuronaryExperiment(input: { purpose: "exploratory_transfer"; snapshot: NolNeuronarySnapshot; model: NolModelManifest; targetMapping: NolNeuronaryTargetMapping; verifyTargetMapping: NolNeuronaryTargetMappingVerifier; id: string; revision: number; createdAt: string; }): NolNeuronaryExperimentalCandidate;