SDK catalog / Budget Guard
Budget Guard
preview 0.3.0-alpha.1
Preview documentation for @workforce-sdk/budget-guard@0.3.0-alpha.1. Existing legacy downloads may use a different API; this page does not announce a new release.
Set token budgets for model requests and track prompt usage across turns.
Availability and installation
This guide covers @workforce-sdk/budget-guard version 0.3.0-alpha.1, currently a preview. The catalog does not verify public registry installation for this version. Obtain the matching package and dependencies through the delivery method shown on its product page. Do not infer that an unlisted package can be installed from the public npm registry.
The supported runtime, exported entry points, and compatibility commitments are listed in Compatibility. Check Release notes before upgrading.
Configure and use
Keep SDK settings in a YAML file and pass its path to the package’s public client. Keep credentials in application-owned secret storage; configuration examples contain references, not secret values.
budget-guard.yaml — configuration example for this preview.
buyer.mjs — buyer integration example.
The buyer example uses a local mock callback. Your application supplies its provider client at execute; createBudgetGuard accepts the configuration-file path. Dispose the guard when the accounting session ends.
Integration responsibilities
The application owns user authorization, credential storage, and permission to make external calls. Review the example before running it: a connected provider or an update action can have real effects. Preserve the package’s cancellation and disposal behavior where those APIs are exposed.
Preview compatibility is limited to the combinations actually recorded in Compatibility. An empty verified-combinations list is not a promise that every platform or client has been tested.