import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable } from "../schemata/index.js"; import type { TCoreClaim } from "../schemata/claim.js"; import type { TCoreClaimConnection } from "../schemata/claim-connection.js"; import type { TCoreArgumentForkRecord, TCorePremiseForkRecord, TCoreExpressionForkRecord, TCoreVariableForkRecord, TCoreClaimForkRecord } from "../schemata/fork.js"; import type { TPropositCoreSnapshot, TPropositCoreConfig } from "./interfaces/library.interfaces.js"; import type { TInvariantValidationResult } from "../types/validation.js"; import type { TForkArgumentOptions, TForkRemapTable } from "../types/fork.js"; import type { TCoreArgumentDiff, TCoreDiffOptions } from "../types/diff.js"; import { ClaimLibrary } from "./claim-library.js"; import { ClaimCitationLibrary } from "./claim-citation-library.js"; import { ClaimAxiomLibrary } from "./claim-axiom-library.js"; import { OriginLibrary } from "./origin-library.js"; import type { TCoreOriginDocument, TCoreOriginLink, TCoreOriginAnchor } from "../schemata/origin.js"; import { ArgumentLibrary } from "./argument-library.js"; import { ArgumentEngine } from "./argument-engine.js"; import { ForkLibrary } from "./fork-library.js"; /** * Options for constructing a `PropositCore` instance. Accepts optional * pre-constructed library instances and/or shared configuration. When a * library instance is provided, it is used directly; otherwise a new one * is constructed using the shared config. */ export type TPropositCoreOptions = TPropositCoreConfig & { /** Pre-constructed claim library instance. */ claimLibrary?: ClaimLibrary; /** Pre-constructed claim-citation library instance. */ claimCitationLibrary?: ClaimCitationLibrary; /** Pre-constructed claim-axiom library instance. */ claimAxiomLibrary?: ClaimAxiomLibrary; /** Pre-constructed fork library instance. */ forkLibrary?: ForkLibrary; /** Pre-constructed argument library instance. */ argumentLibrary?: ArgumentLibrary; /** Pre-constructed origin library instance. */ originLibrary?: OriginLibrary; }; /** * Top-level orchestrator for the proposit-core system. Owns every library * (claims, claim citations, axioms, forks, arguments, origins) and provides * unified snapshot/restore and validation. * * Construction order follows dependency order: * claims -> citations -> axioms -> origins -> forks -> arguments. * * As of v0.10.0 the legacy `sources` and `claimSources` libraries have been * folded into `claims` and `citations` respectively — sources are now * claims with `type: "citation"`. As of v0.12.0 a parallel `axioms` library * holds axiomatic-claim connections (a third claim type `"axiomatic"`). * The `origins` library holds the source texts arguments were built from, * their per-version links, and the spans individual parts derive from. */ export declare class PropositCore { readonly claims: ClaimLibrary; readonly citations: ClaimCitationLibrary; readonly axioms: ClaimAxiomLibrary; readonly forks: ForkLibrary; readonly arguments: ArgumentLibrary; readonly origins: OriginLibrary; protected generateId: () => string; constructor(options?: TPropositCoreOptions); /** * Returns a serializable snapshot of the entire PropositCore state, * including all libraries. */ snapshot(): TPropositCoreSnapshot; /** * Restores a `PropositCore` instance from a snapshot. Libraries are * restored in dependency order: claims -> citations -> axioms -> forks -> * arguments. * * @param snapshot - The serialized PropositCore snapshot. * @param config - Optional shared configuration for the restored instance. * @returns A fully restored `PropositCore` instance. */ static fromSnapshot(snapshot: TPropositCoreSnapshot, config?: TPropositCoreConfig): PropositCore; /** * Runs invariant validation across all managed libraries and merges * the results. * * @returns A combined validation result. */ validate(): TInvariantValidationResult; /** * Forks an argument, cloning its referenced claims (including any * citation-typed claims reachable via citations) and the citation edges * between them, then remaps variable claim references to point at the * cloned claims. Creates fork records in all five namespaces. * * @param argumentId - The ID of the argument to fork. * @param newArgumentId - The ID for the forked argument. Defaults to `this.generateId()`. * @param options - Optional fork configuration and extras for fork records. * @returns The forked engine, remap tables, and the argument fork record. */ forkArgument(argumentId: string, newArgumentId?: string, options?: TForkArgumentOptions & { forkId?: string; argumentForkExtras?: Partial>; premiseForkExtras?: Partial>; expressionForkExtras?: Partial>; variableForkExtras?: Partial>; claimForkExtras?: Partial>; }): { engine: ArgumentEngine; remapTable: TForkRemapTable; claimRemap: Map; argumentFork: TArgFork; }; /** * Computes a structural diff between two arguments managed by this * `PropositCore` instance. Automatically injects fork-aware entity * matchers derived from the fork records stored in `this.forks`. * Caller-provided matchers in `options` take precedence over the * fork-aware defaults. * * Modified entities carry a `state` field: `modified-own` (own change) or * `modified-within` (contained/referenced change only). See `diffArguments` * for the id-stability contract governing state expressibility. * * @param argumentIdA - The ID of the "before" argument. * @param argumentIdB - The ID of the "after" argument. * @param options - Optional diff configuration and comparator overrides. * @returns A structural diff between the two arguments. */ diffArguments(argumentIdA: string, argumentIdB: string, options?: TCoreDiffOptions): TCoreArgumentDiff; } //# sourceMappingURL=proposit-core.d.ts.map