npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/agent-mesh

v1.0.0

Published

Core domain types and configuration for agent-mesh

Readme

@reaatech/agent-mesh

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Core domain types, Zod validation schemas, environment configuration, and shared constants for the agent-mesh multi-agent orchestrator. This package is the single source of truth for all protocol shapes used throughout the @reaatech/agent-mesh-* ecosystem.

Installation

npm install @reaatech/agent-mesh
# or
pnpm add @reaatech/agent-mesh

Feature Overview

  • 15+ exported types and Zod schemas — every domain entity has a matching runtime validation schema
  • Environment configuration — Zod-validated env object with 30+ configurable variables, fail-fast on missing required vars
  • Shared constants — service metadata, TTLs, size limits, rate-limit headers, SSRF protection patterns, and Pub/Sub collection names
  • Zero runtime dependencies beyond zod — lightweight and tree-shakeable
  • Dual ESM/CJS output — works with import and require

Quick Start

import {
  IncomingRequestSchema,
  type IncomingRequest,
  AgentResponseSchema,
  type AgentResponse,
} from "@reaatech/agent-mesh";

// Validate an incoming request at the boundary
const raw = JSON.parse(req.body);
const parsed = IncomingRequestSchema.parse(raw);

// Validate an agent's response before returning to the user
const agentResponse = AgentResponseSchema.parse({
  content: "I've reset your password. Check your email.",
  workflow_complete: true,
});

Exports

Request / Response Types

| Export | Description | |--------|-------------| | IncomingRequestSchema / IncomingRequest | Validated HTTP request body for /v1/request | | EmployeeProfileSchema / EmployeeProfile | Resolved user identity from profile systems | | AgentResponseSchema / AgentResponse | Validated agent response with content, workflow_complete, and workflow_state |

Classifier Types

| Export | Description | |--------|-------------| | ClassifierOutputSchema / ClassifierOutput | Structured Gemini classifier output: agent_id, confidence, ambiguous, detected_language, intent_summary, entities |

Agent Configuration

| Export | Description | |--------|-------------| | AgentConfigSchema / AgentConfig | YAML agent registration schema: agent_id, display_name, description, endpoint, confidence_threshold, examples, etc. |

Routing Types

| Export | Description | |--------|-------------| | ContextPacketSchema / ContextPacket | Full context bundle passed to agents: session_id, request_id, employee_id, raw_input, intent_summary, entities, turn_history, workflow_state | | ConfidenceDecisionSchema / ConfidenceDecision | Routing decision: action (route/clarify/fallback), agent_id, confidence, reason, clarification_question |

Session Types

| Export | Description | |--------|-------------| | SessionRecordSchema / SessionRecord | Firestore session document: session_id, user_id, status, active_agent, turn_history, workflow_state, ttl | | TurnEntrySchema / TurnEntry | Single conversation turn: role, content, timestamp, intent_summary | | SessionStatus | Union type: active, completed, abandoned, error |

Circuit Breaker Types

| Export | Description | |--------|-------------| | CircuitBreakerStateSchema / CircuitBreakerState | Per-agent state: agent_id, state (CLOSED/OPEN/HALF_OPEN), failure_count, success_count, backoff_multiplier | | CircuitState | Union type: CLOSED, OPEN, HALF_OPEN |

Health Check Types

| Export | Description | |--------|-------------| | HealthStatusSchema / HealthStatus | Health check response: status, version, uptime_ms, checks map |

Configuration

| Export | Description | |--------|-------------| | env | Zod-validated environment object with 30+ typed config variables | | Env | TypeScript type inferred from the environment schema |

Constants

| Export | Description | |--------|-------------| | SERVICE_NAME / SERVICE_VERSION | Service metadata | | MAX_YAML_FILE_SIZE / MAX_REQUEST_BODY_SIZE | Size guards | | CACHE_TTL | TTL constants for API key, Slack profile, and clarification caches | | RATE_LIMIT_HEADERS | Standard rate-limit response header names | | PRIVATE_IP_RANGES | Regex patterns blocking localhost and private IPs (SSRF protection) | | SUPPORTED_LANGUAGES / DEFAULT_LANGUAGE | 58 ISO 639-1 language codes for i18n | | PUBSUB_TOPICS / FIRESTORE_COLLECTIONS | GCP resource naming constants | | MCP | MCP protocol version and method names | | CONFIDENCE / SESSION | Threshold boundaries and session defaults |

Usage Pattern

Every schema export has a matching type export. Use the schema for runtime validation and the type for compile-time checking:

import { IncomingRequestSchema, type IncomingRequest } from "@reaatech/agent-mesh";

function handleRequest(raw: unknown): IncomingRequest {
  return IncomingRequestSchema.parse(raw);
}

Related Packages

License

MIT