Skip to main content

Module job_caps

Module job_caps 

Source
Expand description

Spending caps at the server’s edge (docs/specs/SPEC_JOBS_AND_TEMPLATES_2026_10_24.md §5.3, §7): Settings’ figures and where a run would go for the ledger’s reservation, and what a job’s author may ask for.

Who raises a cap. Only the operator. A request that carries no agent token looks like the app’s own window at the same-user boundary, so it proves nothing; the operator’s decision arrives only through the host route (POST /api/v1/host/jobs, which needs the host’s own token) or the app’s own proven window (jobs.save, an operator-only RPC). Every other path holds a job’s policy.caps to the defaults and says so.

A provider that reports no cost. Its runs count $0 toward the dollar caps and only the timeout bounds them, so the operator confirms such a job (confirm_no_cost, passed through the host route). An agent can’t.

Structs§

Origin 🔒
Who asks, as far as the caps are concerned.

Constants§

NO_COST_TIMEOUT_MINUTES 🔒
The timeout a job on a provider that reports no cost gets when it names none: the only limit on what it spends.

Functions§

action_provider 🔒
The provider of the agent a definition’s action starts or messages, when it can be told.
agent_named 🔒
The agent definition who names: a UID, else a slug or name.
agent_of 🔒
The agent an action starts or messages: a message’s target, a spawn’s leader.
apply_rules 🔒
Apply what the caps ask of a job’s author to def, before it is stored:
install 🔒
Weigh job runs against Settings’ caps, finding where each would go.
limits 🔒
Settings’ caps (jobs:cap:*).
no_cost_provider 🔒
The provider of job’s agent when its runs report no cost.
pane_target 🔒
provider_of 🔒
refuse 🔒
target_of 🔒
Where job’s next run would go: a message’s target pane (its account and its provider), the account a spawn would pick.

Type Aliases§

Answer 🔒