import { g as GraphBackend, aA as GraphCommandPort, aB as GraphCommandCoordination, aC as GraphCommandExecutionContext, aD as NodeCreateCommand, aE as NodeCreateCommandResult, aF as EdgeCreateCommand, aG as EdgeCreateCommandResult, aH as EdgeConvergeCreateCommand, aI as EdgeConvergeCreateCommandResult, aJ as GraphCommand, aK as GraphCommandResult, aL as GraphCommandSession, aM as GraphCommandIsolation, T as TransactionBackend, aN as TypeGraphError, n as EdgeRow, aO as FindEdgesByEndpointSetParams } from '../types-BynPp5kU.js'; export { aP as ALL_FULLTEXT_MODES, aQ as ALL_META_EDGE_NAMES, A as AdapterBackend, aR as AdapterBackendTransactions, h as AdoptedSchemaWriteTransaction, aS as BASE_CONTRIBUTION_OWNER, a2 as BackendCapabilities, aT as BackendCatalogProbes, aU as BackendExecutionCapabilities, aV as BackendIdentity, aW as BackendLifecycle, aX as BackendMaintenance, aY as BackendTransactions, B as BundledBackendCapabilityOverrides, aZ as Cardinality, a_ as CatalogBackend, a$ as CatalogColumn, b0 as CatalogIndexBehavior, b1 as CheckUniqueBatchParams, b2 as CheckUniqueParams, o as ClaimEdgeCardinalityParams, b3 as ClaimIndexMaterializationParams, b4 as Collation, b5 as CommitSchemaVersionExpected, b6 as CommitSchemaVersionIfKindsEmptyResult, b7 as CommitSchemaVersionParams, b8 as CompareAndSetNodeParams, b9 as CompiledRowsSql, ba as CompiledSelectSql, bb as CompiledStatementSql, bc as CompiledTemporaryStatementSql, bd as ConstraintFenceViolationRows, be as ContendedEdgeRow, bf as ContendedUniqueRow, bg as ContributionCapabilities, C as ContributionDiagnostic, a as ContributionDiagnosticState, bh as ContributionMaterializationBackend, bi as ContributionMaterializationIdentity, bj as ContributionMaterializationRow, bk as ContributionProbeContribution, bl as ContributionProbeEntry, bm as ContributionProbeResult, bn as ContributionProbeState, bo as ContributionRebuildResult, bp as ContributionRebuildScope, b as ContributionRepairEntry, c as ContributionRepairResult, bq as ContributionRepopulationStats, br as ContributionScope, bs as CountEdgesByKindParams, bt as CountEdgesFromParams, bu as CountNodesByKindParams, bv as CreateVectorIndexParams, bw as D1_MAX_BIND_PARAMETERS, bx as DATABASE_EXTENSION_NAMES, by as DEPLOYMENT_CONTRIBUTION_GRAPH_ID, bz as DURABLE_OBJECT_MAX_BIND_PARAMETERS, bA as DatabaseExtensionName, bB as DeleteBehavior, bC as DeleteEdgeParams, bD as DeleteEdgesBatchParams, bE as DeleteEmbeddingParams, bF as DeleteFulltextBatchParams, bG as DeleteFulltextParams, bH as DeleteNodeParams, bI as DeleteUniqueParams, bJ as DialectAdapter, bK as DialectCapabilities, bL as DialectRecursiveQueryStrategy, bM as DialectStandardQueryStrategy, bN as DialectSubgraphMembershipStrategy, bO as DialectVectorPredicateStrategy, bP as DisjointOverlapRow, bQ as DropVectorIndexParams, bR as DurableEdgeBatchMembers, bS as EdgeCardinalityDeclaration, bT as EdgeClaimOutcome, E as EdgeConvergenceMatch, bU as EdgeEntityReadBackend, bV as EdgeEntityWriteBackend, bW as EdgeExistsBetweenParams, r as EdgeIndexDeclaration, w as EdgeIndexDirection, bX as EndpointExistence, bY as EngineRecordedRevision, bZ as EngineRecordedTimeMembers, b_ as EngineRevision, b$ as EntityKey, c0 as ExtensionArrayItemType, c1 as ExtensionArrayProperty, c2 as ExtensionBooleanProperty, c3 as ExtensionEdgeDef, c4 as ExtensionEdgeIndex, c5 as ExtensionEmbeddingModifier, c6 as ExtensionEnumProperty, c7 as ExtensionIndex, c8 as ExtensionIndexWhere, c9 as ExtensionNodeDef, ca as ExtensionNodeIndex, cb as ExtensionNumberProperty, cc as ExtensionObjectFieldProperty, cd as ExtensionObjectProperty, ce as ExtensionOntologyRelation, cf as ExtensionPropertyModifiers, cg as ExtensionPropertyType, ch as ExtensionSearchableModifier, ci as ExtensionStringProperty, cj as ExtensionUniqueConstraint, ck as ExtensionUniqueWhere, cl as FULLTEXT_CONTRIBUTION_NAME, F as FenceSql, cm as FilteredApproximateSearch, cn as FilteredApproximateSearchMode, co as FindEdgesByHeterogeneousEndpointSetParams, cp as FindEdgesByKindParams, cq as FindEdgesConnectedToParams, cr as FindNodesByKindParams, cs as FulltextBatchRow, ct as FulltextCapabilities, cu as FulltextOperationBackend, cv as FulltextQueryMode, cw as FulltextSearchParams, cx as FulltextSearchResult, d as FulltextStrategy, cy as GraphAnalyticsCapabilities, cz as GraphEntityReadBackend, cA as GraphEntityWriteBackend, cB as GraphExtension, cC as GraphExtensionVersion, G as GraphIdentityConfig, cD as GraphLifecycleBackend, cE as GraphReadBackend, cF as HardDeleteEdgeParams, cG as HardDeleteNodeParams, cH as HardDeleteUniquesByConcreteKindParams, cI as HardDeleteUniquesByNodeIdsParams, cJ as HeterogeneousNodeUpsertEntry, cK as HeterogeneousNodeUpsertParams, cL as HybridSearchParams, cM as HybridSearchRow, cN as IdentityTableNames, cO as InListParameterOptions, I as IndexDeclaration, cP as IndexDeclarationBase, cQ as IndexEntity, cR as IndexMaterializationBackend, cS as IndexMaterializationRow, y as IndexOrigin, z as IndexScope, cT as IndexState, D as IndexWhereExpression, cU as IndexWhereLiteral, cV as IndexWhereOp, cW as IndexWhereOperand, cX as InferenceType, m as InsertEdgeParams, j as InsertNodeParams, cY as InsertSchemaParams, cZ as InsertUniqueParams, c_ as IntentSql, J as JsonPointer, c$ as JsonScalar, ao as JsonSchema, d0 as JsonValue, d1 as KindAnnotations, K as KindEntity, d2 as KindRemovalRow, d3 as LineageBackend, d4 as LineageDelta, d5 as LineageMembers, d6 as LineageSession, d7 as LiveNodeRow, d8 as LockSchemaVersionForWriteParams, d9 as MODERN_SQLITE_MAX_BIND_PARAMETERS, da as ManagedEdgeCreatePlan, db as ManagedNodeCreateMode, dc as ManagedNodeCreatePlan, dd as MetaEdgeName, de as NodeEntityReadBackend, df as NodeEntityWriteBackend, u as NodeIndexDeclaration, P as NodeIndexKey, N as NodeInsertClaim, dg as NodeInsertClaimVerdict, k as NodeInsertProjection, dh as NodePropertyExpectation, p as NodeRow, di as NormalizedColumnKind, ad as NullCheckOp, dj as POSTGRES_CAPABILITIES, dk as POSTGRES_MAX_BIND_PARAMETERS, dl as Placeholder, dm as PopulatedSchemaKind, dn as PurgeEdgeClaimsParams, dp as QueryExecutionBackend, dq as RawQueryExecutionBackend, dr as RawStatementExecutionBackend, ds as ReadConstraintFenceViolationsParams, dt as RecordContributionMaterializationParams, du as RecordIndexMaterializationParams, dv as RecordKindRemovalParams, R as RecordedInstant, dw as RecordedRelationDdl, dx as RecordedSourceTable, dy as RecordedTableNames, dz as RecordedTimeBackend, dA as RecordedTimeSession, dB as RecursiveTraversalCapability, dC as RecursiveTraversalVerdict, t as RelationalIndexDeclaration, dD as RelationalIndexMethod, dE as ReleaseIndexMaterializationClaimParams, dF as RemovalMaterializationBackend, dG as RenderedSql, dH as ResolvedNodeUpdateBatchEntry, dI as ResolvedNodeUpdateBatchParams, dJ as ResolvedSqlTableNames, dK as RowProps, dL as SQLITE_CAPABILITIES, dM as SQLITE_MAX_BIND_PARAMETERS, dN as SchemaCommitBackend, dO as SchemaCommitPreflightBackend, dP as SchemaKindEmptinessProbe, S as SchemaProvisioning, dQ as SchemaReadBackend, f as SchemaVersionRow, dR as SchemaWriteFenceBackend, aa as SerializedClosures, a7 as SerializedEdgeDef, a8 as SerializedMetaEdge, a6 as SerializedNodeDef, au as SerializedOntology, a9 as SerializedOntologyRelation, ab as SerializedSchema, av as SerializedUniqueConstraint, dS as SetActiveVersionParams, dT as SqlChunk, dU as SqlCompilationBackend, s as SqlDialect, dV as SqlFragment, dW as SqlIdentifierChunk, dX as SqlIntent, dY as SqlParameterChunk, dZ as SqlPlaceholderChunk, q as SqlTableNames, d_ as SqlTag, d$ as SqlTextChunk, e0 as StrategyTableContribution, Z as SystemColumnName, e1 as TableContribution, e2 as TableState, e3 as TemporalMode, e4 as TombstonedNodeRow, e5 as TransactionOptions, e6 as TransactionReadBackend, e7 as TrustedImportOptions, e8 as TrustedImportSession, e9 as UniqueConstraintBackend, ea as UniqueRow, eb as UniquenessScope, ec as UpdateEdgeParams, ed as UpdateNodeParams, ee as UpdateNodeSetParams, ef as UpdateNodeSetResult, eg as UpsertEmbeddingBatchParams, eh as UpsertEmbeddingBatchRow, ei as UpsertEmbeddingParams, ej as UpsertFulltextBatchParams, ek as UpsertFulltextParams, el as VECTOR_CONTRIBUTION_PREFIX, em as ValueType, en as VectorCapabilities, _ as VectorIndexDeclaration, $ as VectorIndexImplementation, a0 as VectorIndexMetric, a1 as VectorIndexParams, eo as VectorIndexType, ep as VectorMetric, eq as VectorOperationBackend, er as VectorSearchFrontierTuning, es as VectorSearchParams, et as VectorSearchResult, a3 as VectorSlot, V as VectorStrategy, eu as WriteFenceDeclaration, W as WriteFencePlan, ev as assertFiniteEmbedding, ew as assertRecursiveTraversal, ex as assertVectorMinScore, ey as assertVectorSearchLimit, ez as assumeRecursiveTraversalSupported, eA as buildFulltextCapabilities, eB as buildVectorCapabilities, eC as fts5Strategy, eD as isLiveNodeRow, eE as isSqlFragment, eF as isSqlPlaceholder, eG as isTombstonedNodeRow, eH as normalizeGraphAnalyticsCapabilities, eI as quoteIdentifier, eJ as recursiveTraversalUnsupportedError, eK as renderPostgres, eL as renderSql, eM as renderSqlInline, eN as renderSqlite, eO as requireWriteFence, eP as resolveRecursiveTraversal, eQ as resolveWriteFencePlan, eR as rowPropsToJsonText, eS as rowPropsToObject, eT as shortHash, eU as sql, eV as supportsInteractiveTransactions, eW as supportsRootAtomicBatch, eX as tsvectorStrategy, eY as vectorMinScoreCondition, eZ as vectorPhysicalName, e_ as vectorScoreExpression } from '../types-BynPp5kU.js'; import { O as OptionalGraphBackendMember, E as ExtraMember, B as BATCH_POINT_READ, a as ExtrasOf, b as BundleVerdictOf, G as GatedBundleDefinition, c as ExtraVerdict, C as CapabilityBundleId, d as CLAIMS, e as CONTRIBUTION_HEALTH, f as ENDPOINT_SET_READ, R as RECORDED_REVISION_ORIGINS, S as STATEMENT_EXECUTION, U as UNIQUE_SIDECAR_BATCH } from '../resolve-DV0Iposp.js'; export { g as CAPABILITY_BUNDLES, h as CapabilityBundleDefinition, i as CapabilityBundleDisposition, j as CapabilityBundleExtra, k as CapabilityBundleOperation, l as CapabilityBundleOperationSite, m as CapabilityCrossCheck, n as CapabilityExtraSpec, o as ClaimsVerdictThunk, D as DeferredUnbundledMember, p as ExtraVerdicts, q as GatedBundleVerdict, r as GraduatedBundleDefinition, s as GraduatedBundleVerdict, t as OperationNames, u as OptionalKeys, v as ReasonedUnbundledMember, w as RequiredExtrasOf, x as SpecOf, y as UNBUNDLED_OPTIONAL_MEMBERS, z as UnbundledOptionalMember, W as WS5B_SEED_BUNDLES, A as Ws5bBundleId, F as batchPointReadVerdict, H as claimsVerdict, I as contributionHealthVerdict, J as createClaimsVerdictThunk, K as endpointSetReadVerdict, L as missingRequiredExtras, M as recordedRevisionOriginsVerdict, N as requireExtras, P as resolveBundle, Q as statementExecutionVerdict, T as uniqueSidecarBatchVerdict } from '../resolve-DV0Iposp.js'; import { A as AtomicMutationProgramVariant, C as CompiledAtomicSqlStatement, a as AtomicSqlBatchExecutor, b as AtomicSqlRow } from '../atomic-mutation-program-BhP75Qn0.js'; export { c as ATOMIC_EDGE_MUTATION_VARIANT_BY_KIND, d as ATOMIC_MUTATION_PROGRAM_VARIANTS, e as AtomicDeleteBatchResult, f as AtomicEdgeBatchCardinalityRefusalError, g as AtomicEdgeBatchCountInput, h as AtomicEdgeBatchEndpointRefusalError, i as AtomicEdgeBatchExecutor, j as AtomicEdgeBatchRowsInput, k as AtomicEdgeConvergenceEntry, l as AtomicEdgeConvergenceInput, m as AtomicEdgeConvergenceResult, n as AtomicEdgeConvergenceTombstoneRefusalError, o as AtomicEdgeDeleteBatchExecutor, p as AtomicEdgeDeleteBatchInput, q as AtomicEdgeDeleteIdentityRefusalError, r as AtomicEdgeMutationProgramExecutor, s as AtomicEdgeResolvedMutationSetInput, t as AtomicEdgeResolvedMutationSetResult, u as AtomicEdgeResolvedUpdateBatchExecutor, v as AtomicEdgeResolvedUpdateEntry, w as AtomicMutationProgramRegistration, x as AtomicNodeBatchEntry, y as AtomicNodeBatchExecutor, z as AtomicNodeBatchIdSource, B as AtomicNodeBatchInput, D as AtomicNodeBatchResultMode, E as AtomicNodeClaimFamily, F as AtomicNodeClaimSupport, G as AtomicNodeDeleteBatchExecutor, H as AtomicNodeDeleteBatchInput, I as AtomicNodeDeleteRestrictedRefusalError, J as AtomicNodeProjection, K as AtomicNodeProjectionFamily, L as AtomicNodeProjectionSupport, M as AtomicNodeReplacementBatchExecutor, N as AtomicNodeReplacementEntry, O as AtomicNodeResolvedMutationSetExecutor, P as AtomicNodeResolvedMutationSetResult, Q as AtomicNodeResolvedUpdateBatchExecutor, R as AtomicNodeResolvedUpdateEntry, S as AtomicSqlProgramAdapter, T as AtomicSqlProgramRegistration, U as atomicNodeClaimInputCost, V as hasAtomicMutationProgramRegistration, W as hasAtomicSqlProgramRegistration, X as registerAtomicMutationPrograms, Y as registerAtomicSqlProgram } from '../atomic-mutation-program-BhP75Qn0.js'; export { D as DeleteLegacyRecordedAnchorMapOptions, M as MigrateLegacyRecordedTimeOptions, a as MigrateLegacyRecordedTimeResult, b as MigrateRecordedAnchorOptions, R as RepairInvertedWindowsOptions, c as RepairInvertedWindowsReport, d as RepairRelation, e as RepairRelationScope, f as deleteLegacyRecordedAnchorMap, m as migrateLegacyRecordedTime, g as migrateRecordedAnchor, r as repairInvertedValidityWindows } from '../repair-validity-windows-lfe275bY.js'; import 'zod'; /** * THE lower bound a write that STAMPS its own start stores, decided against the * instant it is about to stamp. One owner for every such write, so no two of them * can spell the decision differently. Three inputs, three outcomes: * * - a stated `null` → no lower bound (a CONFIRMED open-left window, which is * how interchange round-trips a row that has none); * - a stated string → that bound, the caller's own assertion, verbatim; * - nothing stated → the write instant, UNLESS stamping it would leave the * window readable at no instant. A row carrying only a * `validTo` at or before the write instant is "born already * ended": its start is UNKNOWN, not at-or-after its end, so * it stores no lower bound and reads back at every `asOf` * before that end (issue #407). * * The comparison against `validTo` is NON-STRICT: `validTo === writeInstant` * stores no bound too. A stamped `[T, T)` is a successful write no coordinate can * observe, and the millisecond of skew between a caller's own `Date.now()` and the * backend's sample is enough to land there — so the rule is total, and there is no * input for which a stamped bound yields an empty window. * * The write instant is a PARAMETER, not a clock read: the caller passes the very * value it binds into `created_at`/`updated_at` (or, for a resurrection, the * instant its guard judged), so the decision and the stamp cannot come from two * different samples (issue #413's failure mode). This function has no way to * sample a clock, which is what makes that structural rather than tested. * * PRECONDITION: as {@link isEmptyValidityWindow}. This is called BELOW the * validation boundary, on a public `GraphBackend` surface, so canonicality is * established by whoever reached the backend: store paths through * {@link validateStatedValidityLowerBound}, interchange import through its own * window validator, trusted import through its per-chunk format check. A direct * `GraphBackend` caller establishes it itself — a pre-existing property of that * surface, written down here rather than left implicit. */ declare function resolveStampedValidityLowerBound(statedValidFrom: string | null | undefined, validTo: string | undefined, writeInstant: string): string | undefined; /** * I21. The brand is what makes a BOUND member type-distinguishable from a * PORT member: without it, `binding.getNodes` at a rewired site still has a * receiver assignable to `Pick`, and a syntactic scanner * could never tell a bound value from an unbound one. */ declare const BUNDLE_BINDING: unique symbol; /** Every named member, guaranteed present — bound off the port, never a port member itself. */ type BundleBinding = Required> & Readonly<{ [BUNDLE_BINDING]: true; }>; /** * The graduated twin of {@link BundleBinding}: a bundle with no required * core cannot promise every member is present, so its bundle-wide "members" * accessor (`uniqueSidecarBatchMembers`, `batchPointReadMembers`, * `contributionHealthMembers`) reports whichever extras the verdict marks * present — never all of them by construction, and never a cast that claims * otherwise. */ type PartialBundleBinding = Readonly>> & Readonly<{ [BUNDLE_BINDING]: true; }>; /** * Bind a gated bundle's core off the port the calls execute on. The port * parameter is the STRUCTURAL MINIMUM over the members (ruling B-1), so * every one of the pilot's receiver shapes is accepted: * `GraphBackend`, `TransactionBackend`, `WriteTarget`, `IdentityTarget`, * `Pick` and the * `RevisionOriginBackend`-shaped `Pick`. * * @throws {ConfigurationError} with the bundle's `portSurfaceCode` when the * verdict says a core member is present and the port lacks it (I20). */ declare function bindCore, M extends D["core"][number]>(port: Readonly>>, verdict: Extract, { supported: true; }>, definition: D): BundleBinding; /** * Bind one graduated extra. Takes the EXTRA's own verdict, not the bundle's: * `requireExtras` (`resolve.ts`) narrows `verdict.extras.someExtra` at an * `if`/assertion, not `verdict` as a whole, so a signature demanding the * whole narrowed verdict would compile only after that call — the common * case is the fallback branch, which never calls `requireExtras` at all. * * @throws {ConfigurationError} with the bundle's `portSurfaceCode` when the * extra verdict says present and the port lacks the member (I20). */ declare function bindExtra(port: Readonly>>, extraVerdict: Extract, { present: true; }>, bundle: CapabilityBundleId): BundleBinding; /** * The FALLBACK arm of I20's disposition-keyed port-mismatch split (ruling, * B8 blocker): binds an extra when the verdict says it is present AND the * port can reach it, otherwise returns `undefined` — collapsing "the verdict * says absent" and "the port cannot reach it" into the site's single declared * fallback, which is exactly the shape a `fallback`-dispositioned row already * has. Used ONLY at call sites whose registry operation row disposes * `fallback`; a `refuse` row keeps calling {@link bindExtra} (or * {@link bindCore}) so its port mismatch still throws (I20's REFUSE arm). * * Deliberately does NOT consult the row's disposition itself: an extra's own * disposition and its operation row's disposition can differ (` * checkUniqueBatch` is a `fallback` extra owned by both a `fallback` row and * two `refuse` rows), so only the call site — which knows which row it is — * can choose the arm. */ declare function bindExtraIfReachable(port: Readonly>>, extraVerdict: ExtraVerdict, bundle: CapabilityBundleId): BundleBinding | undefined; declare function claimsMembers(port: Readonly>>, verdict: Extract, { supported: true; }>): BundleBinding<(typeof CLAIMS)["core"][number]>; declare function statementExecutionMembers(port: Readonly>>, verdict: Extract, { supported: true; }>): BundleBinding<(typeof STATEMENT_EXECUTION)["core"][number]>; declare function recordedRevisionOriginsMembers(port: Readonly>>, verdict: Extract, { supported: true; }>): BundleBinding<(typeof RECORDED_REVISION_ORIGINS)["core"][number]>; type UniqueSidecarBatchExtraMember = ExtraMember>; declare function uniqueSidecarBatchMembers(port: Readonly>>, verdict: BundleVerdictOf): PartialBundleBinding; type BatchPointReadExtraMember = ExtraMember>; declare function batchPointReadMembers(port: Readonly>>, verdict: BundleVerdictOf): PartialBundleBinding; type EndpointSetReadExtraMember = ExtraMember>; declare function endpointSetReadMembers(port: Readonly>>, verdict: BundleVerdictOf): PartialBundleBinding; type ContributionHealthExtraMember = ExtraMember>; declare function contributionHealthMembers(port: Readonly>>, verdict: BundleVerdictOf): PartialBundleBinding; /** Normalize a database isolation setting into command-contract vocabulary. */ declare function normalizeGraphCommandIsolation(value: unknown): GraphCommandIsolation; /** * A match-key convergence must observe the winner after waiting for its graph * lock. Repeatable-read snapshots cannot do that; serializable can instead * force a database serialization retry. Adopted/custom transaction ports * without an audited isolation level fail closed for the same reason. */ declare function assertGraphCommandConvergenceIsolation(port: GraphCommandPort, coordination: GraphCommandCoordination): void; /** Build the non-negotiable context for one command session. */ declare function graphCommandExecutionContext(session: GraphCommandSession, coordination?: "none" | GraphCommandCoordination): GraphCommandExecutionContext; /** * Validate a context before it reaches a first-party executor. The helper * below always creates a valid value, while direct port callers use this same * assertion to keep session/coordination shape single-owned. */ declare function assertGraphCommandExecutionContext(context: unknown): asserts context is GraphCommandExecutionContext; /** * Execute a command through the explicit authoritative seam. * * Store write paths must use this helper so session and coordination evidence * are explicit at every first-party call site. */ declare function executeAuthoritativeGraphCommand(port: GraphCommandPort, command: NodeCreateCommand, coordination?: "none" | GraphCommandCoordination): Promise; /** Execute an authoritative edge-create command and return its typed result. */ declare function executeAuthoritativeGraphCommand(port: GraphCommandPort, command: EdgeCreateCommand, coordination?: "none" | GraphCommandCoordination): Promise; /** Execute an authoritative convergent edge-create command and return its typed result. */ declare function executeAuthoritativeGraphCommand(port: GraphCommandPort, command: EdgeConvergeCreateCommand, coordination?: "none" | GraphCommandCoordination): Promise; /** Execute any graph command when its concrete kind is not statically known. */ declare function executeAuthoritativeGraphCommand(port: GraphCommandPort, command: GraphCommand, coordination?: "none" | GraphCommandCoordination): Promise; /** Actual author-created derived backends whose registrations must be probed. */ type ExactRootRegistrationProvenanceFixture = Readonly<{ derivedBackends: readonly [ GraphBackend | TransactionBackend, ...(GraphBackend | TransactionBackend)[] ]; }>; /** Honest result of provenance checks that ran or were inapplicable. */ type ExactRootRegistrationProvenanceReport = Readonly<{ passed: readonly string[]; skipped: readonly string[]; }>; /** Framework-agnostic conformance checks for semantic mutation programs. */ type AtomicMutationProgramConformancePreparation = Readonly<{ expectedResult: unknown; expectedState: unknown; }>; type AtomicMutationProgramRefusalPreparation = Readonly<{ expectedState: unknown; }>; type AtomicMutationProgramSuccessCase = Readonly<{ prepare: () => AtomicMutationProgramConformancePreparation | PromiseLike; execute: () => unknown; observeState: () => unknown; }>; type AtomicMutationProgramRefusalDispatch = "required" | "pre-dispatch"; type AtomicMutationProgramRefusalCase = Readonly<{ prepare: () => AtomicMutationProgramRefusalPreparation | PromiseLike; execute: () => unknown; observeState: () => unknown; errorMatches: (error: unknown) => boolean; /** Makes a legitimate Store-level precondition refusal explicit. */ dispatch: AtomicMutationProgramRefusalDispatch; }>; type AtomicMutationProgramConformanceCase = Readonly<{ /** Exact registered resource used by every callback in this case. */ backend: GraphBackend | TransactionBackend; variant: AtomicMutationProgramVariant; orderedSuccess: AtomicMutationProgramSuccessCase; staleFenceNoWrite: AtomicMutationProgramRefusalCase & Readonly<{ dispatch: "required"; }>; semanticRefusalRollback: AtomicMutationProgramRefusalCase; }>; type AtomicMutationProgramConformanceFixture = Readonly<{ /** Exact root or open transaction session reserved for this run. */ backend: GraphBackend | TransactionBackend; equal: (actual: unknown, expected: unknown) => boolean; cases: readonly AtomicMutationProgramConformanceCase[]; }> & ExactRootRegistrationProvenanceFixture; type AtomicMutationProgramConformanceReport = Readonly<{ variants: readonly Readonly<{ variant: AtomicMutationProgramVariant; passed: readonly string[]; }>[]; provenance: ExactRootRegistrationProvenanceReport; }>; declare class AtomicMutationProgramConformanceError extends TypeGraphError { constructor(message: string, details?: Readonly>); } /** Runs every mandatory semantic check for the exact registered profile. */ declare function runAtomicMutationProgramConformance(fixture: AtomicMutationProgramConformanceFixture): Promise; /** * Framework-agnostic conformance checks for atomic SQL transports. * * An atomic transport is stronger than an executor that happens to accept an * array of statements: it must preserve statement order and parameters, * return one result slot per statement, and leave no writes behind when a * later statement fails. Backend authors provide the small set of statements * and state observers needed to exercise those promises; this module owns the * checks and the failure vocabulary without depending on a test framework or * a database client. */ type AtomicTransportEquality = (actual: unknown, expected: unknown) => boolean; type AtomicTransportRollbackCase = Readonly<{ /** Prepare the baseline state that the failing program must preserve. */ prepare: () => void | PromiseLike; statements: readonly CompiledAtomicSqlStatement[]; observe: () => TSnapshot | PromiseLike; expectedBefore: TSnapshot; /** Optional check for the backend's native error shape. */ errorMatches?: (error: unknown) => boolean; }>; type AtomicTransportConformanceFixture = Readonly<{ /** Exact root or open transaction session registered under test. */ backend: GraphBackend | TransactionBackend; executeAtomicBatch: AtomicSqlBatchExecutor; equal: AtomicTransportEquality; /** A multi-statement program whose result slots identify their positions. */ orderedResults: Readonly<{ statements: readonly CompiledAtomicSqlStatement[]; expected: readonly (readonly AtomicSqlRow[])[]; }>; /** A program whose SQL and bound values must reach the transport unchanged. */ parameterPreservation: Readonly<{ statements: readonly CompiledAtomicSqlStatement[]; /** Independent evidence that SQL and bound values reached the engine. */ expected: TParameterSnapshot; /** Observe engine state or transport input attributable to this program. */ observe: () => TParameterSnapshot | PromiseLike | undefined; }>; /** A later failure must roll back both the primary row and its sidecar. */ rollback: AtomicTransportRollbackCase; /** Empty programs are successful no-ops and return no result slots. */ emptyBatch: Readonly<{ prepare?: () => void | PromiseLike; observe: () => TSnapshot | PromiseLike; expected: TSnapshot; }>; }> & ExactRootRegistrationProvenanceFixture; type AtomicTransportConformanceReport = Readonly<{ passed: readonly string[]; skipped: readonly string[]; }>; declare class AtomicTransportConformanceError extends TypeGraphError { constructor(message: string, details?: Readonly>); } /** * Runs the mandatory transport checks and exact-root provenance checks. * * This runner deliberately does not manufacture SQL or inspect a catalog. * The fixture owns those engine-specific details; the runner verifies the * transport protocol around them. */ declare function runAtomicTransportConformance(fixture: AtomicTransportConformanceFixture): Promise; /** * Framework-agnostic conformance checks for the endpoint-set read family. * * The runner deliberately accepts prepared backend parameters and expected * rows: graph schemas and database setup belong to the adapter's own test * suite. It owns the protocol that every implementation must share — the * operation exists, successful reads preserve the adapter's row contract, * and invalid requests fail with an error instead of being silently widened * into a different query. */ type EndpointSetReadEquality = (actual: readonly EdgeRow[], expected: readonly EdgeRow[]) => boolean; type EndpointSetReadConformanceSuccess = Readonly<{ name: string; params: FindEdgesByEndpointSetParams; expected: readonly EdgeRow[]; }>; type EndpointSetReadConformanceRefusal = Readonly<{ name: string; params: FindEdgesByEndpointSetParams; errorMatches?: (error: unknown) => boolean; }>; type EndpointSetReadConformanceFixture = Readonly<{ backend: GraphBackend; equal: EndpointSetReadEquality; successes: readonly EndpointSetReadConformanceSuccess[]; refusals: readonly EndpointSetReadConformanceRefusal[]; }>; type EndpointSetReadConformanceReport = Readonly<{ passed: readonly string[]; }>; declare class EndpointSetReadConformanceError extends TypeGraphError { constructor(message: string, details?: Readonly>); } /** * Runs the endpoint-set read contract against the exact backend object the * adapter author supplies. No SQL, schema, or test-framework assumptions are * made, so the same fixture can run on SQLite, PostgreSQL, or a third-party * backend. */ declare function runEndpointSetReadConformance(fixture: EndpointSetReadConformanceFixture): Promise; /** * Rejects overlay members that are not members of the decorated backend, so a * misspelled override cannot silently add a property nothing forwards to. * * Public so custom backend wrappers can use the same audited decoration seam * whose lineage the conformance runners verify. */ type ExactBackendOverlay> = O & Readonly, never>>; /** Public name for the audited, decoration-only backend derivation seam. */ declare function decorateBackend = Partial>(base: T, overrides: ExactBackendOverlay): T; export { type AtomicMutationProgramConformanceCase, AtomicMutationProgramConformanceError, type AtomicMutationProgramConformanceFixture, type AtomicMutationProgramConformancePreparation, type AtomicMutationProgramConformanceReport, type AtomicMutationProgramRefusalCase, type AtomicMutationProgramRefusalDispatch, type AtomicMutationProgramRefusalPreparation, type AtomicMutationProgramSuccessCase, AtomicMutationProgramVariant, AtomicSqlBatchExecutor, AtomicSqlRow, AtomicTransportConformanceError, type AtomicTransportConformanceFixture, type AtomicTransportConformanceReport, type AtomicTransportEquality, type AtomicTransportRollbackCase, BATCH_POINT_READ, type BundleBinding, BundleVerdictOf, CLAIMS, CONTRIBUTION_HEALTH, CapabilityBundleId, CompiledAtomicSqlStatement, ENDPOINT_SET_READ, EdgeConvergeCreateCommand, EdgeConvergeCreateCommandResult, EdgeCreateCommand, EdgeCreateCommandResult, EdgeRow, EndpointSetReadConformanceError, type EndpointSetReadConformanceFixture, type EndpointSetReadConformanceRefusal, type EndpointSetReadConformanceReport, type EndpointSetReadConformanceSuccess, type EndpointSetReadEquality, type ExactBackendOverlay, type ExactRootRegistrationProvenanceFixture, type ExactRootRegistrationProvenanceReport, ExtraMember, ExtraVerdict, ExtrasOf, FindEdgesByEndpointSetParams, GatedBundleDefinition, GraphBackend, GraphCommand, GraphCommandCoordination, GraphCommandExecutionContext, GraphCommandIsolation, GraphCommandPort, GraphCommandResult, GraphCommandSession, NodeCreateCommand, NodeCreateCommandResult, OptionalGraphBackendMember, type PartialBundleBinding, RECORDED_REVISION_ORIGINS, STATEMENT_EXECUTION, TransactionBackend, UNIQUE_SIDECAR_BATCH, assertGraphCommandConvergenceIsolation, assertGraphCommandExecutionContext, batchPointReadMembers, bindCore, bindExtra, bindExtraIfReachable, claimsMembers, contributionHealthMembers, decorateBackend, endpointSetReadMembers, executeAuthoritativeGraphCommand, graphCommandExecutionContext, normalizeGraphCommandIsolation, recordedRevisionOriginsMembers, resolveStampedValidityLowerBound, runAtomicMutationProgramConformance, runAtomicTransportConformance, runEndpointSetReadConformance, statementExecutionMembers, uniqueSidecarBatchMembers };