Skip to main content

Protocol and HTTP primitives

Two packages hold definitions shared by Titan and the browser client. Most applications use the higher-level server and client APIs. These packages matter when building an adapter, inspecting the wire contract or diagnosing compatibility.

@omnitron-dev/netron-protocol​

Export familyPurpose
Uid, uuid, MAX_UID_VALUEIdentifier generation and its wire limit
Definition, ReferenceService definitions and remote references
ServiceContract, ServiceMetadata, ArgumentInfo, MethodInfo, PropertyInfoShared service-description types
Packet, createPacket, TYPE_*, StreamTypePacket construction, operation codes and stream kinds
ErrorCode, ErrorCategory, ERROR_METADATAError taxonomy shared by the two ends
TitanError, AggregateError, ErrorPoolStructured failures
createError, ensureError, isErrorCodeError construction and narrowing
isClientError, isServerError, isRetryableError, getErrorCategory, toHttpStatusClassification for callers and transports
getErrorName, getDefaultMessageStable names and fallback descriptions

The package has no runtime dependencies. It is more than a set of numeric constants: service definitions, packet shapes and the error hierarchy are also shared. Check the API index for the exact exports in the current source tree.

A compatible packet does not establish authentication or validate a business payload. Keep those concerns at their documented boundaries. Do not assign private meanings to an existing operation code; both peers must agree on any protocol extension.

@omnitron-dev/netron-http-core​

ExportResponsibility
HttpCacheManagerShared HTTP cache mechanics
RetryManagerRetries and circuit-breaker behaviour
QueryBuilderQuery configuration
ConfigurableProxyFluent request configuration around an executor
IHttpRequestExecutorAdapter contract for executing a configured request
HttpRequestContext, HttpRequestHints, HttpRequestMessageRequest types shared by adapters
HttpCoreLoggerMinimal logging contract

The companion types include CacheOptions, CacheStats, RetryOptions, RetryStats, CircuitBreakerOptions and QueryOptions. This entry point does not export a RequestBatcher.

Prefer the browser client's HTTP interface unless you are implementing an executor. Define ownership for cache invalidation, cancellation and disposal. Retry a side-effecting request only when the operation's idempotency contract permits it.

Upgrade server and client deliberately​

Pin application dependencies and preserve the lockfile. Compile against the intended contract, then exercise a real call and an error round trip. Already-deployed clients do not acquire a new contract when the server is rebuilt. See compatibility and serialization.