CultLib/packages/cultnet-ts/src/index.ts
2026-11-08 17:03:39 +00:00

269 lines
8 KiB
TypeScript

export {
cultNetSchemas,
encodeCultNetMessageForWire,
parseCultNetMessage,
validateGhostlightAgentState,
type CultNetDatabaseSubscribeV1Message,
type CultNetSnapshotRequestV1Message,
type CultNetSnapshotResponseRawV1Message,
type CultNetDocumentDeleteMessage,
type CultNetDocumentMutationContract,
type CultNetDocumentPutMessage,
type CultNetDocumentPutRawMessage,
type CultNetDocumentRecord,
type CultNetDatabaseSubscribeMessage,
type CultNetDatabaseUnsubscribeMessage,
type CultNetDatabaseChangeRawMessage,
type CultNetRawDocumentRecord,
type CultNetRawPayloadEncoding,
CULTNET_ERROR_CODES,
CULTNET_ERROR_V1_CODES,
CULTNET_WRITE_RECEIPT_MESSAGE_VERSIONS,
helloAdvertisesWriteReceipts,
type CultNetErrorV1Code,
type CultNetErrorV1Message,
type CultNetWriteAdmittedMessage,
cultNetTextError,
cultNetMessageInvalidError,
cultNetWriteNotAuthorizedError,
type CultNetErrorCode,
type CultNetErrorDetails,
type CultNetErrorMessage,
type CultNetErrorRoutingHint,
type CultNetHelloMessage,
type CultNetLoginMessage,
type CultNetLoginSuccessMessage,
type CultNetOperationRequestMessage,
type CultNetOperationResponseMessage,
type CultNetMessage,
type CultNetRegisterMessage,
type CultNetSampleChangeNameMessage,
type CultNetSampleChatMessage,
type CultNetSchemaVersion,
type CultNetSchemaCatalogRequestMessage,
type CultNetSchemaCatalogResponseMessage,
type CultNetSchemaDescriptor,
type CultNetSchemaKind,
type CultNetShardCatalogRequestMessage,
type CultNetShardCatalogResponseMessage,
type CultNetShardDescriptor,
type CultNetSnapshotRequestMessage,
type CultNetSnapshotResponseMessage,
type CultNetSnapshotResponseRawMessage,
type CultNetTransportChannel,
type CultNetTransportDescriptor,
type CultNetTransportProfile,
type CultNetVerifyMessage,
type CultNetWireContract,
type GhostlightAgent,
type GhostlightAgentStateDocument,
type GhostlightBelief,
type GhostlightCanonicalState,
type GhostlightDialogueContextPack,
type GhostlightEvent,
type GhostlightEventEffect,
type GhostlightEventExchangeTurn,
type GhostlightEventPrivateInterpretation,
type GhostlightGoal,
type GhostlightIdentity,
type GhostlightMemory,
type GhostlightMemoryBundle,
type GhostlightPerceivedStateOverlay,
type GhostlightPressure,
type GhostlightRelationship,
type GhostlightScene,
type GhostlightStateDelta,
type GhostlightStateVariable,
type GhostlightValueCommitment,
type GhostlightVariableMap,
type GhostlightWorldState,
} from "./contracts";
export {
CultNetSelectionInvalidError,
validateSelectionShape,
type CultNetCitation,
type CultNetEdge,
type CultNetFieldPredicate,
type CultNetIncoming,
type CultNetRawDocumentHeader,
type CultNetRecordRef,
type CultNetSelection,
type CultNetSelectionOperator,
type CultNetSelectionProjection,
} from "./selection";
export {
base64ToBytes,
bytesToBase64,
canonicalFields,
canonicalRoute,
canonicalSession,
isCSharpWhiteSpace,
isLoopbackEndpoint,
isNullOrWhiteSpaceCSharp,
isProtectedEndpoint,
isUnsignedCertificate,
routeCertificateView,
trimCSharp,
verifyAuthorityRoute,
verifyP256,
verifyProviderSessionProof,
type CultMeshAuthorityIdentity,
type CultMeshAuthorityRouteCertificate,
type CultMeshAuthorityRouteView,
type CultMeshAuthorityTrustMode,
type CultMeshAuthorityTrustPolicy,
type CultMeshP256PublicKey,
} from "./cultmesh-authority";
export { encodeFrame, LengthPrefixedMessageFramer } from "./framing";
export { CultNetPeer, createTcpFramedCultNetPeer, type CultNetPeerEvents, type CultNetPeerSchemaCatalogRequestOptions, type CultNetPeerShardCatalogRequestOptions, type TcpFramedCultNetPeerOptions } from "./peer";
export {
CultNetReconnectController,
TcpFramedTransportConnection,
computeCultNetReconnectDelayMs,
createCultNetReconnectPolicy,
createTcpFramedTransportProfile,
type CultNetReconnectDecision,
type CultNetReconnectPolicy,
type CultNetReconnectPolicyOptions,
type CultNetTransportConnection,
type CultNetTransportConnectionEvents,
type CultNetTransportFrame,
type CultNetTransportStats,
type TcpFramedTransportProfileOptions,
} from "./transport";
export {
createRudpTransportProfile,
decodeRudpPacket,
encodeRudpPacket,
isPermanentSendError,
sendRudpDatagram,
rudpClientBindHost,
CULTNET_RUDP_RELIABLE_SEND_WINDOW_PACKETS,
CultNetRudpReconnectLoop,
CultNetRudpSession,
CultNetRudpSocketTransportConnection,
type CultNetRudpDeliveredFrame,
type CultNetRudpPacket,
type CultNetRudpPacketType,
type CultNetRudpReconnectLoopOptions,
type CultNetRudpReconnectTransport,
type CultNetRudpReceiveResult,
type CultNetRudpSocketTransportOptions,
type CultNetRudpSessionOptions,
type RudpTransportProfileOptions,
} from "./rudp";
export {
CultNetRudpSocketTransportServer,
type CultNetRudpSocketServerFrame,
type CultNetRudpSocketServerOptions,
type CultNetRudpSocketServerPeer,
} from "./rudp-server";
export {
invokeCultNetOperation,
startCultNetOperationServer,
type CultNetOperationClientOptions,
type CultNetOperationServer,
type CultNetOperationServerOptions,
} from "./operation-service";
export {
defineJsonSchemaContract,
type JsonSchemaContract,
type JsonSchemaContractDefinition,
} from "./json-schema-contract";
export {
CultNetDocumentRegistry,
defineCultNetDocumentBinding,
type CultNetDocumentBinding,
} from "./replication";
export {
CultNetSchemaRegistry,
CultNetSchemaCatalog,
cultNetBuiltinSchemaRegistry,
type CultNetSchemaCatalogOptions,
type CultNetSchemaRegistration,
} from "./schema-discovery";
export {
CultNetShardCatalog,
shardServes,
type CultNetShardCatalogOptions,
} from "./shard-catalog";
export {
CultNetClientSecurityOptions,
CultNetSecret,
CultNetServerSecurityOptions,
type ValidatedCultNetSessionToken,
} from "./security";
export {
createGhostlightPayloadSchemaVersionResolver,
isGhostlightAgentStateBinding,
resolveGhostlightAgentIds,
validateGhostlightAgentStateDocument,
} from "./ghostlight";
export {
ghostlightAgentStateGeneratedContract,
parseGhostlightAgentStateGenerated,
validateGhostlightAgentStateGenerated,
type GhostlightAgentStateShape,
} from "./generated/swarm-contracts.generated";
export {
CULTNET_RUDP_PROTOCOL_ID,
createSignedDaemonHealthPublisher,
parseEndpoint as parseDaemonHealthEndpoint,
publishSignedDaemonHealth,
signedDaemonHealthPayload,
signedDaemonHealthSigningMessage,
type DaemonHealth,
type SignedDaemonHealthContract,
type SignedDaemonHealthPublisher,
type SignedDaemonHealthPublisherOptions,
} from "./signed-daemon-health";
export {
GAMECULT_RUNTIME_ACTIVATION_PROOF_SIGNING_PURPOSE,
GAMECULT_RUNTIME_PRESENCE_HEALTH_SCHEMA,
GAMECULT_RUNTIME_PRESENCE_HEALTH_SIGNING_PURPOSE,
GAMECULT_RUNTIME_PRESENCE_IDENTITY_NAME,
IDUNN_RUNTIME_ACTIVATION_CREDENTIAL_NAME,
RUNTIME_PRESENCE_FIELD_COUNT,
RUNTIME_PRESENCE_SLOT,
encodeRuntimePresenceHealth,
runtimePresenceActivationSigningMessage,
runtimePresenceProofPayload,
runtimePresenceProviderSigningMessage,
validateRuntimePresence,
type GameCultRuntimeCapability,
type RuntimePresenceHealth,
type RuntimePresenceState,
} from "./runtime-presence-health";
export {
IDUNN_EXPECTED_INCARNATION_SCHEMA,
IDUNN_PROCESS_WRITE_LEASE_ENVIRONMENT,
IDUNN_PROCESS_WRITE_LEASE_SCHEMA,
IDUNN_RUNTIME_BUNDLE_ENVIRONMENT,
IDUNN_RUNTIME_CANDIDATE_BIND_ENVIRONMENT,
IDUNN_RUNTIME_ACTIVATION_SCHEMA,
createIdunnRuntimeSigner,
loadIdunnRuntimeAuthorityFromEnvironment,
type IdunnRuntimeAuthority,
type IdunnRuntimeSigner,
type IdunnRuntimeSignerOptions,
type SignedRuntimePresence,
} from "./idunn-runtime-authority";
export {
createIdunnRuntimePresencePublisher,
type IdunnRuntimePresencePublisher,
type IdunnRuntimePresencePublisherOptions,
} from "./idunn-odin-presence-publisher";
export {
LEGACY_RESULT_WINDOW_MS,
RECEIPT_RESULT_WINDOW_MS,
WriteTracker,
resultWindowMs,
type WriteRecorded,
type WriteSettlement,
type WriteState,
type WriteTrackerOptions,
type WriteUnconfirmedReason,
} from "./write-tracker";