Odin carried defineOdinDocuments: 45 CultCache document-type definitions for documents that cross service boundaries. Eve surfaces and provider advertisements, Ghostlight, Heimdall, Idunn, Muninn, Sleipnir, Aetheria, VoidBot, Stonks. Almost none of it is Odin. It lived there because Odin was written first. That was tolerable while Odin was the only consumer of consequence. It stops being tolerable when Hermodr moves to its own repository, because the choice then is a published contract or two definitions of one wire format, and the second is the failure the Hermodr extraction exists to remove. The catalog is now defineSwarmDocuments here, beside defineDocumentType, which is what builds it. defineDocumentType stays injected rather than imported: that is how it worked in Odin, it keeps the catalog clear of the generic signature in ./document, and it lets a caller supply another runtime. Ported as a mechanical transform rather than retyped, then verified rather than assumed: serialising all 45 definitions from both implementations against the same probe gives byte-identical output and identical key sets. The 43 callbacks that gained annotations are named DocumentValue rather than bare any, because these definitions predate typing and read fields defensively, and pretending otherwise would be inventing types nobody has verified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
34 lines
1 KiB
TypeScript
34 lines
1 KiB
TypeScript
export { CultCache, CultCacheBuilder } from "./cult-cache";
|
|
export { inspectCultCacheBytes } from "./cult-cache-inspector";
|
|
export { defineDocumentRegistry, defineDocumentType } from "./document";
|
|
export { SingleFileMessagePackBackingStore } from "./single-file-messagepack-backing-store";
|
|
export type {
|
|
AnyCultCacheDocumentDefinition,
|
|
CacheBackingStore,
|
|
CultCacheDocumentAccessor,
|
|
CultCacheDocumentDefinition,
|
|
CultCacheDocumentFieldName,
|
|
CultCacheDocumentFormatter,
|
|
CultCacheDocumentIndexDefinition,
|
|
CultCacheDocumentRegistry,
|
|
CultCacheSchemaCatalogEntry,
|
|
CultCacheSchemaCatalogMember,
|
|
CultCacheSchema,
|
|
CultCacheDocumentValue,
|
|
CultCacheEnvelope,
|
|
CultCacheIndexScalar,
|
|
InferCultCacheSchemaValue,
|
|
CultCacheStoreRegistration,
|
|
PushAllOptions,
|
|
} from "./types";
|
|
export type {
|
|
CultCacheInspection,
|
|
InspectedCatalogEntry,
|
|
InspectedCatalogMember,
|
|
InspectedRecord,
|
|
} from "./cult-cache-inspector";
|
|
export {
|
|
defineSwarmDocuments,
|
|
type DefineDocumentType,
|
|
type SwarmDocumentCatalog,
|
|
} from "./swarm-documents";
|