This repository has been archived on 2026-06-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
xiaoju 9bf0b2abb8 fix: PR #81 review follow-ups (closes #83)
- 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)
2026-04-24 11:09:31 +00:00
..

@uncaged/nerve-core

Shared types and configuration parser for the nerve observation engine.

What's Inside

  • Type definitionsSignal, SenseConfig, ReflexConfig, WorkflowConfig, NerveConfig, and all related types
  • Config parserparseNerveConfig(yaml) validates and parses nerve.yaml into a typed NerveConfig
  • Result typeResult<T> with ok() / 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 seconds
  • 10m — 10 minutes
  • 1h — 1 hour

Install

pnpm add @uncaged/nerve-core

License

MIT