pub.techne.draft.commons.grantProviderAllowance
Grant an allowance of paid provider (Jev, or Claude for venue research and the short line) calls beyond a daily cap, for an intentional batch (a backfill), valid until `expiresAt`, with a required reason. Recorded on the rules runner under the caller's DID: only an operator's DID may grant, never the shared token (refused with Forbidden); the daily cap stays the runaway-loop guard and nothing else raises it. Calls past the cap are reserved from live grants, oldest expiry first; a grant that expires or is used up stops adding. Forwarded to the runner's POST /v1/provider/grants. Operator only. The credential is `Authorization: Bearer <credential>`: an atproto service-auth JWT signed by a DID the commons root names as an operator (a pub.techne.draft.operator record; `aud` = the Commons API's service-account DID, not the commons root's, `lxm` = this method), or the Commons API's APICOOP_OPERATOR_TOKEN. Without one the call is refused with AuthRequired; with one that is not an operator's, Forbidden; when the Commons API can check neither, NotConfigured. Typed to confirm: the call needs `confirm` = `calls` in digits (see `confirm`), or it is refused with ConfirmationRequired.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | commons.draft.techne.pub |
| Commit rev | 3n3iob3iwlo2u |
| Indexed |
Checks
Validunlimited-stringdefs.main.input.schema.properties.budgetNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Grant an allowance of paid provider (Jev, or Claude for venue research and the short line) calls beyond a daily cap, for an intentional batch (a backfill), valid until `expiresAt`, with a required reason. Recorded on the rules runner under the caller's DID: only an operator's DID may grant, never the shared token (refused with Forbidden); the daily cap stays the runaway-loop guard and nothing else raises it. Calls past the cap are reserved from live grants, oldest expiry first; a grant that expires or is used up stops adding. Forwarded to the runner's POST /v1/provider/grants. Operator only. The credential is `Authorization: Bearer <credential>`: an atproto service-auth JWT signed by a DID the commons root names as an operator (a pub.techne.draft.operator record; `aud` = the Commons API's service-account DID, not the commons root's, `lxm` = this method), or the Commons API's APICOOP_OPERATOR_TOKEN. Without one the call is refused with AuthRequired; with one that is not an operator's, Forbidden; when the Commons API can check neither, NotConfigured. Typed to confirm: the call needs `confirm` = `calls` in digits (see `confirm`), or it is refused with ConfirmationRequired.",
"errors": [
{
"name": "InvalidRequest"
},
{
"description": "`confirm` is missing or is not exactly what this action is confirmed with (see `confirm`). Nothing was done.",
"name": "ConfirmationRequired"
},
{
"name": "UpstreamFailed"
},
{
"name": "AuthRequired"
},
{
"name": "Forbidden"
},
{
"name": "NotConfigured"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"budget": {
"default": "shared",
"description": "Which daily budget it extends; `shared` when absent.",
"knownValues": [
"shared",
"own",
"research",
"summary"
],
"type": "string"
},
"calls": {
"description": "Calls granted.",
"maximum": 1000000,
"minimum": 1,
"type": "integer"
},
"confirm": {
"description": "`calls` typed again, in digits (`3000`, not `3,000` or `03000`). Byte for byte: same case, no added spaces. The call is refused with ConfirmationRequired before it does anything when this is missing or does not match.",
"maxLength": 1000,
"type": "string"
},
"expiresAt": {
"description": "When the grant stops adding, at most 31 days ahead.",
"format": "datetime",
"type": "string"
},
"reason": {
"description": "Why (required): e.g. the cutover backfill.",
"maxLength": 1000,
"type": "string"
}
},
"required": [
"calls",
"expiresAt",
"reason"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"grant": {
"ref": "pub.techne.draft.commons.defs#providerGrantView",
"type": "ref"
}
},
"required": [
"grant"
],
"type": "object"
}
},
"type": "procedure"
}
},
"id": "pub.techne.draft.commons.grantProviderAllowance",
"lexicon": 1
}