Rensei docs

Consent one host to run one binary for the exact command set its accepted contracts need (org admin, humans only).

Records consented_by as the authenticated human. The subcommand set must equal the union of every accepted contract for the binary; a binary with no accepted contract is refused. Any change to a live consent is a new row with the old one revoked in the same transaction; re-sending the identical consent returns the live row with created=false.

POST
/api/org/{orgId}/bridge-consents

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Path Parameters

orgId*string

Organization id (must match the authenticated org).

Request Body

application/json
  1. body
hostId*string

Durable host id (worker_hosts.id, wh_*) in this org.

Length1 <= length <= 256
binaryName*string

Binary name as named by the accepted contracts, e.g. wacli.

Match^[a-z][a-z0-9-]{1,31}$
subcommandSet*array<>

The command paths shown to the person. Must equal the union every accepted contract for the binary needs.

Items1 <= items <= 256
versionConstraint?|

Optional semver range the host binary must satisfy.

Lengthlength <= 64
hostParams?|

Values for host parameters the contracts declare (e.g. an account), validated against each declaring slot.

Response Body

The identical consent is already live; nothing written.

application/json
  1. response
consent*
created*boolean
replacedConsentId*null
Example Request
curl -X POST 'https://app.rensei.ai/api/org/string/bridge-consents' \  -H 'Content-Type: application/json' \  -d '{  "hostId": "string",  "binaryName": "string",  "subcommandSet": [    "string"  ]}'
Example Response
{  "consent": {    "id": "string",    "hostId": "string",    "binaryName": "string",    "subcommandSet": [      "string"    ],    "subcommandSetSha256": "string",    "versionConstraint": "string",    "hostParams": {      "property1": "string",      "property2": "string"    },    "source": "string",    "consentedBy": "string",    "consentedAt": "string",    "revokedBy": "string",    "revokedAt": "string"  },  "created": false,  "replacedConsentId": null}