Automation API

Transports and framing

bluep api uses one compact JSON-RPC request per input line. HTTP uses POST /api/rpc.

Starting stdio

Run bluep api --model model-directory; responses are written only for requests with an id.

HTTP/team authorization

Team viewers may read and editors may apply changes. Authentication happens before RPC dispatch.

Envelope

Requests use JSON-RPC 2.0 with jsonrpc, id, method, and object params.

Notifications

An omitted id executes without a response.

Errors/codes

Protocol errors use the standard -32700 through -32603 range; model state errors use -32001 onward.

Root/path confinement

All paths are confined beneath the configured root.

Method discovery

rpc.discover returns supported methods and whether each mutates a model.

model.open

Open the configured model with { "dir": "." }.

model.check

Returns validation issues.

model.list

Lists stable object keys by kind.

model.get

Fetches one object by selector.

model.apply

Applies Phase 42 editor actions with a base fingerprint.

generate.run

Generates DDL, diagrams, or documentation.

diff.run

Compares an open model with a current source.

migrate.plan

Plans a target migration.

lint.run

Runs lint with a minimum severity.

impact.run

Returns impact analysis for a selector or comparison.

report.run

Renders a built-in report family.

Binary base64

Binary report data uses padded RFC 4648 base64.

Compatibility policy

New methods are additive; existing response fields retain their meaning.