@zephyrcloudio/harness-schema

Shared Effect schemas and TypeScript types for Ze Harness domain, persistence, and wire values.

Import branded IDs and validated values from the package root:

import { ModelRef, PermissionRule, SessionId, TurnId } from '@zephyrcloudio/harness-schema';

This is the lowest workspace boundary and imports no other workspace package. It contains values, not runtime services, config loading, or transport behavior.

Permission values include ordered rules, Tool projections, durable requests and replies, saved Session grants, versioned Session configuration, and the exact effective policy stored with admitted work. Evaluation and persistence remain Core responsibilities.

Catalog and connection schemas include CatalogSnapshot, SafeProviderConnection, HostCatalogRevision, and ConnectionId. They define the host-scoped model discovery and provider connection contracts used across all transports without exposing secrets.

TURN_FAULT_CODES lists every TurnFault.code the harness itself mints, and KnownTurnFaultCode is its union. The harness types its own fault constructors against the list, so a new harness code cannot ship without appearing here. Consumers that render faults can map it exhaustively, for example const labels = { ... } satisfies Record<KnownTurnFaultCode, string>, and fall back for anything else: TurnFault.code stays an open string because plugins, Tools, and providers mint their own codes, and the MCP runtime forwards transport reasons as mcp_<reason>.