Skip to Content

API index

This site documents the public surface of @gloocan/cat-inspector: function signatures, options objects, wire types, and behavior you can rely on when integrating. It does not walk internal implementation details.

Package entry: @gloocan/cat-inspector. Optional subpath: @gloocan/cat-inspector/socket-io (Socket.IO playground transport).

Getting started and lifecycle

ExportDescription
attachCatRPC (subpath @gloocan/cat-inspector/socket-io)Primary host integration: catalog over Socket.IO, RPC, uploads, hooks. Takes scanRoots, nested catalog options, secretApiKey, rpcAuth, and so on.
bootstrap (@gloocan/cat-inspector)Optional standalone one-shot startup (AST + registry + optional embedded WebSocket). Prefer attachCatRPC for Gloocan QA web.
validateBootstrapFileWire, validateBootstrapStorageFail-fast checks for file-wire and storage options (also used when configuring attachCatRPC).
Types: BootstrapOptions, BootstrapResult, BootstrapStorageOptions, StorageAdapter, HostMinioOptionsType source: bootstrap.ts; nested fields documented under attachCatRPC.

Registration and return labels

ExportDescription
CatDecorator for class methods.
CatClass, CatServiceRegister class constructor for RPC singleton fallback.
cat, catModule, CatFunctionOptionsFunctional registration.
registerInstance, registerClassConstructorInstance and constructor registration for class-style RPC.
Return, Throw, ApiReturnLabel return, error, and HTTP-style API paths.
getType, getShape, ApiPayload, LabeledUtilities.

AST

ExportDescription
runASTScanner, RunAstScannerOptionsProduce AST rows for registered fnKeys.
mergeASTIntoRegistryMerge scanner output into the live registry.
getAllTsFiles, GetAllTsFilesOptionsFile discovery helper used by scanning.

Express and HTTP bridge

ExportDescription
registerCatPipeline, pipelineIdForRoute, HttpMethodMount instrumented handlers on an Express Router.
createInspectorCorrelationMiddleware (@gloocan/cat-inspector/socket-io)QA pipeline: route HTTP inspector events via x-socket-id.
createCorrelationMiddlewareOptional X-Correlation-Id / req.correlationId for tracing.
invokeExpressSyntheticIn-process HTTP call against an Express app (tests / tooling).
registerHttpBridgeRoute, clearHttpBridgeRegistry, HttpBridgeSpecMap an RPC fnKey to synthetic HTTP invoke.

RPC, validation, serialization

ExportDescription
executeRPCInvoke a registered function by fnKey with positional args.
validateArgsAgainstParamsJsonSchema, resetParamsJsonSchemaValidatorsParams JSON Schema validation.
registerParamsJsonSchemaAttach tuple-style params schema to a registry entry (see Params JSON Schema).
registerReturnJsonSchema, resetReturnJsonSchemaValidatorsReturn JSON Schema registration and reset.
serializeRpcResult, maybeSerializeRpcResult, setRpcSerializationConfig, resetRpcSerializationConfig, SerializeRpcResultError, RpcSerializationOptionsSerialization.

Invoke policy and runtime

ExportDescription
registerPreInvoke, registerInvokeAudit, configureInvokeRateLimit, resetInvokePolicyHooks and rate limits (see policy pages).
PreInvokeHook, PreInvokeContext, InvokeAuditEvent, InvokeTransportTypes for policy hooks.
getInvokeTimeoutMs, setInvokeTimeoutMs, resetInvokeTimeoutMsGlobal invoke timeout.

Transports

ExportDescription
startInspectorWebSocket, InspectorWebSocketOptions, InspectorWebSocketHandleEmbedded WebSocket inspector.
startRemoteInspectorBridge, RemoteInspectorBridgeOptions, RemoteInspectorBridgeHandleLocal bridge proxy to an existing inspector WebSocket.
@gloocan/cat-inspector/socket-io: attachCatRPC, AttachCatRPCOptions, AttachCatRPCHooks, AttachCatRPCHandle, INSPECTOR_BROADCAST_EVENT, createInspectorCorrelationMiddleware, playground mocks typesSocket.IO.

Uploads and materialization

ExportDescription
fetchFileUrl, isHostnameAllowed, FetchFileUrlOptionsSSRF-safe URL fetch for __qaFileUrl.
parseHostMinioEndpoint, putBufferAndPresignGetUrl, related typesHost-side Minio helpers (credentials stay on host).
buildCatalogWireExtras, enrichRegistryParamsWithWireHints, normalizeExpressPayloadFilesForPlayground, publicFileUrlCatalogSlice, CatalogWireExtras, MaterializeServiceWireOptionsUploads overview and wire hints.

Jobs, sessions, registry utilities

ExportDescription
InMemoryJobRegistryDemo job registry with JOB_PROGRESS broadcasts.
sessionCreate, sessionStep, resetSessionStoreSession API and test reset.
broadcast, broadcastJobProgress, broadcastReturnResolved, broadcastErrorThrown, broadcastApiResponse, setBroadcastSink, clearBroadcastSink, runWithInspectorBroadcastTarget, readInspectorSocketIdFromHeaders, INSPECTOR_SOCKET_ID_HEADERInspector fan-out (see Jobs and broadcasts).
Registry, ActiveContext, ApiContext, InstanceRegistry, LabelCapture, ErrorCapture, wsClients, AutoInstanceRegistry, ClassConstructorRegistry, resetInspectorState, Express capture readersAdvanced registry and test hooks; prefer section links over ad-hoc use.
getInspectorBroadcastStore, runWithInspectorBroadcastTargetScoped broadcast routing.

Coverage and OpenAPI

ExportDescription
scanExpressCandidates, scanReachableServices, computeCoverageReport, ComputeCoverageOptions, CoverageReport, CandidateKind, CandidateRef, CoverageCandidatesCoverage.
exportRegistryOpenApiOpenAPI 3.1 document from a registry snapshot.

Graph and type helpers

ExportDescription
analyzeRelationships, buildTree, groupApiPipelines, resolveRelationshipsAdvanced utilities.
normalizeReturnTypeForRpcCompare, typesMatchForRpc, peelOuterLabeled, splitTopLevelUnionReturn-type string helpers.
extractParamNames, extractReturnLabels, extractThrowLabels, extractApiReturnLabels, getFunctionBodySource-derived label discovery.
extractArtifactsFromResultCollect RpcArtifactRef-shaped entries from nested handler results for RPC responses.

Wire types and protocol

ExportDescription
types: RegistryEntry, RpcResponse, RpcErrorDetail, RpcArtifactRef, CatMode, bootstrap and inspector event types, SessionStateWireMessage, JobProgressWireEvent, …Types glossary.

Logging

ExportDescription
createLogger, Logger, LogLevelLogger.

See also