ForgingStack Ration

v0.1.1
io.github.jdkabattles/forgingstack-ration Checked 3 days ago Published 8 days ago

One quota pool, many agents, no overruns.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_pool

Create a token-bucket quota pool shared by many agents. Costs 1 credit. Returns the pool with its starting availability.

ParameterTypeDescription
burst_units *integer
capacity_units *integer
name *string
per_agent_cap_units *integer
refill_units_per_minute *number

draw

Draw units from a pool for one agent. Returns allowed or denied, a reason, and a hash-chained receipt. Costs 1 credit per draw call, allowed or denied; an idempotency key replay is free.

ParameterTypeDescription
agent_id *string
pool_id *integer
units *integer
idempotency_keystring

get_pool

Fetch one pool by id, with its current available units (refill applied).

ParameterTypeDescription
pool_id *integer

list_pools

List all pools owned by the configured API key.

topup_pool

Add units to a pool, clamped at capacity. Free — no billing credit is charged.

ParameterTypeDescription
pool_id *integer
units *integer

delete_pool

Delete a pool and its draws. No billing credit is charged or refunded.

ParameterTypeDescription
pool_id *integer

get_credits

Remaining credit balance for the configured API key.

get_receipt

Fetch a past draw receipt by id.

ParameterTypeDescription
receipt_id *integer