@hagicode/cli 0.1.0-dev.52.1.13cffe6 → 0.1.0-dev.54.1.372ef38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -169,7 +169,8 @@ hagi
169
169
  |-- skills local list | enable | disable | uninstall
170
170
  | gallery search | detail | install
171
171
  | trusted list | upsert | delete | reset
172
- `-- agent lock acquire | status | renew | heartbeat | release | requisition | list
172
+ |-- agent lock acquire | status | renew | heartbeat | release | requisition | list
173
+ `-- usage limits [--provider] [--wait-until-above <percent> --max-wait <seconds> --jitter-seconds <seconds>]
173
174
  ```
174
175
 
175
176
  The `send` commands of `chat`, `proposal`, and `hagitask` also take `--steer` and `--no-steer`, and `HAGI_SEND_STEER` sets the default. See [Steer](#steer-send-option).
@@ -729,6 +730,17 @@ hagi skills trusted delete --provider-id example-provider
729
730
  hagi skills trusted reset
730
731
  ```
731
732
 
733
+ ## Usage Commands
734
+
735
+ `hagi usage limits` reads each provider's limit windows (remaining percent and reset time) from the backend's Token Monitor usage. It is read-only and reads nothing from local files.
736
+
737
+ ```bash
738
+ hagi usage limits --provider claude --json
739
+ hagi usage limits --provider claude --wait-until-above 10 --max-wait 480 --json
740
+ ```
741
+
742
+ Low quota is a successful reading: `ready` and `low` both exit `0`. Exit `34` means no usable figure could be read. `--max-wait` (at most `21600`) and `--jitter-seconds` (at most `3600`) are refused without `--wait-until-above`, and `--wait-until-above` needs `--provider`. See the [CLI usage reference](skills/hagi/references/cli-usage.md#usage-commands) for the output fields and exit codes.
743
+
732
744
  ## Agent Lock Commands
733
745
 
734
746
  `hagi agent lock` lets several agents take turns on one shared resource, such as a game server that only one agent may use at a time. The backend keeps a fair queue per lock; the lock is cooperative and cannot stop an action already running on the remote resource. There is no top-level `hagi lock`. The agent-facing protocol is in [`skills/hagi/references/resource-lock.md`](skills/hagi/references/resource-lock.md).