Skip to content

workingclassbuddha/constraint-net

Repository files navigation

Constraint Net

Constraint Net protocol network

CI License: Apache-2.0 Status: Public Alpha

Constraint Net is an open protocol and reference gateway for agent-safe action discovery, planning, consent-gated execution, and verifiable receipts.

It is a public-alpha foundation for the internet for agents: publishers expose signed capabilities at .well-known/constraint-net/actions.json; agents ingest those manifests, plan across a capability graph, pause for human consent when risk requires it, execute with idempotency keys, and return signed receipt chains that can be verified outside the running process.

Status: Public Alpha

Constraint Net is ready for public protocol review, local experiments, and small demo integrations. It is not production key custody, not a hosted network, and not a claim that real-world publishers have opted in.

The current gateway uses in-memory state, a public development signing key, and mock OpenAPI-backed execution. Those choices keep the alpha easy to run and verify locally; production deployments must replace them with durable storage, publisher-owned keys, real OpenAPI operation resolution, monitoring, and operational controls.

This alpha demonstrates a safe, reversible customer-service workflow:

return.check_eligibility -> return.create -> pickup.schedule

The repository includes:

  • actions.json-style manifest schema and validation.
  • .well-known/constraint-net/actions.json manifest discovery.
  • A SoundMart demo manifest.
  • Manifest ingestion at POST /v1/manifests.
  • Generic capability graph planning from action metadata.
  • Tier 0-2 preflight and confirmation rules.
  • Idempotent, replay-safe execution.
  • Mock OpenAPI-backed execution.
  • Signed intent, consent, and execution receipts with chain verification.
  • A minimal constraint-net CLI.
  • A Fastify browser demo console at /.

Run

pnpm install
pnpm dev

Open:

http://127.0.0.1:4173

Verify

pnpm test
pnpm typecheck

Protocol Quickstart

pnpm cli validate examples/soundmart/actions.json
pnpm dev
pnpm cli ingest-url http://127.0.0.1:4173/.well-known/constraint-net/actions.json --server http://127.0.0.1:4173
pnpm cli plan --goal "Return my headphones from SoundMart and choose the fastest free pickup" --merchant soundmart.example --server http://127.0.0.1:4173

Demo Flow

In the browser console:

  1. Run coherence search.
  2. Preflight return.
  3. Confirm.
  4. Execute.
  5. Preflight pickup.
  6. Confirm.
  7. Execute.

The executions return signed receipt IDs for intent, consent, and execution.

API

  • GET /v1/health
  • POST /v1/manifests
  • POST /v1/manifests/ingest-url
  • POST /v1/actions/search
  • POST /v1/executions/preflight
  • POST /v1/confirmations/:id/decision
  • POST /v1/executions
  • GET /v1/receipts/:id
  • POST /v1/receipts/verify

Docs

Launch Boundaries

  • Consent first: Tier 2 side effects require confirmation and reversible metadata.
  • Replay safe: execution requires idempotency keys and blocks conflicting replays.
  • Verifiable: receipts are signed and can be checked outside the running process.
  • Alpha only: the committed development issuer key is intentionally public and only supports reproducible examples.
  • Local only: manifests, confirmations, executions, and receipts are stored in memory in this gateway.

Releases

No releases published

Packages

 
 
 

Contributors