/**
 * `@mmnto/totem` (`.`) — legacy / compatibility barrel.
 *
 * This root barrel re-exports the full core module graph and makes no
 * per-symbol semver promise: consumers cannot tell which exports are stable
 * contract and which are lab surface. It is retained unchanged for backward
 * compatibility (zero removals, zero reordering).
 *
 * Prefer the curated, semver-tracked subpath entry points for new code:
 *   - `@mmnto/totem/config`    — `TotemConfig` + config-schema surface
 *   - `@mmnto/totem/packs`     — pack registration + load (ADR-097/099)
 *   - `@mmnto/totem/lessons`   — lesson read/write + frontmatter + role/schema
 *   - `@mmnto/totem/artifacts` — Prop 302 verdict-artifact schema/loader
 *
 * Subtraction from this barrel is deferred to a future major (mmnto-ai/totem#2336,
 * ADR-084 / Proposal 294).
 */
export { findingToViolation, violationToFinding } from './finding.js';
export { BadgeVerificationResultSchema, DEFAULT_TOOL_INTEGRATIONS, extractBadgesFromDiff, ToolIntegrationConfigSchema, verifySelfReferenceLinks, verifyToolClaims, } from './badge-verifier.js';
export { getErrorMessage, rethrowAsParseError, TotemCompileError, TotemConfigError, TotemDatabaseError, TotemError, TotemGitError, TotemOrchestratorError, TotemParseError, } from './errors.js';
export { buildMissingSdkHint } from './missing-sdk.js';
export { FREEZE_FILE, FreezeScopeSchema, readCohortFreezes, readEffectiveFreezes, readFreezeConfig, RULE_COMPILATION_FREEZE_ID, } from './freeze.js';
export { evaluateGate, FREEZE_CHECK_EVENT, knownGateEvents } from './gate-engine.js';
export { AnthropicOrchestratorSchema, ChunkStrategySchema, CONFIG_FILES, ConfigTierSchema, ContentTypeSchema, DEFAULT_IGNORE_PATTERNS, DEFAULT_REVIEW_SOURCE_EXTENSIONS, DocTargetSchema, DoctorConfigSchema, EclConfigSchema, EmbeddingProviderSchema, GarbageCollectionSchema, GeminiOrchestratorSchema, GeminiProviderSchema, getConfigTier, IngestTargetSchema, OllamaProviderSchema, OpenAIProviderSchema, OrchestratorSchema, OrientConfigSchema, requireEmbedding, ReviewConfigSchema, ReviewSourceExtensionSchema, ShellOrchestratorSchema, TotemConfigSchema, } from './config-schema.js';
export { buildFrontmatterFromLegacy, extractFrontmatter } from './lesson-frontmatter.js';
export { LessonFrontmatterSchema, LessonRoleSchema } from './types.js';
export { filterLessonsByRole } from './lesson-role-filter.js';
export { createChunker } from './chunkers/chunker.js';
export { isBuiltin as isBuiltinChunkStrategy, registeredNames as registeredChunkStrategies, } from './chunkers/chunker-registry.js';
// ast-grep language registry public surface (mmnto-ai/totem#1653 + #1768,
// ADR-097 § 10). The base AST classification exports — `SupportedLanguage`,
// `extensionToLanguage`, `loadGrammar` — are re-exported below in the
// "AST classification" section to preserve historical ordering.
export { isBuiltinExtension, registeredExtensions, registeredLanguages } from './ast-classifier.js';
export { InstalledPacksManifestSchema, isEngineSealed, loadedPacks, loadInstalledPacks, resolveEngineVersion, } from './pack-discovery.js';
export { resolveInstalledPacks, writeInstalledPacksManifest } from './pack-manifest-writer.js';
export { detectStaleManifest, staleManifestError } from './stale-manifest.js';
export { createEmbedder, isOllamaAvailable } from './embedders/embedder.js';
// Store
export { TOTEM_TABLE_NAME } from './store/lance-schema.js';
export { LanceStore } from './store/lance-store.js';
export { buildIndexManifest, getChangedFiles, getHeadSha, INDEX_MANIFEST_SCHEMA, resolveFiles, runSync, verifyIndexMeta, } from './ingest/sync.js';
// Concurrency lock
export { acquireLock, withLock } from './lock.js';
export { detectDrift, extractFileReferences, parseLessonsFile, rewriteLessonsFile, } from './drift-detector.js';
// Lesson I/O (directory-based)
export { lessonFileName, readAllLessons, writeLessonFile, writeLessonFileAsync, } from './lesson-io.js';
export { isRetiredHeading, readRetiredLessons, RETIRED_LESSONS_FILE, retireLesson, writeRetiredLessons, } from './retired-lessons.js';
export { applyAstRulesToAdditions, applyRules, applyRulesToAdditions, AstGrepYamlRuleSchema, AuthoredFixtureSchema, AuthoredNegativeFixtureSchema, AuthoredProvenanceRecordSchema, CompiledRuleSchema, CompiledRulesFileSchema, CompilerOutputSchema, deriveRuleClass, engineFields, extractAddedLines, extractJustification, fileMatchesGlobs, hashLesson, isAuthoredProvenance, isMinedProvenance, LEDGER_RETRY_PENDING_CODES, LegitimacySchema, loadCompiledRules, loadCompiledRulesFile, matchesGlob, MinedProvenanceWireSchema, NapiConfigSchema, NearMissSourceSchema, NonCompilableEntryReadSchema, NonCompilableEntryWriteSchema, NonCompilableReasonCodeSchema, parseCompilerResponse, PreimageSourceSchema, provenanceKind, ProvenanceRecordSchema, sanitizeFileGlobs, saveCompiledRules, saveCompiledRulesFile, shouldWriteToLedger, validateRegex, } from './compiler.js';
// Bounded regex evaluation (mmnto-ai/totem#1641)
export { applyRulesToAdditionsBounded, } from './regex-safety/apply-rules-bounded.js';
export { RegexEvaluator, } from './regex-safety/evaluator.js';
export { redactPath, RegexTelemetrySchema } from './regex-safety/telemetry.js';
// Rule testing
export { FIXTURE_CORPORA, FIXTURE_SURFACES, isTodoFixture, loadFixtures, parseFixture, runRuleTests, scaffoldFixture, scaffoldFixturePath, testRule, } from './rule-tester.js';
export { classifyLines, ensureInit, extensionToLanguage, loadGrammar } from './ast-classifier.js';
export { enrichWithAstContext } from './ast-gate.js';
export { matchAstQueriesBatch, matchAstQuery } from './ast-query.js';
export { matchAstGrepPattern, matchAstGrepPatternsBatch } from './ast-grep-query.js';
// Exporter
export { exportLessons, formatLessonsAsMarkdown, injectSentinelBlock, SENTINEL_END, SENTINEL_START, } from './exporter.js';
export { buildSarifLog, DEFAULT_RULE_CATEGORY, ruleId } from './sarif.js';
export { validateDocUpdate } from './saga-validator.js';
export { describeProject } from './describe.js';
// Utilities
export { generateLessonHeading, HEADING_MAX_CHARS, rewriteLessonHeadings, truncateHeading, } from './lesson-format.js';
export { validateLessons } from './lesson-linter.js';
export { extractAllFields, extractBadGoodSnippets, extractField, extractManualPattern, extractRuleExamples, parseDeclaredSeverity, stripInlineCode, } from './lesson-pattern.js';
export { BASE64_BLOB_RE, compileCustomSecrets, INSTRUCTIONAL_LEAKAGE_RE, isRegexSafe, maskSecrets, sanitize, sanitizeForIngestion, UNICODE_ESCAPE_RE, XML_TAG_LEAKAGE_RE, } from './sanitize.js';
export { wrapUntrustedXml, wrapXml } from './xml-format.js';
export { collectCodeRanges, DEFENSIVE_KEYWORD_RE, DEFENSIVE_PROXIMITY_WINDOW, flagSuspiciousLessons, isInstructionalContext, MAX_SUSPICIOUS_HEADING_LENGTH, } from './suspicious-lesson.js';
// Semantic deduplication
export { cosineSimilarity, deduplicateByHeading, deduplicateLessons, normalizeHeading, } from './semantic-dedup.js';
export { scanCursorInstructions } from './cursor-adapter.js';
export { loadRuleMetrics, recordContextHit, recordEvaluation, recordSuppression, recordTrigger, saveRuleMetrics, } from './rule-metrics.js';
export { buildCompiledRule, buildManualRule, compileLesson, deriveVirtualFilePath, formatExampleFailure, validateAstGrepPattern, verifyRuleExamples, } from './compile-lesson.js';
export { DEFAULT_BASELINE_GLOBS, getDefaultBaseline, parseStage4BaselineDirectives, resolveStage4Baseline, STAGE4_MANIFEST_EXCLUSIONS, verifyAgainstCodebase, } from './stage4-verifier.js';
export { applyOutcomeToRule, promotePendingRules } from './first-lint-promote.js';
export { readVerificationOutcomes, Stage4OutcomeStored, VerificationOutcomeEntrySchema, VerificationOutcomesFileSchema, writeVerificationOutcomes, } from './verification-outcomes.js';
export { canonicalizeKeys, canonicalStringify, CompileManifestSchema, generateInputHash, generateOutputHash, readCompileManifest, writeCompileManifest, } from './compile-manifest.js';
export { computeCompileWorkerFingerprint, modelStripsTemperature, readPromptTemplateContentHash, } from './compile-worker-fingerprint.js';
export { buildCacheEntry, cacheEntryPath, CacheEntrySchema, composeLessonSourceForHash, computeLessonSourceHash, listCacheEntries, lookupCacheEntry, migrateFromCompiledRules, writeCacheEntry, } from './compile-cache.js';
export { readRegistry, updateRegistryEntry } from './registry.js';
export { CustomSecretSchema, loadCustomSecrets, SecretsFileSchema } from './secrets.js';
export { appendLedgerEvent, LedgerEventSchema, readLedgerEvents } from './ledger.js';
// Session ID — A.3.a SessionStart hook + MCP correlation
export { mintSessionId, readSessionId, writeSessionId } from './session-id.js';
export { mergeRules } from './pack-merge.js';
export { describeSafeExecError, safeExec } from './sys/exec.js';
// Git-Bash resolution (mmnto-ai/totem#2159 — bare `bash` is never spawned by repo tooling on win32)
export { _clearBashResolverCacheForTesting, bashSpawnEnv, resolveBash, } from './sys/bash-resolver.js';
export { extractChangedFiles, filterDiffByPatterns, findRepoRootSync, findTotemRepoRootSync, getDefaultBranch, getGitBranch, getGitBranchDiff, getGitBranchDiffResult, getGitDiff, getGitDiffRange, getGitDiffStat, getGitLogSince, getGitStatus, getLatestTag, getTagDate, inferScopeFromFiles, isFileDirty, resolveGitRoot, resolveTotemRepoRootSync, } from './sys/git.js';
// Filesystem helpers
export { readJsonSafe } from './sys/fs.js';
export { buildGroundingBundle, summarizeProvenance } from './artifacts/grounding.js';
export { calculateDeterministicHash } from './artifacts/hash.js';
export { ADMISSION_CLASSES, ADMISSION_COMPLETION_ONLY, ADMISSION_SELF_GROUNDING_AGENT, ContextPolicySchema, GroundingBundleSchema, GroundingItemSchema, OutputContractSchema, PROVENANCE_CLASSES, PROVENANCE_COMPILED_RULE, PROVENANCE_SIMILARITY_ONLY, PROVENANCE_SPEC_CONTRACT, PROVENANCE_STRUCTURALLY_VERIFIED, PROVENANCE_UNGROUNDED, RUN_ARTIFACT_SCHEMA_VERSION, RunArtifactSchema, RunMetadataSchema, } from './artifacts/schema.js';
export { evaluatePostChecks, resolveCaller } from './artifacts/post-checks.js';
export { citationResolvesRule, DEFAULT_RULES, extractCitations, isContained, lineRefValid, overrideReappearanceRule, provenanceSensorRule, specVerifyRule, structuredOutputRule, } from './artifacts/post-checks-rules.js';
export { computeRunArtifactContentHash, loadRunArtifact, runsDir, saveRunArtifact, } from './artifacts/storage.js';
export { assemblePanelArtifact, classifyDiversity, computePanelArtifactContentHash, PANEL_ARTIFACT_KNOWN_MAJOR, PANEL_ARTIFACT_SCHEMA_VERSION, PanelArtifactSchema, PanelDiversityClassSchema, PanelDiversitySchema, PanelLaneSchema, panelsDir, PanelSynthesisSchema, PersistedPostCheckFindingSchema, PersistedPostCheckReportSchema, readPanelArtifact, SynthesisFindingSchema, synthesizePanel, writePanelArtifact, } from './artifacts/panel.js';
export { computeLineageKey, computeVerdictArtifactContentHash, deriveCacheEligible, deriveLessonsConsulted, deriveSettled, findLatestVerdictForLineage, LaneIdSchema, LessonConsultedItemSchema, LessonsConsultedSchema, listVerdictArtifacts, loadVerdictArtifact, renderCovariateLine, saveVerdictArtifact, VERDICT_ARTIFACT_KNOWN_MAJOR, VERDICT_ARTIFACT_SCHEMA_VERSION, VERDICT_DIFF_SOURCES, VERDICT_LANE_FAILURE_REASONS, VerdictArtifactSchema, VerdictDiffScopeSchema, VerdictFindingSchema, VerdictFindingSeveritySchema, VerdictLaneSchema, VerdictLaneSummarySchema, VerdictRoundSchema, verdictsDir, } from './artifacts/verdict.js';
export { resolveStrategyRoot } from './strategy-resolver.js';
export { resolveSubstratePaths } from './substrate-resolver.js';
export { isPathSafeAgentId, knownCohortAgents, resolveOrchestrationPaths, resolveSelfAgents, } from './orchestration-resolver.js';
export { loadParityManifest, PARITY_MANIFESTATIONS, PARITY_SENSES, ParityTractabilitySchema, parseParityManifest, resolveParityManifestPath, SUPPORTED_PARITY_SCHEMA_VERSION, } from './parity-manifest.js';
export { deriveCohortRepoId, detectCapabilityProbeContract, detectDeclaredContract, detectGeneratedArtifactContract, detectLockContentContract, detectManualAttestationContract, detectMechanicalContract, detectValueEqualityContract, detectVersionPinnedContract, extractManagedBlock, hashLockArtifact, hashManagedBlock, normalizeLockArtifact, normalizeManagedBlock, packageNameForContract, parseDeclarationMarker, parseForkMarker, parseStrategyDoctrineLock, resolveCohortFloor, SUPPORTED_LOCK_SCHEMA_VERSION, TOOLCHAIN_DIMENSION, } from './parity-detect.js';
export { parseSemgrepRules } from './semgrep-adapter.js';
export { parseEslintConfig } from './eslint-adapter.js';
export { formatSharedHelpers, getSharedHelpers } from './sys/helpers.js';
// Regex utilities (centralized escape + Pipeline 5 pattern builder)
export { codeToPattern, escapeRegex } from './regex-utils.js';
// Terminal-injection defense (mmnto-ai/totem#1744 — promoted from cli)
export { sanitizeForTerminal } from './terminal-sanitize.js';
export { deduplicateObservations, generateObservationRule } from './pipeline-observation.js';
export { computeSignature, jaccard, normalizeFindingBody, RecurrencePatternSchema, RecurrenceSeverityBucketSchema, RecurrenceStatsSchema, RecurrenceToolSchema, tokenizeForJaccard, toSeverityBucket, } from './recurrence-stats.js';
export { buildStopConditions, classifyFinding, computeDedupRate, groupFindingsByRound, RETROSPECT_ROUTE_OUT_REASONS, RetrospectClassificationSchema, RetrospectFindingSchema, RetrospectReportSchema, RetrospectRoundSchema, RetrospectRouteOutReasonSchema, signatureOfBody, toCrossPrBucket, toRoundPosition, } from './retrospect.js';
export { CandidateRuleRecordSchema, ClassifierDispositionSchema } from './spine/candidate-rule.js';
export { AuthoredOriginSchema, AuthoredRuleInputSchema, AuthoredRuleRecordSchema, AuthoredRulesFileSchema, DeclaredEngineSchema, evaluateStructuralEligibility, mintAuthoredRuleId, StructEligResultSchema, toCompileFeed, } from './spine/authored-rule.js';
export { appendAuthoringLedgerEntry, AUTHORING_LEDGER_DIR, AUTHORING_LEDGER_FILE, authoringContentHash, AuthoringLedgerEntrySchema, buildAuthoredIdentityIndex, foldEffectiveLedgerEntries, identityKey, readAuthoringLedger, } from './spine/authoring-ledger.js';
// Spine: ADR-112 §5.1/§5.3 Slice D5 — the authored freeze-time preconditions (Q2 floor + Q3 temporal/membership)
export { assertAuthoredFreezePreconditions, checkFrozenBeforeAuthoring, checkHeldOutFloor, checkPositiveFixturesTrainSide, } from './spine/authored-freeze-gates.js';
export { evaluatePreimageDifferential } from './spine/preimage-differential.js';
export { getRulePolicy } from './spine/rule-policy.js';
export { AuthoredControlsSchema, AuthoredNegativeControlSchema, AuthoredNonEmissionSchema, AuthoredPositiveControlSchema, deriveAuthoredControls, } from './spine/authored-controls.js';
export { buildWindtunnelLock, CertCorpusSeedError, CertCorpusSeedSchema, deriveCorpus, } from './spine/cert-corpus-seed.js';
export { assembleMinerLedgers, ClassifierResultSchema, dispositionToRouting, runClassifyStage, } from './spine/classify.js';
export { compileCandidate, runCompileStage } from './spine/compile.js';
export { CorpusDispositionCommentSchema, CorpusDispositionSchema, CorpusDispositionsSchema, CorpusDispositionThreadSchema, } from './spine/corpus-dispositions.js';
export { deriveLabelsFromDispositions } from './spine/derive-labels.js';
export { classifyDisposition, dispositionToLabel } from './spine/disposition-taxonomy.js';
export { classifyAuthorKind, DraftResultSchema, runExtractStage } from './spine/extract.js';
export { assembleFrozenSplitArtifact, computeCorpusIntegrity, computeFreezeCommitment, computeFrozenSplitRef, FreezeSplitParamsSchema, FROZEN_SPLIT_FILE, FrozenSplitArtifactSchema, SelectionPinsSchema, SPLIT_REF_RE, verifyFreezeIntegrity, } from './spine/frozen-split.js';
export { deriveGate2Eligibility } from './spine/gate2-eligibility.js';
export { ApiFetchSliceSchema, ApiUsageLedgerEntrySchema, ApiUsageLedgerSchema, ClassifierLedgerEntrySchema, ClassifierLedgerSchema, DispositionSourceSchema, DraftSourceKindSchema, DropLedgerEntrySchema, DropLedgerSchema, DropReasonCodeSchema, EmissionLedgerEntrySchema, EmissionLedgerSchema, MinerLedgersSchema, NoDraftCauseSchema, RoutingSchema, SplitLedgerSchema, } from './spine/ledgers.js';
export { buildCertifiedRulesFile, projectLegitimacy } from './spine/legitimacy-projection.js';
export { checkParsedLedgers, runFalsificationHarness } from './spine/miner-harness.js';
export { normalizeReviewChrome, REVIEW_CHROME_NORMALIZER_VERSION, } from './spine/review-normalize.js';
export { diffPrSets, isBotIdentity, isCodeTouching, parsePrNumber, parseRevertSha, prSetsEqual, resolveSelectionRule, reviewBotIdentity, SelectionRuleParseError, selectionRulePredicate, } from './spine/selection-rule.js';
export { mergeCommitMap, resolveSplit, SplitArtifactSchema, SplitCoverError, validateSplitCover, } from './spine/split.js';
export { ArchivedRuleInScopeError, assertNoArchivedRules, assertUniqueFiringLabels, buildFirings, computePerRuleControlResults, FiringLabelCollisionError, } from './spine/windtunnel-firing.js';
export { firingLabelId, WindtunnelLockSchema } from './spine/windtunnel-lock.js';
export { scoreWindtunnel } from './spine/windtunnel-scorer.js';
export { computeAuthoredPerRuleControlResults, scoreAuthoredWindtunnel, } from './spine/windtunnel-scorer-authored.js';
export { runCapabilityFalsification } from './capability/falsification.js';
export { regenerateCapabilityLedger } from './capability/regenerate.js';
export { mineReviewCatch, resolveActorId } from './capability/review-catch.js';
export { CapabilityClaimSchema, CapabilityLedgerSchema, CapabilityResolutionSchema, deriveClaimId, OutcomeSchema, ResolutionSourceSchema, TaskTypeSchema, } from './capability/schema.js';
//# sourceMappingURL=index.js.map