9bf0b2abb8
- Filter __start__ messages in getThreadRoundCount SQL to fix round offset
- Remove duplicate parseWorkflowField, use parseSenseWorkflowDirective
- Remove unnecessary double casts in workflow CLI
- Add runtime validation for Role meta in workflow-worker
- Export DEFAULT_ENGINE_MAX_ROUNDS from types.ts
小橘 🍊(NEKO Team)
@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