/** * Implements conformance proofs for bundle isolation, ownership, transactions, state migration, and Fabric mutation. * * @module */ import type { MaybePromise, PluginPermission } from '../sdk/index.js'; import type { ConformanceAssertionResult } from './conformance-types.js'; type ProofSource = T | (() => MaybePromise); export interface BundleIsolationObservation { readonly moduleIds: readonly string[]; readonly internalImports: number; readonly privateAliases: number; readonly unknownModules?: number; } export interface PeerDependencyManifest { readonly name?: string; readonly peerDependencies?: Readonly>; readonly dependencies?: Readonly>; readonly optionalDependencies?: Readonly>; readonly bundledDependencies?: readonly string[] | boolean; } export interface PackageModuleObservation { readonly moduleIds: readonly string[]; readonly bundledCoreModules?: number; readonly bundledFabricModules?: number; } export interface MultiInstanceObservation { readonly coreRegistriesIsolated: boolean; readonly pluginStateIsolated: boolean; readonly operationsIsolated: boolean; readonly toolsIsolated: boolean; readonly overlayIndexesIsolated: boolean; readonly historyIsolated: boolean; readonly fabricGlobalStateIsolated: boolean; } export interface BaseImageInvariantAttempt { readonly action: string; readonly rejected: boolean; readonly documentUnchanged: boolean; readonly historyUnchanged: boolean; readonly committedEventAbsent: boolean; readonly instanceUsable: boolean; } export interface BaseImageInvariantObservation { readonly attempts: readonly BaseImageInvariantAttempt[]; } export interface OverlayMutationHistoryObservation { readonly topLevelTransactions: number; readonly historyRecords: number; readonly committedEvents: number; readonly registrationLeaks: number; } export interface CompoundTransactionObservation { readonly topLevelTransactions: number; readonly mementoPairs: number; readonly historyRecords: number; readonly committedEvents: number; readonly undoRestoredAll: boolean; readonly redoRestoredAll: boolean; readonly participantFailureRolledBackAll: boolean; readonly nestedWorkPublishedOnce: boolean; readonly activeSelectionAtomic: boolean; } export interface SliceMigrationObservation { readonly sourceVersion: number; readonly targetVersion: number; readonly migrated: boolean; readonly deterministic: boolean; readonly validatedBeforeCommit: boolean; readonly failedMigrationMutationCount: number; readonly futureVersionTypedFailure: boolean; readonly missingPluginPolicyPreserved: boolean; readonly privateAccesses: number; } export interface FabricGlobalMutationLifecycle { readonly fabric: Readonly>; readonly declaredPermissions?: readonly PluginPermission[]; importModule(): MaybePromise; createDefinition(module: TModule): MaybePromise; setup(definition: TDefinition): MaybePromise; dispose(runtime: TRuntime, definition: TDefinition): MaybePromise; } export interface ResponsibilityAssertionOptions { readonly bundleIsolation?: ProofSource; readonly fabricGlobalMutation?: FabricGlobalMutationLifecycle; readonly multiInstanceIsolation?: ProofSource; readonly peerDependencyContract?: ProofSource; readonly packageModules?: ProofSource; readonly baseImageInvariant?: ProofSource; readonly overlayMutationHistory?: ProofSource; readonly compoundTransaction?: ProofSource; readonly sliceMigration?: ProofSource; } interface DescriptorFingerprint { readonly configurable: boolean; readonly enumerable: boolean; readonly writable: boolean | undefined; readonly value: unknown; readonly get: (() => unknown) | undefined; readonly set: ((value: unknown) => void) | undefined; } type GlobalSnapshot = ReadonlyMap>; export declare function assertBundleIsolation(source?: ProofSource): Promise; /** Captures bounded, measurable Fabric global surfaces without invoking getters. */ export declare function captureFabricGlobalState(fabric: Readonly>): GlobalSnapshot; export declare function assertNoUndeclaredFabricGlobalMutation(lifecycle?: FabricGlobalMutationLifecycle): Promise; export declare function assertStrongMultiInstanceIsolation(source?: ProofSource): Promise; export declare function assertPeerDependencyContract(source?: ProofSource): Promise; export declare function assertPackageDoesNotBundleCoreOrFabric(source?: ProofSource): Promise; export declare function assertBaseImageInvariant(source?: ProofSource): Promise; export declare function assertOverlayMutationHistory(source?: ProofSource): Promise; export declare function assertCompoundTransaction(source?: ProofSource): Promise; export declare function assertSliceMigration(source?: ProofSource): Promise; export {};