@fleetless/contracts 6.4.0-next.1 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,33 +9,31 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [6.5.0] — 2026-10-11
13
+
12
14
  ### Added
13
15
 
14
- - **The operator's admin API (fleetless/fleetless#268).** `RouteAuth`
15
- gains `operator`: a short-lived EdDSA-signed assertion naming the acting
16
- person and their roles (`operatorRole`: `operator-admin`,
17
- `operator-finance`, `operator-support`), carried as
18
- `Authorization: Operator <jwt>` and verified against
19
- `operatorAssertionClaims`. Every `auth: 'operator'` route is
20
- `audience: 'internal'` and carries a `RouteEntry.operator` block (roles,
21
- and a `confirmationLevel` on a command), looked up by `operatorAccess`
22
- and written into `routes.json` as `operator`.
23
- - **The command protocol.** `operatorCommandRequest`/`operatorCommandResponse`
24
- describe a preview-reason-execute cycle: a `preview` mode answering
25
- `operatorPreview` and a token, an `execute` mode taking a `reason`, that
26
- token and an `idempotency_key`, and a result carrying `operatorAuditRef`.
27
- `409 preview_stale` carries a fresh preview in `previewStaleDetails`.
28
- The no-op command (`POST /api/admin/commands/noop`,
29
- `noopCommandRequest`/`noopCommandResponse`) proves the protocol without
30
- changing anything.
31
- - **Search and org reads.** `GET /api/admin/search`
32
- (`adminSearchQuery`/`adminSearchResponse`, hit kinds org, person, invoice,
33
- payment, robot), `GET /api/admin/orgs/:id` (`adminOrgDetail`) and
34
- `GET /api/admin/orgs/:id/usage`, identical to the developer's own usage
35
- read for the named org.
36
- - **Two error codes**: `preview_stale` (409, an execute's preview is no
37
- longer current) and `idempotency_key_reused` (409, the key was already
38
- used for a different command, input or operator).
16
+ - The internal auth-portal route template `GET /waitlist-invite/:token`,
17
+ unauthenticated and rate-limited, for waiting-list invitations to a new
18
+ Basic organization. It describes the browser-proof redirect and invalid
19
+ link handling without publishing recipient links or secret values.
20
+
21
+ ### Changed
22
+
23
+ - Console signup route notes describe the invite-bound exception under
24
+ `SIGNUP_MODE=closed`. Ordinary public signup remains closed; the existing
25
+ signup auth/rate-limit metadata and team invitation routes are unchanged.
26
+
27
+ ## [6.4.0] — 2026-10-09
28
+
29
+ ### Changed
30
+
31
+ - **Final releases publish under the npm dist-tag `staging`;** `latest` moves
32
+ when the release is promoted to production, and never backwards. `npm i
33
+ @fleetless/contracts` therefore installs what runs in production. A release
34
+ that is still being tested is installable by its version number or as
35
+ `@fleetless/contracts@staging`. Pre-releases stay under `next`. No wire
36
+ shape changes.
39
37
 
40
38
  ## [6.3.0] — 2026-10-05
41
39
 
package/CONTRIBUTING.md CHANGED
@@ -135,6 +135,15 @@ itself once the required `verify` check passes; the merge commit is tagged,
135
135
  `verify.yml` runs again on it and packs the tarball, and `publish` ships
136
136
  exactly that tarball.
137
137
 
138
+ **A release does not move `latest`.** It is published under the npm dist-tag
139
+ `staging`, and the run ends by asking the ops repository to record the
140
+ version for the staging environment. `latest` — what `npm i
141
+ @fleetless/contracts` installs — moves when the staging generation that
142
+ carries the release is promoted to production, and never backwards. Until
143
+ then the version is installable by its number or as
144
+ `@fleetless/contracts@staging`. The trusted publisher of this workflow may
145
+ publish only; it has no permission to move a dist-tag.
146
+
138
147
  A person still writes the `## [Unreleased]` entries — in the feature's own
139
148
  pull request, as the change goes in — because the release only renames that
140
149
  heading to a version; it never writes prose. An empty `## [Unreleased]`
@@ -165,7 +174,8 @@ no `.npmrc` anywhere.
165
174
  again.** It sees that npm already has the version and does not publish
166
175
  twice — npm refuses to republish a version, and a second attempt would only
167
176
  read like a broken run. The rerun continues from there: it waits for the
168
- registry to serve it, then finishes. Check `npm view
177
+ registry to serve it, asks the ops repository to record it for staging again,
178
+ then finishes. Check `npm view
169
179
  @fleetless/contracts@<version>` first if you want to see for yourself before
170
180
  pressing anything.
171
181
 
package/README.md CHANGED
@@ -36,6 +36,10 @@ client in another language, or a bridge of your own.
36
36
  npm i @fleetless/contracts
37
37
  ```
38
38
 
39
+ That installs `latest`, the version the Fleetless cloud runs in production. A
40
+ newer release may already be on npm under the dist-tag `staging` while it is
41
+ being tested; `next` carries pre-releases.
42
+
39
43
  TypeScript imports the schemas and the types inferred from them, all from the
40
44
  package root:
41
45
 
@@ -3186,6 +3186,31 @@
3186
3186
  "transport": "http",
3187
3187
  "notes": "`I saved my recovery codes` gates the button on the page; the step itself only checks that a second factor now exists. A browser gets a `303` to the console callback with the authorization code; a JSON caller that URL as `redirect_to`."
3188
3188
  },
3189
+ {
3190
+ "method": "GET",
3191
+ "path": "/waitlist-invite/:token",
3192
+ "section": "developer-auth",
3193
+ "summary": "Starts invite-bound console sign-up for a new Basic organization.",
3194
+ "audience": "internal",
3195
+ "auth": "none",
3196
+ "rateLimited": true,
3197
+ "ownerTier": false,
3198
+ "status": 303,
3199
+ "params": [
3200
+ {
3201
+ "name": "token",
3202
+ "description": "The opaque waiting-list invitation token from the mailed link; never a query parameter."
3203
+ }
3204
+ ],
3205
+ "query": null,
3206
+ "request": null,
3207
+ "response": null,
3208
+ "errors": [
3209
+ "rate_limited"
3210
+ ],
3211
+ "transport": "http",
3212
+ "notes": "Exchanges a valid seven-day invitation for a short-lived browser-proof cookie, then redirects with `303` into console sign-up. The response uses `Cache-Control: no-store` and `Referrer-Policy: no-referrer`; no caller-supplied redirect is accepted. Invalid, expired, used, declined or replaced links render the same `410` page; the per-IP backstop answers `429 rate_limited`. Only the invited normalized email address may register a new Basic organization under `SIGNUP_MODE=closed`, and the signup code still proves control of that address. Every step rechecks the unspent generation, expiry and address; re-inviting immediately invalidates the old link and any signup it started. The GET does not consume the invitation: final organization/Owner creation, waiting-list transition and single-use consumption share one transaction. The interaction binds the invitation id/generation, never the raw token. Tokens, proof values and recipient links stay out of the directory, logs and operator responses. Team invitations through `/accept-invite/:token` still join an existing organization."
3213
+ },
3189
3214
  {
3190
3215
  "method": "GET",
3191
3216
  "path": "/console/oauth/signup/:id",
@@ -3207,7 +3232,7 @@
3207
3232
  "response": null,
3208
3233
  "errors": [],
3209
3234
  "transport": "http",
3210
- "notes": "HTML: the email field and `Email me a code`, the first of three steps — email, code, organization. While the deployment runs in closed beta this renders the \"sign-up is closed\" card at `403` instead, keeping the interaction alive and pointing back at sign-in and the waiting list — the person may well already have an account."
3235
+ "notes": "HTML: the email field and `Email me a code`, the first of three steps — email, code, organization. While the deployment runs in closed beta this renders the \"sign-up is closed\" card at `403` instead, keeping the interaction alive and pointing back at sign-in and the waiting list — the person may well already have an account. Under `SIGNUP_MODE=closed`, only a valid invite-bound interaction may continue for the invited normalized email address and a new Basic organization. Each step rechecks its unspent invitation generation, expiry and address; ordinary public sign-up remains refused."
3211
3236
  },
3212
3237
  {
3213
3238
  "method": "POST",
@@ -3231,7 +3256,7 @@
3231
3256
  "email_taken"
3232
3257
  ],
3233
3258
  "transport": "http",
3234
- "notes": "A browser form post gets the code card; a JSON caller gets `{ \"next\", \"email\" }`, which has no schema. **No password**: the code mailed here, six digits valid ten minutes, proves the address. A per-interaction proof cookie is set here — it is what stops a third party from finishing a sign-up somebody else started. Sign-up is the one surface whose job is to say an address is taken, so `409 email_taken` is not a leak here."
3259
+ "notes": "A browser form post gets the code card; a JSON caller gets `{ \"next\", \"email\" }`, which has no schema. **No password**: the code mailed here, six digits valid ten minutes, proves the address. A per-interaction proof cookie is set here — it is what stops a third party from finishing a sign-up somebody else started. Sign-up is the one surface whose job is to say an address is taken, so `409 email_taken` is not a leak here. Under `SIGNUP_MODE=closed`, only a valid invite-bound interaction may request the code for the invited normalized email address; the unspent invitation generation, expiry and address are rechecked. Ordinary public sign-up still answers `403 signup_closed`."
3235
3260
  },
3236
3261
  {
3237
3262
  "method": "POST",
@@ -3256,7 +3281,7 @@
3256
3281
  "invalid_code"
3257
3282
  ],
3258
3283
  "transport": "http",
3259
- "notes": "A wrong code renders the code card again with the attempts left (`400 invalid_code`); a spent, expired or exhausted one is `410 token_spent`. The step before must have run in **this** browser (`401 wrong_browser`). A browser form post gets the organization card, the address shown `confirmed`; a JSON caller gets `{ \"next\" }`, which has no schema."
3284
+ "notes": "A wrong code renders the code card again with the attempts left (`400 invalid_code`); a spent, expired or exhausted one is `410 token_spent`. The step before must have run in **this** browser (`401 wrong_browser`). A browser form post gets the organization card, the address shown `confirmed`; a JSON caller gets `{ \"next\" }`, which has no schema. Under `SIGNUP_MODE=closed`, only a valid invite-bound interaction may continue after rechecking its unspent invitation generation, expiry and invited normalized email address. Ordinary public sign-up still answers `403 signup_closed`."
3260
3285
  },
3261
3286
  {
3262
3287
  "method": "POST",
@@ -3281,7 +3306,7 @@
3281
3306
  "email_taken"
3282
3307
  ],
3283
3308
  "transport": "http",
3284
- "notes": "The form carries `org_name` only. The org and its founding Owner are created in one transaction, and only after the code step confirmed the address. Both steps before must have run in **this** browser: a missing or mismatched proof cookie is `401 wrong_browser` and the person is sent back to step one. `409 email_taken` when the address was taken meanwhile. A browser form post gets a `303` to the console callback; a JSON caller gets `redirect_to` at `200`. This is the only way an organisation is created: `POST /api/auth/signup` is gone, because without a password it would hand a session to anybody who names an address."
3309
+ "notes": "The form carries `org_name` only. The org and its founding Owner are created in one transaction, and only after the code step confirmed the address. Both steps before must have run in **this** browser: a missing or mismatched proof cookie is `401 wrong_browser` and the person is sent back to step one. `409 email_taken` when the address was taken meanwhile. A browser form post gets a `303` to the console callback; a JSON caller gets `redirect_to` at `200`. This is the only way an organisation is created: `POST /api/auth/signup` is gone, because without a password it would hand a session to anybody who names an address. Under `SIGNUP_MODE=closed`, only a valid invite-bound interaction may create a new Basic organization for the invited normalized email address. Rechecking the unspent invitation generation, expiry and address, creating the org/Owner, transitioning the waiting-list entry and consuming the invitation happen in that same transaction. Ordinary public sign-up still answers `403 signup_closed`."
3285
3310
  },
3286
3311
  {
3287
3312
  "method": "POST",
@@ -6475,139 +6500,6 @@
6475
6500
  "transport": "http",
6476
6501
  "notes": "Every public host answers `404 not_found` for every `/api/admin/*` path — this route is reachable only on the cloud's private address — and that same address answers `404` here too while `OPS_API_TOKEN` is not configured, so a door with no key behind it reads exactly like one nobody opened. An unknown `:id` is the same `404`. Applies at once, never queued as a `pending_change`, and only when the org's current usage fits the result: `409 plan_limit` when a lower plan, a lowered override or a removed add-on would leave the org over a limit — the operator never deletes an org's things, only the owner's own choice does. On success it also withdraws any `pending_change`, ends a beta org's wait for the switch and lifts a lock. Audited as `org.plan_changed` with the `fleetless` actor, never a developer's — the row names what an operator did, not who in the org asked for it. `409 target_state_conflict` names `currency` or `period_ends_at` with rule `billed` when the org has a billing account in `active` or `past_due` and the request names either field: both are fixed at the first payment and billing, not the operator, owns them from then on. The plan itself keeps working on a billed org — a plan, an add-on or an override the operator sets here is charged from the next renewal, except `enterprise` and `basic`, which the sweep cancels the billing account for instead."
6477
6502
  },
6478
- {
6479
- "method": "POST",
6480
- "path": "/api/admin/commands/noop",
6481
- "section": "org",
6482
- "summary": "Runs the no-op command: proves the preview-reason-execute protocol without changing anything.",
6483
- "audience": "internal",
6484
- "auth": "operator",
6485
- "rateLimited": true,
6486
- "ownerTier": false,
6487
- "status": 200,
6488
- "params": [],
6489
- "query": null,
6490
- "request": "noop-command-request",
6491
- "response": "noop-command-response",
6492
- "errors": [
6493
- "unauthorized",
6494
- "forbidden",
6495
- "not_found",
6496
- "validation_error",
6497
- "preview_stale",
6498
- "idempotency_key_reused",
6499
- "rate_limited"
6500
- ],
6501
- "transport": "http",
6502
- "notes": "Reachable only where the cloud enables it (`OPERATOR_NOOP_COMMAND=true`; refused in production). Proves the command path end to end without a real effect: a preview always answers one `keeps` effect, and an execute writes the operator audit plus an `operator.noop` row in the named org's audit, and nothing else. Every public host, and the private address while the operator API is not enabled, answers `404 not_found` for this path like any other unregistered one. A role the route does not list is refused with `403 forbidden`: a command says no where a read stays silent.",
6503
- "operator": {
6504
- "roles": [
6505
- "operator-admin",
6506
- "operator-finance",
6507
- "operator-support"
6508
- ],
6509
- "confirmation": "click"
6510
- }
6511
- },
6512
- {
6513
- "method": "GET",
6514
- "path": "/api/admin/search",
6515
- "section": "org",
6516
- "summary": "Finds an org, person, invoice, payment or robot by a literal, case-insensitive match.",
6517
- "audience": "internal",
6518
- "auth": "operator",
6519
- "rateLimited": true,
6520
- "ownerTier": false,
6521
- "status": 200,
6522
- "params": [],
6523
- "query": "admin-search-query",
6524
- "request": null,
6525
- "response": "admin-search-response",
6526
- "errors": [
6527
- "unauthorized",
6528
- "not_found",
6529
- "validation_error",
6530
- "rate_limited"
6531
- ],
6532
- "transport": "http",
6533
- "notes": "`q` is matched literally — `%`, `_` and `\\` carry no wildcard meaning — never as an `ILIKE` pattern, so a two-character query never dumps a table. At most `ADMIN_SEARCH_LIMIT` hits come back; `truncated` says whether more exist. A hit kind the caller's role may not see is left out rather than refused: `operator-support` gets no `invoice` or `payment` hits. Every public host, and the private address while the operator API is not enabled, answers `404 not_found` for this path. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
6534
- "operator": {
6535
- "roles": [
6536
- "operator-admin",
6537
- "operator-finance",
6538
- "operator-support"
6539
- ]
6540
- }
6541
- },
6542
- {
6543
- "method": "GET",
6544
- "path": "/api/admin/orgs/:id",
6545
- "section": "org",
6546
- "summary": "Reads an org's detail as the operator: its owner, plan, billing state and counts.",
6547
- "audience": "internal",
6548
- "auth": "operator",
6549
- "rateLimited": true,
6550
- "ownerTier": false,
6551
- "status": 200,
6552
- "params": [
6553
- {
6554
- "name": "id",
6555
- "description": "The org's uuid, whose detail the operator is reading."
6556
- }
6557
- ],
6558
- "query": null,
6559
- "request": null,
6560
- "response": "admin-org-detail",
6561
- "errors": [
6562
- "unauthorized",
6563
- "not_found",
6564
- "rate_limited"
6565
- ],
6566
- "transport": "http",
6567
- "notes": "`billing` carries the account's state and next charge only — never the payer, address or payment method. An unknown `:id` is `404 not_found`, the same every public host and the private address answer for this path while the operator API is not enabled. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
6568
- "operator": {
6569
- "roles": [
6570
- "operator-admin",
6571
- "operator-finance",
6572
- "operator-support"
6573
- ]
6574
- }
6575
- },
6576
- {
6577
- "method": "GET",
6578
- "path": "/api/admin/orgs/:id/usage",
6579
- "section": "org",
6580
- "summary": "Reads what an org consumed per day, per app and per metric, as the operator.",
6581
- "audience": "internal",
6582
- "auth": "operator",
6583
- "rateLimited": true,
6584
- "ownerTier": false,
6585
- "status": 200,
6586
- "params": [
6587
- {
6588
- "name": "id",
6589
- "description": "The org's uuid, whose usage the operator is reading."
6590
- }
6591
- ],
6592
- "query": "org-usage-query",
6593
- "request": null,
6594
- "response": "org-usage-response",
6595
- "errors": [
6596
- "unauthorized",
6597
- "not_found",
6598
- "validation_error",
6599
- "rate_limited"
6600
- ],
6601
- "transport": "http",
6602
- "notes": "Identical to `GET /api/org/usage` for the named org: the same window rule, the same `from_day <= to_day` cross-field check, and the same echoed window. An unknown `:id` is `404 not_found`, the same every public host and the private address answer for this path while the operator API is not enabled. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
6603
- "operator": {
6604
- "roles": [
6605
- "operator-admin",
6606
- "operator-finance",
6607
- "operator-support"
6608
- ]
6609
- }
6610
- },
6611
6503
  {
6612
6504
  "method": "GET",
6613
6505
  "path": "/api/billing",
@@ -62,8 +62,8 @@ export declare const providerSlug: z.ZodString;
62
62
  * mailed token, which is why `patchAppUserRequest` cannot set it: see there.
63
63
  */
64
64
  export declare const appUserStatus: z.ZodEnum<{
65
- active: "active";
66
65
  pending_verification: "pending_verification";
66
+ active: "active";
67
67
  blocked: "blocked";
68
68
  }>;
69
69
  export type AppUserStatus = z.infer<typeof appUserStatus>;
@@ -80,8 +80,8 @@ export declare const appUser: z.ZodObject<{
80
80
  display_name: z.ZodNullable<z.ZodString>;
81
81
  role_id: z.ZodUUID;
82
82
  status: z.ZodEnum<{
83
- active: "active";
84
83
  pending_verification: "pending_verification";
84
+ active: "active";
85
85
  blocked: "blocked";
86
86
  }>;
87
87
  has_password: z.ZodBoolean;
@@ -104,8 +104,8 @@ export declare const appUserListResponse: z.ZodObject<{
104
104
  display_name: z.ZodNullable<z.ZodString>;
105
105
  role_id: z.ZodUUID;
106
106
  status: z.ZodEnum<{
107
- active: "active";
108
107
  pending_verification: "pending_verification";
108
+ active: "active";
109
109
  blocked: "blocked";
110
110
  }>;
111
111
  has_password: z.ZodBoolean;
package/dist/billing.d.ts CHANGED
@@ -26,8 +26,8 @@ export declare function isEuCountry(country: string): boolean;
26
26
  export declare function currencyForCountry(country: string): PlanCurrency;
27
27
  /** Who is paying: a company (may hold a VAT ID) or a person (a full name, never a VAT ID). */
28
28
  export declare const payerKind: z.ZodEnum<{
29
- person: "person";
30
29
  company: "company";
30
+ person: "person";
31
31
  }>;
32
32
  export type PayerKind = z.infer<typeof payerKind>;
33
33
  /** The billing cycle: monthly, or yearly at twelve months for 15 % off (#103). */
@@ -295,16 +295,16 @@ export type CheckoutResponse = z.infer<typeof checkoutResponse>;
295
295
  export declare const checkoutStatus: z.ZodObject<{
296
296
  checkout_id: z.ZodUUID;
297
297
  status: z.ZodEnum<{
298
- pending: "pending";
299
- canceled: "canceled";
300
298
  failed: "failed";
299
+ pending: "pending";
301
300
  paid: "paid";
301
+ canceled: "canceled";
302
302
  expired: "expired";
303
303
  }>;
304
304
  purpose: z.ZodEnum<{
305
- invoice: "invoice";
306
305
  upgrade: "upgrade";
307
306
  payment_method: "payment_method";
307
+ invoice: "invoice";
308
308
  }>;
309
309
  plan: z.ZodEnum<{
310
310
  basic: "basic";
@@ -397,10 +397,10 @@ export declare const paymentMethodChangeRequest: z.ZodObject<{
397
397
  export type PaymentMethodChangeRequest = z.infer<typeof paymentMethodChangeRequest>;
398
398
  /** The billing account's own status, distinct from the org's plan: `billing_accounts` holds no plan, currency or period of its own. */
399
399
  export declare const billingAccountStatus: z.ZodEnum<{
400
- pending: "pending";
401
400
  active: "active";
402
- past_due: "past_due";
401
+ pending: "pending";
403
402
  canceled: "canceled";
403
+ past_due: "past_due";
404
404
  }>;
405
405
  export type BillingAccountStatus = z.infer<typeof billingAccountStatus>;
406
406
  /** The payment method on file, read from the active Mollie mandate — never a card or bank number, only its display fields. */
@@ -500,10 +500,10 @@ export declare const billingAccount: z.ZodObject<{
500
500
  yearly: "yearly";
501
501
  }>;
502
502
  status: z.ZodEnum<{
503
- pending: "pending";
504
503
  active: "active";
505
- past_due: "past_due";
504
+ pending: "pending";
506
505
  canceled: "canceled";
506
+ past_due: "past_due";
507
507
  }>;
508
508
  period_starts_at: z.ZodNullable<z.ZodISODateTime>;
509
509
  period_ends_at: z.ZodNullable<z.ZodISODateTime>;
@@ -586,10 +586,10 @@ export declare const billingView: z.ZodObject<{
586
586
  yearly: "yearly";
587
587
  }>;
588
588
  status: z.ZodEnum<{
589
- pending: "pending";
590
589
  active: "active";
591
- past_due: "past_due";
590
+ pending: "pending";
592
591
  canceled: "canceled";
592
+ past_due: "past_due";
593
593
  }>;
594
594
  period_starts_at: z.ZodNullable<z.ZodISODateTime>;
595
595
  period_ends_at: z.ZodNullable<z.ZodISODateTime>;
@@ -714,10 +714,10 @@ export declare const billingChangeResponse: z.ZodObject<{
714
714
  yearly: "yearly";
715
715
  }>;
716
716
  status: z.ZodEnum<{
717
- pending: "pending";
718
717
  active: "active";
719
- past_due: "past_due";
718
+ pending: "pending";
720
719
  canceled: "canceled";
720
+ past_due: "past_due";
721
721
  }>;
722
722
  period_starts_at: z.ZodNullable<z.ZodISODateTime>;
723
723
  period_ends_at: z.ZodNullable<z.ZodISODateTime>;
package/dist/errors.d.ts CHANGED
@@ -87,9 +87,9 @@ export type InvalidCodeDetails = z.infer<typeof invalidCodeDetails>;
87
87
  */
88
88
  export declare const planLimitDetails: z.ZodObject<{
89
89
  limit: z.ZodEnum<{
90
+ apps: "apps";
90
91
  seats: "seats";
91
92
  robots: "robots";
92
- apps: "apps";
93
93
  app_users: "app_users";
94
94
  live_video_ms_per_month: "live_video_ms_per_month";
95
95
  asset_bytes_per_robot: "asset_bytes_per_robot";
@@ -110,9 +110,9 @@ export declare const planLimitDetails: z.ZodObject<{
110
110
  enterprise: "enterprise";
111
111
  }>>;
112
112
  addon: z.ZodNullable<z.ZodEnum<{
113
+ apps: "apps";
113
114
  seats: "seats";
114
115
  robots: "robots";
115
- apps: "apps";
116
116
  app_user_packs: "app_user_packs";
117
117
  live_video_packs: "live_video_packs";
118
118
  }>>;
@@ -141,9 +141,9 @@ export type PlanLimitDetails = z.infer<typeof planLimitDetails>;
141
141
  */
142
142
  export declare const assetPlanLimitDetails: z.ZodObject<{
143
143
  limit: z.ZodEnum<{
144
+ apps: "apps";
144
145
  seats: "seats";
145
146
  robots: "robots";
146
- apps: "apps";
147
147
  app_users: "app_users";
148
148
  live_video_ms_per_month: "live_video_ms_per_month";
149
149
  asset_bytes_per_robot: "asset_bytes_per_robot";
@@ -164,9 +164,9 @@ export declare const assetPlanLimitDetails: z.ZodObject<{
164
164
  enterprise: "enterprise";
165
165
  }>>;
166
166
  addon: z.ZodNullable<z.ZodEnum<{
167
+ apps: "apps";
167
168
  seats: "seats";
168
169
  robots: "robots";
169
- apps: "apps";
170
170
  app_user_packs: "app_user_packs";
171
171
  live_video_packs: "live_video_packs";
172
172
  }>>;
@@ -179,9 +179,9 @@ export type AssetPlanLimitDetails = z.infer<typeof assetPlanLimitDetails>;
179
179
  /** The `details` of a `403 plan_required` refusal: the feature, the org's own plan, and the cheapest plan that has it (`requiredPlanFor`). */
180
180
  export declare const planRequiredDetails: z.ZodObject<{
181
181
  feature: z.ZodEnum<{
182
- app_mcp: "app_mcp";
183
- two_factor: "two_factor";
184
182
  require_two_factor: "require_two_factor";
183
+ two_factor: "two_factor";
184
+ app_mcp: "app_mcp";
185
185
  app_oidc: "app_oidc";
186
186
  hosted_logo: "hosted_logo";
187
187
  audit_export: "audit_export";
@@ -242,5 +242,5 @@ export type PaymentProviderUnavailableDetails = z.infer<typeof paymentProviderUn
242
242
  * list is the shared vocabulary, not a closed set, so a new refusal never
243
243
  * needs a contracts release before it can be reported honestly.
244
244
  */
245
- export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating", "preview_stale", "idempotency_key_reused"];
245
+ export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating"];
246
246
  export type ErrorCode = (typeof ERROR_CODES)[number];
package/dist/errors.js CHANGED
@@ -1069,18 +1069,4 @@ export const ERROR_CODES = [
1069
1069
  * finished. Retry later; nothing in the request needs to change.
1070
1070
  */
1071
1071
  'history_migrating',
1072
- // 2026-10 — the operator's admin API (fleetless/fleetless#268).
1073
- /**
1074
- * `409`: an execute named a preview that is no longer true — the state it
1075
- * read has changed, or it is older than ten minutes. Nothing was done.
1076
- * `details` (`previewStaleDetails`) carries a fresh preview and its token;
1077
- * confirm that one instead.
1078
- */
1079
- 'preview_stale',
1080
- /**
1081
- * `409`: the `idempotency_key` was already used for a different command,
1082
- * input or operator. Nothing was done. A retry of the same execute reuses
1083
- * its key and gets the first answer; anything else needs a new key.
1084
- */
1085
- 'idempotency_key_reused',
1086
1072
  ];
package/dist/index.d.ts CHANGED
@@ -51,14 +51,8 @@ export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDe
51
51
  export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, } from './errors.js';
52
52
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
53
53
  export type { OauthErrorCode, OauthError, OauthRedirectResponse, OauthCodeTokenRequest, OauthRefreshTokenRequest, OauthTokenRequest, OauthTokenResponse, RedirectUri, OauthAuthorizeQuery, DynamicClientRegistrationRequest, DynamicClientRegistrationResponse, AuthorizationServerMetadata, ProtectedResourceMetadata, } from './oauth.js';
54
- export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes, operatorAccess } from './routes.js';
55
- export type { RouteEntry, RouteParam, RouteAudience, RouteAuth, RouteSection, RouteMethod, RouteTransport, RouteOperatorAccess, } from './routes.js';
56
- export { OPERATOR_ROLES, operatorRole, CONFIRMATION_LEVELS, confirmationLevel, OPERATOR_ASSERTION_ISSUER, OPERATOR_AUTH_SCHEME, OPERATOR_ASSERTION_MAX_LIFETIME_SECONDS, OPERATOR_ASSERTION_MAX_FUTURE_SKEW_SECONDS, OPERATOR_ASSERTION_REPLAY_WINDOW_SECONDS, OPERATOR_REASON_MIN_LENGTH, OPERATOR_REASON_MAX_LENGTH, OPERATOR_PREVIEW_MAX_AGE_MS, operatorAssertionClaims, } from './operator.js';
57
- export type { OperatorRole, ConfirmationLevel, OperatorAssertionClaims, } from './operator.js';
58
- export { previewEffect, operatorPreview, operatorCommandRequest, operatorAuditRef, operatorCommandResponse, previewStaleDetails, noopCommandInput, noopCommandResult, noopCommandRequest, noopCommandResponse, } from './operator-commands.js';
59
- export type { PreviewEffect, OperatorPreview, OperatorAuditRef, PreviewStaleDetails, NoopCommandInput, NoopCommandResult, } from './operator-commands.js';
60
- export { ADMIN_SEARCH_KINDS, ADMIN_SEARCH_LIMIT, adminSearchQuery, adminSearchHit, adminSearchResponse, adminOrgBillingState, adminOrgDetail, } from './admin.js';
61
- export type { AdminSearchQuery, AdminSearchHit, AdminSearchResponse, AdminOrgBillingState, AdminOrgDetail, } from './admin.js';
54
+ export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
55
+ export type { RouteEntry, RouteParam, RouteAudience, RouteAuth, RouteSection, RouteMethod, RouteTransport, } from './routes.js';
62
56
  export { planId, PLAN_ORDER, planLimitKey, planLimits, planFeature, planFeatures, planPrices, planSupport, planCatalogueEntry, addonKey, addonCatalogueEntry, usdCentsFromEurCents, yearlyEurCents, pricesFromEurMonth, PLANS, ADDONS, requiredPlanFor, nextPlanRaising, } from './plans.js';
63
57
  export type { PlanId, PlanLimitKey, PlanLimits, PlanFeature, PlanFeatures, PlanPrices, PlanSupport, PlanCatalogueEntry, AddonKey, AddonCatalogueEntry, } from './plans.js';
64
58
  export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planOverrides, adminPlanChangeRequest, } from './plans.js';
package/dist/index.js CHANGED
@@ -60,11 +60,7 @@ fileTooLargeDetails,
60
60
  // 2026-10-04 — billing through Mollie (#104).
61
61
  paymentProviderUnavailableDetails, } from './errors.js';
62
62
  export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
63
- export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes, operatorAccess } from './routes.js';
64
- // fleetless/fleetless#268 — the operator platform's admin API foundation.
65
- export { OPERATOR_ROLES, operatorRole, CONFIRMATION_LEVELS, confirmationLevel, OPERATOR_ASSERTION_ISSUER, OPERATOR_AUTH_SCHEME, OPERATOR_ASSERTION_MAX_LIFETIME_SECONDS, OPERATOR_ASSERTION_MAX_FUTURE_SKEW_SECONDS, OPERATOR_ASSERTION_REPLAY_WINDOW_SECONDS, OPERATOR_REASON_MIN_LENGTH, OPERATOR_REASON_MAX_LENGTH, OPERATOR_PREVIEW_MAX_AGE_MS, operatorAssertionClaims, } from './operator.js';
66
- export { previewEffect, operatorPreview, operatorCommandRequest, operatorAuditRef, operatorCommandResponse, previewStaleDetails, noopCommandInput, noopCommandResult, noopCommandRequest, noopCommandResponse, } from './operator-commands.js';
67
- export { ADMIN_SEARCH_KINDS, ADMIN_SEARCH_LIMIT, adminSearchQuery, adminSearchHit, adminSearchResponse, adminOrgBillingState, adminOrgDetail, } from './admin.js';
63
+ export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
68
64
  // 2026-10-02 — plans (#103). The catalogue (I-1) only: `PLANS` and `ADDONS`
69
65
  // are deliberately not constants exports (`constants.json` is vendored by
70
66
  // the bridge and must stay unchanged) but are exported values of this