@limitry/cli 1.0.0-rc.16 → 1.0.0-rc.19
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/CHANGELOG.md +132 -303
- package/README.md +8 -4
- package/dist/limitry.mjs +1578 -467
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,350 +2,185 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in the Limitry CLI (`@limitry/cli`). Generated from the source on each release; newest first.
|
|
4
4
|
|
|
5
|
-
## 1.0.0-rc.
|
|
5
|
+
## 1.0.0-rc.19 (2026-11-22)
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
-
|
|
9
|
+
- Every list command takes `--all`, to print every page instead of the
|
|
10
|
+
first.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
A list field now takes its flag once for each value, such as
|
|
13
|
+
`--event-type a --event-type b`. Commas work too:
|
|
14
|
+
`--event-type a,b`. A yes-or-no field takes `--x` and `--no-x`, and a
|
|
15
|
+
field you can empty takes `--clear-<field>`.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
`--base-url`, or the `<NAME>_BASE_URL` variable, points the CLI at
|
|
18
|
+
another API address. They replace `login --api` and `<NAME>_API`.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`workspace.invitation_rejected` and `billing.subscribed`,
|
|
21
|
-
`billing.plan_changed`, `billing.cancellation_scheduled` and
|
|
22
|
-
`billing.subscription_ended`.
|
|
23
|
-
- `GET /v1/workspace/usage` now says where each count stands. Each count
|
|
24
|
-
gains `label`, `state` and `stopsAt`, and `unit` when the plan names
|
|
25
|
-
one. The response gains a `state` for the whole workspace.
|
|
26
|
-
`client.workspace.usage.get()` and the Python client return them. The
|
|
27
|
-
CLI's `workspace usage` prints each count as a sentence that says where
|
|
28
|
-
it stands. Use `--json` for the response as it is.
|
|
29
|
-
|
|
30
|
-
### Fixed
|
|
31
|
-
|
|
32
|
-
- `usage.overview()` (`GET /v1/usage/overview`) now totals each limit's whole
|
|
33
|
-
current window on every plan. On Free, a monthly limit's `total` covered
|
|
34
|
-
only the last 7 days; it now covers the whole month, as each subject's
|
|
35
|
-
amounts already did.
|
|
20
|
+
The exit code now says how a command ended: `1` a failure, `2` a wrong
|
|
21
|
+
command or flag, and `4` when you aren't signed in or the API refused
|
|
22
|
+
your token. An error also prints what is wrong with each field and a
|
|
23
|
+
link to its docs, and with `--json` it carries both.
|
|
24
|
+
- The API, both SDKs and the CLI now each follow their own language's conventions, so some names and paths changed.
|
|
36
25
|
|
|
37
|
-
|
|
26
|
+
In the API:
|
|
38
27
|
|
|
39
|
-
|
|
28
|
+
- `GET /v1/checks` lists recent checks and takes `before`. It replaces `GET /v1/checks/recent`.
|
|
29
|
+
- `GET /v1/subjects/{kind}/{id}/standing` shows where a subject stands. It replaces `GET /v1/usage/standing`.
|
|
30
|
+
- `PATCH /v1/subjects/{kind}/{id}` sets a subject's billing date, name and labels. `DELETE /v1/subjects/{kind}/{id}/names` erases the name and labels, and answers `204`.
|
|
31
|
+
- A check's decision has no `id`. Its limits name themselves in `limitName`, its `reason` is `{ code, limitId, limitName, subject, message }`, and `reservation` is `null` when there is none.
|
|
32
|
+
- A recent check's time is `checkedAt`, and `refusedBy` names the limit and the subject.
|
|
33
|
+
- A subject's billing date is `billingAnchorAt`, and a period's start is `periodStart`, in reports and in the `limit.reached` and `limit.threshold_crossed` webhooks. Those webhooks name the limit in `limitName`.
|
|
34
|
+
- `GET /v1/usage/subjects` takes `top` and answers `subjects`.
|
|
35
|
+
- A sync takes and answers `dryRun` in place of `preview`.
|
|
36
|
+
- Archiving a limit answers `200` with the limit.
|
|
37
|
+
- A clash with a resource's state answers `409` with the code `conflict`, such as a name that is taken or a limit a sync set. A check that Limitry can't answer right now gets `503` with the code `unavailable` and a `Retry-After` header.
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
holds or will hold (`GET /v1/workspace/members`,
|
|
43
|
-
`GET /v1/workspace/invitations`). It is null for a guest, or where the
|
|
44
|
-
product has no seat types.
|
|
45
|
-
- `GET /v1/usage` and `GET /v1/usage/subjects` take a limit by its name, as
|
|
46
|
-
`limitName`, as well as by `limitId`. They also take a `period`, such as
|
|
47
|
-
`last_month` or `this_week`, instead of `from` and `to`.
|
|
48
|
-
|
|
49
|
-
`GET /v1/usage` returns the range's `total` (`used`, `allowed` and
|
|
50
|
-
`refused`) beside its buckets, and the range it covers as `from` and `to`.
|
|
51
|
-
|
|
52
|
-
`GET /v1/usage/subjects` lists who used a limit most in a past period when
|
|
53
|
-
you send `period`, or `from` and `to`. In that list, `remaining` is null.
|
|
54
|
-
Add `sort` as `refused` to list the most refused first. It also says when
|
|
55
|
-
the current window ends, as `resetsAt`.
|
|
56
|
-
|
|
57
|
-
Both responses include the limit's `limitName`, `unit`, `amount` and
|
|
58
|
-
`window`.
|
|
59
|
-
|
|
60
|
-
In the SDKs, `remaining` on `client.usage.subjects()` items is now typed
|
|
61
|
-
as a number or null, so check for null before using it. In the CLI, use
|
|
62
|
-
`--limit-name`, `--period` and `--sort`.
|
|
63
|
-
|
|
64
|
-
`GET /v1/usage/overview` is new: every active limit's usage in one answer,
|
|
65
|
-
with each limit's unit, amount, window, `total` and top subjects. It covers
|
|
66
|
-
each limit's current window, or a `period` or range you send. With `sort`
|
|
67
|
-
as `refused`, each limit lists only the subjects it refused. A balance
|
|
68
|
-
also lists the credits added to it and taken back in the range. In the SDKs
|
|
69
|
-
it's `client.usage.overview()`, and in the CLI `limitry usage overview`.
|
|
70
|
-
|
|
71
|
-
Every call about one limit takes the limit's name in place of its ID:
|
|
72
|
-
`GET`, `PATCH`, archive and restore on `/v1/limits/{limitId}`, and listing
|
|
73
|
-
and adding its credits. So does the `limit.credit` approval. A name
|
|
74
|
-
matches exactly, or else ignoring case. When two limits match ignoring
|
|
75
|
-
case, the call fails with a 400 that names both.
|
|
39
|
+
In the TypeScript SDK:
|
|
76
40
|
|
|
77
|
-
|
|
41
|
+
- `guard` and `reserve` throw `LimitReachedError` when refused, and `UnavailableError` when Limitry gave no answer and a limit fails closed. Its `reason` says why. Both are `LimitryError`s.
|
|
42
|
+
- `createLimits` takes `timeout`, in milliseconds, in place of `timeoutMs`.
|
|
43
|
+
- Each `guard` or `reserve` call also takes `timeout`, `failMode`, `signal` and `idempotencyKey`. A signal stops the check at once, and the work doesn't run.
|
|
78
44
|
|
|
79
|
-
|
|
80
|
-
person's side. An admin in a Developer seat changes test, and an admin in
|
|
81
|
-
an Operator seat changes live. The owner changes both. A change on the
|
|
82
|
-
other side returns 403 `forbidden`, and the message names who may make it.
|
|
83
|
-
Workspace API keys are not affected.
|
|
45
|
+
In the Python SDK:
|
|
84
46
|
|
|
85
|
-
|
|
47
|
+
- `guard` and `reserve` raise `LimitReachedError` and `UnavailableError`, under `LimitryError`.
|
|
48
|
+
- They take `timeout=` (in seconds), `fail_mode=`, `idempotency_key=` and `extra_headers=`.
|
|
49
|
+
- You set what the work used with `reservation.cost = 7`.
|
|
50
|
+
- Cancelling an async `guard` or `reserve` stops its check at once.
|
|
86
51
|
|
|
87
|
-
|
|
88
|
-
`GET /v1/limits/{limitId}` and every response that returns a limit). Use
|
|
89
|
-
`updatedAt` to tell whether a limit has changed.
|
|
52
|
+
In the CLI:
|
|
90
53
|
|
|
91
|
-
|
|
54
|
+
- `limitry sync --dry-run` replaces `--preview`, and `limitry sync -` reads the file from standard input.
|
|
55
|
+
- A refused `limitry check` exits with code `5`.
|
|
56
|
+
- `limitry subjects standing <kind> <id>` replaces `limitry usage standing`, and `limitry checks list` replaces `limitry checks recent`.
|
|
57
|
+
- `limitry subjects update <kind> <id>` sets a name and labels, and `limitry subjects names delete <kind> <id>` erases them.
|
|
92
58
|
|
|
93
|
-
|
|
59
|
+
The audit log's Limitry actions are dotted too, such as `subject.billing_date.set` and `limits.copied`. Earlier entries show the new names.
|
|
94
60
|
|
|
95
|
-
|
|
96
|
-
`GET /v1/workspace/webhook-endpoints/{endpointId}/deliveries` take
|
|
97
|
-
`before`, an ISO time, and return the items older than it, newest first.
|
|
61
|
+
## 1.0.0-rc.17 (2026-11-22)
|
|
98
62
|
|
|
99
|
-
|
|
100
|
-
`actor` keeps what one person, key or token did: pass `user:` and an
|
|
101
|
-
item's `actor.id`, or `credential:` and its `credential.id`. Each audit
|
|
102
|
-
event now carries those ids.
|
|
63
|
+
### Added
|
|
103
64
|
|
|
104
|
-
|
|
65
|
+
- Limitry is here: limits, credits and budgets for the software you
|
|
66
|
+
build.
|
|
67
|
+
|
|
68
|
+
Before each costly request, your code asks whether this user, team, API
|
|
69
|
+
key or agent may go ahead. Limitry answers yes or no. Two requests at
|
|
70
|
+
once can't overspend.
|
|
71
|
+
|
|
72
|
+
Everything happens in your code. Create and change limits, subjects and
|
|
73
|
+
credits through the `/v1` API, the TypeScript and Python SDKs or the
|
|
74
|
+
CLI. A check is one call, `limitry.checks.create()`, and its `allowed`
|
|
75
|
+
is the answer.
|
|
76
|
+
|
|
77
|
+
Webhooks let your code react. `limit.reached` arrives when a limit
|
|
78
|
+
first refuses one of your users. `limit.threshold_crossed` arrives when
|
|
79
|
+
one of them passes 80% or 100% of a limit, or when a balance of credits
|
|
80
|
+
runs low.
|
|
81
|
+
|
|
82
|
+
The app is where you see it all and try a check. With the MCP server,
|
|
83
|
+
Claude and ChatGPT, or Claude Code and Codex, can work in your
|
|
84
|
+
workspace with the access you give them. Your team also hears about
|
|
85
|
+
refusals in the app, by email or on their phone.
|
|
86
|
+
- A refused check now says whose limit refused it. `reason.subject` names
|
|
87
|
+
the check's own subject, or the shared subject whose limit said no, such
|
|
88
|
+
as a team's budget, and `reason.message` names it too. On the Usage
|
|
89
|
+
page, a user's row says when a shared budget refused their checks.
|
|
90
|
+
Busiest now counts every subject a check names, so a busy team or
|
|
91
|
+
organization pool shows there.
|
|
92
|
+
- Every TypeScript SDK call now takes a `timeout` in milliseconds and a
|
|
93
|
+
`signal`, for example `client.limits.list({}, { timeout: 2000 })`. The
|
|
94
|
+
timeout covers the whole call, retries and their waits included. Past
|
|
95
|
+
it, the call throws a `TimeoutError` and isn't retried. To set one for
|
|
96
|
+
every call, pass `timeout` to `createClient`.
|
|
97
|
+
|
|
98
|
+
An `ApiError` now carries the response's `headers`, so you can read
|
|
99
|
+
`Retry-After` and the rate-limit headers when a call fails.
|
|
100
|
+
- Subjects can now have an optional name and labels. Set them with
|
|
101
|
+
`PUT /v1/subjects/{kind}/{id}/names` (`limitry subjects set`), or name
|
|
102
|
+
up to 1,000 at once with `POST /v1/subjects/import`.
|
|
103
|
+
`DELETE /v1/subjects/{kind}/{id}` erases them. Checks never need them,
|
|
104
|
+
and every limit works with IDs alone.
|
|
105
|
+
|
|
106
|
+
`GET /v1/subjects` lists and searches subjects (`limitry subjects
|
|
107
|
+
list`). `GET /v1/subjects/{kind}/{id}` now also returns a subject's
|
|
108
|
+
budgets and the subjects it's checked with, with what was spent within
|
|
109
|
+
each budget. `GET /v1/checks/recent` lists the last 3 days' checks
|
|
110
|
+
(`limitry checks recent`).
|
|
111
|
+
|
|
112
|
+
In the app, the new **Who** page lists every subject your checks name,
|
|
113
|
+
with filters and search. Each subject has its own page: its budgets,
|
|
114
|
+
the subjects it's checked with and what was spent within each budget,
|
|
115
|
+
and its recent checks. The Usage page lists **Recent checks** from the
|
|
116
|
+
last 3 days. On **Settings → General**, the **Kinds** card names your
|
|
117
|
+
kinds and puts them in order, so a subject's page shows who is above
|
|
118
|
+
and below it.
|
|
119
|
+
|
|
120
|
+
`limitry.json` can list your kinds too, in an optional `kinds` block that
|
|
121
|
+
`limitry sync` applies. Subject names stay out of the file.
|
|
122
|
+
|
|
123
|
+
What `limitry.json` sets is now locked in the app and the API, and says
|
|
124
|
+
so: its limits, and its kinds when it has them. An owner or admin can
|
|
125
|
+
override one until the next sync, with a reason the audit log keeps.
|
|
126
|
+
The next sync puts the file's values back, `limitry sync --preview`
|
|
127
|
+
lists those overrides, and whoever made one gets a notification.
|
|
105
128
|
|
|
106
129
|
### Changed
|
|
107
130
|
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
`
|
|
112
|
-
|
|
131
|
+
- A limit a sync sets now says where it came from. `limits.sync` takes an
|
|
132
|
+
optional `source`, such as `"Billing deploy"`, and the limit's page,
|
|
133
|
+
the 409 and the audit log name it, as in **Set by Billing deploy**.
|
|
134
|
+
`limitry sync` sends the file's name, or the label you pass with
|
|
135
|
+
`--source`. A sync with no source reads **Set by a sync**, where it
|
|
136
|
+
used to say `limitry.json` every time. The **Kinds** card names the
|
|
137
|
+
source the same way.
|
|
113
138
|
|
|
114
|
-
|
|
139
|
+
`limitry sync` now also sends the file's `kinds`.
|
|
115
140
|
|
|
116
|
-
|
|
141
|
+
## 1.0.0-rc.16 (2026-11-17)
|
|
117
142
|
|
|
118
|
-
-
|
|
119
|
-
as `--data '{"limits": [ … ]}'`, as every other command does, instead of
|
|
120
|
-
a file. `--preview` and `--archive-missing` still apply on top.
|
|
143
|
+
No user-facing changes.
|
|
121
144
|
|
|
122
|
-
|
|
145
|
+
## 1.0.0-rc.15 (2026-11-14)
|
|
123
146
|
|
|
124
|
-
|
|
125
|
-
the environment it was filed in once a person approves it, such as live
|
|
126
|
-
when you asked from live. Before, it ran in the default environment
|
|
127
|
-
unless its input named one. Requests filed before this change still
|
|
128
|
-
run in the default.
|
|
129
|
-
- The descriptions of every method and command are rewritten to be easier
|
|
130
|
-
to read: one rule per sentence, with nothing about how calls behave
|
|
131
|
-
changed. They now also say that only workspace owners can manage webhook
|
|
132
|
-
endpoints with a personal access token.
|
|
133
|
-
Every response in the API reference now comes with an example of what
|
|
134
|
-
it returns.
|
|
135
|
-
- The descriptions of the limits, subjects, checks, reservations and usage
|
|
136
|
-
methods are rewritten in plain sentences, with nothing about how calls
|
|
137
|
-
behave changed. Every field these methods return now has an example in
|
|
138
|
-
the API reference.
|
|
139
|
-
- A few error messages now read as separate sentences: what went wrong,
|
|
140
|
-
then what to do. Their codes and status are unchanged.
|
|
141
|
-
- Error messages and CLI output read as whole sentences: what went wrong,
|
|
142
|
-
then what to do. For example, an unknown environment now says
|
|
143
|
-
`Unknown environment "staging". This product's environments are test, live.`
|
|
144
|
-
Error codes are unchanged, so code that checks `error.code` keeps
|
|
145
|
-
working. Code that matches the exact text of a message may need
|
|
146
|
-
updating.
|
|
147
|
-
- Path parameters such as `endpointId` and `deliveryId` now come with a
|
|
148
|
-
description ("The endpoint's ID.") in the SDKs' type hints, the
|
|
149
|
-
command line's help and the API reference.
|
|
150
|
-
- The API reference's "Too many requests" answer now gives the limit: 100
|
|
151
|
-
requests a minute for each credential, whether an API key, a personal
|
|
152
|
-
access token or an agent's sign-in. Wait the number of seconds in the
|
|
153
|
-
`Retry-After` header before trying again.
|
|
154
|
-
- `POST /v1/checks` now caps refused checks per API key. Past about 17 refused
|
|
155
|
-
checks a second in one location, repeating a check that was just refused gets
|
|
156
|
-
the same `allowed: false` answer for up to 5 seconds, with the header
|
|
157
|
-
`limitry-refusal: repeated`. Past about 100 a second, the key's checks answer
|
|
158
|
-
`429 rate_limited` for 10 seconds, and each limit's fail mode decides. Allowed
|
|
159
|
-
checks, commits, releases and extends aren't affected.
|
|
160
|
-
- API keys and webhooks now live together under **Settings → Developers**
|
|
161
|
-
in the app, and the descriptions of the API key and webhook endpoint
|
|
162
|
-
operations point there.
|
|
163
|
-
- `GET /v1/workspace/usage` returns its list as `counts` instead of `meters`.
|
|
164
|
-
Update anything that reads `meters` from `client.workspace.usage.get()`, the
|
|
165
|
-
Python client or the CLI's output.
|
|
166
|
-
|
|
167
|
-
### Fixed
|
|
168
|
-
|
|
169
|
-
- The API's descriptions, shown in the SDKs' hints and the CLI's help, now
|
|
170
|
-
state the real limits: `GET /v1/usage/subjects` returns at most 50
|
|
171
|
-
subjects (25 for a concurrent limit), a usage series spans at most 2,000
|
|
172
|
-
buckets, a check's idempotency answer lasts an hour, a late commit still
|
|
173
|
-
counts within 24 hours, and a test key's checks have no plan grace.
|
|
147
|
+
No user-facing changes.
|
|
174
148
|
|
|
175
|
-
## 1.0.0-rc.
|
|
149
|
+
## 1.0.0-rc.14 (2026-11-09)
|
|
176
150
|
|
|
177
|
-
|
|
151
|
+
No user-facing changes.
|
|
178
152
|
|
|
179
|
-
-
|
|
180
|
-
now includes its `amount`: units per window, or for a `concurrent` limit
|
|
181
|
-
how many at once.
|
|
153
|
+
## 1.0.0-rc.13 (2026-11-07)
|
|
182
154
|
|
|
183
|
-
|
|
155
|
+
No user-facing changes.
|
|
184
156
|
|
|
185
|
-
|
|
157
|
+
## 1.0.0-rc.12 (2026-11-07)
|
|
186
158
|
|
|
187
|
-
-
|
|
188
|
-
without deleting it: `client.workspace.webhookEndpoints.update()`
|
|
189
|
-
(`PATCH /v1/workspace/webhook-endpoints/{endpointId}`). The endpoint
|
|
190
|
-
keeps its signing secret, so your verification code keeps working.
|
|
159
|
+
No user-facing changes.
|
|
191
160
|
|
|
192
|
-
|
|
161
|
+
## 1.0.0-rc.11 (2026-10-27)
|
|
193
162
|
|
|
194
|
-
-
|
|
195
|
-
the page's new name in the app (it was "API tokens").
|
|
163
|
+
No user-facing changes.
|
|
196
164
|
|
|
197
|
-
|
|
165
|
+
## 1.0.0-rc.10 (2026-10-27)
|
|
198
166
|
|
|
199
|
-
-
|
|
200
|
-
full amount as an allowed check. It used to count only commits for less
|
|
201
|
-
than the amount reserved, so the `allowed` totals were too low.
|
|
167
|
+
No user-facing changes.
|
|
202
168
|
|
|
203
169
|
## 1.0.0-rc.9 (2026-10-22)
|
|
204
170
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
- `POST /v1/checks` can now answer `503` with the code `busy` when
|
|
208
|
-
Limitry is deciding too many checks for those subjects at once. Nothing
|
|
209
|
-
was charged. `guard` and `reserve` (TypeScript and Python) send the
|
|
210
|
-
check again with the same key, within the same 30 seconds they give
|
|
211
|
-
`moving`, before the limit's fail mode decides. Each retry of `busy` or
|
|
212
|
-
`moving` now waits the answer's `Retry-After` plus a random backoff that
|
|
213
|
-
grows with each try, so clients don't all come back at the same moment.
|
|
214
|
-
Older SDK versions treat `busy` as Limitry being unreachable after their
|
|
215
|
-
usual two quick retries, so the fail mode decides; upgrade to retry it.
|
|
216
|
-
|
|
217
|
-
### Changed
|
|
218
|
-
|
|
219
|
-
- A very busy workspace's counts are now spread over more of Limitry's
|
|
220
|
-
servers as its traffic grows. While some of them move, which takes a few
|
|
221
|
-
seconds, checks, commits and releases on those subjects answer `503`
|
|
222
|
-
with the new error code `moving` and `Retry-After: 1`; nothing is
|
|
223
|
-
counted. `guard` and `reserve` (TypeScript and Python) and the CLI send
|
|
224
|
-
the same request again with the same Idempotency-Key for up to 30
|
|
225
|
-
seconds, each try with its own time budget, before a limit's fail mode
|
|
226
|
-
applies, so work is neither run uncounted nor left uncommitted.
|
|
227
|
-
|
|
228
|
-
### Fixed
|
|
229
|
-
|
|
230
|
-
- A reservation (`mode: "reserve"`) now starts a subject's period, as a
|
|
231
|
-
plain check does: on a `billing_date` limit with no billing date set
|
|
232
|
-
yet, the first reservation's time becomes the subject's billing date,
|
|
233
|
-
and on a `first_use` limit it starts the period. Before, reservations
|
|
234
|
-
made before the subject's first commit could each count in a period of
|
|
235
|
-
their own, so a monthly limit could let more through than its amount.
|
|
236
|
-
A reservation you release still starts the period, with nothing used in
|
|
237
|
-
it.
|
|
238
|
-
- A `503 moving` answer with `Retry-After: 0` is now retried after at least
|
|
239
|
-
a second, not at once, and still for at most 30 seconds. A client made
|
|
240
|
-
with `maxRetries: 0` no longer sends the SDK's internal
|
|
241
|
-
`x-limitry-moving` header to the API.
|
|
171
|
+
No user-facing changes.
|
|
242
172
|
|
|
243
173
|
## 1.0.0-rc.8 (2026-10-21)
|
|
244
174
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
- Limits have `counting`: `fast` answers the instant it decides, and
|
|
248
|
-
`guaranteed` stores every count safely before answering, so the limit
|
|
249
|
-
never goes over, even if a server fails. A `total` balance defaults to
|
|
250
|
-
`guaranteed`, every other window to `fast`. Set it when creating or
|
|
251
|
-
updating a limit (`counting`, `--counting`), or in `limitry.json`.
|
|
252
|
-
|
|
253
|
-
### Changed
|
|
254
|
-
|
|
255
|
-
- - Creating a limit needs only who it is for, the amount and the window:
|
|
256
|
-
`limits.create({ subject: { kind: "user" }, amount: 100, window: "month" })`
|
|
257
|
-
(`limitry limits create --subject '{"kind":"user"}' --amount 100 --window month`).
|
|
258
|
-
`action` defaults to every action (`*`), `unit` to `units`, and `name`
|
|
259
|
-
to the sentence the limit reads as, such as "100 units per user per
|
|
260
|
-
month". If a limit already has that name, the API answers `409`: give
|
|
261
|
-
this one a `name`. `limitry.json` entries still need a `name`.
|
|
262
|
-
- A limit's input names who it is for as `subject: { kind, id }` (was
|
|
263
|
-
`subjectKind` and `subjectId`), the same shape the limit itself has.
|
|
264
|
-
- What a limit counts is fixed once it is created: its subject, action,
|
|
265
|
-
unit, window, `every`, `start` and `rolling`. Changing one answers
|
|
266
|
-
`400 invalid_request`: create a new limit and archive the old one (its
|
|
267
|
-
history stays). Name, amount, fail mode and enabled still change any
|
|
268
|
-
time. `limitry sync` refuses such a change until you rename the entry.
|
|
269
|
-
- A limit says when a check last reached it (`lastCheckedAt`), so you can
|
|
270
|
-
see a limit no check names.
|
|
271
|
-
- One name for each idea, everywhere: the API, both SDKs, the CLI, the MCP
|
|
272
|
-
tools, `limitry.json` and webhooks. Update your code when you upgrade:
|
|
273
|
-
|
|
274
|
-
- `hold()` is `reserve()`: it takes `cost` (was `estimate`), and the block
|
|
275
|
-
gets a `Reservation` (was `Held`; Python `Reservation` and
|
|
276
|
-
`AsyncReservation`), with the same `cost()` and `extend()`.
|
|
277
|
-
- A refusal throws `LimitReached` (was `LimitExceeded`), with `limitId`
|
|
278
|
-
(Python `limit_id`) and `reason` `limit_reached` or
|
|
279
|
-
`too_many_reservations`. When Limitry can't be reached and a limit fails
|
|
280
|
-
closed, you now get a separate `Unavailable` error. "Can't be reached"
|
|
281
|
-
also covers a `402 plan_limit_reached` and a `429` from Limitry's flood
|
|
282
|
-
guard, so each limit's fail mode decides instead of your code getting an
|
|
283
|
-
error.
|
|
284
|
-
- A check's answer lists its limits in `limits` (was `remaining`): read
|
|
285
|
-
`decision.limits[0].remaining`. Every answer that names a limit says
|
|
286
|
-
`limitId`: `reason.limitId`, `limits[].limitId`, `usage.standing`'s
|
|
287
|
-
`limits[].limitId`, and webhook payloads.
|
|
288
|
-
- The refusal code is `limit_reached` (was `limit_exceeded`), and the
|
|
289
|
-
webhook event is `limit.reached` (was `limit.exceeded`): subscribe your
|
|
290
|
-
endpoints to the new name.
|
|
291
|
-
- Usage says `refused` (was `denied`); `usage.subjects` no longer has
|
|
292
|
-
`over` (it is `refused > 0`).
|
|
293
|
-
- Credits: `limits.credits.create()` and `limits.credits.list()` at
|
|
294
|
-
`/v1/limits/{limitId}/credits` (were `limits.grants.*` at `…/grants`),
|
|
295
|
-
ids start `crd_` (were `grt_`), and the approval an agent asks for is
|
|
296
|
-
`limit.credit` (was `limit.grant`).
|
|
297
|
-
- A period that starts on the subject's billing date is
|
|
298
|
-
`start: "billing_date"` (was `"anchor"`), and `subjects.update()` takes
|
|
299
|
-
`billingDate` (was `anchor`); the subject says `billingDate` too.
|
|
300
|
-
- `usage.standing()` and `usage.query()` take one `subject`, written
|
|
301
|
-
`kind:id` (`user:usr_123`), instead of separate kind and id fields
|
|
302
|
-
(`limitry usage standing --subject user:usr_123`).
|
|
303
|
-
- A limit's id starts `lmt_` (was `lim_`); keys still start `lim_test_`
|
|
304
|
-
and `lim_live_`.
|
|
305
|
-
- `limitry sync --preview` (was `--dry-run`), and the API's `preview`
|
|
306
|
-
(was `dryRun`), in what you send and what comes back.
|
|
307
|
-
|
|
308
|
-
### Removed
|
|
309
|
-
|
|
310
|
-
- Limits no longer have `counting` (Fast or Guaranteed), and the CLI no
|
|
311
|
-
longer has `--counting`: every count is now saved before Limitry answers,
|
|
312
|
-
for every limit. Remove `counting` from your code and from
|
|
313
|
-
`limitry.json`; Limitry ignores it.
|
|
175
|
+
No user-facing changes.
|
|
314
176
|
|
|
315
177
|
## 1.0.0-rc.7 (2026-10-19)
|
|
316
178
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
- A refused check's `reason` has a `message`: the refusal in one sentence,
|
|
320
|
-
such as "Refused by AI budget: 3 cents left, resets
|
|
321
|
-
2026-11-01T00:00:00.000Z. Try again in 3600 s." `LimitExceeded` and
|
|
322
|
-
`limitry check` show it as the API writes it, so every client says the
|
|
323
|
-
same. Branch on `allowed` and `reason.code`, never on the message.
|
|
324
|
-
|
|
325
|
-
### Fixed
|
|
326
|
-
|
|
327
|
-
- - `held.cost()` refuses a cost the API can't commit (not a whole number
|
|
328
|
-
from 0 to 1,000,000,000): TypeScript throws `RangeError`, Python raises
|
|
329
|
-
`ValueError`, in your code. Before, the commit failed silently after
|
|
330
|
-
the work and its usage was never counted.
|
|
331
|
-
- TypeScript's `held.extend()` throws the API's error, such as for an
|
|
332
|
-
expired hold, as Python's already did. Both send the `ttlSeconds` you
|
|
333
|
-
give as it is, so `0` is refused rather than read as the default.
|
|
334
|
-
- Python checks, commits and releases now retry exactly as TypeScript's
|
|
335
|
-
do: a network error, `408`, `429` or `5xx`, at most twice, all within
|
|
336
|
-
the check's `timeout` (1.5 s) or 5 s for a settle. `standing()` retries
|
|
337
|
-
too, and reports an error answer that isn't JSON.
|
|
338
|
-
- `limitry check` and `limitry sync` refuse `--workspace` with an API key,
|
|
339
|
-
as every other command does, instead of ignoring it.
|
|
179
|
+
No user-facing changes.
|
|
340
180
|
|
|
341
181
|
## 1.0.0-rc.6 (2026-10-19)
|
|
342
182
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
- `login` in the browser no longer shows Safari's "This is a non-secure
|
|
346
|
-
form" warning after **Allow**. The page now hands the new token back to
|
|
347
|
-
the waiting CLI encrypted to a key only that CLI holds, by a redirect
|
|
348
|
-
instead of a form. A CLI from before this change is asked to update.
|
|
183
|
+
No user-facing changes.
|
|
349
184
|
|
|
350
185
|
## 1.0.0-rc.5 (2026-10-16)
|
|
351
186
|
|
|
@@ -353,13 +188,7 @@ No user-facing changes.
|
|
|
353
188
|
|
|
354
189
|
## 1.0.0-rc.4 (2026-10-16)
|
|
355
190
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
- Each release comes with a `CHANGELOG.md` listing what changed, newest first.
|
|
359
|
-
|
|
360
|
-
### Changed
|
|
361
|
-
|
|
362
|
-
- The package page (README, on GitHub, npm and PyPI) shows what the product does with a first real example, and links the guide, the API reference, the changelog and support.
|
|
191
|
+
No user-facing changes.
|
|
363
192
|
|
|
364
193
|
## 1.0.0-rc.3 (2026-10-16)
|
|
365
194
|
|
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
The Limitry CLI sets up your limits and checks them from a terminal, a script or an agent: create a limit, try a check, and see who is using what, in test before live.
|
|
4
4
|
|
|
5
|
-
[](https://limitry.com/#demo)
|
|
6
6
|
|
|
7
|
-
[▶ Watch the
|
|
7
|
+
[▶ Watch the 44-second demo](https://limitry.com/#demo)
|
|
8
8
|
|
|
9
9
|
Limitry is the limits, credits and budgets layer for the software you build: give each of your users, teams, tenants, API keys or agents an allowance, and before any costly request one call tells your code whether it may happen.
|
|
10
10
|
|
|
@@ -37,10 +37,10 @@ limitry limits create --subject '{"kind":"user"}' --action ai-call \
|
|
|
37
37
|
--amount 200 --unit cents --window month
|
|
38
38
|
|
|
39
39
|
# Check a user, as your code would, for a reply that costs 5 cents
|
|
40
|
-
limitry check user:
|
|
40
|
+
limitry check user:user_123 ai-call --cost 5
|
|
41
41
|
|
|
42
42
|
# Where a user stands, without counting anything
|
|
43
|
-
limitry
|
|
43
|
+
limitry subjects standing user user_123
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
When a limit is right, copy it to live from the **Limits** page in the
|
|
@@ -52,6 +52,10 @@ Every API operation is a command: `limitry --help` lists them, and any
|
|
|
52
52
|
command takes `--json` for the API's exact answer, for scripts and
|
|
53
53
|
agents.
|
|
54
54
|
|
|
55
|
+
The exit code says how a command ended: `0` success, `1` a failure, `2`
|
|
56
|
+
a wrong command or flag, and `4` when you aren't signed in. A refused
|
|
57
|
+
`limitry check` exits `5`, so a script can stop on it.
|
|
58
|
+
|
|
55
59
|
## Links
|
|
56
60
|
|
|
57
61
|
- [Website](https://limitry.com)
|