Skip to content

Reference

Approval relay contractBeta

How a hold reaches your approvers and how the signed decision travels back. Everything the relay returns is untrusted transport, checked in your environment. With customer-held keys, which every tier uses today, the relay cannot forge a decision. It can delay a hold or misdescribe one, so check a high-stakes hold against your own log before you sign.

This is the receiver side of Lodestar's ApprovalChannel (ADR-0015). Your Lodestar proxy verifies every resolution with verifyApprovalSignature against your pinned approver keys before it acts. Machinaut carries the bytes. The trust boundary explains why that is safe. To configure the proxy, follow Send holds to your team's inbox.

announce: POST /v1/approvals

announce (wrapper form)http
POST /v1/approvals
Authorization: Bearer mk_live_…
Content-Type: application/json

{
  "project_id": "my-agent",
  "session_id": "s-2026-07-06-01",
  "request": {
    "request_id": "req-42",
    "action_id": "act-git-push",
    "reason": "push to main is high-risk",
    "required_authority": {},
    "requested_at": "2026-07-06T09:05:00Z",
    "deadline": "2026-07-06T09:20:00Z"
  }
}

→ 202 { "accepted": true, "request_id": "req-42" }

A best-effort push when a hold opens. It puts the hold in the inbox. Lodestar's proxy applies its sensitivity ceiling first, so nothing above it leaves your environment. A failed announce changes whether the hold is visible, never its outcome.

Lodestar's HTTP channel sends a bare ApprovalRequest with no project. The relay then takes project_id from the route (POST /v1/approvals/{project_id}), the x-lodestar-project-id header, or a project-scoped key.

A hold's first announce can also ping your approvers over Slack or a webhook Beta. The message links to the inbox, has no approve button, and withholds the reason above each channel's ceiling. Email notifications: Planned

fetch: GET /v1/approvals/{project_id}/{request_id}

fetchhttp
GET /v1/approvals/my-agent/req-42
Authorization: Bearer mk_live_…

→ 200   (the bare, UNTRUSTED ApprovalResolution)
{
  "request_id": "req-42",
  "action_id": "act-git-push",
  "kind": "granted",
  "approver_id": "user:alice",
  "reason": "reviewed the chain, safe",
  "at": "2026-07-06T09:10:00Z",
  "signature": {
    "signer_id": "user:alice",
    "payload_hash": "…",
    "algorithm": "ed25519",
    "signature": "base64…",
    "at": "2026-07-06T09:10:00Z"
  }
}

→ 404   while the hold is unresolved, and again once it has been consumed

Your proxy polls this. What comes back is untrusted. Verify it before acting on it.

consume: DELETE /v1/approvals/{project_id}/{request_id}

consumehttp
DELETE /v1/approvals/my-agent/req-42
Authorization: Bearer mk_live_…

→ 204   (tombstoned, not deleted: the verdict stays for audit, fetch stops serving it)

Your proxy calls this after it has verified a resolution and logged it. The hold leaves the pending inbox. Consuming an absent resolution is not an error.

The poll paths are never rate-limited

Only announce and resolve are rate-limited. A 429 on fetch, consume or the inbox poll would delay a signed resolution.

resolve: POST /v1/approvals/{project_id}/{request_id}/resolve

resolve with a signature from your environmenthttp
POST /v1/approvals/my-agent/req-42/resolve
{
  "kind": "granted",
  "approver_id": "user:alice",
  "at": "2026-07-06T09:10:00Z",
  "signature": { /* Ed25519 over the canonical document, made in your environment */ }
}

→ 200 { "resolution": { … }, "signed_by": "transport" }

Resolve is announce-first: the signed action_id comes from the stored request, never the client. The body is { kind, approver_id, reason?, at?, inputs_hash?, signature? }. Send at exactly as you signed it. Machinaut stores the signature as received and does not check it against your keys. It only refuses a signature that could never verify this document.

The console's Approve button sends no signature, so on the hosted service it gets 409 no_signing_key. The hold page offers Sign & Approve only where a managed signing key is available, and otherwise says signing happens on your side. Your approver's own signer does the signing:

sign and post a grantts
import { readFileSync } from "node:fs"
import { signApprovalResolution } from "@qmilab/lodestar-policy-kernel"

// From the hold in GET /v1/approvals/inbox. inputs_hash is set only on a bound hold.
const hold = { request_id: "req-42", action_id: "act-git-push", inputs_hash: undefined }

const doc = {
  request_id: hold.request_id,
  action_id: hold.action_id,
  kind: "granted" as const,
  approver_id: "user:alice",
  at: new Date().toISOString(),
  // A bound hold: sign its inputs_hash, and send the same value below.
  ...(hold.inputs_hash && { inputs_hash: hold.inputs_hash }),
}
const signature = signApprovalResolution(doc, readFileSync("alice.key", "utf8"))

// Send exactly the signed fields (kind, approver_id, at, and inputs_hash when
// signed). The relay takes request_id from the URL and action_id from the hold.
const { request_id, action_id, ...signed } = doc
await fetch(`https://console.machinaut.ai/v1/approvals/my-agent/${request_id}/resolve`, {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.LODESTAR_SHIP_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({ ...signed, signature }),
})

Managed keys

Planned A managed-key option will let a team that chooses it resolve from the console without its own signer. A breach of our cloud could then sign for that team, so it will be labelled the weaker option.

A late resolution is a timeout, not a grant

The deadline is checked against server receipt time, since a client at could be backdated. A late resolution gets 409 deadline_passed and the deny stands.

The resolution, and why it is untrusted

the canonical signed documenttext
{ request_id, action_id, kind, approver_id, reason?, inputs_hash?, at }

The stored ApprovalResolution is this document plus an Ed25519 signature (signer_id equal to approver_id, payload_hash over the document, algorithm: ed25519, base64 bytes). Your proxy runs verifyApprovalSignature from @qmilab/lodestar-policy-kernel against your pinned keys. That check lives entirely in your environment.

Binding: an approval names the exact action Beta

announce a bound, 2-of-N holdjsonc
{
  "project_id": "my-agent",
  "session_id": "s-2026-11-06-01",
  "request": {
    "request_id": "req-43",
    "action_id": "act-deploy",
    "reason": "deploy to prod is high-risk",
    "required_authority": {},
    "requested_at": "2026-11-06T09:05:00Z",
    "deadline": "2026-11-06T09:35:00Z",
    "action_type": "deploy.production",
    "inputs_hash": "9f2c…",      // Lodestar's actionRepresentationHash (ADR-0042)
    "quorum": 2                  // M-of-N: two distinct approvers (ADR-0041)
  }
}

Lodestar's binding (ADR-0042) ties a signed approval to the operation it covers. The host announces an action_type and an inputs_hash, and the approver signs that hash. The relay stores both exactly as sent.

  • 409 binding_mismatch is a sanity check on two values you supplied, not verification. Your host recomputes the hash from the action it is about to run.
  • If either side omits the hash, it passes.
  • The inbox shows Lodestar's approvalRepresentation (GET …/{request_id}/binding) as advisory. A redacted or unshipped record reads unavailable, never mismatch.

Quorum: M-of-N votes Beta

a second vote while the first is still queuedhttp
POST /v1/approvals/my-agent/req-43/resolve      (bob, while alice's vote is still queued)

→ 409 { "error": "vote_pending",
        "message": "a 'granted' vote by 'user:alice' is queued and not yet consumed by the host …" }

A request with quorum of 2 or more needs M distinct, eligible approvers (Lodestar quorum, ADR-0041). The channel keeps one slot per request. Each resolve records one vote. Your host fetches, verifies, logs and consumes it, then recounts with Lodestar's evaluateQuorum. Only your host writes approval.quorum_reached@1.

  • A queued vote is never replaced (vote_pending). One grant per approver, judged from your host's shipped log (already_voted). A deny is never refused.
  • The inbox keeps apart k of M verified by your host (from Lodestar's quorumRecords), relayed votes labelled unverified, and the advisory approvers_so_far.
  • The optional roster mirror (GET | PUT /v1/approvals/roster) shows who has not voted. Your pinned authorized_keys still decide who may approve.

Machinaut never counts a vote toward M

It carries votes one at a time and shows what your host shipped. The threshold, the rules and the count are Lodestar OSS, on your host.

ApprovalChannel is not ApprovalResolver

This relay is an untrusted ApprovalChannel. The ApprovalResolver is Lodestar's trusted, in-process seam that decides a hold in your host. The channel moves bytes. The resolver decides.

Errors

StatusCodeWhen
400bad_announceThe body is neither the { project_id, request } wrapper nor a bare ApprovalRequest.
400missing_projectA bare announce with no project_id from the route, the header or a project-scoped key.
400bad_resolutionThe resolve body failed validation.
400signature_mismatchsigner_id ≠ approver_id, or payload_hash ≠ the canonical hash.
403project_scope_conflictThe announce names a project other than the key's pinned one.
404not_foundUnknown or consumed request. Resolve is announce-first.
409already_consumedYour proxy already spent this hold.
409deadline_passedLate resolution. It counts as a timeout, which resolves to deny.
409no_signing_keyNo signature, and no managed key (none exists on the hosted service).
409binding_mismatchThe resolution's inputs_hash contradicts the held request's, or a re-announce would rebind a bound hold.
409vote_pendingQuorum hold: another vote waits in the slot. Retry once your host consumes it.
409already_votedQuorum hold: this approver's grant is already in your host's shipped log, or this exact vote was relayed. A deny is never refused.
409hold_terminalQuorum hold: your host's shipped log already shows the quorum record or the hold's closure.

What is whose

Signature checks, binding, the quorum count, redaction and sentinels are Lodestar OSS, in your environment. Machinaut adds the relay, the inbox, notifications and the display. See also the attestation gate, the ingest contract and the API reference.