Cat modes
CatMode is 'service' | 'api_candidate' | 'api'. It is stored on each RegistryEntry as mode.
Values
| Mode | Typical source | Meaning |
|---|---|---|
service | Class or function without Express req/res shape | Domain / application RPC. |
api_candidate | Handler in an Express pipeline before the final handler, or cat with req+res but no explicit route | Treated as middleware in a pipeline until registerCatPipeline marks the last handler as api. |
api | Final pipeline handler, or cat(..., { route }) | Express endpoint; ApiReturn labels attach to this fnKey. |
RPC and class instances
For style: 'class', executeRPC resolves the instance in order: explicit registerInstance, cached auto-singleton, or new Service() when the constructor was registered via @Cat / CatClass. If no instance is available and the method is not callable, the error label is NO_INSTANCE.
For style: 'function', the registered function is invoked directly—no instance step.
See Registration and RPC pipeline.