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
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}
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 consumedYour proxy polls this. What comes back is untrusted. Verify it before acting on it.
consume: DELETE /v1/approvals/{project_id}/{request_id}
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
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
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:
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
A late resolution is a timeout, not a grant
at could be backdated. A late resolution gets 409 deadline_passed and the deny stands.The resolution, and why it is untrusted
{ 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
{
"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_mismatchis 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
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 advisoryapprovers_so_far. - The optional roster mirror (
GET | PUT /v1/approvals/roster) shows who has not voted. Your pinnedauthorized_keysstill decide who may approve.
Machinaut never counts a vote toward M
ApprovalChannel is not ApprovalResolver
Errors
| Status | Code | When |
|---|---|---|
| 400 | bad_announce | The body is neither the { project_id, request } wrapper nor a bare ApprovalRequest. |
| 400 | missing_project | A bare announce with no project_id from the route, the header or a project-scoped key. |
| 400 | bad_resolution | The resolve body failed validation. |
| 400 | signature_mismatch | signer_id ≠ approver_id, or payload_hash ≠ the canonical hash. |
| 403 | project_scope_conflict | The announce names a project other than the key's pinned one. |
| 404 | not_found | Unknown or consumed request. Resolve is announce-first. |
| 409 | already_consumed | Your proxy already spent this hold. |
| 409 | deadline_passed | Late resolution. It counts as a timeout, which resolves to deny. |
| 409 | no_signing_key | No signature, and no managed key (none exists on the hosted service). |
| 409 | binding_mismatch | The resolution's inputs_hash contradicts the held request's, or a re-announce would rebind a bound hold. |
| 409 | vote_pending | Quorum hold: another vote waits in the slot. Retry once your host consumes it. |
| 409 | already_voted | Quorum hold: this approver's grant is already in your host's shipped log, or this exact vote was relayed. A deny is never refused. |
| 409 | hold_terminal | Quorum hold: your host's shipped log already shows the quorum record or the hold's closure. |
What is whose