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
| Export | Description |
|---|---|
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, validateBootstrapStorage | Fail-fast checks for file-wire and storage options (also used when configuring attachCatRPC). |
Types: BootstrapOptions, BootstrapResult, BootstrapStorageOptions, StorageAdapter, HostMinioOptions | Type source: bootstrap.ts; nested fields documented under attachCatRPC. |
Registration and return labels
| Export | Description |
|---|---|
Cat | Decorator for class methods. |
CatClass, CatService | Register class constructor for RPC singleton fallback. |
cat, catModule, CatFunctionOptions | Functional registration. |
registerInstance, registerClassConstructor | Instance and constructor registration for class-style RPC. |
Return, Throw, ApiReturn | Label return, error, and HTTP-style API paths. |
getType, getShape, ApiPayload, Labeled | Utilities. |
AST
| Export | Description |
|---|---|
runASTScanner, RunAstScannerOptions | Produce AST rows for registered fnKeys. |
mergeASTIntoRegistry | Merge scanner output into the live registry. |
getAllTsFiles, GetAllTsFilesOptions | File discovery helper used by scanning. |
Express and HTTP bridge
| Export | Description |
|---|---|
registerCatPipeline, pipelineIdForRoute, HttpMethod | Mount instrumented handlers on an Express Router. |
createInspectorCorrelationMiddleware (@gloocan/cat-inspector/socket-io) | QA pipeline: route HTTP inspector events via x-socket-id. |
createCorrelationMiddleware | Optional X-Correlation-Id / req.correlationId for tracing. |
invokeExpressSynthetic | In-process HTTP call against an Express app (tests / tooling). |
registerHttpBridgeRoute, clearHttpBridgeRegistry, HttpBridgeSpec | Map an RPC fnKey to synthetic HTTP invoke. |
RPC, validation, serialization
| Export | Description |
|---|---|
executeRPC | Invoke a registered function by fnKey with positional args. |
validateArgsAgainstParamsJsonSchema, resetParamsJsonSchemaValidators | Params JSON Schema validation. |
registerParamsJsonSchema | Attach tuple-style params schema to a registry entry (see Params JSON Schema). |
registerReturnJsonSchema, resetReturnJsonSchemaValidators | Return JSON Schema registration and reset. |
serializeRpcResult, maybeSerializeRpcResult, setRpcSerializationConfig, resetRpcSerializationConfig, SerializeRpcResultError, RpcSerializationOptions | Serialization. |
Invoke policy and runtime
| Export | Description |
|---|---|
registerPreInvoke, registerInvokeAudit, configureInvokeRateLimit, resetInvokePolicy | Hooks and rate limits (see policy pages). |
PreInvokeHook, PreInvokeContext, InvokeAuditEvent, InvokeTransport | Types for policy hooks. |
getInvokeTimeoutMs, setInvokeTimeoutMs, resetInvokeTimeoutMs | Global invoke timeout. |
Transports
| Export | Description |
|---|---|
startInspectorWebSocket, InspectorWebSocketOptions, InspectorWebSocketHandle | Embedded WebSocket inspector. |
startRemoteInspectorBridge, RemoteInspectorBridgeOptions, RemoteInspectorBridgeHandle | Local bridge proxy to an existing inspector WebSocket. |
@gloocan/cat-inspector/socket-io: attachCatRPC, AttachCatRPCOptions, AttachCatRPCHooks, AttachCatRPCHandle, INSPECTOR_BROADCAST_EVENT, createInspectorCorrelationMiddleware, playground mocks types | Socket.IO. |
Uploads and materialization
| Export | Description |
|---|---|
fetchFileUrl, isHostnameAllowed, FetchFileUrlOptions | SSRF-safe URL fetch for __qaFileUrl. |
parseHostMinioEndpoint, putBufferAndPresignGetUrl, related types | Host-side Minio helpers (credentials stay on host). |
buildCatalogWireExtras, enrichRegistryParamsWithWireHints, normalizeExpressPayloadFilesForPlayground, publicFileUrlCatalogSlice, CatalogWireExtras, MaterializeServiceWireOptions | Uploads overview and wire hints. |
Jobs, sessions, registry utilities
| Export | Description |
|---|---|
InMemoryJobRegistry | Demo job registry with JOB_PROGRESS broadcasts. |
sessionCreate, sessionStep, resetSessionStore | Session API and test reset. |
broadcast, broadcastJobProgress, broadcastReturnResolved, broadcastErrorThrown, broadcastApiResponse, setBroadcastSink, clearBroadcastSink, runWithInspectorBroadcastTarget, readInspectorSocketIdFromHeaders, INSPECTOR_SOCKET_ID_HEADER | Inspector fan-out (see Jobs and broadcasts). |
Registry, ActiveContext, ApiContext, InstanceRegistry, LabelCapture, ErrorCapture, wsClients, AutoInstanceRegistry, ClassConstructorRegistry, resetInspectorState, Express capture readers | Advanced registry and test hooks; prefer section links over ad-hoc use. |
getInspectorBroadcastStore, runWithInspectorBroadcastTarget | Scoped broadcast routing. |
Coverage and OpenAPI
| Export | Description |
|---|---|
scanExpressCandidates, scanReachableServices, computeCoverageReport, ComputeCoverageOptions, CoverageReport, CandidateKind, CandidateRef, CoverageCandidates | Coverage. |
exportRegistryOpenApi | OpenAPI 3.1 document from a registry snapshot. |
Graph and type helpers
| Export | Description |
|---|---|
analyzeRelationships, buildTree, groupApiPipelines, resolveRelationships | Advanced utilities. |
normalizeReturnTypeForRpcCompare, typesMatchForRpc, peelOuterLabeled, splitTopLevelUnion | Return-type string helpers. |
extractParamNames, extractReturnLabels, extractThrowLabels, extractApiReturnLabels, getFunctionBody | Source-derived label discovery. |
extractArtifactsFromResult | Collect RpcArtifactRef-shaped entries from nested handler results for RPC responses. |
Wire types and protocol
| Export | Description |
|---|---|
types: RegistryEntry, RpcResponse, RpcErrorDetail, RpcArtifactRef, CatMode, bootstrap and inspector event types, SessionStateWireMessage, JobProgressWireEvent, … | Types glossary. |
Logging
| Export | Description |
|---|---|
createLogger, Logger, LogLevel | Logger. |
See also
- Testing and resets —
resetInspectorState, serializer and policy resets for tests.