@agentkernel/shared

v0.1.1

Published

Shared types, utilities, and constants for AgentKernel

Readme

@agentkernel/shared

Shared types, utilities, and constants for the AgentKernel monorepo.

Installation

pnpm add @agentkernel/shared

What's Included

  • Result typesOk<T> and Err<E> for type-safe error handling (neverthrow pattern)
  • Shared constants — Common configuration defaults and limits
  • Type definitions — Shared TypeScript interfaces used across packages

Usage

import { ok, err, type Result } from '@agentkernel/shared';

function parseConfig(input: string): Result<Config, Error> {
  try {
    return ok(JSON.parse(input));
  } catch (e) {
    return err(new Error('Invalid config'));
  }
}

See the main repo for full documentation.

License

MIT