🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@cesteral/contract-schema

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cesteral/contract-schema

Canonical governance-contract surface (annotations, manifest, dry-run, contractId) shared by Cesteral MCP servers and governance

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

@cesteral/contract-schema

The canonical governance-contract surface for the Cesteral MCP ecosystem — the single source of truth shared by the MCP servers (mcp-open-advertising) and the governance layer (cesteral-intelligence).

Where @cesteral/contract-hash owns how a tool definition is hashed, this package owns the shape of what gets governed:

  • Tool annotations — the cesteral.* namespace, in two deliberately different-strictness faces:
    • Authoring types (CesteralToolAnnotations, CesteralEntityWriteToolAnnotations, …) — the strict contract MCP-server authors write against with satisfies.
    • Validation schema (cesteralAnnotationSchema, parseCesteralAnnotation) — the loose shape governance parses untrusted tool lists with, so it can apply contract-promise checks (requiresValidation, …) as specific admission reason codes rather than a generic parse failure.
  • Canonical enumsCESTERAL_WRITE_OPERATIONS / writeOperationSchema and canonicalEntityKindSchema / CanonicalEntityKind.
  • contractId derivationderiveContractId, safeDeriveContractId, slugSchema.
  • Governed response shapesdryRunResultSchema, normalizedEntitySnapshotSchema, dispatchedCapabilitySchema, effectDryRunResultSchema, and their TS mirrors.
  • Release attestation manifestcesteralManifestSchema.
import {
  parseCesteralAnnotation,
  deriveContractId,
  cesteralManifestSchema,
} from "@cesteral/contract-schema";

const parsed = parseCesteralAnnotation(tool.annotations?.cesteral);
if (parsed.success) {
  // parsed.data.contractId === deriveContractId(slug, slug, version)
}

Each TS authoring type and its Zod validation mirror are pinned together by the package's type-tests — the two faces cannot silently drift, and any value satisfying an authoring type is guaranteed to parse under the schema.

Keywords

mcp

FAQs

Package last updated on 22 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts