@uncaged/nerve-core
Shared types and configuration parser for the nerve observation engine.
What's Inside
- Type definitions —
Signal,SenseConfig,ReflexConfig,WorkflowConfig,NerveConfig, and all related types - Config parser —
parseNerveConfig(yaml)validates and parsesnerve.yamlinto a typedNerveConfig - Result type —
Result<T>withok()/err()helpers for explicit error handling (no thrown exceptions)
Usage
import { parseNerveConfig, ok, err } from "@uncaged/nerve-core";
import type { NerveConfig, Signal, Result } from "@uncaged/nerve-core";
const result: Result<NerveConfig> = parseNerveConfig(yamlString);
if (result.ok) {
console.log(result.value.senses);
}
Duration Format
Config fields like throttle, timeout, and interval accept human-readable durations:
5s— 5 seconds10m— 10 minutes1h— 1 hour
Install
pnpm add @uncaged/nerve-core
License
MIT