// @volter/world-core/runtime — the kernel itself and the vendor-independent runtime libraries: the log and the tree // read and written directly, checkpoints, branches, landing and receipts, the head, the stores, the runtime's scopes and // clocks, and the plugin contract's surfaces. It is the runtime's, the CLI's, the host's and the tooling's. A Protocol 3 // pack never imports it: its contract is the root, `@volter/world-core` (docs/contributing/architecture.md, "The pack // contract: the kernel's root"). // Pack registry — vendor twins self-describe (TwinPack) so tooling discovers them. export { clearRegistry, getPack, listPacks, packOf, registerPack, pullPosture, assertContinuousPullAllowed, pullOnSchedule, resolvePullVendor, DEFAULT_PULL_POSTURE, PROTOCOL_VERSION, PROTOCOL_MAJOR, PACK_ARCHETYPES, protocolStanding } from './packRegistry.ts'; export type { PackTransport, PullPosture, PullTrigger, PullVendor, RoundTripWrite, TwinPack } from './packRegistry.ts'; export { scenarioFaultResult, ScenarioError, statefulTwinManifest, twinManifest } from './scenario.ts'; export { durationMs, MACHINE_LAYERS, parsePlacement, PlacementError } from './placements.ts'; export type { PlacementRecord, PlacementEntry, ScenarioFaultInput, ScenarioDecisionInput, ScenarioFact } from './placements.ts'; export { completenessMark, completenessSince, noteCompleteness, type Completeness } from './completeness.ts'; export { mulberry32 } from './clickhouse/sql.ts'; export { placesAt, valuesAt } from './derived-real.ts'; export type { RunCall, RunInput, RunRequest, RunStep } from './run-report.ts'; export { receiverNow, WORLD_CLOCK_ENV, worldNow } from './world-clock.ts'; export { WORLD_ENV_NAMES_ENV, worldEnvValue } from './world-env.ts'; export { ORIGINAL_PATH_HEADER } from './sigv4.ts'; export { createTwinFetchFromHandler, placedCookies, TWIN_PREFIX_HEADER, TWIN_REQUEST_SCOPES, TWIN_SITES_HEADER, TWIN_SITE_HEADER, siteLabel, siteUrlOf, twinPublicBase, twinSiteUrl, twinVendorUrl, withRequestScopes } from './twin-fetch.ts'; export { isReadOnlyRequest, READ_ONLY_REQUEST_HEADER, ReadOnlyRequestError, runAsReadOnlyRequest, runAsVendorMove, writesRefused } from './request-scope.ts'; export { compileSurface, createDerivedFetch, matchOperation, observeDerivedDispatch } from './derived.ts'; export { hostOf, laneSelector, slashesMerged, unitRequestRouter, worldDoorMatcher } from './pack-fetch.ts'; export { currentTraceparent, deliveryTraceHeaders, newTraceparent, parseTraceparent, runWithRequestTrace, runWithTraceparent, TRACEPARENT_HEADER, traceparentForDelivery, validTraceparent } from './trace-context.ts'; export type { Traceparent } from './trace-context.ts'; export type { DerivedCall, DerivedCoreOutcome, DerivedDispatch, DerivedFetch, DerivedFetchOptions, DerivedHandler, DerivedOperation, DerivedOwner, DerivedSurface, BoardFrame } from './derived.ts'; export { authRefusal, bindSemantics, coreFor, crossCutting, flagOf, derivedRequestScopes, observeTransitions, resourcesOfType as twinResourcesOfType, semanticsContext, stateOf, transitionFor, parseBracketForm, readParams, render as renderDerived, serveCore, sse, vendorError } from './derived-core.ts'; export { deliverEvents, fillEnvelope, redeliverEvent, setDeliveryObserver, settleEventDeliveries, signEventAll, verifyEvent } from './events.ts'; export { equalSecrets, hmac, jwks, jwtDecode, jwtSign, jwtSignClaims, jwtVerify, jwtVerifySignature, keyId, lettersFrom, md5, sha256, SIGNING_ALGORITHMS, uuidFrom } from './signing.ts'; export type { HandlerCrypto, Jwk, Jwks, JwtDecodeOptions, JwtSignatureOptions, JwtVerdict, JwtVerificationKey, SigningKey } from './signing.ts'; export type { DeliveryTransportDecl, EventDelivery, EventRender, EventScheme, EventsDecl, EventTransport, EventWrite, RetryDecl, SignContext } from './events.ts'; export type { Actor, CoreScope, DerivedManifest, ErrorSpec, FieldRule, Handler, HandlerContext, ResourceDecl, WriteHookContext, ScreenDecl, Semantics, SemanticsContext, StateField, Transition, TransitionObserver, SeedCall } from './derived-core.ts'; export type { RemoteExecute, RemoteExecuteRequest, RemoteExecuteResponse } from './remote-execute.ts'; export type { TwinFetchAdapterConfig, TwinFetchHandlerRequest, TwinFetchHandlerResult, TwinStream, TwinStreamConnection, TwinStreamSink } from './twin-fetch.ts'; export type { PackScenarioAdapter, ScenarioDecision, ScenarioFault, ScenarioFaultResult, ScenarioFeatures, ScenarioHandler, ScenarioMatcher, ScenarioMissRecord } from './scenario.ts'; // The vendor-agnostic CLIENT-SIDE RATE BUDGET — the fail-closed backstop a pack's guarded client // routes every live vendor call through. The MECHANISM is here; the per-vendor ceiling/window/ // weights are DATA the pack declares (`TwinPack.rateBudget` / `declareRateBudget`). Exported so an // operator can inspect spend (`snapshot`) and a caller can catch `RateBudgetError` by type; there // is deliberately no export that disables the guard, and a vendor with no declaration falls back // to `DEFAULT_RATE_BUDGET` rather than to no limit at all. export { DEFAULT_RATE_BUDGET, MAX_RATE_BUDGET_CEILING, MAX_RATE_BUDGET_WINDOW_MS, MIN_RATE_BUDGET_WEIGHT, MIN_RATE_BUDGET_WINDOW_MS, RateBudget, RateBudgetError, declareRateBudget, hasRateBudgetDeclaration, listRateBudgets, priceCall, rateBudgetPath, rateBudgetPolicy, rateBudgetWeight, resetToSeconds, assertBudgetGuardIntact, } from './rateBudget.ts'; export type { RateBudgetDeclaration, RateBudgetErrorKind, RateBudgetOptions, RateBudgetPolicy, RateBudgetReservation, RateBudgetSnapshot, RateBudgetWeightRule, } from './rateBudget.ts'; // NOTE: source books (event→tracker-source mapping) moved OUT of the world — it was // the last tracker coupling. It now lives at `@volter/tracker/world-source-books`, // so `@volter/world-core` is a pure twin runtime. export { diffSubjectFields, hashFieldValue, canonicalJson, subjectKey } from './hash.ts'; export type { FieldChange, SubjectFields, } from './hash.ts'; export { appendDurable, projectionLockPath, readJsonFile, stateDirName, // Opt-in structured stderr logging (VOLTER_TWIN_LOG=1) for the audit trail. Public so a // CONNECTOR can say on the same stream when the vendor handed it a truncated page — a // silent shortfall is the one thing a pull must never pass off as the whole resource. twinLog, // The kernel's cross-process mutual-exclusion primitive (exclusive-create lockfile with // stale-holder reclaim). Public so world-runtime can guard concurrent `upWorld` claims of // one instance dir with the SAME lock semantics the event log uses. withFileLock, worldPaths, worldStateRoot, // Where another pack's store is in a World (architecture A3), and the variable the runtime names its data directory in. ownerStoreRoots, WORLD_DATA_ENV, } from './storage.ts'; export type { WorldPaths } from './types.ts'; // The pluggable persistence seam: the sync WorldStore interface, its fs (default) and // in-memory implementations, the active-store injection point, and the async // hydrate/flush boundary a serverless (Durable Object / KV / redis) entry uses. export { FsWorldStore, MemoryWorldStore, getActiveWorldStore, setActiveWorldStore, withWorldStore, hydrateInto, flushFrom, worldStateFile, WORLD_STATE_ENV, } from './world-store.ts'; export type { WorldStore, WorldStat, HydrationSource, HydrationSink, WorldStateName, WorldOwnState } from './world-store.ts'; export type { CheckLoader } from './head.ts'; export { SqlWorldStore } from './world-store-sql.ts'; export type { SqlExec } from './world-store-sql.ts'; // The blob seam (runtime contract R11): byte storage behind byte-carrying handlers, so a // serverless namespace puts bytes in object storage while local worlds keep today's layout. export { FsBlobStore, MemoryBlobStore, blobDigest, getActiveBlobStore, setActiveBlobStore, withBlobStore, readBlobRange, streamChunks, writeBlobStream, } from './blob-store.ts'; export type { BlobStore, BlobWritten } from './blob-store.ts'; export { applyTwinWrite, applyTwinWrites, applyTwinWriteAtomic, createTwinServer, CALLER_HEADER, callerForHeader, callerFromHeader, journalTwinRequest, readTwinRequestJournalFrom, type TwinRequestJournalCursor, twinRequestJournalFailures, twinRequestCredentials, readTwinRequestJournal, recordedInput, resolveTwinRead, twinRequestJournalEnabled, twinRequestJournalPath, twinResources, } from './serve.ts'; export type { AtomicTwinWriteDecision, TwinRequestJournalEntry, TwinResource, TwinWriteInput, TwinWriteResult, } from './serve.ts'; export { forkTwin, } from './fork.ts'; export type { ForkMeta } from './fork.ts'; export { appendAction, appendTransactionCommit, checkPrecondition, confirmAction, listActions, pendingActions, pushablePendingActions, isTwinBookkeeping, isWorldPerson, inWorldHistory, projectResources, projectOwnerResources, OwnerStoreAmbiguousError, revertAction, TwinActionPreconditionError, subjectAliases, resolveSubjectId, runWithCorrelationId, currentCorrelationId } from './actions.ts'; // a person as a reader shows it, its password's hash as (set) (ADR 0025) export { shownPersonFields } from './people.ts'; export type { ActionProjection, ProjectedDelivery, ProjectedResource, ProjectedResourcePatch, ProjectedResourceRef, TwinAction, TwinActionOp, TwinActionPrecondition, TwinActionPreconditionOp, TwinActionRevertSpec, TwinTransactionCommit, TwinTransactionCommitOp, TwinTransactionPrecondition, TwinTransactionRevertSpec, } from './actions.ts'; // ── Operator control plane (R19/R20): remote refs, queue lifecycle, push ledger, // apply leases, plan, status. (the twins architecture notes) // The CHANGESET primitive + the ledger DIFF (docs/concepts/the-model.md v0) — "commit" and // "diff" for operational reality: a cross-service base marker, the ledger delta since it, and // the content-addressed, replayable changeset over that delta. State-level by construction // (it reads the same per-service action ledgers `actions.ts` writes); `volter world` supplies // world discovery and thin verbs on top. export { approveChangeset, assertMarkerBelongsTo, assertSafeChangesetName, assertValidVerifiers, buildChangeset, captureMarker, changesetContentHash, changesetHashMatches, changesetReadiness, approverOf, CHANGESET_KIND, diffLedgers, describeActionFields, fieldDiffKey, narrateActions, narrationDrift, rebaseChangeset, MARKER_KIND, replayChangeset, runChangesetVerifiers, summarizeByVendor, twinWriteShape, withApplication, withVerification, worldBootMarker, WORLD_BOOT_MARKER_ID, } from './changeset.ts'; export type { ApplyReceipt, RebaseActionResult, RebaseReport, RebaseTarget, Changeset, ChangesetAction, ChangesetApplication, CompensationEntry, ChangesetApproval, ChangesetReadiness, ChangesetVerification, ChangesetVerifier, ChangesetVerifierResult, LedgerDelta, LedgerPosition, LedgerRef, ReplayActionResult, ReplayReport, ReplayTarget, VendorSummary, WorldMarker, } from './changeset.ts'; export { getActivePackAssets, setActivePackAssets, packAsset, assetContentType, confinedAssetPath, LocalPackAssets, type PackAssetStore } from './pack-assets.ts'; export { installedPackageDir, installedVendorPacks, packVendor, packRepository, isDerivedPack, vendorPackageDir, vendorOfPackModule } from './pack-paths.ts'; // The git plane (contract "The git plane is a kernel library"): objects, packs, refs, smart HTTP. export * as git from './git/index.ts'; // S3's wire (contract "S3's wire is a kernel library too"): its XML, CORS, lifecycle, delete batches, ETags, body bytes. export * as s3 from './s3/wire.ts'; // Generic strict XML grammar; vendor interpretation remains in its consumer. export * as xml from './xml.ts'; // Generic WHATWG HTML grammar; what a pack keeps of received HTML remains the pack's policy. export * as html from './html.ts'; // The push arm: the kernel's transaction over a pack's one `performAction` (contract section of that name). // The placeholder remote (contract section of that name): the seed is a pull, never a pending write. export { PLACEHOLDER_REMOTE, beginPlaceholderPull, endPlaceholderPull, placeholderPullActive, placeholderPullMarkerPath, withPlaceholderPull, placeholderEntriesFor } from './placeholder-remote.ts'; export { aliasesFrom, ownFields, subjectHistory, rebaseBranch, cutCheckpoint, appendParentEntry, wholeLog, branchEntries, branchLogPath, branchMetaPath, CHECKPOINT_EVERY, dropCheckpoint, foldEntries, landedCopy, landedIds, parentEntries, parentLogPath, position, readBranchMeta, readTree, unpushedEntries, writeBranchMeta } from './log.ts'; export type { BranchMeta, Entry, EntryOp, Receipt } from './log.ts'; export { sealCredential, openSealedCredential, keySealer, transitSealer, type Rewrapped, type Sealer, type TransitSealerOptions, type SealedByVault, type SealedUnderKey } from './credential.ts'; export type { CredentialPayload, CredentialStorage, SealedCredential } from './credential.ts'; export { validateRemoteOrigin, buildRemoteExecute, type CredentialCustody } from './executor.ts'; export type { TwinAuthStrategy } from './executor.ts'; export { clearRoot, authStrategyFor, clearStateSystems, NO_SECRETS_CHECK, readRoot, registerAuthStrategy, registerStateSystem, rootPath, runChecks, stateSystemFor, writeRoot } from './state-system.ts'; export type { Check, CheckVerdict, DeployPolicy, RootConfig, StateSystemAdapters } from './state-system.ts'; export { observeAppends } from './actions.ts'; export { appendActionIfAbsent, appendActionOccurrence } from './actions.ts'; // the head and the fold (company contract "The head", "Refresh is the kernel's fold") export { answerVendorErrors, performEntries, performAtHead, deployableEntries, headOf, boundRoot, loadChecks, loadCheck, openRootCredential, resealRootCredential, destinationOf, openSealedRecord, sealsThroughVault, rootCustody, sealingKey, setCheckLoader, setSealingKeySource, setSealer, currentSealer, openSealedAt, userKek, userKekPath, vendorOf, worldRootOf, RefusedWriteError, VendorWriteError, HeadError } from './head.ts'; export type { BoundRoot, DeployReport, Head, PerformAction, PerformContext, PushOutcome } from './head.ts'; export { observeResource, observeResources, collectObservations, foldObservations } from './observe.ts'; export type { Completed, ObservedResource, ObserveReport, Observation } from './observe.ts'; export { readTreeMap, readParentTreeMap, treeStamp, treeChangesSince, originEntries, appendOriginEntry, originLogPath, isUrlParent, positionAt, splitsBatch, assertBatchBoundary } from './log.ts'; export { referenceField, registerReferences, packReferences, resolveReferences, type ReferenceDeclaration } from './references.ts'; // the HTTP server seam: the one place the serve path meets the runtime (Bun or Node) export { serveHttp, serveStream, connectWebSocket, nodeBuiltin, servedHandlerOf, WORLD_BOOT_PATH, type HttpServer, type ServeHttpOptions, type HttpHandler } from './serve-http.ts'; // two runtime-neutral helpers for a serve path: a file as a Response, a page's client bundle export { fileResponse, contentTypeOf } from './file-response.ts'; export { bundleClient, filePathOf } from './client-bundle.ts'; // the brand's tokens and faces for a Volter page (the console, the site, the UI kit), fetched at build export { brandTokensResponse } from './brand-tokens.ts'; export { multipartBoundary, multipartParts, multipartEnvelope, inferMultipartBoundary, multipartDelimiterPattern, type MultipartPart, type MultipartFramedPart, type MultipartEnvelope } from './multipart.ts'; export { corsHeaders, withCors, type CorsDecl } from './cors.ts'; export { setInProcessTwins, vendorFetch, VendorUnreachableError, type InProcessTwin } from './vendor-call.ts'; export { setInProcessMailServers } from './smtp.ts'; export { databaseSession, EngineDatabaseError, EngineUnavailableError, managedDatabase, quoteIdent, useDatabaseDriver, type DatabaseDriver, type DatabaseSession } from './managed-database.ts'; export type { Batch as EngineBatch, ManagedDatabase, Statement as EngineStatement, StatementResult as EngineStatementResult } from './managed-database.ts'; export { readResourceBlob, readResourceBlobRange, removeResourceBlob, resourceBlobFile, resourceBlobKey, resourceBlobSize, resourceChain, writeResourceBlob, writeResourceBlobStream } from './resource-blob.ts'; export { assertStateRemovable, checkParent, stateGeneration, withAncestryLock, withHistoryLock, withHistoryLocks, withStateLock, withStateRemoval } from './ancestry.ts'; export { captureHistory, captureParentHistory, historyChanges, historyAtInstant, historyDigest, historyEntries, historyLength, historyPrefix, inheritedHistory, originHead, publishOriginHistory, readHistoryView } from './history.ts'; export type { HistoryView, HistoryLayout, HistoryReference, HistoryOrigin } from './history.ts'; export { foldHistory } from './log.ts'; export { volterHome } from './volter-home.ts'; export type { MachinePool, MachineSpec, MachineProcess, MachineStatus, MachineFiles, MachineFileStat } from './machines.ts'; export { boardFrameKey } from './board-keys.ts'; export * as managedOriginalInputs from './managed-original-inputs.ts'; export { worldSecret, worldAccount } from './derived-core.ts'; export { rewriteProtobufFields } from './protobuf.ts'; export { attachWebSocketRelay } from './serve-http.ts';