npm.io
2.1.0 • Published 3d ago

@reticlehq/core

Licence
Apache-2.0
Version
2.1.0
Deps
1
Size
355 kB
Vulns
0
Weekly
0
Stars
178

@reticlehq/core

The foundation of Reticle — the shared wire contract that every Reticle package imports: types, zod schemas, constants, and the messages that cross the browser bridge agent boundary. It is isomorphic (runs in a browser or in Node), depends only on zod, and re-exports nothing.

Most people never install this directly. Install the package for your audience instead:

  • Browser app: npx @reticlehq/server init (wires @reticlehq/react + a build plugin)
  • Agent / MCP: npx @reticlehq/server mcp
  • CI specs: @reticlehq/test

See the main README and MIGRATION.md.

The wire contract as JSON Schema

@reticlehq/core ships machine-readable JSON Schema for the wire contract under dist/schema/, generated from the zod schemas so the two can never drift (a parity test enforces it). This is the conformance target for non-TypeScript SDKs: a Python, Go, or Rust SDK validates its messages against these schemas without importing the TypeScript library.

import reticleMessage from '@reticlehq/core/schema/reticle-message.json' with { type: 'json' };

Shipped schemas: reticle-message, reticle-event, hello-message, command-message, command-result, event-message, event-type.

License

Apache-2.0.

Keywords