@limitry/cli 1.0.0-rc.11 → 1.0.0-rc.12

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/dist/limitry.mjs CHANGED
@@ -31,7 +31,7 @@ var brand_default = {
31
31
  devDomain: "limitry.dev",
32
32
  labs: ["lab"],
33
33
  discordInvite: "https://discord.gg/Nb6QFd6ER4",
34
- summary: "Limitry is the limits, credits and budgets layer for your software: give each of your users, teams, tenants, API keys or agents an allowance, and before any costly action one call tells your code whether it may happen.",
34
+ summary: "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 action one call tells your code whether it may happen.",
35
35
  expectedAssets: [
36
36
  "logo.svg",
37
37
  "logo-dark.svg",
@@ -42,25 +42,45 @@ var brand_default = {
42
42
  "apple-touch-icon.png"
43
43
  ],
44
44
  colors: {
45
- brand: "#15202B",
46
- brandForeground: "#F5F6F3",
47
- brandDark: "#E8A33D",
48
- brandDarkForeground: "#15202B",
49
- ink: "#15202B",
50
- signal: "#E8A33D",
51
- paper: "#F5F6F3",
52
- graduation: "#C9CEC6",
53
- held: "#7C93AB",
54
- refused: "#B5412E"
45
+ brand: "#1E4D8C",
46
+ brandForeground: "#FFFFFF",
47
+ brandDark: "#7FB2FF",
48
+ brandDarkForeground: "#0B1F3A",
49
+ paper: "#F6F8FB",
50
+ paperDark: "#07121F",
51
+ surface: "#FFFFFF",
52
+ surfaceDark: "#0D1D31",
53
+ mist: "#DCEBFF",
54
+ mistDark: "#0F2645",
55
+ text: "#0B1F3A",
56
+ textDark: "#EAF1FB",
57
+ muted: "#4A5B73",
58
+ mutedDark: "#A3B6CE",
59
+ line: "#DCE4EE",
60
+ lineDark: "#1C3352",
61
+ sky: "#7FB2FF",
62
+ cobalt: "#1E4D8C",
63
+ cobaltDark: "#7FB2FF",
64
+ cobaltHover: "#173E73",
65
+ cobaltHoverDark: "#A8CBFF",
66
+ deep: "#0B1F3A",
67
+ deepDark: "#0F2645",
68
+ focus: "#4F86D6",
69
+ held: "#E8A33D",
70
+ refused: "#CE2C31",
71
+ refusedDark: "#FF6369"
55
72
  },
56
73
  fonts: {
57
- display: "Archivo Variable",
58
- body: "IBM Plex Sans"
74
+ display: "Manrope Variable",
75
+ body: "Manrope Variable",
76
+ code: "JetBrains Mono Variable"
59
77
  },
60
78
  layout: {
61
- radius: "3px",
79
+ radius: "10px",
80
+ radiusControl: "8px",
81
+ logoHeight: "29px",
62
82
  gutter: "1.5rem",
63
- contentWidth: "64rem",
83
+ contentWidth: "72rem",
64
84
  readableWidth: "42rem",
65
85
  sectionGap: "2rem",
66
86
  navGap: "1.5rem",
@@ -72,12 +92,14 @@ var brand_default = {
72
92
  name: "test",
73
93
  keyPrefix: "lim_test_",
74
94
  readOnlyWorkspace: true,
75
- description: "Use test to build and try things: test keys only touch test data, and test checks aren't billed."
95
+ agentLabel: "Practice data your developers use",
96
+ description: "Use test to build and try things. Test checks aren't billed."
76
97
  },
77
98
  {
78
99
  name: "live",
79
100
  keyPrefix: "lim_live_",
80
- description: "Use live in production: live checks count toward your plan."
101
+ agentLabel: "Your real customers",
102
+ description: "Use live in production. Live checks count toward your plan."
81
103
  }
82
104
  ],
83
105
  environmentsDocs: "/docs/test-and-live/",
@@ -86,7 +108,10 @@ var brand_default = {
86
108
  providerOrder: ["github", "google"],
87
109
  emailSignUp: "button"
88
110
  },
89
- devPortOffset: 100
111
+ devPortOffset: 100,
112
+ social: {
113
+ background: "#F6F8FB"
114
+ }
90
115
  };
91
116
 
92
117
  // src/brand/index.ts
@@ -163,11 +188,11 @@ function resolveProductFeatures(features) {
163
188
  guests: teams && on("guests"),
164
189
  /** The public `/v1` API: its router, the OpenAPI spec and reference, SDK and CLI publishing. */
165
190
  publicApi,
166
- /** Workspace API keys: Settings → API Keys, `/internal/workspace/api-keys`, `sk_` authentication on `/v1`. */
191
+ /** Workspace API keys: Settings → Developers, `/internal/workspace/api-keys`, `sk_` authentication on `/v1`. */
167
192
  apiKeys: publicApi && on("apiKeys"),
168
193
  /** Personal access tokens: Account → API tokens, `/internal/account/pats`, `/v1/user/*`, `pat_` authentication, the CLI's sign-in. */
169
194
  personalTokens: publicApi && on("personalTokens"),
170
- /** Outgoing webhooks: Settings → Webhooks, `/internal/workspace/webhooks`, the admin tab, queued deliveries. */
195
+ /** Outgoing webhooks: Settings → Developers, `/internal/workspace/webhooks`, the admin tab, queued deliveries. */
171
196
  webhooks: on("webhooks"),
172
197
  /** Billing: Settings → Billing, the Stripe plugin, the admin Billing surfaces, the site's pricing page; a free product. */
173
198
  billing: on("billing"),
@@ -185,7 +210,8 @@ function resolveProductEnvironments(environments, defaultEnvironment, docs) {
185
210
  name: env.name,
186
211
  keyPrefix: env.keyPrefix,
187
212
  readOnlyWorkspace: env.readOnlyWorkspace ?? false,
188
- description: env.description ?? ""
213
+ description: env.description ?? "",
214
+ agentLabel: env.agentLabel ?? env.description ?? ""
189
215
  }));
190
216
  const names = new Set(list.map((env) => env.name));
191
217
  const prefixes = new Set(list.map((env) => env.keyPrefix));
@@ -735,7 +761,7 @@ __export(product_exports, {
735
761
  Unavailable: () => Unavailable,
736
762
  createLimits: () => createLimits,
737
763
  productMethods: () => productMethods,
738
- productRetry: () => productRetry
764
+ productRetry: () => productRetry2
739
765
  });
740
766
 
741
767
  // node_modules/@limitry/sdk/dist/retry.js
@@ -745,7 +771,7 @@ var DEFAULT_MAX_RETRIES = 2;
745
771
  var MAX_WAIT_MS = 2e4;
746
772
  var MAX_BASE_KEY = 200;
747
773
  var PRODUCT_RETRY_HEADER = "x-sdk-product-retry";
748
- var productRetry2 = () => "productRetry" in product_exports ? productRetry ?? null : null;
774
+ var productRetry = () => "productRetry" in product_exports ? Reflect.get(product_exports, "productRetry") ?? null : null;
749
775
  var wait = (ms) => new Promise((done) => setTimeout(done, ms));
750
776
  function backoff(attempt) {
751
777
  const base = Math.min(500 * 2 ** attempt, 8e3);
@@ -787,7 +813,7 @@ function withoutProductRetryHeader(fetch2) {
787
813
  function withRetries(fetch2, options = {}) {
788
814
  const maxRetries = options.maxRetries ?? DEFAULT_MAX_RETRIES;
789
815
  const sleep = options.sleep ?? wait;
790
- const later = options.product === void 0 ? productRetry2() : options.product;
816
+ const later = options.product === void 0 ? productRetry() : options.product;
791
817
  return async (request) => {
792
818
  let returnLater;
793
819
  [request, returnLater] = takeProductRetryHeader(request);
@@ -1141,8 +1167,8 @@ function createLimits(client, options = {}, internals = {}) {
1141
1167
  async function reserveOnce(request, fn, body, idempotencyKey, before) {
1142
1168
  const reserved = request.cost ?? 1;
1143
1169
  const decision = await check(body, idempotencyKey);
1144
- const unmetered = {
1145
- // Checked even unmetered: the mistake shows whether or not
1170
+ const uncounted = {
1171
+ // Checked even uncounted: the mistake shows whether or not
1146
1172
  // Limitry answered.
1147
1173
  cost: (units) => void checkedCost(units),
1148
1174
  extend: async () => {
@@ -1157,7 +1183,7 @@ function createLimits(client, options = {}, internals = {}) {
1157
1183
  throw new Unavailable();
1158
1184
  }
1159
1185
  try {
1160
- return await fn(unmetered);
1186
+ return await fn(uncounted);
1161
1187
  } finally {
1162
1188
  await unheard();
1163
1189
  }
@@ -1207,7 +1233,7 @@ var productMethods = (client) => {
1207
1233
  standing: limits.standing
1208
1234
  };
1209
1235
  };
1210
- var productRetry = movingRetry();
1236
+ var productRetry2 = movingRetry();
1211
1237
 
1212
1238
  // node_modules/@limitry/sdk/dist/resources.js
1213
1239
  async function call(client, op, pathParams, input, options = {}, content) {
@@ -1515,10 +1541,11 @@ async function verifyWebhook(body, headers, secret, options = {}) {
1515
1541
 
1516
1542
  // node_modules/@limitry/sdk/dist/index.js
1517
1543
  var API_KEY_ENV = `${brand2.identifier.toUpperCase()}_API_KEY`;
1544
+ var TOKEN_ENV = `${brand2.identifier.toUpperCase()}_TOKEN`;
1518
1545
  var DEFAULT_API = `https://api.${brand2.domain}`;
1519
1546
  function createClient2(options = {}) {
1520
1547
  const client = createBaseClient(options);
1521
- const extend = productMethods;
1548
+ const extend = Reflect.get(product_exports, "productMethods");
1522
1549
  if (!extend)
1523
1550
  return client;
1524
1551
  const methods = extend(client);
@@ -1530,9 +1557,12 @@ function createClient2(options = {}) {
1530
1557
  return Object.assign(client, methods);
1531
1558
  }
1532
1559
  function createBaseClient(options) {
1533
- const token = options.token ?? keyFromEnvironment();
1560
+ if (options.apiKey && options.token) {
1561
+ throw new Error(`${brand2.productName}: pass apiKey or token, not both.`);
1562
+ }
1563
+ const token = options.apiKey || options.token || credentialFromEnvironment();
1534
1564
  if (!token) {
1535
- throw new Error(`${brand2.productName}: no API key. Pass { token } or set ${API_KEY_ENV}.`);
1565
+ throw new Error(`${brand2.productName}: no API key. Pass { apiKey } or set ${API_KEY_ENV}.`);
1536
1566
  }
1537
1567
  const origin = withoutTrailingSlashes(options.api ?? DEFAULT_API);
1538
1568
  const send = options.fetch ?? ((request) => fetch(request));
@@ -1556,9 +1586,10 @@ function createBaseClient(options) {
1556
1586
  webhooks: { verify: verifyWebhook }
1557
1587
  });
1558
1588
  }
1559
- function keyFromEnvironment() {
1589
+ function credentialFromEnvironment() {
1560
1590
  const runtime = globalThis;
1561
- return runtime.process?.env?.[API_KEY_ENV] || void 0;
1591
+ const env = runtime.process?.env;
1592
+ return env?.[API_KEY_ENV] || env?.[TOKEN_ENV] || void 0;
1562
1593
  }
1563
1594
  function unwrap(result) {
1564
1595
  if (result.error !== void 0 || !result.response.ok) {
@@ -5013,14 +5044,14 @@ function browserLogin(options) {
5013
5044
  send(
5014
5045
  200,
5015
5046
  "You are signed in",
5016
- "Return to your terminal \u2014 you can close this tab."
5047
+ "Return to your terminal. You can close this tab."
5017
5048
  );
5018
5049
  finish(() => resolve2(token));
5019
5050
  });
5020
5051
  const timer = setTimeout(
5021
5052
  () => finish(
5022
5053
  () => reject(
5023
- new Error("timed out waiting for the browser \u2014 run login again")
5054
+ new Error("timed out waiting for the browser. Run login again.")
5024
5055
  )
5025
5056
  ),
5026
5057
  options.timeoutMs ?? 5 * 60 * 1e3
@@ -5074,7 +5105,7 @@ function readConfig(homeDir) {
5074
5105
  try {
5075
5106
  return JSON.parse(readFileSync(path2, "utf8"));
5076
5107
  } catch {
5077
- throw new Error(`${path2} is not valid JSON \u2014 fix or delete it`);
5108
+ throw new Error(`${path2} is not valid JSON. Fix or delete it.`);
5078
5109
  }
5079
5110
  }
5080
5111
  function writeConfig(homeDir, config2) {
@@ -5153,7 +5184,9 @@ function writeEnvVar(path2, name, value) {
5153
5184
  }
5154
5185
  var approvals = (program2, ctx) => {
5155
5186
  const workspace2 = program2.commands.find((c) => c.name() === "workspace") ?? program2.command("workspace");
5156
- const group = workspace2.command("approval-requests").description("approval-requests commands");
5187
+ const group = workspace2.command("approval-requests").description(
5188
+ "Ask a person to approve an action, and collect what it creates"
5189
+ );
5157
5190
  group.command("redeem <request-id>").description(
5158
5191
  "Collect an approved secret once, into an env file (never printed)"
5159
5192
  ).requiredOption(
@@ -5184,7 +5217,7 @@ var approvals = (program2, ctx) => {
5184
5217
  }
5185
5218
  if (request.status !== "approved") {
5186
5219
  throw new Error(
5187
- request.status === "pending" ? `Not approved yet \u2014 ask a person to approve it: ${request.approveUrl}` : `This request is ${request.status}; nothing to collect.`
5220
+ request.status === "pending" ? `Not approved yet. Ask a person to approve it: ${request.approveUrl}` : `This request is ${request.status}; nothing to collect.`
5188
5221
  );
5189
5222
  }
5190
5223
  const redeemed = await call3(
@@ -5226,7 +5259,7 @@ async function saveToken(ctx, token, api2) {
5226
5259
  writeConfig(ctx.io.homeDir, previous);
5227
5260
  const reason = error instanceof Error ? error.message : String(error);
5228
5261
  throw new Error(
5229
- `could not verify the token (${reason}) \u2014 nothing was saved`,
5262
+ `could not verify the token (${reason}). Nothing was saved.`,
5230
5263
  { cause: error }
5231
5264
  );
5232
5265
  }
@@ -5234,7 +5267,7 @@ async function saveToken(ctx, token, api2) {
5234
5267
  `Logged in. Token stored in ${configPath(ctx.io.homeDir)} (0600).`
5235
5268
  );
5236
5269
  ctx.io.stdout(
5237
- `Hello ${user.name} <${user.email}> \u2014 ${user.workspaces.length} workspace(s).`
5270
+ `Hello ${user.name} <${user.email}>. You have ${user.workspaces.length} workspace(s).`
5238
5271
  );
5239
5272
  if (!config2.workspace && user.workspaces.length === 1) {
5240
5273
  config2.workspace = user.workspaces[0].slug;
@@ -5246,7 +5279,7 @@ async function saveToken(ctx, token, api2) {
5246
5279
  }
5247
5280
  var login = (program2, ctx) => {
5248
5281
  program2.command("login").description(
5249
- "Sign in through the browser (or store a personal access token with --token)"
5282
+ "Sign in through the browser, or store a personal access token with --token"
5250
5283
  ).option("--token <pat>", "a personal access token (CI, servers)").option("--api <origin>", `API origin (default ${DEFAULT_API})`).option("--web <origin>", "web app origin for the browser sign-in").action(async (options) => {
5251
5284
  if (!productFeatures.personalTokens) {
5252
5285
  throw new Error(
@@ -5268,7 +5301,7 @@ var login = (program2, ctx) => {
5268
5301
  const webOrigin = options.web ?? webOriginFor(api2);
5269
5302
  if (!webOrigin) {
5270
5303
  throw new Error(
5271
- `cannot tell the web app's address from ${api2} \u2014 pass --web <origin>`
5304
+ `cannot tell the web app's address from ${api2}. Pass --web <origin>.`
5272
5305
  );
5273
5306
  }
5274
5307
  const token = await browserLogin({
@@ -5295,13 +5328,13 @@ var logout = (program2, ctx) => {
5295
5328
  ).catch(() => null);
5296
5329
  if (revoked && !revoked.ok && revoked.status !== 401) {
5297
5330
  ctx.io.stderr(
5298
- `Could not revoke the token (HTTP ${revoked.status}) \u2014 revoke it under Account \u2192 Personal access tokens.`
5331
+ `Could not revoke the token (HTTP ${revoked.status}). Revoke it under Account \u2192 Personal access tokens.`
5299
5332
  );
5300
5333
  }
5301
5334
  }
5302
5335
  delete config2.token;
5303
5336
  writeConfig(ctx.io.homeDir, config2);
5304
- ctx.io.stdout("Logged out \u2014 the token is revoked and forgotten.");
5337
+ ctx.io.stdout("Logged out. The token is revoked and forgotten.");
5305
5338
  });
5306
5339
  };
5307
5340
  async function printWorkspaces(ctx, asJson) {
@@ -5324,13 +5357,13 @@ async function printWorkspaces(ctx, asJson) {
5324
5357
  );
5325
5358
  }
5326
5359
  var whoami = (program2, ctx) => {
5327
- program2.command("whoami").description("Who the token acts as, and their workspaces").option("--json", "machine-readable output").action(
5360
+ program2.command("whoami").description("Show who the token acts as and which workspaces it can use").option("--json", "machine-readable output").action(
5328
5361
  (options) => printWorkspaces(ctx, options.json === true)
5329
5362
  );
5330
5363
  };
5331
5364
  var workspace = (program2, ctx) => {
5332
5365
  const group = program2.command("workspace").description(
5333
- "Your workspaces (list, use), and the current one's members, webhooks, approvals, usage \u2026"
5366
+ "Work with your workspaces and the current one's members, webhooks, approvals and usage"
5334
5367
  );
5335
5368
  group.command("list", { isDefault: true }).description("List the workspaces the token can act in").option("--json", "machine-readable output").action(
5336
5369
  (options) => printWorkspaces(ctx, options.json === true)
@@ -5347,7 +5380,7 @@ var workspace = (program2, ctx) => {
5347
5380
  });
5348
5381
  };
5349
5382
  var environment = (program2, ctx) => {
5350
- const group = program2.command("environment").description("The environment commands act in (list, use, unset)");
5383
+ const group = program2.command("environment").description("Choose the environment commands act in");
5351
5384
  group.command("list", { isDefault: true }).description("Show the environment commands act in").action(() => {
5352
5385
  const { environment: current, environmentSource } = ctx.settings();
5353
5386
  const from = environmentSource ? `(from ${{ flag: "--environment", env: environmentEnvVar(), config: "config" }[environmentSource]})` : null;
@@ -5361,14 +5394,14 @@ var environment = (program2, ctx) => {
5361
5394
  return;
5362
5395
  }
5363
5396
  ctx.io.stdout(
5364
- current ? `${current} ${from}` : "None set \u2014 the API acts in the workspace's default."
5397
+ current ? `${current} ${from}` : "None set. The API acts in the workspace's default."
5365
5398
  );
5366
5399
  });
5367
5400
  group.command("use <name>").description("Make <name> the default environment for commands").action((name) => {
5368
5401
  const declared = productEnvironments.list.map((env) => env.name);
5369
5402
  if (declared.length > 0 && !declared.includes(name)) {
5370
5403
  throw new Error(
5371
- `unknown environment '${name}' \u2014 ${brand.productName}'s are ${declared.join(", ")}`
5404
+ `unknown environment '${name}'. ${brand.productName}'s environments are ${declared.join(", ")}.`
5372
5405
  );
5373
5406
  }
5374
5407
  const config2 = readConfig(ctx.io.homeDir);
@@ -5377,7 +5410,7 @@ var environment = (program2, ctx) => {
5377
5410
  ctx.io.stdout(`Default environment: ${name}`);
5378
5411
  });
5379
5412
  group.command("unset").description(
5380
- "Forget the default environment (the product's default applies)"
5413
+ "Forget the default environment and go back to the product's default"
5381
5414
  ).action(() => {
5382
5415
  const config2 = readConfig(ctx.io.homeDir);
5383
5416
  delete config2.environment;
@@ -5386,7 +5419,7 @@ var environment = (program2, ctx) => {
5386
5419
  });
5387
5420
  };
5388
5421
  var api = (program2, ctx) => {
5389
- program2.command("api <method> <path>").description("Call any endpoint as the selected workspace (escape hatch)").option("--data <json>", "JSON request body").option("--workspace <slug>", "act in this workspace for one call").action(
5422
+ program2.command("api <method> <path>").description("Call any API endpoint directly, in the selected workspace").option("--data <json>", "JSON request body").option("--workspace <slug>", "act in this workspace for one call").action(
5390
5423
  async (method, path2, options) => {
5391
5424
  if (!path2.startsWith("/")) {
5392
5425
  throw new Error("usage: api <method> </v1/...> [--data '<json>']");
@@ -5406,7 +5439,7 @@ var api = (program2, ctx) => {
5406
5439
  );
5407
5440
  };
5408
5441
  var config = (program2, ctx) => {
5409
- program2.command("config").description("Show the effective settings (token masked)").action(() => {
5442
+ program2.command("config").description("Show the settings in effect, with the token hidden").action(() => {
5410
5443
  const settings = ctx.settings();
5411
5444
  ctx.io.stdout(
5412
5445
  json({
@@ -5487,14 +5520,14 @@ var OPERATIONS = [
5487
5520
  "idempotentHint": false
5488
5521
  }
5489
5522
  },
5490
- "description": "Asks whether `subject` may do `action` at `cost`, given every enabled limit that applies, and \u2014 in `consume` mode \u2014 uses it. Always 200 for a decision, allowed or refused: read `allowed`; `limits` shows what is left on each limit and `retryAfterSeconds` when to try again. An `Idempotency-Key` header makes a retried check return the same decision without using twice. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.",
5523
+ "description": "Asks whether `subject` may do `action` at `cost`, given every enabled limit that applies. In `consume` mode, it also counts the use. Every decision returns 200, whether it's allowed or refused, so read `allowed`. `limits` shows what's left on each limit, and `retryAfterSeconds` says when to try again. With an `Idempotency-Key` header, a retried check gets the same decision for an hour and counts only once. We cache its API key check briefly for speed. A revoked key can keep working here for up to 60 seconds.",
5491
5524
  "fields": [
5492
5525
  {
5493
5526
  "name": "subject",
5494
5527
  "in": "body",
5495
5528
  "type": "json",
5496
5529
  "required": true,
5497
- "description": 'Who is acting, as `{"kind": "user", "id": "usr_123"}`.',
5530
+ "description": 'Who is acting, such as `{"kind": "user", "id": "usr_123"}`.',
5498
5531
  "example": {
5499
5532
  "kind": "user",
5500
5533
  "id": "usr_123"
@@ -5506,20 +5539,20 @@ var OPERATIONS = [
5506
5539
  "type": "string",
5507
5540
  "minLength": 1,
5508
5541
  "maxLength": 100,
5509
- "description": "Your own label for who is acting: user, apikey, agent \u2026"
5542
+ "description": "Your own label for who is acting, such as user, apikey or agent."
5510
5543
  },
5511
5544
  "id": {
5512
5545
  "type": "string",
5513
5546
  "minLength": 1,
5514
5547
  "maxLength": 200,
5515
- "description": "Who exactly, in your product."
5548
+ "description": "The subject's ID in your product."
5516
5549
  }
5517
5550
  },
5518
5551
  "required": [
5519
5552
  "kind",
5520
5553
  "id"
5521
5554
  ],
5522
- "description": 'Who is acting, as `{"kind": "user", "id": "usr_123"}`.'
5555
+ "description": 'Who is acting, such as `{"kind": "user", "id": "usr_123"}`.'
5523
5556
  }
5524
5557
  },
5525
5558
  {
@@ -5527,13 +5560,7 @@ var OPERATIONS = [
5527
5560
  "in": "body",
5528
5561
  "type": "json",
5529
5562
  "required": false,
5530
- "description": "Shared subjects it also draws from \u2014 a team's, org's or project's pool (at most 4). Every limit on every subject must fit; all are charged, or none.",
5531
- "example": [
5532
- {
5533
- "kind": "team",
5534
- "id": "team_42"
5535
- }
5536
- ],
5563
+ "description": "Shared subjects the check also draws from, such as a team's, an organization's or a project's pool. Send at most 4. Every limit on every subject must fit, and Limitry charges either all of them or none.",
5537
5564
  "schema": {
5538
5565
  "type": "array",
5539
5566
  "items": {
@@ -5556,7 +5583,7 @@ var OPERATIONS = [
5556
5583
  ]
5557
5584
  },
5558
5585
  "maxItems": 4,
5559
- "description": "Shared subjects it also draws from \u2014 a team's, org's or project's pool (at most 4). Every limit on every subject must fit; all are charged, or none."
5586
+ "description": "Shared subjects the check also draws from, such as a team's, an organization's or a project's pool. Send at most 4. Every limit on every subject must fit, and Limitry charges either all of them or none."
5560
5587
  }
5561
5588
  },
5562
5589
  {
@@ -5578,13 +5605,13 @@ var OPERATIONS = [
5578
5605
  "in": "body",
5579
5606
  "type": "number",
5580
5607
  "required": false,
5581
- "description": "Units it would use. Default 1.",
5608
+ "description": "The units the action would use. Default: 1.",
5582
5609
  "example": 5,
5583
5610
  "schema": {
5584
5611
  "type": "integer",
5585
5612
  "minimum": 1,
5586
5613
  "maximum": 1e9,
5587
- "description": "Units it would use. Default 1."
5614
+ "description": "The units the action would use. Default: 1."
5588
5615
  }
5589
5616
  },
5590
5617
  {
@@ -5592,8 +5619,7 @@ var OPERATIONS = [
5592
5619
  "in": "body",
5593
5620
  "type": "string",
5594
5621
  "required": false,
5595
- "description": "`consume` (default) decides and uses; `preview` decides without using; `reserve` decides and reserves `cost` (what it will probably use) until you commit the actual amount or release it \u2014 see `reservation` in the answer. Only a reservation takes a slot of a `concurrent` limit.",
5596
- "example": "consume",
5622
+ "description": "How the check counts. `consume` decides and counts, and is the default. `preview` decides without counting anything. `reserve` decides and holds `cost`, your estimate, until you commit the actual amount or release it. The response's `reservation` names what it holds. Only a reservation takes a slot of a `concurrent` limit.",
5597
5623
  "schema": {
5598
5624
  "type": "string",
5599
5625
  "enum": [
@@ -5601,7 +5627,7 @@ var OPERATIONS = [
5601
5627
  "preview",
5602
5628
  "reserve"
5603
5629
  ],
5604
- "description": "`consume` (default) decides and uses; `preview` decides without using; `reserve` decides and reserves `cost` (what it will probably use) until you commit the actual amount or release it \u2014 see `reservation` in the answer. Only a reservation takes a slot of a `concurrent` limit."
5630
+ "description": "How the check counts. `consume` decides and counts, and is the default. `preview` decides without counting anything. `reserve` decides and holds `cost`, your estimate, until you commit the actual amount or release it. The response's `reservation` names what it holds. Only a reservation takes a slot of a `concurrent` limit."
5605
5631
  }
5606
5632
  },
5607
5633
  {
@@ -5609,18 +5635,18 @@ var OPERATIONS = [
5609
5635
  "in": "body",
5610
5636
  "type": "number",
5611
5637
  "required": false,
5612
- "description": "With `reserve`: how long the reservation lasts before it releases itself. Default 300, at most 3600.",
5613
- "example": 300,
5638
+ "description": "With `reserve`, how many seconds the reservation lasts before it releases itself. Default: 300. At most 3600.",
5614
5639
  "schema": {
5615
5640
  "type": "integer",
5616
5641
  "minimum": 1,
5617
5642
  "maximum": 3600,
5618
- "description": "With `reserve`: how long the reservation lasts before it releases itself. Default 300, at most 3600."
5643
+ "description": "With `reserve`, how many seconds the reservation lasts before it releases itself. Default: 300. At most 3600."
5619
5644
  }
5620
5645
  }
5621
5646
  ],
5622
5647
  "hasBody": true,
5623
5648
  "workspace": true,
5649
+ "acceptsApiKey": true,
5624
5650
  "scope": "checks:write"
5625
5651
  },
5626
5652
  {
@@ -5644,21 +5670,24 @@ var OPERATIONS = [
5644
5670
  "idempotentHint": false
5645
5671
  }
5646
5672
  },
5647
- "description": "Stops a limit: checks stop enforcing it at once, and it leaves the list. It is archived, not erased \u2014 its usage history and credits stay, and `POST /v1/limits/{limitId}/restore` brings it back. Owners and admins only, for a person's token.",
5673
+ "description": "Archives a limit, so checks stop enforcing it at once and it leaves the list. Archiving erases nothing. Limitry keeps the limit's usage history and credits, and `POST /v1/limits/{limitId}/restore` brings it back. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
5648
5674
  "fields": [
5649
5675
  {
5650
5676
  "name": "limitId",
5651
5677
  "in": "path",
5652
5678
  "type": "string",
5653
5679
  "required": true,
5654
- "example": "lmt_3f0c\u2026",
5680
+ "description": "The limit's ID.",
5681
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
5655
5682
  "schema": {
5656
- "type": "string"
5683
+ "type": "string",
5684
+ "description": "The limit's ID."
5657
5685
  }
5658
5686
  }
5659
5687
  ],
5660
5688
  "hasBody": false,
5661
5689
  "workspace": true,
5690
+ "acceptsApiKey": true,
5662
5691
  "scope": "limits:write"
5663
5692
  },
5664
5693
  {
@@ -5680,20 +5709,20 @@ var OPERATIONS = [
5680
5709
  "idempotentHint": false
5681
5710
  }
5682
5711
  },
5683
- "description": "Limits how much a subject may use per window \u2014 for example 200 cents a month for every `user`. Only `subject.kind`, `amount` and `window` are needed: `action` defaults to every action (`*`), `unit` to units, and `name` to the sentence the limit reads as. Checks enforce it from then on. What it counts (subject, action, unit, window, every, start, rolling) is fixed once created. Owners and admins only, for a person's token.",
5712
+ "description": "Creates a limit on how much a subject may use per window, such as 200 cents a month for every `user`. You only need to send `subject.kind`, `amount` and `window`. `action` defaults to every action (`*`), `unit` to units, and `name` to the sentence the limit reads as. The next check enforces the new limit. You can't change a limit's subject, action, unit, window, every, start or rolling after you create it. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
5684
5713
  "fields": [
5685
5714
  {
5686
5715
  "name": "name",
5687
5716
  "in": "body",
5688
5717
  "type": "string",
5689
5718
  "required": false,
5690
- "description": `A name, unique among the environment's active limits. Default: the sentence the limit reads as, such as "200 cents per user per month". If a limit already has that name, the answer is 409: give this one a name.`,
5719
+ "description": `The limit's name, unique among the environment's active limits. By default, it's the sentence the limit reads as, such as "200 cents per user per month". If another limit already has that name, you get a 409, so send a name of your own.`,
5691
5720
  "example": "AI budget",
5692
5721
  "schema": {
5693
5722
  "type": "string",
5694
5723
  "minLength": 1,
5695
5724
  "maxLength": 100,
5696
- "description": `A name, unique among the environment's active limits. Default: the sentence the limit reads as, such as "200 cents per user per month". If a limit already has that name, the answer is 409: give this one a name.`
5725
+ "description": `The limit's name, unique among the environment's active limits. By default, it's the sentence the limit reads as, such as "200 cents per user per month". If another limit already has that name, you get a 409, so send a name of your own.`
5697
5726
  }
5698
5727
  },
5699
5728
  {
@@ -5701,7 +5730,7 @@ var OPERATIONS = [
5701
5730
  "in": "body",
5702
5731
  "type": "json",
5703
5732
  "required": true,
5704
- "description": 'Who it applies to: `{"kind": "user"}` for every user, `{"kind": "user", "id": "usr_123"}` for one.',
5733
+ "description": 'Who the limit applies to. `{"kind": "user"}` covers every user, and `{"kind": "user", "id": "usr_123"}` covers one.',
5705
5734
  "example": {
5706
5735
  "kind": "user"
5707
5736
  },
@@ -5712,7 +5741,7 @@ var OPERATIONS = [
5712
5741
  "type": "string",
5713
5742
  "minLength": 1,
5714
5743
  "maxLength": 100,
5715
- "description": "Your own label for who is checked: user, team, apikey \u2026"
5744
+ "description": "Your own label for who the limit applies to, such as user, team or apikey."
5716
5745
  },
5717
5746
  "id": {
5718
5747
  "type": [
@@ -5721,13 +5750,13 @@ var OPERATIONS = [
5721
5750
  ],
5722
5751
  "minLength": 1,
5723
5752
  "maxLength": 100,
5724
- "description": "One subject; omit or null for every subject of the kind. A subject's own limit replaces the kind's limits with the same action and window."
5753
+ "description": "One subject's ID. Leave it out, or send null, to cover every subject of the kind. A limit for one subject replaces the kind's limits that have the same action and window."
5725
5754
  }
5726
5755
  },
5727
5756
  "required": [
5728
5757
  "kind"
5729
5758
  ],
5730
- "description": 'Who it applies to: `{"kind": "user"}` for every user, `{"kind": "user", "id": "usr_123"}` for one.'
5759
+ "description": 'Who the limit applies to. `{"kind": "user"}` covers every user, and `{"kind": "user", "id": "usr_123"}` covers one.'
5731
5760
  }
5732
5761
  },
5733
5762
  {
@@ -5777,7 +5806,7 @@ var OPERATIONS = [
5777
5806
  "in": "body",
5778
5807
  "type": "string",
5779
5808
  "required": true,
5780
- "description": "`minute`, `hour`, `day`, `week`, `month` or `year`: a period of `every` of them, reset where `start` says (or rolling: see `rolling`). `total`: a balance that never resets, raised by credits. `concurrent`: at most `amount` open reservations at once.",
5809
+ "description": "The kind of period. `minute`, `hour`, `day`, `week`, `month` and `year` count a period of `every` windows, which resets where `start` says, or rolls when `rolling` is true. `total` is a balance that never resets, and credits raise it. `concurrent` allows at most `amount` open reservations at once.",
5781
5810
  "example": "month",
5782
5811
  "schema": {
5783
5812
  "type": "string",
@@ -5791,7 +5820,7 @@ var OPERATIONS = [
5791
5820
  "total",
5792
5821
  "concurrent"
5793
5822
  ],
5794
- "description": "`minute`, `hour`, `day`, `week`, `month` or `year`: a period of `every` of them, reset where `start` says (or rolling: see `rolling`). `total`: a balance that never resets, raised by credits. `concurrent`: at most `amount` open reservations at once."
5823
+ "description": "The kind of period. `minute`, `hour`, `day`, `week`, `month` and `year` count a period of `every` windows, which resets where `start` says, or rolls when `rolling` is true. `total` is a balance that never resets, and credits raise it. `concurrent` allows at most `amount` open reservations at once."
5795
5824
  }
5796
5825
  },
5797
5826
  {
@@ -5799,13 +5828,13 @@ var OPERATIONS = [
5799
5828
  "in": "body",
5800
5829
  "type": "number",
5801
5830
  "required": false,
5802
- "description": 'How many `window` units a period lasts: `window: "month", every: 3` is a quarter, `window: "hour", every: 5` five hours. Default: 1.',
5831
+ "description": 'How many `window` units one period lasts. For example, `window: "month", every: 3` is a quarter, and `window: "hour", every: 5` is five hours. Default: 1.',
5803
5832
  "example": 1,
5804
5833
  "schema": {
5805
5834
  "type": "integer",
5806
5835
  "minimum": 1,
5807
5836
  "maximum": 1e3,
5808
- "description": 'How many `window` units a period lasts: `window: "month", every: 3` is a quarter, `window: "hour", every: 5` five hours. Default: 1.'
5837
+ "description": 'How many `window` units one period lasts. For example, `window: "month", every: 3` is a quarter, and `window: "hour", every: 5` is five hours. Default: 1.'
5809
5838
  }
5810
5839
  },
5811
5840
  {
@@ -5813,7 +5842,7 @@ var OPERATIONS = [
5813
5842
  "in": "body",
5814
5843
  "type": "string",
5815
5844
  "required": false,
5816
- "description": "Where a period begins. `calendar`: UTC boundaries (midnight, Monday, the 1st, 1 January). `billing_date`: from the subject's billing date, set with `subjects.update` (its first check until then), so an annual plan can reset monthly from its start day. `first_use`: at the first check after the previous period ended. Default: calendar.",
5845
+ "description": "Where each period begins. `calendar` uses UTC boundaries: midnight, Monday, the 1st or 1 January. `billing_date` counts from the subject's billing date. You set it with `subjects.update`. An annual plan can then still reset monthly. Until a subject has a billing date, its first check stands in for it. `first_use` starts a period at the first check after the previous one ended. Default: calendar.",
5817
5846
  "example": "calendar",
5818
5847
  "schema": {
5819
5848
  "type": "string",
@@ -5822,7 +5851,7 @@ var OPERATIONS = [
5822
5851
  "billing_date",
5823
5852
  "first_use"
5824
5853
  ],
5825
- "description": "Where a period begins. `calendar`: UTC boundaries (midnight, Monday, the 1st, 1 January). `billing_date`: from the subject's billing date, set with `subjects.update` (its first check until then), so an annual plan can reset monthly from its start day. `first_use`: at the first check after the previous period ended. Default: calendar."
5854
+ "description": "Where each period begins. `calendar` uses UTC boundaries: midnight, Monday, the 1st or 1 January. `billing_date` counts from the subject's billing date. You set it with `subjects.update`. An annual plan can then still reset monthly. Until a subject has a billing date, its first check stands in for it. `first_use` starts a period at the first check after the previous one ended. Default: calendar."
5826
5855
  }
5827
5856
  },
5828
5857
  {
@@ -5830,10 +5859,10 @@ var OPERATIONS = [
5830
5859
  "in": "body",
5831
5860
  "type": "boolean",
5832
5861
  "required": false,
5833
- "description": "Count the last window instead of the calendar one (minute, hour or day only). Default: false.",
5862
+ "description": "Whether to count the last `every` windows up to the moment of each check, rather than fixed periods. Only `minute`, `hour` and `day` limits can roll. Default: false.",
5834
5863
  "schema": {
5835
5864
  "type": "boolean",
5836
- "description": "Count the last window instead of the calendar one (minute, hour or day only). Default: false."
5865
+ "description": "Whether to count the last `every` windows up to the moment of each check, rather than fixed periods. Only `minute`, `hour` and `day` limits can roll. Default: false."
5837
5866
  }
5838
5867
  },
5839
5868
  {
@@ -5841,10 +5870,10 @@ var OPERATIONS = [
5841
5870
  "in": "body",
5842
5871
  "type": "boolean",
5843
5872
  "required": false,
5844
- "description": "Whether checks enforce it. Default: true.",
5873
+ "description": "Whether checks enforce the limit. Default: true.",
5845
5874
  "schema": {
5846
5875
  "type": "boolean",
5847
- "description": "Whether checks enforce it. Default: true."
5876
+ "description": "Whether checks enforce the limit. Default: true."
5848
5877
  }
5849
5878
  },
5850
5879
  {
@@ -5852,19 +5881,20 @@ var OPERATIONS = [
5852
5881
  "in": "body",
5853
5882
  "type": "string",
5854
5883
  "required": false,
5855
- "description": "What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny). Default: open.",
5884
+ "description": "What your code should do when it can't reach Limitry. `open` allows and `closed` refuses. Default: open.",
5856
5885
  "schema": {
5857
5886
  "type": "string",
5858
5887
  "enum": [
5859
5888
  "open",
5860
5889
  "closed"
5861
5890
  ],
5862
- "description": "What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny). Default: open."
5891
+ "description": "What your code should do when it can't reach Limitry. `open` allows and `closed` refuses. Default: open."
5863
5892
  }
5864
5893
  }
5865
5894
  ],
5866
5895
  "hasBody": true,
5867
5896
  "workspace": true,
5897
+ "acceptsApiKey": true,
5868
5898
  "scope": "limits:write"
5869
5899
  },
5870
5900
  {
@@ -5883,16 +5913,18 @@ var OPERATIONS = [
5883
5913
  "exposed": false,
5884
5914
  "reason": "Adding credits gives value away; an agent asks a person (limit.credit approval)"
5885
5915
  },
5886
- "description": "Adds `amount` credits to one subject's balance \u2014 a limit whose window is `total`. A negative `amount` takes credits back (a refund, a chargeback) and needs a `note` saying why; the balance may go below zero, and checks are refused until more credits are added. Owners and admins, or a workspace API key; an agent asks a person (the `limit.credit` approval).",
5916
+ "description": "Adds `amount` credits to one subject's balance, on a limit whose window is `total`. A negative `amount` takes credits back, such as after a refund or a chargeback, and needs a `note` saying why. The balance can go below zero, and Limitry then refuses checks until you add more credits. Owners, admins and workspace API keys can add credits. An agent asks a person instead, through the `limit.credit` approval. Limitry keeps a credit's `Idempotency-Key` forever, so never reuse one for a new credit.",
5887
5917
  "fields": [
5888
5918
  {
5889
5919
  "name": "limitId",
5890
5920
  "in": "path",
5891
5921
  "type": "string",
5892
5922
  "required": true,
5893
- "example": "lmt_3f0c\u2026",
5923
+ "description": "The limit's ID.",
5924
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
5894
5925
  "schema": {
5895
- "type": "string"
5926
+ "type": "string",
5927
+ "description": "The limit's ID."
5896
5928
  }
5897
5929
  },
5898
5930
  {
@@ -5900,7 +5932,7 @@ var OPERATIONS = [
5900
5932
  "in": "body",
5901
5933
  "type": "json",
5902
5934
  "required": true,
5903
- "description": 'Who gets the credits, as `{"kind": "team", "id": "team_42"}`.',
5935
+ "description": 'Who gets the credits, such as `{"kind": "team", "id": "team_42"}`.',
5904
5936
  "example": {
5905
5937
  "kind": "team",
5906
5938
  "id": "team_42"
@@ -5923,7 +5955,7 @@ var OPERATIONS = [
5923
5955
  "kind",
5924
5956
  "id"
5925
5957
  ],
5926
- "description": 'Who gets the credits, as `{"kind": "team", "id": "team_42"}`.'
5958
+ "description": 'Who gets the credits, such as `{"kind": "team", "id": "team_42"}`.'
5927
5959
  }
5928
5960
  },
5929
5961
  {
@@ -5931,11 +5963,11 @@ var OPERATIONS = [
5931
5963
  "in": "body",
5932
5964
  "type": "number",
5933
5965
  "required": true,
5934
- "description": "Credits to add; negative to take them back. Not 0.",
5966
+ "description": "The credits to add, or a negative number to take them back. It can't be 0.",
5935
5967
  "example": 5e3,
5936
5968
  "schema": {
5937
5969
  "type": "integer",
5938
- "description": "Credits to add; negative to take them back. Not 0."
5970
+ "description": "The credits to add, or a negative number to take them back. It can't be 0."
5939
5971
  }
5940
5972
  },
5941
5973
  {
@@ -5943,17 +5975,18 @@ var OPERATIONS = [
5943
5975
  "in": "body",
5944
5976
  "type": "string",
5945
5977
  "required": false,
5946
- "description": "Required when `amount` is negative.",
5978
+ "description": "Why the balance changed. It's required when `amount` is negative.",
5947
5979
  "example": "October credits",
5948
5980
  "schema": {
5949
5981
  "type": "string",
5950
5982
  "maxLength": 200,
5951
- "description": "Required when `amount` is negative."
5983
+ "description": "Why the balance changed. It's required when `amount` is negative."
5952
5984
  }
5953
5985
  }
5954
5986
  ],
5955
5987
  "hasBody": true,
5956
5988
  "workspace": true,
5989
+ "acceptsApiKey": true,
5957
5990
  "scope": "limits:write"
5958
5991
  },
5959
5992
  {
@@ -5977,21 +6010,24 @@ var OPERATIONS = [
5977
6010
  "idempotentHint": true
5978
6011
  }
5979
6012
  },
5980
- "description": "Credits added to (or taken back from) subjects' balances for this limit, newest first.",
6013
+ "description": "Lists the credits added to subjects' balances on this limit, including any taken back. It returns the newest 200, newest first.",
5981
6014
  "fields": [
5982
6015
  {
5983
6016
  "name": "limitId",
5984
6017
  "in": "path",
5985
6018
  "type": "string",
5986
6019
  "required": true,
5987
- "example": "lmt_3f0c\u2026",
6020
+ "description": "The limit's ID.",
6021
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
5988
6022
  "schema": {
5989
- "type": "string"
6023
+ "type": "string",
6024
+ "description": "The limit's ID."
5990
6025
  }
5991
6026
  }
5992
6027
  ],
5993
6028
  "hasBody": false,
5994
6029
  "workspace": true,
6030
+ "acceptsApiKey": true,
5995
6031
  "scope": "limits:read"
5996
6032
  },
5997
6033
  {
@@ -6015,21 +6051,24 @@ var OPERATIONS = [
6015
6051
  "idempotentHint": true
6016
6052
  }
6017
6053
  },
6018
- "description": "One limit: who it applies to, the action, amount and window.",
6054
+ "description": "Returns one limit, with who it applies to, its action, its amount and its window.",
6019
6055
  "fields": [
6020
6056
  {
6021
6057
  "name": "limitId",
6022
6058
  "in": "path",
6023
6059
  "type": "string",
6024
6060
  "required": true,
6025
- "example": "lmt_3f0c\u2026",
6061
+ "description": "The limit's ID.",
6062
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6026
6063
  "schema": {
6027
- "type": "string"
6064
+ "type": "string",
6065
+ "description": "The limit's ID."
6028
6066
  }
6029
6067
  }
6030
6068
  ],
6031
6069
  "hasBody": false,
6032
6070
  "workspace": true,
6071
+ "acceptsApiKey": true,
6033
6072
  "scope": "limits:read"
6034
6073
  },
6035
6074
  {
@@ -6051,7 +6090,7 @@ var OPERATIONS = [
6051
6090
  "idempotentHint": true
6052
6091
  }
6053
6092
  },
6054
- "description": "The workspace's active limits, newest first (`archived=true`: the archived ones). Filter by `subjectKind` and `action`; paginate with the opaque `nextCursor` token.",
6093
+ "description": "Lists this environment's active limits, newest first. With `archived=true`, it lists the archived ones instead. Filter by `subjectKind` and `action`, and page through the results with the opaque `nextCursor` token.",
6055
6094
  "fields": [
6056
6095
  {
6057
6096
  "name": "limit",
@@ -6084,12 +6123,12 @@ var OPERATIONS = [
6084
6123
  "in": "query",
6085
6124
  "type": "string",
6086
6125
  "required": false,
6087
- "description": "Only this kind.",
6126
+ "description": "Only limits for this subject kind.",
6088
6127
  "schema": {
6089
6128
  "type": "string",
6090
6129
  "minLength": 1,
6091
6130
  "maxLength": 100,
6092
- "description": "Only this kind."
6131
+ "description": "Only limits for this subject kind."
6093
6132
  }
6094
6133
  },
6095
6134
  {
@@ -6097,12 +6136,12 @@ var OPERATIONS = [
6097
6136
  "in": "query",
6098
6137
  "type": "string",
6099
6138
  "required": false,
6100
- "description": "Only this action.",
6139
+ "description": "Only limits for this action.",
6101
6140
  "schema": {
6102
6141
  "type": "string",
6103
6142
  "minLength": 1,
6104
6143
  "maxLength": 100,
6105
- "description": "Only this action."
6144
+ "description": "Only limits for this action."
6106
6145
  }
6107
6146
  },
6108
6147
  {
@@ -6110,19 +6149,20 @@ var OPERATIONS = [
6110
6149
  "in": "query",
6111
6150
  "type": "string",
6112
6151
  "required": false,
6113
- "description": "`true`: the archived limits instead.",
6152
+ "description": "Send `true` to list the archived limits instead.",
6114
6153
  "schema": {
6115
6154
  "type": "string",
6116
6155
  "enum": [
6117
6156
  "true",
6118
6157
  "false"
6119
6158
  ],
6120
- "description": "`true`: the archived limits instead."
6159
+ "description": "Send `true` to list the archived limits instead."
6121
6160
  }
6122
6161
  }
6123
6162
  ],
6124
6163
  "hasBody": false,
6125
6164
  "workspace": true,
6165
+ "acceptsApiKey": true,
6126
6166
  "scope": "limits:read"
6127
6167
  },
6128
6168
  {
@@ -6146,21 +6186,24 @@ var OPERATIONS = [
6146
6186
  "idempotentHint": false
6147
6187
  }
6148
6188
  },
6149
- "description": "Brings an archived limit back into force \u2014 refused while an active limit has its name. Owners and admins only, for a person's token.",
6189
+ "description": "Brings an archived limit back. Checks enforce it again if it's enabled. The API refuses it while an active limit has the same name. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
6150
6190
  "fields": [
6151
6191
  {
6152
6192
  "name": "limitId",
6153
6193
  "in": "path",
6154
6194
  "type": "string",
6155
6195
  "required": true,
6156
- "example": "lmt_3f0c\u2026",
6196
+ "description": "The limit's ID.",
6197
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6157
6198
  "schema": {
6158
- "type": "string"
6199
+ "type": "string",
6200
+ "description": "The limit's ID."
6159
6201
  }
6160
6202
  }
6161
6203
  ],
6162
6204
  "hasBody": false,
6163
6205
  "workspace": true,
6206
+ "acceptsApiKey": true,
6164
6207
  "scope": "limits:write"
6165
6208
  },
6166
6209
  {
@@ -6183,14 +6226,14 @@ var OPERATIONS = [
6183
6226
  "idempotentHint": false
6184
6227
  }
6185
6228
  },
6186
- "description": "Makes the environment's limits match `limits`, by name: creates the missing, changes those that differ (an omitted field means its default) and, with `archiveMissing`, archives active limits the list doesn't name. Running it twice changes nothing the second time. Limitry checks the whole list first, and a problem anywhere changes nothing (400, each problem in `details`); then it writes every change at once. What a limit counts is fixed: a different subject, action, unit or window under an existing name is refused until the entry is renamed. `preview` answers what it would do without writing. For keeping limits in a file in your repository (`limitry sync`). Owners and admins only, for a person's token.",
6229
+ "description": "Makes the environment's limits match the list in `limits`, pairing them up by name. It creates the limits that are missing and changes the ones that differ, where an omitted field means its default. With `archiveMissing`, it also archives the active limits the list doesn't name. Running it twice changes nothing the second time. Limitry checks the whole list before writing anything. If any entry has a problem, nothing changes, and the 400 lists each problem in `details`. Otherwise Limitry writes every change at once. You can't change a limit's subject, action, unit, window, every, start or rolling under the same name, so rename the entry to do that. With `preview`, it returns what it would do without writing anything. This is the call behind `limitry sync`, for keeping your limits in a file in your repository. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
6187
6230
  "fields": [
6188
6231
  {
6189
6232
  "name": "limits",
6190
6233
  "in": "body",
6191
6234
  "type": "json",
6192
6235
  "required": true,
6193
- "description": "Every limit you want, each described whole: an omitted field is its default, as on create. Names are the key and must be unique in the list. What a limit counts (subject, action, unit, window, every, start, rolling) is fixed: to change it, rename the entry, which creates a new limit. At most 200.",
6236
+ "description": "Every limit you want, each described in full. An omitted field takes its default, as on create. A sync matches limits by name, so each name must be unique in the list. You can't change a limit's subject, action, unit, window, every, start or rolling under the same name. To change one of them, rename the entry, which creates a new limit. The list holds at most 200 limits.",
6194
6237
  "example": [
6195
6238
  {
6196
6239
  "name": "AI budget",
@@ -6218,7 +6261,7 @@ var OPERATIONS = [
6218
6261
  "minLength": 1,
6219
6262
  "maxLength": 100,
6220
6263
  "example": "AI budget",
6221
- "description": "The limit's name: the key a sync matches on, unique in the list."
6264
+ "description": "The limit's name. A sync matches limits by name, so each name appears once in the list."
6222
6265
  }
6223
6266
  },
6224
6267
  "required": [
@@ -6228,7 +6271,7 @@ var OPERATIONS = [
6228
6271
  ]
6229
6272
  },
6230
6273
  "maxItems": 200,
6231
- "description": "Every limit you want, each described whole: an omitted field is its default, as on create. Names are the key and must be unique in the list. What a limit counts (subject, action, unit, window, every, start, rolling) is fixed: to change it, rename the entry, which creates a new limit. At most 200."
6274
+ "description": "Every limit you want, each described in full. An omitted field takes its default, as on create. A sync matches limits by name, so each name must be unique in the list. You can't change a limit's subject, action, unit, window, every, start or rolling under the same name. To change one of them, rename the entry, which creates a new limit. The list holds at most 200 limits."
6232
6275
  }
6233
6276
  },
6234
6277
  {
@@ -6236,10 +6279,10 @@ var OPERATIONS = [
6236
6279
  "in": "body",
6237
6280
  "type": "boolean",
6238
6281
  "required": false,
6239
- "description": "Archive the environment's active limits whose names aren't in `limits` (restorable). Default: false, which leaves them alone.",
6282
+ "description": "Whether to archive the environment's active limits whose names aren't in `limits`. You can restore them later. Default: false, which leaves them alone.",
6240
6283
  "schema": {
6241
6284
  "type": "boolean",
6242
- "description": "Archive the environment's active limits whose names aren't in `limits` (restorable). Default: false, which leaves them alone."
6285
+ "description": "Whether to archive the environment's active limits whose names aren't in `limits`. You can restore them later. Default: false, which leaves them alone."
6243
6286
  }
6244
6287
  },
6245
6288
  {
@@ -6247,15 +6290,16 @@ var OPERATIONS = [
6247
6290
  "in": "body",
6248
6291
  "type": "boolean",
6249
6292
  "required": false,
6250
- "description": "Answer what the sync would do and change nothing. Default: false.",
6293
+ "description": "Whether to report what the sync would do without changing anything. Default: false.",
6251
6294
  "schema": {
6252
6295
  "type": "boolean",
6253
- "description": "Answer what the sync would do and change nothing. Default: false."
6296
+ "description": "Whether to report what the sync would do without changing anything. Default: false."
6254
6297
  }
6255
6298
  }
6256
6299
  ],
6257
6300
  "hasBody": true,
6258
6301
  "workspace": true,
6302
+ "acceptsApiKey": true,
6259
6303
  "scope": "limits:write"
6260
6304
  },
6261
6305
  {
@@ -6279,16 +6323,18 @@ var OPERATIONS = [
6279
6323
  "idempotentHint": false
6280
6324
  }
6281
6325
  },
6282
- "description": "Changes a limit's name, amount, fail mode or whether it is enabled; checks use the new rule at once. What a limit counts (subject, action, unit, window, every, start, rolling) is fixed: a different value is refused (400) \u2014 create a new limit and archive this one. Owners and admins only, for a person's token.",
6326
+ "description": "Changes a limit's name, amount, fail mode or whether it's enabled. Checks use the new rule at once. You can't change a limit's subject, action, unit, window, every, start or rolling, and a request that tries gets a 400. To count something different, create a new limit and archive this one. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
6283
6327
  "fields": [
6284
6328
  {
6285
6329
  "name": "limitId",
6286
6330
  "in": "path",
6287
6331
  "type": "string",
6288
6332
  "required": true,
6289
- "example": "lmt_3f0c\u2026",
6333
+ "description": "The limit's ID.",
6334
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6290
6335
  "schema": {
6291
- "type": "string"
6336
+ "type": "string",
6337
+ "description": "The limit's ID."
6292
6338
  }
6293
6339
  },
6294
6340
  {
@@ -6324,10 +6370,10 @@ var OPERATIONS = [
6324
6370
  "in": "body",
6325
6371
  "type": "boolean",
6326
6372
  "required": false,
6327
- "description": "Whether checks enforce it.",
6373
+ "description": "Whether checks enforce the limit.",
6328
6374
  "schema": {
6329
6375
  "type": "boolean",
6330
- "description": "Whether checks enforce it."
6376
+ "description": "Whether checks enforce the limit."
6331
6377
  }
6332
6378
  },
6333
6379
  {
@@ -6335,14 +6381,14 @@ var OPERATIONS = [
6335
6381
  "in": "body",
6336
6382
  "type": "string",
6337
6383
  "required": false,
6338
- "description": "What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny).",
6384
+ "description": "What your code should do when it can't reach Limitry. `open` allows and `closed` refuses.",
6339
6385
  "schema": {
6340
6386
  "type": "string",
6341
6387
  "enum": [
6342
6388
  "open",
6343
6389
  "closed"
6344
6390
  ],
6345
- "description": "What your code should do when Limitry can't be reached: `open` (allow) or `closed` (deny)."
6391
+ "description": "What your code should do when it can't reach Limitry. `open` allows and `closed` refuses."
6346
6392
  }
6347
6393
  },
6348
6394
  {
@@ -6350,7 +6396,7 @@ var OPERATIONS = [
6350
6396
  "in": "body",
6351
6397
  "type": "json",
6352
6398
  "required": false,
6353
- "description": "Who it applies to. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6399
+ "description": "Who the limit applies to. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6354
6400
  "example": {
6355
6401
  "kind": "user"
6356
6402
  },
@@ -6361,7 +6407,7 @@ var OPERATIONS = [
6361
6407
  "type": "string",
6362
6408
  "minLength": 1,
6363
6409
  "maxLength": 100,
6364
- "description": "Your own label for who is checked: user, team, apikey \u2026"
6410
+ "description": "Your own label for who the limit applies to, such as user, team or apikey."
6365
6411
  },
6366
6412
  "id": {
6367
6413
  "type": [
@@ -6370,10 +6416,10 @@ var OPERATIONS = [
6370
6416
  ],
6371
6417
  "minLength": 1,
6372
6418
  "maxLength": 100,
6373
- "description": "One subject; omit or null for every subject of the kind. A subject's own limit replaces the kind's limits with the same action and window."
6419
+ "description": "One subject's ID. Leave it out, or send null, to cover every subject of the kind. A limit for one subject replaces the kind's limits that have the same action and window."
6374
6420
  }
6375
6421
  },
6376
- "description": "Who it applies to. Fixed once the limit is created: to change it, create a new limit and archive this one."
6422
+ "description": "Who the limit applies to. You set it when you create the limit. To change it later, create a new limit and archive this one."
6377
6423
  }
6378
6424
  },
6379
6425
  {
@@ -6381,12 +6427,12 @@ var OPERATIONS = [
6381
6427
  "in": "body",
6382
6428
  "type": "string",
6383
6429
  "required": false,
6384
- "description": "The action. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6430
+ "description": "The action the limit applies to. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6385
6431
  "schema": {
6386
6432
  "type": "string",
6387
6433
  "minLength": 1,
6388
6434
  "maxLength": 100,
6389
- "description": "The action. Fixed once the limit is created: to change it, create a new limit and archive this one."
6435
+ "description": "The action the limit applies to. You set it when you create the limit. To change it later, create a new limit and archive this one."
6390
6436
  }
6391
6437
  },
6392
6438
  {
@@ -6394,12 +6440,12 @@ var OPERATIONS = [
6394
6440
  "in": "body",
6395
6441
  "type": "string",
6396
6442
  "required": false,
6397
- "description": "What the amount counts. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6443
+ "description": "What the amount counts. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6398
6444
  "schema": {
6399
6445
  "type": "string",
6400
6446
  "minLength": 1,
6401
6447
  "maxLength": 40,
6402
- "description": "What the amount counts. Fixed once the limit is created: to change it, create a new limit and archive this one."
6448
+ "description": "What the amount counts. You set it when you create the limit. To change it later, create a new limit and archive this one."
6403
6449
  }
6404
6450
  },
6405
6451
  {
@@ -6407,7 +6453,7 @@ var OPERATIONS = [
6407
6453
  "in": "body",
6408
6454
  "type": "string",
6409
6455
  "required": false,
6410
- "description": "The window. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6456
+ "description": "The kind of period. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6411
6457
  "schema": {
6412
6458
  "type": "string",
6413
6459
  "enum": [
@@ -6420,7 +6466,7 @@ var OPERATIONS = [
6420
6466
  "total",
6421
6467
  "concurrent"
6422
6468
  ],
6423
- "description": "The window. Fixed once the limit is created: to change it, create a new limit and archive this one."
6469
+ "description": "The kind of period. You set it when you create the limit. To change it later, create a new limit and archive this one."
6424
6470
  }
6425
6471
  },
6426
6472
  {
@@ -6428,12 +6474,12 @@ var OPERATIONS = [
6428
6474
  "in": "body",
6429
6475
  "type": "number",
6430
6476
  "required": false,
6431
- "description": "How many windows a period lasts. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6477
+ "description": "How many windows one period lasts. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6432
6478
  "schema": {
6433
6479
  "type": "integer",
6434
6480
  "minimum": 1,
6435
6481
  "maximum": 1e3,
6436
- "description": "How many windows a period lasts. Fixed once the limit is created: to change it, create a new limit and archive this one."
6482
+ "description": "How many windows one period lasts. You set it when you create the limit. To change it later, create a new limit and archive this one."
6437
6483
  }
6438
6484
  },
6439
6485
  {
@@ -6441,7 +6487,7 @@ var OPERATIONS = [
6441
6487
  "in": "body",
6442
6488
  "type": "string",
6443
6489
  "required": false,
6444
- "description": "Where a period begins. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6490
+ "description": "Where each period begins. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6445
6491
  "schema": {
6446
6492
  "type": "string",
6447
6493
  "enum": [
@@ -6449,7 +6495,7 @@ var OPERATIONS = [
6449
6495
  "billing_date",
6450
6496
  "first_use"
6451
6497
  ],
6452
- "description": "Where a period begins. Fixed once the limit is created: to change it, create a new limit and archive this one."
6498
+ "description": "Where each period begins. You set it when you create the limit. To change it later, create a new limit and archive this one."
6453
6499
  }
6454
6500
  },
6455
6501
  {
@@ -6457,15 +6503,16 @@ var OPERATIONS = [
6457
6503
  "in": "body",
6458
6504
  "type": "boolean",
6459
6505
  "required": false,
6460
- "description": "Whether it counts the last window. Fixed once the limit is created: to change it, create a new limit and archive this one.",
6506
+ "description": "Whether the limit counts the last windows up to each check. You set it when you create the limit. To change it later, create a new limit and archive this one.",
6461
6507
  "schema": {
6462
6508
  "type": "boolean",
6463
- "description": "Whether it counts the last window. Fixed once the limit is created: to change it, create a new limit and archive this one."
6509
+ "description": "Whether the limit counts the last windows up to each check. You set it when you create the limit. To change it later, create a new limit and archive this one."
6464
6510
  }
6465
6511
  }
6466
6512
  ],
6467
6513
  "hasBody": true,
6468
6514
  "workspace": true,
6515
+ "acceptsApiKey": true,
6469
6516
  "scope": "limits:write"
6470
6517
  },
6471
6518
  {
@@ -6489,15 +6536,17 @@ var OPERATIONS = [
6489
6536
  "idempotentHint": false
6490
6537
  }
6491
6538
  },
6492
- "description": "Commits a reservation with the ACTUAL amount used (`cost`): less than reserved gives the rest back at once; more is charged in full \u2014 the work happened. A commit after the reservation expired still charges `cost`. Repeating a commit answers the same. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.",
6539
+ "description": "Commits a reservation with the amount actually used (`cost`). If `cost` is less than the amount reserved, the rest goes back at once. If it's more, Limitry charges the whole `cost`, since the work happened. A commit up to 24 hours after the reservation expired still charges `cost`. Repeating a commit with the same `cost` returns the same result, and a different `cost` gets a 400. We cache its API key check briefly for speed. A revoked key can keep working here for up to 60 seconds.",
6493
6540
  "fields": [
6494
6541
  {
6495
6542
  "name": "reservationId",
6496
6543
  "in": "path",
6497
6544
  "type": "string",
6498
6545
  "required": true,
6546
+ "description": "The reservation's ID.",
6499
6547
  "schema": {
6500
- "type": "string"
6548
+ "type": "string",
6549
+ "description": "The reservation's ID."
6501
6550
  }
6502
6551
  },
6503
6552
  {
@@ -6516,6 +6565,7 @@ var OPERATIONS = [
6516
6565
  ],
6517
6566
  "hasBody": true,
6518
6567
  "workspace": true,
6568
+ "acceptsApiKey": true,
6519
6569
  "scope": "checks:write"
6520
6570
  },
6521
6571
  {
@@ -6539,15 +6589,17 @@ var OPERATIONS = [
6539
6589
  "idempotentHint": false
6540
6590
  }
6541
6591
  },
6542
- "description": "Keeps a reservation for longer work: it now expires `ttlSeconds` from now (default 300, at most 3600) \u2014 call it again as a heartbeat. Only an open reservation can be extended. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.",
6592
+ "description": "Keeps a reservation open for longer work, so it expires `ttlSeconds` from now. Call it again as a heartbeat while the work runs. You can only extend a reservation that's still held. We cache its API key check briefly for speed. A revoked key can keep working here for up to 60 seconds.",
6543
6593
  "fields": [
6544
6594
  {
6545
6595
  "name": "reservationId",
6546
6596
  "in": "path",
6547
6597
  "type": "string",
6548
6598
  "required": true,
6599
+ "description": "The reservation's ID.",
6549
6600
  "schema": {
6550
- "type": "string"
6601
+ "type": "string",
6602
+ "description": "The reservation's ID."
6551
6603
  }
6552
6604
  },
6553
6605
  {
@@ -6555,18 +6607,19 @@ var OPERATIONS = [
6555
6607
  "in": "body",
6556
6608
  "type": "number",
6557
6609
  "required": false,
6558
- "description": "Seconds from now. Default 300.",
6610
+ "description": "Seconds from now until the reservation expires. Default: 300. At most 3600.",
6559
6611
  "example": 600,
6560
6612
  "schema": {
6561
6613
  "type": "integer",
6562
6614
  "minimum": 1,
6563
6615
  "maximum": 3600,
6564
- "description": "Seconds from now. Default 300."
6616
+ "description": "Seconds from now until the reservation expires. Default: 300. At most 3600."
6565
6617
  }
6566
6618
  }
6567
6619
  ],
6568
6620
  "hasBody": true,
6569
6621
  "workspace": true,
6622
+ "acceptsApiKey": true,
6570
6623
  "scope": "checks:write"
6571
6624
  },
6572
6625
  {
@@ -6590,20 +6643,23 @@ var OPERATIONS = [
6590
6643
  "idempotentHint": false
6591
6644
  }
6592
6645
  },
6593
- "description": "Gives the whole reservation back \u2014 the work did not happen. Repeating a release answers the same; releasing a committed reservation is refused. Its API-key check is cached briefly for speed: a revoked key can keep working here for up to 60 seconds.",
6646
+ "description": "Gives the whole reservation back, because the work didn't happen. Repeating a release within 24 hours returns the same result. You can't release a reservation you've already committed. We cache its API key check briefly for speed. A revoked key can keep working here for up to 60 seconds.",
6594
6647
  "fields": [
6595
6648
  {
6596
6649
  "name": "reservationId",
6597
6650
  "in": "path",
6598
6651
  "type": "string",
6599
6652
  "required": true,
6653
+ "description": "The reservation's ID.",
6600
6654
  "schema": {
6601
- "type": "string"
6655
+ "type": "string",
6656
+ "description": "The reservation's ID."
6602
6657
  }
6603
6658
  }
6604
6659
  ],
6605
6660
  "hasBody": false,
6606
6661
  "workspace": true,
6662
+ "acceptsApiKey": true,
6607
6663
  "scope": "checks:write"
6608
6664
  },
6609
6665
  {
@@ -6628,18 +6684,20 @@ var OPERATIONS = [
6628
6684
  "idempotentHint": true
6629
6685
  }
6630
6686
  },
6631
- "description": "A subject's billing date: when its `billing_date` limits' periods start from. A subject is yours (a user, a team, an agent) and exists once a check names it.",
6687
+ "description": "Returns a subject's billing date, the day its `billing_date` limits start each new period. A subject is one of yours, such as a user, a team or an agent. It exists once a check names it.",
6632
6688
  "fields": [
6633
6689
  {
6634
6690
  "name": "subjectKind",
6635
6691
  "in": "path",
6636
6692
  "type": "string",
6637
6693
  "required": true,
6694
+ "description": "The subject kind's ID.",
6638
6695
  "example": "team",
6639
6696
  "schema": {
6640
6697
  "type": "string",
6641
6698
  "minLength": 1,
6642
- "maxLength": 100
6699
+ "maxLength": 100,
6700
+ "description": "The subject kind's ID."
6643
6701
  }
6644
6702
  },
6645
6703
  {
@@ -6647,16 +6705,19 @@ var OPERATIONS = [
6647
6705
  "in": "path",
6648
6706
  "type": "string",
6649
6707
  "required": true,
6708
+ "description": "The subject's ID.",
6650
6709
  "example": "team_42",
6651
6710
  "schema": {
6652
6711
  "type": "string",
6653
6712
  "minLength": 1,
6654
- "maxLength": 200
6713
+ "maxLength": 200,
6714
+ "description": "The subject's ID."
6655
6715
  }
6656
6716
  }
6657
6717
  ],
6658
6718
  "hasBody": false,
6659
6719
  "workspace": true,
6720
+ "acceptsApiKey": true,
6660
6721
  "scope": "limits:read"
6661
6722
  },
6662
6723
  {
@@ -6681,18 +6742,20 @@ var OPERATIONS = [
6681
6742
  "idempotentHint": false
6682
6743
  }
6683
6744
  },
6684
- "description": "Resets one limit on a subject (`limitId`), or every limit on it (`{}`), at once: for goodwill, a promotion or support. The schedule doesn't move: the next reset is still the usual one. A balance goes back to its amount; a concurrent limit is skipped. Send an Idempotency-Key and a repeat resets once. Owners and admins only, for a person's token.",
6745
+ "description": "Resets one limit on a subject now, or every limit on it. Send `limitId` for one limit, or `{}` for all of them. Use it for goodwill, a promotion or support. The schedule doesn't move, so the next reset still happens when it normally would. A balance goes back to its amount, and the reset skips concurrent limits. With an Idempotency-Key, a repeated request resets only once. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
6685
6746
  "fields": [
6686
6747
  {
6687
6748
  "name": "subjectKind",
6688
6749
  "in": "path",
6689
6750
  "type": "string",
6690
6751
  "required": true,
6752
+ "description": "The subject kind's ID.",
6691
6753
  "example": "team",
6692
6754
  "schema": {
6693
6755
  "type": "string",
6694
6756
  "minLength": 1,
6695
- "maxLength": 100
6757
+ "maxLength": 100,
6758
+ "description": "The subject kind's ID."
6696
6759
  }
6697
6760
  },
6698
6761
  {
@@ -6700,11 +6763,13 @@ var OPERATIONS = [
6700
6763
  "in": "path",
6701
6764
  "type": "string",
6702
6765
  "required": true,
6766
+ "description": "The subject's ID.",
6703
6767
  "example": "team_42",
6704
6768
  "schema": {
6705
6769
  "type": "string",
6706
6770
  "minLength": 1,
6707
- "maxLength": 200
6771
+ "maxLength": 200,
6772
+ "description": "The subject's ID."
6708
6773
  }
6709
6774
  },
6710
6775
  {
@@ -6712,16 +6777,17 @@ var OPERATIONS = [
6712
6777
  "in": "body",
6713
6778
  "type": "string",
6714
6779
  "required": false,
6715
- "description": "Just this limit. Default: every limit on the subject.",
6716
- "example": "lmt_3f0c\u2026",
6780
+ "description": "The one limit to reset. Default: every limit on the subject.",
6781
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6717
6782
  "schema": {
6718
6783
  "type": "string",
6719
- "description": "Just this limit. Default: every limit on the subject."
6784
+ "description": "The one limit to reset. Default: every limit on the subject."
6720
6785
  }
6721
6786
  }
6722
6787
  ],
6723
6788
  "hasBody": true,
6724
6789
  "workspace": true,
6790
+ "acceptsApiKey": true,
6725
6791
  "scope": "limits:write"
6726
6792
  },
6727
6793
  {
@@ -6746,18 +6812,20 @@ var OPERATIONS = [
6746
6812
  "idempotentHint": false
6747
6813
  }
6748
6814
  },
6749
- "description": "Sets when a subject's `billing_date` limits' periods start from: typically its subscription's start date, from your billing system's webhook, so its allowance resets on its own billing day (monthly for an annual plan, too). Owners and admins only, for a person's token.",
6815
+ "description": "Sets the date a subject's `billing_date` limits count their periods from. Usually this is the subscription's start date, set from your billing system's webhook. The subject's allowance then resets on its own billing day, and a monthly limit still resets monthly on an annual plan. With a personal access token, only owners and admins can call this. A workspace API key with this scope can.",
6750
6816
  "fields": [
6751
6817
  {
6752
6818
  "name": "subjectKind",
6753
6819
  "in": "path",
6754
6820
  "type": "string",
6755
6821
  "required": true,
6822
+ "description": "The subject kind's ID.",
6756
6823
  "example": "team",
6757
6824
  "schema": {
6758
6825
  "type": "string",
6759
6826
  "minLength": 1,
6760
- "maxLength": 100
6827
+ "maxLength": 100,
6828
+ "description": "The subject kind's ID."
6761
6829
  }
6762
6830
  },
6763
6831
  {
@@ -6765,11 +6833,13 @@ var OPERATIONS = [
6765
6833
  "in": "path",
6766
6834
  "type": "string",
6767
6835
  "required": true,
6836
+ "description": "The subject's ID.",
6768
6837
  "example": "team_42",
6769
6838
  "schema": {
6770
6839
  "type": "string",
6771
6840
  "minLength": 1,
6772
- "maxLength": 200
6841
+ "maxLength": 200,
6842
+ "description": "The subject's ID."
6773
6843
  }
6774
6844
  },
6775
6845
  {
@@ -6777,17 +6847,18 @@ var OPERATIONS = [
6777
6847
  "in": "body",
6778
6848
  "type": "string",
6779
6849
  "required": true,
6780
- "description": "The date and time its periods start from (ISO 8601), such as a subscription's start.",
6850
+ "description": "The date and time the subject's periods start from, in ISO 8601, such as a subscription's start.",
6781
6851
  "example": "2026-03-17T14:30:00Z",
6782
6852
  "schema": {
6783
6853
  "type": "string",
6784
6854
  "format": "date-time",
6785
- "description": "The date and time its periods start from (ISO 8601), such as a subscription's start."
6855
+ "description": "The date and time the subject's periods start from, in ISO 8601, such as a subscription's start."
6786
6856
  }
6787
6857
  }
6788
6858
  ],
6789
6859
  "hasBody": true,
6790
6860
  "workspace": true,
6861
+ "acceptsApiKey": true,
6791
6862
  "scope": "limits:write"
6792
6863
  },
6793
6864
  {
@@ -6809,18 +6880,18 @@ var OPERATIONS = [
6809
6880
  "idempotentHint": true
6810
6881
  }
6811
6882
  },
6812
- "description": "Units used, checks allowed and refused for one limit \u2014 across all subjects, or one (`subject`, as `kind:id`) \u2014 per hour or per day (UTC), every bucket in the range included. Up to about a minute behind live checks. Default: the last 30 days, by day.",
6883
+ "description": "Returns one limit's usage over time: the units used, and the checks allowed and refused. It covers every subject, or one subject named in `subject` as `kind:id`. Usage comes in hourly or daily buckets in UTC, and the response includes every bucket in the range. It can be up to about a minute behind live checks. By default, it covers the last 30 days, by day. A request returns at most 2,000 buckets. Usage older than your plan's history isn't returned.",
6813
6884
  "fields": [
6814
6885
  {
6815
6886
  "name": "limitId",
6816
6887
  "in": "query",
6817
6888
  "type": "string",
6818
6889
  "required": true,
6819
- "description": "The limit.",
6820
- "example": "lmt_3f0c\u2026",
6890
+ "description": "The limit's ID.",
6891
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6821
6892
  "schema": {
6822
6893
  "type": "string",
6823
- "description": "The limit."
6894
+ "description": "The limit's ID."
6824
6895
  }
6825
6896
  },
6826
6897
  {
@@ -6828,13 +6899,13 @@ var OPERATIONS = [
6828
6899
  "in": "query",
6829
6900
  "type": "string",
6830
6901
  "required": false,
6831
- "description": "One subject's usage, not every subject's, as `kind:id`.",
6902
+ "description": "One subject, as `kind:id`, to see its usage instead of every subject's.",
6832
6903
  "example": "user:usr_123",
6833
6904
  "schema": {
6834
6905
  "type": "string",
6835
6906
  "minLength": 3,
6836
6907
  "maxLength": 301,
6837
- "description": "One subject's usage, not every subject's, as `kind:id`."
6908
+ "description": "One subject, as `kind:id`, to see its usage instead of every subject's."
6838
6909
  }
6839
6910
  },
6840
6911
  {
@@ -6842,12 +6913,12 @@ var OPERATIONS = [
6842
6913
  "in": "query",
6843
6914
  "type": "string",
6844
6915
  "required": false,
6845
- "description": "Start of the range (ISO 8601). Default: 30 days before `to`.",
6916
+ "description": "The start of the range, in ISO 8601. Default: 30 days before `to`.",
6846
6917
  "example": "2026-10-01T00:00:00Z",
6847
6918
  "schema": {
6848
6919
  "type": "string",
6849
6920
  "format": "date-time",
6850
- "description": "Start of the range (ISO 8601). Default: 30 days before `to`."
6921
+ "description": "The start of the range, in ISO 8601. Default: 30 days before `to`."
6851
6922
  }
6852
6923
  },
6853
6924
  {
@@ -6855,12 +6926,12 @@ var OPERATIONS = [
6855
6926
  "in": "query",
6856
6927
  "type": "string",
6857
6928
  "required": false,
6858
- "description": "End of the range (ISO 8601). Default: now.",
6929
+ "description": "The end of the range, in ISO 8601. Default: now.",
6859
6930
  "example": "2026-10-31T00:00:00Z",
6860
6931
  "schema": {
6861
6932
  "type": "string",
6862
6933
  "format": "date-time",
6863
- "description": "End of the range (ISO 8601). Default: now."
6934
+ "description": "The end of the range, in ISO 8601. Default: now."
6864
6935
  }
6865
6936
  },
6866
6937
  {
@@ -6868,7 +6939,7 @@ var OPERATIONS = [
6868
6939
  "in": "query",
6869
6940
  "type": "string",
6870
6941
  "required": false,
6871
- "description": "One bucket per `hour` or per `day` (UTC). Default: day.",
6942
+ "description": "Whether each bucket is an `hour` or a `day`, in UTC. Default: day.",
6872
6943
  "schema": {
6873
6944
  "type": "string",
6874
6945
  "enum": [
@@ -6876,12 +6947,13 @@ var OPERATIONS = [
6876
6947
  "day"
6877
6948
  ],
6878
6949
  "default": "day",
6879
- "description": "One bucket per `hour` or per `day` (UTC). Default: day."
6950
+ "description": "Whether each bucket is an `hour` or a `day`, in UTC. Default: day."
6880
6951
  }
6881
6952
  }
6882
6953
  ],
6883
6954
  "hasBody": false,
6884
6955
  "workspace": true,
6956
+ "acceptsApiKey": true,
6885
6957
  "scope": "limits:read"
6886
6958
  },
6887
6959
  {
@@ -6903,20 +6975,20 @@ var OPERATIONS = [
6903
6975
  "idempotentHint": true
6904
6976
  }
6905
6977
  },
6906
- "description": "Every enabled limit on one subject (`subject`, as `kind:id`, such as `user:usr_123`) \u2014 and on its shared subjects (`shared`, comma-separated `kind:id`, such as `team:team_42`) \u2014 with what is used, what is left and when it resets, exact as of now. For showing an end user where they stand: call it from your server with your key, never from a browser. Not a check: nothing is counted. A subject with no limit here answers an empty `limits` list.",
6978
+ "description": "Returns where one subject stands on every enabled limit, exact as of now. It covers the subject's own limits and the limits on its shared subjects. Name the subject as `kind:id`, such as `user:usr_123`, and list its shared subjects in `shared`, such as `team:team_42`. Each limit shows what's used, what's left and when it resets. Use it to show your users where they stand. Call it from your server with your key, never from a browser. It isn't a check, so it counts nothing. A subject with no limits returns an empty `limits` list.",
6907
6979
  "fields": [
6908
6980
  {
6909
6981
  "name": "subject",
6910
6982
  "in": "query",
6911
6983
  "type": "string",
6912
6984
  "required": true,
6913
- "description": "The subject, as `kind:id`: its kind and id as your checks send them.",
6985
+ "description": "The subject, written as `kind:id` exactly as your checks send it.",
6914
6986
  "example": "user:usr_123",
6915
6987
  "schema": {
6916
6988
  "type": "string",
6917
6989
  "minLength": 3,
6918
6990
  "maxLength": 301,
6919
- "description": "The subject, as `kind:id`: its kind and id as your checks send them."
6991
+ "description": "The subject, written as `kind:id` exactly as your checks send it."
6920
6992
  }
6921
6993
  },
6922
6994
  {
@@ -6924,16 +6996,17 @@ var OPERATIONS = [
6924
6996
  "in": "query",
6925
6997
  "type": "string",
6926
6998
  "required": false,
6927
- "description": "Shared subjects to include, comma-separated `kind:id` (up to 4).",
6999
+ "description": "Shared subjects to include, as comma-separated `kind:id` pairs. Send up to 4.",
6928
7000
  "example": "team:team_42",
6929
7001
  "schema": {
6930
7002
  "type": "string",
6931
- "description": "Shared subjects to include, comma-separated `kind:id` (up to 4)."
7003
+ "description": "Shared subjects to include, as comma-separated `kind:id` pairs. Send up to 4."
6932
7004
  }
6933
7005
  }
6934
7006
  ],
6935
7007
  "hasBody": false,
6936
7008
  "workspace": true,
7009
+ "acceptsApiKey": true,
6937
7010
  "scope": "limits:read"
6938
7011
  },
6939
7012
  {
@@ -6955,18 +7028,18 @@ var OPERATIONS = [
6955
7028
  "idempotentHint": true
6956
7029
  }
6957
7030
  },
6958
- "description": "A limit's subjects in its CURRENT window, most used first: units used, what is left, and how many checks it refused. Up to about a minute behind live checks.",
7031
+ "description": "Lists a limit's subjects in its current window, most used first. Each one shows the units used, what's left and how many checks the limit refused. The amounts are exact, but a subject first checked in the last minute may not appear yet. For a `concurrent` limit, it lists the slots each subject holds now, among the subjects checked in the last hour.",
6959
7032
  "fields": [
6960
7033
  {
6961
7034
  "name": "limitId",
6962
7035
  "in": "query",
6963
7036
  "type": "string",
6964
7037
  "required": true,
6965
- "description": "The limit.",
6966
- "example": "lmt_3f0c\u2026",
7038
+ "description": "The limit's ID.",
7039
+ "example": "lmt_6f1c2a9e-4b7d-4e3a-9c5f-8d2b1a0e7c34",
6967
7040
  "schema": {
6968
7041
  "type": "string",
6969
- "description": "The limit."
7042
+ "description": "The limit's ID."
6970
7043
  }
6971
7044
  },
6972
7045
  {
@@ -6974,18 +7047,19 @@ var OPERATIONS = [
6974
7047
  "in": "query",
6975
7048
  "type": "number",
6976
7049
  "required": false,
6977
- "description": "How many subjects, most used first: 1\u2013200. Default 50.",
7050
+ "description": "How many subjects to list. Default: 50. The response holds at most 50, or 25 for a `concurrent` limit, even if you ask for more.",
6978
7051
  "schema": {
6979
7052
  "type": "integer",
6980
7053
  "minimum": 1,
6981
7054
  "maximum": 200,
6982
7055
  "default": 50,
6983
- "description": "How many subjects, most used first: 1\u2013200. Default 50."
7056
+ "description": "How many subjects to list. Default: 50. The response holds at most 50, or 25 for a `concurrent` limit, even if you ask for more."
6984
7057
  }
6985
7058
  }
6986
7059
  ],
6987
7060
  "hasBody": false,
6988
7061
  "workspace": true,
7062
+ "acceptsApiKey": true,
6989
7063
  "scope": "limits:read"
6990
7064
  },
6991
7065
  {
@@ -7000,12 +7074,13 @@ var OPERATIONS = [
7000
7074
  },
7001
7075
  "mcp": {
7002
7076
  "exposed": false,
7003
- "reason": "Personal access tokens only; an agent's connection acts in one workspace (workspace_get)."
7077
+ "reason": "Only a personal access token can call this. An agent's connection acts in one workspace, which workspace_get returns."
7004
7078
  },
7005
- "description": 'Returns the user the personal access token belongs to, with their workspace memberships. Useful as an integration smoke test ("who am I?").',
7079
+ "description": 'Returns the user the personal access token belongs to, and their workspace memberships. Use it as a smoke test for an integration ("who am I?").',
7006
7080
  "fields": [],
7007
7081
  "hasBody": false,
7008
- "workspace": false
7082
+ "workspace": false,
7083
+ "acceptsApiKey": false
7009
7084
  },
7010
7085
  {
7011
7086
  "operationId": "user.revokeToken",
@@ -7019,12 +7094,13 @@ var OPERATIONS = [
7019
7094
  },
7020
7095
  "mcp": {
7021
7096
  "exposed": false,
7022
- "reason": "Revokes a person's own credential; agents connect through OAuth, not personal tokens."
7097
+ "reason": "Revokes a person's own credential. Agents connect through OAuth and never use personal tokens."
7023
7098
  },
7024
- "description": "Revokes the personal access token used to call it \u2014 signing out from a script or the CLI (`logout`). The token stops working immediately; other tokens are untouched.",
7099
+ "description": "Revokes the personal access token that makes the request. Use it to sign out from a script or the CLI (`logout`). The token stops working immediately. Your other tokens keep working.",
7025
7100
  "fields": [],
7026
7101
  "hasBody": false,
7027
- "workspace": false
7102
+ "workspace": false,
7103
+ "acceptsApiKey": false
7028
7104
  },
7029
7105
  {
7030
7106
  "operationId": "workspace.approvalActions.list",
@@ -7045,10 +7121,11 @@ var OPERATIONS = [
7045
7121
  "idempotentHint": true
7046
7122
  }
7047
7123
  },
7048
- "description": "Actions a credential may not take itself but may ASK a person to approve: each one's input (JSON Schema), who can approve it, and whether it creates a secret.",
7124
+ "description": "Lists the actions a credential can't take itself but can ask a person to approve. Each action comes with its input as a JSON Schema, who can approve it and whether it creates a secret.",
7049
7125
  "fields": [],
7050
7126
  "hasBody": false,
7051
7127
  "workspace": true,
7128
+ "acceptsApiKey": true,
7052
7129
  "scope": "workspace.approvals:read"
7053
7130
  },
7054
7131
  {
@@ -7070,7 +7147,7 @@ var OPERATIONS = [
7070
7147
  "idempotentHint": false
7071
7148
  }
7072
7149
  },
7073
- "description": "Files a request for an action you may not take yourself (see approval-actions) and notifies everyone who can approve it. Show the person `approveUrl` and why you need it; then check the request until it is decided (it expires after 24 hours). A personal access token or an app a person connected may ask \u2014 not a workspace API key.",
7150
+ "description": "Creates a request for an action you can't take yourself and notifies everyone who can approve it. The actions you can ask for are in approval-actions. Show the person `approveUrl` and why you need the action. Then check the request until a person decides. A request expires after 24 hours. A personal access token or an app a person connected can ask. A workspace API key can't.",
7074
7151
  "fields": [
7075
7152
  {
7076
7153
  "name": "action",
@@ -7089,7 +7166,7 @@ var OPERATIONS = [
7089
7166
  "in": "body",
7090
7167
  "type": "json",
7091
7168
  "required": true,
7092
- "description": "The action's input, per its JSON Schema.",
7169
+ "description": "The action's input. It must match the action's JSON Schema.",
7093
7170
  "example": {
7094
7171
  "name": "acme-web",
7095
7172
  "scopes": [
@@ -7099,7 +7176,7 @@ var OPERATIONS = [
7099
7176
  "schema": {
7100
7177
  "type": "object",
7101
7178
  "additionalProperties": {},
7102
- "description": "The action's input, per its JSON Schema."
7179
+ "description": "The action's input. It must match the action's JSON Schema."
7103
7180
  }
7104
7181
  },
7105
7182
  {
@@ -7107,17 +7184,19 @@ var OPERATIONS = [
7107
7184
  "in": "body",
7108
7185
  "type": "string",
7109
7186
  "required": true,
7110
- "description": "Why \u2014 the person reads it before deciding.",
7187
+ "description": "Why you need the action. The person reads it before deciding.",
7188
+ "example": "A key for the deploy pipeline.",
7111
7189
  "schema": {
7112
7190
  "type": "string",
7113
7191
  "minLength": 1,
7114
7192
  "maxLength": 500,
7115
- "description": "Why \u2014 the person reads it before deciding."
7193
+ "description": "Why you need the action. The person reads it before deciding."
7116
7194
  }
7117
7195
  }
7118
7196
  ],
7119
7197
  "hasBody": true,
7120
7198
  "workspace": true,
7199
+ "acceptsApiKey": false,
7121
7200
  "scope": "workspace.approvals:write"
7122
7201
  },
7123
7202
  {
@@ -7141,7 +7220,7 @@ var OPERATIONS = [
7141
7220
  "idempotentHint": true
7142
7221
  }
7143
7222
  },
7144
- "description": "The request you filed: pending, denied, completed (the action ran \u2014 see `result`), approved (waiting for the CLI to redeem it), failed or expired.",
7223
+ "description": "Returns an approval request you created, with its status. A `pending` request is waiting for a person to decide. A `completed` request's action ran, and `result` holds the outcome. An `approved` request is waiting for the CLI to redeem it. A request can also be `denied`, `failed` or `expired`.",
7145
7224
  "fields": [
7146
7225
  {
7147
7226
  "name": "requestId",
@@ -7149,6 +7228,7 @@ var OPERATIONS = [
7149
7228
  "type": "string",
7150
7229
  "required": true,
7151
7230
  "description": "The request's id.",
7231
+ "example": "apr_7c2e\u2026",
7152
7232
  "schema": {
7153
7233
  "type": "string",
7154
7234
  "description": "The request's id."
@@ -7157,6 +7237,7 @@ var OPERATIONS = [
7157
7237
  ],
7158
7238
  "hasBody": false,
7159
7239
  "workspace": true,
7240
+ "acceptsApiKey": true,
7160
7241
  "scope": "workspace.approvals:read"
7161
7242
  },
7162
7243
  {
@@ -7173,9 +7254,9 @@ var OPERATIONS = [
7173
7254
  },
7174
7255
  "mcp": {
7175
7256
  "exposed": false,
7176
- "reason": "Returns a secret; secrets never enter an agent's conversation \u2014 the CLI writes them to a file."
7257
+ "reason": "Returns a secret. Secrets never enter an agent's conversation. The CLI writes them to a file instead."
7177
7258
  },
7178
- "description": "Runs an approved, secret-producing action ONCE and returns its secret \u2014 to the personal access token that asked, only. The CLI writes it to a file without printing it.",
7259
+ "description": "Runs an approved action that creates a secret, and returns the secret. The action runs only once. Only the personal access token that asked can redeem it. The CLI writes the secret to a file without printing it.",
7179
7260
  "fields": [
7180
7261
  {
7181
7262
  "name": "requestId",
@@ -7183,6 +7264,7 @@ var OPERATIONS = [
7183
7264
  "type": "string",
7184
7265
  "required": true,
7185
7266
  "description": "The request's id.",
7267
+ "example": "apr_7c2e\u2026",
7186
7268
  "schema": {
7187
7269
  "type": "string",
7188
7270
  "description": "The request's id."
@@ -7191,6 +7273,7 @@ var OPERATIONS = [
7191
7273
  ],
7192
7274
  "hasBody": false,
7193
7275
  "workspace": true,
7276
+ "acceptsApiKey": false,
7194
7277
  "scope": "workspace.approvals:write"
7195
7278
  },
7196
7279
  {
@@ -7212,7 +7295,7 @@ var OPERATIONS = [
7212
7295
  "idempotentHint": true
7213
7296
  }
7214
7297
  },
7215
- "description": "The workspace's audit trail, newest first. Paginate with the opaque `nextCursor` token; `limit` is clamped to 1\u2013100 (default 25). Owner-only for personal access tokens, like the audit page in the application; a Workspace API key is its workspace and always passes.",
7298
+ "description": "Lists the workspace's audit events, newest first. Paginate with the opaque `nextCursor` token. `limit` takes 1 to 100 and defaults to 25. With a personal access token, only workspace owners can call this, as with the audit page in the app. A workspace API key always can, because it acts as the workspace itself.",
7216
7299
  "fields": [
7217
7300
  {
7218
7301
  "name": "limit",
@@ -7243,6 +7326,7 @@ var OPERATIONS = [
7243
7326
  ],
7244
7327
  "hasBody": false,
7245
7328
  "workspace": true,
7329
+ "acceptsApiKey": true,
7246
7330
  "scope": "workspace.audit:read"
7247
7331
  },
7248
7332
  {
@@ -7264,10 +7348,11 @@ var OPERATIONS = [
7264
7348
  "idempotentHint": true
7265
7349
  }
7266
7350
  },
7267
- "description": "Every workspace event a webhook endpoint can subscribe to, with what it means. Pass some as `eventTypes` when adding an endpoint; an endpoint without a list receives them all.",
7351
+ "description": "Lists every workspace event a webhook endpoint can subscribe to, and what each one means. Pass some as `eventTypes` when you add an endpoint. An endpoint without a list receives every event.",
7268
7352
  "fields": [],
7269
7353
  "hasBody": false,
7270
7354
  "workspace": true,
7355
+ "acceptsApiKey": true,
7271
7356
  "scope": "workspace.webhooks:read"
7272
7357
  },
7273
7358
  {
@@ -7289,10 +7374,11 @@ var OPERATIONS = [
7289
7374
  "idempotentHint": true
7290
7375
  }
7291
7376
  },
7292
- "description": `Returns the Workspace the credential acts in \u2014 the API key's own, or the one named by X-Workspace for a personal access token. Useful as an integration smoke test ("who am I?").`,
7377
+ "description": 'Returns the workspace the credential acts in. For an API key, that is the key\'s own workspace. For a personal access token, it is the one named in `X-Workspace`. Use it as a smoke test for an integration ("who am I?").',
7293
7378
  "fields": [],
7294
7379
  "hasBody": false,
7295
7380
  "workspace": true,
7381
+ "acceptsApiKey": true,
7296
7382
  "scope": "workspace:read"
7297
7383
  },
7298
7384
  {
@@ -7314,7 +7400,7 @@ var OPERATIONS = [
7314
7400
  "idempotentHint": true
7315
7401
  }
7316
7402
  },
7317
- "description": "Invitations sent and not yet accepted, declined or expired, newest first. Owners and admins only for a personal credential, as in the app. Paginate with the opaque `nextCursor`.",
7403
+ "description": "Lists the invitations that are not yet accepted, declined or expired, newest first. With a personal credential, only owners and admins can call this, as in the app. A workspace API key always can. Paginate with the opaque `nextCursor`.",
7318
7404
  "fields": [
7319
7405
  {
7320
7406
  "name": "limit",
@@ -7345,6 +7431,7 @@ var OPERATIONS = [
7345
7431
  ],
7346
7432
  "hasBody": false,
7347
7433
  "workspace": true,
7434
+ "acceptsApiKey": true,
7348
7435
  "scope": "workspace.members:read"
7349
7436
  },
7350
7437
  {
@@ -7366,7 +7453,7 @@ var OPERATIONS = [
7366
7453
  "idempotentHint": true
7367
7454
  }
7368
7455
  },
7369
- "description": "The workspace's members with their roles, newest first. Paginate with the opaque `nextCursor`; `limit` is clamped to 1\u2013100 (default 25). Members are invited, removed and given roles in the app.",
7456
+ "description": "Lists the workspace's members and their roles, newest first. Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Invite members, remove them and give them roles in the app.",
7370
7457
  "fields": [
7371
7458
  {
7372
7459
  "name": "limit",
@@ -7397,6 +7484,7 @@ var OPERATIONS = [
7397
7484
  ],
7398
7485
  "hasBody": false,
7399
7486
  "workspace": true,
7487
+ "acceptsApiKey": true,
7400
7488
  "scope": "workspace.members:read"
7401
7489
  },
7402
7490
  {
@@ -7418,7 +7506,7 @@ var OPERATIONS = [
7418
7506
  "idempotentHint": true
7419
7507
  }
7420
7508
  },
7421
- "description": "The workspace's teams with their members' user ids, newest first. Paginate with the opaque `nextCursor`; `limit` is clamped to 1\u2013100 (default 25). Teams are created and staffed in the app.",
7509
+ "description": "Lists the workspace's teams and their members' user ids, newest first. Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Create teams and add members to them in the app.",
7422
7510
  "fields": [
7423
7511
  {
7424
7512
  "name": "limit",
@@ -7449,6 +7537,7 @@ var OPERATIONS = [
7449
7537
  ],
7450
7538
  "hasBody": false,
7451
7539
  "workspace": true,
7540
+ "acceptsApiKey": true,
7452
7541
  "scope": "workspace.teams:read"
7453
7542
  },
7454
7543
  {
@@ -7470,10 +7559,11 @@ var OPERATIONS = [
7470
7559
  "idempotentHint": true
7471
7560
  }
7472
7561
  },
7473
- "description": "How much of each meter the workspace used this period, with the plan's limit for it (null = unlimited). A period is a month from the workspace's billing date: its subscription's (an annual plan's counts reset monthly from its start), else the day the workspace was created.",
7562
+ "description": "Returns what the workspace used this period, with one entry for each thing its plan counts. Each entry has the plan's limit, or null when there is no limit. A period is one month from the workspace's billing date. That date comes from its subscription or, without one, from the day you created the workspace. On an annual plan, the counts still reset every month from the subscription's start.",
7474
7563
  "fields": [],
7475
7564
  "hasBody": false,
7476
7565
  "workspace": true,
7566
+ "acceptsApiKey": true,
7477
7567
  "scope": "workspace:read"
7478
7568
  },
7479
7569
  {
@@ -7497,16 +7587,18 @@ var OPERATIONS = [
7497
7587
  "idempotentHint": true
7498
7588
  }
7499
7589
  },
7500
- "description": "Delivery history for one endpoint, newest first: each event's status, attempts and last HTTP status (payloads are not returned). Kept for 30 days. Paginate with the opaque `nextCursor`.",
7590
+ "description": "Lists one endpoint's delivery history, newest first. Each entry shows the event's status, attempts and last HTTP status. Payloads aren't included. We keep the history for 30 days. Paginate with the opaque `nextCursor`. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7501
7591
  "fields": [
7502
7592
  {
7503
7593
  "name": "endpointId",
7504
7594
  "in": "path",
7505
7595
  "type": "string",
7506
7596
  "required": true,
7597
+ "description": "The endpoint's ID.",
7507
7598
  "example": "we_3f0c\u2026",
7508
7599
  "schema": {
7509
- "type": "string"
7600
+ "type": "string",
7601
+ "description": "The endpoint's ID."
7510
7602
  }
7511
7603
  },
7512
7604
  {
@@ -7538,6 +7630,7 @@ var OPERATIONS = [
7538
7630
  ],
7539
7631
  "hasBody": false,
7540
7632
  "workspace": true,
7633
+ "acceptsApiKey": true,
7541
7634
  "scope": "workspace.webhooks:read"
7542
7635
  },
7543
7636
  {
@@ -7562,16 +7655,18 @@ var OPERATIONS = [
7562
7655
  "idempotentHint": false
7563
7656
  }
7564
7657
  },
7565
- "description": "Sends a recorded delivery's event again, as a new delivery with its own history entry; the event id is unchanged, so receivers can deduplicate. The endpoint must be enabled.",
7658
+ "description": "Sends a recorded delivery's event again, as a new delivery. The new delivery gets its own history entry. The event id stays the same, so receivers can deduplicate. Redelivery only works on an enabled endpoint. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7566
7659
  "fields": [
7567
7660
  {
7568
7661
  "name": "endpointId",
7569
7662
  "in": "path",
7570
7663
  "type": "string",
7571
7664
  "required": true,
7665
+ "description": "The endpoint's ID.",
7572
7666
  "example": "we_3f0c\u2026",
7573
7667
  "schema": {
7574
- "type": "string"
7668
+ "type": "string",
7669
+ "description": "The endpoint's ID."
7575
7670
  }
7576
7671
  },
7577
7672
  {
@@ -7579,14 +7674,17 @@ var OPERATIONS = [
7579
7674
  "in": "path",
7580
7675
  "type": "string",
7581
7676
  "required": true,
7677
+ "description": "The delivery's ID.",
7582
7678
  "example": "del_8a1b\u2026",
7583
7679
  "schema": {
7584
- "type": "string"
7680
+ "type": "string",
7681
+ "description": "The delivery's ID."
7585
7682
  }
7586
7683
  }
7587
7684
  ],
7588
7685
  "hasBody": false,
7589
7686
  "workspace": true,
7687
+ "acceptsApiKey": true,
7590
7688
  "scope": "workspace.webhooks:write"
7591
7689
  },
7592
7690
  {
@@ -7601,22 +7699,22 @@ var OPERATIONS = [
7601
7699
  },
7602
7700
  "mcp": {
7603
7701
  "exposed": false,
7604
- "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Webhooks in the app)."
7702
+ "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
7605
7703
  },
7606
- "description": "Registers an https URL to receive the workspace's events, signed Svix-compatibly. The response carries the endpoint's signing secret (`whsec_\u2026`) \u2014 shown ONCE, store it to verify deliveries. Private and non-https hosts are refused; at most 10 per workspace.",
7704
+ "description": "Registers an HTTPS URL to receive the workspace's events. Deliveries use the same signature format as Svix. The response includes the endpoint's signing secret (`whsec_\u2026`). You see it only once, so store it to verify deliveries. The API refuses private hosts and hosts without HTTPS. A workspace can have at most 10 endpoints. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7607
7705
  "fields": [
7608
7706
  {
7609
7707
  "name": "url",
7610
7708
  "in": "body",
7611
7709
  "type": "string",
7612
7710
  "required": true,
7613
- "description": "The https URL that receives the events.",
7711
+ "description": "The HTTPS URL that receives the events.",
7614
7712
  "example": "https://example.com/hooks",
7615
7713
  "schema": {
7616
7714
  "type": "string",
7617
7715
  "minLength": 1,
7618
7716
  "maxLength": 2048,
7619
- "description": "The https URL that receives the events."
7717
+ "description": "The HTTPS URL that receives the events."
7620
7718
  }
7621
7719
  },
7622
7720
  {
@@ -7636,7 +7734,7 @@ var OPERATIONS = [
7636
7734
  "in": "body",
7637
7735
  "type": "json",
7638
7736
  "required": false,
7639
- "description": "Only these event types (see event-types); omit for every event.",
7737
+ "description": "Send only these event types, from event-types. Leave it out for every event.",
7640
7738
  "example": [
7641
7739
  "workspace.member.joined"
7642
7740
  ],
@@ -7646,12 +7744,13 @@ var OPERATIONS = [
7646
7744
  "type": "string"
7647
7745
  },
7648
7746
  "maxItems": 100,
7649
- "description": "Only these event types (see event-types); omit for every event."
7747
+ "description": "Send only these event types, from event-types. Leave it out for every event."
7650
7748
  }
7651
7749
  }
7652
7750
  ],
7653
7751
  "hasBody": true,
7654
7752
  "workspace": true,
7753
+ "acceptsApiKey": true,
7655
7754
  "scope": "workspace.webhooks:write"
7656
7755
  },
7657
7756
  {
@@ -7668,23 +7767,26 @@ var OPERATIONS = [
7668
7767
  },
7669
7768
  "mcp": {
7670
7769
  "exposed": false,
7671
- "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Webhooks in the app)."
7770
+ "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
7672
7771
  },
7673
- "description": "Stops all deliveries to the endpoint and deletes it with its secret. Its delivery history goes with it.",
7772
+ "description": "Deletes the endpoint and its signing secret. All deliveries to the endpoint stop. Its delivery history goes with it. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7674
7773
  "fields": [
7675
7774
  {
7676
7775
  "name": "endpointId",
7677
7776
  "in": "path",
7678
7777
  "type": "string",
7679
7778
  "required": true,
7779
+ "description": "The endpoint's ID.",
7680
7780
  "example": "we_3f0c\u2026",
7681
7781
  "schema": {
7682
- "type": "string"
7782
+ "type": "string",
7783
+ "description": "The endpoint's ID."
7683
7784
  }
7684
7785
  }
7685
7786
  ],
7686
7787
  "hasBody": false,
7687
7788
  "workspace": true,
7789
+ "acceptsApiKey": true,
7688
7790
  "scope": "workspace.webhooks:write"
7689
7791
  },
7690
7792
  {
@@ -7701,23 +7803,26 @@ var OPERATIONS = [
7701
7803
  },
7702
7804
  "mcp": {
7703
7805
  "exposed": false,
7704
- "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Webhooks in the app)."
7806
+ "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
7705
7807
  },
7706
- "description": "Resumes deliveries to an endpoint that was disabled after repeated failures, keeping its signing secret; the failure count resets.",
7808
+ "description": "Resumes deliveries to an endpoint that stopped after repeated failures. The endpoint keeps its signing secret. Its failure count resets. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7707
7809
  "fields": [
7708
7810
  {
7709
7811
  "name": "endpointId",
7710
7812
  "in": "path",
7711
7813
  "type": "string",
7712
7814
  "required": true,
7815
+ "description": "The endpoint's ID.",
7713
7816
  "example": "we_3f0c\u2026",
7714
7817
  "schema": {
7715
- "type": "string"
7818
+ "type": "string",
7819
+ "description": "The endpoint's ID."
7716
7820
  }
7717
7821
  }
7718
7822
  ],
7719
7823
  "hasBody": false,
7720
7824
  "workspace": true,
7825
+ "acceptsApiKey": true,
7721
7826
  "scope": "workspace.webhooks:write"
7722
7827
  },
7723
7828
  {
@@ -7741,21 +7846,24 @@ var OPERATIONS = [
7741
7846
  "idempotentHint": true
7742
7847
  }
7743
7848
  },
7744
- "description": "One endpoint, without its signing secret: whether it is enabled, its consecutive failures and its last delivery status.",
7849
+ "description": "Returns one endpoint without its signing secret. It shows whether the endpoint is on, its consecutive failures and its last delivery status. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7745
7850
  "fields": [
7746
7851
  {
7747
7852
  "name": "endpointId",
7748
7853
  "in": "path",
7749
7854
  "type": "string",
7750
7855
  "required": true,
7856
+ "description": "The endpoint's ID.",
7751
7857
  "example": "we_3f0c\u2026",
7752
7858
  "schema": {
7753
- "type": "string"
7859
+ "type": "string",
7860
+ "description": "The endpoint's ID."
7754
7861
  }
7755
7862
  }
7756
7863
  ],
7757
7864
  "hasBody": false,
7758
7865
  "workspace": true,
7866
+ "acceptsApiKey": true,
7759
7867
  "scope": "workspace.webhooks:read"
7760
7868
  },
7761
7869
  {
@@ -7777,10 +7885,11 @@ var OPERATIONS = [
7777
7885
  "idempotentHint": true
7778
7886
  }
7779
7887
  },
7780
- "description": "The workspace's outgoing webhook endpoints, newest first, without their signing secrets. A workspace has at most 10, so the list is a single page (`nextCursor` is null).",
7888
+ "description": "Lists the workspace's outgoing webhook endpoints, newest first. The list leaves out their signing secrets. A workspace has at most 10 endpoints, so the list is a single page. Its `nextCursor` is null. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7781
7889
  "fields": [],
7782
7890
  "hasBody": false,
7783
7891
  "workspace": true,
7892
+ "acceptsApiKey": true,
7784
7893
  "scope": "workspace.webhooks:read"
7785
7894
  },
7786
7895
  {
@@ -7804,21 +7913,24 @@ var OPERATIONS = [
7804
7913
  "idempotentHint": false
7805
7914
  }
7806
7915
  },
7807
- "description": "Sends a `ping` event to the endpoint, signed like every delivery \u2014 the way to check an integration verifies and accepts deliveries.",
7916
+ "description": "Sends a `ping` event to the endpoint, signed like every delivery. Use it to check that an integration verifies and accepts deliveries. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7808
7917
  "fields": [
7809
7918
  {
7810
7919
  "name": "endpointId",
7811
7920
  "in": "path",
7812
7921
  "type": "string",
7813
7922
  "required": true,
7923
+ "description": "The endpoint's ID.",
7814
7924
  "example": "we_3f0c\u2026",
7815
7925
  "schema": {
7816
- "type": "string"
7926
+ "type": "string",
7927
+ "description": "The endpoint's ID."
7817
7928
  }
7818
7929
  }
7819
7930
  ],
7820
7931
  "hasBody": false,
7821
7932
  "workspace": true,
7933
+ "acceptsApiKey": true,
7822
7934
  "scope": "workspace.webhooks:write"
7823
7935
  },
7824
7936
  {
@@ -7835,18 +7947,20 @@ var OPERATIONS = [
7835
7947
  },
7836
7948
  "mcp": {
7837
7949
  "exposed": false,
7838
- "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Webhooks in the app)."
7950
+ "reason": "Changes where workspace data is sent. A person configures webhook endpoints (Settings \u2192 Developers in the app)."
7839
7951
  },
7840
- "description": "Changes an endpoint's URL, description or event types in place; only the fields sent change. The endpoint keeps its signing secret, so receivers keep verifying deliveries. A new URL passes the same checks as on create: https only, no private hosts.",
7952
+ "description": "Changes an endpoint's URL, description or event types in place. Only the fields you send change. The endpoint keeps its signing secret, so receivers keep verifying deliveries. A new URL must pass the same checks as on create. It must use HTTPS and can't be a private host. With a personal access token, only workspace owners can call this. A workspace API key with this scope can.",
7841
7953
  "fields": [
7842
7954
  {
7843
7955
  "name": "endpointId",
7844
7956
  "in": "path",
7845
7957
  "type": "string",
7846
7958
  "required": true,
7959
+ "description": "The endpoint's ID.",
7847
7960
  "example": "we_3f0c\u2026",
7848
7961
  "schema": {
7849
- "type": "string"
7962
+ "type": "string",
7963
+ "description": "The endpoint's ID."
7850
7964
  }
7851
7965
  },
7852
7966
  {
@@ -7854,13 +7968,13 @@ var OPERATIONS = [
7854
7968
  "in": "body",
7855
7969
  "type": "string",
7856
7970
  "required": false,
7857
- "description": "The https URL that receives the events.",
7971
+ "description": "The HTTPS URL that receives the events.",
7858
7972
  "example": "https://example.com/hooks",
7859
7973
  "schema": {
7860
7974
  "type": "string",
7861
7975
  "minLength": 1,
7862
7976
  "maxLength": 2048,
7863
- "description": "The https URL that receives the events."
7977
+ "description": "The HTTPS URL that receives the events."
7864
7978
  }
7865
7979
  },
7866
7980
  {
@@ -7868,14 +7982,14 @@ var OPERATIONS = [
7868
7982
  "in": "body",
7869
7983
  "type": "string",
7870
7984
  "required": false,
7871
- "description": "A note for people managing the endpoint; null clears it.",
7985
+ "description": "A note for people managing the endpoint. Null clears it.",
7872
7986
  "schema": {
7873
7987
  "type": [
7874
7988
  "string",
7875
7989
  "null"
7876
7990
  ],
7877
7991
  "maxLength": 200,
7878
- "description": "A note for people managing the endpoint; null clears it."
7992
+ "description": "A note for people managing the endpoint. Null clears it."
7879
7993
  }
7880
7994
  },
7881
7995
  {
@@ -7883,7 +7997,7 @@ var OPERATIONS = [
7883
7997
  "in": "body",
7884
7998
  "type": "json",
7885
7999
  "required": false,
7886
- "description": "Only these event types (see event-types); null or an empty list for every event.",
8000
+ "description": "Send only these event types, from event-types. Null or an empty list means every event.",
7887
8001
  "example": [
7888
8002
  "workspace.member.joined"
7889
8003
  ],
@@ -7896,12 +8010,13 @@ var OPERATIONS = [
7896
8010
  "type": "string"
7897
8011
  },
7898
8012
  "maxItems": 100,
7899
- "description": "Only these event types (see event-types); null or an empty list for every event."
8013
+ "description": "Send only these event types, from event-types. Null or an empty list means every event."
7900
8014
  }
7901
8015
  }
7902
8016
  ],
7903
8017
  "hasBody": true,
7904
8018
  "workspace": true,
8019
+ "acceptsApiKey": true,
7905
8020
  "scope": "workspace.webhooks:write"
7906
8021
  }
7907
8022
  ];
@@ -7986,14 +8101,15 @@ ${op.description}`);
7986
8101
  if (op.workspace) {
7987
8102
  command.option("--workspace <slug>", "act in this workspace for one call");
7988
8103
  }
7989
- if (op.cli.confirm) command.option("--yes", "confirm \u2014 it cannot be undone");
8104
+ if (op.cli.confirm)
8105
+ command.option("--yes", "confirm an operation that cannot be undone");
7990
8106
  command.option("--json", "machine-readable output");
7991
8107
  command.action(async (...input) => {
7992
8108
  const values = input.slice(0, op.cli.args.length);
7993
8109
  const options = input[op.cli.args.length];
7994
8110
  if (op.cli.confirm && !options.yes) {
7995
8111
  throw new Error(
7996
- `${op.summary} cannot be undone \u2014 re-run with --yes to confirm`
8112
+ `${op.summary} cannot be undone. Run it again with --yes to confirm.`
7997
8113
  );
7998
8114
  }
7999
8115
  const args = Object.fromEntries(
@@ -8196,6 +8312,9 @@ Shortcut: \`${brand.name} sync\`, the same command.`
8196
8312
  };
8197
8313
  function syncCommand(command, ctx, description, more) {
8198
8314
  command.description(description).argument("[file]", "the file to read", "limitry.json").option("--preview", "show what would change, and change nothing").option("--limits <json>", "the limits as a JSON array, instead of a file").option(
8315
+ "--data <json>",
8316
+ "the whole JSON body, as every command takes, instead of a file"
8317
+ ).option(
8199
8318
  "--archive-missing",
8200
8319
  "archive active limits the file doesn't name (restorable)"
8201
8320
  ).option("--workspace <slug>", "act in this workspace for one call").option("--json", "machine-readable output").addHelpText(
@@ -8203,12 +8322,13 @@ function syncCommand(command, ctx, description, more) {
8203
8322
  '\nThe file: { "limits": [ { "name": "AI budget", "subject": { "kind": "user" }, "action": "ai-call", "amount": 200, "unit": "cents", "window": "month" } ] }\nEach limit is described whole: a field left out is its default, as on `limits create`. Names are the key.\nWhat a limit counts (subject, action, unit, window, every, start, rolling) is fixed: to change it, give the entry a new name.' + more
8204
8323
  ).action(
8205
8324
  async (file, options) => {
8206
- const limits = options.limits === void 0 ? readLimitsFile(file) : parseLimits(options.limits, "--limits");
8325
+ const data = options.data === void 0 ? {} : parseData(options.data);
8326
+ const limits = options.limits !== void 0 ? parseLimits(options.limits, "--limits") : data.limits !== void 0 ? limitsIn(data.limits) : readLimitsFile(file);
8207
8327
  const result = await ctx.client({ workspace: options.workspace }).limits.sync(
8208
8328
  {
8209
8329
  limits,
8210
- archiveMissing: options.archiveMissing ?? false,
8211
- preview: options.preview ?? false
8330
+ archiveMissing: options.archiveMissing ?? data.archiveMissing === true,
8331
+ preview: options.preview ?? data.preview === true
8212
8332
  },
8213
8333
  { idempotencyKey: crypto.randomUUID() }
8214
8334
  );
@@ -8256,6 +8376,24 @@ function parseLimits(text, flag2) {
8256
8376
  }
8257
8377
  return parsed;
8258
8378
  }
8379
+ function parseData(text) {
8380
+ let parsed;
8381
+ try {
8382
+ parsed = JSON.parse(text);
8383
+ } catch (error) {
8384
+ throw new Error("--data must be a JSON object", { cause: error });
8385
+ }
8386
+ if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
8387
+ throw new Error("--data must be a JSON object");
8388
+ }
8389
+ return parsed;
8390
+ }
8391
+ function limitsIn(value) {
8392
+ if (!Array.isArray(value)) {
8393
+ throw new Error("--data's limits must be a JSON array of limits");
8394
+ }
8395
+ return value;
8396
+ }
8259
8397
  var show = (value) => typeof value === "string" ? value : JSON.stringify(value);
8260
8398
  function summary(result) {
8261
8399
  const dry = result.preview;
@@ -8299,7 +8437,7 @@ function tokenEnvVar() {
8299
8437
  function build(io) {
8300
8438
  let actedIn = null;
8301
8439
  let sending;
8302
- const program2 = new Command().name(brand.name).description(`${brand.productName} command line`).version("1.0.0-rc.11").addHelpText(
8440
+ const program2 = new Command().name(brand.name).description(`The ${brand.productName} CLI`).version("1.0.0-rc.12").addHelpText(
8303
8441
  "after",
8304
8442
  `
8305
8443
  Token: \`${brand.name} login\` stores it in ~/.config/${brand.name}/; ${tokenEnvVar()} overrides.
@@ -8323,7 +8461,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
8323
8461
  const settings = ctx.settings();
8324
8462
  if (!settings.token) {
8325
8463
  throw new Error(
8326
- `not logged in \u2014 run \`${brand.name} login\` or set ${tokenEnvVar()}`
8464
+ `not logged in. Run \`${brand.name} login\` or set ${tokenEnvVar()}.`
8327
8465
  );
8328
8466
  }
8329
8467
  if (!settings.token.startsWith("pat_")) {
@@ -8342,7 +8480,7 @@ Environment: --environment, else ${environmentEnvVar()}, else \`${brand.name} en
8342
8480
  const workspace2 = options.workspace === false ? void 0 : options.workspace ?? settings.workspace;
8343
8481
  if (options.workspace !== false && !workspace2) {
8344
8482
  throw new Error(
8345
- `no workspace selected \u2014 \`${brand.name} workspace use <slug>\` or pass --workspace <slug>`
8483
+ `no workspace selected. Run \`${brand.name} workspace use <slug>\` or pass --workspace <slug>.`
8346
8484
  );
8347
8485
  }
8348
8486
  return {