The budget to allocate from (IRI key — must pass SAFE_IRI_KEY_RE)
Task identifier for the child budget (must pass SAFE_IRI_KEY_RE)
Maximum tokens for the child budget (positive integer)
The agent performing the allocation (must pass SAFE_IRI_KEY_RE)
Gateway configuration
The new child budget ID (IRI key string)
Allocate a child sub-budget from a parent budget.
Creates a new TokenBudget linked to the parent via
mesh:allocates/mesh:parentBudget. Emits a PROV-O allocation activity (prov:wasDerivedFrom+prov:Activity) capturing the full allocation provenance chain for audit.The SPARQL UPDATE is atomic: if the parent budget lacks sufficient remaining tokens (
maxTokens - spentTokens < maxTokensrequested) the UPDATE is a no-op andBudgetInsufficientErroris thrown.